mirror of
https://github.com/thepaperpilot/Planar-Pioneers.git
synced 2024-11-26 02:01:39 +00:00
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 {
|
export interface BonusAmountFeatureOptions {
|
||||||
bonusAmount: Computable<DecimalSource>;
|
bonusAmount: Computable<DecimalSource>;
|
||||||
|
totalAmount?: Computable<DecimalSource>;
|
||||||
}
|
}
|
||||||
export interface BonusCompletionsFeatureOptions {
|
export interface BonusCompletionsFeatureOptions {
|
||||||
bonusCompletions: Computable<DecimalSource>;
|
bonusCompletions: Computable<DecimalSource>;
|
||||||
|
totalCompletions?: Computable<DecimalSource>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BaseBonusAmountFeature {
|
export interface BaseBonusAmountFeature {
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { Replace, OptionsObject } from "../feature";
|
||||||
import { Computable, GetComputableType, processComputable, ProcessedComputable } from "util/computed";
|
import { Computable, GetComputableType, processComputable, ProcessedComputable } from "util/computed";
|
||||||
import { Persistent, State } from "game/persistence";
|
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>>;
|
getPersistentData?(): Record<string, Persistent<S>>;
|
||||||
preConstruct?(feature: OptionsObject<FeatureOptions,BaseFeature,GenericFeature>): void;
|
preConstruct?(feature: OptionsObject<FeatureOptions,BaseFeature,GenericFeature>): void;
|
||||||
postConstruct?(feature: OptionsObject<FeatureOptions,BaseFeature,GenericFeature>): void;
|
postConstruct?(feature: OptionsObject<FeatureOptions,BaseFeature,GenericFeature>): void;
|
||||||
|
|
Loading…
Reference in a new issue