diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2013-12-15 02:53:10 -0500 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2013-12-15 02:53:10 -0500 |
commit | bd80f18cfce1fb69e78f7d5ce63e7264718378e7 (patch) | |
tree | 5eb36d4656efe3de30db472dd7793f9985ba8af8 /deployer.lua | |
parent | b43a1036cae2fda49453a2c0a97b9ed2f6d16023 (diff) |
local-ize pretty muchg everything that was previously global except where
stuff needs to be globally-visible. Also, fix a bad drop on valve.
Diffstat (limited to 'deployer.lua')
-rw-r--r-- | deployer.lua | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/deployer.lua b/deployer.lua index adaae38..fd85eb1 100644 --- a/deployer.lua +++ b/deployer.lua @@ -66,7 +66,7 @@ minetest.register_craft({ } }) -function hacky_swap_node(pos,name) +local function hacky_swap_node(pos,name) local node=minetest.get_node(pos) local meta=minetest.get_meta(pos) local meta0=meta:to_table() @@ -83,7 +83,7 @@ local function delay(x) return (function() return x end) end -deployer_on = function(pos, node) +local deployer_on = function(pos, node) if node.name ~= "pipeworks:deployer_off" then return end @@ -161,7 +161,7 @@ deployer_on = function(pos, node) end end -deployer_off = function(pos, node) +local deployer_off = function(pos, node) if node.name == "pipeworks:deployer_on" then hacky_swap_node(pos,"pipeworks:deployer_off") nodeupdate(pos) @@ -206,7 +206,7 @@ minetest.register_node("pipeworks:deployer_off", { return inv:is_empty("main") end, after_place_node = function (pos, placer) - tube_scanforobjects(pos, placer) + pipeworks.scan_for_tube_objects(pos, placer) local placer_pos = placer:getpos() --correct for the player's height @@ -225,7 +225,7 @@ minetest.register_node("pipeworks:deployer_off", { minetest.log("action", "real (6d) facedir: " .. node.param2) end end, - after_dig_node = tube_scanforobjects, + after_dig_node = pipeworks.scan_for_tube_objects, }) minetest.register_node("pipeworks:deployer_on", { @@ -267,7 +267,7 @@ minetest.register_node("pipeworks:deployer_on", { return inv:is_empty("main") end, after_place_node = function (pos, placer) - tube_scanforobjects(pos, placer) + pipeworks.scan_for_tube_objects(pos, placer) local placer_pos = placer:getpos() --correct for the player's height @@ -286,5 +286,5 @@ minetest.register_node("pipeworks:deployer_on", { minetest.log("action", "real (6d) facedir: " .. node.param2) end end, - after_dig_node = tube_scanforobjects, + after_dig_node = pipeworks.scan_for_tube_objects, }) |