forked from mtcontrib/pipeworks
new flow logic: flowable_node_registry_install.lua: add duplicate registration guard for register.output()
This commit is contained in:
parent
d175f0b94f
commit
1669cfd451
|
@ -71,6 +71,9 @@ end
|
||||||
-- if finite mode is on, upper is ignored and lower is used to determine whether to run outputfn;
|
-- if finite mode is on, upper is ignored and lower is used to determine whether to run outputfn;
|
||||||
-- cleanupfn is ignored in this mode as finite mode assumes something causes water to move itself.
|
-- cleanupfn is ignored in this mode as finite mode assumes something causes water to move itself.
|
||||||
register.output = function(nodename, upper, lower, outputfn)
|
register.output = function(nodename, upper, lower, outputfn)
|
||||||
|
if pipeworks.flowables.outputs.list[nodename] then
|
||||||
|
error("pipeworks.flowables.outputs duplicate registration!")
|
||||||
|
end
|
||||||
checkbase(nodename)
|
checkbase(nodename)
|
||||||
pipeworks.flowables.outputs.list[nodename] = { threshold=threshold, outputfn=outputfn }
|
pipeworks.flowables.outputs.list[nodename] = { threshold=threshold, outputfn=outputfn }
|
||||||
if pipeworks.toggles.pressure_logic then
|
if pipeworks.toggles.pressure_logic then
|
||||||
|
|
Loading…
Reference in New Issue
Block a user