Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » Stars! Nova - Development » Some important-ish changes.
Some important-ish changes. Sat, 05 May 2012 05:32 Go 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
Yet another thread!

While working on the new waypoints, I noticed and changed some things that are worth documenting.

1. Server's AllFleets collection is gone for good. It was redundant data already stored in each Empire. Instead ServerData has a new IterateFleets() method which returns an iterator to loop over all fleets from all empires thanks to LINQ. Much cleaner with no redundant data bookeeping.
(Some bugs remain with modified iterators though, tackling them now).

2. I've extended the long datatype so that operations Owner() and Id() can be directly called on Key. Before, to get both a Key and Owner you needed access to the full object (Item). Now you just need the Key and you can do Key.Owner() to get the empire id. Should simplify lots of things everywhere.

3. Cargo item is now implemented as a collection internally, so you can iterate over it's Commodities. (Was of use for the CargoDialog). I'm thinking of doing this for the Resource class too, in fact, i've been thinking of merging these two into a single thing as they often interact and contain very similar characteristics.

Improving the most base objects like this can have very nice effects on the overall code. I'll try to improve more on these kind of things in the future.

Report message to a moderator

 
Read Message
Read Message
Read Message
Previous Topic: Spam posts
Next Topic: New Waypoint System
Goto Forum:
  


Current Time: Fri Mar 29 08:32:57 EDT 2024