Fix warnings regarding deprecated functions (again)

This commit is contained in:
bri cassa 2021-03-01 23:36:23 +01:00
parent 6e33ccfb32
commit 737d46317f
2 changed files with 5 additions and 5 deletions

View File

@ -74,7 +74,7 @@ THROWING_ARROW_ENTITY.on_step = function(self, dtime)
if self.lastpos.x~=nil then
if node.name ~= "air" then
self.object:remove()
if self.inventory and self.stack and not minetest.setting_getbool("creative_mode") then
if self.inventory and self.stack and not minetest.settings:get_bool("creative_mode") then
self.inventory:remove_item("main", {name=self.stack:get_name()})
end
if self.stack then

View File

@ -47,7 +47,7 @@ local loss_prob = {}
loss_prob["default:cobble"] = 3
loss_prob["default:dirt"] = 4
local radius = tonumber(minetest.setting_get("tnt_radius") or 3)
local radius = tonumber(minetest.settings:get("tnt_radius") or 3)
-- Fill a list with data for content IDs, after all nodes are registered
local cid_data = {}
@ -82,8 +82,8 @@ local function eject_drops(drops, pos, radius)
local obj = minetest.add_item(drop_pos, item)
if obj then
obj:get_luaentity().collect = true
obj:setacceleration({x=0, y=-10, z=0})
obj:setvelocity({x=math.random(-3, 3), y=10,
obj:set_acceleration({x=0, y=-10, z=0})
obj:set_velocity({x=math.random(-3, 3), y=10,
z=math.random(-3, 3)})
end
count = count - max
@ -152,7 +152,7 @@ local function entity_physics(pos, radius)
local dist = math.max(1, vector.distance(pos, obj_pos))
if obj_vel ~= nil then
obj:setvelocity(calc_velocity(pos, obj_pos,
obj:set_velocity(calc_velocity(pos, obj_pos,
obj_vel, radius * 10))
end