Add feature decorator system #13

Merged
murapix merged 18 commits from main into main 2023-04-20 01:28:11 +00:00
Showing only changes of commit a0833d2029 - Show all commits

View file

@ -2,8 +2,6 @@ import { Replace, OptionsObject } from "../feature";
thepaperpilot commented 2023-03-02 23:34:07 +00:00 (Migrated from github.com)
Review

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
thepaperpilot commented 2023-03-02 23:34:07 +00:00 (Migrated from github.com)
Review

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";
/*----====----*/
thepaperpilot commented 2023-03-02 23:34:07 +00:00 (Migrated from github.com)
Review

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
thepaperpilot commented 2023-03-02 23:34:07 +00:00 (Migrated from github.com)
Review

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
thepaperpilot commented 2023-03-02 23:34:07 +00:00 (Migrated from github.com)
Review

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
thepaperpilot commented 2023-03-02 23:34:07 +00:00 (Migrated from github.com)
Review

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>>
}
/*----====----*/
thepaperpilot commented 2023-03-02 23:34:07 +00:00 (Migrated from github.com)
Review

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
thepaperpilot commented 2023-03-02 23:34:07 +00:00 (Migrated from github.com)
Review

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
thepaperpilot commented 2023-03-02 23:34:07 +00:00 (Migrated from github.com)
Review

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
thepaperpilot commented 2023-03-02 23:34:07 +00:00 (Migrated from github.com)
Review

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
thepaperpilot commented 2023-03-02 23:34:07 +00:00 (Migrated from github.com)
Review

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
thepaperpilot commented 2023-03-02 23:34:07 +00:00 (Migrated from github.com)
Review

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
thepaperpilot commented 2023-03-02 23:34:07 +00:00 (Migrated from github.com)
Review

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
/*----====----*/
thepaperpilot commented 2023-03-02 23:34:07 +00:00 (Migrated from github.com)
Review

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

thepaperpilot commented 2023-03-02 23:34:07 +00:00 (Migrated from github.com)
Review

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
thepaperpilot commented 2023-03-02 23:34:07 +00:00 (Migrated from github.com)
Review

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