~gpcf/advtrains-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch

[PATCH 1/1] Adding Train ID to Onboard Computer formspec so we know what the Train ID is without LuaATC

Details
Message ID
<20240808214043.315900-1-erstazi@c-wd.net>
DKIM signature
permerror
Download raw message
Patch: +3 -2
---
 advtrains/locale/advtrains.de.tr | 1 +
 advtrains/wagons.lua             | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/advtrains/locale/advtrains.de.tr b/advtrains/locale/advtrains.de.tr
index 6abbc12..cdebdde 100644
--- a/advtrains/locale/advtrains.de.tr
+++ b/advtrains/locale/advtrains.de.tr
@@ -74,4 +74,5 @@ Buffer and Chain Coupler=Schraubenkupplung
Scharfenberg Coupler=Scharfenbergkupplung
Japanese Train Inter-Wagon Connection=Waggonzwischenverbindung Japanischer Personenzug
Can not couple: The couplers of the trains do not match (@1 and @2).=Kann nicht ankuppeln: Die Kupplungen der Züge passen nicht zueinander (@1 und @2)
Train ID=Zugnummer
<none>=<keine>
diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua
index 62e65af..730c623 100644
--- a/advtrains/wagons.lua
+++ b/advtrains/wagons.lua
@@ -970,7 +970,7 @@ function wagon:show_bordcom(pname)
	local data = advtrains.wagons[self.id]
	local linhei
	
	local form = "size[11,9]label[0.5,0;AdvTrains Boardcom v0.1]"
	local form = "size[11,9]label[0.5,0;AdvTrains Boardcom v0.1 | "..attrans("Train ID")..": "..(minetest.formspec_escape(self.id or "")).."]"
	form=form.."textarea[0.5,1.5;7,1;text_outside;"..attrans("Text displayed outside on train")..";"..(minetest.formspec_escape(train.text_outside or "")).."]"
	form=form.."textarea[0.5,3;7,1;text_inside;"..attrans("Text displayed inside train")..";"..(minetest.formspec_escape(train.text_inside or "")).."]"
	form=form.."field[7.5,1.75;3,1;line;"..attrans("Line")..";"..(minetest.formspec_escape(train.line or "")).."]"
@@ -1487,4 +1487,4 @@ function advtrains.get_wagon_at_index(train_id, w_index)
	end
	-- nothing found, dist must be further back
	return nil
end
\ No newline at end of file
end
-- 
2.34.1
Reply to thread Export thread (mbox)