[Freeciv-Dev] Re: (PR#5568) add I_DEMOLISHED Impr_Status
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Mike Kaufman wrote:
> Here is a patch that adds I_DEMOLISHED Impr_Status. It is needed for
> general effects.
>
> If a building has an effect which survives the building's destruction, then
> the client (and the savegame) needs to know about it.
>
> Though I believe that this patch is needed, I'm becoming more and more
> convinced that a generalized 'effect survival' is a bleedin' nightmare. I
> already have it in the effects code that a building that is demolished and
> rebuilt in the same city will NOT confer the same effect twice. That's no
> problem and warranted.
>
> The problem comes on city destruction. What happens if a building confers a
> global effect that survives and then its city is destroyed. We still want
> that effect active (Apollo and Manhattan are examples). Where is the effect
> stored in a savegame? Currently we have a destroyed_wonders field which can
> be transformed into a global_improvements field: a array of B_LAST elements
> that counts the total number of improvments for everybody. But we would
> also need such an array for each player (Player range) and each island
> (Island range). Unless we restrict .survives in some way, I don't see
> another way.
Indeed.
> Maybe it's time to think hard about breaking forward compatibility for
> savegames (i.e. 1.14 servers won't be able to load [correctly] games saved
> with 1.15 servers).
Um, do we have forward compatability now? I wouldn't bet on it...
jason
|
|