PartComponent

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

The base class for part sub-components.

This is an abstract class. It exists to be inherited from, sharing common functionality without duplicating code.

Inherits nothing.

Parameters (Complete list)
Name Type Required? Buffable? Default value Description
ID ID<PartComponentRules>

meaning :

yourname.nameofthepart

Yes - - Identifier ( = "name") of the part in the code. Must start with your name and be unique across the game.

Must not start with cosmoteer, that name is reserved for the base game. E.g. dj0z.nitro_tank

OnlyWithRotation int? - - - Not used in the base game.
OnlyWithFlip bool? - - - Presumably disables the component when it's flipped (see rotation).

Only used by factories, and used by almost all of them. They have "false" in their regular sprite components, and "true" in the Flipped counterparts.

IncludeWhenUnderConstruction bool - - false

(via base_part_terran)

Makes a sprite component active (visible) during crew constuction of the part.

Used in ConstructionStructureSprites and similar, the chaingun's CircleCollider, and elsewhere.

IncludeWhenNotUnderConstruction bool - - true

(also true via base_part_terran)

Makes a sprite component active (visible) when crew constuction of the part is not happening.

Set to "false" in many components that have Construction in their name.

Notes

Nothing yet.

See also