@wayward/types 2.12.1-beta.dev.20221012.1 → 2.12.1-beta.dev.20221014.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/Game.d.ts +11 -1
- package/definitions/game/game/IGame.d.ts +5 -0
- package/definitions/game/game/entity/Human.d.ts +2 -0
- package/definitions/game/game/entity/action/usable/UsableAction.d.ts +1 -0
- package/definitions/game/game/entity/action/usable/actions/item/UsableActionsUseItem.d.ts +7 -1
- package/definitions/game/game/entity/player/PlayerManager.d.ts +4 -3
- package/definitions/game/game/inspection/InfoProvider.d.ts +1 -0
- package/definitions/game/game/inspection/inspections/IslandInspection.d.ts +2 -0
- package/definitions/game/game/item/Item.d.ts +1 -1
- package/definitions/game/game/item/ItemFinder.d.ts +6 -1
- package/definitions/game/game/meta/prompt/IPrompt.d.ts +29 -28
- package/definitions/game/game/meta/prompt/PromptDescriptions.d.ts +1 -0
- package/definitions/game/language/dictionary/Message.d.ts +930 -929
- package/definitions/game/language/dictionary/UiTranslation.d.ts +696 -690
- package/definitions/game/language/segment/LinkSegment.d.ts +1 -1
- package/definitions/game/multiplayer/IMultiplayer.d.ts +16 -14
- package/definitions/game/renderer/IRenderer.d.ts +4 -0
- package/definitions/game/ui/component/Dropdown.d.ts +3 -1
- package/definitions/game/ui/component/Input.d.ts +4 -4
- package/definitions/game/ui/component/Text.d.ts +1 -1
- package/definitions/game/ui/input/Bindable.d.ts +157 -156
- package/definitions/game/ui/input/BindableManager.d.ts +2 -2
- package/definitions/game/ui/screen/screens/game/static/ActionBar.d.ts +4 -1
- package/definitions/game/ui/screen/screens/menu/menus/PauseMenu.d.ts +1 -0
- package/definitions/game/ui/screen/screens/menu/menus/newgame/TabGameMode.d.ts +0 -4
- package/definitions/game/ui/screen/screens/menu/menus/newgame/TabGameplayModifiers.d.ts +4 -1
- package/definitions/game/ui/screen/screens/menu/menus/newgame/TabMultiplayer.d.ts +3 -0
- package/definitions/game/ui/screen/screens/menu/menus/options/IOptionsTabs.d.ts +6 -7
- package/definitions/game/ui/screen/screens/menu/menus/options/TabDeveloper.d.ts +4 -1
- package/package.json +1 -1
|
@@ -90,7 +90,17 @@ export declare class Game extends EventEmitter.Host<IGameEvents> {
|
|
|
90
90
|
readonly saveLoad: typeof SaveLoad;
|
|
91
91
|
toString(): string;
|
|
92
92
|
get isPaused(): boolean;
|
|
93
|
-
|
|
93
|
+
/**
|
|
94
|
+
* Get humans in the game; ie, players, NPCs, and other non-player humans.
|
|
95
|
+
* Parameters include additional players that may not be relevant, such as ghosts, connecting players, absent players, the dedicated server fake player.
|
|
96
|
+
* Only want players? @see {@link PlayerManager.getAll}
|
|
97
|
+
* @param includeGhosts True to include players that are ghosts
|
|
98
|
+
* @param includeConnecting True to include players that are connecting
|
|
99
|
+
* @param includeDedicatedServer True to include the dedicated server fake player
|
|
100
|
+
* @param includeAbsent True to include the absent players
|
|
101
|
+
* @returns Array of Human objects
|
|
102
|
+
*/
|
|
103
|
+
getPlayingHumans(includeGhosts?: boolean, includeConnecting?: boolean, includeDedicatedServer?: boolean, includeAbsent?: boolean): Human[];
|
|
94
104
|
getNonPlayerHumans(): Human[];
|
|
95
105
|
initializeRenderer(): void;
|
|
96
106
|
globalSlotReady(): void;
|
|
@@ -24,6 +24,7 @@ import type { ITileContainer, ITileData } from "game/tile/ITerrain";
|
|
|
24
24
|
import type TileEvent from "game/tile/TileEvent";
|
|
25
25
|
import type TimeManager from "game/time/TimeManager";
|
|
26
26
|
import type { IMultiplayerOptions, IMultiplayerWorldData, ServerInfo } from "multiplayer/IMultiplayer";
|
|
27
|
+
import type Renderer from "renderer/Renderer";
|
|
27
28
|
import type { IReplayLogEntry } from "replay/IReplayLogEntry";
|
|
28
29
|
import type { IHighscoreOld, IOptions } from "save/data/ISaveDataGlobal";
|
|
29
30
|
import type { IVector2, IVector3 } from "utilities/math/IVector";
|
|
@@ -81,6 +82,10 @@ export interface IGameEvents {
|
|
|
81
82
|
glLostContext(): any;
|
|
82
83
|
glSetup(restored: boolean): any;
|
|
83
84
|
glInitialized(): any;
|
|
85
|
+
/**
|
|
86
|
+
* Called when the game creates the primary renderer
|
|
87
|
+
*/
|
|
88
|
+
rendererCreated(renderer: Renderer): any;
|
|
84
89
|
/**
|
|
85
90
|
* Called after the field of view has initialized
|
|
86
91
|
*/
|
|
@@ -76,6 +76,7 @@ export default abstract class Human extends Entity implements IHasInsulation {
|
|
|
76
76
|
state: PlayerState;
|
|
77
77
|
swimming: boolean;
|
|
78
78
|
tamedCreatures: Map<`${number},${number}`, number[]>;
|
|
79
|
+
ticksSpent: Map<`${number},${number}`, number>;
|
|
79
80
|
turns: number;
|
|
80
81
|
vehicleItemReference: ItemReference | undefined;
|
|
81
82
|
walkSoundCounter: number;
|
|
@@ -245,6 +246,7 @@ export default abstract class Human extends Entity implements IHasInsulation {
|
|
|
245
246
|
private recalculateInsulation;
|
|
246
247
|
private getEquipmentInsulation;
|
|
247
248
|
discoverRecipe(recipeType: ItemType, crafted?: ICrafted, discoveredClientSide?: boolean): void;
|
|
249
|
+
incrementIslandTickCount(): void;
|
|
248
250
|
passTurn(turnType?: TurnTypeFlag): void;
|
|
249
251
|
/**
|
|
250
252
|
* Ticks a player
|
|
@@ -65,6 +65,7 @@ declare class UsableAction<REQUIREMENTS extends IUsableActionRequirements = IUsa
|
|
|
65
65
|
private translator?;
|
|
66
66
|
getTranslation(using?: IUsableActionPossibleUsing, which?: ActionTranslation, context?: UsableActionDisplayContext): Translation | undefined;
|
|
67
67
|
getOrder(using?: IUsableActionPossibleUsing): number;
|
|
68
|
+
canUseOnMoveWhenDiscovered(): boolean;
|
|
68
69
|
canUseOnMove(): boolean;
|
|
69
70
|
}
|
|
70
71
|
export interface IUsableActionFactory<REQUIREMENTS extends IUsableActionRequirements> {
|
|
@@ -12,6 +12,8 @@ import { ActionType } from "game/entity/action/IAction";
|
|
|
12
12
|
import type { IUsableActionDynamicDefinition } from "game/entity/action/usable/actions/UsableActionsDynamic";
|
|
13
13
|
import UsableActionsDynamic from "game/entity/action/usable/actions/UsableActionsDynamic";
|
|
14
14
|
import type { ActionId, IUsableActionItemRequirement, IUsableActionPossibleUsing, IUsableActionRequirements } from "game/entity/action/usable/IUsableAction";
|
|
15
|
+
import UsableActionItemFinder from "game/entity/action/usable/UsableActionItemFinder";
|
|
16
|
+
import type Player from "game/entity/player/Player";
|
|
15
17
|
import type { IGetBestItemsOptions } from "game/item/IItemManager";
|
|
16
18
|
import type Item from "game/item/Item";
|
|
17
19
|
export interface IUseItemAction extends IUsableActionDynamicDefinition {
|
|
@@ -20,7 +22,11 @@ export interface IUseItemAction extends IUsableActionDynamicDefinition {
|
|
|
20
22
|
allowAnyItems?: true;
|
|
21
23
|
allowNoItem?: true;
|
|
22
24
|
hasNoBestItem?: true;
|
|
23
|
-
|
|
25
|
+
filterFind?(item: Item, player: Player): boolean;
|
|
26
|
+
validate?(item: Item, player: Player): boolean;
|
|
27
|
+
initialiseFinder?(finder: UsableActionItemFinder): any;
|
|
28
|
+
onFinderTrack?(finder: UsableActionItemFinder): any;
|
|
29
|
+
onFinderDispose?(finder: UsableActionItemFinder): any;
|
|
24
30
|
}
|
|
25
31
|
export declare namespace IUseItemAction {
|
|
26
32
|
function getGetItemOptions(actionType: ActionType, useItemAction?: Omit<IUseItemAction, keyof IUsableActionDynamicDefinition>): Partial<IGetBestItemsOptions>;
|
|
@@ -37,13 +37,14 @@ export default class PlayerManager extends EntityManager<Player> {
|
|
|
37
37
|
event: IEventEmitter<this, IPlayerManagerEvents>;
|
|
38
38
|
constructor();
|
|
39
39
|
/**
|
|
40
|
-
* Get players in the game.
|
|
40
|
+
* Get players in the game. Parameters include additional players that may not be relevant, such as ghosts, connecting players, absent players, the dedicated server fake player.
|
|
41
41
|
* @param includeGhosts True to include players that are ghosts
|
|
42
42
|
* @param includeConnecting True to include players that are connecting
|
|
43
|
-
* @param
|
|
43
|
+
* @param includeDedicatedServer True to include the dedicated server fake player
|
|
44
|
+
* @param includeAbsent True to include the absent players
|
|
44
45
|
* @returns Array of Player objects
|
|
45
46
|
*/
|
|
46
|
-
getAll(includeGhosts?: boolean, includeConnecting?: boolean,
|
|
47
|
+
getAll(includeGhosts?: boolean, includeConnecting?: boolean, includeDedicatedServer?: boolean, includeAbsent?: boolean): Player[];
|
|
47
48
|
getByIdentifier(identifier: string, includeAbsent?: boolean): Player | undefined;
|
|
48
49
|
getByName(name: string): Player | undefined;
|
|
49
50
|
getValidName(name: string | undefined): string;
|
|
@@ -73,6 +73,7 @@ export declare abstract class InfoProvider extends EventEmitter.Host<IInfoProvid
|
|
|
73
73
|
static of(...classes: string[]): SimpleInfoProvider;
|
|
74
74
|
static title(...translations: Array<TranslationGenerator | undefined>): SimpleInfoProvider;
|
|
75
75
|
static description(...translations: Array<TranslationGenerator | undefined>): SimpleInfoProvider;
|
|
76
|
+
static text(...translations: Array<TranslationGenerator | undefined>): SimpleInfoProvider;
|
|
76
77
|
static list(...translations: Array<TranslationGenerator | undefined>): SimpleInfoProvider;
|
|
77
78
|
static ofComponent(componentSupplier: () => Component): InfoProvider;
|
|
78
79
|
private displayLevel?;
|
|
@@ -26,6 +26,8 @@ export default class IslandInspection extends Inspection<IVector2> {
|
|
|
26
26
|
private getTreasureMaps;
|
|
27
27
|
private getModifiers;
|
|
28
28
|
private getBiome;
|
|
29
|
+
private getDaysSpent;
|
|
30
|
+
private getDaysSpentByPlayer;
|
|
29
31
|
private getPlayers;
|
|
30
32
|
private getPlayerLikeNPCs;
|
|
31
33
|
private getYouAreHereLabel;
|
|
@@ -230,7 +230,7 @@ export default class Item extends EventEmitter.Host<IItemEvents> implements IRef
|
|
|
230
230
|
getMovementProgress(timeStamp: number): number;
|
|
231
231
|
setQuality(human: Human | undefined, quality?: Quality): void;
|
|
232
232
|
getValidMagicalProperties(): MagicalPropertyType[];
|
|
233
|
-
addMagicalProperties(count: number): boolean;
|
|
233
|
+
addMagicalProperties(count: number, source?: string): boolean;
|
|
234
234
|
rerollMagicalProperty(type: MagicalPropertyType, subType?: MagicalSubPropertySubTypes): boolean;
|
|
235
235
|
rerollMagicalPropertyValues(): void;
|
|
236
236
|
addMagicalProperty(type: MagicalPropertyType, subType?: MagicalSubPropertySubTypes): boolean;
|
|
@@ -8,6 +8,7 @@
|
|
|
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 EventEmitter from "event/EventEmitter";
|
|
11
12
|
import type Human from "game/entity/Human";
|
|
12
13
|
import type { IContainer } from "game/item/IItem";
|
|
13
14
|
import type { IGetBestItemsOptions } from "game/item/IItemManager";
|
|
@@ -18,7 +19,11 @@ export interface IItemFinderOptions extends Partial<IGetBestItemsOptions> {
|
|
|
18
19
|
fallback?: ItemFinder;
|
|
19
20
|
postFilter?(item: Item): boolean;
|
|
20
21
|
}
|
|
21
|
-
export
|
|
22
|
+
export interface IItemFinderEvents {
|
|
23
|
+
track(): any;
|
|
24
|
+
dispose(): any;
|
|
25
|
+
}
|
|
26
|
+
export default class ItemFinder extends EventEmitter.Host<IItemFinderEvents> {
|
|
22
27
|
private readonly options;
|
|
23
28
|
private readonly human;
|
|
24
29
|
private readonly container;
|
|
@@ -95,34 +95,35 @@ export declare enum Prompt {
|
|
|
95
95
|
MenuOptionsReloadGame = 77,
|
|
96
96
|
MenuOptionsChangeReload = 78,
|
|
97
97
|
MenuOptionsConfirmUnlockMilestones = 79,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
98
|
+
MenuOptionsConfirmDiscoverActions = 80,
|
|
99
|
+
MenuOptionsConfirmUnlockRecipes = 81,
|
|
100
|
+
MenuOptionsSaveDataClearAll = 82,
|
|
101
|
+
MenuOptionsSaveDataClearCharacters = 83,
|
|
102
|
+
MenuOptionsSaveDataClearHighscores = 84,
|
|
103
|
+
MenuOptionsSaveDataClearMilestones = 85,
|
|
104
|
+
MenuOptionsSaveDataClearOptions = 86,
|
|
105
|
+
MenuOptionsSaveDataClearSaves = 87,
|
|
106
|
+
MenuOptionsSaveDataClearCraftingRecipes = 88,
|
|
107
|
+
MenuOptionsSaveDataClearBindings = 89,
|
|
108
|
+
MenuOptionsConfirmImportGlobalData = 90,
|
|
109
|
+
MenuPauseGhostKeepSave = 91,
|
|
110
|
+
MenuPauseReturnToTitleScreen = 92,
|
|
111
|
+
MenuPauseReturnToTitleScreenChallenge = 93,
|
|
112
|
+
MenuPauseReturnToTitleScreenChallengeMultiplayer = 94,
|
|
113
|
+
MenuPauseReturnToTitleScreenMultiplayer = 95,
|
|
114
|
+
MultiplayerFailedToConnect = 96,
|
|
115
|
+
MultiplayerRestartServerAfterLoadingSave = 97,
|
|
116
|
+
MultiplayerDisconnect = 98,
|
|
117
|
+
MultiplayerDisconnectRejoin = 99,
|
|
118
|
+
SteamworksURLOpenedInBrowser = 100,
|
|
119
|
+
SteamworksWorkshopOpenedInBrowser = 101,
|
|
120
|
+
SteamworksModWithNameAlreadyExists = 102,
|
|
121
|
+
SteamworksModImportSaveGameFailure = 103,
|
|
122
|
+
SteamworksModImportedSaveGame = 104,
|
|
123
|
+
SteamworksOpenFolderFailure = 105,
|
|
124
|
+
SteamworksModPublishModJsonUpdateFailed = 106,
|
|
125
|
+
SteamworksNotAvailableOnSteamDeck = 107,
|
|
126
|
+
UiSaveDrop = 108
|
|
126
127
|
}
|
|
127
128
|
export declare enum PromptType {
|
|
128
129
|
Info = 0,
|
|
@@ -101,6 +101,7 @@ export declare const promptMenuMilestoneModifiersImportFailure: import("game/met
|
|
|
101
101
|
export declare const promptMenuOptionsReloadGame: import("game/meta/prompt/IPrompt").IPromptConfirmDescription<[]>;
|
|
102
102
|
export declare const promptMenuOptionsChangeReload: import("game/meta/prompt/IPrompt").IPromptConfirmDescription<[]>;
|
|
103
103
|
export declare const promptMenuOptionsConfirmUnlockMilestones: import("game/meta/prompt/IPrompt").IPromptConfirmDescription<[]>;
|
|
104
|
+
export declare const promptMenuOptionsConfirmDiscoverActions: import("game/meta/prompt/IPrompt").IPromptConfirmDescription<[]>;
|
|
104
105
|
export declare const promptMenuOptionsConfirmUnlockRecipes: import("game/meta/prompt/IPrompt").IPromptConfirmDescription<[]>;
|
|
105
106
|
export declare const promptMenuOptionsSaveDataClearAll: import("game/meta/prompt/IPrompt").IPromptConfirmDescription<[]>;
|
|
106
107
|
export declare const promptMenuOptionsSaveDataClearCharacters: import("game/meta/prompt/IPrompt").IPromptConfirmDescription<[]>;
|