2019-10-11 08:34:50 -04:00
|
|
|
-- LUALOCALS < ---------------------------------------------------------
|
|
|
|
local minetest, nodecore, vector
|
|
|
|
= minetest, nodecore, vector
|
|
|
|
-- LUALOCALS > ---------------------------------------------------------
|
|
|
|
|
|
|
|
nodecore.register_limited_abm({
|
|
|
|
label = "Door Laser Ablation",
|
2019-12-03 20:21:09 -05:00
|
|
|
interval = 2,
|
2019-10-11 08:34:50 -04:00
|
|
|
chance = 1,
|
|
|
|
nodenames = {"nc_optics:lens_on"},
|
|
|
|
action = function(pos, node)
|
|
|
|
local face = nodecore.facedirs[node.param2]
|
|
|
|
local out = vector.add(face.k, pos)
|
|
|
|
local tn = minetest.get_node(out)
|
2020-01-21 21:19:30 -05:00
|
|
|
if nodecore.operate_door(out, tn, face.k) then
|
|
|
|
nodecore.witness(pos, "door ablation")
|
|
|
|
end
|
2019-10-11 08:34:50 -04:00
|
|
|
end
|
|
|
|
})
|