The International Simutrans Forum

 

Author Topic: Automatically switch to "inspection tool"  (Read 908 times)

0 Members and 1 Guest are viewing this topic.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1845
    • Simutrans-BLOG
  • Languages: ES
Automatically switch to "inspection tool"
« on: June 16, 2020, 03:16:16 AM »

There is a detail when using "rules.forbid_tool" and the tool we are using is no longer available.

It is a bit misleading since sometimes one starts to click without anything happening and then you realize that the tool is no longer there.

It would be good to change to the default selected tool (inspection tool) for those cases.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1845
    • Simutrans-BLOG
  • Languages: ES
Re: Automatically switch to "inspection tool"
« Reply #1 on: June 17, 2020, 02:16:08 PM »
Can you replicate this? It would be great to improve this.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4957
  • Languages: EN, DE, AT
Re: Automatically switch to "inspection tool"
« Reply #2 on: June 18, 2020, 05:24:47 AM »
This can be changed.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4957
  • Languages: EN, DE, AT
Re: Automatically switch to "inspection tool"
« Reply #3 on: June 18, 2020, 06:11:44 AM »
Please test with r9144. The tools should be reset, but only if game is not paused. I added also a routine rules.gui_needs_update to signal this to the scenario. There might be a tiny delay between the call and the actual resetting.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1845
    • Simutrans-BLOG
  • Languages: ES
Re: Automatically switch to "inspection tool"
« Reply #4 on: June 18, 2020, 11:10:30 AM »
Great !!, I'm going to try this !!... :D Edit.
It works very well, thank you very much!. 8)
« Last Edit: June 18, 2020, 12:14:15 PM by Yona-TYT »