[Freeciv-Dev] (PR#14652) Patch proposal: resources cleanup
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=14652 >
Having read the design (but not the patch) here are my thoughts.
First of all, this is a big change (175k patch) that's going to take
some time to work on. However, this is a change that I've long wanted
and it would be nice to get it in before 2.1...though we will not hold
up 2.1 waiting for it.
Next, I agree "specials" is a bad name. "Resources" is a bit better,
though perhaps not perfect in the context of my intended design (see
below). "Infrastucture" and "modifications" are also possible terms
("infrastrucutre" is used in the code in a few places).
Now, as for the design I had originally envisioned: I want to replace
hard-coded specials entirely. Resources/modifications/infrastructure
should be defined entirely from the ruleset. This allows great
flexibility in that the ruleset can then also define what each activity
does to each infrastructure and what effects each bit of infrastructure
has. However there are definite problems too...
Your approach has a lot of the benefits of my target design, while
avoiding most of the problems (which are mostly tied to hard-coding of
infrastructure).
One of the biggest problems is savegame compatiblity. We don't have to
worry about network compatiblity; just bump the capstring and be done
with it. But we really do want to keep savegame compatility. This
means providing upgrade code in savegame.c that interprets old savegames
based on a capstring and loads them properly. This probably means each
resource needs to list its old special "number" so that when loading
specials we can properly translate them into resources.
That's all for now...I will look at the patch more closely in the next
couple days (if I don't have something more to say on this ticket,
remind me about it).
-jason
|
|