aboutsummaryrefslogtreecommitdiff
path: root/advtrains/wagons.lua
diff options
context:
space:
mode:
author1F616EMO <root@1f616emo.xyz>2024-09-29 06:37:40 +0800
committerorwell <orwell@bleipb.de>2024-11-09 22:15:06 +0100
commite53670904127c8493e13b587e507407f2beac8b3 (patch)
tree64742806f62c8ebdf785298f928f3e847041ced2 /advtrains/wagons.lua
parentb075d8e3336dfb2755dd1b9dc29c5320a155013b (diff)
downloadadvtrains-e53670904127c8493e13b587e507407f2beac8b3.tar.gz
advtrains-e53670904127c8493e13b587e507407f2beac8b3.tar.bz2
advtrains-e53670904127c8493e13b587e507407f2beac8b3.zip
Fix depercated functions
Diffstat (limited to 'advtrains/wagons.lua')
-rw-r--r--advtrains/wagons.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua
index 8bb12ee..cf15871 100644
--- a/advtrains/wagons.lua
+++ b/advtrains/wagons.lua
@@ -286,7 +286,7 @@ function wagon:on_step(dtime)
local data = advtrains.wagons[self.id]
if not pos then
- --atdebug("["..self.id.."][fatal] missing position (object:getpos() returned nil)")
+ --atdebug("["..self.id.."][fatal] missing position (object:get_pos() returned nil)")
return
end
@@ -820,8 +820,8 @@ function wagon:get_off(seatno)
end
--if not door_entry, or paths missing, fall back to old method
--atdebug("using fallback")
- local objpos=advtrains.round_vector_floor_y(self.object:getpos())
- local yaw=self.object:getyaw()
+ local objpos=advtrains.round_vector_floor_y(self.object:get_pos())
+ local yaw=self.object:get_yaw()
local isx=(yaw < math.pi/4) or (yaw > 3*math.pi/4 and yaw < 5*math.pi/4) or (yaw > 7*math.pi/4)
local offp
--abuse helper function
@@ -899,7 +899,7 @@ end
--BordCom
local function checkcouple(ent)
- if not ent or not ent:getyaw() then
+ if not ent or not ent:get_yaw() then
return nil
end
local le = ent:get_luaentity()
@@ -1273,7 +1273,7 @@ function wagon:check_seat_group_access(pname, sgr)
return false, attrans("You are not allowed to access the driver stand.")
end
if self.seat_groups[sgr].driving_ctrl_access then
- advtrains.log("Drive", pname, self.object:getpos(), self:train().text_outside)
+ advtrains.log("Drive", pname, self.object:get_pos(), self:train().text_outside)
end
return true
end