aboutsummaryrefslogtreecommitdiff
path: root/advtrains/wagons.lua
diff options
context:
space:
mode:
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>2020-07-26 23:28:24 +0200
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>2020-07-26 23:30:07 +0200
commit45413ee5c031d9d44342a09f4ac8b412a75568be (patch)
tree3502fafaed7d8e4fca704b09cab3381f694a1453 /advtrains/wagons.lua
parentc54e0b341a88349e1a4fc7d902fdd9d9e1a6040d (diff)
downloadadvtrains-45413ee5c031d9d44342a09f4ac8b412a75568be.tar.gz
advtrains-45413ee5c031d9d44342a09f4ac8b412a75568be.tar.bz2
advtrains-45413ee5c031d9d44342a09f4ac8b412a75568be.zip
Add function to step through freight codes
Diffstat (limited to 'advtrains/wagons.lua')
-rw-r--r--advtrains/wagons.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua
index d805bc6..71557fa 100644
--- a/advtrains/wagons.lua
+++ b/advtrains/wagons.lua
@@ -874,6 +874,7 @@ function wagon.prev_fc(data)
end
function wagon.next_fc(data)
+ if not data.fc then return end
if data.fcrev then
wagon.prev_fc(data)
return
@@ -1127,7 +1128,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
wagon.show_wagon_properties({id=uid}, pname)
end
if fields.fcn then
- wagon.next_fc(data)
+ advtrains.step_fc(data)
wagon.show_wagon_properties({id=uid}, pname)
end
end