0.1.6 • Published 2 years ago
@civ-clone/core-spaceship v0.1.6
core-spaceship
The core models relating to building and launching a Spaceship, including Parts (of which the Spaceship is
constructed) and the associated Rules.
A Spaceship is built using Layout which consists of Slots and is chosen from the LayoutRegistry.
Rules
Active- confirms whether aSlotis active.Built- triggered when aPartis built.ChanceOfSuccess- returns a value between0and1.ChooseSlot- picks the preferredSlotfor thePart.FlightTime- returns the number ofYears the flight will take.Landed- triggered when theSpaceshipsuccessfully lands at its destination.Launch- triggered when theSpaceshipis launched.Lost- triggered when theSpaceshipdoesn't reach its final destination.Yield- used to calculate the associatedYields from eachPart(Mass,Fuel,Population, etc).