allow _wait to be used without a parameter
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
local waitTime = ...
|
local waitTime = ...
|
||||||
assert(waitTime,"[_wait] requires a wait time")
|
|
||||||
|
-- default to 1 second if parameter is missing
|
||||||
|
if not waitTime then waitTime = 1 end
|
||||||
|
|
||||||
return Def.Actor{ OnCommand=cmd(sleep,waitTime); };
|
return Def.Actor{ OnCommand=cmd(sleep,waitTime); };
|
||||||
Reference in New Issue
Block a user