[Freeciv-tickets] [freeciv] #41118: Increase city owned counter as needed

Back to archive index
OSDN Ticket System norep****@osdn*****
Fri Feb 11 01:14:12 JST 2022


#41118: Increase city owned counter as needed

  Open Date: 2021-01-08 06:04
Last Update: 2022-02-11 01:14

URL for this Ticket:
    https://osdn.net//projects/freeciv/ticket/41118
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=41118

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2022-02-11 01:14 Updated by: lachu

Comment:

Reply To cazfi
- You should iterate over counters_city (so you would get only city targeted counters), and increase all with the type COUNTER_OWNED, not just one
- Find the counters to update by the type COUNTER_OWNED, not by the name that will be ruleset defined in the future and will be different for each counter even if they have the same type
- Style: 'a++' instead of '++a' when it makes no difference


I only forgot to repair coding-style. And there is still error causes first city on list has save-game (or load-game) problems

---------------------------------------------------------------------
Ticket Status:

      Reporter: cazfi
         Owner: (None)
          Type: Patches
        Status: Open
      Priority: 5 - Medium
     MileStone: 3.2.0
     Component: General
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

Increase city owned counters (type COUNTER_OWNED) by one every turn. Reset it to zero when city changes owner.
It's best to introduce counter iterator macros already, and use them to find counters to update. This makes it to work when number and order of counters is no longer hardcoded in the future.
Test this by checking from a savegame that counter information saved is what it should.

-- 
Ticket information of Freeciv project
Freeciv Project is hosted on OSDN

Project URL: https://osdn.net/projects/freeciv/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/freeciv/ticket/41118
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=41118



More information about the Freeciv-tickets mailing list
Back to archive index