Browse Source

Remove various deprecated functions

master
Panquesito7 2 weeks ago
parent
commit
2a8650bc4b
No known key found for this signature in database GPG Key ID: 3C482B03FD220E68
2 changed files with 5 additions and 5 deletions
  1. +3
    -3
      bobber.lua
  2. +2
    -2
      bobber_shark.lua

+ 3
- 3
bobber.lua View File

@@ -99,7 +99,7 @@ local FISHING_BOBBER_ENTITY={
if inv:room_for_item("main", {name=name, count=1, wear=wear_value, metadata=""}) then
inv:add_item("main", {name=name, count=1, wear=wear_value, metadata=""})
else
minetest.spawn_item(clicker:getpos(), {name=name, count=1, wear=wear_value, metadata=""})
minetest.spawn_item(clicker:get_pos(), {name=name, count=1, wear=wear_value, metadata=""})
end
end
else
@@ -151,14 +151,14 @@ local FISHING_BOBBER_ENTITY={
local p = player:get_pos()
local dist = ((p.x-pos.x)^2 + (p.y-pos.y)^2 + (p.z-pos.z)^2)^0.5
if dist > fishing_setting.settings["bobber_view_range"] then
minetest.sound_play("fishing_bobber1", {pos = self.object:getpos(),gain = 0.5,})
minetest.sound_play("fishing_bobber1", {pos = self.object:get_pos(),gain = 0.5,})
self.object:remove()
return
end

--rotate bobber
if math.random(1, 4) == 1 then
self.object:set_yaw(self.object:getyaw()+((math.random(0,360)-180)/2880*math.pi))
self.object:set_yaw(self.object:get_yaw()+((math.random(0,360)-180)/2880*math.pi))
end

self.timer = self.timer + 1


+ 2
- 2
bobber_shark.lua View File

@@ -125,7 +125,7 @@ local FISHING_BOBBER_SHARK_ENTITY={
0.25, 0.40, -- min size, max size
false, "fishing_particle_baitball_shark.png")
-- add sound
minetest.sound_play("fishing_baitball", {pos = self.object:getpos(), gain = 0.2, })
minetest.sound_play("fishing_baitball", {pos = self.object:get_pos(), gain = 0.2, })
end
end,

@@ -156,7 +156,7 @@ local FISHING_BOBBER_SHARK_ENTITY={

--rotate bobber
if math.random(1, 4) == 1 then
self.object:setyaw(self.object:get_yaw()+((math.random(0,360)-180)/2880*math.pi))
self.object:set_yaw(self.object:get_yaw()+((math.random(0,360)-180)/2880*math.pi))
end

self.timer = self.timer + 1


Loading…
Cancel
Save