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 generate_packets.py (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:

  <http://gna.org/patch/?1446>

_______________________________________________
  Nachricht geschickt von/durch Gna!
  http://gna.org/


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

Reply via email to