The International Simutrans Forum

Development => Scripting Scenarios and AI => Topic started by: Andarix on October 31, 2024, 10:41:17 PM

Title: function rules.allow_tool()
Post by: Andarix on October 31, 2024, 10:41:17 PM
It's strange, with rules.forbid_tool() you can hide toolbar buttons.

But with rules.allow_tool() you can't show them.

It works with normal tools.

https://dwachs.github.io/simutrans-sqapi-doc/classrules.html (https://dwachs.github.io/simutrans-sqapi-doc/classrules.html)
Title: Re: function rules.allow_tool()
Post by: Andarix on November 01, 2024, 10:09:44 AM
It's possible that this is because no tools are allowed for the menu. Empty menus are hidden.

The tutorial is quite confusing on this point.
Title: Re: function rules.allow_tool()
Post by: Andarix on November 02, 2024, 10:55:42 AM
sorry, function works correct