2021-09-06 00:12:05 -05:00
|
|
|
/// <reference path="./SharedTypes.ts" />
|
2021-09-05 20:43:11 -05:00
|
|
|
|
2021-08-20 20:47:02 -05:00
|
|
|
interface IResource {
|
2021-08-22 11:51:16 -05:00
|
|
|
readonly resourceType: ResourceType;
|
2021-09-06 08:51:41 -05:00
|
|
|
readonly label?: string;
|
2021-09-06 00:12:05 -05:00
|
|
|
readonly singularName: string;
|
|
|
|
readonly pluralName: string;
|
2021-09-05 14:45:37 -05:00
|
|
|
readonly description: string;
|
2021-08-22 11:51:16 -05:00
|
|
|
readonly valueInWholeNumbers: boolean;
|
2021-09-05 19:20:24 -05:00
|
|
|
|
|
|
|
readonly value: number;
|
2021-09-05 20:43:11 -05:00
|
|
|
readonly cost?: ResourceNumber;
|
2021-09-05 19:20:24 -05:00
|
|
|
|
|
|
|
max?: (state: GameState) => number;
|
|
|
|
inc?: (state: GameState) => number;
|
|
|
|
advanceAction?: (time: number, state: GameState) => void;
|
2021-09-06 00:12:05 -05:00
|
|
|
userActions?: ResourceAction[];
|
2021-09-05 19:20:24 -05:00
|
|
|
|
2021-09-05 14:45:37 -05:00
|
|
|
addValue: (amount: number, state: GameState) => void;
|
|
|
|
isUnlocked: (state: GameState) => boolean;
|
2021-09-06 11:32:17 -05:00
|
|
|
|
|
|
|
emitConfig?: () => { [key: string]: string | number | boolean };
|
2021-09-06 12:02:38 -05:00
|
|
|
restoreConfig?: (config: {
|
|
|
|
[key: string]: string | number | boolean;
|
|
|
|
}) => void;
|
2021-08-20 20:47:02 -05:00
|
|
|
}
|