#3911 closed enhancement (fixed)

[PATCH] Make AI Settings visible to players

Reported by: Imarok Owned by: Imarok
Priority: Nice to Have Milestone: Alpha 21
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description

It would be nice if players in the multiplayer gamesetup can see the AI settings but not modify them (as it is made with "More Options")

Attachments (3)

visible_ai_setting.patch (4.3 KB) - added by Imarok 20 months ago.
Makes AI settings visible to all players but only let the controller change them
visible_ai_setting_v1.1.patch (4.7 KB) - added by Imarok 19 months ago.
cleanup
visible_ai_setting_v2.patch (6.4 KB) - added by elexis 19 months ago.
Update the window when settings were changed.

Download all attachments as: .zip

Change History (10)

Changed 20 months ago by Imarok

Attachment: visible_ai_setting.patch added

Makes AI settings visible to all players but only let the controller change them

comment:1 Changed 20 months ago by Imarok

Keywords: review patch added
Milestone: BacklogAlpha 21
Summary: Make AI Settings visible to players[PATCH] Make AI Settings visible to players

comment:2 Changed 19 months ago by elexis

Keywords: gamesetup removed
Type: defectenhancement
  • if( should be if (
  • Introduce variables for the new GUI Objects
  • Set all attributes of a GUI object in the same place
  • It would be nice if the AIconfig page automatically updates if the host changed settings, don't know if it's easily possible (reopening the window?).

Changed 19 months ago by Imarok

cleanup

comment:3 Changed 19 months ago by Imarok

The automatic update seems to be very much work, so I'll don't make it as it is not that important.

comment:4 in reply to:  3 ; Changed 19 months ago by elexis

Replying to Imarok:

The automatic update seems to be very much work, so I'll don't make it as it is not that important.

Excuses ;) Not much work at all, see attached patch. You just need a new global in the gamesetup which recalls if you just opened that dialog. If that's the case and new gamesettings arrived, close and reopen the dialog. I couldn't notice the reopening visually. When the dialog is closed, the variable has to be reset, that's all. This way passing the data is a bit cleaner too:

  • no derivation of g_IsController from the callback argument
  • no new if in returnAI() and g_IsController doesn't need to be global

The comment // required by the callback function won't be needed anymore, as it's kinda trivial.

So please review my patch, try to prove that it's broken and in case it is not, I'll commit it and you still get the credit for writing the base of the patch.

Changed 19 months ago by elexis

Attachment: visible_ai_setting_v2.patch added

Update the window when settings were changed.

comment:5 in reply to:  4 Changed 19 months ago by Imarok

Replying to elexis:

Replying to Imarok: you still get the credit for writing the base of the patch.

That isn't that important :D My main goal is to improve the game and not to appear in credits ;) (I'll review it today)

comment:6 Changed 19 months ago by Imarok

Keywords: review removed

comment:7 Changed 19 months ago by elexis

Resolution: fixed
Status: newclosed

In 18078:

Reveal AI settings in the gamesetup to all players. Based on patch by Imarok, fixes #3911.

Note: See TracTickets for help on using tickets.