forked from mtcontrib/throwing
Fix warnings regarding deprecated functions (again)
This commit is contained in:
parent
6e33ccfb32
commit
737d46317f
@ -74,7 +74,7 @@ THROWING_ARROW_ENTITY.on_step = function(self, dtime)
|
|||||||
if self.lastpos.x~=nil then
|
if self.lastpos.x~=nil then
|
||||||
if node.name ~= "air" then
|
if node.name ~= "air" then
|
||||||
self.object:remove()
|
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()})
|
self.inventory:remove_item("main", {name=self.stack:get_name()})
|
||||||
end
|
end
|
||||||
if self.stack then
|
if self.stack then
|
||||||
|
@ -47,7 +47,7 @@ local loss_prob = {}
|
|||||||
loss_prob["default:cobble"] = 3
|
loss_prob["default:cobble"] = 3
|
||||||
loss_prob["default:dirt"] = 4
|
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
|
-- Fill a list with data for content IDs, after all nodes are registered
|
||||||
local cid_data = {}
|
local cid_data = {}
|
||||||
@ -82,8 +82,8 @@ local function eject_drops(drops, pos, radius)
|
|||||||
local obj = minetest.add_item(drop_pos, item)
|
local obj = minetest.add_item(drop_pos, item)
|
||||||
if obj then
|
if obj then
|
||||||
obj:get_luaentity().collect = true
|
obj:get_luaentity().collect = true
|
||||||
obj:setacceleration({x=0, y=-10, z=0})
|
obj:set_acceleration({x=0, y=-10, z=0})
|
||||||
obj:setvelocity({x=math.random(-3, 3), y=10,
|
obj:set_velocity({x=math.random(-3, 3), y=10,
|
||||||
z=math.random(-3, 3)})
|
z=math.random(-3, 3)})
|
||||||
end
|
end
|
||||||
count = count - max
|
count = count - max
|
||||||
@ -152,7 +152,7 @@ local function entity_physics(pos, radius)
|
|||||||
local dist = math.max(1, vector.distance(pos, obj_pos))
|
local dist = math.max(1, vector.distance(pos, obj_pos))
|
||||||
|
|
||||||
if obj_vel ~= nil then
|
if obj_vel ~= nil then
|
||||||
obj:setvelocity(calc_velocity(pos, obj_pos,
|
obj:set_velocity(calc_velocity(pos, obj_pos,
|
||||||
obj_vel, radius * 10))
|
obj_vel, radius * 10))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user