Add feature decorator system #13
|
@ -2,8 +2,6 @@ import { Replace, OptionsObject } from "../feature";
|
|||
I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them
|
||||
import { Computable, GetComputableType, processComputable, ProcessedComputable } from "util/computed";
|
||||
import { Persistent, State } from "game/persistence";
|
||||
|
||||
/*----====----*/
|
||||
I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them
|
||||
|
||||
I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them
|
||||
export type Decorator<FeatureOptions, BaseFeature = {}, GenericFeature = {}, S extends State = State> = {
|
||||
getPersistentData?(): Record<string, Persistent<S>>;
|
||||
preConstruct?(feature: OptionsObject<FeatureOptions,BaseFeature,GenericFeature>): void;
|
||||
|
@ -11,9 +9,6 @@ export type Decorator<FeatureOptions, BaseFeature = {}, GenericFeature = {}, S e
|
|||
I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them
I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them
|
||||
getGatheredProps?(feature: OptionsObject<FeatureOptions,BaseFeature,GenericFeature>): Partial<OptionsObject<FeatureOptions,BaseFeature,GenericFeature>>
|
||||
}
|
||||
|
||||
/*----====----*/
|
||||
I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them
|
||||
|
||||
I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them
|
||||
// #region Effect Decorator
|
||||
I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them
|
||||
export interface EffectFeatureOptions {
|
||||
effect: Computable<any>;
|
||||
}
|
||||
|
@ -43,7 +38,4 @@ export const effectDecorator: Decorator<EffectFeatureOptions, {}, GenericEffectF
|
|||
I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them
I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them
|
||||
processComputable(feature, "effect");
|
||||
}
|
||||
}
|
||||
// #endregion
|
||||
I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them
|
||||
|
||||
I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them
|
||||
/*----====----*/
|
||||
I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them
|
||||
|
||||
|
|
|||
I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them
I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them
|
I'm not a huge fan of adding these separators and #region comments since nowhere else in the project has them