implement rudimentary builder experience (#60)
This commit is contained in:
parent
e1b068bafe
commit
d8880f5897
@ -513,6 +513,7 @@ minetest.register_node("default:glass", {
|
||||
inventory_image = minetest.inventorycube("default_glass.png"),
|
||||
paramtype = "light",
|
||||
groups = {crumbly = 3},
|
||||
builder_xp = 3,
|
||||
})
|
||||
|
||||
-- wool
|
||||
|
@ -207,9 +207,19 @@ function xp.miner_xp()
|
||||
end)
|
||||
end
|
||||
|
||||
function xp.builder_xp()
|
||||
minetest.register_on_placenode(function(pos, newnode, placer)
|
||||
local builder_xp = minetest.registered_nodes[newnode.name].builder_xp
|
||||
if builder_xp then
|
||||
xp.add_xp(placer, builder_xp)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
xp.miner_xp()
|
||||
xp.crafter_xp()
|
||||
xp.explorer_xp()
|
||||
xp.builder_xp()
|
||||
|
||||
xp.load_xp()
|
||||
xp.load_levels()
|
||||
|
Loading…
x
Reference in New Issue
Block a user