This commit is contained in:
Thomas Rudin 2018-12-09 16:59:32 +01:00
commit b04c6a9576
2 changed files with 3 additions and 10 deletions

View File

@ -42,7 +42,7 @@ end)
-- | |
-- \___/\___/
local function update_forcefield(pos, meta, active, first)
local function update_forcefield(pos, meta, active)
local shape = meta:get_int("shape")
local range = meta:get_int("range")
local vm = VoxelManip()
@ -86,11 +86,6 @@ local function update_forcefield(pos, meta, active, first)
vm:set_data(data)
vm:update_liquids()
vm:write_to_map()
-- update_map is very slow, but if we don't call it we'll
-- get phantom blocks on the client.
if not active or first then
vm:update_map()
end
end
local function set_forcefield_formspec(meta)
@ -273,13 +268,11 @@ local function run(pos, node)
technic.swap_node(pos, "technic:forcefield_emitter_off")
end
elseif eu_input >= power_requirement then
local first = false
if node.name == "technic:forcefield_emitter_off" then
first = true
technic.swap_node(pos, "technic:forcefield_emitter_on")
meta:set_string("infotext", S("%s Active"):format(machine_name))
end
update_forcefield(pos, meta, true, first)
update_forcefield(pos, meta, true)
end
end

View File

@ -116,7 +116,7 @@ local function quarry_run(pos, node)
if meta:get_int("enabled") and meta:get_int("HV_EU_input") >= quarry_demand and meta:get_int("purge_on") == 0 then
local pdir = minetest.facedir_to_dir(node.param2)
if pdir.y > 0 or pdir.y < 0 then
if pdir.y ~= 0 then
-- faces up or down, not valid, otherwise depth-check would run endless and hang up the server
return
end