aboutsummaryrefslogtreecommitdiff
path: root/advtrains
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2023-07-20 21:36:06 +0200
committerorwell96 <orwell@bleipb.de>2023-07-20 21:36:06 +0200
commit2884ed3e27b2a850ea21866ba5260d5a41f5f825 (patch)
tree027c29652a7be0d31571893c00bb3d3770fb9a8e /advtrains
parent8b5903a7293491901b555f720d5f79bbac681c1b (diff)
downloadadvtrains-release-2.4.3.tar.gz
advtrains-release-2.4.3.tar.bz2
advtrains-release-2.4.3.zip
advtrains_techage: Liquid infotext display needs to be added in corerelease-2.4.3
Diffstat (limited to 'advtrains')
-rw-r--r--advtrains/wagons.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua
index b0fb575..62e65af 100644
--- a/advtrains/wagons.lua
+++ b/advtrains/wagons.lua
@@ -364,6 +364,15 @@ function wagon:on_step(dtime)
outside = outside .."\n!!! Train off track !!!"
end
+ -- liquid container: display liquid contents in infotext
+ if self.techage_liquid_capacity then
+ if data.techage_liquid and data.techage_liquid.name then
+ outside = outside .."\nLiquid: "..data.techage_liquid.name..", "..data.techage_liquid.amount.." units"
+ else
+ outside = outside .."\nLiquid: empty"
+ end
+ end
+
if self.infotext_cache~=outside then
self.object:set_properties({infotext=outside})
self.infotext_cache=outside