Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#54 closed task (released)

Add Army support to WarFoundryFactory

Reported by: ibboard Owned by: ibboard
Priority: major Milestone: WarFoundry 0.1
Component: WarFoundry-API Version:
Keywords: Cc:
Blocked By: Blocking:

Description

As well as saving armies in #53 we need to be able to load them back in to WarFoundry. The WarFoundryFactories should handle Army files.

This ticket isn't necessarily dependant on #53 as test files can be created by hand.

Change History (20)

comment:1 Changed 11 years ago by ibboard

Owner: ibboard deleted

Remove owner so that the team can more easily see bugs. Using default owners seems good at first but is bad practice when a team can be working on any part of the project.

comment:2 Changed 10 years ago by ibboard

Owner: set to ibboard
Status: newaccepted

comment:3 Changed 10 years ago by ibboard

(In r201) Re #53: Create XML army saver

  • Fix file extension (noticed while working on re #54)

comment:4 Changed 10 years ago by ibboard

(In r202) Re #54: Add army loading support

  • Add method to loader to try to load an army from a specific file

comment:5 Changed 10 years ago by ibboard

(In r203) Re #54: Add Army support to WarFoundryFactory

  • Stop "custom equipment" node being mandatory
  • Remove unused "ratio" definition
  • Change "integer or ratio" definition to "integer or percentage"
  • Use "integer or percentage" definition in army XSD
  • Add exception to say that required objects were missing (Game System and Race)
  • Throw exceptions on creating army if game system or race is missing

Re #53: Add saving of Army to XML file

  • Add namespace attributes to XML root node

comment:6 Changed 10 years ago by ibboard

(In r204) Re #54: Add Army support to WarFoundryFactory

  • Correct name of fetched attribute for game system in army file

comment:7 Changed 10 years ago by ibboard

(In r205) Re #54: Add Army support to WarFoundryFactory

  • Make sure that race and sub-race IDs are lower case so that we can find them when we load

comment:8 Changed 10 years ago by ibboard

(In r208) Re #54: Add Army support to WarFoundryFactory

  • Separate out army parsing to a separate class to make unit loading easier

comment:9 Changed 10 years ago by ibboard

(In r210) Re #54: Add Army support to WarFoundryFactory

  • Add starts of army unit loading

comment:10 Changed 10 years ago by ibboard

(In r211) Re #54: Add army loading support

  • Fix exceptions when loading army with units:
    • Remove obsolete methods
    • Add EnsureLoaded call to various getters to make sure that all required values are always loaded

comment:11 Changed 10 years ago by ibboard

(In r212) Re #54: Add army loading

  • Add unit to army once it is loaded

comment:12 Changed 10 years ago by ibboard

(In r214) Re #54: Add army file loading

  • Add equipment loading (currently fails because of ID mismatch - in the test race we create UnitEquipmentItems with the ID Empire1equip1 but in the army saving/loading we use equip1)

comment:13 Changed 10 years ago by ibboard

(In r215) Re #54: Add army loading

  • Fix army loading by writing out the correct ID for the equipment items when we save

comment:14 Changed 10 years ago by ibboard

(In r216) Re #127: Unit creation always assigns default equipment

  • Add and use new constructor for Unit that doesn't assign default values

Re #54: Add Army support to WarFoundryFactory

  • Load unit name and unit size

comment:15 Changed 10 years ago by ibboard

(In r217) Re #54: Add Army support to WarFoundryFactory

  • Handle empty string as well as null for ID to mean "auto-generate"

comment:16 Changed 10 years ago by ibboard

Core loading now appears to be working. Ticket #130 created to follow up with "extra" functionality.

comment:17 Changed 10 years ago by ibboard

Resolution: fixed
Status: acceptedclosed

comment:18 Changed 10 years ago by ibboard

released: 1

Mark released changes as released

comment:19 Changed 10 years ago by ibboard

released: 1yes

Mark released fixes as released using radio values

comment:20 Changed 10 years ago by ibboard

Resolution: fixedreleased

Mark fix as released under a previous version

Note: See TracTickets for help on using tickets.