[Freeciv-Dev] Re: Turns left to build in citydlg
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Hello Daniel
On 04-Jan-00, Daniel Zinsli wrote:
> Randy Scott <scottr@xxxxxxx> writes:
>> Nice, but it doesn't look like you took into account when the
>> shield_surplus is zero (when the city is revolting, for example).
>> I made a very similar change that I've been playing with for a
>> while now, and that was one of the same mistakes that I made.
> Starting off with a divide-by-zero *blush* :-)
IMO you should move the calculation stuff to gui independ part.
I attached the function I have done in client/gui-mui/citydlg.c.
Preferable the stuff which calculates the shield_stock stuff
should be moved in an extra function. This could then be used
also in the server/cityturn.c (?) file, so all in all the common
dir is the perfect place for these functions. The adventage of this
is that modifing the rules of the shield penalty is very easy
(there was recently a patch which modified the rules a little bit).
bye,
Sebastian Bauer
test.c
Description: Text document
|
|