0.1.6 • Published 2 years ago

@civ-clone/core-spaceship v0.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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 a Slot is active.
  • Built - triggered when a Part is built.
  • ChanceOfSuccess - returns a value between 0 and 1.
  • ChooseSlot - picks the preferred Slot for the Part.
  • FlightTime - returns the number of Years the flight will take.
  • Landed - triggered when the Spaceship successfully lands at its destination.
  • Launch - triggered when the Spaceship is launched.
  • Lost - triggered when the Spaceship doesn't reach its final destination.
  • Yield - used to calculate the associated Yields from each Part (Mass, Fuel, Population, etc).