News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

squirrel script - bug select tool by key function is_work_allowed_here()

Started by Andarix, January 16, 2026, 03:55:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andarix

Quote from: Andarix on January 12, 2026, 04:06:29 PMThe idea is correct, but the value is wrong.

The `tool_id` is correct. Only the object name is passed differently.

The name is passed via the button.
The value 1 is passed via the key "s".

Screenshot 2026-01-12 165907.png


Docu function
is_work_allowed_here()

The description doesn't seem to be entirely correct either. There, "name" is defined as "coord3d".

I think this is a simutrans bug, not a tutorial bug.

prissi

This is the intended format:
name => object
number => waytype
Only in the later building stages, the object is know, not at the time when the tool is called, since the last waytape is cached with the tool.