Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » Stars! Nova - Development » FleetIntel question
Re: FleetIntel question Mon, 11 July 2011 04:49 Go to previous messageGo to previous message
Musmuris

 
Master Chief Petty Officer
Stars! Nova developer
Stars! Nova developer

Messages: 96
Registered: June 2011
I think what Daniel said was correct (if I'm following this)

Assuming Star is going to inherit from StarReport (as if I've got that wrong the rest of what I'm about to say is bull####)

So we will have

Dictionary<string,Star> OwnedStars;
Dictionary<string,StarReport> StarReports;


StarReports therfore consists of both StarReports AND Stars. So if star "X" is an owned star then:

(StarReports["X"] as Star) == OwnedStars["X"]


However planet "Y" is not owned so

(StarReports["Y"] as Star) == null


as "Y" would be a StarReport and wouldn't be in the OwnedStars dictionary.

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 02:41:58 EDT 2024