Ticket #48391

update_city_activity() mishandling gold surplus

Open Date: 2023-07-11 10:13 Last Update: 2023-07-31 05:33

Reporter:
Owner:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
1

Details

update_city_activity() does not use gold surplus, but tries to recalculate it itself:

    /* Update the treasury. */
    pplayer->economic.gold += pcity->prod[O_GOLD];
    pplayer->economic.gold -= city_total_impr_gold_upkeep(pcity);
    pplayer->economic.gold -= city_total_unit_gold_upkeep(pcity);

This breaks Surplus_Waste -effects, and was also mentioned in https://www.hostedredmine.com/issues/892050

Ticket History (3/5 Histories)

2023-07-11 10:13 Updated by: cazfi
  • New Ticket "update_city_activity() mishandling gold surplus" created
2023-07-22 04:14 Updated by: cazfi
  • Details Updated
2023-07-22 06:30 Updated by: cazfi
  • Owner Update from (None) to cazfi
  • Resolution Update from None to Accepted
  • Milestone Update from (None) to 3.0.9 (closed)
Comment

Reply To cazfi

This breaks Surplus_Waste -effects

For that reason only main/S3_2 affected. Still, I'd want the fix to S3_1 and even to S3_0 too, to act as a baseline for other fixes.

2023-07-31 05:33 Updated by: cazfi
  • Status Update from Open to Closed
  • Resolution Update from Accepted to Fixed
Comment

Reply To cazfi

This breaks Surplus_Waste -effects

For that reason only main/S3_2 affected. Still, I'd want the fix to S3_1 and even to S3_0 too, to act as a baseline for other fixes.

Edit

Please login to add comment to this ticket » Login