Add the rest of the game.

This commit is contained in:
Signal 2025-11-29 17:24:33 -05:00
parent dd73665a23
commit e3431d8de9
49 changed files with 855 additions and 57 deletions

View file

@ -103,6 +103,35 @@ local function rep(tx, size)
end
-- Sound tables for material types.
artifact.sounds = {
stone = {
footstep = "artifact_step_stone"
},
mossy_stone = {
footstep = "artifact_step_stone_mossy"
},
metal = {
footstep = "artifact_step_stone" -- We don't have a separate sound for this, so just use stone for now.
},
wood = {
footstep = "artifact_step_stone"
},
leaves = {
footstep = "artifact_step_leaves"
},
dry_leaves = {
footstep = "artifact_step_leaves_dry"
},
glass = {
footstep = "artifact_step_glass"
},
water = {
footstep = "artifact_water"
}
}
-- These nodes are only used for the intro cutscene.
artifact.register_node("stone_brown", {
@ -144,38 +173,49 @@ artifact.register_node("torch_standing", {
-- End ad-hoc nodes.
artifact.register_node("stone", {
tiles = {{name = "artifact_stone.png", align_style = "world"}},
_variants = {"stair", "slab"}
_variants = {"stair", "slab"},
sounds = artifact.sounds.stone,
})
artifact.register_node("stone_mossy", {
tiles = {{name = rep("artifact_stone.png", 4).."^artifact_moss.png", align_style = "world", scale = 4}},
_variants = {"stair", "slab"},
sounds = artifact.sounds.mossy_stone,
})
artifact.register_node("stone_bricks", {
tiles = {{name = "artifact_stone_bricks.png", align_style = "world"}},
_variants = {"stair", "slab"},
sounds = artifact.sounds.stone,
})
artifact.register_node("stone_bricks_mossy", {
tiles = {{name = rep("artifact_stone_bricks.png", 4).."^artifact_moss_bricks.png", align_style = "world", scale = 4}},
_variants = {"stair", "slab"},
sounds = artifact.sounds.mossy_stone,
})
artifact.register_node("stone_bricks_small", {
tiles = {{name = "artifact_stone_bricks_small.png", align_style = "world"}},
_variants = {"stair", "slab"},
sounds = artifact.sounds.stone,
})
artifact.register_node("stone_bricks_small_mossy", {
tiles = {{name = rep("artifact_stone_bricks_small.png", 4).."^artifact_moss_bricks_small.png", align_style = "world", scale = 4}},
_variants = {"stair", "slab"},
sounds = artifact.sounds.mossy_stone,
})
artifact.register_node("stone_tile", {
tiles = {{name = "artifact_stone_tile.png", align_style = "world"}},
_variants = {"stair", "slab"},
sounds = artifact.sounds.stone,
})
artifact.register_node("stone_tile_small", {
tiles = {{name = "artifact_stone_tile_small.png", align_style = "world"}},
_variants = {"stair", "slab"},
sounds = artifact.sounds.stone,
})
-- Why does making this texture a tile animation darken it!?
@ -188,6 +228,7 @@ artifact.register_node("water", {
pointable = artifact.debug,
liquid_move_physics = true,
post_effect_color = "#2d5a7c55",
sounds = artifact.sounds.water,
liquidtype = "source",
-- Minetest pro tip: Do not try to use aliases for these.
@ -213,6 +254,7 @@ artifact.register_node("water_flowing", {
liquid_move_physics = true,
post_effect_color = "#2d5a7c55",
drop = "",
sounds = artifact.sounds.water,
liquidtype = "flowing",
liquid_alternative_source = "artifact:water",
@ -240,6 +282,7 @@ artifact.register_node("water_static", {
pointable = artifact.debug,
liquid_move_physics = true,
post_effect_color = "#2d5a7c55",
sounds = artifact.sounds.water,
})
@ -263,7 +306,8 @@ artifact.register_node("vines", {
paramtype = "light",
paramtype2 = "facedir",
tiles = {"artifact_vines.png"},
use_texture_alpha = "clip"
use_texture_alpha = "clip",
sounds = artifact.sounds.leaves,
})
artifact.register_node("vines_dry", {
drawtype = "nodebox",
@ -286,27 +330,50 @@ artifact.register_node("vines_dry", {
paramtype2 = "facedir",
tiles = {"artifact_vines_dry.png"},
use_texture_alpha = "clip",
groups = {whackable = 1}
groups = {whackable = 1},
sounds = artifact.sounds.dry_leaves,
on_destruct = function(pos)
artifact.play_sound {
name = "artifact_step_leaves",
pos = pos,
gain = 1.5
}
end
})
artifact.register_node("leaves", {
drawtype = "allfaces",
-- paramtype = "light",
tiles = {"artifact_leaves.png"},
use_texture_alpha = "clip"
use_texture_alpha = "clip",
sounds = artifact.sounds.leaves,
})
artifact.register_node("leaves_dry", {
drawtype = "allfaces",
-- paramtype = "light",
tiles = {"artifact_leaves_dry.png"},
use_texture_alpha = "clip",
groups = {whackable = 1}
groups = {whackable = 1},
sounds = artifact.sounds.dry_leaves,
on_destruct = function(pos)
artifact.play_sound {
name = "artifact_step_leaves",
pos = pos,
gain = 1.5
}
end
})
artifact.register_node("wood_planks", {
tiles = {{name = "artifact_wood_planks.png", align_style = "world"}},
_variants = {"stair", "slab"},
sounds = artifact.sounds.wood,
})
artifact.register_node("crate", {
tiles = {{name = "artifact_crate.png", align_style = "world"}},
sounds = artifact.sounds.wood,
})
artifact.register_node("ladder_wood", {
@ -316,7 +383,8 @@ artifact.register_node("ladder_wood", {
paramtype2 = "facedir",
tiles = {"artifact_ladder_wood.png"},
walkable = false,
climbable = true
climbable = true,
sounds = artifact.sounds.wood,
})
artifact.register_node("ladder_iron", {
@ -326,7 +394,8 @@ artifact.register_node("ladder_iron", {
paramtype2 = "facedir",
tiles = {"artifact_ladder_iron.png"},
walkable = false,
climbable = true
climbable = true,
sounds = artifact.sounds.metal,
})
@ -335,6 +404,7 @@ artifact.register_node("glass", {
use_texture_alpha = "clip",
tiles = {"artifact_glass.png"},
_variants = {"stair", "slab"},
sounds = artifact.sounds.glass,
})
@ -364,6 +434,7 @@ local function register_lamp(color, brightness)
}
}
},
sounds = artifact.sounds.glass,
})
artifact.register_node("lamp_"..color.."_wall", {
drawtype = "mesh",
@ -398,7 +469,8 @@ local function register_lamp(color, brightness)
1/16, 6/16, 8/16
},
}
}
},
sounds = artifact.sounds.glass,
})
artifact.register_node("lamp_"..color.."_hanging", {
drawtype = "mesh",
@ -424,7 +496,8 @@ local function register_lamp(color, brightness)
2/16, 4/16, 2/16
}
}
}
},
sounds = artifact.sounds.glass,
})
end