ResourceStorage

From Cosmoteer Wiki
< Modding‎ | ComponentsModding/Components/Resource storage
Jump to navigation Jump to search

Code locations (what's this?):

Cosmoteer.Ships.Parts.Resources.ResourceStorage
Cosmoteer.Ships.Parts.Resources.ResourceStorageRules

Holds resources which can be used by other sub-components.

A specialized type of storage component.

Inherits from BaseResourceStorage.

Parameters
Name Type Required? Buffable? Default value Description
MaxResources int Yes - - How much this component can store.
StartingResources int - - -
InitToMaxResources int? - - -
ToggleOnResources bool - - - If used as a toggle, this component will be considered turned On when the specified amount of resources is reached.
ToggleOffResources bool - - - If used as a toggle, this component will be considered turned Off when the specified amount of resources is reached.
DelayBeforeReadyToUse float - - - Presumably forces a wait lasting the specified amount of seconds, before the storage can be used again.
DrainOnFtlJump bool - - - Presumably, whether or not any stored resource is instantly deleted when performing a hyperjump.

That's the case for shields.

DropResourcesWhenDestroyed bool - - - When the part is destroyed, presumably puts all resources that were stored by this component in space instead of deleting them.

Notes

  • Nothing in here is buffable, but the parent class has buffable parameters.

Examples

Base game Missile Launcher (HE)
MissileStorageBase
{
	Type = ResourceStorage
	ResourceType = missile_part_he
	MaxResources = 4
	ToggleOnResources = 4
	ToggleOffResources = 3
	DelayBeforeReadyToUse = .5
	DropResourcesWhenDestroyed = true
	DropResourcesWhenRemoved = true
}

See also