Project

General

Profile

Actions

Feature #2052

open

improve reporting of obsolete wonder

Added by Dean Brown 1 day ago. Updated 1 day ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Server
Target version:
-
Start date:
06/14/2026
Due date:
% Done:

0%

Estimated time:

Description

Currently, when a wonder is obsoleted by a discovery, it only gets reported if
the obsolete_by has "range" = "World" and "survives" = TRUE. I would like to
get notified when the "range" = "Player". Yes I should know that I'm
researching something that will obsolete my wonder, but I also appreciate
getting notified when my Barracks gets sold when I get Gunpowder. Also should
handle "range" = "Team" and "range" = "Alliance".

Also, as is, if "survives" = FALSE then the wonder still becomes obsolete
but there's no notification. Note - for "Tech", "survives" only supported
for range "World".

Another can of worms - if "survives" = FALSE then does the wonder suddenly
come back to life if the tech is lost? Pretty unlikely, not sure it's
worthwhile to deal with that.


Files

2052.patch (3.79 KB) 2052.patch good for S3_2 & S3_3 Dean Brown, 06/14/2026 07:36 AM
2052_Main.patch (3.17 KB) 2052_Main.patch Dean Brown, 06/14/2026 07:36 AM
Actions #2

Updated by Marko Lindqvist 1 day ago

struct player *city_owner

Please rename so that it's not using the same name as an existing (and relevant) function

player_by_number(research_number(presearch));

I don't think this works the way you expect it to do, especially when team shared research is enabled.

- Missing empty line between variable declarations and code
- Do not use 'default' case but list all the ranges explicitly, so that when support for a new range is added, the compiler will error if its effect on this switch is not considered
- All this should be within the "if (pobs->source.kind VUT_ADVANCE && pobs->source.value.advance vap ... ) {" , and most of it should be within "if (pcity != nullptr) {"

&& pplayers_allied(new_tech_player, city_owner)) {

Here relying on a single player as new_tech_player breaks. The wonder will get obsolete if any of the players sharing the research is allied with the city owner.

Actions

Also available in: Atom PDF