Add multi-signal doors, basic device deployment, and a target trigger.

This commit is contained in:
Signal 2025-11-17 03:04:16 -05:00
parent 1b2199705b
commit 9acd605c86
35 changed files with 660 additions and 75 deletions

View file

@ -0,0 +1,37 @@
minetest.register_entity(":artifact:device_block", {
initial_properties = {
visual = "cube",
textures = {"artifact_device_block.png", "artifact_device_block.png", "artifact_device_block.png", "artifact_device_block.png", "artifact_device_block.png", "artifact_device_block.png"},
use_texture_alpha = true,
glow = 8,
static_save = false,
},
_grabbable = true,
on_activate = function(e)
e.object:set_armor_groups{immortal = 1}
end,
on_hit = function(e, m)
artifact.grab_device(m, e)
end,
})
function artifact.grab_device(m, e)
e._no_interact = true
m._grabbed_item = e.object
m._on_ungrab = function()
e._no_interact = nil
end
end
function artifact.summon_device(m, device)
local e
if device == "block" then
e = minetest.add_entity(m.pos, "artifact:device_block"):get_luaentity()
end
if e then
artifact.grab_device(m, e)
end
end