Follow-up Comment #1, patch #1446 (project freeciv):

some ideas about the ruleset rework:

1) at the moment all ruleset data used in the ruleset files is saved in the
packet_ruleset_*  structs; so use them for a ruleset object:

struct ruleset {
  struct packet_ruleset_game game;
  /* speclist of struct packet_ruleset_specialist */
  struct packet_ruleset_specialist_list specialists;

2) simplify the transfer of the ruleset; the available structs can be used;
use the new ruleset struct everythere (if possible)

3) split the current ruleset file in two parts (and use code from the ruleset
check on client side):
   * load the data into the new ruleset object (loading the ruleset)
   * verify the data (loading the ruleset _and_ verifying the transferred
ruleset on client side)

4) write a simple function which transforms the ruleset struct into a
secfile; perhaps this could be done in (save/write)? Only
the packet_ruleset_* objects and the enums / values for the bv_* variables has
to be saved

This way the ruleset directory can easily transformed into one (not easy to
read?) ruleset file and the ruleset can also be saved in the savegame file.

With regard to the nations save only the names and load only the nations
which are available and on the list.

What do you think about this?


Reply to this item at:


  Nachricht geschickt von/durch Gna!

Freeciv-dev mailing list

Reply via email to