Hello all,

at the moment I'm working with the settings definition. It started with the 
idea to load the settings from the ruleset (https://gna.org/bugs/?13621). 
After the discussion to this patch I started to rework the entire settings 
code. With help from mbook and pepeto I did

1. removed the extern flag from settings (https://gna.org/bugs/?13805)
2. created a new definition of the struct settings_s using a union 
(https://gna.org/bugs/?13810)

NOW:

3. A cleanup of the files settings.(c|h).

I would rename settings as options, 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).

TODO:

4. possibility of callback functions for options if changed 
  - aifill 
  - aitoggle 
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) 
6. load options from ruleset 
  - use game.setting.<xyz> for the settings 
7. new option 
  - skill <string:easy|normal|hard> skill level of new AI players 
8. new command 
  - default (set default values) 
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 
  - other commands?

The list can be found at 
http://freeciv.wikia.com/wiki/User:Syntron#Work_in_progress

Matthias
-- 
Matthias Pfafferodt - http://www.mapfa.de
Matthias.Pfafferodt <at> mapfa.de

_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to