Prototype/SelectionTool: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
==Basics== | ==Basics== | ||
Inherits from [[prototype/ItemWithLabel]] and is used in the base game for the blueprint item and the deconstruction item. | Inherits from [[prototype/ItemWithLabel]] and is used in the base game for the blueprint item and the deconstruction item. | ||
type = " | type = "selection-tool" | ||
== Mandatory properties == | == Mandatory properties == |
Revision as of 10:04, 12 July 2016
Basics
Inherits from prototype/ItemWithLabel and is used in the base game for the blueprint item and the deconstruction item.
type = "selection-tool"
Mandatory properties
selection_color
The color of the rectangle used when standard selection is done in-game.
selection_color = {r=1, g=0, b=0, a=1} -- red
alt_selection_color
The color of the rectangle used when alt-selection is done in-game.
alt_selection_color = {r=0, g=1, b=0, a=1} -- green
selection_mode
A list of selection mode flags that define how the selection tool selects things in-game.
selection_mode = {"blueprint"}
Possible values are:
Flag | meaning |
---|---|
blueprint | The normal rules for acceptable entities in blueprints |
deconstruct | The normal rules for acceptable entities for deconstruction |
cancel-deconstruct | The normal rules for acceptable entities for cancel deconstruction |
items | Item entities |
trees | Trees |
buildable-type | Buildable entities as defined by the game |
tiles | Any tiles |
items-to-place | The entity has an item that builds the entity |
any-entity | Any entity |
any-tile | Any tile |
matches-force | The entity force matches that of the player doing the selection |
alt_selection_mode
A list of selection mode flags that define how the selection tool alt-selects things in-game.
alt_selection_mode = {"cancel-deconstruct"}
Possible values are identical to normal selection_mode.
selection_cursor_box_type
The type of cursor box used to render selection of entities/tiles when standard selecting.
selection_cursor_box_type = "entity"
Possible values are:
Flag | meaning |
---|---|
entity | The normal entity selection box. Yellow by default. |
electricity | The selection box used to specify electric poles an entity is connected to. Light blue by default. |
copy | The selection box used when doing entity copy-paste. Green by default. |
not-allowed | The selection box used when specifying colliding entities. Red by default. |
pair | |
logistics |
Optional properties
always_include_tiles
If tiles should be included in the selection regardless of entities also being in the selection. By default this is false. This is a visual only setting.
always_include_tiles = false