fixed anvil + copper pick
This commit is contained in:
parent
c4b0a116bb
commit
4a230b52dc
@ -301,6 +301,13 @@ minetest.register_craft({
|
|||||||
|
|
||||||
--workbench
|
--workbench
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "default:workbench",
|
||||||
|
recipe = {
|
||||||
|
{"default:wood_tutorial", "default:wood_tutorial", "default:wood_tutorial"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "default:workbench",
|
output = "default:workbench",
|
||||||
recipe = {
|
recipe = {
|
||||||
|
@ -119,8 +119,8 @@ minetest.register_tool("default:pick_copper", {
|
|||||||
max_drop_level=3,
|
max_drop_level=3,
|
||||||
groupcaps= {
|
groupcaps= {
|
||||||
cracky={times={[1]=1.00, [2]=0.30, [3]=0.20}, uses=150, maxlevel=1},
|
cracky={times={[1]=1.00, [2]=0.30, [3]=0.20}, uses=150, maxlevel=1},
|
||||||
hard={times={[2]=2.30, [3]=1.50}, uses=50, maxlevel=100},
|
hard={times={[2]=2.5, [3]=1.50}, uses=50, maxlevel=1},
|
||||||
choppy={times={[2]=3.50, [3]=1.10}, uses=50, maxlevel=50}
|
choppy={times={[2]=3.50, [3]=1.10}, uses=50, maxlevel=1}
|
||||||
},
|
},
|
||||||
damage_groups = {fleshy=3},
|
damage_groups = {fleshy=3},
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,18 @@
|
|||||||
|
-- wood (tutorial)
|
||||||
|
|
||||||
|
minetest.register_node("default:wood_tutorial", {
|
||||||
|
description = "Wood",
|
||||||
|
tiles = {"default_wood.png"},
|
||||||
|
groups = {choppy = 3, oddly_breakable_by_hand=1},
|
||||||
|
sounds = default.sounds.wood(),
|
||||||
|
})
|
||||||
|
|
||||||
-- wood
|
-- wood
|
||||||
|
|
||||||
minetest.register_node("default:wood", {
|
minetest.register_node("default:wood", {
|
||||||
description = "Wood",
|
description = "Wood",
|
||||||
tiles = {"default_wood.png"},
|
tiles = {"default_wood.png"},
|
||||||
groups = {choppy = 3, oddly_breakable_by_hand=1},
|
groups = {choppy = 3},
|
||||||
sounds = default.sounds.wood(),
|
sounds = default.sounds.wood(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -67,13 +67,19 @@ minetest.register_node("furnace:anvil", {
|
|||||||
|
|
||||||
for name, def in pairs(furnace.anvil.materials) do
|
for name, def in pairs(furnace.anvil.materials) do
|
||||||
if item == def.items.rod or
|
if item == def.items.rod or
|
||||||
item == def.items.plate or
|
item == def.items.plates or
|
||||||
item == (def.items.blade or "none") then
|
item == (def.items.blade or "none") or
|
||||||
|
item == (def.items.other or "none") then
|
||||||
|
|
||||||
table.insert(items, def.items.rod .. " " .. tostring(count))
|
table.insert(items, def.items.rod .. " " .. tostring(count))
|
||||||
table.insert(items, def.items.plate .. " " .. tostring(count))
|
table.insert(items, def.items.plate .. " " .. tostring(count))
|
||||||
if def.items.blade then
|
if def.items.blade then
|
||||||
table.insert(items, def.items.blade .. " " .. tostring(count))
|
table.insert(items, def.items.blade .. " " .. tostring(count))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if def.items.other then
|
||||||
|
table.insert(items, def.items.other .. " " .. tostring(count))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -84,10 +90,43 @@ minetest.register_node("furnace:anvil", {
|
|||||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
|
local count = stack:get_count()
|
||||||
|
|
||||||
if listname == "output" then
|
if listname == "output" then
|
||||||
inv:set_list("main", {})
|
local c = inv:get_list("main")[1]:get_count() - count
|
||||||
|
local my_item = inv:get_list("main")[1]
|
||||||
|
my_item:set_count(c)
|
||||||
|
inv:set_list("main", {my_item})
|
||||||
inv:set_list("output", {})
|
inv:set_list("output", {})
|
||||||
|
|
||||||
|
if c > 0 then
|
||||||
|
print(c)
|
||||||
|
|
||||||
|
local item = inv:get_list("main")[1]:get_name()
|
||||||
|
local items = {}
|
||||||
|
for name, def in pairs(furnace.anvil.materials) do
|
||||||
|
if item == def.items.rod or
|
||||||
|
item == def.items.plates or
|
||||||
|
item == (def.items.blade or "none") or
|
||||||
|
item == (def.items.other or "none") then
|
||||||
|
|
||||||
|
table.insert(items, def.items.rod .. " " .. tostring(c))
|
||||||
|
table.insert(items, def.items.plate .. " " .. tostring(c))
|
||||||
|
if def.items.blade then
|
||||||
|
table.insert(items, def.items.blade .. " " .. tostring(c))
|
||||||
|
end
|
||||||
|
|
||||||
|
if def.items.other then
|
||||||
|
table.insert(items, def.items.other .. " " .. tostring(c))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
inv:set_list("output", items)
|
||||||
|
else
|
||||||
|
inv:set_list("main", {})
|
||||||
|
end
|
||||||
|
|
||||||
elseif listname == "main" then
|
elseif listname == "main" then
|
||||||
inv:set_list("output", {})
|
inv:set_list("output", {})
|
||||||
end
|
end
|
||||||
@ -98,7 +137,8 @@ furnace.anvil.register_material("iron", {
|
|||||||
items = {
|
items = {
|
||||||
plate = "furnace:iron_plate",
|
plate = "furnace:iron_plate",
|
||||||
rod = "furnace:iron_rod",
|
rod = "furnace:iron_rod",
|
||||||
blade = "default:blade"
|
blade = "default:blade",
|
||||||
|
other = "stairs:chisel"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -346,7 +346,7 @@ minetest.register_on_newplayer(function(player)
|
|||||||
local q9 = quests.add_dig_goal(quest, "Mine Iron", {"default:stone_with_iron"}, 2, "Your Flint Pick is strong enough to mine Iron.", "Great! You should be on level 2 now.\nEvery time you level up you can upgrade on of your skills.\nTry out /skill warrior or /skill miner\n")
|
local q9 = quests.add_dig_goal(quest, "Mine Iron", {"default:stone_with_iron"}, 2, "Your Flint Pick is strong enough to mine Iron.", "Great! You should be on level 2 now.\nEvery time you level up you can upgrade on of your skills.\nTry out /skill warrior or /skill miner\n")
|
||||||
|
|
||||||
|
|
||||||
q3.reward = "default:wood 3"
|
q3.reward = "default:wood_tutorial 3"
|
||||||
q4.reward = "crafting_guide:book"
|
q4.reward = "crafting_guide:book"
|
||||||
|
|
||||||
q2.requires = q1
|
q2.requires = q1
|
||||||
|
@ -411,7 +411,7 @@ minetest.override_item("default:stone_with_coal", {
|
|||||||
minetest.override_item("default:stone_with_diamond", {
|
minetest.override_item("default:stone_with_diamond", {
|
||||||
on_dig = function(pos, node, player)
|
on_dig = function(pos, node, player)
|
||||||
if skills.lvls[player:get_player_name()] and skills.lvls[player:get_player_name()]["miner"] > 5 then
|
if skills.lvls[player:get_player_name()] and skills.lvls[player:get_player_name()]["miner"] > 5 then
|
||||||
xp.add_xp(player,xp.get_xp(xp.player_levels[player:get_player_name()], 7))
|
xp.add_xp(player,xp.get_xp(xp.player_levels[player:get_player_name()], 14))
|
||||||
end
|
end
|
||||||
minetest.node_dig(pos, node, player)
|
minetest.node_dig(pos, node, player)
|
||||||
end,
|
end,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user