0.1.6 • Published 2 years ago

@civ-clone/core-unit-transport v0.1.6

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

core-unit-transport

Includes the core functionality to have Units that can carry other units (Trireme, Sail, etc. in Civilization).

Transport provides a mixin style applicator which accepts a Unit (or something that extends Unit) class and adds the required methods from ITransport, e.g. class SomeTransport extends Transport(SomeBase) { /* ... */ }.

TransportManifests are used to track what cargo a Transport is carrying. and the TransportRegistry is used to retrieve these manifests.

Includes Stowed and Unloaded Rules triggered when the corresponding action is performed on a Transport.

Hopefully, the way this has been written, it should be possible to have any type of unit be a Transport so you could have Air Units, Land Units, or even Diplomatic Units...