diff options
author | orwell96 <orwell@bleipb.de> | 2023-07-20 21:36:06 +0200 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2023-07-20 21:36:06 +0200 |
commit | 2884ed3e27b2a850ea21866ba5260d5a41f5f825 (patch) | |
tree | 027c29652a7be0d31571893c00bb3d3770fb9a8e /advtrains/wagons.lua | |
parent | 8b5903a7293491901b555f720d5f79bbac681c1b (diff) | |
download | advtrains-2884ed3e27b2a850ea21866ba5260d5a41f5f825.tar.gz advtrains-2884ed3e27b2a850ea21866ba5260d5a41f5f825.tar.bz2 advtrains-2884ed3e27b2a850ea21866ba5260d5a41f5f825.zip |
advtrains_techage: Liquid infotext display needs to be added in corerelease-2.4.3
Diffstat (limited to 'advtrains/wagons.lua')
-rw-r--r-- | advtrains/wagons.lua | 9 |
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 |