~gpcf/misc-patches

Adding Train ID to formspec so we know what ID a train is without LuaATC v1 PROPOSED

erstazi: 1
 Adding Train ID to formspec so we know what ID a train is without LuaATC

 1 files changed, 1 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~gpcf/misc-patches/patches/22673/mbox | git am -3
Learn more about email & git

[PATCH] Adding Train ID to formspec so we know what ID a train is without LuaATC Export this patch

---
 advtrains/wagons.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua
index e9b6d7a..237346e 100644
--- a/advtrains/wagons.lua
+++ b/advtrains/wagons.lua
@@ -936,7 +936,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 | Train ID: " .. (minetest.formspec_escape(data.train_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 "")).."]"
-- 
2.17.1