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 23: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 understand inheritance vs composition, in fact I heavily prefer composition over inheritance, specially when inheritance gets to 3 or 4 levels. I was trying to convey that Item is kind of redundant in the current scheme.

From the current Item properties/Data I can think of these:

Mass/Cost/Design is irrelevant for Stars, so we could move them a level up to Designs, and it kinda makes sense.
Position is irrelevant for Designs/ShipDesigns/Ships but relevant for Fleets and Stars. We can't move it without duplicating it in both Stars and Fleets, which might not be that terrible.
Mass & Cost could move up to the Design, and Fleets get them from their Ship collections.

Perhaps having Ship not inherit Item since that data would be in it's design would be a step in the right direction. Still leaves designs with irrelevant positions which only become relevant at the Fleet level.

And welcome back btw!







[Updated on: Sun, 12 February 2012 23:45]

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:23:47 EDT 2024