Project

General

Profile

Bug #856629

Receiving government-enabling tech via treaty doesn't update Governments menu sensitivity

Added by Chippo Elder 6 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Client
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

If you research tech, when you see the above message, you can immediately switch Governments. If you gain tech by trading it, when you see the above message, you have to wait a turn before you can change Governments.

I'm not sure what the right solution is:
- postpone the 'revolution' message until next turn
- allow you to change government right now
but the way it is now is clearly wrong.

I've seen this in master and S3_0, and, -qt and -gtk* clients. I happened to have always been using civ2civ3, but I'd guess the other rulesets have the same problem.

before-monarchy.sav.xz (59.9 KB) before-monarchy.sav.xz Chippo Elder, 2020-01-20 12:57 PM
before-monarchy4.sav.xz (60 KB) before-monarchy4.sav.xz Chippo Elder, 2020-01-20 02:05 PM
m-30-tech-menus-update.patch (1.74 KB) m-30-tech-menus-update.patch master, S3_0 Jacob Nevins, 2020-01-22 12:06 AM
26-tech-menus-update.patch (1.75 KB) 26-tech-menus-update.patch S2_6 Jacob Nevins, 2020-01-22 12:06 AM

History

#1 Updated by Chippo Elder 6 months ago

OK, I know which option is correct. It's the second one, 'cos if at that point, you save the game, quit and then reload it (in both the qt and gtk clients), you can now switch Government the same turn.

Example attached (3.0.92-dev).

#2 Updated by Chippo Elder 6 months ago

Getting a savegame plus a procedure to reliably demonstrate this problem, was a nightmare. But I finally have both.

Load THIS attached savegame (3.0.92-dev) in either qt or gtk3.22 client, buy Monarchy from the Estonians for 180 gold and the Civilization->Government drop-down does not show Monarchy. Doing quite a lot of this doesn't change this and you might feel you have to end the turn. However, if you change the orders for one of your units, then Monarchy becomes available.

#3 Updated by Jacob Nevins 6 months ago

  • Subject changed from 'You may want to start a revolution' timing to Receiving government-enabling tech via treaty doesn't update Governments menu sensitivity

Guessing we're missing a call to menus_update() on receiving some network packet.

#4 Updated by Chippo Elder 6 months ago

I've just seen the same problem in S2_6 (2.6.1+ (1ad829afb6), gui-qt client, civ2civ3).

#5 Updated by Jacob Nevins 6 months ago

This fixes the reproduction case in #2 for me.

(As it happens, I think you wouldn't have been able to reproduce it if you happened to still have a unit selected when concluding the treaty.)

I've also added a menus_update() on receipt of a player_info packet, with the vague notion that the augmented2 modpack (where Palace gates some governments) might somehow get a wonders[] update mid-turn that failed to refresh government sensitivity. (And it doesn't seem likely to be a big performance hit, given what else is already in there.)

#6 Updated by Jacob Nevins 6 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF