switch bronze and steel tool_capabilities
This commit is contained in:
parent
955ea4a520
commit
98fe1ad4bc
@ -13,6 +13,7 @@ This mod exists to add a little progression to the game so that steel isn't so e
|
||||
- Iron blocks and stairs can rust when near water, cook in furnace to remove rust
|
||||
- A bucket of water surrounded by Iron Blocks returns 8x Rusted Iron Blocks
|
||||
- Added Iron tools which is better than stone but worse than steel
|
||||
- Switched Bronze and Steel tool strength since steel is stronger in real life
|
||||
|
||||
Lucky Blocks: 8
|
||||
|
||||
@ -21,3 +22,4 @@ Changelog:
|
||||
- 0.1 - Initial Upload
|
||||
- 0.2 - Added Iron Pickaxe
|
||||
- 0.3 - Add Iron Axe, Shovel, Sword, Hoe and more lucky blocks
|
||||
- 0.4 - Switch Bronze and Steel tool capabilities (Steel is stronger irl)
|
||||
|
194
init.lua
194
init.lua
@ -120,24 +120,9 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
-- Change Xpanes Bar Recipe
|
||||
if minetest.get_modpath("xpanes") then
|
||||
|
||||
minetest.clear_craft({
|
||||
output = "xpanes:bar_flat"
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "xpanes:bar_flat",
|
||||
recipe = {
|
||||
{"pigiron:iron_ingot", "pigiron:iron_ingot", "pigiron:iron_ingot"},
|
||||
{"pigiron:iron_ingot", "pigiron:iron_ingot", "pigiron:iron_ingot"}
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
-- Additional Recipe if Ethereal Found
|
||||
if minetest.get_modpath("stairs") then
|
||||
|
||||
if minetest.get_modpath("ethereal") then
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pigiron:iron_charcoal_mix",
|
||||
@ -158,131 +143,6 @@ minetest.register_craft({
|
||||
cooktime = 10
|
||||
})
|
||||
|
||||
-- Iron Pickaxe
|
||||
|
||||
minetest.register_tool("pigiron:pick_iron", {
|
||||
description = "Iron Pickaxe",
|
||||
inventory_image = "pigiron_iron_pick.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.2,
|
||||
max_drop_level = 1,
|
||||
groupcaps = {
|
||||
cracky = {
|
||||
times = {[1] = 2.5, [2] = 1.40, [3] = 0.95},
|
||||
uses = 20, maxlevel = 2
|
||||
},
|
||||
},
|
||||
damage_groups = {fleshy = 3},
|
||||
},
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pigiron:pick_iron",
|
||||
recipe = {
|
||||
{"pigiron:iron_ingot", "pigiron:iron_ingot", "pigiron:iron_ingot"},
|
||||
{"", "group:stick", ""},
|
||||
{"", "group:stick", ""},
|
||||
}
|
||||
})
|
||||
|
||||
-- Iron Shovel
|
||||
|
||||
minetest.register_tool("pigiron:shovel_iron", {
|
||||
description = "Iron Shovel",
|
||||
inventory_image = "pigiron_iron_shovel.png",
|
||||
wield_image = "pigiron_iron_shovel.png^[transformR90",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.3,
|
||||
max_drop_level = 1,
|
||||
groupcaps = {
|
||||
crumbly = {
|
||||
times = {[1] = 1.70, [2] = 1.0, [3] = 0.45},
|
||||
uses = 25, maxlevel = 1
|
||||
},
|
||||
},
|
||||
damage_groups = {fleshy = 2},
|
||||
},
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pigiron:shovel_iron",
|
||||
recipe = {
|
||||
{"pigiron:iron_ingot"},
|
||||
{"group:stick"},
|
||||
{"group:stick"},
|
||||
}
|
||||
})
|
||||
|
||||
-- Iron Axe
|
||||
|
||||
minetest.register_tool("pigiron:axe_iron", {
|
||||
description = "Iron Axe",
|
||||
inventory_image = "pigiron_iron_axe.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.1,
|
||||
max_drop_level = 1,
|
||||
groupcaps = {
|
||||
choppy = {
|
||||
times = {[1] = 2.70, [2] = 1.70, [3] = 1.15},
|
||||
uses = 20, maxlevel = 1
|
||||
},
|
||||
},
|
||||
damage_groups = {fleshy = 3},
|
||||
},
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pigiron:axe_iron",
|
||||
recipe = {
|
||||
{"pigiron:iron_ingot", "pigiron:iron_ingot"},
|
||||
{"pigiron:iron_ingot", "group:stick"},
|
||||
{"", "group:stick"},
|
||||
}
|
||||
})
|
||||
|
||||
-- Iron Sword
|
||||
|
||||
minetest.register_tool("pigiron:sword_iron", {
|
||||
description = "Iron Sword",
|
||||
inventory_image = "pigiron_iron_sword.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level = 1,
|
||||
groupcaps = {
|
||||
snappy = {
|
||||
times = {[1] = 2.0, [2] = 1.30, [3] = 0.38},
|
||||
uses = 25, maxlevel = 1
|
||||
},
|
||||
},
|
||||
damage_groups = {fleshy = 5},
|
||||
},
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pigiron:sword_iron",
|
||||
recipe = {
|
||||
{"pigiron:iron_ingot"},
|
||||
{"pigiron:iron_ingot"},
|
||||
{"group:stick"},
|
||||
}
|
||||
})
|
||||
|
||||
-- Iron Hoe
|
||||
|
||||
if minetest.get_modpath("farming") then
|
||||
|
||||
farming.register_hoe(":farming:hoe_iron", {
|
||||
description = "Iron Hoe",
|
||||
inventory_image = "pigiron_iron_hoe.png",
|
||||
max_uses = 150,
|
||||
material = "pigiron:iron_ingot"
|
||||
})
|
||||
end
|
||||
|
||||
-- Abm to turn Iron Block into Rusted Iron Block
|
||||
|
||||
minetest.register_abm({
|
||||
@ -311,6 +171,31 @@ minetest.register_abm({
|
||||
end
|
||||
})
|
||||
|
||||
-- Add Tools and Lucky Blocks
|
||||
|
||||
local path = minetest.get_modpath("pigiron")
|
||||
|
||||
dofile(path .. "/tools.lua")
|
||||
dofile(path .. "/lucky_block.lua")
|
||||
|
||||
-- Change Xpanes Iron Bar Recipe to use Iron Ingots
|
||||
|
||||
if minetest.get_modpath("xpanes")
|
||||
and minetest.registered_nodes["xpanes:bar_flat"] then
|
||||
|
||||
minetest.clear_craft({
|
||||
output = "xpanes:bar_flat"
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "xpanes:bar_flat",
|
||||
recipe = {
|
||||
{"pigiron:iron_ingot", "pigiron:iron_ingot", "pigiron:iron_ingot"},
|
||||
{"pigiron:iron_ingot", "pigiron:iron_ingot", "pigiron:iron_ingot"}
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
-- Register Stairs
|
||||
|
||||
if minetest.get_modpath("stairs") then
|
||||
@ -345,27 +230,4 @@ if minetest.get_modpath("stairs") then
|
||||
})
|
||||
end
|
||||
|
||||
-- Add Lucky Blocks
|
||||
|
||||
if minetest.get_modpath("lucky_block") then
|
||||
|
||||
lucky_block:add_blocks({
|
||||
{"dro", {"pigiron:iron_ingots"}, 10},
|
||||
{"nod", "pigiron:iron_block", 0},
|
||||
{"nod", "pigiron:rusted_iron_block", 0},
|
||||
{"tro", "pigiron:iron_block", nil, true},
|
||||
{"dro", {"pigiron:charcoal_lump"}, 10},
|
||||
{"dro", {"pigiron:sword_iron", "pigiron:axe_iron",
|
||||
"pigiron:pickaxe_iron", "pigiron:shovel_iron"}, 1},
|
||||
{"fal", {"pigiron:iron_block", "pigiron:rusted_iron_block",
|
||||
"pigiron:iron_block", "pigiron:rusted_iron_block",
|
||||
"pigiron:iron_block", "pigiron:rusted_iron_block"}},
|
||||
})
|
||||
|
||||
if minetest.get_modpath("farming") then
|
||||
|
||||
lucky_block:add_blocks({
|
||||
{"dro", {"pigiron:hoe_iron"}, 1},
|
||||
})
|
||||
end
|
||||
end
|
||||
print("[MOD] Pig Iron loaded")
|
||||
|
25
lucky_block.lua
Normal file
25
lucky_block.lua
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
-- Add Lucky Blocks if mod found
|
||||
|
||||
if minetest.get_modpath("lucky_block") then
|
||||
|
||||
lucky_block:add_blocks({
|
||||
{"dro", {"pigiron:iron_ingots"}, 10},
|
||||
{"nod", "pigiron:iron_block", 0},
|
||||
{"nod", "pigiron:rusted_iron_block", 0},
|
||||
{"tro", "pigiron:iron_block", nil, true},
|
||||
{"dro", {"pigiron:charcoal_lump"}, 10},
|
||||
{"dro", {"pigiron:sword_iron", "pigiron:axe_iron",
|
||||
"pigiron:pickaxe_iron", "pigiron:shovel_iron"}, 1},
|
||||
{"fal", {"pigiron:iron_block", "pigiron:rusted_iron_block",
|
||||
"pigiron:iron_block", "pigiron:rusted_iron_block",
|
||||
"pigiron:iron_block", "pigiron:rusted_iron_block"}},
|
||||
})
|
||||
|
||||
if minetest.get_modpath("farming") then
|
||||
|
||||
lucky_block:add_blocks({
|
||||
{"dro", {"pigiron:hoe_iron"}, 1},
|
||||
})
|
||||
end
|
||||
end
|
240
tools.lua
Normal file
240
tools.lua
Normal file
@ -0,0 +1,240 @@
|
||||
|
||||
-- Iron Pickaxe
|
||||
|
||||
minetest.register_tool("pigiron:pick_iron", {
|
||||
description = "Iron Pickaxe",
|
||||
inventory_image = "pigiron_iron_pick.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.2,
|
||||
max_drop_level = 1,
|
||||
groupcaps = {
|
||||
cracky = {
|
||||
times = {[1] = 2.5, [2] = 1.40, [3] = 0.95},
|
||||
uses = 20, maxlevel = 2
|
||||
},
|
||||
},
|
||||
damage_groups = {fleshy = 3},
|
||||
},
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pigiron:pick_iron",
|
||||
recipe = {
|
||||
{"pigiron:iron_ingot", "pigiron:iron_ingot", "pigiron:iron_ingot"},
|
||||
{"", "group:stick", ""},
|
||||
{"", "group:stick", ""},
|
||||
}
|
||||
})
|
||||
|
||||
-- Iron Shovel
|
||||
|
||||
minetest.register_tool("pigiron:shovel_iron", {
|
||||
description = "Iron Shovel",
|
||||
inventory_image = "pigiron_iron_shovel.png",
|
||||
wield_image = "pigiron_iron_shovel.png^[transformR90",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.3,
|
||||
max_drop_level = 1,
|
||||
groupcaps = {
|
||||
crumbly = {
|
||||
times = {[1] = 1.70, [2] = 1.0, [3] = 0.45},
|
||||
uses = 25, maxlevel = 1
|
||||
},
|
||||
},
|
||||
damage_groups = {fleshy = 2},
|
||||
},
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pigiron:shovel_iron",
|
||||
recipe = {
|
||||
{"pigiron:iron_ingot"},
|
||||
{"group:stick"},
|
||||
{"group:stick"},
|
||||
}
|
||||
})
|
||||
|
||||
-- Iron Axe
|
||||
|
||||
minetest.register_tool("pigiron:axe_iron", {
|
||||
description = "Iron Axe",
|
||||
inventory_image = "pigiron_iron_axe.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.1,
|
||||
max_drop_level = 1,
|
||||
groupcaps = {
|
||||
choppy = {
|
||||
times = {[1] = 2.70, [2] = 1.70, [3] = 1.15},
|
||||
uses = 20, maxlevel = 1
|
||||
},
|
||||
},
|
||||
damage_groups = {fleshy = 3},
|
||||
},
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pigiron:axe_iron",
|
||||
recipe = {
|
||||
{"pigiron:iron_ingot", "pigiron:iron_ingot"},
|
||||
{"pigiron:iron_ingot", "group:stick"},
|
||||
{"", "group:stick"},
|
||||
}
|
||||
})
|
||||
|
||||
-- Iron Sword
|
||||
|
||||
minetest.register_tool("pigiron:sword_iron", {
|
||||
description = "Iron Sword",
|
||||
inventory_image = "pigiron_iron_sword.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level = 1,
|
||||
groupcaps = {
|
||||
snappy = {
|
||||
times = {[1] = 2.0, [2] = 1.30, [3] = 0.38},
|
||||
uses = 25, maxlevel = 1
|
||||
},
|
||||
},
|
||||
damage_groups = {fleshy = 5},
|
||||
},
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pigiron:sword_iron",
|
||||
recipe = {
|
||||
{"pigiron:iron_ingot"},
|
||||
{"pigiron:iron_ingot"},
|
||||
{"group:stick"},
|
||||
}
|
||||
})
|
||||
|
||||
-- Iron Hoe
|
||||
|
||||
if minetest.get_modpath("farming") then
|
||||
|
||||
farming.register_hoe(":farming:hoe_iron", {
|
||||
description = "Iron Hoe",
|
||||
inventory_image = "pigiron_iron_hoe.png",
|
||||
max_uses = 150,
|
||||
material = "pigiron:iron_ingot"
|
||||
})
|
||||
end
|
||||
|
||||
-- Switch Tool Capabilities between Steel and Bronze Tools
|
||||
-- Note: Steel is much stronger than Bronze in real life.
|
||||
|
||||
minetest.override_item("default:pick_steel", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level = 1,
|
||||
groupcaps = {
|
||||
cracky = {
|
||||
times = {[1] = 4.50, [2] = 1.80, [3] = 0.90},
|
||||
uses = 20, maxlevel = 2
|
||||
},
|
||||
},
|
||||
damage_groups = {fleshy = 4},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.override_item("default:pick_bronze", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level = 1,
|
||||
groupcaps = {
|
||||
cracky = {
|
||||
times = {[1] = 4.00, [2] = 1.60, [3] = 0.80},
|
||||
uses = 20, maxlevel = 2
|
||||
},
|
||||
},
|
||||
damage_groups = {fleshy = 4},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.override_item("default:shovel_steel", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.1,
|
||||
max_drop_level = 1,
|
||||
groupcaps = {
|
||||
crumbly = {
|
||||
times = {[1] = 1.65, [2] = 1.05, [3] = 0.45},
|
||||
uses = 25, maxlevel = 2
|
||||
},
|
||||
},
|
||||
damage_groups = {fleshy = 3},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.override_item("default:shovel_bronze", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.1,
|
||||
max_drop_level = 1,
|
||||
groupcaps = {
|
||||
crumbly = {
|
||||
times = {[1] = 1.50, [2] = 0.90, [3] = 0.40},
|
||||
uses = 30, maxlevel = 2
|
||||
},
|
||||
},
|
||||
damage_groups = {fleshy = 3},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.override_item("default:axe_steel", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level = 1,
|
||||
groupcaps = {
|
||||
choppy = {
|
||||
times = {[1] = 2.75, [2] = 1.70, [3] = 1.15},
|
||||
uses = 20, maxlevel = 2
|
||||
},
|
||||
},
|
||||
damage_groups = {fleshy = 4},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.override_item("default:axe_bronze", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.0,
|
||||
max_drop_level = 1,
|
||||
groupcaps = {
|
||||
choppy = {
|
||||
times = {[1] = 2.50, [2] = 1.40, [3] = 1.00},
|
||||
uses = 20, maxlevel = 2
|
||||
},
|
||||
},
|
||||
damage_groups = {fleshy = 4},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.override_item("default:sword_steel", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.8,
|
||||
max_drop_level = 1,
|
||||
groupcaps = {
|
||||
snappy = {
|
||||
times = {[1] = 2.75, [2] = 1.30, [3] = 0.375},
|
||||
uses = 25, maxlevel = 2
|
||||
},
|
||||
},
|
||||
damage_groups = {fleshy = 6},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.override_item("default:sword_bronze", {
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.8,
|
||||
max_drop_level = 1,
|
||||
groupcaps = {
|
||||
snappy = {
|
||||
times = {[1] = 2.5, [2] = 1.20, [3] = 0.35},
|
||||
uses = 30, maxlevel = 2
|
||||
},
|
||||
},
|
||||
damage_groups = {fleshy = 6},
|
||||
},
|
||||
})
|
Loading…
x
Reference in New Issue
Block a user