@wayward/types 2.12.2-beta.dev.20221127.1 → 2.12.2-beta.dev.20221130.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/cplusplus/index.d.ts +7 -7
- package/definitions/game/audio/IAudio.d.ts +1 -1
- package/definitions/game/audio/IMusic.d.ts +1 -1
- package/definitions/game/command/ICommand.d.ts +1 -1
- package/definitions/game/event/EventBuses.d.ts +1 -1
- package/definitions/game/event/EventEmitter.d.ts +9 -9
- package/definitions/game/event/EventManager.d.ts +12 -12
- package/definitions/game/game/IGame.d.ts +1 -1
- package/definitions/game/game/biome/IBiome.d.ts +2 -2
- package/definitions/game/game/doodad/IDoodad.d.ts +5 -5
- package/definitions/game/game/entity/IEntity.d.ts +3 -3
- package/definitions/game/game/entity/IHuman.d.ts +1 -1
- package/definitions/game/game/entity/IStats.d.ts +2 -2
- package/definitions/game/game/entity/action/Action.d.ts +2 -2
- package/definitions/game/game/entity/action/IAction.d.ts +11 -11
- package/definitions/game/game/entity/action/actions/Attack.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Dig.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Gather.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/GatherLiquid.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/MoveItem.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/ToggleVehicle.d.ts +1 -1
- package/definitions/game/game/entity/action/usable/IUsableAction.d.ts +5 -5
- package/definitions/game/game/entity/action/usable/UsableActionRegistrar.d.ts +1 -1
- package/definitions/game/game/entity/action/usable/UsableActionTranslator.d.ts +2 -2
- package/definitions/game/game/entity/npc/NPC.d.ts +1 -1
- package/definitions/game/game/entity/npc/npcs/IMerchant.d.ts +2 -2
- package/definitions/game/game/entity/player/IPlayer.d.ts +2 -2
- package/definitions/game/game/entity/player/note/NoteManager.d.ts +1 -1
- package/definitions/game/game/entity/player/quest/Requirements.d.ts +1 -1
- package/definitions/game/game/entity/player/quest/requirement/Requirement.d.ts +1 -1
- package/definitions/game/game/entity/skill/SkillManager.d.ts +1 -1
- package/definitions/game/game/entity/status/StatusEffect.d.ts +1 -1
- package/definitions/game/game/inspection/InspectionTypeMap.d.ts +2 -2
- package/definitions/game/game/inspection/infoProviders/CollapsableInfoProvider.d.ts +1 -1
- package/definitions/game/game/inspection/infoProviders/MagicalPropertyValue.d.ts +1 -1
- package/definitions/game/game/inspection/infoProviders/ObscuredValue.d.ts +3 -3
- package/definitions/game/game/inspection/infoProviders/UnlockableRowInfoProvider.d.ts +1 -1
- package/definitions/game/game/inspection/infoProviders/UseInfo.d.ts +7 -7
- package/definitions/game/game/island/IIsland.d.ts +1 -1
- package/definitions/game/game/item/IItem.d.ts +7 -7
- package/definitions/game/game/item/recipe/RecipeOutputs.d.ts +1 -1
- package/definitions/game/game/item/recipe/RecipeRequirement.d.ts +1 -1
- package/definitions/game/game/item/recipe/RecipeRequirements.d.ts +1 -1
- package/definitions/game/game/magic/MagicalPropertyManager.d.ts +12 -12
- package/definitions/game/game/mapgen/IMapGen.d.ts +5 -5
- package/definitions/game/game/mapping/Background.d.ts +1 -1
- package/definitions/game/game/mapping/SavedTilesSerializer.d.ts +1 -1
- package/definitions/game/game/meta/Loading.d.ts +3 -3
- package/definitions/game/game/meta/prompt/IPrompt.d.ts +5 -5
- package/definitions/game/game/meta/prompt/PromptDescriptions.d.ts +1 -1
- package/definitions/game/game/milestones/IMilestone.d.ts +1 -1
- package/definitions/game/game/milestones/MilestoneManager.d.ts +1 -1
- package/definitions/game/game/options/IGameOptions.d.ts +1 -1
- package/definitions/game/game/options/modifiers/GameplayModifier.d.ts +3 -3
- package/definitions/game/game/options/modifiers/milestone/MilestoneModifiersManager.d.ts +1 -1
- package/definitions/game/game/reference/IReferenceManager.d.ts +7 -7
- package/definitions/game/game/temperature/ITemperature.d.ts +1 -1
- package/definitions/game/game/tile/ITerrain.d.ts +2 -2
- package/definitions/game/language/DictionaryMap.d.ts +3 -3
- package/definitions/game/language/LanguageJsonSchemaGenerator.d.ts +1 -1
- package/definitions/game/language/LanguageManager.d.ts +2 -2
- package/definitions/game/language/Translation.d.ts +1 -1
- package/definitions/game/language/TranslationsProvider.d.ts +5 -5
- package/definitions/game/language/english/player/Milestones.d.ts +1 -1
- package/definitions/game/language/english/player/status/BleedLevels.d.ts +1 -1
- package/definitions/game/language/segment/LinkSegment.d.ts +1 -1
- package/definitions/game/mod/IModInfo.d.ts +1 -1
- package/definitions/game/mod/IModManager.d.ts +1 -1
- package/definitions/game/mod/ModRegistry.d.ts +1 -1
- package/definitions/game/multiplayer/IMultiplayer.d.ts +2 -2
- package/definitions/game/multiplayer/dedicatedServer/ssh/ISshCommand.d.ts +2 -2
- package/definitions/game/multiplayer/matchmaking/IMatchmaking.d.ts +1 -1
- package/definitions/game/multiplayer/packets/IPacket.d.ts +1 -1
- package/definitions/game/renderer/Decorations.d.ts +1 -1
- package/definitions/game/renderer/StatusEffectRenderer.d.ts +3 -3
- package/definitions/game/renderer/world/IWorldLayer.d.ts +3 -3
- package/definitions/game/resource/ISpriteAtlas.d.ts +1 -1
- package/definitions/game/resource/ResourcePath.d.ts +1 -1
- package/definitions/game/save/ISaveManager.d.ts +1 -1
- package/definitions/game/save/clientStore/IClientStore.d.ts +1 -1
- package/definitions/game/save/data/ISaveDataGlobal.d.ts +3 -3
- package/definitions/game/save/datastorage/IDataStorage.d.ts +1 -1
- package/definitions/game/save/serializer/PropertiesToSerialize.d.ts +3 -3
- package/definitions/game/ui/component/ContextMenu.d.ts +4 -4
- package/definitions/game/ui/component/Dropdown.d.ts +1 -1
- package/definitions/game/ui/component/IComponent.d.ts +4 -4
- package/definitions/game/ui/component/Text.d.ts +1 -1
- package/definitions/game/ui/input/Bind.d.ts +2 -2
- package/definitions/game/ui/input/Bindings.d.ts +1 -1
- package/definitions/game/ui/input/IInput.d.ts +3 -3
- package/definitions/game/ui/input/Macros.d.ts +1 -1
- package/definitions/game/ui/screen/ScreenMap.d.ts +2 -2
- package/definitions/game/ui/screen/screens/GameScreen.d.ts +1 -1
- package/definitions/game/ui/screen/screens/game/DialogMap.d.ts +1 -1
- package/definitions/game/ui/screen/screens/game/Dialogs.d.ts +1 -1
- package/definitions/game/ui/screen/screens/game/IMessages.d.ts +2 -2
- package/definitions/game/ui/screen/screens/game/component/CanvasDialog.d.ts +1 -1
- package/definitions/game/ui/screen/screens/game/component/IQuadrantComponent.d.ts +1 -1
- package/definitions/game/ui/screen/screens/game/component/InspectionsList.d.ts +1 -1
- package/definitions/game/ui/screen/screens/game/component/Item.d.ts +1 -1
- package/definitions/game/ui/screen/screens/game/component/TabDialog.d.ts +1 -1
- package/definitions/game/ui/screen/screens/game/dialog/islands/IIslandsDialog.d.ts +1 -1
- package/definitions/game/ui/screen/screens/game/static/MenuBar.d.ts +1 -1
- package/definitions/game/ui/screen/screens/menu/MenuMap.d.ts +2 -2
- package/definitions/game/ui/screen/screens/menu/menus/character/CharacterPreview.d.ts +1 -1
- package/definitions/game/ui/screen/screens/menu/menus/main/IAbout.d.ts +1 -1
- package/definitions/game/ui/screen/screens/menu/menus/options/TabMods.d.ts +1 -1
- package/definitions/game/ui/tooltip/TooltipLocationHandler.d.ts +9 -9
- package/definitions/game/ui/util/ComponentManipulator.d.ts +3 -3
- package/definitions/game/ui/util/Draggable.d.ts +2 -2
- package/definitions/game/ui/util/IHighlight.d.ts +1 -1
- package/definitions/game/ui/util/ImagePath.d.ts +1 -1
- package/definitions/game/ui/util/Sortable.d.ts +1 -1
- package/definitions/game/utilities/class/Inject.d.ts +1 -1
- package/definitions/game/utilities/collection/sort/Sorter.d.ts +2 -2
- package/definitions/game/utilities/enum/IEnum.d.ts +1 -1
- package/definitions/game/utilities/math/Vector2.d.ts +1 -1
- package/definitions/game/utilities/memory/GarbageCollection.d.ts +1 -1
- package/definitions/game/utilities/object/Objects.d.ts +1 -1
- package/definitions/game/utilities/promise/Async.d.ts +1 -1
- package/definitions/game/utilities/promise/ResolvablePromise.d.ts +2 -2
- package/definitions/game/utilities/prototype/Define.d.ts +1 -1
- package/definitions/game/utilities/random/Random.d.ts +2 -2
- package/definitions/game/utilities/string/Interpolator.d.ts +4 -4
- package/definitions/game/utilities/types/Recursive.d.ts +1 -1
- package/definitions/game/webWorker/WebWorkerMessages.d.ts +3 -3
- package/definitions/matchmakingserver/shared.d.ts +3 -3
- package/definitions/test/index.d.ts +1 -1
- package/definitions/test/interfaces.d.ts +1 -1
- package/package.json +1 -1
|
@@ -22,13 +22,13 @@ export interface IWaywardCPP {
|
|
|
22
22
|
Navigation: INavigationConstructor;
|
|
23
23
|
WorldLayer: IWorldLayerConstructor;
|
|
24
24
|
}
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export
|
|
31
|
-
export
|
|
25
|
+
export type IFlowFieldConstructor = new (x: number, y: number, size: number, z: number, moveType: number) => IWaywardCPPFlowField;
|
|
26
|
+
export type IByteGridConstructor = new (width: number, height: number) => IByteGrid;
|
|
27
|
+
export type IBitGridConstructor = new (count: number) => IBitGrid;
|
|
28
|
+
export type IDijkstraMapConstructor = new () => IDijkstraMap;
|
|
29
|
+
export type IKDTreeConstructor = new () => IKDTree;
|
|
30
|
+
export type INavigationConstructor = new (autoConnect: boolean) => INavigation;
|
|
31
|
+
export type IWorldLayerConstructor = new (width: number, height: number, level: number) => IWorldLayerCPP;
|
|
32
32
|
export interface IWaywardCPPGame {
|
|
33
33
|
setMapSize(size: number): void;
|
|
34
34
|
}
|
|
@@ -64,7 +64,7 @@ export declare enum SfxType {
|
|
|
64
64
|
Walk = 37,
|
|
65
65
|
Water = 38
|
|
66
66
|
}
|
|
67
|
-
export
|
|
67
|
+
export type SfxUi = Extract<keyof typeof SfxType, `Ui${string}`> extends `Ui${infer RESULT}` ? Lowercase<RESULT> : never;
|
|
68
68
|
export declare enum Music {
|
|
69
69
|
Shipwrecked = 0,
|
|
70
70
|
OpeningTheme = 1,
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import type { IModdable } from "mod/ModRegistry";
|
|
12
|
-
export
|
|
12
|
+
export type IMusicDescription = IModdable;
|
|
13
13
|
export interface ISoundEffectDescription extends IModdable {
|
|
14
14
|
variations?: number;
|
|
15
15
|
}
|
|
@@ -15,7 +15,7 @@ export interface ICommand {
|
|
|
15
15
|
callback: CommandCallback;
|
|
16
16
|
canUse?(player: Player): boolean;
|
|
17
17
|
}
|
|
18
|
-
export
|
|
18
|
+
export type CommandCallback = (commandManager: CommandManager, player: Player, args: string) => void;
|
|
19
19
|
export declare enum Command {
|
|
20
20
|
Backup = 0,
|
|
21
21
|
Ban = 1,
|
|
@@ -118,4 +118,4 @@ export declare module EventBus {
|
|
|
118
118
|
function unregister(eventBus: EventBus): void;
|
|
119
119
|
function onEventBusRegistration(eventBus: EventBus, handler: NullaryFunction): void;
|
|
120
120
|
}
|
|
121
|
-
export
|
|
121
|
+
export type EventBusHost<E extends EventBus> = ReturnType<(typeof eventBuses)[E]>;
|
|
@@ -19,16 +19,16 @@ export declare enum Priority {
|
|
|
19
19
|
}
|
|
20
20
|
export declare const SYMBOL_SUBSCRIPTIONS: unique symbol;
|
|
21
21
|
export declare const SYMBOL_SUPERCLASSES: unique symbol;
|
|
22
|
-
|
|
22
|
+
type Abstract<T> = Function & {
|
|
23
23
|
prototype: T;
|
|
24
24
|
};
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
type Constructor<T> = new (...args: any[]) => T;
|
|
26
|
+
type ClassOrAbstractClass<T> = Abstract<T> | Constructor<T>;
|
|
27
27
|
export interface IEventEmitterHost<E> {
|
|
28
28
|
event: IEventEmitter<this | null, E>;
|
|
29
29
|
}
|
|
30
|
-
export
|
|
31
|
-
export
|
|
30
|
+
export type IEventEmitterHostClass<E> = ClassOrAbstractClass<IEventEmitterHost<E>>;
|
|
31
|
+
export type Events<T> = T extends IEventEmitterHost<infer E> ? E : T extends IEventEmitterHostClass<infer E> ? E : never;
|
|
32
32
|
export interface ITrueEventEmitterHostClass<E> extends Class<any> {
|
|
33
33
|
[SYMBOL_SUPERCLASSES]: Array<ITrueEventEmitterHostClass<E>>;
|
|
34
34
|
[SYMBOL_SUBSCRIPTIONS]: Map<any, Map<keyof E, PriorityMap<Set<Iterable<string | Handler<any, any>>>>>>;
|
|
@@ -36,10 +36,10 @@ export interface ITrueEventEmitterHostClass<E> extends Class<any> {
|
|
|
36
36
|
export interface ISelfSubscribedEmitter<E> {
|
|
37
37
|
[SYMBOL_SUBSCRIPTIONS]: Array<[ISelfSubscribedEmitter<any>, keyof E, string | number | symbol, number?]>;
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
type ArgsOf<F> = ArgumentsOf<Extract<F, AnyFunction>>;
|
|
40
|
+
type ReturnOf<F> = ReturnType<Extract<F, AnyFunction>>;
|
|
41
|
+
type Handler<H, F> = (host: H, ...args: ArgsOf<F>) => ReturnOf<F>;
|
|
42
|
+
type UndefinedFromVoid<V> = V extends void ? undefined : V;
|
|
43
43
|
export interface IEventEmitter<H = any, E = any> {
|
|
44
44
|
event: IEventEmitter<this, IEventEmitterEvents<H, E>>;
|
|
45
45
|
emit<K extends keyof E>(event: K, ...args: ArgsOf<E[K]>): H;
|
|
@@ -11,16 +11,16 @@
|
|
|
11
11
|
import type { EventBusHost } from "event/EventBuses";
|
|
12
12
|
import { EventBus } from "event/EventBuses";
|
|
13
13
|
import type { Events, IEventEmitterHost, IEventEmitterHostClass } from "event/EventEmitter";
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export
|
|
14
|
+
type HostOrHostClass = IEventEmitterHost<any> | IEventEmitterHostClass<any>;
|
|
15
|
+
type HostFromHostOrHostClass<H> = H extends IEventEmitterHostClass<any> ? InstanceOf<H> : H;
|
|
16
|
+
export type Emitter = HostOrHostClass;
|
|
17
|
+
export type EmitterOrBus = EventBus | Emitter;
|
|
18
|
+
export type Event<E extends EmitterOrBus> = keyof Events<E extends EventBus ? EventBusHost<E> : E>;
|
|
19
|
+
type ArgsOf<F> = ArgumentsOf<Extract<F, AnyFunction>>;
|
|
20
|
+
type ReturnOf<F> = ReturnType<Extract<F, AnyFunction>>;
|
|
21
|
+
type HandlerInternal2<H, F> = (host: H, ...args: ArgsOf<F>) => ReturnOf<F>;
|
|
22
|
+
type HandlerInternal1<E, K extends keyof Events<E>> = HandlerInternal2<HostFromHostOrHostClass<E>, Events<E>[K]>;
|
|
23
|
+
export type Handler<E, K extends keyof Events<E extends EventBus ? EventBusHost<E> : E>> = HandlerInternal1<E extends EventBus ? EventBusHost<E> : E, K>;
|
|
24
24
|
declare module EventManager {
|
|
25
25
|
export function subscribe<E extends EmitterOrBus, K extends Event<E>>(emitter: E, event: K, handler: IterableOr<Handler<E, K>>, priority?: number): void;
|
|
26
26
|
export function unsubscribe<E extends EmitterOrBus, K extends Event<E>>(emitter: E, event: K, handler: IterableOr<Handler<E, K>>, priority?: number): boolean | undefined;
|
|
@@ -40,8 +40,8 @@ export default EventManager;
|
|
|
40
40
|
* **Note:** This is incompatible with `@Bind` decorators.
|
|
41
41
|
*/
|
|
42
42
|
export declare function EventSubscriber<S extends Class<any>>(constructor: S): S;
|
|
43
|
-
|
|
44
|
-
export
|
|
43
|
+
type ReturnTypeLenient<T extends AnyFunction> = ReturnType<T> extends void ? Promise<void> : ReturnType<T>;
|
|
44
|
+
export type TypedPropertyDescriptorFunctionAnyNOfParams<T extends AnyFunction> = TypedPropertyDescriptor<(...args: ArgumentsOf<T>) => ReturnTypeLenient<T>> | TypedPropertyDescriptor<(a0: ArgumentsOf<T>[0], a1: ArgumentsOf<T>[1], a2: ArgumentsOf<T>[2], a3: ArgumentsOf<T>[3], a4: ArgumentsOf<T>[4], a5: ArgumentsOf<T>[5], a6: ArgumentsOf<T>[6], a7: ArgumentsOf<T>[7], a8: ArgumentsOf<T>[8], a9: ArgumentsOf<T>[9]) => ReturnTypeLenient<T>> | TypedPropertyDescriptor<(a0: ArgumentsOf<T>[0], a1: ArgumentsOf<T>[1], a2: ArgumentsOf<T>[2], a3: ArgumentsOf<T>[3], a4: ArgumentsOf<T>[4], a5: ArgumentsOf<T>[5], a6: ArgumentsOf<T>[6], a7: ArgumentsOf<T>[7], a8: ArgumentsOf<T>[8]) => ReturnTypeLenient<T>> | TypedPropertyDescriptor<(a0: ArgumentsOf<T>[0], a1: ArgumentsOf<T>[1], a2: ArgumentsOf<T>[2], a3: ArgumentsOf<T>[3], a4: ArgumentsOf<T>[4], a5: ArgumentsOf<T>[5], a6: ArgumentsOf<T>[6], a7: ArgumentsOf<T>[7]) => ReturnTypeLenient<T>> | TypedPropertyDescriptor<(a0: ArgumentsOf<T>[0], a1: ArgumentsOf<T>[1], a2: ArgumentsOf<T>[2], a3: ArgumentsOf<T>[3], a4: ArgumentsOf<T>[4], a5: ArgumentsOf<T>[5], a6: ArgumentsOf<T>[6]) => ReturnTypeLenient<T>> | TypedPropertyDescriptor<(a0: ArgumentsOf<T>[0], a1: ArgumentsOf<T>[1], a2: ArgumentsOf<T>[2], a3: ArgumentsOf<T>[3], a4: ArgumentsOf<T>[4], a5: ArgumentsOf<T>[5]) => ReturnTypeLenient<T>> | TypedPropertyDescriptor<(a0: ArgumentsOf<T>[0], a1: ArgumentsOf<T>[1], a2: ArgumentsOf<T>[2], a3: ArgumentsOf<T>[3], a4: ArgumentsOf<T>[4]) => ReturnTypeLenient<T>> | TypedPropertyDescriptor<(a0: ArgumentsOf<T>[0], a1: ArgumentsOf<T>[1], a2: ArgumentsOf<T>[2], a3: ArgumentsOf<T>[3]) => ReturnTypeLenient<T>> | TypedPropertyDescriptor<(a0: ArgumentsOf<T>[0], a1: ArgumentsOf<T>[1], a2: ArgumentsOf<T>[2]) => ReturnTypeLenient<T>> | TypedPropertyDescriptor<(a0: ArgumentsOf<T>[0], a1: ArgumentsOf<T>[1]) => ReturnTypeLenient<T>> | TypedPropertyDescriptor<(a0: ArgumentsOf<T>[0]) => ReturnTypeLenient<T>> | TypedPropertyDescriptor<() => ReturnTypeLenient<T>> | TypedPropertyDescriptor<T> | TypedPropertyDescriptor<(a0: ArgumentsOf<T>[0], a1: ArgumentsOf<T>[1], a2: ArgumentsOf<T>[2], a3: ArgumentsOf<T>[3], a4: ArgumentsOf<T>[4], a5: ArgumentsOf<T>[5], a6: ArgumentsOf<T>[6], a7: ArgumentsOf<T>[7], a8: ArgumentsOf<T>[8], a9: ArgumentsOf<T>[9]) => ReturnType<T>> | TypedPropertyDescriptor<(a0: ArgumentsOf<T>[0], a1: ArgumentsOf<T>[1], a2: ArgumentsOf<T>[2], a3: ArgumentsOf<T>[3], a4: ArgumentsOf<T>[4], a5: ArgumentsOf<T>[5], a6: ArgumentsOf<T>[6], a7: ArgumentsOf<T>[7], a8: ArgumentsOf<T>[8]) => ReturnType<T>> | TypedPropertyDescriptor<(a0: ArgumentsOf<T>[0], a1: ArgumentsOf<T>[1], a2: ArgumentsOf<T>[2], a3: ArgumentsOf<T>[3], a4: ArgumentsOf<T>[4], a5: ArgumentsOf<T>[5], a6: ArgumentsOf<T>[6], a7: ArgumentsOf<T>[7]) => ReturnType<T>> | TypedPropertyDescriptor<(a0: ArgumentsOf<T>[0], a1: ArgumentsOf<T>[1], a2: ArgumentsOf<T>[2], a3: ArgumentsOf<T>[3], a4: ArgumentsOf<T>[4], a5: ArgumentsOf<T>[5], a6: ArgumentsOf<T>[6]) => ReturnType<T>> | TypedPropertyDescriptor<(a0: ArgumentsOf<T>[0], a1: ArgumentsOf<T>[1], a2: ArgumentsOf<T>[2], a3: ArgumentsOf<T>[3], a4: ArgumentsOf<T>[4], a5: ArgumentsOf<T>[5]) => ReturnType<T>> | TypedPropertyDescriptor<(a0: ArgumentsOf<T>[0], a1: ArgumentsOf<T>[1], a2: ArgumentsOf<T>[2], a3: ArgumentsOf<T>[3], a4: ArgumentsOf<T>[4]) => ReturnType<T>> | TypedPropertyDescriptor<(a0: ArgumentsOf<T>[0], a1: ArgumentsOf<T>[1], a2: ArgumentsOf<T>[2], a3: ArgumentsOf<T>[3]) => ReturnType<T>> | TypedPropertyDescriptor<(a0: ArgumentsOf<T>[0], a1: ArgumentsOf<T>[1], a2: ArgumentsOf<T>[2]) => ReturnType<T>> | TypedPropertyDescriptor<(a0: ArgumentsOf<T>[0], a1: ArgumentsOf<T>[1]) => ReturnType<T>> | TypedPropertyDescriptor<(a0: ArgumentsOf<T>[0]) => ReturnType<T>> | TypedPropertyDescriptor<() => ReturnType<T>>;
|
|
45
45
|
export declare function OwnEventHandler<T extends IEventEmitterHostClass<any>, E extends keyof Events<T>>(cls: T, event: E, priority?: number): (host: InstanceOf<T>, property2: string | number | symbol, descriptor: TypedPropertyDescriptorFunctionAnyNOfParams<Events<T>[E]>) => void;
|
|
46
46
|
export declare function EventHandler<E extends EmitterOrBus, K extends Event<E>>(emitter: E, event: K, priority?: number): (host: any, property2: string | number | symbol, descriptor: TypedPropertyDescriptorFunctionAnyNOfParams<Handler<E, K>>) => void;
|
|
47
47
|
export declare function EventHandler<E extends Emitter, K extends keyof Events<E>>(emitter: E, event: K, priority?: number): (host: any, property2: string | number | symbol, descriptor: TypedPropertyDescriptorFunctionAnyNOfParams<Handler<IEventEmitterHost<Events<E>>, K>>) => void;
|
|
@@ -121,7 +121,7 @@ export declare enum TurnMode {
|
|
|
121
121
|
Simulated = 1,
|
|
122
122
|
RealTime = 2
|
|
123
123
|
}
|
|
124
|
-
export
|
|
124
|
+
export type IGameOld = Partial<Game> & Partial<{
|
|
125
125
|
dayNight: number;
|
|
126
126
|
dayNightSwitch: 0 | 1;
|
|
127
127
|
monsters: Creature[];
|
|
@@ -51,8 +51,8 @@ export interface IFogDescription {
|
|
|
51
51
|
*/
|
|
52
52
|
nightFogColorMaxMix?: number;
|
|
53
53
|
}
|
|
54
|
-
export
|
|
55
|
-
export
|
|
54
|
+
export type BiomeMapGen = MapGenVersions<IBiomeMapGen>;
|
|
55
|
+
export type BiomeTypes = Exclude<BiomeType, BiomeType.Random>;
|
|
56
56
|
export declare enum BiomeType {
|
|
57
57
|
Random = 0,
|
|
58
58
|
Coastal = 1,
|
|
@@ -45,8 +45,8 @@ export interface IDoodadOptions extends IObjectOptions {
|
|
|
45
45
|
meltDecay?: number;
|
|
46
46
|
inheritMagic?: MagicalPropertyManager;
|
|
47
47
|
}
|
|
48
|
-
|
|
49
|
-
export
|
|
48
|
+
type MagicalPropertyOld = Exclude<IItemOld["magicalProperties"], undefined> extends Array<infer T> ? T : never;
|
|
49
|
+
export type IDoodadOld = Partial<Doodad> & {
|
|
50
50
|
growInto?: DoodadType;
|
|
51
51
|
legendary?: MagicalPropertyOld;
|
|
52
52
|
magicalProperties?: MagicalPropertyOld[];
|
|
@@ -196,8 +196,8 @@ export interface ILockedChest {
|
|
|
196
196
|
*/
|
|
197
197
|
guardiansSpawned?: number;
|
|
198
198
|
}
|
|
199
|
-
export
|
|
200
|
-
export
|
|
199
|
+
export type IDoodadParticles = Record<number, IRGB>;
|
|
200
|
+
export type IDoodadLoot = Record<number, ILootItem[] | undefined>;
|
|
201
201
|
export declare enum DoodadType {
|
|
202
202
|
WoodenDoor = 0,
|
|
203
203
|
WoodenFence = 1,
|
|
@@ -361,7 +361,7 @@ export declare enum DoodadTag {
|
|
|
361
361
|
* All tree types that can be spawned during map gen
|
|
362
362
|
* !! This must be kept in sync with the tree list in setupTiles !!
|
|
363
363
|
*/
|
|
364
|
-
export
|
|
364
|
+
export type MapGenDoodadTrees = DoodadType.MapleTree | DoodadType.CoconutTree | DoodadType.JoshuaTree | DoodadType.SpruceTree | DoodadType.CypressTree | DoodadType.AppleTree | DoodadType.SpruceTreeWithSnow | DoodadType.WhitePineTree | DoodadType.WhitePineTreeWithSnow | DoodadType.PapayaTree | DoodadType.Palapalai | DoodadType.ButtonMushrooms | DoodadType.PoisonIvy | DoodadType.Cattails;
|
|
365
365
|
export declare enum DoodadTypeGroup {
|
|
366
366
|
Invalid = 400,
|
|
367
367
|
LitCampfire = 401,
|
|
@@ -95,7 +95,7 @@ export declare enum StatusType {
|
|
|
95
95
|
Freezing = 8,
|
|
96
96
|
Frostbitten = 9
|
|
97
97
|
}
|
|
98
|
-
export
|
|
98
|
+
export type IStatus = Record<keyof typeof StatusType, number>;
|
|
99
99
|
export interface ICausesStatusEffect {
|
|
100
100
|
causesStatus?: Array<StatusType | [status: StatusType, level: number]>;
|
|
101
101
|
}
|
|
@@ -106,7 +106,7 @@ export declare enum Property {
|
|
|
106
106
|
Credit = 0,
|
|
107
107
|
Talked = 1
|
|
108
108
|
}
|
|
109
|
-
export
|
|
109
|
+
export type IProperties = Map<Property, any>;
|
|
110
110
|
export declare enum EntityType {
|
|
111
111
|
Player = 0,
|
|
112
112
|
Creature = 1,
|
|
@@ -180,7 +180,7 @@ export declare class Defense {
|
|
|
180
180
|
copy(): Defense;
|
|
181
181
|
equals(defense: Defense): boolean;
|
|
182
182
|
}
|
|
183
|
-
export
|
|
183
|
+
export type Attributes = AttributesImpl & Record<DamageType, number>;
|
|
184
184
|
declare class AttributesImpl {
|
|
185
185
|
static create(): Attributes;
|
|
186
186
|
private constructor();
|
|
@@ -294,7 +294,7 @@ export declare const EQUIP_SLOTS: EquipType[];
|
|
|
294
294
|
export declare const EQUIP_SLOTS_FREE: EquipType[];
|
|
295
295
|
export declare const EQUIP_SLOT_ITEM_GROUPS: Record<EquipType, ItemTypeGroup | undefined>;
|
|
296
296
|
export declare const equipmentRenderOrder: EquipType[];
|
|
297
|
-
export
|
|
297
|
+
export type InsulationWeight = number | [number, "onlyWhenEquipped"];
|
|
298
298
|
export declare const equipSlotInsulationWeights: Record<TempType, Record<EquipType, InsulationWeight>>;
|
|
299
299
|
export interface IExcludedWhenLowering {
|
|
300
300
|
excludeIfLowering: true;
|
|
@@ -61,7 +61,7 @@ export declare enum Stat {
|
|
|
61
61
|
Petting = 17,
|
|
62
62
|
Waste = 18
|
|
63
63
|
}
|
|
64
|
-
export
|
|
64
|
+
export type IStats = {
|
|
65
65
|
[key in keyof typeof Stat]: IStat;
|
|
66
66
|
};
|
|
67
67
|
export declare const SYMBOL_STAT_TYPE: unique symbol;
|
|
@@ -109,7 +109,7 @@ export interface IStatChanging extends IStatBase {
|
|
|
109
109
|
export interface IStatBonus extends IStatBase {
|
|
110
110
|
bonus: number;
|
|
111
111
|
}
|
|
112
|
-
export
|
|
112
|
+
export type IStat = IStatBase | IStatMax | IStatChanging | IStatBonus;
|
|
113
113
|
export declare enum StatDisplayType {
|
|
114
114
|
/**
|
|
115
115
|
* Do not display this stat
|
|
@@ -97,11 +97,11 @@ export declare class Action<A extends Array<ActionArgument | ActionArgument[]>,
|
|
|
97
97
|
*/
|
|
98
98
|
clone(): Action<A, E, R, CU, AV>;
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
type EntityTypeMap<E extends EntityType> = {
|
|
101
101
|
[EntityType.Creature]: Creature;
|
|
102
102
|
[EntityType.NPC]: NPC;
|
|
103
103
|
[EntityType.Player]: Player;
|
|
104
104
|
[EntityType.Human]: Human;
|
|
105
105
|
}[E];
|
|
106
|
-
|
|
106
|
+
type EntityTypeTupleType<E extends EntityType[]> = E extends [EntityType] ? EntityTypeMap<E[0]> : E extends [EntityType, EntityType] ? EntityTypeMap<E[0]> | EntityTypeMap<E[1]> : E extends [EntityType, EntityType, EntityType] ? EntityTypeMap<E[0]> | EntityTypeMap<E[1]> | EntityTypeMap<E[2]> : never;
|
|
107
107
|
export {};
|
|
@@ -191,7 +191,7 @@ export interface IActionNotUsable extends Partial<IPackedMessage> {
|
|
|
191
191
|
arg?: never;
|
|
192
192
|
source?: never;
|
|
193
193
|
}
|
|
194
|
-
export
|
|
194
|
+
export type AnyActionDescription = IActionDescription<Array<ActionArgument | ActionArgument[]>, Entity, any, IActionUsable, any[]>;
|
|
195
195
|
export interface IActionDescription<A extends Array<ActionArgument | ActionArgument[]> = Array<ActionArgument | ActionArgument[]>, E extends Entity = Entity, R = void, CU extends IActionUsable = IActionUsable, AV extends any[] = ActionArgumentTupleTypes<A>> extends IModdable {
|
|
196
196
|
type?: number;
|
|
197
197
|
argumentTypes: A;
|
|
@@ -396,16 +396,16 @@ export interface IActionArgumentTypeMap {
|
|
|
396
396
|
[ActionArgument.Vector2Array]: IVector2[];
|
|
397
397
|
[ActionArgument.Vector3]: IVector3;
|
|
398
398
|
}
|
|
399
|
-
|
|
399
|
+
type ActionArgumentEntryType<X extends ActionArgument | ActionArgument[]> = X extends ActionArgument ? IActionArgumentTypeMap[X] : X extends ActionArgument[] ? ({
|
|
400
400
|
[INDEX in keyof X]: IActionArgumentTypeMap[X[INDEX] & ActionArgument];
|
|
401
401
|
}[number]) : never;
|
|
402
|
-
export
|
|
403
|
-
export
|
|
404
|
-
export
|
|
405
|
-
export
|
|
406
|
-
export
|
|
407
|
-
export
|
|
408
|
-
export
|
|
409
|
-
export
|
|
410
|
-
export
|
|
402
|
+
export type ActionArgumentTupleTypes<X extends Array<ActionArgument | ActionArgument[]>> = X["length"] extends 0 ? [] : X["length"] extends 1 ? Tuple1<ActionArgumentEntryType<X[0]>> : X["length"] extends 2 ? Tuple2<ActionArgumentEntryType<X[0]>, ActionArgumentEntryType<X[1]>> : X["length"] extends 3 ? Tuple3<ActionArgumentEntryType<X[0]>, ActionArgumentEntryType<X[1]>, ActionArgumentEntryType<X[2]>> : X["length"] extends 4 ? Tuple4<ActionArgumentEntryType<X[0]>, ActionArgumentEntryType<X[1]>, ActionArgumentEntryType<X[2]>, ActionArgumentEntryType<X[3]>> : X["length"] extends 5 ? Tuple5<ActionArgumentEntryType<X[0]>, ActionArgumentEntryType<X[1]>, ActionArgumentEntryType<X[2]>, ActionArgumentEntryType<X[3]>, ActionArgumentEntryType<X[4]>> : never;
|
|
403
|
+
export type Tuple1<X1> = undefined extends X1 ? [X1?] : [X1];
|
|
404
|
+
export type Tuple2<X1, X2> = undefined extends X2 ? (undefined extends X1 ? [X1?, X2?] : [X1, X2?]) : [X1, X2];
|
|
405
|
+
export type Tuple3<X1, X2, X3> = undefined extends X3 ? (undefined extends X2 ? (undefined extends X1 ? [X1?, X2?, X3?] : [X1, X2?, X3?]) : [X1, X2, X3?]) : [X1, X2, X3];
|
|
406
|
+
export type Tuple4<X1, X2, X3, X4> = undefined extends X4 ? (undefined extends X3 ? (undefined extends X2 ? (undefined extends X1 ? [X1?, X2?, X3?, X4?] : [X1, X2?, X3?, X4?]) : [X1, X2, X3?, X4?]) : [X1, X2, X3, X4?]) : [X1, X2, X3, X4];
|
|
407
|
+
export type Tuple5<X1, X2, X3, X4, X5> = undefined extends X5 ? (undefined extends X4 ? (undefined extends X3 ? (undefined extends X2 ? (undefined extends X1 ? [X1?, X2?, X3?, X4?, X5?] : [X1, X2?, X3?, X4?, X5?]) : [X1, X2, X3?, X4?, X5?]) : [X1, X2, X3, X4?, X5?]) : [X1, X2, X3, X4, X5?]) : [X1, X2, X3, X4, X5];
|
|
408
|
+
export type ActionArguments<A extends IActionDescription<any, any, any, any, any>> = A extends IActionDescription<any, any, any, any, infer AA> ? AA : never;
|
|
409
|
+
export type ActionEntities<A extends IActionDescription<any, any>> = A extends IActionDescription<any, infer E> ? E : never;
|
|
410
|
+
export type ActionApi<A extends IActionDescription<any, any>> = IActionApi<ActionEntities<A>>;
|
|
411
411
|
export {};
|
|
@@ -42,6 +42,6 @@ export interface IAttackRangedWeaponCanUse extends IBaseCanUse {
|
|
|
42
42
|
rangedRequiredWeapon?: Item;
|
|
43
43
|
ammoItem: Item;
|
|
44
44
|
}
|
|
45
|
-
export
|
|
45
|
+
export type IAttackCanUse = IAttackCloseUpCanUse | IAttackThrowItemCanUse | IAttackRangedWeaponCanUse;
|
|
46
46
|
declare const _default: Action<[[ActionArgument.ItemInventory, ActionArgument.Undefined], [ActionArgument.AttackType, ActionArgument.Undefined], [ActionArgument.ItemInventory, ActionArgument.Undefined]], Human, void, IAttackCanUse, [(Item | undefined)?, (AttackType | undefined)?, (Item | undefined)?]>;
|
|
47
47
|
export default _default;
|
|
@@ -26,6 +26,6 @@ export interface IDigTileCanUse extends IActionUsable {
|
|
|
26
26
|
terrainDescription?: ITerrainDescription;
|
|
27
27
|
tileType: TerrainType;
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
type IDigCanUse = IDigGenericCanUse | IDigTileCanUse;
|
|
30
30
|
declare const _default: Action<[[ActionArgument.ItemInventory, ActionArgument.Undefined]], import("../../Human").default, void, IDigCanUse, [(Item | undefined)?]>;
|
|
31
31
|
export default _default;
|
|
@@ -64,6 +64,6 @@ export interface IGatherTerrainCanUse extends IGatherBaseCanUse {
|
|
|
64
64
|
gatherType: GatherType.Terrain;
|
|
65
65
|
terrainDescription: ITerrainDescription;
|
|
66
66
|
}
|
|
67
|
-
export
|
|
67
|
+
export type IGatherCanUse = IGatherTileEventCanUse | IGatherDoodadCanUse | IGatherDoodadHarvestCanUse | IGatherTerrainCanUse;
|
|
68
68
|
declare const _default: Action<[[ActionArgument.ItemInventory, ActionArgument.Undefined]], import("../../Human").default, void, IGatherCanUse, [(Item | undefined)?]>;
|
|
69
69
|
export default _default;
|
|
@@ -53,6 +53,6 @@ export interface IGatherLiquidFromLiquidCanUse extends IActionUsable {
|
|
|
53
53
|
y: number;
|
|
54
54
|
z: number;
|
|
55
55
|
}
|
|
56
|
-
export
|
|
56
|
+
export type IGatherLiquidCanUse = IGatherLiquidFromWispCanUse | IGatherLiquidFromGoatCanUse | IGatherLiquidFromWaterStillCanUse | IGatherLiquidFromWellCanUse | IGatherLiquidFromLiquidCanUse;
|
|
57
57
|
declare const _default: Action<[ActionArgument.ItemNearby], import("../../Human").default, void, IGatherLiquidCanUse, [import("../../../item/Item").default]>;
|
|
58
58
|
export default _default;
|
|
@@ -43,6 +43,6 @@ export interface IMoveItemMultipleItemsCanUse extends IActionUsable {
|
|
|
43
43
|
targetContainer: IContainer;
|
|
44
44
|
containerName: Translation | undefined;
|
|
45
45
|
}
|
|
46
|
-
export
|
|
46
|
+
export type MoveItemCanUse = IMoveItemBuyItemFromMerchantCanUse | IMoveItemSellItemFromMerchantCanUse | IMoveItemSingleItemCanUse | IMoveItemMultipleItemsCanUse;
|
|
47
47
|
declare const _default: Action<[[ActionArgument.ItemNearbyIncludingTradeContainer, ActionArgument.Undefined], [ActionArgument.Container, ActionArgument.Undefined], [ActionArgument.ItemType, ActionArgument.Undefined], [ActionArgument.Quality, ActionArgument.Undefined], [ActionArgument.String, ActionArgument.Undefined]], Human, void, MoveItemCanUse, [(Item | undefined)?, (IContainer | undefined)?, (import("game/item/IItem").ItemType | undefined)?, (import("../../../IObject").Quality | undefined)?, (string | undefined)?]>;
|
|
48
48
|
export default _default;
|
|
@@ -28,6 +28,6 @@ export interface ToggleVehicleItemCanUse extends IActionUsable {
|
|
|
28
28
|
currentTile?: ITile;
|
|
29
29
|
facingTile?: ITile;
|
|
30
30
|
}
|
|
31
|
-
export
|
|
31
|
+
export type ToggleVehicleCanUse = ToggleVehicleDoodadCanUse | ToggleVehicleItemCanUse;
|
|
32
32
|
declare const _default: Action<[[ActionArgument.ItemNearby, ActionArgument.Doodad, ActionArgument.Undefined]], import("../../Human").default, void, ToggleVehicleCanUse, [(Doodad | Item | undefined)?]>;
|
|
33
33
|
export default _default;
|
|
@@ -103,10 +103,10 @@ export interface IUsableActionUsing<REQUIREMENTS extends IUsableActionRequiremen
|
|
|
103
103
|
find(player: Player): NPC;
|
|
104
104
|
} ? NPC : never));
|
|
105
105
|
}
|
|
106
|
-
export
|
|
106
|
+
export type UsableActionIconReference = ActionType | UsableActionType | UsableActionTypePlaceholder | (Omit<IIcon, "path"> & {
|
|
107
107
|
action: ActionType | UsableActionType | UsableActionTypePlaceholder;
|
|
108
108
|
}) | IIcon;
|
|
109
|
-
export
|
|
109
|
+
export type ReturnableUsableActionUsability = IActionUsable | IActionNotUsable | boolean;
|
|
110
110
|
export interface IUsableActionUsable<REQUIREMENTS extends IUsableActionRequirements> extends IActionUsable {
|
|
111
111
|
using: IUsableActionUsing<REQUIREMENTS>;
|
|
112
112
|
forceDisplay?: true;
|
|
@@ -119,7 +119,7 @@ export declare namespace IUsableActionNotUsable {
|
|
|
119
119
|
function sendMessage(notUsable: IActionNotUsable): void;
|
|
120
120
|
function equals(a: IUsableActionNotUsable, b: IUsableActionNotUsable): boolean;
|
|
121
121
|
}
|
|
122
|
-
export
|
|
122
|
+
export type UsableActionUsability<REQUIREMENTS extends IUsableActionRequirements = IUsableActionRequirements> = IUsableActionUsable<REQUIREMENTS> | IUsableActionNotUsable;
|
|
123
123
|
export declare enum UsableActionExecutionContext {
|
|
124
124
|
ContextMenu = 0,
|
|
125
125
|
ActionBar = 1
|
|
@@ -240,8 +240,8 @@ export interface IUsableActionDefinitionExecutable<REQUIREMENTS extends IUsableA
|
|
|
240
240
|
execute(player: Player, using: IUsableActionUsing<REQUIREMENTS>, context: IUsableActionExecutionContext): any;
|
|
241
241
|
isUsable?(player: Player, using: IUsableActionUsing<REQUIREMENTS>): ReturnableUsableActionUsability;
|
|
242
242
|
}
|
|
243
|
-
export
|
|
244
|
-
export
|
|
243
|
+
export type IUsableActionDefinition<REQUIREMENTS extends IUsableActionRequirements = IUsableActionRequirements> = IUsableActionDefinitionSubmenu<REQUIREMENTS> | IUsableActionDefinitionExecutable<REQUIREMENTS>;
|
|
244
|
+
export type ActionId = string | ActionType | UsableActionType;
|
|
245
245
|
export declare enum UsableActionDisplayContext {
|
|
246
246
|
None = 0,
|
|
247
247
|
Use = 1
|
|
@@ -35,7 +35,7 @@ export interface IUsableActionGeneratorPersistenceFactory<HOST> {
|
|
|
35
35
|
until<E extends EmitterOrBus, K extends Event<E>>(emitter: E, event: K): HOST;
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
export
|
|
38
|
+
export type UsableActionGeneratorRegistrationHandler<ARGS extends any[]> = (registrar: UsableActionRegistrar, ...args: ARGS) => any;
|
|
39
39
|
export interface IUsableActionGeneratorFactory {
|
|
40
40
|
create<ARGS extends any[]>(id: string, registrationHandler: UsableActionGeneratorRegistrationHandler<ARGS>): UsableActionGenerator<ARGS>;
|
|
41
41
|
create<ARGS extends any[]>(registrationHandler: UsableActionGeneratorRegistrationHandler<ARGS>): UsableActionGenerator<ARGS>;
|
|
@@ -13,8 +13,8 @@ import { UsableActionDisplayContext } from "game/entity/action/usable/IUsableAct
|
|
|
13
13
|
import type UsableAction from "game/entity/action/usable/UsableAction";
|
|
14
14
|
import { ActionTranslation } from "language/dictionary/Misc";
|
|
15
15
|
import Translation from "language/Translation";
|
|
16
|
-
export
|
|
17
|
-
export
|
|
16
|
+
export type UsableActionTranslationArguments = [using: IUsableActionPossibleUsing, action: UsableAction, context: UsableActionDisplayContext];
|
|
17
|
+
export type ActionWhichTranslation = ActionTranslation | "useExact" | "useByTypeAndQuality" | "useByType" | "useAny";
|
|
18
18
|
export declare class UsableActionTranslator {
|
|
19
19
|
readonly id: ActionId;
|
|
20
20
|
static translateId(id: ActionId, which?: ActionTranslation): import("../../../../language/impl/TranslationImpl").default | undefined;
|
|
@@ -130,7 +130,7 @@ export default abstract class NPC extends Human {
|
|
|
130
130
|
protected changeZ(toZ: number, fromZ: number): boolean | void | undefined;
|
|
131
131
|
protected preMove(fromX: number, fromY: number, fromZ: number, fromTile: ITile, toX: number, toY: number, toZ: number, toTile: ITile, isMoving: boolean): boolean | void | undefined;
|
|
132
132
|
protected postMove(): void;
|
|
133
|
-
protected checkMove(moveType: MoveType, tileX: number, tileY: number, tileZ: number):
|
|
133
|
+
protected checkMove(moveType: MoveType, tileX: number, tileY: number, tileZ: number): -1 | 0 | -2 | -3 | -4 | -5;
|
|
134
134
|
getWeightOrStaminaMovementPenalty(): number;
|
|
135
135
|
get asMerchant(): MerchantNPC | undefined;
|
|
136
136
|
get asNPC(): NPC;
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
|
-
export
|
|
12
|
-
export
|
|
11
|
+
export type ICreditProperty = Map<string, number | undefined>;
|
|
12
|
+
export type ITalkedProperty = Map<string, boolean | undefined>;
|
|
@@ -121,7 +121,7 @@ export interface IAttackHand {
|
|
|
121
121
|
mainHand: number;
|
|
122
122
|
offHand: number;
|
|
123
123
|
}
|
|
124
|
-
export
|
|
124
|
+
export type IPlayerOld = Partial<Omit<Player, "customization">> & Partial<{
|
|
125
125
|
gender: 0 | 1;
|
|
126
126
|
talent: number;
|
|
127
127
|
stamina: number;
|
|
@@ -196,7 +196,7 @@ export interface IInputMovement extends IVector2 {
|
|
|
196
196
|
direction: Direction.Cardinal;
|
|
197
197
|
}
|
|
198
198
|
export declare const gameMovement: IInputMovement[];
|
|
199
|
-
export
|
|
199
|
+
export type MovementIntent = Direction.Cardinal | Direction.None | "idle" | undefined;
|
|
200
200
|
export declare const movementIntents: MovementIntent[];
|
|
201
201
|
export interface IMovementIntent {
|
|
202
202
|
/**
|
|
@@ -17,7 +17,7 @@ export interface INoteDescription extends IModdable {
|
|
|
17
17
|
learnMore?: HelpArticle;
|
|
18
18
|
}
|
|
19
19
|
export declare const noteDescriptions: OptionalDescriptions<Note, INoteDescription>;
|
|
20
|
-
export
|
|
20
|
+
export type Time = PartOfDay | string;
|
|
21
21
|
export interface INote {
|
|
22
22
|
id: keyof typeof Note;
|
|
23
23
|
time: {
|
|
@@ -33,4 +33,4 @@ declare const requirements: {
|
|
|
33
33
|
}>;
|
|
34
34
|
};
|
|
35
35
|
export default requirements;
|
|
36
|
-
export
|
|
36
|
+
export type RequirementArgs<R extends QuestRequirementType> = (typeof requirements)[R] extends QuestRequirement<infer O, any> ? O : (typeof requirements)[R] extends QuestRequirement<infer O2> ? O2 : never;
|
|
@@ -14,7 +14,7 @@ import type Player from "game/entity/player/Player";
|
|
|
14
14
|
import type { IQuestRequirementApi } from "game/entity/player/quest/requirement/IRequirement";
|
|
15
15
|
import Translation from "language/Translation";
|
|
16
16
|
import type { HighlightSelector } from "ui/util/IHighlight";
|
|
17
|
-
export
|
|
17
|
+
export type QuestRequirementApi<R extends QuestRequirement<any, any>> = R extends QuestRequirement<infer O, infer D> ? IQuestRequirementApi<O, D> : never;
|
|
18
18
|
export declare class QuestRequirement<O extends any[] = [], D extends {} = {}> {
|
|
19
19
|
readonly defaultData: D;
|
|
20
20
|
private readonly eventTriggers;
|
|
@@ -33,7 +33,7 @@ export interface ISkillEvents {
|
|
|
33
33
|
*/
|
|
34
34
|
skillChange(skill: SkillType, value: number, oldValue: number): any;
|
|
35
35
|
}
|
|
36
|
-
export
|
|
36
|
+
export type SkillSet = Record<SkillType, ISkillLevel>;
|
|
37
37
|
export interface ISkillHost extends EventEmitter.Host<ISkillEvents> {
|
|
38
38
|
readonly island: Island;
|
|
39
39
|
}
|
|
@@ -31,7 +31,7 @@ export interface IStatusEffectIconDescription {
|
|
|
31
31
|
*/
|
|
32
32
|
frames?: number;
|
|
33
33
|
}
|
|
34
|
-
export
|
|
34
|
+
export type StatusEffectClass = Class<StatusEffect, [StatusType, Entity]> & IModdable;
|
|
35
35
|
export declare enum StatusEffectBadness {
|
|
36
36
|
Neutral = 0,
|
|
37
37
|
Bad = 1,
|
|
@@ -54,7 +54,7 @@ declare const inspectionTypeMap: {
|
|
|
54
54
|
5: typeof TileEventInspection;
|
|
55
55
|
16: typeof TileEventInspection.Minors;
|
|
56
56
|
};
|
|
57
|
-
export
|
|
57
|
+
export type InspectionClass = Class<Inspection<any>> & {
|
|
58
58
|
isWorldInspection?(inspectType: InspectType): boolean;
|
|
59
59
|
getFromTile?(position: IVector3, context: InfoProviderContext, inspectType: InspectType): ArrayOr<Inspection<any>>;
|
|
60
60
|
/**
|
|
@@ -91,7 +91,7 @@ declare const _default: {
|
|
|
91
91
|
16: typeof TileEventInspection.Minors;
|
|
92
92
|
} & Record<InspectType, InspectionClass>;
|
|
93
93
|
export default _default;
|
|
94
|
-
export
|
|
94
|
+
export type ResolvedInspection<TYPE extends InspectType> = InstanceOf<(typeof inspectionTypeMap)[TYPE]>;
|
|
95
95
|
export declare module Inspections {
|
|
96
96
|
function get(...args: any[]): Inspection<any> | undefined;
|
|
97
97
|
function isWorldInspection(type: InspectType): boolean;
|
|
@@ -13,7 +13,7 @@ import type { InfoProviderContext } from "game/inspection/InfoProviderContext";
|
|
|
13
13
|
import type Translation from "language/Translation";
|
|
14
14
|
import type Button from "ui/component/Button";
|
|
15
15
|
import type { TranslationGenerator } from "ui/component/IComponent";
|
|
16
|
-
|
|
16
|
+
type ContentHandler = (context: InfoProviderContext, provider: CollapsableInfoProvider) => ArrayOr<TranslationGenerator | InfoProvider>;
|
|
17
17
|
export default class CollapsableInfoProvider extends InfoProvider {
|
|
18
18
|
private contentHandler?;
|
|
19
19
|
private summaryInitializer?;
|
|
@@ -18,7 +18,7 @@ import UiTranslation from "language/dictionary/UiTranslation";
|
|
|
18
18
|
import Translation from "language/Translation";
|
|
19
19
|
import type { TranslationGenerator } from "ui/component/IComponent";
|
|
20
20
|
import { IRange } from "utilities/math/Range";
|
|
21
|
-
export
|
|
21
|
+
export type NumberTranslator = (number: number | IRange, isMod: boolean, isPercent: boolean, isMultiplied: boolean) => Translation;
|
|
22
22
|
export default class MagicalPropertyValue extends InfoProvider {
|
|
23
23
|
private readonly base;
|
|
24
24
|
private numberTranslator?;
|
|
@@ -14,9 +14,9 @@ import type { IInspector } from "game/inspection/IInfoProvider";
|
|
|
14
14
|
import { InfoProvider } from "game/inspection/InfoProvider";
|
|
15
15
|
import type { InfoProviderContext } from "game/inspection/InfoProviderContext";
|
|
16
16
|
import type { TranslationGenerator } from "ui/component/IComponent";
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
type SkillRequirement = [skill: SkillType, amount: number];
|
|
18
|
+
type InfoGenerator = () => ArrayOr<TranslationGenerator | InfoProvider>;
|
|
19
|
+
type HasResolvableBuilder = IInspector | IHasBuilder;
|
|
20
20
|
export default class ObscuredValue extends InfoProvider {
|
|
21
21
|
private readonly isOrCheck;
|
|
22
22
|
private readonly inspector;
|
|
@@ -12,7 +12,7 @@ import { InfoProvider } from "game/inspection/InfoProvider";
|
|
|
12
12
|
import type { InfoProviderContext } from "game/inspection/InfoProviderContext";
|
|
13
13
|
import type Translation from "language/Translation";
|
|
14
14
|
import type { TranslationGenerator } from "ui/component/IComponent";
|
|
15
|
-
|
|
15
|
+
type ContentHandler = (context: InfoProviderContext, provider: UnlockableRowInfoProvider) => ArrayOr<TranslationGenerator | InfoProvider>;
|
|
16
16
|
export default class UnlockableRowInfoProvider extends InfoProvider {
|
|
17
17
|
private readonly getter;
|
|
18
18
|
private contentHandler?;
|