1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2024-12-27 11:20:26 +01:00

new flow logic: flowable_node_registry_install.lua: add duplicate registration guard for register.output()

This commit is contained in:
thetaepsilon-gamedev 2017-10-07 15:42:00 +01:00
parent d175f0b94f
commit 1669cfd451

View File

@ -71,6 +71,9 @@ end
-- 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.
register.output = function(nodename, upper, lower, outputfn)
if pipeworks.flowables.outputs.list[nodename] then
error("pipeworks.flowables.outputs duplicate registration!")
end
checkbase(nodename)
pipeworks.flowables.outputs.list[nodename] = { threshold=threshold, outputfn=outputfn }
if pipeworks.toggles.pressure_logic then