From 4659a008ac89b6f53608dfb6612552e4ffe2ec9a Mon Sep 17 00:00:00 2001 From: Signal Date: Thu, 15 Jan 2026 18:54:28 -0500 Subject: [PATCH] Improve mapgen, add grass, and include the fill tool. --- game.conf | 3 +- mods/rgt_base/init.lua | 90 +++++- .../init.lua => rgt_gadgets/modpack.conf} | 0 mods/rgt_gadgets/rgt_fill_tool/init.lua | 158 ++++++++++ mods/rgt_gadgets/rgt_fill_tool/mod.conf | 2 + .../textures/rgt_fill_tool_display_end.png | Bin 0 -> 154 bytes .../textures/rgt_fill_tool_display_start.png | Bin 0 -> 154 bytes .../textures/rgt_shape_fill_tool.png | Bin 0 -> 254 bytes mods/rgt_inv/init.lua | 93 +++--- mods/rgt_machines/rgt_alloy_furnace/mod.conf | 2 - mods/rgt_machines/rgt_arc_furnace/mod.conf | 2 - mods/rgt_machines/rgt_casting_basin/mod.conf | 2 - mods/rgt_machines/rgt_furnace/mod.conf | 2 - mods/rgt_machines/rgt_machines/init.lua | 164 ---------- .../rgt_machines_electric/modpack.conf | 0 .../rgt_alloy_furnace/init.lua | 0 .../rgt_alloy_furnace/mod.conf | 2 + .../rgt_arc_furnace/init.lua | 0 .../rgt_arc_furnace/mod.conf | 2 + .../textures/rgt_arc_furnace_bottom.png | Bin .../textures/rgt_arc_furnace_front.png | Bin .../textures/rgt_arc_furnace_front_active.png | Bin .../textures/rgt_arc_furnace_side.png | Bin .../textures/rgt_arc_furnace_top.png | Bin .../rgt_casting_basin/init.lua | 0 .../rgt_casting_basin/mod.conf | 2 + .../textures/rgt_cast_gear.png | Bin .../textures/rgt_cast_plate.png | Bin .../textures/rgt_cast_rod.png | Bin .../textures/rgt_casting_basin_front.png | Bin .../rgt_casting_basin_front_active.png | Bin .../rgt_furnace/init.lua | 0 .../rgt_furnace/mod.conf | 2 + .../rgt_machines_electric}/cables.lua | 0 .../rgt_machines_electric}/fluids.lua | 2 +- .../rgt_machines_electric/init.lua | 170 +++++++++++ .../rgt_machines_electric/mod.conf | 2 + .../models/rgt_pipe_straight.gltf | 0 .../models/rgt_pipe_straight_double_cap.gltf | 0 .../models/rgt_pipe_straight_single_cap.gltf | 0 .../rgt_machines_electric}/pipes.lua | 0 .../textures/rgt_cable_copper.png | Bin .../textures/rgt_fluid_container_bg.png | Bin .../rgt_fluid_container_bg_filled.png | Bin .../textures/rgt_pipe_straight.png | Bin .../textures/rgt_progress_bg.png | Bin .../textures/rgt_progress_bg_active.png | Bin .../rgt_steam_generator/init.lua | 0 .../rgt_steam_generator/mod.conf | 2 + .../textures/rgt_steam_generator_front.png | Bin .../rgt_steam_generator_front_active.png | Bin .../rgt_machines_mechanical/modpack.conf | 0 .../rgt_machines_mechanical/init.lua | 22 ++ .../rgt_machines_mechanical/mod.conf | 2 + .../rgt_machines/rgt_steam_generator/mod.conf | 2 - mods/rgt_materials/init.lua | 14 + .../textures/rgt_copper_block.png | Bin 305 -> 308 bytes .../textures/rgt_copper_ingot.png | Bin 291 -> 298 bytes .../textures/rgt_gear_copper.png | Bin 355 -> 361 bytes .../textures/rgt_plate_copper.png | Bin 308 -> 316 bytes .../rgt_materials/textures/rgt_rod_copper.png | Bin 179 -> 145 bytes mods/rgt_origins/init.lua | 57 ++++ mods/rgt_origins/origins/human.lua | 0 mods/rgt_player/init.lua | 12 +- mods/rgt_tools/textures/rgt_axe_copper.png | Bin 264 -> 259 bytes mods/rgt_tools/textures/rgt_pick_copper.png | Bin 305 -> 308 bytes mods/rgt_tools/textures/rgt_shovel_copper.png | Bin 269 -> 275 bytes mods/rgt_tools/textures/rgt_sword_copper.png | Bin 277 -> 275 bytes mods/rgt_workbench/init.lua | 30 ++ mods/rgt_workbench/mod.conf | 2 + mods/rgt_world/biomes.lua | 71 +++++ mods/rgt_world/config.lua | 162 ++++++++++ mods/rgt_world/init.lua | 289 ++++++++++++++---- mods/rgt_world/mapgen.lua | 14 + mods/rgt_world/textures/rgt_basalt.png | Bin 0 -> 217 bytes mods/rgt_world/textures/rgt_cobble.png | Bin 440 -> 450 bytes mods/rgt_world/textures/rgt_grass_1.png | Bin 0 -> 314 bytes mods/rgt_world/textures/rgt_grass_2.png | Bin 0 -> 184 bytes mods/rgt_world/textures/rgt_grass_3.png | Bin 0 -> 230 bytes mods/rgt_world/textures/rgt_grass_side.png | Bin 399 -> 338 bytes .../textures/rgt_grass_side_shadow.png | Bin 0 -> 161 bytes mods/rgt_world/textures/rgt_grass_tall.png | Bin 0 -> 387 bytes mods/rgt_world/textures/rgt_grass_top.png | Bin 354 -> 302 bytes mods/rgt_world/textures/rgt_modern_floor.png | Bin 0 -> 217 bytes mods/rgt_world/textures/rgt_palette_grass.png | Bin 0 -> 95 bytes mods/rgt_world/variants.lua | 12 +- 86 files changed, 1098 insertions(+), 293 deletions(-) rename mods/{rgt_machines/rgt_alloy_furnace/init.lua => rgt_gadgets/modpack.conf} (100%) create mode 100644 mods/rgt_gadgets/rgt_fill_tool/init.lua create mode 100644 mods/rgt_gadgets/rgt_fill_tool/mod.conf create mode 100644 mods/rgt_gadgets/rgt_fill_tool/textures/rgt_fill_tool_display_end.png create mode 100644 mods/rgt_gadgets/rgt_fill_tool/textures/rgt_fill_tool_display_start.png create mode 100644 mods/rgt_gadgets/rgt_fill_tool/textures/rgt_shape_fill_tool.png delete mode 100644 mods/rgt_machines/rgt_alloy_furnace/mod.conf delete mode 100644 mods/rgt_machines/rgt_arc_furnace/mod.conf delete mode 100644 mods/rgt_machines/rgt_casting_basin/mod.conf delete mode 100644 mods/rgt_machines/rgt_furnace/mod.conf create mode 100644 mods/rgt_machines/rgt_machines_electric/modpack.conf create mode 100644 mods/rgt_machines/rgt_machines_electric/rgt_alloy_furnace/init.lua create mode 100644 mods/rgt_machines/rgt_machines_electric/rgt_alloy_furnace/mod.conf rename mods/rgt_machines/{ => rgt_machines_electric}/rgt_arc_furnace/init.lua (100%) create mode 100644 mods/rgt_machines/rgt_machines_electric/rgt_arc_furnace/mod.conf rename mods/rgt_machines/{ => rgt_machines_electric}/rgt_arc_furnace/textures/rgt_arc_furnace_bottom.png (100%) rename mods/rgt_machines/{ => rgt_machines_electric}/rgt_arc_furnace/textures/rgt_arc_furnace_front.png (100%) rename mods/rgt_machines/{ => rgt_machines_electric}/rgt_arc_furnace/textures/rgt_arc_furnace_front_active.png (100%) rename mods/rgt_machines/{ => rgt_machines_electric}/rgt_arc_furnace/textures/rgt_arc_furnace_side.png (100%) rename mods/rgt_machines/{ => rgt_machines_electric}/rgt_arc_furnace/textures/rgt_arc_furnace_top.png (100%) rename mods/rgt_machines/{ => rgt_machines_electric}/rgt_casting_basin/init.lua (100%) create mode 100644 mods/rgt_machines/rgt_machines_electric/rgt_casting_basin/mod.conf rename mods/rgt_machines/{ => rgt_machines_electric}/rgt_casting_basin/textures/rgt_cast_gear.png (100%) rename mods/rgt_machines/{ => rgt_machines_electric}/rgt_casting_basin/textures/rgt_cast_plate.png (100%) rename mods/rgt_machines/{ => rgt_machines_electric}/rgt_casting_basin/textures/rgt_cast_rod.png (100%) rename mods/rgt_machines/{ => rgt_machines_electric}/rgt_casting_basin/textures/rgt_casting_basin_front.png (100%) rename mods/rgt_machines/{ => rgt_machines_electric}/rgt_casting_basin/textures/rgt_casting_basin_front_active.png (100%) rename mods/rgt_machines/{ => rgt_machines_electric}/rgt_furnace/init.lua (100%) create mode 100644 mods/rgt_machines/rgt_machines_electric/rgt_furnace/mod.conf rename mods/rgt_machines/{rgt_machines => rgt_machines_electric/rgt_machines_electric}/cables.lua (100%) rename mods/rgt_machines/{rgt_machines => rgt_machines_electric/rgt_machines_electric}/fluids.lua (95%) create mode 100644 mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/init.lua create mode 100644 mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/mod.conf rename mods/rgt_machines/{rgt_machines => rgt_machines_electric/rgt_machines_electric}/models/rgt_pipe_straight.gltf (100%) rename mods/rgt_machines/{rgt_machines => rgt_machines_electric/rgt_machines_electric}/models/rgt_pipe_straight_double_cap.gltf (100%) rename mods/rgt_machines/{rgt_machines => rgt_machines_electric/rgt_machines_electric}/models/rgt_pipe_straight_single_cap.gltf (100%) rename mods/rgt_machines/{rgt_machines => rgt_machines_electric/rgt_machines_electric}/pipes.lua (100%) rename mods/rgt_machines/{rgt_machines => rgt_machines_electric/rgt_machines_electric}/textures/rgt_cable_copper.png (100%) rename mods/rgt_machines/{rgt_machines => rgt_machines_electric/rgt_machines_electric}/textures/rgt_fluid_container_bg.png (100%) rename mods/rgt_machines/{rgt_machines => rgt_machines_electric/rgt_machines_electric}/textures/rgt_fluid_container_bg_filled.png (100%) rename mods/rgt_machines/{rgt_machines => rgt_machines_electric/rgt_machines_electric}/textures/rgt_pipe_straight.png (100%) rename mods/rgt_machines/{rgt_machines => rgt_machines_electric/rgt_machines_electric}/textures/rgt_progress_bg.png (100%) rename mods/rgt_machines/{rgt_machines => rgt_machines_electric/rgt_machines_electric}/textures/rgt_progress_bg_active.png (100%) rename mods/rgt_machines/{ => rgt_machines_electric}/rgt_steam_generator/init.lua (100%) create mode 100644 mods/rgt_machines/rgt_machines_electric/rgt_steam_generator/mod.conf rename mods/rgt_machines/{ => rgt_machines_electric}/rgt_steam_generator/textures/rgt_steam_generator_front.png (100%) rename mods/rgt_machines/{ => rgt_machines_electric}/rgt_steam_generator/textures/rgt_steam_generator_front_active.png (100%) create mode 100644 mods/rgt_machines/rgt_machines_mechanical/modpack.conf create mode 100644 mods/rgt_machines/rgt_machines_mechanical/rgt_machines_mechanical/init.lua create mode 100644 mods/rgt_machines/rgt_machines_mechanical/rgt_machines_mechanical/mod.conf delete mode 100644 mods/rgt_machines/rgt_steam_generator/mod.conf create mode 100644 mods/rgt_origins/init.lua create mode 100644 mods/rgt_origins/origins/human.lua create mode 100644 mods/rgt_workbench/init.lua create mode 100644 mods/rgt_workbench/mod.conf create mode 100644 mods/rgt_world/biomes.lua create mode 100644 mods/rgt_world/config.lua create mode 100644 mods/rgt_world/mapgen.lua create mode 100644 mods/rgt_world/textures/rgt_basalt.png create mode 100644 mods/rgt_world/textures/rgt_grass_1.png create mode 100644 mods/rgt_world/textures/rgt_grass_2.png create mode 100644 mods/rgt_world/textures/rgt_grass_3.png create mode 100644 mods/rgt_world/textures/rgt_grass_side_shadow.png create mode 100644 mods/rgt_world/textures/rgt_grass_tall.png create mode 100644 mods/rgt_world/textures/rgt_modern_floor.png create mode 100644 mods/rgt_world/textures/rgt_palette_grass.png diff --git a/game.conf b/game.conf index c27530a..fba0149 100644 --- a/game.conf +++ b/game.conf @@ -1,3 +1,4 @@ title = Red Glazed Terracotta description = Segmentation fault (core dumped). -disabled_settings = !enable_damage \ No newline at end of file +disabled_settings = !enable_damage +default_mapgen = valleys \ No newline at end of file diff --git a/mods/rgt_base/init.lua b/mods/rgt_base/init.lua index 1716096..2732c5c 100644 --- a/mods/rgt_base/init.lua +++ b/mods/rgt_base/init.lua @@ -67,6 +67,39 @@ setmetatable(EventTarget, { __call = function(_, ...) return EventTarget.init(...) end }) +StateMachine = { + init = function(obj, states) + local super = EventTarget() + local e = { + states = states, + active_states = {}, + obj = obj + } + return setmetatable(e, {__index = super}) + end, + add_state = function(e, state) + if e.active_states[state] then return false end + e.states[state]:add(e.obj) + e.active_states[state] = true + return true + end, + tick = function(e) + for k in pairs(e.active_states) do + e.states[k]:tick(e.obj) + end + end, + remove_state = function(e, state) + if not e.active_states[state] then return false end + e.states[state]:remove(e.obj) + e.active_states[state] = nil + return true + end, +} +setmetatable(StateMachine, { + __call = function(_, ...) return StateMachine.init(...) end, + __index = EventTarget() +}) + rgt = { adjacent_neighbor_offests = { vector.new(0,0,1), @@ -85,7 +118,8 @@ rgt = { vector.new(-1,0,0), }, nodes_to_content_ids = {}, - content_ids_to_nodes = {} + content_ids_to_nodes = {}, + vm_data = {}, } local ns = rgt @@ -151,6 +185,60 @@ function ns.register_entity(name, def) minetest.register_entity(name, def) end +-- Make node dig particles denser. +minetest.register_on_dignode(function(pos, node, digger) + local gravity = tonumber(core.settings:get("movement_gravity")) or 9.81 + local def = minetest.registered_nodes[node.name] + minetest.add_particlespawner({ + amount = 128, + time = 0.001, + minpos = vector.offset(pos, -0.35, -0.35, -0.35), + maxpos = vector.offset(pos, 0.35, 0.35, 0.35), + minvel = vector.new(-1.7, 0, -1.7), + maxvel = vector.new(1.7, 3.5, 1.7), + minacc = vector.new(0, -gravity *2, 0), + maxacc = vector.new(0, -gravity *2, 0), + minexptime = 0, maxexptime = 1, + minsize = 0, maxsize = 0, -- random + node = node, + minsize = 0.5, + maxsize = 1.4, + blend = (def and def.use_texture_alpha == "blend") and "blend" or "clip", + }) +end) + +-- Fills the area from pos1 to pos2 with the node named `node`. +function ns.fill_area(pos1, pos2, node) + local minp = vector.new(math.min(pos1.x, pos2.x), math.min(pos1.y, pos2.y), math.min(pos1.z, pos2.z)) + local maxp = vector.new(math.max(pos1.x, pos2.x), math.max(pos1.y, pos2.y), math.max(pos1.z, pos2.z)) + local vm = minetest.get_voxel_manip(pos1, pos2) + local min, max = vm:get_emerged_area() + local va = VoxelArea(min, max) + local data = ns.vm_data + + vm:get_data(data) + + local c_node = minetest.get_content_id(node) + for i in va:iterp(minp, maxp) do + data[i] = c_node + end + + vm:set_data(data) + vm:write_to_map() + if vm.close then vm:close() end +end + +-- Get a flat texture that may represent the given node (using the first tile). +function ns.get_node_texture(node) + local def = minetest.registered_nodes[node] + if not def or not def.tiles then return "blank.png" end + local tx = def.tiles[1] + if type(tx) == "string" then + return tx + end + return tx.name or "blank.png" +end + -- Out-of-line node metadata, allowing meta for a node to be accessed even when its containing mapblock is not loaded. local db = minetest.get_mod_storage() local NodeMetaRef = { diff --git a/mods/rgt_machines/rgt_alloy_furnace/init.lua b/mods/rgt_gadgets/modpack.conf similarity index 100% rename from mods/rgt_machines/rgt_alloy_furnace/init.lua rename to mods/rgt_gadgets/modpack.conf diff --git a/mods/rgt_gadgets/rgt_fill_tool/init.lua b/mods/rgt_gadgets/rgt_fill_tool/init.lua new file mode 100644 index 0000000..bcaef49 --- /dev/null +++ b/mods/rgt_gadgets/rgt_fill_tool/init.lua @@ -0,0 +1,158 @@ + +minetest.register_entity(":red_glazed_terracotta:fill_tool_display", { + initial_properties = { + static_save = false, + visual = "cube", + textures = {"rgt_fill_tool_display_start.png", "rgt_fill_tool_display_start.png", "rgt_fill_tool_display_start.png", "rgt_fill_tool_display_start.png", "rgt_fill_tool_display_start.png", "rgt_fill_tool_display_start.png"}, + glow = 15, + visual_size = vector.new(1, 1, 1) *1.1, + pointable = false + } +}) + +--minetest.register_entity(":travelers_notebook:fill_tool_range_display", { +-- initial_properties = { +-- static_save = false, +-- textures = {"blank.png"}, +-- glow = 15, +-- visual_size = vector.new(1, 1, 1) *0.6, +-- pointable = false +-- } +--}) + +local function get_shape_fill_display_pos(m) + local pos = m.pos + local dir = m.object:get_look_dir() + local node = minetest.raycast(pos, pos +(dir *(m.shape_fill_range or 5)), false):next() + if node and node.under then + pos = node.under + else + pos = (pos +(dir *(m.shape_fill_range or 5))):round() + end + return pos +end +rgt.register_item("fill_tool", { + stack_max = 1, + inventory_image = "rgt_shape_fill_tool.png", + range = 0, + touch_interaction = "short_dig_long_place", + on_use = function(s, p) + local m = rgt.players[p:get_player_name()] + if m.node_picker then + local pos = m.pos + local dir = m.object:get_look_dir() +-- local obj = minetest.raycast(pos +dir, pos +(dir *15), true, false, {nodes = {}}):next() + if m.pointed_obj or obj and obj.type == "object" then + local e = m.pointed_obj + if e.node then + local sm = s:get_meta() + if e.node == "air" then + sm:set_string("inventory_image", "") + else + local def = minetest.registered_nodes[e.node] + if def._rgt_tileset_master then e.node = def._rgt_tileset_master end + local tx = rgt.get_node_texture(e.node) + sm:set_string("inventory_image", "[combine:16x16:3,3="..tx.."\\^[resize\\:10x10:0,0=rgt_shape_fill_tool.png") + end + sm:set_string("node", e.node) + rgt.close_node_picker(m) + end + end + else + local pos = get_shape_fill_display_pos(rgt.players[p:get_player_name()]) + if not pos then return end + local m = s:get_meta() + local node = minetest.get_node(pos).name + if node == "air" then + m:set_string("inventory_image", "") + else + local def = minetest.registered_nodes[node] + if def._rgt_tileset_master then node = def._rgt_tileset_master end + local tx = rgt.get_node_texture(node) + m:set_string("inventory_image", "[combine:16x16:3,3="..tx.."\\^[resize\\:10x10:0,0=rgt_shape_fill_tool.png") + end + m:set_string("node", node) + end + return s + end, + on_wield = function(m) + local pos = get_shape_fill_display_pos(m) + m.shape_fill_display_start = minetest.add_entity(pos, "red_glazed_terracotta:fill_tool_display") + m.shape_fill_display_start:set_observers{[m.name] = true} + m.shape_fill_range = m.shape_fill_range or 5 + m.shape_fill_last_range = m.shape_fill_range + end, + while_wielded = function(m, s) + local pos = get_shape_fill_display_pos(m) + if not m.shape_fill_display_start and not m.node_picker then + m.shape_fill_display_start = minetest.add_entity(pos, "red_glazed_terracotta:fill_tool_display") + m.shape_fill_display_start:set_observers{[m.name] = true} + end + + if m.shape_fill_display_start and m.node_picker then + m.shape_fill_display_start:remove() + m.shape_fill_display_start = nil + end + + if m.shape_fill_display_end then + m.shape_fill_display_end:set_pos(pos) + elseif m.shape_fill_display_start then + m.shape_fill_display_start:set_pos(pos) + end + +-- if m.shape_fill_zoom_view then +-- local pitch = m.object:get_look_vertical() +-- if math.abs(pitch) > math.rad(15) then +-- m.shape_fill_range = math.max(5, m.shape_fill_range -(0.2 *pitch)) +-- if math.abs(m.shape_fill_range -(m.shape_fill_last_range or 5)) > 1 then +-- m.shape_fill_zoom_view:set_properties{ +-- textures = {libarchive.rasterize(tostring(math.round(m.shape_fill_range or 5)), 40, 40, 0, 0)} +-- } +-- m.shape_fill_last_range = range +-- end +-- end +-- end +-- +-- if m.ctl.zoom and not m.shape_fill_zoom_view then +-- m.shape_fill_zoom_view = minetest.add_entity(pos, "red_glazed_terracotta:fill_tool_range_display") +-- m.shape_fill_zoom_view:set_properties{ +-- textures = {libarchive.rasterize(tostring(math.round(m.shape_fill_range) or 5), 40, 40, 0, 0)} +-- } +-- m.shape_fill_zoom_view:set_attach(m.object, "", vector.new(0, 20, 20), nil, true) +-- elseif not m.ctl.zoom and m.shape_fill_zoom_view then +-- m.shape_fill_zoom_view:remove() +-- m.shape_fill_zoom_view = nil +-- end + + if m.shape_fill_display_end and not m.ctl.place then + local node = s:get_meta():get("node") or "air" + rgt.fill_area(m.shape_fill_start, m.shape_fill_display_end:get_pos():round(), node) + + m.shape_fill_display_end:remove() + m.shape_fill_display_end = nil + elseif m.shape_fill_display_start and not m.shape_fill_display_end and m.ctl.place then + m.shape_fill_start = m.shape_fill_display_start:get_pos():round() + + m.shape_fill_display_end = minetest.add_entity(get_shape_fill_display_pos(m), "red_glazed_terracotta:fill_tool_display") + m.shape_fill_display_end:set_properties{ + textures = {"rgt_fill_tool_display_end.png", "rgt_fill_tool_display_end.png", "rgt_fill_tool_display_end.png", "rgt_fill_tool_display_end.png", "rgt_fill_tool_display_end.png", "rgt_fill_tool_display_end.png"}, + } + m.shape_fill_display_end:set_observers{[m.name] = true} + end + end, + on_unwield = function(m) + if m.shape_fill_display_start then + m.shape_fill_display_start:remove() + m.shape_fill_display_start = nil + end + if m.shape_fill_display_end then + m.shape_fill_display_end:remove() + m.shape_fill_display_end = nil + end + if m.shape_fill_zoom_view then + m.shape_fill_zoom_view:remove() + m.shape_fill_zoom_view = nil + end + m.shape_fill_start = nil + end +}) diff --git a/mods/rgt_gadgets/rgt_fill_tool/mod.conf b/mods/rgt_gadgets/rgt_fill_tool/mod.conf new file mode 100644 index 0000000..742ad15 --- /dev/null +++ b/mods/rgt_gadgets/rgt_fill_tool/mod.conf @@ -0,0 +1,2 @@ +name = rgt_fill_tool +depends = rgt_player \ No newline at end of file diff --git a/mods/rgt_gadgets/rgt_fill_tool/textures/rgt_fill_tool_display_end.png b/mods/rgt_gadgets/rgt_fill_tool/textures/rgt_fill_tool_display_end.png new file mode 100644 index 0000000000000000000000000000000000000000..8918e8f0478ef9e40a6cf38af5cd1b89eded558b GIT binary patch literal 154 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|LOfj@Lo9le zQxXyqEH++vY|kutK&g&hS=nc^>mNS1Ad|zouG{8HOix(R&N<-`uZZoFU-D@T!aHXr zCR}N7Ol7d-aYtDK&P3g8@kGH{;j*}CM4{_-0)bjF-D zFvvQvz^GwPOUpq;b~^(rr!csmVu)18{<84`XHbwwo5y^i^;s`h+H5|1IYz7VS-$wic>cKT zEvv$Z94Wh_lSFeHmA5TPda{P&qP*tpo3~DtO>msroqBhJ>x(_7cwWpax4z+RXTcD0 zmoc~b-T(E?0=B#AH2TlEXim+z|K 11 and 10.5 or -1 - fs[#fs +1] = "image_button["..(i %11 +0.125)..","..y..";0.75,0.75;rgt_stone.png;blah;]" - i = i +1 - end - fs[#fs +1] = "\ - list[current_player;main;1.125,4.5;8,4;]\ - list[current_player;craft;3,0.5;3,3;]\ + ", + ui.list("current_player", "main", 1.125, 4.5, 8, 4), + } + + if true or e.player._creative then + fs[#fs +1] = "scroll_container[1,1;10,3;creativescroll;vertical;;0]" + fs[#fs +1] = ui.list("detached:rgt_creative_inv", "main", 0.05, 0.05, 8, math.ceil(num_items /8)) + fs[#fs +1] = "scroll_container_end[]\ + scrollbar[11,1;0.2,3;vertical;creativescroll;]" + else + fs[#fs +1] = ui.list("current_player", "craft", 2, 1, 2, 2) + fs[#fs +1] = "\ listring[]\ - list[current_player;craftpreview;7,1;1,1;]\ - " + image[4.7,1.5;1,1;rgt_progress_bg.png^\\[transformR270]\ + " + fs[#fs +1] = ui.list("current_player", "craftpreview", 6, 1.5, 1, 1) + end + e.player:set_inventory_formspec(table.concat(fs)) end, - on_action = function(e, data) - + set_craft_grid_size = function(e, size) + e.inv:set_size("craft", size *size) + e.inv:set_width("craft", size) end }, { __call = function(_, ...) @@ -60,31 +80,6 @@ Inventory = setmetatable({ end }) -local last_time = 0 -minetest.register_globalstep(function() - local time = minetest.get_us_time() - -- Scan for machines every second. - if time -last_time > 1000000 then - for name, m in pairs(rgt.players) do - local pm = {} - local machines = minetest.find_nodes_in_area(m.pos:offset(-7, -7, -7), m.pos:offset(7, 7, 7), "group:rgt_machine", true) - for type, positions in pairs(machines) do - pm[#pm +1] = { - type = type, - pos = positions[math.random(1, #positions)] - } - end - if not (#pm <= 0 and #m.inv.state.proximate_machines <= 0) then - -- Give the machines list a predictable order by sorting it alphabetically prior to submission. - table.sort(pm, function(a, b) return a.type < b.type end) - m.inv.proximate_machines = pm - end - end - last_time = time - end -end) - - minetest.register_chatcommand("/lua", { privs = {server = true}, func = function(name, args) diff --git a/mods/rgt_machines/rgt_alloy_furnace/mod.conf b/mods/rgt_machines/rgt_alloy_furnace/mod.conf deleted file mode 100644 index 0d48230..0000000 --- a/mods/rgt_machines/rgt_alloy_furnace/mod.conf +++ /dev/null @@ -1,2 +0,0 @@ -name = rgt_alloy_furnace -depends = rgt_machines \ No newline at end of file diff --git a/mods/rgt_machines/rgt_arc_furnace/mod.conf b/mods/rgt_machines/rgt_arc_furnace/mod.conf deleted file mode 100644 index 3341e53..0000000 --- a/mods/rgt_machines/rgt_arc_furnace/mod.conf +++ /dev/null @@ -1,2 +0,0 @@ -name = rgt_arc_furnace -depends = rgt_machines \ No newline at end of file diff --git a/mods/rgt_machines/rgt_casting_basin/mod.conf b/mods/rgt_machines/rgt_casting_basin/mod.conf deleted file mode 100644 index 76d31fb..0000000 --- a/mods/rgt_machines/rgt_casting_basin/mod.conf +++ /dev/null @@ -1,2 +0,0 @@ -name = rgt_casting_basin -depends = rgt_machines \ No newline at end of file diff --git a/mods/rgt_machines/rgt_furnace/mod.conf b/mods/rgt_machines/rgt_furnace/mod.conf deleted file mode 100644 index ad6dae3..0000000 --- a/mods/rgt_machines/rgt_furnace/mod.conf +++ /dev/null @@ -1,2 +0,0 @@ -name = rgt_furnace -depends = rgt_machines \ No newline at end of file diff --git a/mods/rgt_machines/rgt_machines/init.lua b/mods/rgt_machines/rgt_machines/init.lua index ae11acc..0690fd6 100644 --- a/mods/rgt_machines/rgt_machines/init.lua +++ b/mods/rgt_machines/rgt_machines/init.lua @@ -1,171 +1,7 @@ ---[[ - List of machines: - - Arc furnace: Melts materials into their liquid form ---]] - - rgt_machines = { registered_machines = {}, networks = {} } local ns = rgt_machines -local db = minetest.get_mod_storage() -function ns.get_network(id) - return minetest.deserialize(db:get(id) or "return nil") or {supply = 0, demand = 0} -end - --- This abstracts away the use of multiple nodes for visual state feedback by --- copying all node callbacks into each node, so that by default the machine --- behaves exactly the same regardless of the underlying node type. ---[[ - { - states = { ... }, -- Alternate visual states for this node. All properties of the resultant node may be overriden. - ... - } ---]] -function ns.register_machine(name, def) - if not def.groups then - def.groups = {} - end - def.groups.machine = 1 - def.groups.network_component = 1 - def.groups.run_on_activate = 1 - def.groups[name] = 1 - - -- Ensure that we update the network when a machine is placed or removed. - local _on_construct = def.on_construct - def.on_construct = function(pos) - ns.update_network(pos) - if _on_construct then _on_construct(pos) end - end - local _after_destruct = def.after_destruct - def.after_destruct = function(pos) - ns.update_network(pos) - if _after_destruct then _after_destruct(pos) end - end - - ns.registered_machines[name] = def - for state, x in pairs(def.states) do - rgt.register_node(name.."_"..state, extend(table.copy(def), x)) - end -end - --- Recursively propagate a network reassignment to all connected nodes (ignoring positions in `ignore`). -local function propagate_network_update(pos, net, ignore) - ignore[minetest.hash_node_position(pos)] = true - -- Store the network to the target node. - minetest.get_meta(pos):set_string("network", net) - -- Check each neighboring node for further propagation. - for _, x in ipairs(rgt.adjacent_neighbor_offests) do - -- If we already checked this node, we shouldn't consider it to avoid infinite recursion. - if not ignore[minetest.hash_node_position(pos +x)] then - local cid = minetest.get_node_raw(pos.x +x.x, pos.y +x.y, pos.z +x.z) - -- Ensure that this node can belong to a network and thus is a valid propagation target. - if minetest.get_item_group(rgt.content_ids_to_nodes[cid], "network_component") > 0 then - propagate_network_update(pos +x, net, ignore) - end - end - end -end - --- Called when a pos is added to or removed from a network. --- Whether an addition or deletion is being performed depends on whether the node at `pos` belongs to the `network_component` group. -function ns.update_network(pos) - -- We're adding a node. - if minetest.get_item_group(minetest.get_node(pos).name, "network_component") > 0 then - -- Find all adjacent networks. - local net - local nets = {} - local num_nets = 0 - for _, x in ipairs(rgt.adjacent_neighbor_offests) do - -- Ensure that this is a node that should have a network field. - if minetest.get_item_group(minetest.get_node(pos +x).name, "network_component") > 0 then - local n = minetest.get_meta(pos +x):get("network") - -- If the node doesn't have a network for some reason, we should give it one. - if not n or table.indexof(nets, n) == -1 then - -- Set our network to the first one we find. - if not net then - net = n - -- Store the positions of any other adjacent networks, so we can merge them with ours. - elseif net ~= n then - nets[#nets +1] = x - end - num_nets = num_nets +1 - end - end - end - - -- Propagate our chosen network to adjacent networks with different IDs. - -- If we didn't find any adjacent networks, this will just do nothing. - local ignore = {[minetest.hash_node_position(pos)] = true} - for _, x in ipairs(nets) do - propagate_network_update(pos +x, net, ignore) - end - - -- Create a new unique network ID if none of our neighbors have one. - if not net then - net = string.format("net_%d_%06d", minetest.get_us_time(), math.random(100000, 999999)) - end - - -- Save our chosen network ID. - minetest.get_meta(pos):set_string("network", net) - -- We're removing a node. - else - -- Find all adjacent networks. - local net - local nets = {} - for _, x in ipairs(rgt.adjacent_neighbor_offests) do - -- Ensure that this is a node that should have a network field. - if minetest.get_item_group(minetest.get_node(pos +x).name, "network_component") > 0 then - local n = minetest.get_meta(pos +x):get("network") - nets[#nets +1] = x - end - end - -- We only need to ensure that these networks are unique, thus one of them can keep its original ID. - if #nets > 1 then table.remove(nets, 1) end - - -- Create a new ID for each network and propagate it. - local pos_hash = minetest.hash_node_position(pos) - for _, x in ipairs(nets) do - net = string.format("net_%d_%06d", minetest.get_us_time(), math.random(100000, 999999)) - -- Provide a different ignore table each time, to ensure that when the same network abuts this node on multiple edges, all touching nodes get the same network in the end. - propagate_network_update(pos +x, net, {[pos_hash] = true}) - end - end - return true -end - -function ns.add_network_supply(id, amount) - local net = ns.get_network(id) - net.supply = net.supply +amount - db:set_string(id, minetest.serialize(net)) -end - -function ns.remove_network_supply(id, amount) - ns.add_network_supply(id, -amount) -end - -function ns.change_network_supply(id, from, to) - ns.add_network_supply(id, to -from) -end - -function ns.add_network_demand(id, amount) - local net = ns.get_network(id) - net.demand = net.demand +amount - db:set_string(id, minetest.serialize(net)) -end - -function ns.remove_network_demand(id, amount) - ns.add_network_demand(id, -amount) -end - -function ns.change_network_demand(id, from, to) - ns.add_network_demand(id, to -from) -end - -include "fluids.lua" - -include "cables.lua" -include "pipes.lua" diff --git a/mods/rgt_machines/rgt_machines_electric/modpack.conf b/mods/rgt_machines/rgt_machines_electric/modpack.conf new file mode 100644 index 0000000..e69de29 diff --git a/mods/rgt_machines/rgt_machines_electric/rgt_alloy_furnace/init.lua b/mods/rgt_machines/rgt_machines_electric/rgt_alloy_furnace/init.lua new file mode 100644 index 0000000..e69de29 diff --git a/mods/rgt_machines/rgt_machines_electric/rgt_alloy_furnace/mod.conf b/mods/rgt_machines/rgt_machines_electric/rgt_alloy_furnace/mod.conf new file mode 100644 index 0000000..1c020c4 --- /dev/null +++ b/mods/rgt_machines/rgt_machines_electric/rgt_alloy_furnace/mod.conf @@ -0,0 +1,2 @@ +name = rgt_alloy_furnace +depends = rgt_machines_electric \ No newline at end of file diff --git a/mods/rgt_machines/rgt_arc_furnace/init.lua b/mods/rgt_machines/rgt_machines_electric/rgt_arc_furnace/init.lua similarity index 100% rename from mods/rgt_machines/rgt_arc_furnace/init.lua rename to mods/rgt_machines/rgt_machines_electric/rgt_arc_furnace/init.lua diff --git a/mods/rgt_machines/rgt_machines_electric/rgt_arc_furnace/mod.conf b/mods/rgt_machines/rgt_machines_electric/rgt_arc_furnace/mod.conf new file mode 100644 index 0000000..32e6042 --- /dev/null +++ b/mods/rgt_machines/rgt_machines_electric/rgt_arc_furnace/mod.conf @@ -0,0 +1,2 @@ +name = rgt_arc_furnace +depends = rgt_machines_electric \ No newline at end of file diff --git a/mods/rgt_machines/rgt_arc_furnace/textures/rgt_arc_furnace_bottom.png b/mods/rgt_machines/rgt_machines_electric/rgt_arc_furnace/textures/rgt_arc_furnace_bottom.png similarity index 100% rename from mods/rgt_machines/rgt_arc_furnace/textures/rgt_arc_furnace_bottom.png rename to mods/rgt_machines/rgt_machines_electric/rgt_arc_furnace/textures/rgt_arc_furnace_bottom.png diff --git a/mods/rgt_machines/rgt_arc_furnace/textures/rgt_arc_furnace_front.png b/mods/rgt_machines/rgt_machines_electric/rgt_arc_furnace/textures/rgt_arc_furnace_front.png similarity index 100% rename from mods/rgt_machines/rgt_arc_furnace/textures/rgt_arc_furnace_front.png rename to mods/rgt_machines/rgt_machines_electric/rgt_arc_furnace/textures/rgt_arc_furnace_front.png diff --git a/mods/rgt_machines/rgt_arc_furnace/textures/rgt_arc_furnace_front_active.png b/mods/rgt_machines/rgt_machines_electric/rgt_arc_furnace/textures/rgt_arc_furnace_front_active.png similarity index 100% rename from mods/rgt_machines/rgt_arc_furnace/textures/rgt_arc_furnace_front_active.png rename to mods/rgt_machines/rgt_machines_electric/rgt_arc_furnace/textures/rgt_arc_furnace_front_active.png diff --git a/mods/rgt_machines/rgt_arc_furnace/textures/rgt_arc_furnace_side.png b/mods/rgt_machines/rgt_machines_electric/rgt_arc_furnace/textures/rgt_arc_furnace_side.png similarity index 100% rename from mods/rgt_machines/rgt_arc_furnace/textures/rgt_arc_furnace_side.png rename to mods/rgt_machines/rgt_machines_electric/rgt_arc_furnace/textures/rgt_arc_furnace_side.png diff --git a/mods/rgt_machines/rgt_arc_furnace/textures/rgt_arc_furnace_top.png b/mods/rgt_machines/rgt_machines_electric/rgt_arc_furnace/textures/rgt_arc_furnace_top.png similarity index 100% rename from mods/rgt_machines/rgt_arc_furnace/textures/rgt_arc_furnace_top.png rename to mods/rgt_machines/rgt_machines_electric/rgt_arc_furnace/textures/rgt_arc_furnace_top.png diff --git a/mods/rgt_machines/rgt_casting_basin/init.lua b/mods/rgt_machines/rgt_machines_electric/rgt_casting_basin/init.lua similarity index 100% rename from mods/rgt_machines/rgt_casting_basin/init.lua rename to mods/rgt_machines/rgt_machines_electric/rgt_casting_basin/init.lua diff --git a/mods/rgt_machines/rgt_machines_electric/rgt_casting_basin/mod.conf b/mods/rgt_machines/rgt_machines_electric/rgt_casting_basin/mod.conf new file mode 100644 index 0000000..6165176 --- /dev/null +++ b/mods/rgt_machines/rgt_machines_electric/rgt_casting_basin/mod.conf @@ -0,0 +1,2 @@ +name = rgt_casting_basin +depends = rgt_machines_electric \ No newline at end of file diff --git a/mods/rgt_machines/rgt_casting_basin/textures/rgt_cast_gear.png b/mods/rgt_machines/rgt_machines_electric/rgt_casting_basin/textures/rgt_cast_gear.png similarity index 100% rename from mods/rgt_machines/rgt_casting_basin/textures/rgt_cast_gear.png rename to mods/rgt_machines/rgt_machines_electric/rgt_casting_basin/textures/rgt_cast_gear.png diff --git a/mods/rgt_machines/rgt_casting_basin/textures/rgt_cast_plate.png b/mods/rgt_machines/rgt_machines_electric/rgt_casting_basin/textures/rgt_cast_plate.png similarity index 100% rename from mods/rgt_machines/rgt_casting_basin/textures/rgt_cast_plate.png rename to mods/rgt_machines/rgt_machines_electric/rgt_casting_basin/textures/rgt_cast_plate.png diff --git a/mods/rgt_machines/rgt_casting_basin/textures/rgt_cast_rod.png b/mods/rgt_machines/rgt_machines_electric/rgt_casting_basin/textures/rgt_cast_rod.png similarity index 100% rename from mods/rgt_machines/rgt_casting_basin/textures/rgt_cast_rod.png rename to mods/rgt_machines/rgt_machines_electric/rgt_casting_basin/textures/rgt_cast_rod.png diff --git a/mods/rgt_machines/rgt_casting_basin/textures/rgt_casting_basin_front.png b/mods/rgt_machines/rgt_machines_electric/rgt_casting_basin/textures/rgt_casting_basin_front.png similarity index 100% rename from mods/rgt_machines/rgt_casting_basin/textures/rgt_casting_basin_front.png rename to mods/rgt_machines/rgt_machines_electric/rgt_casting_basin/textures/rgt_casting_basin_front.png diff --git a/mods/rgt_machines/rgt_casting_basin/textures/rgt_casting_basin_front_active.png b/mods/rgt_machines/rgt_machines_electric/rgt_casting_basin/textures/rgt_casting_basin_front_active.png similarity index 100% rename from mods/rgt_machines/rgt_casting_basin/textures/rgt_casting_basin_front_active.png rename to mods/rgt_machines/rgt_machines_electric/rgt_casting_basin/textures/rgt_casting_basin_front_active.png diff --git a/mods/rgt_machines/rgt_furnace/init.lua b/mods/rgt_machines/rgt_machines_electric/rgt_furnace/init.lua similarity index 100% rename from mods/rgt_machines/rgt_furnace/init.lua rename to mods/rgt_machines/rgt_machines_electric/rgt_furnace/init.lua diff --git a/mods/rgt_machines/rgt_machines_electric/rgt_furnace/mod.conf b/mods/rgt_machines/rgt_machines_electric/rgt_furnace/mod.conf new file mode 100644 index 0000000..d8d4b01 --- /dev/null +++ b/mods/rgt_machines/rgt_machines_electric/rgt_furnace/mod.conf @@ -0,0 +1,2 @@ +name = rgt_furnace +depends = rgt_machines_electric \ No newline at end of file diff --git a/mods/rgt_machines/rgt_machines/cables.lua b/mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/cables.lua similarity index 100% rename from mods/rgt_machines/rgt_machines/cables.lua rename to mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/cables.lua diff --git a/mods/rgt_machines/rgt_machines/fluids.lua b/mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/fluids.lua similarity index 95% rename from mods/rgt_machines/rgt_machines/fluids.lua rename to mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/fluids.lua index 6cbc164..93933f2 100644 --- a/mods/rgt_machines/rgt_machines/fluids.lua +++ b/mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/fluids.lua @@ -12,7 +12,7 @@ local function push_fluid(pos, node, ctx) local fluid_type = m:get "fluid_type" local space = m:get_float "fluid_capacity" -fluid - -- If possible, cast the type of an empty tank to that of the fluid we're pushing; if, however, the tank already contains some amount of a different fluid type, we should not push anything. + -- If possible, cast the type of an empty tank to that of the fluid we're pushing; if, however, the tank already contains some amount of a different fluid type, we should not push anything. if ctx.type ~= fluid_type then if not fluid_type or fluid == 0 then m:set_string("fluid_type", ctx.type) diff --git a/mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/init.lua b/mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/init.lua new file mode 100644 index 0000000..6334cf9 --- /dev/null +++ b/mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/init.lua @@ -0,0 +1,170 @@ +--[[ + List of machines: + - Arc furnace: Melts materials into their liquid form +--]] + +local ns = rgt_machines +extend(ns, { + registered_machines = {}, + networks = {} +}) + +local db = minetest.get_mod_storage() +function ns.get_network(id) + return minetest.deserialize(db:get(id) or "return nil") or {supply = 0, demand = 0} +end + +-- This abstracts away the use of multiple nodes for visual state feedback by +-- copying all node callbacks into each node, so that by default the machine +-- behaves exactly the same regardless of the underlying node type. +--[[ + { + states = { ... }, -- Alternate visual states for this node. All properties of the resultant node may be overriden. + ... + } +--]] +function ns.register_machine(name, def) + if not def.groups then + def.groups = {} + end + def.groups.machine = 1 + def.groups.network_component = 1 + def.groups.run_on_activate = 1 + def.groups[name] = 1 + + -- Ensure that we update the network when a machine is placed or removed. + local _on_construct = def.on_construct + def.on_construct = function(pos) + ns.update_network(pos) + if _on_construct then _on_construct(pos) end + end + local _after_destruct = def.after_destruct + def.after_destruct = function(pos) + ns.update_network(pos) + if _after_destruct then _after_destruct(pos) end + end + + ns.registered_machines[name] = def + for state, x in pairs(def.states) do + rgt.register_node(name.."_"..state, extend(table.copy(def), x)) + end +end + +-- Recursively propagate a network reassignment to all connected nodes (ignoring positions in `ignore`). +local function propagate_network_update(pos, net, ignore) + ignore[minetest.hash_node_position(pos)] = true + -- Store the network to the target node. + minetest.get_meta(pos):set_string("network", net) + -- Check each neighboring node for further propagation. + for _, x in ipairs(rgt.adjacent_neighbor_offests) do + -- If we already checked this node, we shouldn't consider it to avoid infinite recursion. + if not ignore[minetest.hash_node_position(pos +x)] then + local cid = minetest.get_node_raw(pos.x +x.x, pos.y +x.y, pos.z +x.z) + -- Ensure that this node can belong to a network and thus is a valid propagation target. + if minetest.get_item_group(rgt.content_ids_to_nodes[cid], "network_component") > 0 then + propagate_network_update(pos +x, net, ignore) + end + end + end +end + +-- Called when a pos is added to or removed from a network. +-- Whether an addition or deletion is being performed depends on whether the node at `pos` belongs to the `network_component` group. +function ns.update_network(pos) + -- We're adding a node. + if minetest.get_item_group(minetest.get_node(pos).name, "network_component") > 0 then + -- Find all adjacent networks. + local net + local nets = {} + local num_nets = 0 + for _, x in ipairs(rgt.adjacent_neighbor_offests) do + -- Ensure that this is a node that should have a network field. + if minetest.get_item_group(minetest.get_node(pos +x).name, "network_component") > 0 then + local n = minetest.get_meta(pos +x):get("network") + -- If the node doesn't have a network for some reason, we should give it one. + if not n or table.indexof(nets, n) == -1 then + -- Set our network to the first one we find. + if not net then + net = n + -- Store the positions of any other adjacent networks, so we can merge them with ours. + elseif net ~= n then + nets[#nets +1] = x + end + num_nets = num_nets +1 + end + end + end + + -- Propagate our chosen network to adjacent networks with different IDs. + -- If we didn't find any adjacent networks, this will just do nothing. + local ignore = {[minetest.hash_node_position(pos)] = true} + for _, x in ipairs(nets) do + propagate_network_update(pos +x, net, ignore) + end + + -- Create a new unique network ID if none of our neighbors have one. + if not net then + net = string.format("net_%d_%06d", minetest.get_us_time(), math.random(100000, 999999)) + end + + -- Save our chosen network ID. + minetest.get_meta(pos):set_string("network", net) + -- We're removing a node. + else + -- Find all adjacent networks. + local net + local nets = {} + for _, x in ipairs(rgt.adjacent_neighbor_offests) do + -- Ensure that this is a node that should have a network field. + if minetest.get_item_group(minetest.get_node(pos +x).name, "network_component") > 0 then + local n = minetest.get_meta(pos +x):get("network") + nets[#nets +1] = x + end + end + -- We only need to ensure that these networks are unique, thus one of them can keep its original ID. + if #nets > 1 then table.remove(nets, 1) end + + -- Create a new ID for each network and propagate it. + local pos_hash = minetest.hash_node_position(pos) + for _, x in ipairs(nets) do + net = string.format("net_%d_%06d", minetest.get_us_time(), math.random(100000, 999999)) + -- Provide a different ignore table each time, to ensure that when the same network abuts this node on multiple edges, all touching nodes get the same network in the end. + propagate_network_update(pos +x, net, {[pos_hash] = true}) + end + end + return true +end + +function ns.add_network_supply(id, amount) + local net = ns.get_network(id) + net.supply = net.supply +amount + db:set_string(id, minetest.serialize(net)) +end + +function ns.remove_network_supply(id, amount) + ns.add_network_supply(id, -amount) +end + +function ns.change_network_supply(id, from, to) + ns.add_network_supply(id, to -from) +end + +function ns.add_network_demand(id, amount) + local net = ns.get_network(id) + net.demand = net.demand +amount + db:set_string(id, minetest.serialize(net)) +end + +function ns.remove_network_demand(id, amount) + ns.add_network_demand(id, -amount) +end + +function ns.change_network_demand(id, from, to) + ns.add_network_demand(id, to -from) +end + +include "fluids.lua" + +include "cables.lua" +include "pipes.lua" + diff --git a/mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/mod.conf b/mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/mod.conf new file mode 100644 index 0000000..7116bf2 --- /dev/null +++ b/mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/mod.conf @@ -0,0 +1,2 @@ +name = rgt_machines_electric +depends = rgt_machines \ No newline at end of file diff --git a/mods/rgt_machines/rgt_machines/models/rgt_pipe_straight.gltf b/mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/models/rgt_pipe_straight.gltf similarity index 100% rename from mods/rgt_machines/rgt_machines/models/rgt_pipe_straight.gltf rename to mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/models/rgt_pipe_straight.gltf diff --git a/mods/rgt_machines/rgt_machines/models/rgt_pipe_straight_double_cap.gltf b/mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/models/rgt_pipe_straight_double_cap.gltf similarity index 100% rename from mods/rgt_machines/rgt_machines/models/rgt_pipe_straight_double_cap.gltf rename to mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/models/rgt_pipe_straight_double_cap.gltf diff --git a/mods/rgt_machines/rgt_machines/models/rgt_pipe_straight_single_cap.gltf b/mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/models/rgt_pipe_straight_single_cap.gltf similarity index 100% rename from mods/rgt_machines/rgt_machines/models/rgt_pipe_straight_single_cap.gltf rename to mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/models/rgt_pipe_straight_single_cap.gltf diff --git a/mods/rgt_machines/rgt_machines/pipes.lua b/mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/pipes.lua similarity index 100% rename from mods/rgt_machines/rgt_machines/pipes.lua rename to mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/pipes.lua diff --git a/mods/rgt_machines/rgt_machines/textures/rgt_cable_copper.png b/mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/textures/rgt_cable_copper.png similarity index 100% rename from mods/rgt_machines/rgt_machines/textures/rgt_cable_copper.png rename to mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/textures/rgt_cable_copper.png diff --git a/mods/rgt_machines/rgt_machines/textures/rgt_fluid_container_bg.png b/mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/textures/rgt_fluid_container_bg.png similarity index 100% rename from mods/rgt_machines/rgt_machines/textures/rgt_fluid_container_bg.png rename to mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/textures/rgt_fluid_container_bg.png diff --git a/mods/rgt_machines/rgt_machines/textures/rgt_fluid_container_bg_filled.png b/mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/textures/rgt_fluid_container_bg_filled.png similarity index 100% rename from mods/rgt_machines/rgt_machines/textures/rgt_fluid_container_bg_filled.png rename to mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/textures/rgt_fluid_container_bg_filled.png diff --git a/mods/rgt_machines/rgt_machines/textures/rgt_pipe_straight.png b/mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/textures/rgt_pipe_straight.png similarity index 100% rename from mods/rgt_machines/rgt_machines/textures/rgt_pipe_straight.png rename to mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/textures/rgt_pipe_straight.png diff --git a/mods/rgt_machines/rgt_machines/textures/rgt_progress_bg.png b/mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/textures/rgt_progress_bg.png similarity index 100% rename from mods/rgt_machines/rgt_machines/textures/rgt_progress_bg.png rename to mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/textures/rgt_progress_bg.png diff --git a/mods/rgt_machines/rgt_machines/textures/rgt_progress_bg_active.png b/mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/textures/rgt_progress_bg_active.png similarity index 100% rename from mods/rgt_machines/rgt_machines/textures/rgt_progress_bg_active.png rename to mods/rgt_machines/rgt_machines_electric/rgt_machines_electric/textures/rgt_progress_bg_active.png diff --git a/mods/rgt_machines/rgt_steam_generator/init.lua b/mods/rgt_machines/rgt_machines_electric/rgt_steam_generator/init.lua similarity index 100% rename from mods/rgt_machines/rgt_steam_generator/init.lua rename to mods/rgt_machines/rgt_machines_electric/rgt_steam_generator/init.lua diff --git a/mods/rgt_machines/rgt_machines_electric/rgt_steam_generator/mod.conf b/mods/rgt_machines/rgt_machines_electric/rgt_steam_generator/mod.conf new file mode 100644 index 0000000..0281078 --- /dev/null +++ b/mods/rgt_machines/rgt_machines_electric/rgt_steam_generator/mod.conf @@ -0,0 +1,2 @@ +name = rgt_steam_generator +depends = rgt_machines_electric \ No newline at end of file diff --git a/mods/rgt_machines/rgt_steam_generator/textures/rgt_steam_generator_front.png b/mods/rgt_machines/rgt_machines_electric/rgt_steam_generator/textures/rgt_steam_generator_front.png similarity index 100% rename from mods/rgt_machines/rgt_steam_generator/textures/rgt_steam_generator_front.png rename to mods/rgt_machines/rgt_machines_electric/rgt_steam_generator/textures/rgt_steam_generator_front.png diff --git a/mods/rgt_machines/rgt_steam_generator/textures/rgt_steam_generator_front_active.png b/mods/rgt_machines/rgt_machines_electric/rgt_steam_generator/textures/rgt_steam_generator_front_active.png similarity index 100% rename from mods/rgt_machines/rgt_steam_generator/textures/rgt_steam_generator_front_active.png rename to mods/rgt_machines/rgt_machines_electric/rgt_steam_generator/textures/rgt_steam_generator_front_active.png diff --git a/mods/rgt_machines/rgt_machines_mechanical/modpack.conf b/mods/rgt_machines/rgt_machines_mechanical/modpack.conf new file mode 100644 index 0000000..e69de29 diff --git a/mods/rgt_machines/rgt_machines_mechanical/rgt_machines_mechanical/init.lua b/mods/rgt_machines/rgt_machines_mechanical/rgt_machines_mechanical/init.lua new file mode 100644 index 0000000..06d394a --- /dev/null +++ b/mods/rgt_machines/rgt_machines_mechanical/rgt_machines_mechanical/init.lua @@ -0,0 +1,22 @@ +local ns = rgt_machines + +ns.components = {} + +--[[ + { + name = "...", -- The component's name. + attach_points + } +--]] +function ns.register_component(def) + ns.components[def.name] = def +end + +function ns.register_plate(name, def) + rgt.register_item(name, def) +end + + +rgt.register_node("hand_crank", { + mesh = "rgt_hand_crank.gltf" +}) diff --git a/mods/rgt_machines/rgt_machines_mechanical/rgt_machines_mechanical/mod.conf b/mods/rgt_machines/rgt_machines_mechanical/rgt_machines_mechanical/mod.conf new file mode 100644 index 0000000..8c50aca --- /dev/null +++ b/mods/rgt_machines/rgt_machines_mechanical/rgt_machines_mechanical/mod.conf @@ -0,0 +1,2 @@ +name = rgt_machines_mechanical +depends = rgt_machines \ No newline at end of file diff --git a/mods/rgt_machines/rgt_steam_generator/mod.conf b/mods/rgt_machines/rgt_steam_generator/mod.conf deleted file mode 100644 index 7907304..0000000 --- a/mods/rgt_machines/rgt_steam_generator/mod.conf +++ /dev/null @@ -1,2 +0,0 @@ -name = rgt_steam_generator -depends = rgt_machines \ No newline at end of file diff --git a/mods/rgt_materials/init.lua b/mods/rgt_materials/init.lua index fde694f..9f01954 100644 --- a/mods/rgt_materials/init.lua +++ b/mods/rgt_materials/init.lua @@ -16,6 +16,20 @@ - Gravel --]] +-- MARK: - Wood + +rgt.register_item("stick", { + inventory_image = "rgt_stick.png" +}) + +minetest.register_craft { + recipe = { + {"group:planks", "group:planks"}, + {"group:planks", "group:planks"}, + }, + output = "workbench" +} + -- MARK: - Coal diff --git a/mods/rgt_materials/textures/rgt_copper_block.png b/mods/rgt_materials/textures/rgt_copper_block.png index 45d22e1f98eb25acc9308a48d07c1c5c33b9f043..80bc7a90c433a4625283fb4c4710abe4ea1fa2a0 100644 GIT binary patch delta 268 zcmV+n0rUQ`0<;2qF$!{_5Y3A5O;uoaI)qWvLBx8UU{^iIlo=r2Z!-1ege&!>s&HLpHXL%d3W_F(doQ@q2G3V84v+vK}#OUYm2B6ddK$fI+ zFwX+5L)Y&C1fGk;A~8$iZP)LO86{0*FeOYk)tGZr{m(=Z0DpngcmbYa%Fh-|A{pkI zs&%tZJOI|ga+K6mSztk!H$BN+jIr4DEa@5J^%RLC!1+vxXUw~`ium~m`?~clEp{?j zi_izzJ^Tm1K4Sp1TFK0h55Q~Rj~!+A@^)Zsfwu(UMc z5CEW*B2CkgXjU);l~R-3^E{FynciRtI9%g6M!W)MS>`ekg?fJf{j=j-l@vv>7<2-F zQ~Jkxv*qK{=UkOEO>-CQx(*@4SYRap>&@1Ma}xpTx`yjdI6>RCNGYAj7&Dn@!QG*B zk1qi7JV$Fi63tBs)sg|aYs0f{cL1%alhOY;_6@AvmT%ZC51k0Xb!m(v{fpSSypc_|2BmSq4a zrLfknM7x3|sFd2|Ns>_4_4Wowz~x$172+>o(=;&?WpSSKJafl6N7r?S!6*Q*)?$ny zO;en648!mvI875mh_xU{0E{s)+?xo{_dPs*A_~TFL`oS&-uunO02bv}e0%}Wwk=xg zm1u9`5)2g^WpSPXwAM%|@!r1#H-cx;Z{YjXH=TxOAkzDCV*mgE07*qoM6N<$f^T_n A+yDRo diff --git a/mods/rgt_materials/textures/rgt_gear_copper.png b/mods/rgt_materials/textures/rgt_gear_copper.png index a1adcefed78d8304f6e690a2326808b148961e98..04a8e4fcf87e9450d831a9bd24e053cf8e1ddd8f 100644 GIT binary patch delta 321 zcmV-H0lxm@0_g&fF@GaTL_t(Ijg6DfO2a@9#(xQh2mz5q@gVgQig+pU=3Dd?`e=QH zzJ<4jUV@Zf(o@kE5gHPLiHADtZvNT1?YG}IGvCZE48(jI*7Ipt4{+k!VNa4~#^fi_$f%y~a*jpC zU)eLfcZIR@@abN)>i7YxcniQJ8W|R(`fRbWj4d>YjvuuA%WQhLpcA_`(QD!M$^qc! z+8Gple3k&be>#=sQ_hO--}X)f&$W5DyEHrtu7^q>1bubsE?0M5pXuK?=R5xZvSh2$ TD^s^`00000NkvXXu0mjf__dr! delta 315 zcmV-B0mT040^op>YMfMnjAww2)9-)Hj)dLiO#q^X{8_-(_H=mh-4x&ZBm$$B{+>7OPlef$suP zR*i+5y_fPadwx9L3N1k3yFAP$0KBc=HBtK3FRuXT0o_4n$$y|h3nER(hy8BMHt{Ca zmU;?=T<3X@=qc61FX$}HBqv!xk`+BX@LjzVN66yyu-{SVIZ0Mnn~$cUb$hxkDXZqF zpez4BWo15jy4O-YrHD5v0MRtGEXeJPRqR+PbQ?XTdj4fMgDIGer;-@7aC7AWaC_~K z5&V1usjQHR&RhAUAisx*{R2Lw*K;*e*i9ttNc#vEcyTd N002ovPDHLkV1jc3nGOH| diff --git a/mods/rgt_materials/textures/rgt_plate_copper.png b/mods/rgt_materials/textures/rgt_plate_copper.png index dbc8f148343eebc55c47c14c182e0e385b7af4dc..a402efee8ae4f9d3017ca6ffa70e7ec750219549 100644 GIT binary patch delta 276 zcmV+v0qg#>0=xo{F@N?+L_t(IjlEON4#7Ye9M!5Q4oyTt9Gl=Gynt76@qpgI(T&7O z8XQCuX(IkM-I6Yc+M?Ymk(kSFX1|$l^5t9LN2CB?*l%7rK`8r3Xdf=<4dyAC6MCcW zpKnCx%^Iie5ri_7iV6Tg`X+9sTt!|lK+8U4a=3`OG}#1e5Pxg`Fd&pczl$fMnNX;y zepjPyAXBaa&jw+1x-DTMb8JSq*cr@5)1Z(GMTi(^suVkioSIHH;4s>T@E%4m17~SM zt<+v3i#o;|P!F(HZ@Y20)+)G5xUVIl3=Z{P9^=Fg^`Z&v!v%oi|ApNmF@;|r+5=Ah a6*nr|W`BJTH4WJS0000`c)wT>me zIVL*naXoop#8Isn0Dxl7d`f1$A&L;91n?Vu1!3;_1z^Nc3xCZMXQ4EfOF96+vfBdk z4oIpu=qeK}C#zJikQH_A%%VYQR4D~0m-Nhckk`lsNLhAUStk{}0o$%&He0dCsuME- zJ_Ufg%RNns++9=`5UwR74xfV9&n&Y~K{~`IF-!Tumz6b7^14OrZ^Hp ze_u#A{~i31(Q`0*4gj4557UTs9sni5`*yOdhiV$caP=UCs|Gn-9F%Z&P=k|$S{xm; s;MbrPKL!$f52P5N2e8g#1^AOL!BJjcR#l?-00000NkvXXt^-0~f@!ulzyJUM diff --git a/mods/rgt_origins/init.lua b/mods/rgt_origins/init.lua new file mode 100644 index 0000000..86ff563 --- /dev/null +++ b/mods/rgt_origins/init.lua @@ -0,0 +1,57 @@ +local ns = rgt + +ns.origins = {} + +local db = minetest.get_mod_storage() + +--[[ + { + name = "human", -- The name of this origin. + label = "Human", -- The user-facing name. + base_hp = 20, -- The base HP of this origin. + properties = {...}, -- Object properties overridden by this origin. + abilities = { + + }, + on_apply = function(m) end, -- Called when this origin is first applied to a player. + on_join = function(m) end, -- Called when a player with this origin joins. + on_leave = function(m) end, -- Called when a player with this origin leaves. + tick = function(m) end, -- Called every globalstep for each player that has this origin. + } +--]] +function ns.register_origin(def) + ns.origins[def.name] = def +end + +include_all "origins" + + +local REALM_START = 30500 +local REALM_END = 31000 + +rgt_realms.register_realm { + name = "startroom", + label = "Start Room", + min = vector.new(-100, REALM_START, -100), + max = vector.new(100, REALM_END, 100), + sky = { + type = "plain", + base_color = "#000", +-- fog = { +-- fog_distance = 20, +-- fog_start = 0.3, +-- fog_color = "#aab" +-- } + } +} + +if not db:contains "initialized" then + minetest.after(0, function() + local pos = vector.new(0, REALM_START +100, 0) + minetest.emerge_area(pos, pos, function() + say(pos:to_string()) + minetest.set_node(pos, {name = "stone"}) + end) + db:set_string("initialized", "true") + end) +end diff --git a/mods/rgt_origins/origins/human.lua b/mods/rgt_origins/origins/human.lua new file mode 100644 index 0000000..e69de29 diff --git a/mods/rgt_player/init.lua b/mods/rgt_player/init.lua index a57d4a1..0a033c0 100644 --- a/mods/rgt_player/init.lua +++ b/mods/rgt_player/init.lua @@ -9,8 +9,6 @@ Player = { object = p }, {__index = Player}) - local inv = p:get_inventory() - inv:set_size("hand", 1) m:set_hotbar_size(8) m.textures = {_textures = {}} @@ -431,6 +429,16 @@ Player = { m:dispatch("deinit") m.health_display:remove() m.wielditem_display:remove() + + -- Unwield the wielded item. This ensures that if wielding an item creates side effects + -- (e.g. temporary entities while wielded), those side effects will not remain in effect + -- when the player leaves the game. + local w = m.object:get_wielded_item() + local wname = w:get_name() + local def = minetest.registered_items[wname] + local onunselect = def and def.on_unwield + if onunselect then onunselect(m) end + rgt.players[m.name] = nil end } diff --git a/mods/rgt_tools/textures/rgt_axe_copper.png b/mods/rgt_tools/textures/rgt_axe_copper.png index 8ed4299028a6a206c119f8d122814c81f626781b..7cb9d726b80dc9fa41c47fdd8742520bca1d0fe0 100644 GIT binary patch delta 218 zcmV<0044v30)qmOF@L>DL_t(IjbmUS0E(<-{})-y{>LTHL`bur7B7RJ7B5aUI1O0f zul(Oni z@)g5of(8(y8K(inYQ|~+DVi}1AXPJp0pw_g8$hmR23SJ+`uP{b*U!I5)=U)u0MuJs U-=L9!D*ylh07*qoM6N<$g3sq%X8-^I delta 223 zcmV<503iQ^0*C^TF@M5IL_t(IjbmUS0P?I=|L0k&{>LTHL`bubmN0{lmM~5=I1QNX zum9giOPGOIh>w9+h>ro6D_C%8mKWn>;1%M7i}`2?GhF}k{yzf)1H4yvmqgnErux(!id;!=cx;^Z z6zoiOpJy2J@AKS7AV~av(!3{v*MXfqXzRbv93PEpD!9{;eet(Dc0c|&FzP<_FS+Frq%0&CbFT;gHokNbNh zmqGFD3x=Z%L8gl(9J-#h^p-#T)br#P53>#r5X9U6Px|rer})WPE14J`^OcuoSW5{o P0D-5gAFIncr-UW|lq+`Q delta 265 zcmV+k0rvj10O$ngT$lQIhvc6f~_IP7#JA7 ke*VSq_46;1HB$uu0K@8Okg`WVRsaA107*qoM6N<$g17^0Qvd(} delta 228 zcmVABc#)BbRLu+w3@B{824K^S4p{IR0QKj8A1zc{Kfn7#oC_Ej z7#ObqdCxHS;X}A4WdAcTFfcIV)9h+4@?VIbmErM|uMCPDJY5W&O#e_c;{~qfBLBnP zB>!7!@xh~Sw!i*=bahxwLbmzXwNH3$!;mCJGll`AYDO`D9L;b8$kogMOGsZo|6=(1 e`4`EWsR954*Ja+Cm3xT*00003{$2N!P z4uG~Ghuc<%Tb#V=S|gO|$l;I9H5xFGNxTVn$FK_qlx%2%*V1JALw z;kOYy$Cj395MMHuvz`+EC;*5r8GaBcuTpp_^kjSI%UjPq4G*kJFqQ-{UHUQ*{Enqig|dsjRinZEy*;w ms2aG%cTMTLrquZQ|6BpA@OPLRuI14H0000qwrrkEv{#rcAU8Tj$>`;D9^z71&K_M;~6%1$o zFL|`haDS9hz{)w(_-rQSW&Z2+O$cc)-pm+wb%n}gVFz*3ZwgKqk|%#V?(;9FKGouU zHp{iOON`rX93Pu=_B=eP@k*w~^v#@*PaZ{UpQQ`^Pnf>kduc{_@us`FBH>%V7dh<& PI*-BA)z4*}Q$iB}38Pdw literal 0 HcmV?d00001 diff --git a/mods/rgt_world/textures/rgt_cobble.png b/mods/rgt_world/textures/rgt_cobble.png index 6a218959f6f9a88b29093c8d7489096b14b1da2e..338a34c7ddeec2f1bacb424cd3603e02eb21370d 100644 GIT binary patch delta 411 zcmV;M0c8HT1HuE4F@JnXL_t(Ija^bPs_QTioab*OLbM{7G_pGvCMQajBl`eG#g(pm!`A^;(T$KwHD-**7U7$PDfYwf=8+qMk=VvGV= zYfCB2%*@6Z=Ny2Xv#^aZDWy^5LkJ;+Qi?G~5CFASB8o9G^M5o=tu?LnD2^cnrBrVK zz_KjNEbka20OuSL4c1!ky;4eqbIt&)wE)iZ^xo&3jWK=5f7k03!0mPeaKGPUjPLh* zo@ZwMe!tE+5xQJ1pU-DmmO+N=Q2>~xiJ4n#9beb=JWl|}ag5?6)Z;k%(51fE5*$ zX~0G7Ca$iSlXW@@B*x3`%v*oW^DH6&`1amU(*$5y768^-5fKsR+_Eg=I934meW&D{ zODU>V^Er-V+cvgrnkMI*bAJ|*5W@TYHpb9JB_iWE z0{Ck{L}*Mzx~@wprIe^w&bf76ONJOD0OuTll+wDcF-B``DX1@(3xM102B2-*ec#XX z?E79-bIx7Y(Vj6T#yAW^#c%}$jj1YtqEFM5QUai=-<-u#!YSVPOw&X})GM+t;QxkZ z*3v~phGD4h_kVlNnc#}CrfF2w7(@3(SJjH9iIqE|x5BjO6zkXP#Rau(8)MwI&3n(T z1!d0pI1YY(mjmaV_r6S{$Q6~uB2r(kR{+B>6dO&`gb?WD@pzo)X^aUW^nDNDYo2HJ vBWbcP=*lSGfM2Zt^6_evW$}Nu7m**DCEK;WPfrv8015yANkvXXu0mjfo!-cI diff --git a/mods/rgt_world/textures/rgt_grass_1.png b/mods/rgt_world/textures/rgt_grass_1.png new file mode 100644 index 0000000000000000000000000000000000000000..a7d0c66b7b83de50886d138806b003d4c14fc365 GIT binary patch literal 314 zcmV-A0mc4_P)Px#^hrcPR5*>@ks)%!Fc3w*HlFkz8G`_WX2zt%q@ec*GYm8{D-7&e3W7rd0t0f3 z1lY2q4ajUpmbMqDh^5uO|GXpM|E|yeowa(?Rcc)Y(`F5(6gu>0quHCT;%RW1kOYd; zr}5c14Q^&V?k^@4k~W5zj{A#|y?mRl;zNHn0Pyu)GsTeDrorK3w`MIg4*Km*hU9l* z+v(?OVsNuvaT@d*A)a3@H`^7bpwuN?dPxp-Te2Sm>b6wh*^dE>H<}4%0dd1$Ab?Cj zQt&pwj{)}PUZA%j3rkm#UI?^U((D|E*}KCM1?slsLQI*>=Al~c0b%&T+Vg=!lmGw# M07*qoM6N<$f|v`4zyJUM literal 0 HcmV?d00001 diff --git a/mods/rgt_world/textures/rgt_grass_2.png b/mods/rgt_world/textures/rgt_grass_2.png new file mode 100644 index 0000000000000000000000000000000000000000..1a24cf8461c31bda21765a0cf32a94323d38807c GIT binary patch literal 184 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|iacE$Lo9mV z_U`6wFyL{CmtYONpmcEqpRDTS03#t@<^Tf@&KnCI9;zQx(eR!y0!42yk@LJfFYSEe^{%4O|8 z)bZ}jefxh8zT8{*O}mE&2z-wJ&QG|SF=NS>`HhW?t;f<7xHtJ4^w!t^OaAfuwLCKr z%xPmRX_f$*^Y8!P&H$FnA6~zfXEVzaYums7pP|8KL&HCRzxFrwvL8%OOHZ;e{>!J# Y5Fwo8Im6W51n5=z>% literal 0 HcmV?d00001 diff --git a/mods/rgt_world/textures/rgt_grass_side.png b/mods/rgt_world/textures/rgt_grass_side.png index 0d3ff895c3dc35f8bb24b6936d67bc6d68a96dd7..506d894d7fa8d20eddb87410fb107b6bbe2de943 100644 GIT binary patch delta 298 zcmV+_0oDGG1JVMJF@Fq6L_t(Ijm1$hcEvCVQ~dq}8M2TyK7j9kk{lp2o;sNIclq)o zX@_oQ!jb@i7k7V~8O9ih2mpYHKvjRmdhhcc5hwuAdxxq*L;zq4BLZf2!vIWdjDf-; z0JEU?4iTC87z4fcSxBv_;`Ow}ATA;hk*VQi>I)y4G&5Y+g?}*yRCPAYt{8<@%nT7R zkH$jYCkLCUDqi_0bU+uJ#))|?4w@^FsI}gvbJx6T=1UglgHq(~Grz9ub|*7K;r{$8 z7BO$FReoW1%e=TdmSw2~+#Rj8y6<~+cL4ZucSHnQYn6`Hb**%C0N4N==Xt)M0*?cbF@H%(L_t(Ijm45ZPQ)+}g};m)K?#u4dlMd-Lb!?%^ic&JZ;ceF8vigS7H1=3OX$^a%m*E+DNS zwpoH}V)O~ynG*~sSnv_aB%lzy3y5us9el*QP>4C#Siwpw=zpZ(pccy&#WsjF=oG-M zWR2Tc*(u5zv7KQab!o8`0F0H=l}=$RR9fi_(WkOBV;5rHPyMo(w6ZL*o-O#uJSt)v zF0R@laz0k{iKr0?K5ms(Qe8dIn)9*{fKFjMRn>dBtkOM~S3^Qkf^+lT#e z@Gj6^8lt9BxnNvEUEt;MeJDW}IP8zZ+wPx$JxN4CR7i=vR6CM`FbtJ!5;(_B3W_v4lZGaTNk>V!CrFu+`=m)jnIZ)T$q&56 zj=Vy)*G`66HAeQ+(|f`IAY%KqHgfOf2$2NI<$=trrZm2@2`+dbNa&1K3aRd8f}n!q{*19Zu&GyefXDqA=T!g+(_a)B$YBN*q`pco z0eO9!005wCdn;9{;rag#F-i~%UxRrqP%MhfK37d?_&}wS`4sR@kLz>t7XooNy0%Bk z9R-_uWkPqLYkQQ$Q47OuOtX+mM2aYP2qX|9--addU6Rk;hcifN$x)zl7Yq*b~m&yY89_1vR<1zx0C%ybFrakUk h;xZ87E0WKg}q?7;v literal 0 HcmV?d00001 diff --git a/mods/rgt_world/textures/rgt_grass_top.png b/mods/rgt_world/textures/rgt_grass_top.png index ff39b7dd49df428817fc0451358318059bf15577..7b4d0592861248cb92b7bdee510adaac83c7e224 100644 GIT binary patch delta 262 zcmV+h0r~#o0bD>U`G@DPWL< z?Bl-g%Rb3-OX&DarcOzo5_=eCNql&n(X)M?#vX= zfh3V|Kp&}SzYLs-(afr9*HBe6lbOV)rmITq(pFX1b#=EOj(_KQi2n7+z1^h~FshO# zPO#XJB^MH@3W-U8&?(NnjV3MzxSZ)WTv}G_0IME0Gvk^l16RNU;qFB M07*qoM6N<$g71@tp#T5? delta 315 zcmV-B0mS~U0^$OYFn<9YNkl9psYS#Ot+?Y%IBY6x5Qse_w5jO2JLAmOU{lwX6}L@&7=H+}u59+!7H59FJfog5 zV1thu*hxLq);;Y32u9MD$IeFGS8Y_>wyxCo@3(^`B20ts`Jr(7R`5eJik`H^?Ws-m zL)W!!fWt&Y4RDC;us7KGh+!qwrrkEv{#rcAU8Tj$>`;D9^z71&K_M;~6%1$o zFL|`haDS9hz{)w(_-rQSW&Z2+O$cc)-pm+wb%n}gVFz*3ZwgKqk|%#V?(;9FKGouU zHp{iOON`rX93Pu=_B=eP@k*w~^v#@*PaZ{UpQQ`^Pnf>kduc{_@us`FBH>%V7dh<& PI*-BA)z4*}Q$iB}38Pdw literal 0 HcmV?d00001 diff --git a/mods/rgt_world/textures/rgt_palette_grass.png b/mods/rgt_world/textures/rgt_palette_grass.png new file mode 100644 index 0000000000000000000000000000000000000000..20c4a043b7df0f9cbb3073588b3520c16f363821 GIT binary patch literal 95 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|Bt2amLo9le r4bFxBd4KoS=lO{uJxzfImlzplO<}&Xe1ShNP!WTttDnm{r-UW|M&=vA literal 0 HcmV?d00001 diff --git a/mods/rgt_world/variants.lua b/mods/rgt_world/variants.lua index 75895b8..e4e0412 100644 --- a/mods/rgt_world/variants.lua +++ b/mods/rgt_world/variants.lua @@ -11,7 +11,8 @@ function ns.register_slab(def) fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5} }, paramtype = "light", - paramtype2 = "facedir" + paramtype2 = "facedir", + _variant = "slab" })) end @@ -61,7 +62,8 @@ function ns.register_stair(def) fixed = {{-0.5, -0.5, -0.5, 0.5, 0, 0.5}, {-0.5, -0.5, 0, 0.5, 0.5, 0.5}} }, paramtype = "light", - paramtype2 = "facedir" + paramtype2 = "facedir", + _variant = "stair", })) rgt.register_node(def._name.."_stair_inner", extend(table.copy(def), { @@ -71,7 +73,8 @@ function ns.register_stair(def) fixed = {{-0.5, -0.5, -0.5, 0.5, 0, 0.5}, {-0.5, -0.5, 0, 0.5, 0.5, 0.5}, {-0.5, -0.5, -0.5, 0, 0.5, 0.5}} }, paramtype = "light", - paramtype2 = "facedir" + paramtype2 = "facedir", + _variant = "stair_inner", })) rgt.register_node(def._name.."_stair_outer", extend(def, { @@ -81,7 +84,8 @@ function ns.register_stair(def) fixed = {{-0.5, -0.5, -0.5, 0.5, 0, 0.5}, {-0.5, -0.5, 0.5, 0, 0.5, 0}} }, paramtype = "light", - paramtype2 = "facedir" + paramtype2 = "facedir", + _variant = "stair_outer", })) end