Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » Stars! Nova - Development » Item.Mass - should this be an abstract property?
Re: Item.Mass - should this be an abstract property? Sun, 12 February 2012 02:28 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 agree, but for example; Ship inherits Item, and contains a Design which ALSO inherits from Item. That's pretty redundant.

I'd rather have Ship inherit a Design directly so there's a clear line of inheritance.

And as stated somewhere in the code in an old comment, Item should inherit from design, and not the other way around. It makes no sense for a design to have mass and position; an Item is a much more "concrete" thing anyway, so it should logicaly be lower down in the implementation chain than a design.

Although I also concede that this kind of logic not always makes sense in software, and I don't know what implications reversing the inheritance might have on the codebase other than the Key properties we worked so hard to implement would need to be realocated to track designs by Id.

Design -> ShipDesign -> Item -> Ship

Would be an ideal arrangement, instead of the current:
Item -> Ship
         |->Item -> Design -> Shipdesign


Even
Item -> Design -> Shipdesign -> Ship

Would be cleaner, and it could be a simpler change to implement.


[Updated on: Sun, 12 February 2012 02:30]

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
Previous Topic: Production classes - IProductionUnit and derivates
Next Topic: Spam posts
Goto Forum:
  


Current Time: Mon Apr 29 00:33:58 EDT 2024