Code: Select all
+//-- Return true if a droid with a given propulsion is able to travel from x1,y1 to x2,y2.
+//-- Does not take player built blockades into account.
Code: Select all
+//-- Return true if a droid with a given propulsion is able to travel from x1,y1 to x2,y2.
+//-- Does not take player built blockades into account.
More like "how" it was added to be precise. Were the droids added to the array of selected droids through drag-selection, hotkey, shift+click selection, etc?aubergine wrote:Are you specifically looking to know what was just added or removed from the selection, or is having a list of all selected things sufficient?
With recent features like add/remove beacon, we're getting closer to a point where we could ditch the messages/ folder and everything in it.A scripting guide once wrote: addMessage(INTMESSAGE, MESSAGETYPE, PLAYER, PLAY_IMMEDIATE)
This adds a message to the interface for the PLAYER. INTMESSAGE is a variable defined in the values file. MESSAGETYPE is a predefined type - see Script function constants. PLAYER is the player who gets the message. PLAY_IMMEDIATE is a bool for whether to bring the Intelligence Screen up with the message immediately or just store it.
removeMessage(INTMESSAGE, MESSAGETYPE, PLAYER)
This removes a message from the interface for the PLAYER. INTMESSAGE is a variable defined in the values file. MESSAGETYPE is a predefined type - see Script function constants. PLAYER is the player who loses the message.
Good idea but maybe made it as a copy (to keep the comalibity for older AI's and scripts)aubergine wrote:In fact, would it be possible to rename setScrollParams() and getScrollParams() to setScrollLimits() and getScrollLimits()? -- just seems to convey what they do more accurately and simply.
I don't understand this. It does not have to be updated during the game, as new oil resources cannot be added or removed during the game (only converted back/forth from derricks). It only tells you the position of a derrick, not what it is, so baseType and map preplacements are irrelevant. On the other hand, using enumFeature() and enumStruct() is a far slower alternative.aubergine wrote:Deprecate derrickPositions[] array -- it can't be relied on, and it's confusing:
* it's listing locations or oil resources (with or without derricks built on them), not locations of derricks = confusion
* it doesn't take map-placed derricks, or the effects that baseType setting has on those derricks, in to account
* It doesn't get updated during the game
As a result, we all use enumFeature() to find oil resources, and enumStruct() to find derricks, so there's little point in having the derrickPositions[] array IMHO.