On 30/06/2009, Matthias Pfafferodt <matthias.pfaffer...@mapfa.de> wrote:
> I would rename settings as options, ...

In the client the name "option" is already used for settings that
are client-only (client/options.[ch]), so I don't think renaming to
this in the server would be very helpful or useful. Is there some
particular reason why you want to rename "setting" as "option"
in the server?

> ... move the all the struct as well as all the inline functions into
> settings.c and define the missing functions. This way the struct
> is only defined within settings.c (like the struct command in
> command.c).


> 4. possibility of callback functions for options if changed
>   - aifill
>   - aitoggle

(I suppose you meant 'autotoggle' instead of 'aitoggle'.)

Yes, this is probably a good idea. The other possibility is to
change these "side-effect settings" to commands.

> 5. add functions to check / set options
>   - option_check(const struct settings_s *op, union setting_value bisval)
>   - option_set(struct settings_s *op, union setting_value bisval)

It's not really consistent to prefix the functions with "option_"
and then operate on "settings_s" pointers. I would suggest
to just use "setting_" as the prefix and use "setting" as the
struct name, in keeping with general object oriented

You can also call the union something less verbose, perhaps
'union setval' (since it's not really part of the 'setting' "class",
but just a little helper data structure).

> 7. new option
>   - skill <string:easy|normal|hard> skill level of new AI players

Fine, but in its own ticket please (each new feature should
have its own patch).

> 8. new command
>   - default (set default values)

A command to do this has already existed a long time in
warclient; it is called /reset and I think this is a slightly better
name than /default (for example in the future it could take
parameters so you could "/reset settings", "/reset map",
"/reset teams" etc.).

> 9. special fields within the ruleset
>   - game.default = [0/1] if all options should be set to the default values
>   - game.showchanged = [0/1] if changed values should be listed

Is there a reason why you would want to disallow users from
using the '/show changed' command?


Freeciv-dev mailing list

Reply via email to