Prototype/SelectionTool: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(0.17)
(Removed old prototype docs)
Tag: Replaced
 
(17 intermediate revisions by 6 users not shown)
Line 1: Line 1:
==Basics==
<div class="stub"><p>'''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/prototypes/SelectionToolPrototype.html https://lua-api.factorio.com/latest/prototypes/SelectionToolPrototype.html]
Prototype type: '''selection-tool'''


Used in the base game as a base for the blueprint item and the deconstruction item. Extends [[Prototype/ItemWithLabel]].
</p><p>This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums].</p></div>
 
== Extensions ==
* [[Prototype/BlueprintItem]] '''blueprint'''
* [[Prototype/CopyPasteTool]] '''copy-paste-tool'''
* [[Prototype/DeconstructionItem]] '''deconstruction-item'''
* [[Prototype/UpgradeItem]] '''upgrade-item'''
 
== Mandatory properties ==
This prototype inherits all the properties from [[Prototype/ItemWithLabel]].
 
=== selection_color ===
'''Type''': [[Types/Color]]
 
The color of the rectangle used when standard selection is done in-game.
 
=== alt_selection_color ===
'''Type''': [[Types/Color]]
 
The color of the rectangle used when alt-selection is done in-game.
 
=== selection_mode ===
'''Type''': [[Types/table]] of [[Types/string]]
 
A list of selection mode flags that define how the selection tool selects things in-game.
 
Possible values are:
{| class="wikitable"
|-
! 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
|-
| nothing || Nothing
|-
| items-to-place || The entity has an item that builds the entity
|-
| any-entity || Any entity
|-
| any-tile || Any tile
|-
| same-force || The entity force matches that of the player doing the selection
|-
| not-same-force || The entity force does not match that of the player doing the selection
|-
| friend || The entity force is friend to that of the player doing the selection
|-
| enemy || The entity force is enemy to that of the player doing the selection
|-
| upgrade || The normal rules for acceptable entities in upgrade planners
|-
| cancel-upgrade || The normal rules for acceptable entities for cancel upgrade
|-
| entity-with-health ||
|-
| entity-with-force ||
|-
| entity-with-owner ||
|}
 
=== alt_selection_mode ===
'''Type''': [[Types/table]] of [[Types/string]]
 
A list of selection mode flags that define how the selection tool alt-selects things in-game. Possible values are identical to normal selection_mode.
 
=== selection_cursor_box_type ===
'''Type''': [[Types/string]]
 
The type of cursor box used to render selection of entities/tiles when standard selecting.
 
Possible values are:
{| class="wikitable"
|-
! 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 ||
|-
| train-visualization ||
|}
 
=== alt_selection_cursor_box_type ===
'''Type''': [[Types/string]]
 
The type of cursor box used to render selection of entities/tiles when alt selecting.  Possible values are identical to normal selection_cursor_box_type.
 
== Optional properties ==
 
=== always_include_tiles ===
'''Type''': [[Types/bool]]
 
'''Default''': false
 
If tiles should be included in the selection regardless of entities also being in the selection. This is a visual only setting.
 
=== show_in_library ===
'''Type''': [[Types/bool]]
 
'''Default''': false
 
Whether this is shown in the blueprint library.
 
=== mouse_cursor ===
'''Type''': [[Types/string]]
 
'''Default''': "selection-tool-cursor"
 
Name of a [[Prototype/MouseCursor]].
 
=== entity_filters ===
'''Type''': [[Types/table]] of [[Types/string]]
 
Array of [[Prototype/Entity]] names.
 
=== alt_entity_filters ===
'''Type''': [[Types/table]] of [[Types/string]]
 
Array of [[Prototype/Entity]] names.
 
=== entity_type_filters ===
'''Type''': [[Types/table]] of [[Types/string]]
 
=== alt_entity_type_filters ===
'''Type''': [[Types/table]] of [[Types/string]]
 
=== tile_filters ===
'''Type''': [[Types/table]] of [[Types/string]]
 
Array of [[Prototype/Tile]] names.
 
=== alt_tile_filters ===
'''Type''': [[Types/table]] of [[Types/string]]
 
Array of [[Prototype/Tile]] names.
 
=== entity_filter_mode ===
'''Type''': [[Types/string]]
 
'''Default''': "whitelist"
 
One of "whitelist" and "blacklist".
 
=== alt_entity_filter_mode ===
'''Type''': [[Types/string]]
 
'''Default''': "whitelist"
 
One of "whitelist" and "blacklist".
 
=== tile_filter_mode ===
'''Type''': [[Types/string]]
 
'''Default''': "whitelist"
 
One of "whitelist" and "blacklist".
 
=== alt_tile_filter_mode ===
'''Type''': [[Types/string]]
 
'''Default''': "whitelist"
 
One of "whitelist" and "blacklist".

Latest revision as of 14:33, 25 October 2024

The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/prototypes/SelectionToolPrototype.html

This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.