Add feature decorator system #13

Merged
murapix merged 18 commits from main into main 2023-04-20 01:28:11 +00:00
3 changed files with 2854 additions and 2091 deletions
Showing only changes of commit 7065de519f - Show all commits

4941
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -6,9 +6,11 @@ import { Decorator } from "./common";
thepaperpilot commented 2023-03-02 23:30:05 +00:00 (Migrated from github.com)
Review

Please change this back to util/bignum

Please change this back to util/bignum
murapix commented 2023-03-02 23:39:59 +00:00 (Migrated from github.com)
Review

Heh, guess that's what I get for just letting it mass-import everything

Heh, guess that's what I get for just letting it mass-import everything
thepaperpilot commented 2023-03-02 23:42:11 +00:00 (Migrated from github.com)
Review

Trust me, I've made this same mistake so many times. I wish I had a better way to hint to the IDE what the default export is expected to be called

Trust me, I've made this same mistake so many times. I wish I had a better way to hint to the IDE what the default export is expected to be called
thepaperpilot commented 2023-03-02 23:30:05 +00:00 (Migrated from github.com)
Review

Please change this back to util/bignum

Please change this back to util/bignum
murapix commented 2023-03-02 23:39:59 +00:00 (Migrated from github.com)
Review

Heh, guess that's what I get for just letting it mass-import everything

Heh, guess that's what I get for just letting it mass-import everything
thepaperpilot commented 2023-03-02 23:42:11 +00:00 (Migrated from github.com)
Review

Trust me, I've made this same mistake so many times. I wish I had a better way to hint to the IDE what the default export is expected to be called

Trust me, I've made this same mistake so many times. I wish I had a better way to hint to the IDE what the default export is expected to be called
export interface BonusAmountFeatureOptions {
bonusAmount: Computable<DecimalSource>;
totalAmount?: Computable<DecimalSource>;
thepaperpilot commented 2023-03-02 23:30:05 +00:00 (Migrated from github.com)
Review

Please change this back to util/bignum

Please change this back to util/bignum
murapix commented 2023-03-02 23:39:59 +00:00 (Migrated from github.com)
Review

Heh, guess that's what I get for just letting it mass-import everything

Heh, guess that's what I get for just letting it mass-import everything
thepaperpilot commented 2023-03-02 23:42:11 +00:00 (Migrated from github.com)
Review

Trust me, I've made this same mistake so many times. I wish I had a better way to hint to the IDE what the default export is expected to be called

Trust me, I've made this same mistake so many times. I wish I had a better way to hint to the IDE what the default export is expected to be called
}
export interface BonusCompletionsFeatureOptions {
bonusCompletions: Computable<DecimalSource>;
totalCompletions?: Computable<DecimalSource>;
thepaperpilot commented 2023-03-02 23:30:05 +00:00 (Migrated from github.com)
Review

Please change this back to util/bignum

Please change this back to util/bignum
murapix commented 2023-03-02 23:39:59 +00:00 (Migrated from github.com)
Review

Heh, guess that's what I get for just letting it mass-import everything

Heh, guess that's what I get for just letting it mass-import everything
thepaperpilot commented 2023-03-02 23:42:11 +00:00 (Migrated from github.com)
Review

Trust me, I've made this same mistake so many times. I wish I had a better way to hint to the IDE what the default export is expected to be called

Trust me, I've made this same mistake so many times. I wish I had a better way to hint to the IDE what the default export is expected to be called
}
export interface BaseBonusAmountFeature {

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

Please change this back to util/bignum

Please change this back to util/bignum
murapix commented 2023-03-02 23:39:59 +00:00 (Migrated from github.com)
Review

Heh, guess that's what I get for just letting it mass-import everything

Heh, guess that's what I get for just letting it mass-import everything
thepaperpilot commented 2023-03-02 23:42:11 +00:00 (Migrated from github.com)
Review

Trust me, I've made this same mistake so many times. I wish I had a better way to hint to the IDE what the default export is expected to be called

Trust me, I've made this same mistake so many times. I wish I had a better way to hint to the IDE what the default export is expected to be called
thepaperpilot commented 2023-03-02 23:30:05 +00:00 (Migrated from github.com)
Review

Please change this back to util/bignum

Please change this back to util/bignum
murapix commented 2023-03-02 23:39:59 +00:00 (Migrated from github.com)
Review

Heh, guess that's what I get for just letting it mass-import everything

Heh, guess that's what I get for just letting it mass-import everything
thepaperpilot commented 2023-03-02 23:42:11 +00:00 (Migrated from github.com)
Review

Trust me, I've made this same mistake so many times. I wish I had a better way to hint to the IDE what the default export is expected to be called

Trust me, I've made this same mistake so many times. I wish I had a better way to hint to the IDE what the default export is expected to be called

View file

@ -2,7 +2,7 @@ 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";
export type Decorator<FeatureOptions, BaseFeature = {}, GenericFeature = {}, S extends State = State> = {
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 = BaseFeature, S extends State = State> = {
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
getPersistentData?(): Record<string, Persistent<S>>;
preConstruct?(feature: OptionsObject<FeatureOptions,BaseFeature,GenericFeature>): void;
postConstruct?(feature: OptionsObject<FeatureOptions,BaseFeature,GenericFeature>): void;

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