Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » FreeStars » Design Delimma
Re: Design Delima Mon, 16 June 2003 23:28 Go to previous messageGo to previous message
LEit is currently offline LEit

 
Lt. Commander

Messages: 879
Registered: April 2003
Location: CT
Not too late yet.

That sounds a lot like my second option in my first note (where my Capability is your subcomponent). Component contains a list of Capabilities, they inherit from a virtual class (an ABC really). Component would have a GetArmor function that would return the Capability class if it was in the container.

However, I don't really need to pass a Capability class to anything else, to figure out a ship's total shields, just add the shield value of each component.

That can be done either by getting a Capability from the Component and adding the value from that, or by asking the Component directly (which either has all values stored - first option above, or searches the list for the right Capability - second option).

Capabilities are usually one or two integers, so having a bunch of them set to a default shouldn't be too bad.



- LEit

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message icon5.gif
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: Just how flexible?
Next Topic: Planet Transfer
Goto Forum:
  


Current Time: Thu Jul 04 00:36:14 EDT 2024