From 1e897665bba9ecb4aae8c52bf5623bdabd58476d Mon Sep 17 00:00:00 2001 From: Signal Date: Mon, 29 Dec 2025 16:53:50 -0500 Subject: [PATCH] Add copper, and the beginnings of a machine system. --- mods/rgt_achievements/init.lua | 72 ++++++++ mods/rgt_achievements/mod.conf | 2 + mods/rgt_base/init.lua | 60 +++++- mods/rgt_machines/rgt_alloy_furnace/init.lua | 0 mods/rgt_machines/rgt_alloy_furnace/mod.conf | 2 + mods/rgt_machines/rgt_arc_furnace/init.lua | 18 +- mods/rgt_machines/rgt_arc_furnace/mod.conf | 2 +- mods/rgt_machines/rgt_casting_basin/init.lua | 167 +++++++++++++++++ mods/rgt_machines/rgt_casting_basin/mod.conf | 2 + .../textures/rgt_cast_gear.png | Bin 0 -> 167 bytes .../textures/rgt_cast_plate.png | Bin 0 -> 173 bytes .../textures/rgt_cast_rod.png | Bin 0 -> 107 bytes .../textures/rgt_casting_basin_front.png | Bin 0 -> 262 bytes .../rgt_casting_basin_front_active.png | Bin 0 -> 303 bytes mods/rgt_machines/rgt_furnace/init.lua | 2 +- mods/rgt_machines/rgt_furnace/mod.conf | 2 +- mods/rgt_machines/rgt_machines/cables.lua | 38 ++++ mods/rgt_machines/rgt_machines/fluids.lua | 74 ++++++++ mods/rgt_machines/rgt_machines/init.lua | 171 ++++++++++++++++++ mods/rgt_machines/rgt_machines/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 .../pipes.lua | 8 +- .../textures/rgt_cable_copper.png | Bin 0 -> 231 bytes .../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_machines/rgt_machines_core/fluids.lua | 11 -- mods/rgt_machines/rgt_machines_core/init.lua | 36 ---- mods/rgt_machines/rgt_machines_core/mod.conf | 2 - .../rgt_machines/rgt_steam_generator/init.lua | 132 ++++++++++++++ .../rgt_machines/rgt_steam_generator/mod.conf | 2 + .../textures/rgt_steam_generator_front.png | Bin 0 -> 351 bytes .../rgt_steam_generator_front_active.png | Bin 0 -> 395 bytes mods/rgt_materials/init.lua | 87 ++++++++- mods/rgt_materials/mod.conf | 2 +- .../textures/rgt_copper_block.png | Bin 0 -> 305 bytes .../textures/rgt_copper_ingot.png | Bin 0 -> 291 bytes .../textures/rgt_copper_lump.png | Bin 0 -> 373 bytes .../rgt_materials/textures/rgt_copper_ore.png | Bin 0 -> 686 bytes .../textures/rgt_gear_copper.png | Bin 0 -> 355 bytes mods/rgt_materials/textures/rgt_gear_gold.png | Bin 0 -> 364 bytes mods/rgt_materials/textures/rgt_gear_iron.png | Bin 0 -> 325 bytes .../rgt_materials/textures/rgt_iron_block.png | Bin 296 -> 298 bytes .../textures/rgt_plate_copper.png | Bin 0 -> 308 bytes .../rgt_materials/textures/rgt_plate_gold.png | Bin 0 -> 324 bytes .../rgt_materials/textures/rgt_plate_iron.png | Bin 0 -> 287 bytes .../rgt_materials/textures/rgt_rod_copper.png | Bin 0 -> 179 bytes mods/rgt_materials/textures/rgt_rod_gold.png | Bin 0 -> 146 bytes mods/rgt_materials/textures/rgt_rod_iron.png | Bin 0 -> 139 bytes mods/rgt_origins/mod.conf | 2 + mods/rgt_outback/mapgen.lua | 27 ++- mods/rgt_player/init.lua | 127 +++++++------ mods/rgt_player/textures/rgt_rmb.png | Bin 0 -> 143 bytes mods/rgt_player/textures/rgt_rmb_100.png | Bin 0 -> 190 bytes mods/rgt_player/textures/rgt_rmb_25.png | Bin 0 -> 175 bytes mods/rgt_player/textures/rgt_rmb_50.png | Bin 0 -> 191 bytes mods/rgt_player/textures/rgt_rmb_75.png | Bin 0 -> 191 bytes mods/rgt_tools/init.lua | 48 ++++- mods/rgt_tools/textures/rgt_axe_copper.png | Bin 0 -> 264 bytes mods/rgt_tools/textures/rgt_pick_copper.png | Bin 0 -> 305 bytes mods/rgt_tools/textures/rgt_shovel_copper.png | Bin 0 -> 269 bytes mods/rgt_tools/textures/rgt_sword_copper.png | Bin 0 -> 277 bytes mods/rgt_vehicles/modpack.conf | 0 mods/rgt_world/init.lua | 11 +- mods/rgt_world/variants.lua | 2 +- 69 files changed, 976 insertions(+), 135 deletions(-) create mode 100644 mods/rgt_achievements/init.lua create mode 100644 mods/rgt_achievements/mod.conf create mode 100644 mods/rgt_machines/rgt_alloy_furnace/init.lua create mode 100644 mods/rgt_machines/rgt_alloy_furnace/mod.conf create mode 100644 mods/rgt_machines/rgt_casting_basin/init.lua create mode 100644 mods/rgt_machines/rgt_casting_basin/mod.conf create mode 100644 mods/rgt_machines/rgt_casting_basin/textures/rgt_cast_gear.png create mode 100644 mods/rgt_machines/rgt_casting_basin/textures/rgt_cast_plate.png create mode 100644 mods/rgt_machines/rgt_casting_basin/textures/rgt_cast_rod.png create mode 100644 mods/rgt_machines/rgt_casting_basin/textures/rgt_casting_basin_front.png create mode 100644 mods/rgt_machines/rgt_casting_basin/textures/rgt_casting_basin_front_active.png create mode 100644 mods/rgt_machines/rgt_machines/cables.lua create mode 100644 mods/rgt_machines/rgt_machines/fluids.lua create mode 100644 mods/rgt_machines/rgt_machines/init.lua create mode 100644 mods/rgt_machines/rgt_machines/mod.conf rename mods/rgt_machines/{rgt_machines_core => rgt_machines}/models/rgt_pipe_straight.gltf (100%) rename mods/rgt_machines/{rgt_machines_core => rgt_machines}/models/rgt_pipe_straight_double_cap.gltf (100%) rename mods/rgt_machines/{rgt_machines_core => rgt_machines}/models/rgt_pipe_straight_single_cap.gltf (100%) rename mods/rgt_machines/{rgt_machines_core => rgt_machines}/pipes.lua (90%) create mode 100644 mods/rgt_machines/rgt_machines/textures/rgt_cable_copper.png rename mods/rgt_machines/{rgt_machines_core => rgt_machines}/textures/rgt_fluid_container_bg.png (100%) rename mods/rgt_machines/{rgt_machines_core => rgt_machines}/textures/rgt_fluid_container_bg_filled.png (100%) rename mods/rgt_machines/{rgt_machines_core => rgt_machines}/textures/rgt_pipe_straight.png (100%) rename mods/rgt_machines/{rgt_machines_core => rgt_machines}/textures/rgt_progress_bg.png (100%) rename mods/rgt_machines/{rgt_machines_core => rgt_machines}/textures/rgt_progress_bg_active.png (100%) delete mode 100644 mods/rgt_machines/rgt_machines_core/fluids.lua delete mode 100644 mods/rgt_machines/rgt_machines_core/init.lua delete mode 100644 mods/rgt_machines/rgt_machines_core/mod.conf create mode 100644 mods/rgt_machines/rgt_steam_generator/init.lua create mode 100644 mods/rgt_machines/rgt_steam_generator/mod.conf create mode 100644 mods/rgt_machines/rgt_steam_generator/textures/rgt_steam_generator_front.png create mode 100644 mods/rgt_machines/rgt_steam_generator/textures/rgt_steam_generator_front_active.png create mode 100644 mods/rgt_materials/textures/rgt_copper_block.png create mode 100644 mods/rgt_materials/textures/rgt_copper_ingot.png create mode 100644 mods/rgt_materials/textures/rgt_copper_lump.png create mode 100644 mods/rgt_materials/textures/rgt_copper_ore.png create mode 100644 mods/rgt_materials/textures/rgt_gear_copper.png create mode 100644 mods/rgt_materials/textures/rgt_gear_gold.png create mode 100644 mods/rgt_materials/textures/rgt_gear_iron.png create mode 100644 mods/rgt_materials/textures/rgt_plate_copper.png create mode 100644 mods/rgt_materials/textures/rgt_plate_gold.png create mode 100644 mods/rgt_materials/textures/rgt_plate_iron.png create mode 100644 mods/rgt_materials/textures/rgt_rod_copper.png create mode 100644 mods/rgt_materials/textures/rgt_rod_gold.png create mode 100644 mods/rgt_materials/textures/rgt_rod_iron.png create mode 100644 mods/rgt_origins/mod.conf create mode 100644 mods/rgt_player/textures/rgt_rmb.png create mode 100644 mods/rgt_player/textures/rgt_rmb_100.png create mode 100644 mods/rgt_player/textures/rgt_rmb_25.png create mode 100644 mods/rgt_player/textures/rgt_rmb_50.png create mode 100644 mods/rgt_player/textures/rgt_rmb_75.png create mode 100644 mods/rgt_tools/textures/rgt_axe_copper.png create mode 100644 mods/rgt_tools/textures/rgt_pick_copper.png create mode 100644 mods/rgt_tools/textures/rgt_shovel_copper.png create mode 100644 mods/rgt_tools/textures/rgt_sword_copper.png create mode 100644 mods/rgt_vehicles/modpack.conf diff --git a/mods/rgt_achievements/init.lua b/mods/rgt_achievements/init.lua new file mode 100644 index 0000000..01995c7 --- /dev/null +++ b/mods/rgt_achievements/init.lua @@ -0,0 +1,72 @@ +local ns = rgt + +local achievements = {} +ns.achievements = achievements +local root_achievements = {} + +function ns.register_achievement(def) + if not def.label then + def.label = def.name:gsub("_", " "):gsub("%s%a", function(a) return " "..string.upper(a) end) + end + if not def.depends then + table.insert(root_achievements, def.name) + def.depends = {} + end + achievements[def.name] = def +end + +minetest.register_on_mods_loaded(function() + table.sort(root_achievements) + for id, def in pairs(achievements) do + for _, dep in ipairs(def.depends) do + local d_def = achievements[dep] + if not d_def.children then d_def.children = {} end + if d_def then + table.insert(d_def.children, id) + else + minetest.log("error", "[rgt_achievements] Missing dependency '"..dep.."' for '"..id.."'") + end + end + end +end) + + + +function ns.show_achievements(name) + local fs = [[ + formspec_version[10] + size[12.5,10.5] + scroll_container[0.25,0.25;12,11;blah;horizontal;;] + scroll_container[0.25,0.25;12,10;blah2;vertical;;] + ]] + + for i, x in ipairs(root_achievements) do + fs = fs.."image[0,"..(i *0.5)..";0.25,0.25;rgt_stone.png]" + end + + fs = fs..[[ + scroll_container_end[] + scroll_container_end[] + scrollbaroptions[min=0;max=256] + scrollbar[0,0;-800,0;horizontal;blah;] + scrollbar[0,0;-800,0;vertical;blah2;] + ]] + + minetest.show_formspec(name, "achievements", fs) +end + + + +ns.register_achievement { + name = "survival", +} + +ns.register_achievement { + name = "machines", +} + +minetest.register_chatcommand("a", { + func = function(name) + ns.show_achievements(name) + end +}) diff --git a/mods/rgt_achievements/mod.conf b/mods/rgt_achievements/mod.conf new file mode 100644 index 0000000..6183d0c --- /dev/null +++ b/mods/rgt_achievements/mod.conf @@ -0,0 +1,2 @@ +name = rgt_achievements +depnds = rgt_ui, rgt_base \ No newline at end of file diff --git a/mods/rgt_base/init.lua b/mods/rgt_base/init.lua index ed3d265..1716096 100644 --- a/mods/rgt_base/init.lua +++ b/mods/rgt_base/init.lua @@ -36,8 +36,39 @@ function say(msg) minetest.chat_send_all("# Server: "..msg) end +EventTarget = { + init = function() + local e = { + listeners = {} + } + return setmetatable(e, {__index = EventTarget}) + end, + listen = function(e, channel, fn) + if not e.listeners[channel] then e.listeners[channel] = {} end + local l = e.listeners[channel] + l[#l +1] = fn + end, + unlisten = function(e, channel, fn) + if not e.listeners[channel] then return end + local l = e.listeners[channel] + local idx = table.indexof(l, fn) + if idx < 0 then return end + table.remove(l, idx) + end, + dispatch = function(e, channel, ...) + local l = e.listeners[channel] + if not l then return end + for i = 1, #l do + l[i](...) + end + end +} +setmetatable(EventTarget, { + __call = function(_, ...) return EventTarget.init(...) end +}) + rgt = { - horizontal_neighbor_offests = { + adjacent_neighbor_offests = { vector.new(0,0,1), vector.new(0,0,-1), vector.new(1,0,0), @@ -52,7 +83,9 @@ rgt = { vector.new(0,0,-1), vector.new(1,0,0), vector.new(-1,0,0), - } + }, + nodes_to_content_ids = {}, + content_ids_to_nodes = {} } local ns = rgt @@ -80,6 +113,9 @@ function ns.register_node(name, def) end end minetest.register_node(":"..name, def) + local cid = minetest.get_content_id(name) + ns.nodes_to_content_ids[name] = cid + ns.content_ids_to_nodes[cid] = name if alias then minetest.register_alias(alias, name) end @@ -111,6 +147,26 @@ function ns.register_tool(name, def) end end +function ns.register_entity(name, def) + minetest.register_entity(name, def) +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 = { + set = function(e, key, value) + return db:set_string(e._pos.."_"..key, value) + end, + get = function(e, key) + return db:get(e._pos.."_"..key) + end, +} +NodeMetaRef.__index = NodeMetaRef + +function ns.get_node_meta(pos) + return setmetatable({_pos = tostring(minetest.hash_node_position(pos))}, NodeMetaRef) +end + -- Allow nodes to provide a callback to run on activation without -- needing to register a bunch of mostly identical LBMs. minetest.register_lbm { diff --git a/mods/rgt_machines/rgt_alloy_furnace/init.lua b/mods/rgt_machines/rgt_alloy_furnace/init.lua new file mode 100644 index 0000000..e69de29 diff --git a/mods/rgt_machines/rgt_alloy_furnace/mod.conf b/mods/rgt_machines/rgt_alloy_furnace/mod.conf new file mode 100644 index 0000000..0d48230 --- /dev/null +++ b/mods/rgt_machines/rgt_alloy_furnace/mod.conf @@ -0,0 +1,2 @@ +name = rgt_alloy_furnace +depends = rgt_machines \ No newline at end of file diff --git a/mods/rgt_machines/rgt_arc_furnace/init.lua b/mods/rgt_machines/rgt_arc_furnace/init.lua index 7bcaa34..98a667c 100644 --- a/mods/rgt_machines/rgt_arc_furnace/init.lua +++ b/mods/rgt_machines/rgt_arc_furnace/init.lua @@ -5,8 +5,9 @@ local function can_work(node, m, inv) if input:get_count() > 0 then -- Would melting this item exceed our fluid capacity? local fluid = m:get_float "fluid" - local capacity = m:get_int "fluid_capacity" - if capacity -fluid >= 1 then + local fluid_type = m:get "fluid_type" + local capacity = m:get_float "fluid_capacity" + if capacity -fluid >= 1 and (fluid == 0 or input:get_definition().material == fluid_type) then return true end end @@ -16,7 +17,7 @@ end local function update_formspec(m, progress) progress = progress or m:get_int "progress" local fluid = m:get_float "fluid" - local capacity = m:get_int "fluid_capacity" + local capacity = m:get_float "fluid_capacity" local progressbar = progress == 0 and "rgt_progress_bg.png^[transformR270" or "rgt_progress_bg.png^[lowpart:"..progress..":rgt_progress_bg_active.png^[transformR270" local fluidcontainer = fluid == 0 and "rgt_fluid_container_bg.png" or "rgt_fluid_container_bg.png^[lowpart:"..(fluid /capacity *100)..":rgt_fluid_container_bg_filled.png" local fs = {"\ @@ -57,11 +58,14 @@ local function update(pos, elapsed) minetest.swap_node(pos, node) end - local progress = m:get_int("progress") +20 + local progress = m:get_int("progress") +50 if progress >= 100 then local fluid = m:get_float "fluid" fluid = fluid +1 + if fluid >= 2 then + fluid = fluid -rgt_machines.push_fluid(pos, m:get "fluid_type", fluid) + end m:set_float("fluid", fluid) -- Consume an item. @@ -69,6 +73,8 @@ local function update(pos, elapsed) s:take_item() inv:set_stack("input", 1, s) + m:set_string("fluid_type", s:get_definition().material) + progress = 0 end m:set_int("progress", progress) @@ -90,7 +96,7 @@ rgt_machines.register_machine("arc_furnace", { }, active = { tiles = {"rgt_iron_block.png", "rgt_iron_block.png", "rgt_iron_block.png", "rgt_iron_block.png", "rgt_iron_block.png", "rgt_arc_furnace_front_active.png"}, - drop = "arc_furnace_idle" + drop = "arc_furnace_idle", } }, paramtype2 = "4dir", @@ -100,7 +106,7 @@ rgt_machines.register_machine("arc_furnace", { local inv = m:get_inventory() inv:set_size("input", 1) - m:set_int("fluid_capacity", 10) + m:set_float("fluid_capacity", 10) m:set_string("active", "false") update_formspec(m) diff --git a/mods/rgt_machines/rgt_arc_furnace/mod.conf b/mods/rgt_machines/rgt_arc_furnace/mod.conf index 87ede06..3341e53 100644 --- a/mods/rgt_machines/rgt_arc_furnace/mod.conf +++ b/mods/rgt_machines/rgt_arc_furnace/mod.conf @@ -1,2 +1,2 @@ name = rgt_arc_furnace -depends = rgt_machines_core \ No newline at end of file +depends = rgt_machines \ No newline at end of file diff --git a/mods/rgt_machines/rgt_casting_basin/init.lua b/mods/rgt_machines/rgt_casting_basin/init.lua new file mode 100644 index 0000000..ab79be4 --- /dev/null +++ b/mods/rgt_machines/rgt_casting_basin/init.lua @@ -0,0 +1,167 @@ +local ns = rgt_machines + +ns.casting_recipes = { + { + name = "plate", + label = "Plate" + }, + { + name = "rod", + label = "Rod" + }, + { + name = "gear", + label = "Gear" + }, +} + +local function can_work(node, m, inv) + -- Do we have an input item? + local fluid = m:get_float "fluid" + if m:contains "recipe" and m:contains "fluid_type" and fluid > 0 and inv:get_stack("output", 1):get_free_space() > 0 then + return true + end + return false +end + +local function update_formspec(m, progress) + progress = progress or m:get_int "progress" + local fluid_type = m:get_string "fluid_type" + local fluid = m:get_float "fluid" + local capacity = m:get_int "fluid_capacity" + local progressbar = progress == 0 and "rgt_progress_bg.png^[transformR270" or "rgt_progress_bg.png^[lowpart:"..progress..":rgt_progress_bg_active.png^[transformR270" + local fluidcontainer = fluid == 0 and "rgt_fluid_container_bg.png" or "rgt_fluid_container_bg.png^[lowpart:"..(fluid /capacity *100)..":rgt_fluid_container_bg_filled.png" + local fs = {"\ + formspec_version[10]\ + size[12,12]\ + image[3.5,2;1,1;", progressbar, "]\ + image[2,1;1,3;", minetest.formspec_escape(fluidcontainer), "]\ + label[0.5,0.5;", fluid, " / ", capacity, "]\ + ", ui.list("context", "output", 5, 2, 1, 1), "\ + "} + fs[#fs +1] = ui.list("current_player", "main", 1.125, 6.5, 8, 4) + fs[#fs +1] = "\ + listring[]" + + local recipe = m:get "recipe" + + local x = 0 + local y = 0 + for _, r in ipairs(ns.casting_recipes) do + if r.name == recipe then + fs[#fs +1] = "style[select_recipe_"..r.name..";bgimg=rgt_other_button_bg.png]" + end + fs[#fs +1] = "image_button["..(x *1.1 +7)..","..(y +1.5)..";1,1;rgt_cast_"..r.name..".png;select_recipe_"..r.name..";]\ + tooltip[select_recipe_"..r.name..";"..(r.label or r.name).."]\ + " + x = x +1 + end + + m:set_string("formspec", table.concat(fs)) +end + +local function activate(pos, node, m) + m:set_string("active", "true") + node.name = "casting_basin_active" + minetest.swap_node(pos, node) +end + +local function deactivate(pos, node, m) + m:set_string("active", "false") + m:set_int("progress", 0) + update_formspec(m) + node.name = "casting_basin_idle" + minetest.swap_node(pos, node) +end + +local function update(pos, elapsed) + local node = minetest.get_node(pos) + local m = minetest.get_meta(pos) + local inv = m:get_inventory() + + local active = m:get_string("active") == "true" + + if can_work(node, m, inv) then + if not active then + active = true + activate(pos, node, m) + end + + local progress = m:get_int("progress") +20 + + if progress >= 100 then + local fluid = m:get_float "fluid" + fluid = fluid -1 + m:set_float("fluid", fluid) + + local s = inv:get_stack("output", 1) + if s and s:get_count() > 0 then + s:set_count(s:get_count() +1) + else + s = ItemStack(m:get_string("fluid_type").."_"..m:get_string("recipe")) + end + inv:set_stack("output", 1, s) + + progress = 0 + end + m:set_int("progress", progress) + + update_formspec(m, progress) + + elseif active then + active = false + deactivate(pos, node, m) + end + + return true +end + +rgt_machines.register_machine("casting_basin", { + states = { + idle = { + tiles = {"rgt_iron_block.png", "rgt_iron_block.png", "rgt_iron_block.png", "rgt_iron_block.png", "rgt_iron_block.png", "rgt_casting_basin_front.png"} + }, + active = { + tiles = {"rgt_iron_block.png", "rgt_iron_block.png", "rgt_iron_block.png", "rgt_iron_block.png", "rgt_iron_block.png", "rgt_casting_basin_front_active.png"}, + drop = "casting_basin_idle", + } + }, + paramtype2 = "4dir", + groups = {dig_immediate = 3, fluid_sink = 1}, + on_construct = function(pos) + local m = minetest.get_meta(pos) + local inv = m:get_inventory() + inv:set_size("output", 1) + + m:set_int("fluid_capacity", 10) + m:set_string("active", "false") + + update_formspec(m) + + minetest.get_node_timer(pos):start(1) + end, + on_destruct = function(pos) + local m = minetest.get_meta(pos) + local inv = m:get_inventory() + for i = 1, inv:get_size("input") do + local item = minetest.add_item(pos, inv:get_stack("input", i)) + if item then + item:set_velocity(vector.random_direction() *math.random(2, 3)) + end + end + end, + allow_metadata_inventory_put = function(pos, list, idx, s, p) + return 0 + end, + on_receive_fields = function(pos, form, data, p) + for k, v in pairs(data) do + if k:find "^select_recipe_" then + local m = minetest.get_meta(pos) + local recipe = k:match "^select_recipe_(.*)" + m:set_string("recipe", recipe) + update_formspec(m) + end + end + end, + on_timer = update +}) diff --git a/mods/rgt_machines/rgt_casting_basin/mod.conf b/mods/rgt_machines/rgt_casting_basin/mod.conf new file mode 100644 index 0000000..76d31fb --- /dev/null +++ b/mods/rgt_machines/rgt_casting_basin/mod.conf @@ -0,0 +1,2 @@ +name = rgt_casting_basin +depends = rgt_machines \ 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_casting_basin/textures/rgt_cast_gear.png new file mode 100644 index 0000000000000000000000000000000000000000..5aa5ff7546eac7c9082a3f24a03d5074f70bef3a GIT binary patch literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|5QlnhH;(=CBEH8+@6N#IY$#Ehty*oTbO3A5S>4 z)Q&YdK45if6S(9PtuL^c{V?khwN!}&NAr(II)!@-?DWh$e7WN2K+}r=?zvzA|ZCMvrmzOe$jRFshgct-a%4?=QoAUH<@RHfJ6W4_^@Sglt zyu5v00>ha}IzNh7XXf~dUOK=!Av;2SURFWU8pa2vA-&t2uAH087T0mc+U(M2jdTn3 VvTas!7l2kWc)I$ztaD0e0sy^OJahm6 literal 0 HcmV?d00001 diff --git a/mods/rgt_machines/rgt_casting_basin/textures/rgt_cast_rod.png b/mods/rgt_machines/rgt_casting_basin/textures/rgt_cast_rod.png new file mode 100644 index 0000000000000000000000000000000000000000..06e44631e27106827aa1f143429419a3a39810b4 GIT binary patch literal 107 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|R6SiBLo9le z6C^ki5)(h(KXmAk{moeuUk09CJgdDsjm^uLeJKOOqrZBti)MCB18QLKboFyt=akR{ E0LEh>VgLXD literal 0 HcmV?d00001 diff --git a/mods/rgt_machines/rgt_casting_basin/textures/rgt_casting_basin_front.png b/mods/rgt_machines/rgt_casting_basin/textures/rgt_casting_basin_front.png new file mode 100644 index 0000000000000000000000000000000000000000..c4d202e7576d2b7a405de341aebbda414750feb2 GIT binary patch literal 262 zcmV+h0r~!kP)Px#z)3_wR5*>5QaKL9AQ1B+8bVs~1s<7qrR5b!QCezJX6h{*jW!p`xm38fUvYF$?VA_Ac6IuX&87epk40Klk|T5GM9ry&I8lv0*u zQKqF65lJZln5OAugHy#AY1nd4f!m4MN4G{Tw#U^xjLNhL+qNADPq+%bwM01Qb^_CE z;4p*tUM;r${FhSS_W%rgUB#Yq+yBxq4DG9w-wE?PGl9lypF literal 0 HcmV?d00001 diff --git a/mods/rgt_machines/rgt_casting_basin/textures/rgt_casting_basin_front_active.png b/mods/rgt_machines/rgt_casting_basin/textures/rgt_casting_basin_front_active.png new file mode 100644 index 0000000000000000000000000000000000000000..a01da37a71ab1cd21c4723b985915774abc8a0c8 GIT binary patch literal 303 zcmV+~0nq-5P)Px#=}AOER5*>5kv(d}KnzA-j3JE2u-l9wjhii8rpp=9<~%-1%G@MJ2nJ(9n&}K< zNMnJ!6fz?FW0QQvpb`2sPnx^7ZTThV9Jl1X*B}R)rn$&&DaM#w_UlgrRaGs!rP_Wq^nDM!)Z 0 then + local m = minetest.get_meta(pos) + local fluid = m:get_float "fluid" + 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 ctx.type ~= fluid_type then + if not fluid_type or fluid == 0 then + m:set_string("fluid_type", ctx.type) + else + return + end + end + + -- Push as much fluid into the receiver's tank as we can, and decrement the amount awaiting transfer appropriately. + if space >= ctx.amount then + m:set_float("fluid", fluid +ctx.amount) + ctx.amount = 0 + else + m:set_float("fluid", fluid +space) + ctx.amount = ctx.amount -space + end + -- If the node is a pipe, continue pushing to its neighbors. + elseif minetest.get_item_group(node, "pipe") > 0 then + for _, x in ipairs(rgt.adjacent_neighbor_offests) do + -- If we've no fluid left to push, we can just stop. + if ctx.amount <= 0 then break end + + if not ctx.ignore[minetest.hash_node_position(pos +x)] then + push_fluid(pos +x, node, ctx) + end + end + end +end + +-- Pushes fluid from `pos` to any connected fluid network. +-- Returns the amount of fluid that was successfully pushed. +function ns.push_fluid(pos, type, amount) + -- Create a master storage table for this push request. + local ctx = { + ignore = {minetest.hash_node_position(pos)}, -- Nodes we have already checked. + type = type, -- The type of the fluid we are sending. + amount = amount -- How much fluid remains to be sent. + } + -- Recursively dispatch the request to all neighbors in sequence. + for _, x in ipairs(rgt.adjacent_neighbor_offests) do + if ctx.amount > 0 and not ctx.ignore[minetest.hash_node_position(pos +x)] then + push_fluid(pos +x, minetest.get_node(pos +x).name, ctx) + end + end + -- Return the amount we were able to transfer (amount requested minus amount left). + return amount -ctx.amount +end + +-- Pulls fluid into `pos` from any connected fluid network. +-- Returns false if no fluid could be pulled, and the amount pulled otherwise. +function ns.pull_fluid(pos) + +end + +function ns.register_fluid_tank(name, def) + rgt.register_node("fluid_tank_"..name, { + + }) +end diff --git a/mods/rgt_machines/rgt_machines/init.lua b/mods/rgt_machines/rgt_machines/init.lua new file mode 100644 index 0000000..ae11acc --- /dev/null +++ b/mods/rgt_machines/rgt_machines/init.lua @@ -0,0 +1,171 @@ +--[[ + 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/mod.conf b/mods/rgt_machines/rgt_machines/mod.conf new file mode 100644 index 0000000..a6bd1e8 --- /dev/null +++ b/mods/rgt_machines/rgt_machines/mod.conf @@ -0,0 +1,2 @@ +name = rgt_machines +depends = rgt_world, rgt_player \ No newline at end of file diff --git a/mods/rgt_machines/rgt_machines_core/models/rgt_pipe_straight.gltf b/mods/rgt_machines/rgt_machines/models/rgt_pipe_straight.gltf similarity index 100% rename from mods/rgt_machines/rgt_machines_core/models/rgt_pipe_straight.gltf rename to mods/rgt_machines/rgt_machines/models/rgt_pipe_straight.gltf diff --git a/mods/rgt_machines/rgt_machines_core/models/rgt_pipe_straight_double_cap.gltf b/mods/rgt_machines/rgt_machines/models/rgt_pipe_straight_double_cap.gltf similarity index 100% rename from mods/rgt_machines/rgt_machines_core/models/rgt_pipe_straight_double_cap.gltf rename to mods/rgt_machines/rgt_machines/models/rgt_pipe_straight_double_cap.gltf diff --git a/mods/rgt_machines/rgt_machines_core/models/rgt_pipe_straight_single_cap.gltf b/mods/rgt_machines/rgt_machines/models/rgt_pipe_straight_single_cap.gltf similarity index 100% rename from mods/rgt_machines/rgt_machines_core/models/rgt_pipe_straight_single_cap.gltf rename to mods/rgt_machines/rgt_machines/models/rgt_pipe_straight_single_cap.gltf diff --git a/mods/rgt_machines/rgt_machines_core/pipes.lua b/mods/rgt_machines/rgt_machines/pipes.lua similarity index 90% rename from mods/rgt_machines/rgt_machines_core/pipes.lua rename to mods/rgt_machines/rgt_machines/pipes.lua index 8e03a08..e446e50 100644 --- a/mods/rgt_machines/rgt_machines_core/pipes.lua +++ b/mods/rgt_machines/rgt_machines/pipes.lua @@ -6,7 +6,7 @@ local function update_pipe(pos, leaf) local dir local pipe - for _, offset in ipairs(rgt.adjacent_horizontal_neighbor_offests) do + for _, offset in ipairs(rgt.adjacent_neighbor_offests) do pipe = minetest.get_node(pos +offset) if minetest.get_item_group(pipe.name, "pipe_straight") > 0 then neighbors[#neighbors +1] = offset @@ -48,7 +48,7 @@ rgt.register_node("pipe_straight", { update_pipe(pos) end, after_destruct = function(pos) - for _, offset in ipairs(rgt.adjacent_horizontal_neighbor_offests) do + for _, offset in ipairs(rgt.adjacent_neighbor_offests) do pipe = minetest.get_node(pos +offset) if minetest.get_item_group(pipe.name, "pipe_straight") > 0 then update_pipe(pos +offset, true) @@ -70,7 +70,7 @@ rgt.register_node("pipe_straight_single_cap", { update_pipe(pos) end, after_destruct = function(pos) - for _, offset in ipairs(rgt.adjacent_horizontal_neighbor_offests) do + for _, offset in ipairs(rgt.adjacent_neighbor_offests) do pipe = minetest.get_node(pos +offset) if minetest.get_item_group(pipe.name, "pipe_straight") > 0 then update_pipe(pos +offset, true) @@ -92,7 +92,7 @@ rgt.register_node("pipe_straight_double_cap", { update_pipe(pos) end, after_destruct = function(pos) - for _, offset in ipairs(rgt.adjacent_horizontal_neighbor_offests) do + for _, offset in ipairs(rgt.adjacent_neighbor_offests) do pipe = minetest.get_node(pos +offset) if minetest.get_item_group(pipe.name, "pipe_straight") > 0 then update_pipe(pos +offset, true) diff --git a/mods/rgt_machines/rgt_machines/textures/rgt_cable_copper.png b/mods/rgt_machines/rgt_machines/textures/rgt_cable_copper.png new file mode 100644 index 0000000000000000000000000000000000000000..b8e00bdf47e830d20f1bf9a262a6498726243f93 GIT binary patch literal 231 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|7J9lkhFJ6_ z-XP*fn(4NW@kRO84?;S1&d>r%O$%^b10K!W@dK2 z@FzIpY2<{tZ9Ef>Zd}>e8Tf{^i#OqjIQI#L=`!3pt1d8BnbiI4GhmqMTWR9ORh&?& zb|y{Y!9y1d>7(2RzArxR(YyG@{>)07IXV$fS3Y7rb(q0+S3<+|ZdSQlH?ABw@?jbC ct|x8`IbVWPbkFaN1Ui<%)78&qol`;+0J`f}YXATM literal 0 HcmV?d00001 diff --git a/mods/rgt_machines/rgt_machines_core/textures/rgt_fluid_container_bg.png b/mods/rgt_machines/rgt_machines/textures/rgt_fluid_container_bg.png similarity index 100% rename from mods/rgt_machines/rgt_machines_core/textures/rgt_fluid_container_bg.png rename to mods/rgt_machines/rgt_machines/textures/rgt_fluid_container_bg.png diff --git a/mods/rgt_machines/rgt_machines_core/textures/rgt_fluid_container_bg_filled.png b/mods/rgt_machines/rgt_machines/textures/rgt_fluid_container_bg_filled.png similarity index 100% rename from mods/rgt_machines/rgt_machines_core/textures/rgt_fluid_container_bg_filled.png rename to mods/rgt_machines/rgt_machines/textures/rgt_fluid_container_bg_filled.png diff --git a/mods/rgt_machines/rgt_machines_core/textures/rgt_pipe_straight.png b/mods/rgt_machines/rgt_machines/textures/rgt_pipe_straight.png similarity index 100% rename from mods/rgt_machines/rgt_machines_core/textures/rgt_pipe_straight.png rename to mods/rgt_machines/rgt_machines/textures/rgt_pipe_straight.png diff --git a/mods/rgt_machines/rgt_machines_core/textures/rgt_progress_bg.png b/mods/rgt_machines/rgt_machines/textures/rgt_progress_bg.png similarity index 100% rename from mods/rgt_machines/rgt_machines_core/textures/rgt_progress_bg.png rename to mods/rgt_machines/rgt_machines/textures/rgt_progress_bg.png diff --git a/mods/rgt_machines/rgt_machines_core/textures/rgt_progress_bg_active.png b/mods/rgt_machines/rgt_machines/textures/rgt_progress_bg_active.png similarity index 100% rename from mods/rgt_machines/rgt_machines_core/textures/rgt_progress_bg_active.png rename to mods/rgt_machines/rgt_machines/textures/rgt_progress_bg_active.png diff --git a/mods/rgt_machines/rgt_machines_core/fluids.lua b/mods/rgt_machines/rgt_machines_core/fluids.lua deleted file mode 100644 index 4a4a108..0000000 --- a/mods/rgt_machines/rgt_machines_core/fluids.lua +++ /dev/null @@ -1,11 +0,0 @@ -local ns = rgt_machines - -function ns.create_fluid_tank(m) - -end - -function ns.make_fluid_display(x, y, fliud, max, amount) - local fs = {} - - return table.concat(fs) -end diff --git a/mods/rgt_machines/rgt_machines_core/init.lua b/mods/rgt_machines/rgt_machines_core/init.lua deleted file mode 100644 index a7ca56c..0000000 --- a/mods/rgt_machines/rgt_machines_core/init.lua +++ /dev/null @@ -1,36 +0,0 @@ ---[[ - List of machines: - - Arc furnace: Melts materials into their liquid form ---]] - - -rgt_machines = { - registered_machines = {} -} -local ns = rgt_machines - --- 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.rgt_machine = 1 - def.groups.run_on_activate = 1 - def.groups[name] = 1 - 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 - -include "fluids.lua" - -include "pipes.lua" diff --git a/mods/rgt_machines/rgt_machines_core/mod.conf b/mods/rgt_machines/rgt_machines_core/mod.conf deleted file mode 100644 index 50eaa76..0000000 --- a/mods/rgt_machines/rgt_machines_core/mod.conf +++ /dev/null @@ -1,2 +0,0 @@ -name = rgt_machines_core -depends = rgt_world, rgt_player \ No newline at end of file diff --git a/mods/rgt_machines/rgt_steam_generator/init.lua b/mods/rgt_machines/rgt_steam_generator/init.lua new file mode 100644 index 0000000..e1b06fa --- /dev/null +++ b/mods/rgt_machines/rgt_steam_generator/init.lua @@ -0,0 +1,132 @@ + +local function can_work(node, m, inv) + -- Do we have an input item? + local input = inv:get_stack("input", 1) + if input:get_count() > 0 then + return true + end + return false +end + +local function update_formspec(m, progress) + progress = progress or m:get_int "progress" + local fluid = m:get_float "fluid" + local capacity = m:get_int "fluid_capacity" + local progressbar = progress == 0 and "rgt_progress_bg.png^[transformR270" or "rgt_progress_bg.png^[lowpart:"..progress..":rgt_progress_bg_active.png^[transformR270" + local fluidcontainer = fluid == 0 and "rgt_fluid_container_bg.png" or "rgt_fluid_container_bg.png^[lowpart:"..(fluid /capacity *100)..":rgt_fluid_container_bg_filled.png" + local fs = {"\ + formspec_version[10]\ + size[12,12]\ + ", ui.list("context", "input", 2, 2, 1, 1), "\ + image[4,2;1,1;", progressbar, "]\ + image[7,1;1,3;", minetest.formspec_escape(fluidcontainer), "]\ + label[0.5,0.5;", fluid, " / ", capacity, "]\ + "} + fs[#fs +1] = ui.list("current_player", "main", 1.125, 6.5, 8, 4) + fs[#fs +1] = "\ + listring[]" + + m:set_string("formspec", table.concat(fs)) +end + +local function activate(pos, node, m) + m:set_string("active", "true") + node.name = "steam_generator_active" + minetest.swap_node(pos, node) +end + +local function deactivate(pos, node, m) + m:set_string("active", "false") + m:set_int("progress", 0) + update_formspec(m) + node.name = "steam_generator_idle" + minetest.swap_node(pos, node) +end + +local function update(pos, elapsed) + local node = minetest.get_node(pos) + local m = minetest.get_meta(pos) + local inv = m:get_inventory() + + local active = m:get_string("active") == "true" + + if can_work(node, m, inv) then + if not active then + active = true + activate(pos, node, m) + end + + local progress = m:get_int("progress") +20 + + if progress >= 100 then + local fluid = m:get_float "fluid" + fluid = fluid +1 + m:set_float("fluid", fluid) + + -- Consume an item. + local s = inv:get_stack("input", 1) + s:take_item() + inv:set_stack("input", 1, s) + + progress = 0 + end + m:set_int("progress", progress) + + update_formspec(m, progress) + + elseif active then + active = false + deactivate(pos, node, m) + end + + return true +end + +rgt_machines.register_machine("steam_generator", { + states = { + idle = { + tiles = {"rgt_iron_block.png", "rgt_iron_block.png", "rgt_iron_block.png", "rgt_iron_block.png", "rgt_iron_block.png", "rgt_steam_generator_front.png"} + }, + active = { + tiles = {"rgt_iron_block.png", "rgt_iron_block.png", "rgt_iron_block.png", "rgt_iron_block.png", "rgt_iron_block.png", "rgt_steam_generator_front_active.png"}, + drop = "steam_generator_idle", + } + }, + paramtype2 = "4dir", + groups = {dig_immediate = 3}, + on_construct = function(pos) + local m = minetest.get_meta(pos) + local inv = m:get_inventory() + inv:set_size("input", 1) + + m:set_int("fluid_capacity", 10) + m:set_string("active", "false") + + update_formspec(m) + + minetest.get_node_timer(pos):start(1) + end, + on_destruct = function(pos) + local m = minetest.get_meta(pos) + local inv = m:get_inventory() + for i = 1, inv:get_size("input") do + local item = minetest.add_item(pos, inv:get_stack("input", i)) + if item then + item:set_velocity(vector.random_direction() *math.random(2, 3)) + end + end + end, + allow_metadata_inventory_put = function(pos, list, idx, s, p) + local inv = minetest.get_meta(pos):get_inventory() + local meltable = minetest.registered_items[s:get_name()].groups.arc_furnace_meltable + if meltable then + if inv:room_for_item("input", s) then + return s:get_count() + elseif inv:room_for_item("input", s:take_item()) then + return s:get_stack_max() -inv:get_stack("input", 1):get_count() + end + end + return 0 + end, + on_timer = update +}) diff --git a/mods/rgt_machines/rgt_steam_generator/mod.conf b/mods/rgt_machines/rgt_steam_generator/mod.conf new file mode 100644 index 0000000..7907304 --- /dev/null +++ b/mods/rgt_machines/rgt_steam_generator/mod.conf @@ -0,0 +1,2 @@ +name = rgt_steam_generator +depends = rgt_machines \ 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_steam_generator/textures/rgt_steam_generator_front.png new file mode 100644 index 0000000000000000000000000000000000000000..e334e8f119f1918a5a2a0342e1aefb2f6d6b0174 GIT binary patch literal 351 zcmV-l0igbgP)Px$8A(JzR5*=&kv)!tFbstaq6taI&lOOvF)gCy4)k=il#!?qHHY9PND*yH6v~8l z3M23C4D2f+%lV#TJ3-fV@Joy_xD)3bg9reMqWH)@$rux1bQ}i&c<%uqj$`jVod|gE zvn&IEkUFu}T5B&C^A4AhLw;at%z-5@G>4QU21_8!cNMqe{ z^f?IptkpSJmZiTF08~{){)oz)=lOcQmSt(021{_xl~Q$GV=ROKfM6H~DdoQJ=tPtP x+$Nqvh;?1B7xFyE0L%QN2mrL!PuJf+^9FI4l+T^WDoy|Z002ovPDHLkV1o7?livUU literal 0 HcmV?d00001 diff --git a/mods/rgt_machines/rgt_steam_generator/textures/rgt_steam_generator_front_active.png b/mods/rgt_machines/rgt_steam_generator/textures/rgt_steam_generator_front_active.png new file mode 100644 index 0000000000000000000000000000000000000000..12f40f3247b12c877ca3f1bad4762bc46323440a GIT binary patch literal 395 zcmV;60d)R}P)Px$MM*?KR5*=&lCev}KorKmmVjI?Lx)R1gf1OQ7CZZoRPYZFvS$lU7I8Spm^mP> zPFY=@+zO#Xm)i_i=yDed4h}C~HKsno@$vHeF5lhDD9bYZD8?9uigQlF12CV@d)-r| zl=4XJb~^ypS^&Q9TWj4)fVDOZLjYr!L~E_JrfwL9&ZCstY&On0c1ajxLI^1(=iC@W zp0X^35OgrYMyu5-j$>ntwf6k=VKDmVb#9D_qNuKG&qXA9G5zS#li6YacJqGqe2fI3 zEXzUKm6Y9;=KQrosqle?;_k|d!~aL%Qa%jJ@E5Ci~5d7j5{+%ye233Y;oMQacQ>-D<( pLKHu1_AeV0jpXXy literal 0 HcmV?d00001 diff --git a/mods/rgt_materials/init.lua b/mods/rgt_materials/init.lua index 2980366..fde694f 100644 --- a/mods/rgt_materials/init.lua +++ b/mods/rgt_materials/init.lua @@ -54,17 +54,20 @@ minetest.register_ore { rgt.register_item("iron_ingot", { inventory_image = "rgt_iron_ingot.png", - groups = {arc_furnace_meltable = 1} + groups = {arc_furnace_meltable = 1}, + material = "iron", }) rgt.register_item("iron_lump", { inventory_image = "rgt_iron_lump.png", - groups = {furnace_smeltable = 1} + groups = {furnace_smeltable = 1}, + material = "iron", }) rgt.register_node("iron_block", { tiles = {"rgt_iron_block.png"}, - groups = {stone = 1} + groups = {stone = 1}, + material = "iron", }) rgt.register_node("iron_ore", { @@ -92,6 +95,72 @@ minetest.register_ore { }, } +rgt.register_item("iron_plate", { + inventory_image = "rgt_plate_iron.png", + material = "iron", +}) + +rgt.register_item("iron_rod", { + inventory_image = "rgt_rod_iron.png", + material = "iron", +}) + +rgt.register_item("iron_gear", { + inventory_image = "rgt_gear_iron.png", + material = "iron", +}) + +-- MARK: Copper + +rgt.register_item("copper_ingot", { + inventory_image = "rgt_copper_ingot.png", +}) + +rgt.register_item("copper_lump", { + inventory_image = "rgt_copper_lump.png", +}) + +rgt.register_node("copper_block", { + tiles = {"rgt_copper_block.png"}, + groups = {stone = 1} +}) + +rgt.register_node("copper_ore", { + tiles = {"rgt_stone.png^rgt_copper_ore.png"}, + drop = "copper_lump", + groups = {stone = 1} +}) + +minetest.register_ore { + ore_type = "scatter", + ore = "copper_ore", + wherein = "stone", + + clust_scarcity = 4 * 4 * 4, + clust_num_ores = 8, + clust_size = 3, + + noise_params = { + offset = 0, + scale = 1, + spread = {x = 100, y = 100, z = 100}, + seed = 9942, + octaves = 3, + persistence = 0.7 + }, +} + +rgt.register_item("copper_plate", { + inventory_image = "rgt_plate_copper.png" +}) + +rgt.register_item("gold_rod", { + inventory_image = "rgt_rod_copper.png" +}) + +rgt.register_item("gold_gear", { + inventory_image = "rgt_gear_copper.png" +}) -- MARK: - Gold @@ -132,3 +201,15 @@ minetest.register_ore { persistence = 0.7 }, } + +rgt.register_item("gold_plate", { + inventory_image = "rgt_plate_gold.png" +}) + +rgt.register_item("gold_rod", { + inventory_image = "rgt_rod_gold.png" +}) + +rgt.register_item("gold_gear", { + inventory_image = "rgt_gear_gold.png" +}) diff --git a/mods/rgt_materials/mod.conf b/mods/rgt_materials/mod.conf index 8920d9f..1376ea0 100644 --- a/mods/rgt_materials/mod.conf +++ b/mods/rgt_materials/mod.conf @@ -1,2 +1,2 @@ name = rgt_materials -depends = rgt_world \ No newline at end of file +depends = rgt_world, rgt_casting_basin \ No newline at end of file diff --git a/mods/rgt_materials/textures/rgt_copper_block.png b/mods/rgt_materials/textures/rgt_copper_block.png new file mode 100644 index 0000000000000000000000000000000000000000..45d22e1f98eb25acc9308a48d07c1c5c33b9f043 GIT binary patch literal 305 zcmV-10nYx3P)Px#>q$gGR5*=wl09z2FbsuXB(-5AIB0x;?3r?u9I$uG)*qllI}r+C0U4f6Gp@sd zphSM=BdyK*x8=kErf)B!-2q;)XQ0ZJAEiHC3SBuaG***LRzdmCC zv|7o`j}O3W-;W(-_wsgNY=O4~;N$xBPx#-AP12R5*>zkuh$AFcgNrO7`M`B?FQ#5Hb4-IRO)g=y7rgR`y7ozy~NB5{reh zFn9rpF0loHrl?Ev7F+N4_dUyo|E`ZChpv~?9QL2L`-*uf2w;|F04Sxf)~-amf+eVw z+T=-+P}lYL21mfNC1p6G2EL7(Dyw&ej*CSaYRZPMc(_(!~hoMSA2W{(6%jF>y>D4;t~uM8)b2x p0kqagDe>OF1UG_b(Qn}U)Hj`mXCTu1a$^7h002ovPDHLkV1gG?cO?J- literal 0 HcmV?d00001 diff --git a/mods/rgt_materials/textures/rgt_copper_lump.png b/mods/rgt_materials/textures/rgt_copper_lump.png new file mode 100644 index 0000000000000000000000000000000000000000..42454ffaa315f85541dc6b4fd875239c76d7e49e GIT binary patch literal 373 zcmV-*0gC>KP)Px$FG)l}R5*>rlEF&DKoEw%)F4SpH4%-if<;K`sUY-b@d11hkA0XPeG$Q{^dy3q zLk|f^y=b>3(H2_JLp`*+gl>b!&ShtJ_WzjqcVXLMtRGz8-Ylx4l$uEC_F|*c4i~c4 z?Zw)CV_kgpGb6~p0Eosjnum_6N8_0WF^a@>-`3h4h`9zS$)q|;HL+uvIF?D`d4(RB zGO39aR_zYN9DwQhG1l%5(VokzU8W^s4PfMrQ=nDI`JXRC8s8HtZ$r%sQ?_3d=~A#} z8bIqMrtaG~XBGPIQ+)&_Ud^9)9zm8Vhy-mi*356DSkBxiPiQh!fK9KUl1@8Z$S!^_ zP5=n9jDeW*P_mRah5tZ8^5y{~o=f8HbNbZ(|0m`_AN~OVpGV8}@$P=(-R;L8b(M)6 TUNJ|y00000NkvXXu0mjf?BAxM literal 0 HcmV?d00001 diff --git a/mods/rgt_materials/textures/rgt_copper_ore.png b/mods/rgt_materials/textures/rgt_copper_ore.png new file mode 100644 index 0000000000000000000000000000000000000000..da80b5237841b44bf0e6b33d6e7b66d7f5a1c8a6 GIT binary patch literal 686 zcmV;f0#W^mP)Px%Xh}ptR5*=gl21<>Q540`@MZ?*0Sf6b5dTeE(3D_wVMv>%ja`_=wXXaE`Vsm; zy6LvvbmOMq!X_?kw8Rt}OR7KtbzuJS-s3S{OhZh1S2y>Z&HbID92^|rzX^gsN*V8& zOa_4Kx`Yr)sTu?U0M2#bRqNG_*;GwaUgpOeQSaB&Y#OHPx>8DIe}5kUFZkJ% zI%&-bAplTHA41bK&2bz6lgUISga9atB{&EWaL%QaVHi%`hG77BzTE2=ck=<+d>G@&Me7+E~QinA)e;}c*}p-mXV#ezG+F@ zH=I`Yi@urhHAefKbH*3|UDwqZ_Rdu^b~~-^slIutTbibcAP_>Rs=DQ#UFPQc3+AMi zQv3aWE|)(x^Y!#BhCsS>*XhIt<8 literal 0 HcmV?d00001 diff --git a/mods/rgt_materials/textures/rgt_gear_copper.png b/mods/rgt_materials/textures/rgt_gear_copper.png new file mode 100644 index 0000000000000000000000000000000000000000..a1adcefed78d8304f6e690a2326808b148961e98 GIT binary patch literal 355 zcmV-p0i6DcP)Px$9Z5t%R5*>5lfh1dKoms}Vjy8*%tYhHgjJ)iXm|cazoK8&ujpU6YgwUj1-nK= zj3l&>P+ZhEnSny}?YQ&qn|t47V5FAws9nyZcC5#dMgbP9SYv_j0#H_sg`2&X@-cgU zJl+Z|K;XMP%q9T5t=~0K`qnS60O$eTL1xLIK?@>H$cO!I%r@~R)s}h+gk0x&kLW4Y z!!PJ8%p@mSL6Q|cJn&t;6GzD6^RVAh=Q&AMSeuWgp>=z@Eh($!sGuwVKV@Y;dAiq9 zJ*9{@DFD$lv@FQ&i&gAcDRdh>rF#BlH-jmdji-_rv~Y9f0dRZmj}kt&V1usjQHR&RhAUAisx*{R2Lw*K;*e*i9ttNc#vEcyTd002ovPDHLkV1j$U Bo|ymu literal 0 HcmV?d00001 diff --git a/mods/rgt_materials/textures/rgt_gear_gold.png b/mods/rgt_materials/textures/rgt_gear_gold.png new file mode 100644 index 0000000000000000000000000000000000000000..32849c4812abf3c1d8729cf353229c215649bcd1 GIT binary patch literal 364 zcmV-y0h9iTP)Px$CP_p=R5*>5lR-+uP!NW{G&NAA8Th|d{-560N1yYpg*Ul-1VAMyCelL^Ra%hNM4TmyI@?UgiLzAc zK*Y=WrX=(Nr-U~s3``eCVM-LHCEWFGH4{t3;xkJYEaw}dFf}IM?X`{Suki<~c)RPM z*#3XQ*!jiPp=#9&9H!$0fNrmCSdi-d;mk6&P$YVRQ}Qpfsoa82+_#BJ3n!-s0JM%8 zwSx8ACjc+cnfWWP-+vzXUe&SRG&~Eghe{xXeMeJuOuxoo&iM;hq^eZ?$124D0000< KMNUMnLSTZ~d!I1? literal 0 HcmV?d00001 diff --git a/mods/rgt_materials/textures/rgt_gear_iron.png b/mods/rgt_materials/textures/rgt_gear_iron.png new file mode 100644 index 0000000000000000000000000000000000000000..20b8308761df0bb8f5814b3621701d6c81df1a96 GIT binary patch literal 325 zcmV-L0lNN)P)Px#|4BqaR5*>5lf7|(Fbsu1a;a$XxnlqZp!5LDMD3Xvz$Fv7rt?APgOU`9e3-u^ zs_^4ISx>UyCHlVK`@Y}bIE4@eu+}C_DFwhh&l!H?e#)WiI{DlIlv1>93&1#zNhrKw z7yw8KZW5)CM2{AvG!e%b-)!TYOO`Gbh&Y6B5o)b3_y?zk9mU>zy!RJeDV2Ish**5a z7zrWZz0W#tjLB|amW6qqzbiPG|DVWa-ZV`rRcnoN4gh0JW=!o5-?nY&BF2bck#lA;09cmgcKQ?|GB7*O6M&fkNGX|_uN0VBtrb9UC#|*C z8c%Dj&WOly98Lyz5@Rf-sA|qxRh=oNa4^aOH!QGC&#<(vt9p+S+#(IIjjEa%NpJB1 z_=sMkB~_)sli+uexmof%e^`2AdOtD7H^BMaNzeHD@mW<>M5rU&>-bymmagk^rdNvy z^Kl#j3_MLK@kLSEGxI$6bHCrxG)+v{=ARefijgmUL0LqAns)A`Hz6jQ$ zIFLOKYwaarM_p}v2l&G< z5K*+P;YR`LIny-xzVE*@jw2kD`D2lYwr%qv)V8s7gg3N2v1a(IjFkWY002ovPDHLk FV1kp7a>xJx diff --git a/mods/rgt_materials/textures/rgt_plate_copper.png b/mods/rgt_materials/textures/rgt_plate_copper.png new file mode 100644 index 0000000000000000000000000000000000000000..dbc8f148343eebc55c47c14c182e0e385b7af4dc GIT binary patch literal 308 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|-g&w>hFJ9O zo#e>fZXL6_EzMy=km*S21{+O(j& zP~v&*?=r~;?wJe*a^K`P9qg!2wW%uSaSvXrA-%Ovb)Ti0)tf@w%7i0X0e#Nk>FVdQ&MBb@ E00FvoQ~&?~ literal 0 HcmV?d00001 diff --git a/mods/rgt_materials/textures/rgt_plate_gold.png b/mods/rgt_materials/textures/rgt_plate_gold.png new file mode 100644 index 0000000000000000000000000000000000000000..8926c0cb5fb94340c09f239132ad724660fda509 GIT binary patch literal 324 zcmV-K0lWT*P)Px#{z*hZR5*>jlCf&SU=)SFXb=)h7ZsEa1<_qcmp(&Z!bj;#^hF8 zGMnoY0NmYow27wUj|`W4gUR!&YLr49G6t4yP8{}0000Px#*-1n}R5*>jlCcegFcd^D5sgJ_@Dh|>g2C8|M=U?9TqP&<*AN9er8)HByNu=YKWShQ->G7BN6`gjkE|FVB3UMx1K;$xW0!hgA= zRE|OQ;P0|cYudAgTe~DWM4fVGurq literal 0 HcmV?d00001 diff --git a/mods/rgt_materials/textures/rgt_rod_gold.png b/mods/rgt_materials/textures/rgt_rod_gold.png new file mode 100644 index 0000000000000000000000000000000000000000..153ac58df0e6d5ca809791424d70fd21eba45d81 GIT binary patch literal 146 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|d^}woLo9le z6C^k`)J}W#|Lx|G|HcMDFmZ8YSZnjclZWp=xmlAs|K0zaSGoSXoAzhP#mtJ70D^fo qf6jh*@-V;c$~E>LmD_%r3=DoP$wr6m&o2d<%i!ti=d#Wzp$Py~S2iC2 literal 0 HcmV?d00001 diff --git a/mods/rgt_materials/textures/rgt_rod_iron.png b/mods/rgt_materials/textures/rgt_rod_iron.png new file mode 100644 index 0000000000000000000000000000000000000000..7aab115d3c41ac692006ff50a84f9be9bc25e010 GIT binary patch literal 139 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|Ts>VJLo9mV zp4}*Vz<}dOz|q?V%BH5TFKj;d)*-DUSf%yqfAt@W&dfO@)3CMqERSdP^Hoyi^PBnq liN`TadXcB}sH&#^Ht&;zImZ^g+Y2(C!PC{xWt~$(69DN~G 1100000 then - m.interaction_marker:remove() - minetest.registered_nodes[minetest.get_node(m.interacting_with).name].on_interact(m.interacting_with, m) - elseif time -m.interaction_start > 1000000 then - m.interaction_marker:set_properties { - textures = {"rgt_interact_progress_100.png"} - } - elseif time -m.interaction_start > 750000 then - m.interaction_marker:set_properties { - textures = {"rgt_interact_progress_75.png"} - } - elseif time -m.interaction_start > 500000 then - m.interaction_marker:set_properties { - textures = {"rgt_interact_progress_50.png"} - } - elseif time -m.interaction_start > 250000 then - m.interaction_marker:set_properties { - textures = {"rgt_interact_progress_25.png"} - } + local duration = (m.pointed_obj._interact_time or 1) *1000000 + local progress = (time -m.interaction_start) /duration + if progress > 1.1 then + m.pointed_obj:on_interact(m) + m.interaction_start = nil + m.object:hud_remove(m.interaction_marker) + m.interaction_marker = nil + elseif progress > 1 then + m.object:hud_change(m.interaction_marker, "text", "rgt_rmb_100.png") + elseif progress > 0.75 then + m.object:hud_change(m.interaction_marker, "text", "rgt_rmb_75.png") + elseif progress > 0.5 then + m.object:hud_change(m.interaction_marker, "text", "rgt_rmb_50.png") + elseif progress > 0.25 then + m.object:hud_change(m.interaction_marker, "text", "rgt_rmb_25.png") end end - elseif m.interacting_with and not m.ctl.place then - m.interacting_with = nil + elseif not ctl.place and m.interaction_start and (not m.pointed_obj or not m.pointed_obj._no_interact or m.pointed_obj._can_interact and m.pointed_obj:_can_interact(m)) then m.interaction_start = nil - m.interaction_marker:remove() - m.interaction_marker = nil + if m.interaction_marker then + m.object:hud_change(m.interaction_marker, "text", "rgt_rmb.png") + end end + m.pos = pos + -- Run on_wield callbacks local w = p:get_wielded_item() local wname = w:get_name() @@ -397,6 +414,8 @@ Player = { local while_wielded = def and def.while_wielded if while_wielded then while_wielded(m, w) end + + m:dispatch("tick") end, set_hotbar_size = function(m, slots) local p = m.object @@ -409,13 +428,15 @@ Player = { p:hud_set_hotbar_selected_image("rgt_hotbar_selected.png") end, deinit = function(m) + m:dispatch("deinit") m.health_display:remove() m.wielditem_display:remove() rgt.players[m.name] = nil end } setmetatable(Player, { - __call = function(_, ...) return Player.new(...) end + __call = function(_, ...) return Player.new(...) end, + __index = EventTarget }) diff --git a/mods/rgt_player/textures/rgt_rmb.png b/mods/rgt_player/textures/rgt_rmb.png new file mode 100644 index 0000000000000000000000000000000000000000..1ffe2287f15b659244b0a7fc76d85b18655624f1 GIT binary patch literal 143 zcmeAS@N?(olHy`uVBq!ia0vp^f*{Pn1|+R>-G2co#^NA%Cx&(BWL^R}o}Mm_Ar`%F zCm3=aaNs#SrS5+JIo-Qi&iqDGillrOITlp--e>U0@|>HuUZtQ~DDtG9@+84iy(>8# pLT&5zT~2XHnk}$vhn#&1V|kqPV~4NC^MHmjc)I$ztaD0e0ss=1EwTUr literal 0 HcmV?d00001 diff --git a/mods/rgt_player/textures/rgt_rmb_100.png b/mods/rgt_player/textures/rgt_rmb_100.png new file mode 100644 index 0000000000000000000000000000000000000000..af7d003e8c58b0043586ddaf73f42e791b9090dc GIT binary patch literal 190 zcmeAS@N?(olHy`uVBq!ia0vp^f*{Pn1|+R>-G2co#^NA%Cx&(BWL^R}6`n4RAr`%7 zgHQ7{DDY&9|F4se)lcduE{ifTU-T#V4(8GcMSsi}_afbeUak`J1kGvHoh;hWV)>tm-G2co#^NA%Cx&(BWL^R}nVv3=Ar`$? zCwcQVDDb!}KXUv0!q;v-hQR?T3-j4C<1hC+K6od0KP^pb-KMXT-WP>+GzF$=Rw^?z zT#{%$z|YXIWU^1RuIUG@fP*tvtT?}1XQIj8^GfCyC$D;2o37@q^0IW*&NDHe`EN3A XX)%BD?>eJ2&{76ZS3j3^P6-G2co#^NA%Cx&(BWL^R}m7Xq+Ar`%7 zr+D)nP~dQ3fArSU1L>s(!CtY6*BXMc67B2(H-%@lS9 zhFKkq50*0=ICJOBsj#im?-|n8Ih<-*{flK%RsHH?P0AX(_x?ZQQeA0X>^XIVxp3&Q p_YD(w1{sCxo?TE<{MFu);c2G(`}YZ|2Z4@Y@O1TaS?83{1OV!SNw)w1 literal 0 HcmV?d00001 diff --git a/mods/rgt_player/textures/rgt_rmb_75.png b/mods/rgt_player/textures/rgt_rmb_75.png new file mode 100644 index 0000000000000000000000000000000000000000..565e1a6358f8e4b07cf7f8ae0ed9247422ca6281 GIT binary patch literal 191 zcmeAS@N?(olHy`uVBq!ia0vp^f*{Pn1|+R>-G2co#^NA%Cx&(BWL^R}m7Xq+Ar`%7 zCwmJu7;rcrV^liTJ#fZ4?C!cS=vg&}; p>I2{IC)%y#(SE8h>&D(k%movIKS(VOcmi|;gQu&X%Q~loCIGk2O)>xg literal 0 HcmV?d00001 diff --git a/mods/rgt_tools/init.lua b/mods/rgt_tools/init.lua index 96e26c3..089b192 100644 --- a/mods/rgt_tools/init.lua +++ b/mods/rgt_tools/init.lua @@ -18,6 +18,8 @@ --]] +-- MARK: Iron + rgt.register_tool("iron_sword", { inventory_image = "rgt_sword_iron.png", _wield_scale = 0.4, @@ -58,7 +60,7 @@ minetest.register_chatcommand("iron", { end }) - +-- MARK: Gold rgt.register_tool("gold_sword", { inventory_image = "rgt_sword_gold.png", @@ -99,4 +101,46 @@ minetest.register_chatcommand("gold", { inv:add_item("main", ItemStack("gold_"..x)) end end -}) \ No newline at end of file +}) + +-- MARK: Copper + +rgt.register_tool("copper_sword", { + inventory_image = "rgt_sword_copper.png", + _wield_scale = 0.4, + _wield_pos = vector.new(0, 0, 1) +}) + +rgt.register_tool("copper_pick", { + inventory_image = "rgt_pick_copper.png", + _wield_scale = 0.4, + _wield_pos = vector.new(0, 0, 1), + tool_capabilities = { + full_punch_interval = 0.9, + max_drop_level = 0, + groupcaps = { + stone = {times = {1, 2, 3}, uses = 100} + } + } +}) + +rgt.register_tool("copper_axe", { + inventory_image = "rgt_axe_copper.png", + _wield_scale = 0.4, + _wield_pos = vector.new(0, 0, 1), +}) + +rgt.register_tool("copper_shovel", { + inventory_image = "rgt_shovel_copper.png", + _wield_scale = 0.4, + _wield_pos = vector.new(0, 0, 1) +}) + +minetest.register_chatcommand("copper", { + func = function(name) + local inv = rgt.players[name].object:get_inventory() + for _, x in ipairs {"lump", "ingot", "block", "sword", "pick", "axe", "shovel"} do + inv:add_item("main", ItemStack("copper_"..x)) + end + end +}) diff --git a/mods/rgt_tools/textures/rgt_axe_copper.png b/mods/rgt_tools/textures/rgt_axe_copper.png new file mode 100644 index 0000000000000000000000000000000000000000..8ed4299028a6a206c119f8d122814c81f626781b GIT binary patch literal 264 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|4tcsbhFJ6_ zCnzv{S`+&JdF1MU$5qd}cx>*UX3z}8ex??@Gv2QMf8X7EMq_wKKL|5U*N!O2oF@J_ z<$>s<=I);voW?Q#KmW65W@bM8ZgRdv=O-qs3n_vrKYslbPZVF0x90>$F(*)x`H*S8 zWMAy>BOPm|3C?Cbao}pqllmDgCS3gTe~ HDWM4f=9y`Y literal 0 HcmV?d00001 diff --git a/mods/rgt_tools/textures/rgt_pick_copper.png b/mods/rgt_tools/textures/rgt_pick_copper.png new file mode 100644 index 0000000000000000000000000000000000000000..4247685dfac13bdbc3339a239d910e51d6143b34 GIT binary patch literal 305 zcmV-10nYx3P)Px#>q$gGR5*>Tkg1sj`K zScqt&m<iLNQ+)V%EV z#~W5R2Y}K1Bw_{847)Wyr{-~g&H$K}&B8e_wa)Je!lLc*g03l;mMz!$dIxS+i@s^u z=$ZmRr%{skN)$A!MPDssSvUt;#!Q57k|+q^-QJTs2e(KR#K8b9VH24Mq_wKe#EG3D zXL)#dG;;Q^C0y>|i})bP@b!7UylzOe{r=xBbGRjdVBP=9^9J7^I`2?R`EP6h1dlJj z$Vqm_WdT-X$>Q11S O7(8A5T-G@yGywpRNpSW6 literal 0 HcmV?d00001 diff --git a/mods/rgt_tools/textures/rgt_sword_copper.png b/mods/rgt_tools/textures/rgt_sword_copper.png new file mode 100644 index 0000000000000000000000000000000000000000..4c01e3daadcba627c8cfbbb8ee8592fbe4e787c0 GIT binary patch literal 277 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|&U?BzhFJ8j zooLH-$U%fH{V0c$nn06TS8prJMWYFJTbF;}h&ysEn4|0(*EFRY5m}PVYDW%FT3*N*Z&yC YH6O}nNUeK%5$H7rPgg&ebxsLQ0IP>_#sB~S literal 0 HcmV?d00001 diff --git a/mods/rgt_vehicles/modpack.conf b/mods/rgt_vehicles/modpack.conf new file mode 100644 index 0000000..e69de29 diff --git a/mods/rgt_world/init.lua b/mods/rgt_world/init.lua index cb1d533..78a3f19 100644 --- a/mods/rgt_world/init.lua +++ b/mods/rgt_world/init.lua @@ -83,7 +83,8 @@ rgt.register_node("sand", { rgt.register_node("oak_log", { tiles = {"rgt_oak_log_top.png", "rgt_oak_log_top.png", "rgt_oak_log_side.png"}, - groups = {dig_immediate = 3} + groups = {dig_immediate = 3}, + paramtype2 = "facedir" }) rgt.register_node("oak_leaves", { @@ -233,7 +234,8 @@ minetest.register_alias("mapgen_river_water_source", "red_glazed_terracotta:rive rgt.register_node("light", { tiles = {"[fill:1x1:0,0:#fed"}, light_source = 14, - paramtype = "light" + paramtype = "light", + description = "Test" }) minetest.register_ore { @@ -246,7 +248,6 @@ minetest.register_ore { } - --minetest.register_decoration { -- deco_type = "schematic", -- place_on = "dirt_grass", @@ -271,7 +272,7 @@ minetest.register_biome{ depth_riverbed = 3, node_dungeon = "cobble", - node_dungeon_alt = "stone", + node_dungeon_alt = "stone_brick_large", y_max = 3000, @@ -295,7 +296,7 @@ minetest.register_biome{ depth_riverbed = 3, node_dungeon = "cobble", - node_dungeon_alt = "stone", + node_dungeon_alt = "stone_brick_large", y_max = 1, diff --git a/mods/rgt_world/variants.lua b/mods/rgt_world/variants.lua index 1e1f7ac..75895b8 100644 --- a/mods/rgt_world/variants.lua +++ b/mods/rgt_world/variants.lua @@ -33,7 +33,7 @@ function ns.update_stair(pos, basename, leaf) node.param2 = minetest.dir_to_facedir(-neighbors[1]:rotate(vector.new(0, math.pi /2, 0))) minetest.swap_node(pos, node) elseif #neighbors > 1 then - -- Just ue the first two neighbors. + -- Just use the first two neighbors. if neighbors[1].x ~= 0 and neighbors[2].x ~= 0 or neighbors[1].z ~= 0 and neighbors[2].z ~= 0 then node.name = basename.."_stair" node.param2 = minetest.dir_to_facedir(neighbors[1])