Template:Prototype property/doc: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Created page with "Displays a prototype property and creates a semantic mediawiki object for it. Parameters: * First parameter: Property name * Second parameter: Property type * Named parameter...")
 
(documented third param)
 
Line 3: Line 3:
* First parameter: Property name
* First parameter: Property name
* Second parameter: Property type
* Second parameter: Property type
* Third parameter: The default value of the property
* Named parameter "optional": Set to true when optional, otherwise not set.
* Named parameter "optional": Set to true when optional, otherwise not set.



Latest revision as of 22:31, 27 July 2019

Displays a prototype property and creates a semantic mediawiki object for it. Parameters:

  • First parameter: Property name
  • Second parameter: Property type
  • Third parameter: The default value of the property
  • Named parameter "optional": Set to true when optional, otherwise not set.

Source code:

=== {{{1}}} ===
'''Type''': {{{2}}}<br>{{#if: {{{3|}}}|'''Default''': {{{3}}}<br>|}}{{#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/Armor:

{{Prototype_property|equipment_grid|[[Types/string|string]]|optional=true}}
Name of the [[Prototype/EquipmentGrid]] that this armor has.

equipment_grid

Type: string
Name of the Prototype/EquipmentGrid that this armor has.