ResourceStorage
< Modding | ComponentsModding/Components/Resource storage
Jump to navigation
Jump to search
Components
- 🎚️Toggles
- ⚡Triggers
- ⏲️Timers
- WeaponAutoTargetRules
- Weapon (modding)
- TypedResourceGrid
- TurretWeapon
- Thruster (modding)
- Storage components
- ShipRenderLayerRules
- SelfBuffProvider
- Rotation (modding)
- ResourceStorage
- ProgressBar
- PartUIToggle
- PartToggledComponents
- PartSprite
- PartComponent
- Other components
- OperationalPartComponent
- OperationalChainablePartComponent
- MultiValue
- Modding/Components/PartToggleProxy
- Modding/Components/DistanceThreshold
- Modding/Components/Buffs
- InlineResourceConverter
- GridBuffProvider
- FtlDrive
- FlexResourceGrid
- FixedWeapon
- Emitter
- DeathEffects
- ContinuousEffects
- CircleBuffProvider
- ChainablePartComponent
- BuffableValue
- BeamEmitter
- BaseResourceStorage
- BasePartBuffProvider
- BaseCollider
- AreaBuffProvider
- Airlock (modding)
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
.
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
}