The International Simutrans Forum

Development => Scripting Scenarios and AI => Topic started by: Yona-TYT on May 18, 2021, 04:41:35 PM

Title: is_work_allowed_here (pl, tool_id, pos) Does not work if "Slice map view" is ena
Post by: Yona-TYT on May 18, 2021, 04:41:35 PM
 If the tunnel tool is clicked outside of the underground cutout this completely ignores the "is_work_allowed_here (pl, tool_id, pos)" function, this brings me problems when building tunnels in the tutorial.
Title: Re: is_work_allowed_here (pl, tool_id, pos) Does not work if "Slice map view" is ena
Post by: Dwachs on May 19, 2021, 05:31:18 PM
I cannot reproduce. In fact, is_work_allowed_here is spammed with the tunnel tool when the mouse is moving.
Title: Re: is_work_allowed_here (pl, tool_id, pos) Does not work if "Slice map view" is ena
Post by: Yona-TYT on May 19, 2021, 10:58:52 PM
This seems to go beyond the scripts, I have not been able to build a section of tunnel from the entrance of the tunnel.

Look at the savegame

Title: Re: is_work_allowed_here (pl, tool_id, pos) Does not work if "Slice map view" is ena
Post by: prissi on May 20, 2021, 02:58:14 AM
I cannot load this game, it is stuck in an loop during finish reading the map?!?
Title: Re: is_work_allowed_here (pl, tool_id, pos) Does not work if "Slice map view" is ena
Post by: Yona-TYT on May 21, 2021, 11:48:10 AM
Quote from: prissi on May 20, 2021, 02:58:14 AM
I cannot load this game, it is stuck in an loop during finish reading the map?!?
I have no idea what the problem is, here it loads correctly using pak128.

https://www.mediafire.com/file/4wa1p2nadfdfch9/test-tunnel.sve/file
Title: Re: is_work_allowed_here (pl, tool_id, pos) Does not work if "Slice map view" is ena
Post by: prissi on May 21, 2021, 12:42:50 PM
You have somehow created a tunnel without any direction. One can either build a rail on the other side od continue it in full underground mode.
Title: Re: is_work_allowed_here (pl, tool_id, pos) Does not work if "Slice map view" is ena
Post by: Yona-TYT on May 22, 2021, 01:07:14 PM
Quote from: prissi on May 21, 2021, 12:42:50 PMYou have somehow created a tunnel without any direction. One can either build a rail on the other side od continue it in full underground mode.
I built the entrance to the tunnel by holding down the Ctrl key, these tunnels worked well before, now the tutorial scenario stagnates here.  :(
Title: Re: is_work_allowed_here (pl, tool_id, pos) Does not work if "Slice map view" is ena
Post by: prissi on May 22, 2021, 03:09:42 PM
Before the tunnel prtoal had also a connected way. I forgot when this was removed.
Title: Re: is_work_allowed_here (pl, tool_id, pos) Does not work if "Slice map view" is ena
Post by: Yona-TYT on May 24, 2021, 01:14:41 AM
Quote from: prissi on May 22, 2021, 03:09:42 PMBefore the tunnel prtoal had also a connected way. I forgot when this was removed.
Mr. Prissi, read this topic: https://forum.simutrans.com/index.php/topic,18238.msg173316.html#msg173316
Quote from: Dwachs on June 04, 2018, 04:55:48 PM
Could be this commit
https://github.com/aburch/simutrans/commit/6415f38796062b169c47c905a029ad0ada909012

There was problem that sometimes tunnel tiles were created, where they should not be: If build single tunnel portal on a lonely artificial slope with no hill behind. Afaict this commit brought back even older behavior to not create the extra tunnel tiles.

Title: Re: is_work_allowed_here (pl, tool_id, pos) Does not work if "Slice map view" is ena
Post by: prissi on May 24, 2021, 02:04:52 AM
I think a tunnel portal should never return zero ribi but rather full ribi in its direction.

EDIT: The underground tool is somewhat broken. It works only with control in sliced mode, no matter what ribis. Hmm.
Title: Re: is_work_allowed_here (pl, tool_id, pos) Does not work if "Slice map view" is ena
Post by: prissi on June 03, 2021, 05:42:32 AM
The construction works in r9856
Title: Re: is_work_allowed_here (pl, tool_id, pos) Does not work if "Slice map view" is ena
Post by: Yona-TYT on June 27, 2021, 03:23:52 PM
Quote from: prissi on June 03, 2021, 05:42:32 AM
The construction works in r9856
Mr. Prissi, I have verified that in pak64 the tunnels work well, but in pak128 they do not work, does this have something to do with the half-height slopes?.