News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

problem hm_toolkit functions - Simutrans 124.3.1 r11671

Started by Andarix, April 17, 2025, 07:45:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andarix

I'm not sure if this is a bug or a programming issue.

The toolkit functions seem to be executed automatically with the new coordinates as long as a script tool is active.


I've expanded the airport script tool and added a rotation that attaches the airport stops to existing stops.

This only works correctly, however, if the tool is deselected and reselected after the first airport is built.

If it remains active, the previous airport will be rebuilt at the new coordinates during the run. Then an attempt will be made to build the correct alignment over it. Of course, this doesn't work because the fields are already occupied.

I know it's hard to understand.

In the image, I'm stopping the script at line 80. Up to this point, no construction function has been called. Nevertheless, the runway (the two spaces in front) has already been built.



https://files.simutrans-germany.com/upload/script_tools_fh_neu.zip

THLeaderH

#1
So do you have the issue in using the function in hm_toolkit_v3? It would be appreciated if you paste the code in which you have the problem.
I noticed that the code is attached. Let me take a look.
(I have not maintained this library for a long time...)

Andarix

The toolkit is built into Simutrans, but has been modified and expanded.

simutrans/script/

I submitted most of my changes to the Git repo via a request. I don't know if they're still there, because I've since deleted the fork.