aboutsummaryrefslogtreecommitdiff
path: root/advtrains/couple.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/couple.lua
parentb075d8e3336dfb2755dd1b9dc29c5320a155013b (diff)
downloadadvtrains-e53670904127c8493e13b587e507407f2beac8b3.tar.gz
advtrains-e53670904127c8493e13b587e507407f2beac8b3.tar.bz2
advtrains-e53670904127c8493e13b587e507407f2beac8b3.zip
Fix depercated functions
Diffstat (limited to 'advtrains/couple.lua')
-rw-r--r--advtrains/couple.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/advtrains/couple.lua b/advtrains/couple.lua
index cbeb661..795419c 100644
--- a/advtrains/couple.lua
+++ b/advtrains/couple.lua
@@ -453,7 +453,7 @@ minetest.register_entity("advtrains:discouple", {
self.object:remove()
return
end
- --getyaw seems to be a reliable method to check if an object is loaded...if it returns nil, it is not.
+ --get_yaw seems to be a reliable method to check if an object is loaded...if it returns nil, it is not.
if not self.wagon.object:get_yaw() then
self.object:remove()
return
@@ -500,7 +500,7 @@ minetest.register_entity("advtrains:couple", {
self.object:remove()
end,
on_step=function(self, dtime)
- if advtrains.wagon_outside_range(self.object:getpos()) then
+ if advtrains.wagon_outside_range(self.object:get_pos()) then
--atdebug("Couple Removing outside range")
self.object:remove()
return
@@ -539,7 +539,7 @@ minetest.register_entity("advtrains:couple", {
tp2=advtrains.path_get_interpolated(train2, train2.end_index)
end
local pos_median=advtrains.pos_median(tp1, tp2)
- if not vector.equals(pos_median, self.object:getpos()) then
+ if not vector.equals(pos_median, self.object:get_pos()) then
self.object:set_pos(pos_median)
end
self.position_set=true