More textures

This commit is contained in:
Signal 2025-09-14 23:16:35 -04:00
parent 7c08d3f61a
commit b50caa0b53
17 changed files with 68 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

View file

@ -72,7 +72,7 @@ function ns.check_recipe(inv, plot)
end
minetest.register_node(":rgt_towns:constructor", {
tiles = {"[fill:16x16:#8af"},
tiles = {"rgt_towns_constructor_top.png", "rgt_towns_constructor_bottom.png", "rgt_towns_constructor_side.png"},
on_construct = function(pos)
local inv = minetest.get_meta(pos):get_inventory()
inv:set_size("main", 9)

View file

@ -149,20 +149,15 @@ function ns.can_build_plot(box, grid)
for name, grid2 in pairs(ns.grids) do
local i = aabb_intersects_sphere(box, grid2.origin, grid2.radius)
if name == grid or i then
ns.add_cube(box.min, box.max, {color = "#fff"})
-- Translate box to grid2 local space and compute candidate cell range
local min = vector.floor((box.min -grid2.origin) /15)
local max = vector.ceil((box.max -grid2.origin) /15)
ns.add_cube(min *15 +grid2.origin, max *15 +grid2.origin)
if grid2.type == "3d" then
-- TODO: implement
else
for x = min.x, max.x do
for z = min.z, max.z do
ns.add_point(vector.new(x,0,z) *15 +grid2.origin)
-- print("Box: "..dump(box).."; min: "..min:to_string().."; max: "..max:to_string())
local plot = db:get("plot:"..name.."_"..x.."_0_"..z)
if plot then
plot = minetest.parse_json(plot)

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

View file

@ -1,4 +1,14 @@
local function rep(tx, size)
local out = "[combine:"..(size *16).."x"..(size *16)
for x = 0, size -1 do
for y = 0, size -1 do
out = out..":"..(x *16)..","..(y *16).."="..tx
end
end
return out
end
rgt.register_node("stone", {
tiles = {"rgt_stone.png"},
groups = {dig_immediate = 3}
@ -20,6 +30,62 @@ rgt.register_node("dirt_grass", {
groups = {dig_immediate = 3}
})
rgt.register_node("path_grass", {
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
-0.5, -0.5, -0.5,
0.5, 7/16, 0.5
}
},
tiles = {"rgt_path_grass_top.png", "rgt_dirt.png", "rgt_dirt.png^rgt_path_grass_side.png"},
-- tiles = {"[fill:16x16:0,0:#3e7e7b^[fill:14x14:1,1:#326764"},
paramtype = "light",
sunlight_propagates = false,
groups = {dig_immediate = 3}
})
rgt.register_node("oak_planks", {
tiles = {"rgt_oak_planks.png"},
groups = {dig_immediate = 3}
})
rgt.register_node("dark_planks", {
tiles = {"rgt_dark_planks.png"},
groups = {dig_immediate = 3}
})
rgt.register_node("spruce_planks", {
tiles = {"rgt_spruce_planks.png"},
groups = {dig_immediate = 3}
})
rgt.register_node("acacia_planks", {
tiles = {"rgt_acacia_planks.png"},
groups = {dig_immediate = 3}
})
rgt.register_node("redwood_planks", {
tiles = {"rgt_redwood_planks.png"},
groups = {dig_immediate = 3}
})
rgt.register_node("birch_planks", {
tiles = {"rgt_birch_planks.png"},
groups = {dig_immediate = 3}
})
--minetest.register_decoration {
-- deco_type = "simple",
-- place_on = "dirt_grass",
-- fill_ratio = 0.5,
-- decoration = {"red_glazed_terracotta:oak_planks", "red_glazed_terracotta:spruce_planks", "red_glazed_terracotta:dark_planks", "red_glazed_terracotta:redwood_planks", "red_glazed_terracotta:acacia_planks", "red_glazed_terracotta:birch_planks"}
--}
rgt.register_node("water", {
tiles = {"[fill:16x16:0,0:#2d5a7c77^[fill:14x14:1,1:#2d5a7c33"},
groups = {dig_immediate = 3},

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B