diff options
author | thetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com> | 2017-10-07 15:42:00 +0100 |
---|---|---|
committer | thetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com> | 2017-10-07 15:42:00 +0100 |
commit | 1669cfd4510a2dbb2ca3c754b414ae8c976ceca1 (patch) | |
tree | 469fab7c6136a15fd8eb9e2a2828c8b6c35e5496 /new_flow_logic | |
parent | d175f0b94f8164552dc141778f6d832b5faf73a0 (diff) |
new flow logic: flowable_node_registry_install.lua: add duplicate registration guard for register.output()
Diffstat (limited to 'new_flow_logic')
-rw-r--r-- | new_flow_logic/flowable_node_registry_install.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/new_flow_logic/flowable_node_registry_install.lua b/new_flow_logic/flowable_node_registry_install.lua index 650d1da..07001ef 100644 --- a/new_flow_logic/flowable_node_registry_install.lua +++ b/new_flow_logic/flowable_node_registry_install.lua @@ -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 |