[Freeciv-tickets] [freeciv] #45895: Pop units in build slots > 1 reduce the population of the city even when deletetd/postponed from not fulfilling build reqs

Back to archive index
OSDN Ticket System norep****@osdn*****
Thu Oct 20 08:16:13 JST 2022


#45895: Pop units in build slots > 1 reduce the population of the city even when deletetd/postponed from not fulfilling build reqs

  Open Date: 2022-10-17 21:06
Last Update: 2022-10-20 08:16

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

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

Last Changes/Comment on this Ticket:
2022-10-20 08:16 Updated by: Anonymous

Comment:

Yeah you're right
It's also true that if you later upgrade the build slot behaviour in 3.x, the way city_build_unit() is currently coded will fail from this unnecessary bad logic. So it's not a bug, it's a logic trap waiting to happen when build slots are later empowered more. The good news is that it could easily be made to work for status quo AND for future build slot empowerment, by simply NOT reducing population for a unit that couldn't be made... 
It makes more logical sense to only reduce pop if the unit could be made, than to ASSUME some other function prevents population units from being made (which later might change.)
Also, what are the reasons the restrictions were there? I might as well fix those. ;)
Because, THOUGHT OF THE DAY...
A future with high city_radius_sq and even more build slot flexibility, it seems to be the key to the future of games without micro-managing 200 cities, in large global multiplayer games with 25+ players.

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

      Reporter: (Anonymous)
         Owner: (None)
          Type: Bugs
        Status: Open
      Priority: 5 - Medium
     MileStone: (None)
     Component: (None)
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

Blamed: city_build_unit()
Pop reduction actions need to be INSIDE the {{{ code c 
if (punit) {
...
}
}}}
Otherwise if punit == NULL because illegal to build, it will still reduce the population.

-- 
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/45895
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45895



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