News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

get obj_desc from the selected tool

Started by Yona-TYT, March 04, 2018, 12:01:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yona-TYT



This is to get more information about the selected tool, since the "tool_id" is not enough in some cases, such as differentiating road prices for example.

current_tool().get_obj_desc_x()



Dwachs

What would you like to do with this information?
Parsley, sage, rosemary, and maggikraut.

Yona-TYT

In the tutorial, it is to be more specific with the tool that needs to be used ... for example, to obtain the name of the object, to know if the station is of passengers or merchandise, to know the maximum speed of the road ... of this way you have more control of the tools when restricting an action.

Yona-TYT


Dwachs

yes, exactly. There is no interface in the program to get these desc-objects from the tool. Each tool does this slightly differently.
Parsley, sage, rosemary, and maggikraut.