@wayward/types 2.11.3-beta.dev.20220124.1 → 2.11.4-beta.dev.20220128.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/EntityManager.d.ts +2 -6
- package/definitions/game/game/entity/IEntityManager.d.ts +5 -6
- package/definitions/game/game/entity/creature/ICreatureManager.d.ts +0 -5
- package/definitions/game/game/entity/player/Player.d.ts +6 -0
- package/definitions/game/game/island/Island.d.ts +7 -1
- package/definitions/game/game/item/IItemManager.d.ts +26 -0
- package/definitions/game/game/item/ItemManager.d.ts +11 -11
- package/definitions/game/multiplayer/IMultiplayer.d.ts +2 -0
- package/definitions/game/multiplayer/dedicatedServer/ssh/ISsh.d.ts +2 -1
- package/definitions/game/multiplayer/dedicatedServer/ssh/SshServer.d.ts +2 -1
- package/definitions/game/renderer/fieldOfView/FieldOfView.d.ts +1 -1
- package/definitions/game/steamworks/ISteamworks.d.ts +2 -2
- package/definitions/game/ui/component/dropdown/CreatureDropdown.d.ts +1 -1
- package/definitions/game/ui/old/screens/InGameScreen.d.ts +2 -2
- package/definitions/game/utilities/SearchParams.d.ts +15 -0
- package/definitions/hosts/shared/globals.d.ts +1 -1
- package/package.json +1 -1
- package/tsconfig.mod.base.json +3 -6
|
@@ -8,11 +8,9 @@
|
|
|
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 { IMoveTypeZ } from "game/entity/creature/ICreatureManager";
|
|
12
11
|
import type Entity from "game/entity/Entity";
|
|
13
|
-
import type { IEntityManager } from "game/entity/IEntityManager";
|
|
12
|
+
import type { IEntityManager, IPlayerBound } from "game/entity/IEntityManager";
|
|
14
13
|
import { ObjectManager } from "game/ObjectManager";
|
|
15
|
-
import Bound3 from "utilities/math/Bound3";
|
|
16
14
|
export interface IEntityManagerEvents<T extends Entity> {
|
|
17
15
|
spawn(entity: T): any;
|
|
18
16
|
remove(entity: T): any;
|
|
@@ -25,10 +23,8 @@ export interface IEntityCanCreateOptions {
|
|
|
25
23
|
chanceOfScarecrowScare?: number;
|
|
26
24
|
}
|
|
27
25
|
export default abstract class EntityManager<T extends Entity> extends ObjectManager<T, IEntityManagerEvents<T>> implements IEntityManager<T> {
|
|
28
|
-
private readonly moveTypesInFov;
|
|
29
26
|
remove(entity: T): void;
|
|
30
|
-
updateFov(
|
|
31
|
-
getMoveTypesInFov(): IMoveTypeZ[];
|
|
27
|
+
updateFov(playerBounds: IPlayerBound[]): void;
|
|
32
28
|
/**
|
|
33
29
|
* Checks if the target position is a good spot for a new entity
|
|
34
30
|
*/
|
|
@@ -9,15 +9,14 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import type Entity from "game/entity/Entity";
|
|
12
|
-
import type
|
|
12
|
+
import type Player from "game/entity/player/Player";
|
|
13
13
|
import type { IBound3 } from "utilities/math/Bound3";
|
|
14
14
|
export interface IEntityManager<T extends Entity> {
|
|
15
15
|
remove(entity: T): void;
|
|
16
|
-
updateFov(
|
|
17
|
-
getMoveTypesInFov(): IMoveTypeZ[];
|
|
16
|
+
updateFov(playerBounds: IPlayerBound[]): void;
|
|
18
17
|
}
|
|
19
18
|
export default IEntityManager;
|
|
20
|
-
export interface
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
export interface IPlayerBound {
|
|
20
|
+
player: Player;
|
|
21
|
+
bound: IBound3;
|
|
23
22
|
}
|
|
@@ -9,12 +9,7 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import type { CreatureType } from "game/entity/creature/ICreature";
|
|
12
|
-
import type { MoveType } from "game/entity/IEntity";
|
|
13
12
|
export interface ISpawnableCreatures {
|
|
14
13
|
pool: CreatureType[];
|
|
15
14
|
aberrantChance: number;
|
|
16
15
|
}
|
|
17
|
-
export interface IMoveTypeZ {
|
|
18
|
-
moveType: MoveType;
|
|
19
|
-
z: number;
|
|
20
|
-
}
|
|
@@ -219,6 +219,12 @@ export default class Player extends Human implements IUnserializedCallback {
|
|
|
219
219
|
* Only use this clientside
|
|
220
220
|
*/
|
|
221
221
|
isExploredClientSide(x: number, y: number, z: number): boolean;
|
|
222
|
+
/**
|
|
223
|
+
* Multiply the reputation amount with whatever is set via milestone modifiers or custom game options for this player.
|
|
224
|
+
* @param reputation A number or undefined to be mutiplied.
|
|
225
|
+
* @returns A number or undefined if a reputation number was not passed.
|
|
226
|
+
*/
|
|
227
|
+
getReputationMultiplier(reputation: number | undefined): number | undefined;
|
|
222
228
|
/**
|
|
223
229
|
* @deprecated Do not call this with players.
|
|
224
230
|
*/
|
|
@@ -20,7 +20,8 @@ import type Human from "game/entity/Human";
|
|
|
20
20
|
import { SkillType } from "game/entity/IHuman";
|
|
21
21
|
import NPCManager from "game/entity/npc/NPCManager";
|
|
22
22
|
import Player from "game/entity/player/Player";
|
|
23
|
-
import {
|
|
23
|
+
import type { IGameOld } from "game/IGame";
|
|
24
|
+
import { CreationId, FireType, TickFlag, TileUpdateType } from "game/IGame";
|
|
24
25
|
import { Quality } from "game/IObject";
|
|
25
26
|
import type { IIslandEvents, IIslandLoadOptions, ISeeds, IWaterContamination, IWaterFill, IWell } from "game/island/IIsland";
|
|
26
27
|
import { WaterType } from "game/island/IIsland";
|
|
@@ -95,6 +96,11 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
|
95
96
|
* Set of players on this island
|
|
96
97
|
*/
|
|
97
98
|
readonly players: Set<Player>;
|
|
99
|
+
/**
|
|
100
|
+
* Entity move types in fov on this island
|
|
101
|
+
* `${z}-${moveType}` -> Players
|
|
102
|
+
*/
|
|
103
|
+
readonly moveTypesInFov: Map<string, Set<Player>>;
|
|
98
104
|
previousSaveVersion: IVersionInfo | undefined;
|
|
99
105
|
brokenReferencesCount: number;
|
|
100
106
|
civilizationScore: number;
|
|
@@ -10,8 +10,34 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type Doodad from "game/doodad/Doodad";
|
|
12
12
|
import type { DoodadType, DoodadTypeGroup } from "game/doodad/IDoodad";
|
|
13
|
+
import type { ActionType } from "game/entity/action/IAction";
|
|
14
|
+
import type Item from "game/item/Item";
|
|
13
15
|
import type TileEvent from "game/tile/TileEvent";
|
|
14
16
|
import type { IVector3 } from "utilities/math/IVector";
|
|
17
|
+
/**
|
|
18
|
+
* Includes all protected items by default
|
|
19
|
+
*/
|
|
20
|
+
export interface IGetItemOptions {
|
|
21
|
+
/**
|
|
22
|
+
* True to exclude protected items
|
|
23
|
+
*/
|
|
24
|
+
excludeProtectedItems: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* True to only include protected items if they pass an item.willBreakOnDamage() check.
|
|
27
|
+
* excludeProtectedItems must be set to true for this to work.
|
|
28
|
+
*/
|
|
29
|
+
includeProtectedItemsThatWillNotBreak: ActionType;
|
|
30
|
+
/**
|
|
31
|
+
* Item will be ignored
|
|
32
|
+
*/
|
|
33
|
+
ignoreItem?: Item;
|
|
34
|
+
}
|
|
35
|
+
export interface IGetItemsOptions extends IGetItemOptions {
|
|
36
|
+
/**
|
|
37
|
+
* Include sub containers in the search
|
|
38
|
+
*/
|
|
39
|
+
includeSubContainers: boolean;
|
|
40
|
+
}
|
|
15
41
|
export declare enum CraftStatus {
|
|
16
42
|
Invalid = 0,
|
|
17
43
|
Failed = 1,
|
|
@@ -17,7 +17,7 @@ import type Player from "game/entity/player/Player";
|
|
|
17
17
|
import { Quality } from "game/IObject";
|
|
18
18
|
import type { ContainerReference, IContainable, IContainer, IItemDescription, IItemWeightComponent } from "game/item/IItem";
|
|
19
19
|
import { ItemType, ItemTypeGroup } from "game/item/IItem";
|
|
20
|
-
import type { IAddToContainerOptions, IRequirementInfo } from "game/item/IItemManager";
|
|
20
|
+
import type { IAddToContainerOptions, IGetItemOptions, IGetItemsOptions, IRequirementInfo } from "game/item/IItemManager";
|
|
21
21
|
import { CraftStatus, WeightType, ContainerReferenceSource } from "game/item/IItemManager";
|
|
22
22
|
import Item from "game/item/Item";
|
|
23
23
|
import type ItemRecipeRequirementChecker from "game/item/ItemRecipeRequirementChecker";
|
|
@@ -188,16 +188,16 @@ export default class ItemManager extends ObjectManager<Item, IItemManagerEvents>
|
|
|
188
188
|
/**
|
|
189
189
|
* Get the best tier item
|
|
190
190
|
*/
|
|
191
|
-
getBestSafeItemInContainerByUse(container: IContainer, action: ActionType,
|
|
192
|
-
getItemInContainer(container: IContainer, itemTypeSearch: ItemType,
|
|
193
|
-
getItemForHuman(human: Human, search: ItemType | ItemTypeGroup,
|
|
194
|
-
getItemInContainerByGroup(container: IContainer, itemTypeGroupSearch: ItemTypeGroup,
|
|
191
|
+
getBestSafeItemInContainerByUse(container: IContainer, action: ActionType, options?: Partial<IGetItemsOptions>, consumable?: boolean): Item | undefined;
|
|
192
|
+
getItemInContainer(container: IContainer, itemTypeSearch: ItemType, options?: Partial<IGetItemOptions>): Item | undefined;
|
|
193
|
+
getItemForHuman(human: Human, search: ItemType | ItemTypeGroup, options?: Partial<IGetItemOptions>): Item | undefined;
|
|
194
|
+
getItemInContainerByGroup(container: IContainer, itemTypeGroupSearch: ItemTypeGroup, options?: Partial<IGetItemOptions>): Item | undefined;
|
|
195
195
|
getItemInAdjacentContainersByGroup(position: IVector3, itemTypeGroupSearch: ItemTypeGroup): Item | undefined;
|
|
196
|
-
getItemsInContainer(container: IContainer,
|
|
197
|
-
getItemsInContainerByType(container: IContainer, itemType: ItemType,
|
|
198
|
-
getItemsInContainerByGroup(container: IContainer, itemGroup: ItemTypeGroup,
|
|
199
|
-
getItemInInventoryByGroup(human: Human, itemTypeGroupSearch: ItemTypeGroup,
|
|
200
|
-
isItemInContainer(container: IContainer, itemTypeSearch: ItemType,
|
|
196
|
+
getItemsInContainer(container: IContainer, options?: Partial<IGetItemsOptions>): Item[];
|
|
197
|
+
getItemsInContainerByType(container: IContainer, itemType: ItemType, options?: Partial<IGetItemsOptions>, filterText?: string): Item[];
|
|
198
|
+
getItemsInContainerByGroup(container: IContainer, itemGroup: ItemTypeGroup, options?: Partial<IGetItemsOptions>): Item[];
|
|
199
|
+
getItemInInventoryByGroup(human: Human, itemTypeGroupSearch: ItemTypeGroup, options?: Partial<IGetItemOptions>): Item | undefined;
|
|
200
|
+
isItemInContainer(container: IContainer, itemTypeSearch: ItemType, options?: Partial<IGetItemOptions>): boolean;
|
|
201
201
|
isContainableInContainer(containable: IContainable, container: IContainer): boolean;
|
|
202
202
|
getAdjacentContainers(humanOrPosition: Human | IVector3, includeNpcs?: boolean, ignoreOptions?: boolean): IContainer[];
|
|
203
203
|
isContainableInAdjacentContainer(player: Player, containable: IContainable, includeNpcs?: boolean, ignoreOptions?: boolean): boolean;
|
|
@@ -207,7 +207,7 @@ export default class ItemManager extends ObjectManager<Item, IItemManagerEvents>
|
|
|
207
207
|
* Returns ordered items for the containers
|
|
208
208
|
* Note: It may return the real containedItems array!
|
|
209
209
|
*/
|
|
210
|
-
getOrderedContainerItems(container: IContainer,
|
|
210
|
+
getOrderedContainerItems(container: IContainer, options?: Partial<IGetItemOptions>): Item[];
|
|
211
211
|
reduceDismantleWeight(createdItems: Item[], itemWeight: number): void;
|
|
212
212
|
getItemTypeTranslation(itemType: ItemType | ItemTypeGroup): Translation;
|
|
213
213
|
getItemTypeTranslation(itemType: ItemType | ItemTypeGroup, count: number): Translation;
|
|
@@ -105,6 +105,8 @@ export declare enum MultiplayerSyncCheck {
|
|
|
105
105
|
export declare const maxPlayers = 32;
|
|
106
106
|
export declare const packetTickRate = 16;
|
|
107
107
|
export declare const defaultServerPort = 38740;
|
|
108
|
+
export declare const defaultSshServerPort = 38742;
|
|
109
|
+
export declare const defaultSshServerUsername = "wayward";
|
|
108
110
|
export declare const steamLobbyPrefix = "steam:";
|
|
109
111
|
export declare const checkConnectionMatchmakingId = "check";
|
|
110
112
|
export declare const defaultSyncChecks: MultiplayerSyncCheck[];
|
|
@@ -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 type * as ssh2 from "ssh2";
|
|
11
12
|
import type Log from "utilities/Log";
|
|
12
13
|
export declare const globalHistory: Map<string, string[]>;
|
|
13
14
|
export declare const maxHistory = 50;
|
|
@@ -20,7 +21,7 @@ export interface ISshStream {
|
|
|
20
21
|
toString(): string;
|
|
21
22
|
}) => void): void;
|
|
22
23
|
}
|
|
23
|
-
export interface ISshSession {
|
|
24
|
+
export interface ISshSession extends ssh2.Session {
|
|
24
25
|
clientId: string;
|
|
25
26
|
clientLog: Log;
|
|
26
27
|
}
|
|
@@ -8,9 +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 * as ssh2 from "ssh2";
|
|
11
12
|
import type { IFileSystem } from "@hosts/shared/ipc/fileSystem";
|
|
12
13
|
export interface ISshServerOptions {
|
|
13
|
-
ssh2:
|
|
14
|
+
ssh2: typeof ssh2;
|
|
14
15
|
crypto: any;
|
|
15
16
|
fs: IFileSystem;
|
|
16
17
|
serverName: string;
|
|
@@ -62,7 +62,7 @@ export default class FieldOfView extends EventEmitter.Host<IFieldOfViewEvents> {
|
|
|
62
62
|
/**
|
|
63
63
|
* Gets the field of view radius based on either the field of view object, player, or the default value
|
|
64
64
|
*/
|
|
65
|
-
|
|
65
|
+
static getRadius(fieldOfView: FieldOfView | undefined, player: Player | undefined): number;
|
|
66
66
|
/**
|
|
67
67
|
* Marks a set of tiles as exploreed
|
|
68
68
|
*/
|
|
@@ -35,8 +35,8 @@ export interface IDedicatedServerInfo {
|
|
|
35
35
|
dailyChallenge?: boolean;
|
|
36
36
|
};
|
|
37
37
|
ssh: boolean;
|
|
38
|
-
sshPort
|
|
39
|
-
sshUsername
|
|
38
|
+
sshPort: number;
|
|
39
|
+
sshUsername: string;
|
|
40
40
|
sshPassword?: string;
|
|
41
41
|
devMode: boolean;
|
|
42
42
|
syncChecks: MultiplayerSyncCheckLevel;
|
|
@@ -12,5 +12,5 @@ import { CreatureType } from "game/entity/creature/ICreature";
|
|
|
12
12
|
import type { IDropdownOption } from "ui/component/Dropdown";
|
|
13
13
|
import EnumDropdown from "ui/component/dropdown/EnumDropdown";
|
|
14
14
|
export default class CreatureDropdown<OTHER_OPTIONS extends string = never> extends EnumDropdown<typeof CreatureType, OTHER_OPTIONS> {
|
|
15
|
-
constructor(defaultOption: OTHER_OPTIONS | CreatureType, options
|
|
15
|
+
constructor(defaultOption: OTHER_OPTIONS | CreatureType, options?: Iterable<IDropdownOption<OTHER_OPTIONS>>);
|
|
16
16
|
}
|
|
@@ -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 { ActionType } from "game/entity/action/IAction";
|
|
11
12
|
import { EquipType } from "game/entity/IHuman";
|
|
12
13
|
import type { IContainer, IDismantleComponent } from "game/item/IItem";
|
|
13
14
|
import { ItemType } from "game/item/IItem";
|
|
@@ -79,7 +80,6 @@ export default class InGameScreen extends BaseScreen {
|
|
|
79
80
|
actionsMenuCentered: boolean;
|
|
80
81
|
private activeContainer;
|
|
81
82
|
private multipleContainersOpened;
|
|
82
|
-
private contextMenuBindPressed;
|
|
83
83
|
private sortableElement;
|
|
84
84
|
private sortableElementPosition;
|
|
85
85
|
private sortableElementTargetContainer;
|
|
@@ -237,7 +237,6 @@ export default class InGameScreen extends BaseScreen {
|
|
|
237
237
|
onItemEquipToggle(api: IBindHandlerApi): boolean;
|
|
238
238
|
onItemProtectToggle(api: IBindHandlerApi): boolean;
|
|
239
239
|
onContextMenu(api: IBindHandlerApi): boolean;
|
|
240
|
-
onContextMenuReleased(_api: IBindHandlerApi): void;
|
|
241
240
|
onQuickSlotToggle(api: IBindHandlerApi): boolean;
|
|
242
241
|
onQuickSlot(api: IBindHandlerApi): boolean;
|
|
243
242
|
onQuickSlotClear(api: IBindHandlerApi): boolean;
|
|
@@ -252,6 +251,7 @@ export default class InGameScreen extends BaseScreen {
|
|
|
252
251
|
onHandToggle(api: IBindHandlerApi): boolean;
|
|
253
252
|
onInput(api: IBindHandlerApi): void;
|
|
254
253
|
private clearActionsMenuTileOverlay;
|
|
254
|
+
getAutoActionItem(actionType: ActionType, allowProtectedItems?: boolean): Item | undefined;
|
|
255
255
|
private runAutoAction;
|
|
256
256
|
private runAction;
|
|
257
257
|
private updateContextMenu;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2011-2021 Unlok
|
|
3
|
+
* https://www.unlok.ca
|
|
4
|
+
*
|
|
5
|
+
* Credits & Thanks:
|
|
6
|
+
* https://www.unlok.ca/credits-thanks/
|
|
7
|
+
*
|
|
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
|
+
* https://github.com/WaywardGame/types/wiki
|
|
10
|
+
*/
|
|
11
|
+
declare module SearchParams {
|
|
12
|
+
function hasSwitch(switchName: string): boolean;
|
|
13
|
+
function getSwitchValue(switchName: string): string | undefined;
|
|
14
|
+
}
|
|
15
|
+
export default SearchParams;
|
|
@@ -8,6 +8,6 @@
|
|
|
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 declare const gameVersionStage = "beta", gameVersionMajor = 2, gameVersionMinor = 11, gameVersionPatch =
|
|
11
|
+
export declare const gameVersionStage = "beta", gameVersionMajor = 2, gameVersionMinor = 11, gameVersionPatch = 4, gameVersionName = "Horizons";
|
|
12
12
|
export declare const gameVersion: string;
|
|
13
13
|
export declare function registerGlobals(globalObject: any): void;
|
package/package.json
CHANGED
package/tsconfig.mod.base.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"target": "
|
|
3
|
+
"target": "ES2021",
|
|
4
4
|
"module": "AMD",
|
|
5
5
|
"composite": true,
|
|
6
6
|
"experimentalDecorators": true,
|
|
@@ -36,13 +36,10 @@
|
|
|
36
36
|
},
|
|
37
37
|
"types": [],
|
|
38
38
|
"lib": [
|
|
39
|
-
"WebWorker.ImportScripts",
|
|
40
39
|
"DOM",
|
|
41
40
|
"DOM.Iterable",
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"ES2020.String",
|
|
45
|
-
"ES2021.WeakRef"
|
|
41
|
+
"ES2021",
|
|
42
|
+
"WebWorker.ImportScripts",
|
|
46
43
|
]
|
|
47
44
|
}
|
|
48
45
|
}
|