mirror of
https://gitlab.com/rubenwardy/awards.git
synced 2024-11-29 18:53:44 +01:00
player:getpos() is deprecated and calling it causes the game to halt if deprecated_lua_api_handling is set to "error" in minetest.conf. Call player:get_pos() instead to prevent the game from halting.
This commit is contained in:
parent
ce58720493
commit
c7b60be880
@ -89,7 +89,7 @@ if minetest.get_modpath("fire") then
|
|||||||
secret = true,
|
secret = true,
|
||||||
})
|
})
|
||||||
awards.register_on_death(function(player,data)
|
awards.register_on_death(function(player,data)
|
||||||
local pos = player:getpos()
|
local pos = player:get_pos()
|
||||||
if pos and minetest.find_node_near(pos, 2, "fire:basic_flame") ~= nil then
|
if pos and minetest.find_node_near(pos, 2, "fire:basic_flame") ~= nil then
|
||||||
return "award_burn"
|
return "award_burn"
|
||||||
end
|
end
|
||||||
@ -115,7 +115,7 @@ awards.register_award("award_deep_down", {
|
|||||||
secret = true,
|
secret = true,
|
||||||
})
|
})
|
||||||
awards.register_on_death(function(player,data)
|
awards.register_on_death(function(player,data)
|
||||||
local pos = player:getpos()
|
local pos = player:get_pos()
|
||||||
if pos and pos.y < -10000 then
|
if pos and pos.y < -10000 then
|
||||||
return "award_deep_down"
|
return "award_deep_down"
|
||||||
end
|
end
|
||||||
@ -129,7 +129,7 @@ awards.register_award("award_no_screen", {
|
|||||||
secret = true,
|
secret = true,
|
||||||
})
|
})
|
||||||
awards.register_on_death(function(player,data)
|
awards.register_on_death(function(player,data)
|
||||||
local pos = player:getpos()
|
local pos = player:get_pos()
|
||||||
if pos and pos.y > 10000 then
|
if pos and pos.y > 10000 then
|
||||||
return "award_no_screen"
|
return "award_no_screen"
|
||||||
end
|
end
|
||||||
@ -767,7 +767,7 @@ if minetest.get_modpath("default") then
|
|||||||
secret = true,
|
secret = true,
|
||||||
})
|
})
|
||||||
awards.register_on_death(function(player,data)
|
awards.register_on_death(function(player,data)
|
||||||
local pos = player:getpos()
|
local pos = player:get_pos()
|
||||||
if pos and (minetest.find_node_near(pos, 2, "default:lava_flowing") ~= nil or
|
if pos and (minetest.find_node_near(pos, 2, "default:lava_flowing") ~= nil or
|
||||||
minetest.find_node_near(pos, 2, "default:lava_source") ~= nil) then
|
minetest.find_node_near(pos, 2, "default:lava_source") ~= nil) then
|
||||||
return "award_in_the_flow"
|
return "award_in_the_flow"
|
||||||
@ -782,7 +782,7 @@ if minetest.get_modpath("default") then
|
|||||||
secret = true,
|
secret = true,
|
||||||
})
|
})
|
||||||
awards.register_on_death(function(player,data)
|
awards.register_on_death(function(player,data)
|
||||||
local pos = player:getpos()
|
local pos = player:get_pos()
|
||||||
if pos and minetest.find_node_near(pos, 5, "default:stone_with_diamond") ~= nil then
|
if pos and minetest.find_node_near(pos, 5, "default:stone_with_diamond") ~= nil then
|
||||||
return "award_this_is_sad"
|
return "award_this_is_sad"
|
||||||
end
|
end
|
||||||
@ -798,7 +798,7 @@ if minetest.get_modpath("bones") then
|
|||||||
secret = true,
|
secret = true,
|
||||||
})
|
})
|
||||||
awards.register_on_death(function(player,data)
|
awards.register_on_death(function(player,data)
|
||||||
local pos = player:getpos()
|
local pos = player:get_pos()
|
||||||
if pos and minetest.find_node_near(pos, 5, "bones:bones") ~= nil then
|
if pos and minetest.find_node_near(pos, 5, "bones:bones") ~= nil then
|
||||||
return "award_the_stack"
|
return "award_the_stack"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user