[Freeciv-Dev] Re: Fundamentalism form of government (PR#931)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sat, Sep 01, 2001 at 11:54:40AM -0700, Davide Pagnin wrote:
> Hi All!
> Content-Type: multipart/mixed; boundary="------------73F22BD7BF932EAEC421E15F"
>
> This is a multi-part message in MIME format.
> --------------73F22BD7BF932EAEC421E15F
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> Hi All!
>
> This is the patch that tries to introduce fundamentalism.
>
> Try it and comment!
>
> Ciao, Davide
> + if (government_has_flag(g, G_REDUCED_RESEARCH)) {
> + if (sci_rate > 50) {
> + tax_rate = 50 - lux_rate;
> + sci_rate = 50;
> + }
> + }
I would write this as:
> + if (government_has_flag(g, G_REDUCED_RESEARCH)) {
> + if (sci_rate > 50) {
> + sci_rate = 50;
> + tax_rate = 100 - sci_rate - lux_rate;
> + }
> + }
> + if (government_has_flag(g, G_NO_UNHAPPY_CITIZENS)) {
> + pcity->ppl_content[4] += pcity->ppl_unhappy[4];
> + pcity->ppl_unhappy[4] = 0;
> + pcity->ppl_residue[4] = 0;
> + }
For robustness this may be written as
> + if (government_has_flag(g, G_NO_UNHAPPY_CITIZENS)) {
> + pcity->ppl_content[4] += pcity->ppl_unhappy[4] + pcity->ppl_residue[4];
> + pcity->ppl_unhappy[4] = 0;
> + pcity->ppl_residue[4] = 0;
> + }
> /**************************************************************************
> ...
> **************************************************************************/
> +int unit_has_flag(struct unit_type *ut, int flag)
> +{
> + assert(flag>=0 && flag<F_LAST);
> + return BOOL_VAL(ut->flags & (1<<flag));
> +}
This is a nice addition but it should be included separately.
> + F_FANATIC, /* Only Fundamentalist govern can build */
/* Only a Fundamentalist government can build these units */
Overall good at the first glance. Since Fundamentalism is on the todo
list and also the roadmap I see no problem of including it.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
1 + 1 = 3, for large values of 1
- [Freeciv-Dev] Re: Fundamentalism form of government (PR#931), Davide Pagnin, 2001/09/01
- [Freeciv-Dev] Re: Fundamentalism form of government (PR#931),
Raimar Falke <=
- [Freeciv-Dev] Re: Fundamentalism form of government (PR#931), Christian Knoke, 2001/09/02
- [Freeciv-Dev] Re: Fundamentalism form of government (PR#931), Jason Dorje Short, 2001/09/02
- [Freeciv-Dev] Re: Fundamentalism form of government (PR#931), Raimar Falke, 2001/09/02
- [Freeciv-Dev] Re: Fundamentalism form of government (PR#931), Reinier Post, 2001/09/03
- [Freeciv-Dev] Re: Fundamentalism form of government (PR#931), Raimar Falke, 2001/09/03
- [Freeciv-Dev] Re: Fundamentalism form of government (PR#931), Justin Moore, 2001/09/03
- [Freeciv-Dev] Re: Fundamentalism form of government (PR#931), Miguel Farah F., 2001/09/03
[Freeciv-Dev] Re: Fundamentalism form of government (PR#931), Trent Piepho, 2001/09/02
|
|