Prototype/SelectionTool: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(1.1.36: avoid-rolling-stock selection mode flag added)
(Removed old prototype docs)
Tag: Replaced
 
(10 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Prototype parent|Prototype/ItemWithLabel}}
<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]
Used in the base game as a base for the blueprint item and the deconstruction item.


{{Prototype TOC|selection-tool}}
</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]].
 
{{Prototype property|selection_color|[[Types/Color|Color]]}}
The color of the rectangle used when standard selection is done in-game.
 
{{Prototype property|alt_selection_color|[[Types/Color|Color]]}}
The color of the rectangle used when alt-selection is done in-game.
 
{{Prototype property|selection_mode|[[Types/table|table]] of [[Types/string|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
|-
| downgrade || The normal rules for acceptable entities for downgrade
|-
| entity-with-health ||
|-
| entity-with-force ||
|-
| entity-with-owner ||
|-
| avoid-rolling-stock || The entity is not a [[Prototype/RollingStock]]
|}
 
{{Prototype property|alt_selection_mode|[[Types/table|table]] of [[Types/string|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.
 
{{Prototype property|selection_cursor_box_type|[[Types/CursorBoxType|CursorBoxType]]}}
The type of cursor box used to render selection of entities/tiles when standard selecting.
 
{{Prototype property|alt_selection_cursor_box_type|[[Types/CursorBoxType|CursorBoxType]]}}
The type of cursor box used to render selection of entities/tiles when alt selecting.
 
== Optional properties ==
 
{{Prototype property|reverse_selection_color|[[Types/Color|Color]]|Value of <code>selection_color</code>|optional=true}}
 
{{Prototype property|selection_count_button_color|[[Types/Color|Color]]|Value of <code>selection_color</code>|optional=true}}
 
{{Prototype property|alt_selection_count_button_color|[[Types/Color|Color]]|Value of <code>alt_selection_color</code>|optional=true}}
 
{{Prototype property|reverse_selection_count_button_color|[[Types/Color|Color]]|Value of <code>reverse_selection_color</code>|optional=true}}
 
{{Prototype property|chart_selection_color|[[Types/Color|Color]]|Value of <code>selection_color</code>|optional=true}}
 
{{Prototype property|chart_alt_selection_color|[[Types/Color|Color]]|Value of <code>alt_selection_color</code>|optional=true}}
 
{{Prototype property|chart_reverse_selection_color|[[Types/Color|Color]]|Value of <code>reverse_selection_color</code>|optional=true}}
 
{{Prototype property|reverse_selection_mode|[[Types/table|table]] of [[Types/string|string]]|Value of <code>selection_mode</code>|optional=true}}
A list of selection mode flags that define how the selection tool reverse-selects things in-game. Possible values are identical to normal selection_mode.
 
{{Prototype property|reverse_selection_cursor_box_type|[[Types/CursorBoxType|CursorBoxType]]|Value of <code>selection_cursor_box_type</code>|optional=true}}}
The type of cursor box used to render selection of entities/tiles when reverse-selecting.
 
{{Prototype property|always_include_tiles|[[Types/bool|bool]]|false|optional=true}}
If tiles should be included in the selection regardless of entities also being in the selection. This is a visual only setting.
 
{{Prototype property|mouse_cursor|[[Types/string|string]]|"selection-tool-cursor"|optional=true}}
Name of a [[Prototype/MouseCursor]].
 
{{Prototype property|entity_filters|[[Types/table|table]] of [[Types/string|string]]|optional=true}}
Array of [[Prototype/Entity]] names.
 
{{Prototype property|alt_entity_filters|[[Types/table|table]] of [[Types/string|string]]|optional=true}}
Array of [[Prototype/Entity]] names.
 
{{Prototype property|entity_type_filters|[[Types/table|table]] of [[Types/string|string]]|optional=true}}
 
{{Prototype property|alt_entity_type_filters|[[Types/table|table]] of [[Types/string|string]]|optional=true}}
 
{{Prototype property|tile_filters|[[Types/table|table]] of [[Types/string|string]]|optional=true}}
Array of [[Prototype/Tile]] names.
 
{{Prototype property|alt_tile_filters|[[Types/table|table]] of [[Types/string|string]]|optional=true}}
Array of [[Prototype/Tile]] names.
 
{{Prototype property|entity_filter_mode|[[Types/string|string]]|"whitelist"|optional=true}}
One of "whitelist" and "blacklist".
 
{{Prototype property|alt_entity_filter_mode|[[Types/string|string]]|"whitelist"|optional=true}}
One of "whitelist" and "blacklist".
 
{{Prototype property|tile_filter_mode|[[Types/string|string]]|"whitelist"|optional=true}}
One of "whitelist" and "blacklist".
 
{{Prototype property|alt_tile_filter_mode|[[Types/string|string]]|"whitelist"|optional=true}}
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.