Template:Prototype property/short/doc: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Created page with "Displays a prototype property using shorter (list) formatting and creates a semantic mediawiki object for it. Parameters: * First parameter: Property name * Second parameter:...")
 
m (typo)
 
Line 15: Line 15:


Example for a property of Prototype/UtilityConstants:
Example for a property of Prototype/UtilityConstants:
<pre><nowiki>{{Prototype property/short|"train_inactivity_wait_condition_default"|[[Types/uint32]]}}
<pre><nowiki>{{Prototype property/short|train_inactivity_wait_condition_default|[[Types/uint32]]}}
{{Prototype property/short|"default_trigger_target_mask_by_type"|[[Types/table]] (array) of [[Types/string]] to [[Types/TriggerTargetMask]]|optional=true}} The strings are entity types.</nowiki></pre>
{{Prototype property/short|default_trigger_target_mask_by_type|[[Types/table]] (array) of [[Types/string]] to [[Types/TriggerTargetMask]]|optional=true}} The strings are entity types.</nowiki></pre>


* "train_inactivity_wait_condition_default" - [[Types/uint32]]
* train_inactivity_wait_condition_default - [[Types/uint32]]
* "default_trigger_target_mask_by_type" - [[Types/table]] (array) of [[Types/string]] to [[Types/TriggerTargetMask]] - Optional. The strings are entity types.
* default_trigger_target_mask_by_type - [[Types/table]] (array) of [[Types/string]] to [[Types/TriggerTargetMask]] - Optional. The strings are entity types.

Latest revision as of 11:06, 27 April 2020

Displays a prototype property using shorter (list) formatting and creates a semantic mediawiki object for it. Parameters:

  • First parameter: Property name
  • Second parameter: Property type
  • Named parameter "optional": Set to true when optional, otherwise not set.

Source code:

* {{{1}}} - {{{2}}}{{#if: {{{optional|}}}| - Optional.|}}{{#subobject:{{{1}}}
 |Prototype property name={{{1}}}
 |Prototype property type={{{2}}}
 |Prototype property optional={{{optional|false}}}
 |Prototype property pagename={{FULLPAGENAME}}
}}

Example for a property of Prototype/UtilityConstants:

{{Prototype property/short|train_inactivity_wait_condition_default|[[Types/uint32]]}}
{{Prototype property/short|default_trigger_target_mask_by_type|[[Types/table]] (array) of [[Types/string]] to [[Types/TriggerTargetMask]]|optional=true}} The strings are entity types.