Difference between revisions of "Template:treedef"

From Minetest Developer Wiki
Jump to navigation Jump to search
(this code style needs to look soo cruel…)
Line 1: Line 1:
 
=== Definition ===
 
=== Definition ===
 
{{#tag:syntaxhighlight|
 
{{#tag:syntaxhighlight|
treedef = {
+
treedef = {{{#ifexist: axiom |
axiom = {{{axiom|?}}},{{#ifexist: rules_a |
+
axiom = {{{axiom}}},}}{{#ifexist: rules_a |
 
  rules_a = {{{rules_a}}},}}{{#ifexist: rules_b |
 
  rules_a = {{{rules_a}}},}}{{#ifexist: rules_b |
 
  rules_b = {{{rules_b}}},}}{{#ifexist: rules_c |
 
  rules_b = {{{rules_b}}},}}{{#ifexist: rules_c |
Line 9: Line 9:
 
  trunk = {{{trunk}}},}}{{#ifexist: leaves |
 
  trunk = {{{trunk}}},}}{{#ifexist: leaves |
 
  leaves = {{{leaves}}},}}{{#ifexist: leaves2 |
 
  leaves = {{{leaves}}},}}{{#ifexist: leaves2 |
  leaves2 = {{{leaves2}}},}}
+
  leaves2 = {{{leaves2}}},}}{{#ifexist: leaves2_chance |
leaves2_chance = {{{leaves2_chance}}},
+
leaves2_chance = {{{leaves2_chance}}},}}{{#ifexist: angle |
angle = {{{angle}}},
+
angle = {{{angle}}},}}{{#ifexist: iterations |
iterations = {{{iterations}}},
+
iterations = {{{iterations}}},}}{{#ifexist: random_level |
random_level = {{{random_level|0}}},
+
random_level = {{{random_level}}},}}{{#ifexist: trunk_type |
trunk_type = {{{random_level|"single"}}},
+
trunk_type = {{{trunk_type}}},}}{{#ifexist: thin_branches |
thin_branches = {{{thin_branches|true}}},
+
thin_branches = {{{thin_branches}}},}}{{#ifexist: fruit |
fruit_chance = {{{fruit_chance}}},
+
fruit = {{{fruit}}},}}{{#ifexist: fruit_chance |
fruit = {{{fruit}}},
+
fruit_chance = {{{fruit_chance}}},}}{{#ifexist: seed |
seed = {{{seed}}},
+
seed = {{{seed}}},}}
 
}
 
}
 
| lang=lua}}
 
| lang=lua}}

Revision as of 16:36, 4 July 2015

Definition

treedef = {
}