News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

tool_id = 4099? What tool is this?

Started by Yona-TYT, July 28, 2021, 04:53:14 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yona-TYT

Quote from: Andarix on November 04, 2024, 10:39:46 AMThe icon for the list tools is displayed as inactive.
Quote from: Andarix on November 04, 2024, 10:39:46 AMThe icon for the special tools is not displayed as inactive.

https://github.com/simutrans/tutorial_pak64/commit/0ca3aefc4326d39cb36e187c482932f8cf7a3f1c
There was a bad id.

Quote from: Andarix on November 04, 2024, 10:39:46 AMAnd the icon for the road tools (0x800e) is not displayed.
This is strange, even returning true in function is_tool_allowed(pl, tool_id, wt) in chapter 6, the roads menu does not appear. :(



Andarix

Quote from: Yona-TYT on November 04, 2024, 11:46:46 AM...
This is strange, even returning true in function is_tool_allowed(pl, tool_id, wt) in chapter 6, the roads menu does not appear. :(


I don't know why the activation doesn't work. I removed the icon from the block list.

https://github.com/simutrans/tutorial_pak64/pull/14


Andarix

class_chapter_07.nut

line 18 define
  t_allowed_list = [
            tool_build_way, tool_build_station, tool_build_depot, tool_build_wayobj, tool_build_roadsign, 4108,
            tool_remove_way, tool_remove_wayobj, tool_make_stop_public, tool_stop_mover, tool_merge_stop, 4103
          ]


This should be controlled via the class_basic_gui.nut.

Yona-TYT

Quote from: Andarix on November 07, 2024, 11:54:55 AMclass_chapter_07.nut
line 18 define
  t_allowed_list = [
            tool_build_way, tool_build_station, tool_build_depot, tool_build_wayobj, tool_build_roadsign, 4108,
            tool_remove_way, tool_remove_wayobj, tool_make_stop_public, tool_stop_mover, tool_merge_stop, 4103
          ]

This should be controlled via the class_basic_gui.nut.
That list is for the is_work_allowed_here function, not for the gui.

Andarix

4103 = tool_clear_reservation

Permitted tools for a chapter are in chapter_step_enabled_tools( pl ). There is currently nothing there for Chapter 7. If no step is specified, the information there applies to the whole chapter.