@civ-clone/core-spaceship
TypeScript icon, indicating that this package has built-in type declarations

0.1.6 • Public • Published

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).

Package Sidebar

Install

npm i @civ-clone/core-spaceship

Weekly Downloads

2

Version

0.1.6

License

MIT

Unpacked Size

58.1 kB

Total Files

80

Last publish

Collaborators

  • dom111