ChainablePartComponent

From Cosmoteer Wiki
< Modding‎ | ComponentsModding/Components/ChainablePartComponent
Jump to navigation Jump to search
Code location (what's this?): Cosmoteer.Ships.Parts.ChainablePartComponent

The base class for part components that can be chained to other part components.

"Chained to" means components that follow the position of a part, or somewhere offset : a place that doesn't move relative to that part (as opposed to the background).

This is an abstract class. It is made to be inherited from, sharing common functionality. It itself inherits from PartComponent.

Inheritor :

Parameters (Complete list)
Name Type Required? Buffable? Default value Description
Location Vector2 No - - The position of this component compared to what it is chained to.

For a sprite, that means where it shows up compared to the position of the part's origin. Usually it's dead center of the space occupied by the part. If you get this wrong it's going to look very odd.

Rotation Direction No - - ??
ChainedTo ID<PartComponentRules>? No - - The ID of the part component this is chained to.
Notes

All of these parameters are optional, with no default values. Inheriting classes presumably have the required parameters, else the required values must be effectively defined by how the source code flows[fact check needed][1].

  1. fact check needed: See the label for the context.