FS#4700 - New AIConfig flag: AICONFIG_AI_DEVELOPER - hides setting unless user have gui.ai_developer_tools = 1

Attached to Project: OpenTTD
Opened by Leif Linse (Zuu) - Friday, 29 July 2011, 22:54 GMT
Last edited by Thijs Marinussen (Yexo) - Tuesday, 08 November 2011, 21:49 GMT
Type Patch
Category Script
Status Closed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No


This patch adds a new flag AICONFIG_AI_DEVELOPER that an AI author can use in info.nut to indicate that an AI setting should only be available if the OpenTTD user have gui.ai_development_tools enabled.

The motivation for this patch is that AI authors can have a need for settings in their AI for development, which no user would have any use for. This patch make it possible for AI authors to add these settings but hide them from regular users so that the AI Settings window does not get cluttered.

The patch has been tested to be functional. An AI that demonstrate the patch has also been attached (ai_dev_test.tar).

How to test:
- Click AI Settings in game menu
- Select the "AI Dev Test" AI
- Click to configure the AI
- Open the console and toggle gui.ai_developer_tools on and off

When gui.ai_developer_tools is enabled an extra setting "Debug: Clock AI performance" show at the bottom of the window.
This task depends upon

Closed by  Thijs Marinussen (Yexo)
Tuesday, 08 November 2011, 21:49 GMT
Reason for closing:  Implemented
Additional comments about closing:  In r23169, thanks for the patch