initNode: make path optional and let it default to "". This is allowed:
props.globals.getNode("sim/foo", 1).initNode(); and equivalent to props.globals.getNode("sim").initNode("foo");
This commit is contained in:
parent
5c88cdf6f1
commit
8bf823c4fb
1 changed files with 1 additions and 1 deletions
|
@ -129,7 +129,7 @@ Node.getValues = func {
|
|||
# "DOUBLE" is used for numbers, and STRING for everything else.
|
||||
# Returns the property as props.Node.
|
||||
#
|
||||
Node.initNode = func(path, value = 0, type = nil) {
|
||||
Node.initNode = func(path = "", value = 0, type = nil) {
|
||||
var prop = me.getNode(path, 1);
|
||||
if(prop.getType() != "NONE") value = prop.getValue();
|
||||
if(type == nil) prop.setValue(value);
|
||||
|
|
Loading…
Reference in a new issue