Prototype/MapGenPresets: Difference between revisions
Jump to navigation
Jump to search
(Undo revision 172584 by Sparr (talk) The example is copied from the base game, and should not be changed to something that cannot be found in base game code) Tag: Undo |
Muppet9010 (talk | contribs) (clarify presets as a special thing as they are defined so differently to all other prototype properties.) |
||
Line 16: | Line 16: | ||
Name of the map-gen-presets. Must be "default" since only one instances of this prototype can be defined. | Name of the map-gen-presets. Must be "default" since only one instances of this prototype can be defined. | ||
=== the | == Presets == | ||
Presets are defined as uniquely named properties of the prototype with a value of [[Types/MapGenPreset]]. | |||
<syntaxhighlight lang="lua"> | |||
{ | |||
type = "map-gen-presets", | |||
<syntaxhighlight lang="lua">default = | name = "default", | ||
{ | ["PRESET NAME 1"] = { | ||
order = "a", | |||
water = "none" | |||
} | }, | ||
["PRESET NAME 2"] = { | |||
order = "b", | |||
water = "high" | |||
} | |||
}</syntaxhighlight> |
Revision as of 20:48, 20 April 2019
Basics
Prototype type: map-gen-presets
The available map gen presets.
Mandatory properties
type
Type: Types/string
Must be "map-gen-presets".
name
Type: Types/string
Name of the map-gen-presets. Must be "default" since only one instances of this prototype can be defined.
Presets
Presets are defined as uniquely named properties of the prototype with a value of Types/MapGenPreset.
{
type = "map-gen-presets",
name = "default",
["PRESET NAME 1"] = {
order = "a",
water = "none"
},
["PRESET NAME 2"] = {
order = "b",
water = "high"
}
}