Local Storage Implementation


15 issues   (15 closed — 0 open)

Release v0.5.2

This release includes a complete rewrite of the resource handling code and the implementation of storage.


  • Added Storage Tanks structure.
  • Added a Residence Structure.
  • Added ResourcePool interfaces to Structure for resource management of structures that offer resource storage and production.
  • Added a sanity check to GraphWalker class to avoid or note potential null pointer accesses.
  • Added current resource storage vs. total storage available to UI status bar.
  • New colonies now come with a base storage capacity of 250. This can be expanded with storage tanks.
  • Automatic trucking of resources implemented.
  • StructureManager now maintains lists of typed structures.

  • Massive internal code cleanup and refactoring too numerous to list here -- see commit history for details.
  • Moved sprite coloration calls from StructureManager to Structure.
  • Decoupled update and think logic in Structure such that the StructureManager handles how and when structures are updated.
  • IconGrid now sorts items it contains.
  • Pulled old map data files that are no longer used.
  • Pulled TilePositionInfo structure from the code.
  • Moved tile position information into the Tile class itself. Perhaps not the most elegant design but it offers a much easier to understand interface, a lot less potential for bugs and makes it a lot easier to make determinations in the structure graph.
  • incrementAge() function made a private, internal only member of Structure -- prevents future logic mistakes.
  • Updated smelter's resource processing to avoid race condition where only common metals would be updated.
  • Tweaked resource processing of the smelter to make for more balanced resource income. Will likely need future adjustments
  • Command Centers are now flagged as self-sustained.
  • Modified StructureManager such that we can use dependency injection to provide the player's resource pool to structures without having to make it a global variable.
  • Updated StructureManager interfaces for addStructure() and removeStructure() -- these functions no longer return a boolean value (never used, overcomplicates the logic, etc.)
  • Renamed elements in StructureID to prevent future naming conflicts with StructureType enumeration.
  • Updated all code to reflect the change in StructureID naming.
  • Updated Structure to take advantage of the StructureType enumerator instead of storing and setting boolean flags for things like isFactory, providesCHAP, etc.
  • Debug information can be turned on and off with the F10 key (defaults to off).
  • Completely rebuilt how StructureManager identifies and manages structures between different lists.
  • Updated energy UI status bar to show available energy vs. total energy capacity.
  • Structures now cost resources to build.

  • Fixed a mistake in GameState in which clicks within the digger direction dialog were ignored when the dialog was hidden.
  • Fixed a mistake in the logic of several Structures that would make inappropriate calls to incrementAge().
  • Fixed a logic mistake in MineFacility that would set the building to Idle as soon as it became active.
  • Fixed a mistake in ResourcePool where reporting and setting food and energy values were swapped.
  • Fixed another mistake in ResourcePool's operator-=() and operator+=() that was swapping food and energy resources.
  • Fixed a crash bug waiting to happen in StructureTranslator.



Issues by




Redmine Appliance - Powered by TurnKey Linux