The International Simutrans Forum

Development => Patches & Projects => Topic started by: Yona-TYT on August 02, 2026, 01:40:31 PM

Title: [API Script] get shortcut keys list from tool ID
Post by: Yona-TYT on August 02, 2026, 01:40:31 PM
This patch retrieves the list of shortcuts associated with a tool ID. I've tested it with the Underground View tool, and it works fine.

I've removed the previous function because the list allows you to do the same thing and more.

Edit.

Update parch.
Title: Re: [API Script] get shortcut keys list from tool ID
Post by: Yona-TYT on August 03, 2026, 01:21:40 PM
I've moved this patch to a separate topic.   ;)
Title: Re: [API Script] get shortcut keys list from tool ID
Post by: prissi on August 03, 2026, 06:44:05 PM
Comparing two plainstrings will compare their char pointers, not their content. Not sure if the code works by accident.
Title: Re: [API Script] get shortcut keys list from tool ID
Post by: Yona-TYT on August 04, 2026, 01:02:13 PM
Quote from: prissi on August 03, 2026, 06:44:05 PMComparing two plainstrings will compare their char pointers, not their content. Not sure if the code works by accident.
So let's use strcmp, (I think Java has spoiled me).

0001-get-shortcut-key-list.patch