Hemiptera Bugtracker at bugs.linux-forks.de

advtrains

Rewrite/repair itrainmap railway mapper

Send replies to 144@bugs.linux-forks.de or using the Form below.
avatar From: OP
Sat, 04 Jan 2020 17:02:01 -0000

Now that imagen (https://forum.minetest.net/viewtopic.php?f=9&t=23854) is available, I am supposed to repair the currently broken itrainmap mod.

itrainmap will later be integrated with the route programming mechanism, making it possible to program routes using the UI instead of running through the world. An extension point for this needs to be prepared.

A later version could also offer a 'signalbox view' where turnouts and signals are outlined viewable from a 'signalbox table' node.

avatar From: Someone else
Sun, 05 Jan 2020 02:10:01 -0000

Here is a one-liner that would fix itrainmap as it exists, without a

rewrite. Not sure if you want to release this or continue with a rewrite,

but I will release it here for anyone interested as well.

diff --git a/advtrains_itrainmap/init.lua b/advtrains_itrainmap/init.lua

index 0443609..1a1c6f4 100644

--- a/advtrains_itrainmap/init.lua

+++ b/advtrains_itrainmap/init.lua

@@ -52,7 +52,7 @@ local function create_map_form(d)

if x>=minx and x<=maxx then

for z,y in pairs(itx) do

if z>=minz and z<=maxz then

- local

adn=advtrains.detector.get({x=x, y=y, z=z})

+ local

adn=advtrains.get_train_at_pos({x=x, y=y, z=z})

local color="gray"

if adn then

color="red"

avatar From: Someone else
Mon, 03 Jul 2023 07:39:01 -0000

Reply