Re: [Freeciv-Dev] rulesets, part1
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Lindqvist Marko <caz@xxxxxxxxxxxxxxxxx> wrote:
[rulesets, building variants]
> You can always make it better later.
Indeed.
> Probably different variants
> should have different scale for future compatibility. Currently
> all variants can have values beginning from 0. Instead we should
> reserve values 0 and 1 for barracks only, values 2 and 3 for
> city walls only (work like values 0 and 1 currently). So it
> would later be possible to detect effects building is giving
> from variants. Would it be possible to implement variables this way?
Hmm, maybe, though it would make the current system (before
things get generalized properly) a bit ugly/confusing.
Not sure...
> > If the Granary "effect" was generalized, the server would
> > have to look through all the buildings to see if there was
> > a relevant effect.
>
> How about making array of pointers to buildings having granary -like
> effect at startup and later check only buildings in that array? Same
> kind of arrays would be created for all different effects.
Yes. In fact in the rulesets patch (part 2) I did something
very much like this for unit flags (and new "roles", similar to
flags) so that, eg, the server can quickly iterate through units
with a given flag or role.
Regards,
-- David
|
|