Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » Stars! Nova - Development » FleetIntel question
Re: FleetIntel question Thu, 14 July 2011 05:11 Go to previous messageGo to previous message
Aeglos is currently offline Aeglos

 
Chief Warrant Officer 1
Stars! Nova developer
Stars! Nova developer

Messages: 142
Registered: May 2011
Location: Chile
I just commited r713 with these changes (and some others related as well).

It's just on Stars & Star Reports, so we can still do something else with fleets or change how it works.

I've done the following changes:

  • Item now implements IComparable instead of having a separate SortableItem inside StarMap (was a fixme pri. 5).
  • StarIntel now inherits from Item, but besides that is unrelated to Star OO wise.
  • Star has a method GenerateReport() to return a StarIntel object according to ScanLevel (renamed IntelLevel).
  • StarMap uses only StarReports now.
  • Planet Summary uses StarReports and pulls a couple of things from OwnedStars when needed (Minerals on surface bars mostly).
  • Planet Detail uses OwnedStars only.
  • Moved Star Hab calculations to Race, so that the AI can use them with either stars or reports for colonization. Kinda makes more sense that a race checks hab on a star, than a star for it's race anyway.


Again, I found that the 'has a' approach was equally cumbersome as the 'is a' one, since we would have had to extract a duplicated and modified StarIntel from Star to select proper fields according to ScanLevel, so it was kinda redundant. Having them as separate things feels a bit cleaner and simpler after all the redesign turmoil.

EDIT: Fixed some crashes by making Fleet.InOrbit accept an Item instead of a Star; interested parties can see if it's an ItemType Star or StarIntel.


[Updated on: Thu, 14 July 2011 07:25]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Bugs/Other Trackers
Next Topic: Anyone still around?
Goto Forum:
  


Current Time: Sat May 04 03:34:48 EDT 2024