Complete.Org: Mailing Lists: Archives: freeciv-dev: June 1999:
Re: [Freeciv-Dev] [2 x Patch] struct government + unit upkeep
Home

Re: [Freeciv-Dev] [2 x Patch] struct government + unit upkeep

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] [2 x Patch] struct government + unit upkeep
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Fri, 4 Jun 1999 14:00:40 +1000

Bobby D. Bryant wrote:

> Keep in mind that the governments might be given different names in a
> modpack, so try to work with the names of government-type technologies
> actually loaded, rather than with the hard-coded constants. 

Good point.  I don't see any problem, since the names are included
in the new struct, and could be handled the same as for units etc.

Though a good goal would be to remove the "enum government_type"
so that nothing depends on the hardwired governments.  That is/was
a goal for units/techs too (but not practical for buildings until
after some (planned) generalisation), though not fully achieved yet.
Of course this all makes AI government choice more difficult...

> Also, I've been wanting to suggest that we allow a variable number of
> government definitions

Agreed, thats a point where the units etc could be improved too.
But note this applies when converting to a ruleset format; for
an intermediate hardwired struct format the number may as well 
be hardwired too.

> Since goverments=techs in the current implementation, one of two
> suggestions might be profitable:
> 
> a) add a flag to techs.ruleset, indicating that the flagged tech is a
> government type, or
> 
> b) divorce the governments=techs association, leave techs.ruleset
> unchanged, and let governments.ruleset specify a technology that is
> required before you can select that government type (i.e., treat
> governments as something you can "do" with a technology, just like
> buildings and units).

b) Seems the obvious way to go to me.  Governments are separate
things from techs, it just happens that for some of them you need 
to research a given tech first, in which case specify that tech
in the ruleset file.  (Or, at the moment, hardwire the tech id
in the government struct, which is equivalent to the current 
situation.)

Regards,
-- David

[Prev in Thread] Current Thread [Next in Thread]