From 2884ed3e27b2a850ea21866ba5260d5a41f5f825 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Thu, 20 Jul 2023 21:36:06 +0200 Subject: advtrains_techage: Liquid infotext display needs to be added in core --- advtrains/wagons.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'advtrains') 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 -- cgit v1.2.3