diff --git a/.gitmodules b/.gitmodules index 44491b2..d808915 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,4 @@ -[submodule "mods/sfinv"] - path = mods/sfinv - url = https://github.com/rubenwardy/sfinv -[submodule "mods/cg_plus"] - path = mods/cg_plus - url = https://github.com/random-geek/cg_plus + +[submodule "mods/unified_inventory"] + path = mods/unified_inventory + url = https://github.com/minetest-mods/unified_inventory diff --git a/mods/cg_plus b/mods/cg_plus deleted file mode 160000 index 6511eb8..0000000 --- a/mods/cg_plus +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6511eb8261cb1c292228e76c0906b642e26f2a16 diff --git a/mods/pyutest_core/blocks.lua b/mods/pyutest_core/blocks.lua index 01ef793..72f0627 100644 --- a/mods/pyutest_core/blocks.lua +++ b/mods/pyutest_core/blocks.lua @@ -462,9 +462,9 @@ PyuTestCore.make_node("pyutest_core:crate", "crate", "Crate", { on_rightclick = function (pos, node, clicker) local spos = string.format("%d,%d,%d", pos.x, pos.y, pos.z) local formspec = - "size[8,8]" .. + "size[8,9]" .. "list[nodemeta:"..spos..";main;0,0;8,4;]" .. - "list[current_player;main;0,5;8,3;]" .. + "list[current_player;main;0,5;8,4;]" .. "listring[nodemeta:"..spos..";main]" .. "listring[current_player;main]" minetest.show_formspec(clicker:get_player_name(), string.format("pyutest_core:crate_%d_%d_%d", pos.x, pos.y, pos.z), formspec) diff --git a/mods/pyutest_core/crafts.lua b/mods/pyutest_core/crafts.lua index 6ae5149..f1c1548 100644 --- a/mods/pyutest_core/crafts.lua +++ b/mods/pyutest_core/crafts.lua @@ -7,7 +7,7 @@ minetest.register_craft({ }) minetest.register_craft({ - output = "pyutest_core:pickaxe 1", + output = "pyutest_core:wooden_pickaxe 1", recipe = { {"pyutest_core:wooden_block", "pyutest_core:wooden_block", "pyutest_core:wooden_block"}, {"", "pyutest_core:stick", ""}, diff --git a/mods/pyutest_core/electricity.lua b/mods/pyutest_core/electricity.lua index 5b6ba23..4f29e93 100644 --- a/mods/pyutest_core/electricity.lua +++ b/mods/pyutest_core/electricity.lua @@ -83,7 +83,7 @@ minetest.register_craft({ type = "shapeless" }) -PyuTestCore.make_device = function (ns, sname, desc, color, action, setup, extra_conf) +PyuTestCore.make_device = function (ns, sname, desc, color, craftitem, action, setup, extra_conf) PyuTestCore.make_node(ns..":"..sname.."_device", sname.."_device", desc, { block = PyuTestCore.BLOCK_BREAKABLE_NORMAL }, {"device.png"}, PyuTestCore.util.tableconcat({ @@ -106,14 +106,23 @@ PyuTestCore.make_device = function (ns, sname, desc, color, action, setup, extra timer:start(PyuTestCore.ELECTRICITY_UPDATE_TIME) end }, extra_conf or {})) + + minetest.register_craft({ + output = ns..":"..sname.."_device 4", + recipe = { + {"pyutest_core:copper_ingot", "pyutest_core:copper_ingot", "pyutest_core:copper_ingot"}, + {"pyutest_core:copper_ingot", craftitem, "pyutest_core:copper_ingot"}, + {"pyutest_core:copper_ingot", "pyutest_core:copper_ingot", "pyutest_core:copper_ingot"} + } + }) end -PyuTestCore.make_device("pyutest_core", "time", "Time Device", "orange", function (e) +PyuTestCore.make_device("pyutest_core", "time", "Time Device", "orange", "pyutest_core:light", function (e) if not e then return end minetest.chat_send_all(string.format("Time: " .. os.date("%I:%M:%S", os.time()))) end) -PyuTestCore.make_device("pyutest_core", "block_setter", "Block Setter Device", "blue", function (e, pos) +PyuTestCore.make_device("pyutest_core", "block_setter", "Block Setter Device", "blue", "pyutest_core:stone_block", function (e, pos) if not e then return end local blocks = {} for k, _ in pairs(minetest.registered_nodes) do diff --git a/mods/pyutest_core/mobs.lua b/mods/pyutest_core/mobs.lua index dfa7a0c..161e25f 100644 --- a/mods/pyutest_core/mobs.lua +++ b/mods/pyutest_core/mobs.lua @@ -1,4 +1,11 @@ -local Dummy = { +PyuTestCore.make_entity = function(name, def, setup) + local ndef = def + setup(ndef) + minetest.register_entity(name, ndef) +end + + +PyuTestCore.make_entity("pyutest_core:dummy", { initial_properties = { hp_max = 20, physical = true, @@ -6,17 +13,15 @@ local Dummy = { collide_with_objects = false, textures = {"player.png", "player_back.png"}, visual_size = {x = 1, y = 2}, - nametag = "Dummy\nThis is not a human", + nametag = "Dummy", automatic_rotate = 15, } -} +}, function (def) + function def:on_rightclick(clicker) + self.object:set_velocity({x = 0, y = 10, z = 0}) + end -function Dummy:on_rightclick(clicker) - self.object:set_velocity({x = 0, y = 10, z = 0}) -end - -function Dummy:on_step(dtime) - self.object:add_velocity({x = 0, y = -1 * dtime, z = 0}) -end - -minetest.register_entity("pyutest_core:dummy", Dummy) + function def:on_step(dtime) + self.object:add_velocity({x = 0, y = -1 * dtime, z = 0}) + end +end) diff --git a/mods/pyutest_core/textures/diamond-pickaxe.png b/mods/pyutest_core/textures/diamond-pickaxe.png index 6393351..7da873b 100644 Binary files a/mods/pyutest_core/textures/diamond-pickaxe.png and b/mods/pyutest_core/textures/diamond-pickaxe.png differ diff --git a/mods/pyutest_core/textures/wooden-pickaxe.png b/mods/pyutest_core/textures/wooden-pickaxe.png index bd9c1fc..a3101d4 100644 Binary files a/mods/pyutest_core/textures/wooden-pickaxe.png and b/mods/pyutest_core/textures/wooden-pickaxe.png differ diff --git a/mods/pyutest_core/tools.lua b/mods/pyutest_core/tools.lua index 53118f1..6b8c9ee 100644 --- a/mods/pyutest_core/tools.lua +++ b/mods/pyutest_core/tools.lua @@ -58,10 +58,10 @@ PyuTestCore.make_tool("pyutest_core:wooden_pickaxe", "wooden_pickaxe", "Wooden P [PyuTestCore.BLOCK_BREAKABLE_CHOPPY] = 1.2, [PyuTestCore.BLOCK_BREAKABLE_MIDDLE] = 2, }, - uses = 100, + uses = 200, } }, - punch_attack_uses = 50, + punch_attack_uses = 100, damage_groups = {fleshy = 2} } }) @@ -79,10 +79,10 @@ PyuTestCore.make_tool("pyutest_core:iron_pickaxe", "iron_pickaxe", "Iron Pickaxe [PyuTestCore.BLOCK_BREAKABLE_LONG] = 2, [PyuTestCore.BLOCK_BREAKABLE_FOREVER] = 4 }, - uses = 400, + uses = 750, } }, - punch_attack_uses = 200, + punch_attack_uses = 375, damage_groups = {fleshy = 4} } }) @@ -100,10 +100,10 @@ PyuTestCore.make_tool("pyutest_core:diamond_pickaxe", "diamond_pickaxe", "Diamon [PyuTestCore.BLOCK_BREAKABLE_LONG] = 0.85, [PyuTestCore.BLOCK_BREAKABLE_FOREVER] = 1.7 }, - uses = 600, + uses = 1200, } }, - punch_attack_uses = 300, + punch_attack_uses = 600, damage_groups = {fleshy = 4} } }) diff --git a/mods/sfinv b/mods/sfinv deleted file mode 160000 index dbe59fd..0000000 --- a/mods/sfinv +++ /dev/null @@ -1 +0,0 @@ -Subproject commit dbe59fd71b45542fe086bb18dfc0421aa323ca05 diff --git a/mods/unified_inventory b/mods/unified_inventory new file mode 160000 index 0000000..2c9449b --- /dev/null +++ b/mods/unified_inventory @@ -0,0 +1 @@ +Subproject commit 2c9449b6e796c5a4bcf832b10595c5a78e237dc6