triforce fix and attempt to fix xp getting too high

master
D00Med 2017-02-04 09:51:08 +10:00
parent 11cc8da4dd
commit 78c4986737
2 changed files with 2 additions and 2 deletions

View File

@ -111,7 +111,7 @@ minetest.register_globalstep(function(dtime)
xp = io.open(minetest.get_worldpath().."/"..player:get_player_name().."_experience", "r")
experience = xp:read("*l")
xp:close()
if experience ~= nil then
if experience ~= nil and experience <= 1000 then
new_xp = experience + 1
xp_write = io.open(minetest.get_worldpath().."/"..player:get_player_name().."_experience", "w")
xp_write:write(new_xp)

View File

@ -771,7 +771,7 @@ minetest.register_craftitem("hyruletools:triforce", {
1, --minsize
2, --maxsize
false, --collisiondetection
"maptools_nyan_coin.png" --texture
"hyruletools_nyan_rupee.png" --texture
)
minetest.env:add_entity(pos, "experience:orb")
minetest.env:add_entity(pos, "experience:orb")