Ores, tools, and wielditems

This commit is contained in:
Signal 2025-10-09 12:26:03 -04:00
parent 889aa531ba
commit 9e63d7fe3a
31 changed files with 268 additions and 12 deletions

83
mods/rgt_tools/init.lua Normal file
View file

@ -0,0 +1,83 @@
rgt.register_tool("iron_sword", {
inventory_image = "rgt_sword_iron.png",
_wield_scale = 0.4,
_wield_pos = vector.new(0, 0, 1)
})
rgt.register_tool("iron_pick", {
inventory_image = "rgt_pick_iron.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("iron_axe", {
inventory_image = "rgt_axe_iron.png",
_wield_scale = 0.4,
_wield_pos = vector.new(0, 0, 1),
})
rgt.register_tool("iron_shovel", {
inventory_image = "rgt_shovel_iron.png",
_wield_scale = 0.4,
_wield_pos = vector.new(0, 0, 1)
})
minetest.register_chatcommand("iron", {
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("iron_"..x))
end
end
})
rgt.register_tool("gold_sword", {
inventory_image = "rgt_sword_gold.png",
_wield_scale = 0.4,
_wield_pos = vector.new(0, 0, 1)
})
rgt.register_tool("gold_pick", {
inventory_image = "rgt_pick_gold.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("gold_axe", {
inventory_image = "rgt_axe_gold.png",
_wield_scale = 0.4,
_wield_pos = vector.new(0, 0, 1),
})
rgt.register_tool("gold_shovel", {
inventory_image = "rgt_shovel_gold.png",
_wield_scale = 0.4,
_wield_pos = vector.new(0, 0, 1)
})
minetest.register_chatcommand("gold", {
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("gold_"..x))
end
end
})

2
mods/rgt_tools/mod.conf Normal file
View file

@ -0,0 +1,2 @@
name = rgt_tools
depends = rgt_materials

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 B