Interface: ConversionOptions

features/conversion.ConversionOptions

An object that configures a conversion.

Properties

actualGain

Optional actualGain: Computable<DecimalSource>

The absolute amount the output resource will be changed by. Typically this will be set for you in a conversion constructor. This will differ from currentGain in the cases where the conversion isn't just adding the converted amount to the output resource.

Defined in

profectus/src/features/conversion.ts:35


baseResource

baseResource: Resource<DecimalSource>

The input resource for this conversion.

Defined in

profectus/src/features/conversion.ts:50


buyMax

Optional buyMax: Computable<boolean>

Whether or not to cap the amount of the output resource gained by converting at 1.

Defined in

profectus/src/features/conversion.ts:58


convert

Optional convert: VoidFunction

The function that performs the actual conversion from baseResource to gainResource. Typically this will be set for you in a conversion constructor.

Defined in

profectus/src/features/conversion.ts:67


currentAt

Optional currentAt: Computable<DecimalSource>

The amount of the input resource currently being required in order to produce the currentGain. That is, if it went below this value then currentGain would decrease. Typically this will be set for you in a conversion constructor.

Defined in

profectus/src/features/conversion.ts:41


currentGain

Optional currentGain: Computable<DecimalSource>

How much of the output resource the conversion can currently convert for. Typically this will be set for you in a conversion constructor.

Defined in

profectus/src/features/conversion.ts:29


gainModifier

Optional gainModifier: WithRequired<Modifier, "revert">

An addition modifier that will be applied to the gain amounts. Must be reversible in order to correctly calculate nextAt.

see createSequentialModifier if you want to apply multiple modifiers.

Defined in

profectus/src/features/conversion.ts:73


gainResource

gainResource: Resource<DecimalSource>

The output resource for this conversion. i.e. the resource being generated.

Defined in

profectus/src/features/conversion.ts:54


nextAt

Optional nextAt: Computable<DecimalSource>

The amount of the input resource required to make currentGain increase. Typically this will be set for you in a conversion constructor.

Defined in

profectus/src/features/conversion.ts:46


roundUpCost

Optional roundUpCost: Computable<boolean>

Whether or not to round up the cost to generate a given amount of the output resource.

Defined in

profectus/src/features/conversion.ts:62


scaling

scaling: ScalingFunction

The scaling function that is used to determine the rate of conversion from one resource to the other.

Defined in

profectus/src/features/conversion.ts:24