Bug #2087
closed
Related issue - all req types are currently accepted by obsolete_by requirement vectors
without any checking, and could be nonsensical or could change back, e.g.
type Gov, if Democracy obsoletes a building and it doesn't get sold off before
the Gov changes again, the building becomes not obsolete. I think obsolete_by requirement vectors
should only allow one-way ratchet type req types. Needs a separate issue.
- Target version set to 3.3.0-d3f
- Blocks Task #1631: S3_3 datafileformat freeze (d3f) added
- File deleted (
2087.patch)
Thought about it some more and changed my mind. In the real world "obsolete" is permanent, but in the freeciv world it isn't, a tech can get lost or a building sabotaged, and suddenly an improvement becomes non-obsolete again. So forget about one-way ratchet type req types. And yes some req types are nonsensical for obsolete_by, but there's also plenty of effect types for which some req types are nonsensical and we just silently ignore them. So forget about screening req types for obsolete_by. The nonsensical req types are also not likely to ever get used.
I think it's worthwhile generalizing handling of selling obsolete buildings, beyond just obsolete_by req types "Tech" & "Building". The others I think most likely to ever get used are "Achievement" & "Age". To handle "Age", remove_obsolete_buildings(pplayer) needs to be called every turn. Doing it that way covers all possible req types. That call has to be near the end of end_phase() after everything has happened that could affect obsolete_by reqs.
- File deleted (
2087.patch)
- Status changed from New to In Review
- Assignee set to Marko Lindqvist
Just a note (maybe for NEWS), I'm not against the patch:
This introduces a rule change that buildings now provide full benefit still at the turn they are sold (since selling now happens later).
Yes, and also the gold upkeep gets charged.
Thought it would be nice if the selling off could happen before paying for it, but completing a building happens much earlier in the new turn processing, before achievements are checked and turn counter incremented.
- Status changed from In Review to Closed
Also available in: Atom
PDF