forked from profectus/Profectus
Add optional total functions to BonusDecorator options
This commit is contained in:
parent
f79359b18a
commit
7065de519f
3 changed files with 2854 additions and 2091 deletions
4941
package-lock.json
generated
4941
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -6,9 +6,11 @@ import { Decorator } from "./common";
|
|||
|
||||
export interface BonusAmountFeatureOptions {
|
||||
bonusAmount: Computable<DecimalSource>;
|
||||
totalAmount?: Computable<DecimalSource>;
|
||||
}
|
||||
export interface BonusCompletionsFeatureOptions {
|
||||
bonusCompletions: Computable<DecimalSource>;
|
||||
totalCompletions?: Computable<DecimalSource>;
|
||||
}
|
||||
|
||||
export interface BaseBonusAmountFeature {
|
||||
|
|
|
@ -2,7 +2,7 @@ import { Replace, OptionsObject } from "../feature";
|
|||
import { Computable, GetComputableType, processComputable, ProcessedComputable } from "util/computed";
|
||||
import { Persistent, State } from "game/persistence";
|
||||
|
||||
export type Decorator<FeatureOptions, BaseFeature = {}, GenericFeature = {}, S extends State = State> = {
|
||||
export type Decorator<FeatureOptions, BaseFeature = {}, GenericFeature = BaseFeature, S extends State = State> = {
|
||||
getPersistentData?(): Record<string, Persistent<S>>;
|
||||
preConstruct?(feature: OptionsObject<FeatureOptions,BaseFeature,GenericFeature>): void;
|
||||
postConstruct?(feature: OptionsObject<FeatureOptions,BaseFeature,GenericFeature>): void;
|
||||
|
|
Loading…
Reference in a new issue