InlineResourceConverter
< Modding | Components
Modding/Components/InlineResourceConverterWork in Progress
This page is currently WORK IN PROGRESS. Some things may be missing.
Feel free to contribute and don't worry about perfection - other editors can make corrections if necessary. Just get creating!
Acts as a resource storage that converts from another storage on-demand as-needed, holding a small "overflow" reserve to prevent any net loss of resources.
A specialized type of storage component that also includes resource converter functionality. Inherits from BaseResourceStorage
.
Used by factory_ammo
and probably other factories too.
Name | Type | Required? | Buffable? | Default value | Description |
---|---|---|---|---|---|
FromStorage | ID<PartComponentRules> | Yes | - | - | Reference to the supplier storage |
FromQuantity | int | - | - | 1 | How much is taken from the supplier storage. |
ToQuantity | int | - | - | 1 | How much is given to the receiver storage.
That's this component itself in this case. |
Notes
Nothing yet.
Examples
In factory_ammo.rules
:
SulfurSplitter
{
Type = InlineResourceConverter
ResourceType = sulfur
FromStorage = SulfurStorage
FromQuantity = 1
ToQuantity = 20
}