@wayward/types 2.12.0-beta.dev.20220930.1 → 2.12.0-beta.dev.20221002.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/game/game/entity/action/usable/IUsableAction.d.ts +2 -2
- package/definitions/game/game/entity/action/usable/UsableAction.d.ts +4 -4
- package/definitions/game/game/entity/action/usable/UsableActionRegistrar.d.ts +1 -1
- package/definitions/game/game/entity/action/usable/UsableActionTranslator.d.ts +3 -3
- package/definitions/game/game/entity/action/usable/UsableActionType.d.ts +1 -0
- package/definitions/game/game/entity/action/usable/actions/UsableActionsWorld.d.ts +1 -1
- package/definitions/game/game/inspection/infoProviders/item/ItemDetails.d.ts +1 -1
- package/definitions/game/game/inspection/infoProviders/stat/AttackInfo.d.ts +1 -1
- package/definitions/game/game/inspection/inspections/ActionInspection.d.ts +5 -5
- package/definitions/game/game/inspection/inspections/CorpseInspection.d.ts +1 -1
- package/definitions/game/game/island/IslandManager.d.ts +4 -0
- package/definitions/game/game/options/modifiers/GameplayModifier.d.ts +2 -2
- package/definitions/game/game/options/modifiers/milestone/MilestoneModifier.d.ts +4 -2
- package/definitions/game/game/options/modifiers/milestone/MilestoneModifiersManager.d.ts +2 -3
- package/definitions/game/game/options/modifiers/milestone/modifiers/shared/TamedCreatureMilestoneModifier.d.ts +1 -1
- package/definitions/game/game/reference/IReferenceManager.d.ts +3 -3
- package/definitions/game/game/reference/ReferenceManager.d.ts +1 -1
- package/definitions/game/language/dictionary/UiTranslation.d.ts +787 -785
- package/definitions/game/mod/BaseMod.d.ts +1 -0
- package/definitions/game/ui/component/Button.d.ts +9 -1
- package/definitions/game/ui/screen/Screen.d.ts +2 -0
- package/definitions/game/ui/screen/screens/game/ReferenceIconRenderer.d.ts +1 -1
- package/definitions/game/ui/screen/screens/game/component/Item.d.ts +2 -0
- package/definitions/game/ui/screen/screens/game/static/ActionBar.d.ts +2 -1
- package/definitions/game/ui/screen/screens/game/static/actions/ActionsDrawer.d.ts +1 -1
- package/definitions/game/ui/util/ComponentManipulator.d.ts +1 -0
- package/definitions/game/utilities/types/Assert.d.ts +14 -0
- package/package.json +1 -1
|
@@ -147,7 +147,7 @@ export interface IUsableActionDefinitionBase<REQUIREMENTS extends IUsableActionR
|
|
|
147
147
|
/**
|
|
148
148
|
* The icon this action should have, if any.
|
|
149
149
|
*/
|
|
150
|
-
icon?: SupplierOr<UsableActionIconReference | false, [using: IUsableActionPossibleUsing, action: UsableAction<REQUIREMENTS
|
|
150
|
+
icon?: SupplierOr<UsableActionIconReference | false, [using: IUsableActionPossibleUsing, action: UsableAction<REQUIREMENTS>, context: UsableActionDisplayContext]>;
|
|
151
151
|
/**
|
|
152
152
|
* Where the icon should appear, when slotted with an item. Defaults to bottom right.
|
|
153
153
|
*
|
|
@@ -241,7 +241,7 @@ export interface IUsableActionDefinitionExecutable<REQUIREMENTS extends IUsableA
|
|
|
241
241
|
}
|
|
242
242
|
export declare type IUsableActionDefinition<REQUIREMENTS extends IUsableActionRequirements = IUsableActionRequirements> = IUsableActionDefinitionSubmenu<REQUIREMENTS> | IUsableActionDefinitionExecutable<REQUIREMENTS>;
|
|
243
243
|
export declare type ActionId = string | ActionType | UsableActionType;
|
|
244
|
-
export declare enum
|
|
244
|
+
export declare enum UsableActionDisplayContext {
|
|
245
245
|
None = 0,
|
|
246
246
|
Use = 1
|
|
247
247
|
}
|
|
@@ -8,8 +8,8 @@
|
|
|
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
|
-
import type { ActionId, IUsableActionDefinition, IUsableActionDefinitionExecutable, IUsableActionExecutionContext, IUsableActionPossibleUsing, IUsableActionRequirements, IUsableActionUsing,
|
|
12
|
-
import { IUsableActionNotUsable } from "game/entity/action/usable/IUsableAction";
|
|
11
|
+
import type { ActionId, IUsableActionDefinition, IUsableActionDefinitionExecutable, IUsableActionExecutionContext, IUsableActionPossibleUsing, IUsableActionRequirements, IUsableActionUsing, UsableActionUsability } from "game/entity/action/usable/IUsableAction";
|
|
12
|
+
import { IUsableActionNotUsable, UsableActionDisplayContext } from "game/entity/action/usable/IUsableAction";
|
|
13
13
|
import type Player from "game/entity/player/Player";
|
|
14
14
|
import type { IIcon } from "game/inspection/InfoProvider";
|
|
15
15
|
import type Item from "game/item/Item";
|
|
@@ -54,10 +54,10 @@ declare class UsableAction<REQUIREMENTS extends IUsableActionRequirements = IUsa
|
|
|
54
54
|
getDoodad(player: Player, provided?: IUsableActionPossibleUsing): false | import("../../../doodad/Doodad").default | undefined;
|
|
55
55
|
getCreature(player: Player, provided?: IUsableActionPossibleUsing): false | import("../../creature/Creature").default | undefined;
|
|
56
56
|
getNPC(player: Player, provided?: IUsableActionPossibleUsing): false | import("../../npc/NPC").default | undefined;
|
|
57
|
-
getIcon(provided: IUsableActionPossibleUsing): IIcon | undefined;
|
|
57
|
+
getIcon(provided: IUsableActionPossibleUsing, context?: UsableActionDisplayContext): IIcon | undefined;
|
|
58
58
|
getHighlightSelectors(using?: IUsableActionPossibleUsing): HighlightSelector[];
|
|
59
59
|
private translator?;
|
|
60
|
-
getTranslation(using?: IUsableActionPossibleUsing, which?: ActionTranslation, context?:
|
|
60
|
+
getTranslation(using?: IUsableActionPossibleUsing, which?: ActionTranslation, context?: UsableActionDisplayContext): Translation | undefined;
|
|
61
61
|
getOrder(using?: IUsableActionPossibleUsing): number;
|
|
62
62
|
}
|
|
63
63
|
export interface IUsableActionFactory<REQUIREMENTS extends IUsableActionRequirements> {
|
|
@@ -18,7 +18,7 @@ export default class UsableActionRegistrar {
|
|
|
18
18
|
readonly actions: Array<[string, UsableAction]>;
|
|
19
19
|
readonly actionIndices: Record<string, number>;
|
|
20
20
|
readonly actionIds: string[];
|
|
21
|
-
byId(id?:
|
|
21
|
+
byId(id?: ActionId): UsableAction | undefined;
|
|
22
22
|
filter(filter: (action: UsableAction, id: string) => any): UsableActionRegistrar;
|
|
23
23
|
private contextMenuInitializer?;
|
|
24
24
|
setContextMenuInitializer(initializer?: (menu: ContextMenu) => any): this;
|
|
@@ -8,12 +8,12 @@
|
|
|
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
|
-
import { UsableActionTranslationContext } from "game/entity/action/usable/IUsableAction";
|
|
12
11
|
import type { ActionId, IUsableActionPossibleUsing } from "game/entity/action/usable/IUsableAction";
|
|
12
|
+
import { UsableActionDisplayContext } from "game/entity/action/usable/IUsableAction";
|
|
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 declare type UsableActionTranslationArguments = [using: IUsableActionPossibleUsing, action: UsableAction, context:
|
|
16
|
+
export declare type UsableActionTranslationArguments = [using: IUsableActionPossibleUsing, action: UsableAction, context: UsableActionDisplayContext];
|
|
17
17
|
export declare class UsableActionTranslator {
|
|
18
18
|
readonly id: ActionId;
|
|
19
19
|
static translateId(id: ActionId, which?: ActionTranslation): import("../../../../language/impl/TranslationImpl").default | undefined;
|
|
@@ -24,5 +24,5 @@ export declare class UsableActionTranslator {
|
|
|
24
24
|
name(supplier: SupplierOr<Translation, UsableActionTranslationArguments>): this;
|
|
25
25
|
description(id: ActionId): this;
|
|
26
26
|
description(supplier: SupplierOr<Translation, UsableActionTranslationArguments>): this;
|
|
27
|
-
get(action: UsableAction, using?: IUsableActionPossibleUsing, which?: ActionTranslation, context?:
|
|
27
|
+
get(action: UsableAction, using?: IUsableActionPossibleUsing, which?: ActionTranslation, context?: UsableActionDisplayContext): Translation | undefined;
|
|
28
28
|
}
|
|
@@ -17,7 +17,7 @@ export declare enum WorldContextMenuClasses {
|
|
|
17
17
|
OptionText = "world-context-menu-option-text"
|
|
18
18
|
}
|
|
19
19
|
export declare namespace WorldContextMenuClasses {
|
|
20
|
-
const OptionSpecific: (enumValue: UsableActionType) => "world-context-menu-option-actions" | "world-context-menu-option-use" | "world-context-menu-option-move" | "world-context-menu-option-quickslotremove" | "world-context-menu-option-quickslotadd" | "world-context-menu-option-quickslotaddtofree" | "world-context-menu-option-quickslotaddtoslot" | "world-context-menu-option-movetoinventory" | "world-context-menu-option-dropmenu" | "world-context-menu-option-dropall" | "world-context-menu-option-dropallofsamequality" | "world-context-menu-option-repairwithitem" | "world-context-menu-option-reinforcewithitem" | "world-context-menu-option-enhancewithitem" | "world-context-menu-option-enchantwithitem" | "world-context-menu-option-transmogrifywithitem" | "world-context-menu-option-upgradewithitem" | "world-context-menu-option-alterwithitem" | "world-context-menu-option-refinewithitem" | "world-context-menu-option-preservewithitem" | "world-context-menu-option-addfuelwithitem" | "world-context-menu-option-ignitewithitem" | "world-context-menu-option-absorbwithitem" | "world-context-menu-option-exudewithitem" | "world-context-menu-option-movetoinventorymenu" | "world-context-menu-option-movetoactivecontainermenu" | "world-context-menu-option-movetofacingcontainermenu" | "world-context-menu-option-moveall" | "world-context-menu-option-moveallofsamequality" | "world-context-menu-option-tradetradersell" | "world-context-menu-option-tradetraderbuy" | "world-context-menu-option-itemactions" | "world-context-menu-option-gatherwithhands" | "world-context-menu-option-harvestwithhands" | "world-context-menu-option-digwithhands" | "world-context-menu-option-tillwithhands" | "world-context-menu-option-pickupexcrementwithhands" | "world-context-menu-option-equipheld" | "world-context-menu-option-equiplegs" | "world-context-menu-option-equipchest" | "world-context-menu-option-equiphead" | "world-context-menu-option-equipwaist" | "world-context-menu-option-equipfeet" | "world-context-menu-option-equipneck" | "world-context-menu-option-equiphands" | "world-context-menu-option-equipback" | "world-context-menu-option-equipmainhand" | "world-context-menu-option-equipoffhand" | "world-context-menu-option-restonground" | "world-context-menu-option-sleeponground";
|
|
20
|
+
const OptionSpecific: (enumValue: UsableActionType) => "world-context-menu-option-none" | "world-context-menu-option-actions" | "world-context-menu-option-use" | "world-context-menu-option-move" | "world-context-menu-option-quickslotremove" | "world-context-menu-option-quickslotadd" | "world-context-menu-option-quickslotaddtofree" | "world-context-menu-option-quickslotaddtoslot" | "world-context-menu-option-movetoinventory" | "world-context-menu-option-dropmenu" | "world-context-menu-option-dropall" | "world-context-menu-option-dropallofsamequality" | "world-context-menu-option-repairwithitem" | "world-context-menu-option-reinforcewithitem" | "world-context-menu-option-enhancewithitem" | "world-context-menu-option-enchantwithitem" | "world-context-menu-option-transmogrifywithitem" | "world-context-menu-option-upgradewithitem" | "world-context-menu-option-alterwithitem" | "world-context-menu-option-refinewithitem" | "world-context-menu-option-preservewithitem" | "world-context-menu-option-addfuelwithitem" | "world-context-menu-option-ignitewithitem" | "world-context-menu-option-absorbwithitem" | "world-context-menu-option-exudewithitem" | "world-context-menu-option-movetoinventorymenu" | "world-context-menu-option-movetoactivecontainermenu" | "world-context-menu-option-movetofacingcontainermenu" | "world-context-menu-option-moveall" | "world-context-menu-option-moveallofsamequality" | "world-context-menu-option-tradetradersell" | "world-context-menu-option-tradetraderbuy" | "world-context-menu-option-itemactions" | "world-context-menu-option-gatherwithhands" | "world-context-menu-option-harvestwithhands" | "world-context-menu-option-digwithhands" | "world-context-menu-option-tillwithhands" | "world-context-menu-option-pickupexcrementwithhands" | "world-context-menu-option-equipheld" | "world-context-menu-option-equiplegs" | "world-context-menu-option-equipchest" | "world-context-menu-option-equiphead" | "world-context-menu-option-equipwaist" | "world-context-menu-option-equipfeet" | "world-context-menu-option-equipneck" | "world-context-menu-option-equiphands" | "world-context-menu-option-equipback" | "world-context-menu-option-equipmainhand" | "world-context-menu-option-equipoffhand" | "world-context-menu-option-restonground" | "world-context-menu-option-sleeponground";
|
|
21
21
|
}
|
|
22
22
|
export declare const UsableActionsWorldActions: UsableActionGenerator<[]>;
|
|
23
23
|
export declare const UsableActionsWorldItemActions: UsableActionGenerator<[]>;
|
|
@@ -19,7 +19,7 @@ export default class ItemDetailsInfoProvider extends InfoProvider {
|
|
|
19
19
|
private readonly description;
|
|
20
20
|
constructor(item: Item | ItemType);
|
|
21
21
|
getClass(): string[];
|
|
22
|
-
get(): (0 | import("game/inspection/InfoProvider").SimpleInfoProvider |
|
|
22
|
+
get(): (0 | LabelledValue | import("game/inspection/InfoProvider").SimpleInfoProvider | ItemWorthInfoProvider)[];
|
|
23
23
|
private getInsulation;
|
|
24
24
|
private getPreservation;
|
|
25
25
|
private getGroupings;
|
|
@@ -15,7 +15,7 @@ export default class AttackInfo extends InfoProvider {
|
|
|
15
15
|
private readonly human?;
|
|
16
16
|
constructor(human?: Human | undefined);
|
|
17
17
|
getClass(): string[];
|
|
18
|
-
get(): (import("game/inspection/InfoProvider").SimpleInfoProvider
|
|
18
|
+
get(): (LabelledValue | import("game/inspection/InfoProvider").SimpleInfoProvider)[];
|
|
19
19
|
private getTactics;
|
|
20
20
|
private getMainHand;
|
|
21
21
|
private getOffHand;
|
|
@@ -8,9 +8,8 @@
|
|
|
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
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import { UsableActionTranslationContext } from "game/entity/action/usable/IUsableAction";
|
|
11
|
+
import type { ActionId, IUsableActionPossibleUsing } from "game/entity/action/usable/IUsableAction";
|
|
12
|
+
import { UsableActionDisplayContext } from "game/entity/action/usable/IUsableAction";
|
|
14
13
|
import { InspectType } from "game/inspection/IInspection";
|
|
15
14
|
import { InfoProvider } from "game/inspection/InfoProvider";
|
|
16
15
|
import { InfoProviderContext } from "game/inspection/InfoProviderContext";
|
|
@@ -19,15 +18,16 @@ import type { EnumReferenceResolved } from "game/reference/IReferenceManager";
|
|
|
19
18
|
import { ReferenceType } from "game/reference/IReferenceManager";
|
|
20
19
|
import type { TranslationGenerator } from "ui/component/IComponent";
|
|
21
20
|
import type { ActionSlot } from "ui/screen/screens/game/static/ActionBar";
|
|
22
|
-
export default class ActionInspection extends Inspection<
|
|
21
|
+
export default class ActionInspection extends Inspection<ActionId | undefined> {
|
|
23
22
|
private readonly slot?;
|
|
24
23
|
static handles: (type: InspectType, value: unknown, context?: InfoProviderContext | undefined) => any;
|
|
25
24
|
private readonly item?;
|
|
26
25
|
using?: IUsableActionPossibleUsing;
|
|
27
26
|
constructor(value?: string | EnumReferenceResolved<ReferenceType.Action>, slot?: ActionSlot | undefined);
|
|
28
27
|
setUsing(using?: IUsableActionPossibleUsing): this;
|
|
29
|
-
setContext(context:
|
|
28
|
+
setContext(context: UsableActionDisplayContext): this;
|
|
30
29
|
getId(): string;
|
|
30
|
+
private getActionId;
|
|
31
31
|
get(context: InfoProviderContext): ArrayOr<TranslationGenerator | InfoProvider>;
|
|
32
32
|
private getTranslation;
|
|
33
33
|
private getActionTier;
|
|
@@ -19,7 +19,7 @@ export default class CorpseInspection extends Inspection<Corpse> {
|
|
|
19
19
|
static getFromTile(position: IVector3): CorpseInspection[];
|
|
20
20
|
static handles(type: InspectType, corpse: unknown): boolean;
|
|
21
21
|
constructor(corpse: Corpse);
|
|
22
|
-
get(context: InfoProviderContext): (0 | import("game/inspection/InfoProvider").SimpleInfoProvider
|
|
22
|
+
get(context: InfoProviderContext): (0 | LabelledValue | import("game/inspection/InfoProvider").SimpleInfoProvider)[];
|
|
23
23
|
private getDecay;
|
|
24
24
|
private decay;
|
|
25
25
|
private shouldRefreshDecay;
|
|
@@ -15,6 +15,10 @@ export default class IslandManager extends Map<IslandId, Island> {
|
|
|
15
15
|
* Get the list of islands that contain players
|
|
16
16
|
*/
|
|
17
17
|
get active(): Island[];
|
|
18
|
+
/**
|
|
19
|
+
* Get the list of islands that are loaded
|
|
20
|
+
*/
|
|
21
|
+
get loaded(): Island[];
|
|
18
22
|
/**
|
|
19
23
|
* Get the island at position 0,0
|
|
20
24
|
*/
|
|
@@ -35,8 +35,8 @@ export default abstract class GameplayModifier<ID extends number, INSTANCE exten
|
|
|
35
35
|
private readonly _args;
|
|
36
36
|
readonly imagePath?: string;
|
|
37
37
|
constructor(id: ID, random?: RandomInstance | RandomReference);
|
|
38
|
-
abstract instantiate(type: ID, ...args: INSTANCE_ARGS): INSTANCE;
|
|
39
|
-
abstract initialize(instance: INSTANCE, ...args: INSTANCE_ARGS): INSTANCE;
|
|
38
|
+
abstract instantiate(type: ID, ...args: INSTANCE_ARGS): INSTANCE | undefined;
|
|
39
|
+
abstract initialize(instance: INSTANCE, ...args: INSTANCE_ARGS): INSTANCE | undefined;
|
|
40
40
|
uninitialize(instance: INSTANCE): any;
|
|
41
41
|
protected getRandom(): Random<SeededGenerator>;
|
|
42
42
|
}
|
|
@@ -32,15 +32,17 @@ export declare class MilestoneModifierInstance extends GameplayModifierInstance<
|
|
|
32
32
|
protected getDefaultTitle(): import("../../../../language/impl/TranslationImpl").default;
|
|
33
33
|
}
|
|
34
34
|
export default abstract class MilestoneModifier extends GameplayModifier<Milestone, MilestoneModifierInstance, [Human?]> {
|
|
35
|
+
static isGlobal(modifier: MilestoneModifier): boolean;
|
|
36
|
+
static areOptionsGlobal(gameOptions: IGameOptionsPartial): boolean;
|
|
35
37
|
after?: Milestone[];
|
|
36
38
|
/**
|
|
37
39
|
* Whether this milestone modifier is host-exclusive, IE, clients connecting to a server can't select this modifier.
|
|
38
40
|
*
|
|
39
41
|
* Modifiers with custom `options: IGameOptions` are always host-exclusive.
|
|
40
42
|
*/
|
|
41
|
-
isGlobal: boolean;
|
|
43
|
+
isGlobal(): boolean;
|
|
42
44
|
constructor(id?: Milestone);
|
|
43
|
-
instantiate(id: Milestone, human?: Human): MilestoneModifierInstance;
|
|
45
|
+
instantiate(id: Milestone, human?: Human): MilestoneModifierInstance | undefined;
|
|
44
46
|
abstract getOptions(): IGameOptionsPartial;
|
|
45
47
|
initialize(instance: MilestoneModifierInstance): MilestoneModifierInstance;
|
|
46
48
|
abstract getGroup(): MilestoneModifierGroup;
|
|
@@ -8,10 +8,10 @@
|
|
|
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
|
+
import type Human from "game/entity/Human";
|
|
11
12
|
import { Milestone } from "game/milestones/IMilestone";
|
|
12
13
|
import GameplayModifiersManager from "game/options/modifiers/GameplayModifiersManager";
|
|
13
|
-
import
|
|
14
|
-
import type Human from "game/entity/Human";
|
|
14
|
+
import MilestoneModifier from "game/options/modifiers/milestone/MilestoneModifier";
|
|
15
15
|
declare class MilestoneModifiersManager extends GameplayModifiersManager<MilestoneModifier, Milestone, [Human?]> {
|
|
16
16
|
constructor();
|
|
17
17
|
has(milestone: Milestone): boolean;
|
|
@@ -21,7 +21,6 @@ declare class MilestoneModifiersManager extends GameplayModifiersManager<Milesto
|
|
|
21
21
|
isNotGlobal(milestone: Milestone): boolean;
|
|
22
22
|
getGroup(milestone: Milestone): import("game/options/modifiers/milestone/MilestoneModifier").MilestoneModifierGroup | undefined;
|
|
23
23
|
sort(a: Milestone, b: Milestone): 1 | 0 | -1;
|
|
24
|
-
private areOptionsGlobal;
|
|
25
24
|
}
|
|
26
25
|
declare const _default: MilestoneModifiersManager;
|
|
27
26
|
export default _default;
|
|
@@ -19,7 +19,7 @@ declare class TamedCreatureMilestoneModifierInstance extends MilestoneModifierIn
|
|
|
19
19
|
}
|
|
20
20
|
export default abstract class TamedCreatureMilestoneModifier extends MilestoneModifier {
|
|
21
21
|
getGroup(): MilestoneModifierGroup;
|
|
22
|
-
instantiate(id: Milestone, player?: Player): TamedCreatureMilestoneModifierInstance;
|
|
22
|
+
instantiate(id: Milestone, player?: Player): TamedCreatureMilestoneModifierInstance | undefined;
|
|
23
23
|
abstract isAberrant(): boolean;
|
|
24
24
|
}
|
|
25
25
|
export {};
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import type Doodad from "game/doodad/Doodad";
|
|
12
|
-
import type {
|
|
12
|
+
import type { ActionId } from "game/entity/action/usable/IUsableAction";
|
|
13
13
|
import type Corpse from "game/entity/creature/corpse/Corpse";
|
|
14
14
|
import type Creature from "game/entity/creature/Creature";
|
|
15
15
|
import type { EquipType, SkillType } from "game/entity/IHuman";
|
|
@@ -65,7 +65,7 @@ export interface IReferenceTypeMap {
|
|
|
65
65
|
[ReferenceType.ItemType]: [ReferenceType.ItemType, ItemType];
|
|
66
66
|
[ReferenceType.Dismantle]: [ReferenceType.Dismantle, ItemType];
|
|
67
67
|
[ReferenceType.Stat]: [ReferenceType.Stat, Stat];
|
|
68
|
-
[ReferenceType.Action]: [ReferenceType.Action,
|
|
68
|
+
[ReferenceType.Action]: [ReferenceType.Action, ActionId, Item?];
|
|
69
69
|
[ReferenceType.EquipSlot]: [ReferenceType.EquipSlot, EquipType];
|
|
70
70
|
}
|
|
71
71
|
declare type ReferenceId<REFTYPE extends ReferenceType> = IReferenceTypeMap[REFTYPE] extends [REFTYPE, infer IdType, any?] ? IdType : number;
|
|
@@ -77,6 +77,6 @@ export declare module Reference {
|
|
|
77
77
|
function setReferenceResolver(resolver: typeof ReferenceManager.get): void;
|
|
78
78
|
function create(id: number): Reference;
|
|
79
79
|
function create<REFTYPE extends ReferenceType>(id: ReferenceId<REFTYPE>, type: REFTYPE, context?: Referenceable | number | [number, ReferenceType?]): Reference;
|
|
80
|
-
function context(reference?: Reference): [number] | [id: number, type: ReferenceType.Item, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: number, type: ReferenceType.Creature, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: number, type: ReferenceType.Doodad, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: number, type: ReferenceType.NPC, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: number, type: ReferenceType.Player, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: number, type: ReferenceType.TileEvent, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: number, type: ReferenceType.Island, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: number, type: ReferenceType.Corpse, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: SkillType, type: ReferenceType.Skill, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: Milestone, type: ReferenceType.Milestone, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: ItemType, type: ReferenceType.Recipe, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: ItemType, type: ReferenceType.ItemType, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: ItemType, type: ReferenceType.Dismantle, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: Stat, type: ReferenceType.Stat, context?: [number, (ReferenceType | undefined)?] | undefined] | [id:
|
|
80
|
+
function context(reference?: Reference): [number] | [id: number, type: ReferenceType.Item, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: number, type: ReferenceType.Creature, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: number, type: ReferenceType.Doodad, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: number, type: ReferenceType.NPC, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: number, type: ReferenceType.Player, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: number, type: ReferenceType.TileEvent, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: number, type: ReferenceType.Island, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: number, type: ReferenceType.Corpse, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: SkillType, type: ReferenceType.Skill, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: Milestone, type: ReferenceType.Milestone, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: ItemType, type: ReferenceType.Recipe, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: ItemType, type: ReferenceType.ItemType, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: ItemType, type: ReferenceType.Dismantle, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: Stat, type: ReferenceType.Stat, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: ActionId, type: ReferenceType.Action, context?: [number, (ReferenceType | undefined)?] | undefined] | [id: EquipType, type: ReferenceType.EquipSlot, context?: [number, (ReferenceType | undefined)?] | undefined] | undefined;
|
|
81
81
|
}
|
|
82
82
|
export {};
|
|
@@ -25,7 +25,7 @@ import ReferenceTooltipHandler from "ui/screen/screens/game/ReferenceTooltipHand
|
|
|
25
25
|
import type Tooltip from "ui/tooltip/Tooltip";
|
|
26
26
|
export default class ReferenceManager {
|
|
27
27
|
static isEnumReference(type: ReferenceType): type is EnumReferenceTypes;
|
|
28
|
-
static getList(type: ReferenceType, gameIsland?: Island): import("../entity/creature/corpse/CorpseManager").default | import("../entity/creature/CreatureManager").default | import("../doodad/DoodadManager").default | import("../item/ItemManager").default | import("../entity/npc/NPCManager").default | import("../tile/TileEventManager").default | (Player | undefined)[] | readonly Milestone[] | readonly
|
|
28
|
+
static getList(type: ReferenceType, gameIsland?: Island): import("../entity/creature/corpse/CorpseManager").default | import("../entity/creature/CreatureManager").default | import("../doodad/DoodadManager").default | import("../item/ItemManager").default | import("../entity/npc/NPCManager").default | import("../tile/TileEventManager").default | (Player | undefined)[] | readonly Milestone[] | readonly ItemType[] | import("game/entity/IHuman").EquipType[] | readonly SkillType[] | readonly Stat[] | IterableIterator<Island> | (string | ActionType)[];
|
|
29
29
|
static get(thing: Referenceable): Reference | undefined;
|
|
30
30
|
static getReferenceType(thing: Value<IReferenceTypeMap>): ReferenceType;
|
|
31
31
|
private referenceCursor;
|