Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#61 closed task (released)

Complete structure of WarFoundry API objects

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

Description

Following the WarFoundry schema work, the classes in the API don't all relate to the new location of attributes and the importance of different objects (some focus has been shifted). All of the classes should be brought up to date with the new schema.

Change History (19)

comment:1 Changed 11 years ago by ibboard

Status: newaccepted

comment:2 Changed 11 years ago by ibboard

(In r89) Re #61 - Complete structure of WarFoundry API objects

  • Remove min/max from EquipmentItem and add description
  • Add min/max numbers and percentages to UnitEquipmentItem
  • Make Race schema define min/max number without the ratio (which is the percentage)
  • Replace use of EquipmentItem with UnitEquipmentItem because of increased use of UnitEquipmentItem for unit-specific data
  • Use doubles instead of floats for equipment amounts
  • Distinguish between ratio and absolute limits
  • Delete UnitEquipmentItemObj helper class that was purely used for UI

Re #9 - Use smaller methods

  • Deprecate long Race and EquipmentItem constructors and ensure all getters/setters exist

Also:

  • Migrate Unit to using genericed collections
  • Always use GameSystem object for Race, not ID string

comment:3 Changed 11 years ago by ibboard

(In r90) Re #61 - Complete structure of WarFoundry API objects

  • Update to using UnitEquipmentItem where properties have moved from EquipmentItem
  • Add UnitEquipmentChoice as replacement for UnitEquipmentItemObj

comment:4 Changed 11 years ago by ibboard

(In r92) Re #61 - Complete structure of WarFoundry API objects

  • Add adding of abilities and equipment to UnitType
  • Add getting of all, required and optional abilities
  • Add UnitAbility class to store UnitType's reference to Ability object

Also:

  • Convert UnitType to using Genericed collections
  • Reduce visibility of properties to private

comment:5 Changed 11 years ago by ibboard

(In r93) Re #61 - Complete structure of WarFoundry API objects

  • Add methods for adding and getting Notes and contained UnitTypes of a UnitType
  • Add method to get requirements of a unit
  • Separate out required abilities from optional abilities
  • Remove UnitAbility and handle by passing a boolean to the AddAbility method

comment:6 Changed 11 years ago by ibboard

(In r94) Re #61 - Complete structure of WarFoundry API objects

  • Migrate AddUnit/RemoveUnit methods to Army for easier army loading
  • Migrate requirement checking call to Army, since ArmyCategory just called parent army anyway

Also:

  • Use genericed collections in Army
  • Remove failed unit requirements from ArmyCategory
  • Alter army.xsd to stop negatives in equipment amounts

comment:7 Changed 11 years ago by ibboard

(In r95) Re #61 - Complete structure of WarFoundry API objects

  • Allow units to have zero members to handle meta-units where all members are individuals "contained" by the unit

comment:8 Changed 11 years ago by ibboard

(In r96) Re #61 - Complete structure of WarFoundry API objects

  • Add containership in Army schema so that it can be stored and retrieved

comment:9 Changed 11 years ago by ibboard

(In r97) Re #61 - Complete structure of WarFoundry API objects

  • Add containership support to Unit class
  • Add method to UnitType to check if a UnitType is of an allowed type

comment:10 Changed 11 years ago by ibboard

(In r98) Re #61 - Complete structure of WarFoundry API objects

  • Add CompositeEquipmentItem to handle composite items in Army schema

comment:11 Changed 11 years ago by ibboard

(In r99) Re #61 - Complete structure of WarFoundry API objects

  • Use correct name for variable in constructor

comment:12 Changed 11 years ago by ibboard

(In r102) Re #61 - Complete structure of WarFoundry API objects

  • Make Unit work with EquipmentItem objects as it doesn't need to know about the limits
  • Add methods to UnitType to check limits on an EquipmentItem

Also:

  • Remove some unnecessary casting now that we're using genericed lists

comment:13 Changed 11 years ago by ibboard

(In r103) Re #61 - Complete structure of WarFoundry API objects

  • Add parent links to Units (inverse of r97)

comment:14 Changed 11 years ago by ibboard

Resolution: fixed
Status: acceptedclosed

Closing - we seem to have everything so far.

comment:15 Changed 11 years ago by ibboard

(In r104) Re #61 - Update classes to match schema

  • Add "extra data" methods to UnitType, since it may be used for requirements and we can't guarantee that the data can be fetched at the time of requirement creation

no-open-ticket

comment:16 Changed 10 years ago by ibboard

(In r123) Re #61 - Complete structure of API objects

  • Add methods for new cost multiplier and rounding
  • Reduce "train wreck" code by making some EquipmentItem properties visible on the UnitEquipmentItem

no-open-ticket

comment:17 Changed 10 years ago by ibboard

released: 1

Mark released changes as released

comment:18 Changed 10 years ago by ibboard

released: 1yes

Mark released fixes as released using radio values

comment:19 Changed 10 years ago by ibboard

Resolution: fixedreleased

Mark fix as released under a previous version

Note: See TracTickets for help on using tickets.