import{_ as e,c as t,o as a,a as r}from"./app.54d5a277.js";const g='{"title":"Module: features/conversion","description":"","frontmatter":{},"headers":[{"level":2,"title":"Interfaces","slug":"interfaces"},{"level":2,"title":"Type aliases","slug":"type-aliases"},{"level":3,"title":"Conversion","slug":"conversion"},{"level":3,"title":"GenericConversion","slug":"genericconversion"},{"level":3,"title":"ScalingFunction","slug":"scalingfunction"},{"level":2,"title":"Functions","slug":"functions"},{"level":3,"title":"addHardcap","slug":"addhardcap"},{"level":3,"title":"addSoftcap","slug":"addsoftcap"},{"level":3,"title":"createConversion","slug":"createconversion"},{"level":3,"title":"createCumulativeConversion","slug":"createcumulativeconversion"},{"level":3,"title":"createIndependentConversion","slug":"createindependentconversion"},{"level":3,"title":"createLinearScaling","slug":"createlinearscaling"},{"level":3,"title":"createPolynomialScaling","slug":"createpolynomialscaling"},{"level":3,"title":"setupPassiveGeneration","slug":"setuppassivegeneration"}],"relativePath":"api/modules/features/conversion.md"}',o={},n=r('
\u01AC Conversion<T
>: Replace
<T
& BaseConversion
, { buyMax
: GetComputableTypeWithDefault
<T
["buyMax"
], true
> ; currentGain
: GetComputableTypeWithDefault
<T
["currentGain"
], Ref
<DecimalSource
>> ; nextAt
: GetComputableTypeWithDefault
<T
["nextAt"
], Ref
<DecimalSource
>> ; roundUpCost
: GetComputableTypeWithDefault
<T
["roundUpCost"
], true
> }>
Name | Type |
---|---|
T | extends ConversionOptions |
profectus/src/features/conversion.ts:30
\u01AC GenericConversion: Replace
<Conversion
<ConversionOptions
>, { buyMax
: ProcessedComputable
<boolean
> ; currentGain
: ProcessedComputable
<DecimalSource
> ; nextAt
: ProcessedComputable
<DecimalSource
> ; roundUpCost
: ProcessedComputable
<boolean
> }>
profectus/src/features/conversion.ts:40
\u01AC ScalingFunction: Object
Name | Type |
---|---|
currentGain | (conversion : GenericConversion ) => DecimalSource |
nextAt | (conversion : GenericConversion ) => DecimalSource |
profectus/src/features/conversion.ts:93
\u25B8 addHardcap(scaling
, cap
): ScalingFunction
Name | Type |
---|---|
scaling | ScalingFunction |
cap | ProcessedComputable <DecimalSource > |
profectus/src/features/conversion.ts:244
\u25B8 addSoftcap(scaling
, cap
, power?
): ScalingFunction
Name | Type | Default value |
---|---|---|
scaling | ScalingFunction | undefined |
cap | ProcessedComputable <DecimalSource > | undefined |
power | ProcessedComputable <DecimalSource > | 0.5 |
profectus/src/features/conversion.ts:232
\u25B8 createConversion<T
>(optionsFunc
): Conversion
<T
>
Name | Type |
---|---|
T | extends ConversionOptions |
Name | Type |
---|---|
optionsFunc | () => T & ThisType <Conversion <T >> |
Conversion
<T
>
profectus/src/features/conversion.ts:50
\u25B8 createCumulativeConversion<S
>(optionsFunc
): Conversion
<S
>
Name | Type |
---|---|
S | extends ConversionOptions |
Name | Type |
---|---|
optionsFunc | () => S & ThisType <Conversion <S >> |
Conversion
<S
>
profectus/src/features/conversion.ts:166
\u25B8 createIndependentConversion<S
>(optionsFunc
): Conversion
<S
>
Name | Type |
---|---|
S | extends ConversionOptions |
Name | Type |
---|---|
optionsFunc | () => S & ThisType <Conversion <S >> |
Conversion
<S
>
profectus/src/features/conversion.ts:172
\u25B8 createLinearScaling(base
, coefficient
): ScalingFunction
Name | Type |
---|---|
base | DecimalSource | Ref <DecimalSource > |
coefficient | DecimalSource | Ref <DecimalSource > |
profectus/src/features/conversion.ts:100
\u25B8 createPolynomialScaling(base
, exponent
): ScalingFunction
Name | Type |
---|---|
base | DecimalSource | Ref <DecimalSource > |
exponent | DecimalSource | Ref <DecimalSource > |
profectus/src/features/conversion.ts:135
\u25B8 setupPassiveGeneration(layer
, conversion
, rate?
): void
Name | Type | Default value |
---|---|---|
layer | GenericLayer | undefined |
conversion | GenericConversion | undefined |
rate | ProcessedComputable <DecimalSource > | 1 |
void