tweak and tidy code
This commit is contained in:
parent
8569eabd0c
commit
77dcda83e3
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
-- add lucky blocks
|
||||||
|
|
||||||
lucky_block:add_blocks({
|
lucky_block:add_blocks({
|
||||||
{"dro", {"pigiron:iron_ingots"}, 10},
|
{"dro", {"pigiron:iron_ingots"}, 10},
|
||||||
{"nod", "pigiron:iron_block", 0},
|
{"nod", "pigiron:iron_block", 0},
|
||||||
@ -12,6 +15,8 @@ lucky_block:add_blocks({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- add iron hoe
|
||||||
|
|
||||||
if minetest.get_modpath("farming") then
|
if minetest.get_modpath("farming") then
|
||||||
|
|
||||||
lucky_block:add_blocks({
|
lucky_block:add_blocks({
|
||||||
|
3
mod.conf
3
mod.conf
@ -1,4 +1,5 @@
|
|||||||
name = pigiron
|
name = pigiron
|
||||||
|
description = Adds pig iron ingots which need to be crafted to make steel, also blocks and stairs.
|
||||||
depends = default
|
depends = default
|
||||||
optional_depends = stairs, farming, lucky_block, toolranks
|
optional_depends = stairs, farming, lucky_block, toolranks
|
||||||
description = Adds pig iron ingots which need to be crafted to make steel, also blocks and stairs.
|
min_minetest_version = 5.0
|
||||||
|
42
tools.lua
42
tools.lua
@ -9,8 +9,7 @@ minetest.register_tool("pigiron:pick_iron", {
|
|||||||
max_drop_level = 1,
|
max_drop_level = 1,
|
||||||
groupcaps = {
|
groupcaps = {
|
||||||
cracky = {
|
cracky = {
|
||||||
times = {[1] = 2.5, [2] = 1.40, [3] = 0.95},
|
times = {[1] = 2.5, [2] = 1.40, [3] = 0.95}, uses = 20, maxlevel = 2
|
||||||
uses = 20, maxlevel = 2
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
damage_groups = {fleshy = 3}
|
damage_groups = {fleshy = 3}
|
||||||
@ -39,8 +38,7 @@ minetest.register_tool("pigiron:shovel_iron", {
|
|||||||
max_drop_level = 1,
|
max_drop_level = 1,
|
||||||
groupcaps = {
|
groupcaps = {
|
||||||
crumbly = {
|
crumbly = {
|
||||||
times = {[1] = 1.70, [2] = 1.0, [3] = 0.45},
|
times = {[1] = 1.70, [2] = 1.0, [3] = 0.45}, uses = 25, maxlevel = 1
|
||||||
uses = 25, maxlevel = 1
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
damage_groups = {fleshy = 2}
|
damage_groups = {fleshy = 2}
|
||||||
@ -68,8 +66,7 @@ minetest.register_tool("pigiron:axe_iron", {
|
|||||||
max_drop_level = 1,
|
max_drop_level = 1,
|
||||||
groupcaps = {
|
groupcaps = {
|
||||||
choppy = {
|
choppy = {
|
||||||
times = {[1] = 2.70, [2] = 1.70, [3] = 1.15},
|
times = {[1] = 2.70, [2] = 1.70, [3] = 1.15}, uses = 20, maxlevel = 1
|
||||||
uses = 20, maxlevel = 1
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
damage_groups = {fleshy = 3}
|
damage_groups = {fleshy = 3}
|
||||||
@ -97,8 +94,7 @@ minetest.register_tool("pigiron:sword_iron", {
|
|||||||
max_drop_level = 1,
|
max_drop_level = 1,
|
||||||
groupcaps = {
|
groupcaps = {
|
||||||
snappy = {
|
snappy = {
|
||||||
times = {[1] = 2.0, [2] = 1.30, [3] = 0.38},
|
times = {[1] = 2.0, [2] = 1.30, [3] = 0.38}, uses = 25, maxlevel = 1
|
||||||
uses = 25, maxlevel = 1
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
damage_groups = {fleshy = 5}
|
damage_groups = {fleshy = 5}
|
||||||
@ -124,12 +120,12 @@ if minetest.get_modpath("farming") then
|
|||||||
description = "Iron Hoe",
|
description = "Iron Hoe",
|
||||||
inventory_image = "pigiron_iron_hoe.png",
|
inventory_image = "pigiron_iron_hoe.png",
|
||||||
max_uses = 150,
|
max_uses = 150,
|
||||||
material = "pigiron:iron_ingot"
|
material = "pigiron:iron_ingot",
|
||||||
|
groups = {hoe = 1, flammable = 2},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Toolranks support if farming redo active
|
-- Toolranks support if farming redo active
|
||||||
if farming and farming.mod
|
if farming and farming.mod and minetest.get_modpath("toolranks") then
|
||||||
and minetest.get_modpath("toolranks") then
|
|
||||||
|
|
||||||
minetest.override_item("farming:hoe_iron", {
|
minetest.override_item("farming:hoe_iron", {
|
||||||
original_description = "Iron Hoe",
|
original_description = "Iron Hoe",
|
||||||
@ -146,8 +142,7 @@ minetest.override_item("default:pick_steel", {
|
|||||||
max_drop_level = 1,
|
max_drop_level = 1,
|
||||||
groupcaps = {
|
groupcaps = {
|
||||||
cracky = {
|
cracky = {
|
||||||
times = {[1] = 4.50, [2] = 1.80, [3] = 0.90},
|
times = {[1] = 4.50, [2] = 1.80, [3] = 0.90}, uses = 20, maxlevel = 2
|
||||||
uses = 20, maxlevel = 2
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
damage_groups = {fleshy = 4}
|
damage_groups = {fleshy = 4}
|
||||||
@ -160,8 +155,7 @@ minetest.override_item("default:pick_bronze", {
|
|||||||
max_drop_level = 1,
|
max_drop_level = 1,
|
||||||
groupcaps = {
|
groupcaps = {
|
||||||
cracky = {
|
cracky = {
|
||||||
times = {[1] = 4.00, [2] = 1.60, [3] = 0.80},
|
times = {[1] = 4.00, [2] = 1.60, [3] = 0.80}, uses = 20, maxlevel = 2
|
||||||
uses = 20, maxlevel = 2
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
damage_groups = {fleshy = 4}
|
damage_groups = {fleshy = 4}
|
||||||
@ -174,8 +168,7 @@ minetest.override_item("default:shovel_steel", {
|
|||||||
max_drop_level = 1,
|
max_drop_level = 1,
|
||||||
groupcaps = {
|
groupcaps = {
|
||||||
crumbly = {
|
crumbly = {
|
||||||
times = {[1] = 1.65, [2] = 1.05, [3] = 0.45},
|
times = {[1] = 1.65, [2] = 1.05, [3] = 0.45}, uses = 25, maxlevel = 2
|
||||||
uses = 25, maxlevel = 2
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
damage_groups = {fleshy = 3}
|
damage_groups = {fleshy = 3}
|
||||||
@ -188,8 +181,7 @@ minetest.override_item("default:shovel_bronze", {
|
|||||||
max_drop_level = 1,
|
max_drop_level = 1,
|
||||||
groupcaps = {
|
groupcaps = {
|
||||||
crumbly = {
|
crumbly = {
|
||||||
times = {[1] = 1.50, [2] = 0.90, [3] = 0.40},
|
times = {[1] = 1.50, [2] = 0.90, [3] = 0.40}, uses = 30, maxlevel = 2
|
||||||
uses = 30, maxlevel = 2
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
damage_groups = {fleshy = 3}
|
damage_groups = {fleshy = 3}
|
||||||
@ -202,8 +194,7 @@ minetest.override_item("default:axe_steel", {
|
|||||||
max_drop_level = 1,
|
max_drop_level = 1,
|
||||||
groupcaps = {
|
groupcaps = {
|
||||||
choppy = {
|
choppy = {
|
||||||
times = {[1] = 2.75, [2] = 1.70, [3] = 1.15},
|
times = {[1] = 2.75, [2] = 1.70, [3] = 1.15}, uses = 20, maxlevel = 2
|
||||||
uses = 20, maxlevel = 2
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
damage_groups = {fleshy = 4}
|
damage_groups = {fleshy = 4}
|
||||||
@ -216,8 +207,7 @@ minetest.override_item("default:axe_bronze", {
|
|||||||
max_drop_level = 1,
|
max_drop_level = 1,
|
||||||
groupcaps = {
|
groupcaps = {
|
||||||
choppy = {
|
choppy = {
|
||||||
times = {[1] = 2.50, [2] = 1.40, [3] = 1.00},
|
times = {[1] = 2.50, [2] = 1.40, [3] = 1.00}, uses = 20, maxlevel = 2
|
||||||
uses = 20, maxlevel = 2
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
damage_groups = {fleshy = 4}
|
damage_groups = {fleshy = 4}
|
||||||
@ -230,8 +220,7 @@ minetest.override_item("default:sword_steel", {
|
|||||||
max_drop_level = 1,
|
max_drop_level = 1,
|
||||||
groupcaps = {
|
groupcaps = {
|
||||||
snappy = {
|
snappy = {
|
||||||
times = {[1] = 2.75, [2] = 1.30, [3] = 0.375},
|
times = {[1] = 2.75, [2] = 1.30, [3] = 0.375}, uses = 25, maxlevel = 2
|
||||||
uses = 25, maxlevel = 2
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
damage_groups = {fleshy = 6}
|
damage_groups = {fleshy = 6}
|
||||||
@ -244,8 +233,7 @@ minetest.override_item("default:sword_bronze", {
|
|||||||
max_drop_level = 1,
|
max_drop_level = 1,
|
||||||
groupcaps = {
|
groupcaps = {
|
||||||
snappy = {
|
snappy = {
|
||||||
times = {[1] = 2.5, [2] = 1.20, [3] = 0.35},
|
times = {[1] = 2.5, [2] = 1.20, [3] = 0.35}, uses = 30, maxlevel = 2
|
||||||
uses = 30, maxlevel = 2
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
damage_groups = {fleshy = 6}
|
damage_groups = {fleshy = 6}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user