Skip to content

Profectus / features/conversion / createCumulativeConversion

Function: createCumulativeConversion() ​

createCumulativeConversion<T>(optionsFunc): object & Omit<Omit<T, "baseResource" | "gainResource" | "formula" | "currentGain" | "actualGain" | "currentAt" | "nextAt" | "convert" | "spend" | "buyMax" | "onConvert">, keyof ConversionOptions> & object

Creates a conversion that simply adds to the gainResource amount upon converting. This is similar to the behavior of "normal" layers in The Modding Tree. This is equivalent to just calling createConversion directly.

Type Parameters ​

• T extends ConversionOptions

Parameters ​

optionsFunc ​

() => T

Conversion options.

Returns ​

object & Omit<Omit<T, "baseResource" | "gainResource" | "formula" | "currentGain" | "actualGain" | "currentAt" | "nextAt" | "convert" | "spend" | "buyMax" | "onConvert">, keyof ConversionOptions> & object

Defined in ​

profectus/src/features/conversion.ts:224