val helper function
This commit is contained in:
parent
fd68ef88ec
commit
62fe5f51d3
@ -459,6 +459,16 @@ function parser:saveas(prev, name, sel)
|
|||||||
self[name] = sel and prev[sel] or prev
|
self[name] = sel and prev[sel] or prev
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- returns its args, ignoring
|
||||||
|
-- prev. Used to stuff things
|
||||||
|
-- into prev. args are packed
|
||||||
|
-- if there's multiple.
|
||||||
|
function parser:val(_, ...)
|
||||||
|
local ret := pack(...)
|
||||||
|
if (#ret == 1) return ret[1]
|
||||||
|
return ret
|
||||||
|
end
|
||||||
|
|
||||||
-->8
|
-->8
|
||||||
--ship behavior
|
--ship behavior
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user