The International Simutrans Forum

 

Author Topic: is_work_allowed_here (pl, tool_id, pos) Does not work if "Slice map view" is ena  (Read 979 times)

0 Members and 1 Guest are viewing this topic.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1730
    • Simutrans-BLOG
  • Languages: ES
 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.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4899
  • Languages: EN, DE, AT
I cannot reproduce. In fact, is_work_allowed_here is spammed with the tunnel tool when the mouse is moving.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1730
    • Simutrans-BLOG
  • Languages: ES
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

 

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10828
  • Languages: De,EN,JP
I cannot load this game, it is stuck in an loop during finish reading the map?!?

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1730
    • Simutrans-BLOG
  • Languages: ES
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

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10828
  • Languages: De,EN,JP
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.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1730
    • Simutrans-BLOG
  • Languages: ES
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.
I built the entrance to the tunnel by holding down the Ctrl key, these tunnels worked well before, now the tutorial scenario stagnates here.  :(

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10828
  • Languages: De,EN,JP
Before the tunnel prtoal had also a connected way. I forgot when this was removed.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1730
    • Simutrans-BLOG
  • Languages: ES
Before 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
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.

 

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10828
  • Languages: De,EN,JP
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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10828
  • Languages: De,EN,JP
The construction works in r9856

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1730
    • Simutrans-BLOG
  • Languages: ES
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?.