Add color swappers, color swapping, and color targets.

This commit is contained in:
Signal 2025-11-19 11:43:24 -05:00
parent 9acd605c86
commit 5fd67703c0
34 changed files with 688 additions and 29 deletions

View file

@ -11,6 +11,8 @@ function artifact.register_node(name, def)
if not def.groups then def.groups = {} end
if artifact.debug then
def.groups.dig_immediate = 3
else
def.groups.everything = 1
end
if def._variants then
for _, x in ipairs(def._variants) do
@ -317,6 +319,16 @@ artifact.register_node("ladder_wood", {
climbable = true
})
artifact.register_node("ladder_iron", {
drawtype = "mesh",
mesh = "artifact_ladder.obj",
paramtype = "light",
paramtype2 = "facedir",
tiles = {"artifact_ladder_iron.png"},
walkable = false,
climbable = true
})
artifact.register_node("glass", {
drawtype = "glasslike",
@ -333,7 +345,38 @@ local function register_lamp(color, brightness)
tiles = {"artifact_lamp_"..color..".png"},
light_source = brightness,
paramtype = "light",
sunlight_propagates = true
sunlight_propagates = true,
collision_box = {
type = "fixed",
fixed = {
{
-2/16,0,-2/16,
2/16, 4/16, 2/16
}
}
}
})
artifact.register_node("lamp_"..color.."_wall", {
drawtype = "mesh",
mesh = "artifact_lamp_wall.obj",
tiles = {"artifact_lamp_"..color..".png"},
light_source = brightness,
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "facedir",
collision_box = {
type = "fixed",
fixed = {
{
-2/16,-1/16,-1/16,
2/16, 3/16, 3/16
},
{
-1/16,4/16,-1/16,
1/16, 6/16, 8/16
},
}
}
})
artifact.register_node("lamp_"..color.."_hanging", {
drawtype = "mesh",
@ -341,7 +384,16 @@ local function register_lamp(color, brightness)
tiles = {"artifact_lamp_"..color..".png"},
light_source = brightness,
paramtype = "light",
sunlight_propagates = true
sunlight_propagates = true,
collision_box = {
type = "fixed",
fixed = {
{
-2/16,0,-2/16,
2/16, 4/16, 2/16
}
}
}
})
end