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('

Module: features/conversion

Interfaces

Type aliases

Conversion

\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> }>

Type parameters

NameType
Textends ConversionOptions

Defined in

profectus/src/features/conversion.ts:30


GenericConversion

\u01AC GenericConversion: Replace<Conversion<ConversionOptions>, { buyMax: ProcessedComputable<boolean> ; currentGain: ProcessedComputable<DecimalSource> ; nextAt: ProcessedComputable<DecimalSource> ; roundUpCost: ProcessedComputable<boolean> }>

Defined in

profectus/src/features/conversion.ts:40


ScalingFunction

\u01AC ScalingFunction: Object

Type declaration

NameType
currentGain(conversion: GenericConversion) => DecimalSource
nextAt(conversion: GenericConversion) => DecimalSource

Defined in

profectus/src/features/conversion.ts:93

Functions

addHardcap

\u25B8 addHardcap(scaling, cap): ScalingFunction

Parameters

NameType
scalingScalingFunction
capProcessedComputable<DecimalSource>

Returns

ScalingFunction

Defined in

profectus/src/features/conversion.ts:244


addSoftcap

\u25B8 addSoftcap(scaling, cap, power?): ScalingFunction

Parameters

NameTypeDefault value
scalingScalingFunctionundefined
capProcessedComputable<DecimalSource>undefined
powerProcessedComputable<DecimalSource>0.5

Returns

ScalingFunction

Defined in

profectus/src/features/conversion.ts:232


createConversion

\u25B8 createConversion<T>(optionsFunc): Conversion<T>

Type parameters

NameType
Textends ConversionOptions

Parameters

NameType
optionsFunc() => T & ThisType<Conversion<T>>

Returns

Conversion<T>

Defined in

profectus/src/features/conversion.ts:50


createCumulativeConversion

\u25B8 createCumulativeConversion<S>(optionsFunc): Conversion<S>

Type parameters

NameType
Sextends ConversionOptions

Parameters

NameType
optionsFunc() => S & ThisType<Conversion<S>>

Returns

Conversion<S>

Defined in

profectus/src/features/conversion.ts:166


createIndependentConversion

\u25B8 createIndependentConversion<S>(optionsFunc): Conversion<S>

Type parameters

NameType
Sextends ConversionOptions

Parameters

NameType
optionsFunc() => S & ThisType<Conversion<S>>

Returns

Conversion<S>

Defined in

profectus/src/features/conversion.ts:172


createLinearScaling

\u25B8 createLinearScaling(base, coefficient): ScalingFunction

Parameters

NameType
baseDecimalSource | Ref<DecimalSource>
coefficientDecimalSource | Ref<DecimalSource>

Returns

ScalingFunction

Defined in

profectus/src/features/conversion.ts:100


createPolynomialScaling

\u25B8 createPolynomialScaling(base, exponent): ScalingFunction

Parameters

NameType
baseDecimalSource | Ref<DecimalSource>
exponentDecimalSource | Ref<DecimalSource>

Returns

ScalingFunction

Defined in

profectus/src/features/conversion.ts:135


setupPassiveGeneration

\u25B8 setupPassiveGeneration(layer, conversion, rate?): void

Parameters

NameTypeDefault value
layerGenericLayerundefined
conversionGenericConversionundefined
rateProcessedComputable<DecimalSource>1

Returns

void

Defined in

profectus/src/features/conversion.ts:204

',100),d=[n];function c(i,s,l,h,f,u){return a(),t("div",null,d)}var m=e(o,[["render",c]]);export{g as __pageData,m as default};