@wayward/types 2.13.0-beta.dev.20230512.1 → 2.13.1-beta
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/LICENSE +20 -20
- package/README.md +10 -10
- package/definitions/game/game/biome/coastal/mapGen/2.13.1.d.ts +12 -0
- package/definitions/game/game/doodad/Doodad.d.ts +1 -0
- package/definitions/game/game/entity/IHuman.d.ts +8 -6
- package/definitions/game/game/entity/action/ActionsRegistration.d.ts +18 -13
- package/definitions/game/game/entity/action/actions/Chop.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Dismount.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Drop.d.ts +20 -1
- package/definitions/game/game/entity/action/actions/Extinguish.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Gather.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Harvest.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Mine.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Rename.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Repair.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Rest.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Ride.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Sleep.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 +27 -10
- package/definitions/game/game/entity/action/usable/UsableAction.d.ts +3 -3
- package/definitions/game/game/entity/action/usable/actions/UsableActionsWorld.d.ts +1 -1
- package/definitions/game/game/entity/npc/NPC.d.ts +1 -1
- package/definitions/game/game/entity/npc/npcs/Shipper.d.ts +1 -1
- package/definitions/game/game/entity/player/Player.d.ts +2 -2
- package/definitions/game/game/inspection/infoProviders/shared/SharedLightSourceInfo.d.ts +1 -1
- package/definitions/game/game/island/IIsland.d.ts +6 -1
- package/definitions/game/game/island/Island.d.ts +1 -2
- package/definitions/game/game/item/IItemManager.d.ts +1 -0
- package/definitions/game/game/item/ItemManager.d.ts +3 -2
- package/definitions/game/game/mapgen/IMapGen.d.ts +1 -0
- package/definitions/game/game/mapgen/version/2.13.1.d.ts +20 -0
- package/definitions/game/game/options/modifiers/milestone/MilestoneModifiersManager.d.ts +1 -1
- package/definitions/game/game/reference/ReferenceManager.d.ts +1 -1
- package/definitions/game/game/temperature/TemperatureManager.d.ts +1 -1
- package/definitions/game/language/dictionary/Message.d.ts +752 -744
- package/definitions/game/language/dictionary/UiTranslation.d.ts +794 -796
- package/definitions/game/multiplayer/IMultiplayer.d.ts +3 -1
- package/definitions/game/multiplayer/packets/server/UpdateDialogInfoPacket.d.ts +20 -0
- package/definitions/game/multiplayer/packets/server/UpdateUiDataPacket.d.ts +23 -0
- package/definitions/game/multiplayer/packets/server/UpdateUiInfoPacket.d.ts +3 -0
- package/definitions/game/renderer/IRenderer.d.ts +32 -39
- package/definitions/game/renderer/Renderer.d.ts +0 -1
- package/definitions/game/renderer/context/RendererContext.d.ts +1 -1
- package/definitions/game/renderer/world/World.d.ts +17 -11
- package/definitions/game/renderer/world/WorldLayer.d.ts +23 -8
- package/definitions/game/save/serializer/ISerializer.d.ts +3 -2
- package/definitions/game/ui/component/Article.d.ts +14 -0
- package/definitions/game/ui/old/functional/IFunctionalTooltip.d.ts +37 -0
- package/definitions/game/ui/screen/screens/game/component/Item.d.ts +1 -1
- package/definitions/game/ui/screen/screens/game/component/QuadrantComponent.d.ts +1 -1
- package/definitions/game/ui/screen/screens/game/static/ActionBar.d.ts +1 -0
- package/definitions/game/ui/screen/screens/game/static/actions/ActionsDrawer.d.ts +1 -0
- package/definitions/game/utilities/Functions.d.ts +5 -0
- package/definitions/hosts/shared/globals.d.ts +1 -1
- package/definitions/launcher/ui/Article.d.ts +19 -0
- package/definitions/launcher/ui/Button.d.ts +36 -0
- package/definitions/launcher/ui/Component.d.ts +95 -0
- package/definitions/launcher/ui/InputButton.d.ts +23 -0
- package/definitions/launcher/ui/Section.d.ts +17 -0
- package/definitions/launcher/ui/main/FolderButton.d.ts +29 -0
- package/definitions/launcher/ui/main/FolderSelector.d.ts +48 -0
- package/definitions/launcher/ui/main/Mods.d.ts +20 -0
- package/definitions/launcher/ui/main/Resources.d.ts +23 -0
- package/package.json +24 -24
- package/tsconfig.json +7 -7
- package/tsconfig.mod.base.json +44 -44
|
@@ -103,7 +103,8 @@ export declare enum MultiplayerSyncCheck {
|
|
|
103
103
|
TileEvent = 63,
|
|
104
104
|
Time = 64,
|
|
105
105
|
UpdateDirection = 65,
|
|
106
|
-
Weight = 66
|
|
106
|
+
Weight = 66,
|
|
107
|
+
WorldUpdateTile = 67
|
|
107
108
|
}
|
|
108
109
|
export declare const maxPlayers = 32;
|
|
109
110
|
export declare const packetTickRate = 16;
|
|
@@ -218,6 +219,7 @@ export interface IMultiplayerRunSafelyOptions {
|
|
|
218
219
|
isSynced: boolean;
|
|
219
220
|
pauseGame?: PauseSource;
|
|
220
221
|
pauseIncomingPacketProcessing?: boolean;
|
|
222
|
+
suppressSyncChecks?: boolean;
|
|
221
223
|
showLoadingScreen?: {
|
|
222
224
|
load: Load;
|
|
223
225
|
args?: any[];
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
import PlayerTargetedServerPacket from "multiplayer/packets/PlayerTargetedServerPacket";
|
|
12
|
+
import type { IDialogInfo } from "ui/old/IOldUi";
|
|
13
|
+
export default class UpdateDialogInfoPacket extends PlayerTargetedServerPacket {
|
|
14
|
+
index: string | number;
|
|
15
|
+
info: IDialogInfo;
|
|
16
|
+
getDebugInfo(): string;
|
|
17
|
+
isSyncCheckEnabled(): boolean;
|
|
18
|
+
isAllowedWhenPaused(): boolean;
|
|
19
|
+
process(): void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
import type Player from "game/entity/player/Player";
|
|
12
|
+
import PlayerTargetedServerPacket from "multiplayer/packets/PlayerTargetedServerPacket";
|
|
13
|
+
/**
|
|
14
|
+
* Updates a clients UI data (for new ui)
|
|
15
|
+
*/
|
|
16
|
+
export default class UpdateUiDataPacket extends PlayerTargetedServerPacket {
|
|
17
|
+
static create(player: Player, updates: Map<string | number, Record<string, any>>): UpdateUiDataPacket;
|
|
18
|
+
updates: Map<string | number, Record<string, any>>;
|
|
19
|
+
getDebugInfo(): string;
|
|
20
|
+
isSyncCheckEnabled(): boolean;
|
|
21
|
+
isAllowedWhenPaused(): boolean;
|
|
22
|
+
process(): void;
|
|
23
|
+
}
|
|
@@ -15,6 +15,9 @@ export declare enum UpdateUiInfoPacketType {
|
|
|
15
15
|
DialogContainerInfo = 1,
|
|
16
16
|
ContainerSortInfo = 2
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Updates a clients UI data (for old ui)
|
|
20
|
+
*/
|
|
18
21
|
export default class UpdateUiInfoPacket extends PlayerTargetedServerPacket {
|
|
19
22
|
type: UpdateUiInfoPacketType;
|
|
20
23
|
index: string | number;
|
|
@@ -86,45 +86,38 @@ export declare enum RenderSource {
|
|
|
86
86
|
ItemEquipEffect = 24,
|
|
87
87
|
ItemMovement = 25,
|
|
88
88
|
ItemUnequip = 26,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
Resize = 59,
|
|
122
|
-
SetupGl = 60,
|
|
123
|
-
SpawnAnimationStart = 61,
|
|
124
|
-
StartGame = 62,
|
|
125
|
-
Steamworks = 63,
|
|
126
|
-
Thumbnail = 64,
|
|
127
|
-
WorldLayerRendererFlush = 65
|
|
89
|
+
Mod = 27,
|
|
90
|
+
MovementPlayerPost = 28,
|
|
91
|
+
MovementPlayerZPost = 29,
|
|
92
|
+
MultiplayerDisconnect = 30,
|
|
93
|
+
Notifier = 31,
|
|
94
|
+
NotifierAddCreature = 32,
|
|
95
|
+
NotifierAddItem = 33,
|
|
96
|
+
NotifierAddNotifierIcon = 34,
|
|
97
|
+
NotifierAddStat = 35,
|
|
98
|
+
NotifierAddStatusType = 36,
|
|
99
|
+
OptionEquipment = 37,
|
|
100
|
+
OptionVisionMode = 38,
|
|
101
|
+
OptionZoomLevel = 39,
|
|
102
|
+
Particles = 40,
|
|
103
|
+
PlayerAdd = 41,
|
|
104
|
+
PlayerKill = 42,
|
|
105
|
+
PlayerNoclip = 43,
|
|
106
|
+
PlayerProcessMovement = 44,
|
|
107
|
+
PlayerReady = 45,
|
|
108
|
+
PlayerRemove = 46,
|
|
109
|
+
PlayerRespawn = 47,
|
|
110
|
+
PlayerWalkToTilePath = 48,
|
|
111
|
+
PlayerWalkToTilePathOverburdened = 49,
|
|
112
|
+
PlayerWalkToTilePathPreview = 50,
|
|
113
|
+
PlayerWalkToTilePathReset = 51,
|
|
114
|
+
Resize = 52,
|
|
115
|
+
SetupGl = 53,
|
|
116
|
+
SpawnAnimationStart = 54,
|
|
117
|
+
StartGame = 55,
|
|
118
|
+
Steamworks = 56,
|
|
119
|
+
Thumbnail = 57,
|
|
120
|
+
WorldLayerRendererFlush = 58
|
|
128
121
|
}
|
|
129
122
|
export declare function calculateAmbientLightLevel(origin: IFieldOfViewOrigin, z: number): number;
|
|
130
123
|
export declare const ZOOM_LEVEL_MIN = 1;
|
|
@@ -119,7 +119,6 @@ export default class Renderer extends EventEmitter.Host<IRendererEvents> {
|
|
|
119
119
|
*/
|
|
120
120
|
protected static gameRenderLoop: (timeStamp: number) => void;
|
|
121
121
|
private render;
|
|
122
|
-
private shouldUpdateWorldRender;
|
|
123
122
|
private registerOriginEvents;
|
|
124
123
|
private unregisterOriginEvents;
|
|
125
124
|
private registerIslandEvents;
|
|
@@ -25,6 +25,6 @@ export default class RendererContext {
|
|
|
25
25
|
get isWebGl2(): boolean;
|
|
26
26
|
get origin(): IRendererOrigin;
|
|
27
27
|
get viewport(): IVector2;
|
|
28
|
-
createSpriteBatch(capacity: number, depthOffset?: number, yOffset?: number, enableAlphaMultiplcation?: boolean, enforceBeginAndEnd?: boolean):
|
|
28
|
+
createSpriteBatch(capacity: number, depthOffset?: number, yOffset?: number, enableAlphaMultiplcation?: boolean, enforceBeginAndEnd?: boolean): SpriteBatch2 | SpriteBatch1;
|
|
29
29
|
createPersistantSpriteBatch(depthOffset?: number, yOffset?: number, enableAlphaMultiplcation?: boolean): PersistantSpriteBatch;
|
|
30
30
|
}
|
|
@@ -12,32 +12,38 @@ import EventEmitter from "event/EventEmitter";
|
|
|
12
12
|
import { TileUpdateType } from "game/IGame";
|
|
13
13
|
import type Island from "game/island/Island";
|
|
14
14
|
import type Tile from "game/tile/Tile";
|
|
15
|
-
import
|
|
15
|
+
import { WorldZ } from "game/WorldZ";
|
|
16
16
|
import WorldLayer from "renderer/world/WorldLayer";
|
|
17
|
-
import type
|
|
17
|
+
import { type ISerializable, type ISerializer } from "save/serializer/ISerializer";
|
|
18
18
|
export interface IWorldEvents {
|
|
19
19
|
updateTile(tile: Tile, tileUpdateType: TileUpdateType): any;
|
|
20
20
|
}
|
|
21
21
|
export default class World extends EventEmitter.Host<IWorldEvents> implements ISerializable {
|
|
22
22
|
readonly island: Island;
|
|
23
|
+
readonly layers: Map<WorldZ, WorldLayer>;
|
|
23
24
|
width: number;
|
|
24
25
|
height: number;
|
|
25
|
-
|
|
26
|
-
private
|
|
27
|
-
private layerUpdatesSuspended;
|
|
26
|
+
private _batchTileUpdate;
|
|
27
|
+
private _layerUpdatesSuspended;
|
|
28
28
|
private _loaded;
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
private _setupTiles;
|
|
30
|
+
constructor(island: Island);
|
|
31
|
+
/**
|
|
32
|
+
* Called after the island map size is configured
|
|
33
|
+
*/
|
|
34
|
+
initialize(): void;
|
|
35
|
+
addLayer(z: WorldZ): void;
|
|
36
|
+
load(): void;
|
|
37
|
+
unload(): void;
|
|
38
|
+
updateAll(): void;
|
|
31
39
|
get loaded(): boolean;
|
|
32
40
|
toLocal(world: number, local: number): number;
|
|
33
|
-
addLayer(level: WorldZ): void;
|
|
34
|
-
load(): void;
|
|
35
41
|
suspendLayerUpdates(): void;
|
|
36
42
|
resumeLayerUpdates(): void;
|
|
37
43
|
updateTile(tile: Tile, tileUpdateType: TileUpdateType, updateNeighbors?: boolean, skipFlowFieldUpdate?: boolean): void;
|
|
38
44
|
updateTileLayer(tile: Tile, updateNeighbors: boolean | undefined, flushTileImmediately: boolean): void;
|
|
39
45
|
startUpdateTileBatch(): void;
|
|
40
46
|
endUpdateTileBatch(): void;
|
|
41
|
-
serializeObject(_serializer: ISerializer):
|
|
42
|
-
deserializeObject(serializer: ISerializer): boolean;
|
|
47
|
+
serializeObject(_serializer: ISerializer): this;
|
|
48
|
+
deserializeObject(serializer: ISerializer): boolean | undefined;
|
|
43
49
|
}
|
|
@@ -16,8 +16,13 @@ import type { ITileUpdate, onDoodadUpdateDelegate, onTileUpdateDelegate, Terrain
|
|
|
16
16
|
import { TerrainMask } from "renderer/world/IWorldLayer";
|
|
17
17
|
import type { IColorGrid, IWorldLayerCPP } from "@cplusplus/index";
|
|
18
18
|
import type Tile from "game/tile/Tile";
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
import type { IPreSerializeCallback } from "save/serializer/ISerializer";
|
|
20
|
+
import type World from "renderer/world/World";
|
|
21
|
+
export default class WorldLayer implements IPreSerializeCallback {
|
|
22
|
+
/**
|
|
23
|
+
* Run length encoded light block map to ensure FieldOfView.canSeePosition is always synced correctly.
|
|
24
|
+
*/
|
|
25
|
+
encodedLightBlockMap: Uint32Array | undefined;
|
|
21
26
|
readonly width: number;
|
|
22
27
|
readonly height: number;
|
|
23
28
|
readonly z: WorldZ;
|
|
@@ -25,17 +30,21 @@ export default class WorldLayer {
|
|
|
25
30
|
* Light level for the renderer.
|
|
26
31
|
* Updated in FieldOfView.computeLightMap
|
|
27
32
|
*/
|
|
28
|
-
|
|
33
|
+
lightLevelMap: IColorGrid;
|
|
29
34
|
/**
|
|
30
35
|
* Light blocks - changed via tileUpdate event
|
|
31
36
|
*/
|
|
32
|
-
|
|
37
|
+
lightBlockMap: IByteGrid;
|
|
38
|
+
island: Island;
|
|
33
39
|
onTileUpdates: Map<number, onTileUpdateDelegate>;
|
|
34
40
|
onDoodadUpdates: Map<number, onDoodadUpdateDelegate>;
|
|
35
|
-
private
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
41
|
+
private terrainMap;
|
|
42
|
+
instance: IWorldLayerCPP | undefined;
|
|
43
|
+
private _loadedLighting;
|
|
44
|
+
constructor(width: number | undefined, height: number, z: WorldZ);
|
|
45
|
+
preSerializeObject(): void;
|
|
46
|
+
load(world: World): void;
|
|
47
|
+
unload(): void;
|
|
39
48
|
getTileType(x: number, y: number): TerrainType;
|
|
40
49
|
getTile(x: number, y: number): TerrainData;
|
|
41
50
|
getType(terrain: TerrainData): TerrainType;
|
|
@@ -58,4 +67,10 @@ export default class WorldLayer {
|
|
|
58
67
|
* This must be synced with the loop in WorldLayer::BatchUpdateLightBlockValues c++
|
|
59
68
|
*/
|
|
60
69
|
private mapIndex;
|
|
70
|
+
/**
|
|
71
|
+
* The pointer to the views might change when emscripten grows memory
|
|
72
|
+
* So we need to refetch it sometimes
|
|
73
|
+
* The array length is 0 when the view is invalid
|
|
74
|
+
*/
|
|
75
|
+
private updateViews;
|
|
61
76
|
}
|
|
@@ -45,7 +45,7 @@ export interface ISerializerOptions {
|
|
|
45
45
|
}
|
|
46
46
|
export interface ISerializable {
|
|
47
47
|
serializeObject(serializer: ISerializer): object | undefined;
|
|
48
|
-
deserializeObject(serializer: ISerializer, dataType: Types): boolean;
|
|
48
|
+
deserializeObject(serializer: ISerializer, dataType: Types): boolean | undefined;
|
|
49
49
|
}
|
|
50
50
|
export interface IPreSerializeCallback {
|
|
51
51
|
preSerializeObject(serializer: ISerializer): void;
|
|
@@ -115,7 +115,8 @@ export declare enum Types {
|
|
|
115
115
|
ItemReference = 45,
|
|
116
116
|
StringTokenizer = 46,
|
|
117
117
|
MagicalPropertyManager = 47,
|
|
118
|
-
ItemMapManager = 48
|
|
118
|
+
ItemMapManager = 48,
|
|
119
|
+
WorldLayer = 49
|
|
119
120
|
}
|
|
120
121
|
export declare const SYMBOL_SAVE_PROPERTIES: unique symbol;
|
|
121
122
|
export declare const SYMBOL_SAVE_PROPERTY_FLAGS: unique symbol;
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
import Component from "ui/component/Component";
|
|
12
|
+
export declare class Article extends Component {
|
|
13
|
+
constructor();
|
|
14
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
export interface ITooltipOptions {
|
|
12
|
+
selector: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
trackMouse?: boolean;
|
|
15
|
+
position?: ITooltipPosition;
|
|
16
|
+
content(): string;
|
|
17
|
+
onOpen?(target: JQuery): void;
|
|
18
|
+
onClose?(target: JQuery): void;
|
|
19
|
+
}
|
|
20
|
+
export interface ITooltip extends ITooltipOptions {
|
|
21
|
+
visible?: HTMLElement;
|
|
22
|
+
lastEvent: string;
|
|
23
|
+
element: HTMLElement;
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
show(event: MouseEvent | undefined): void;
|
|
27
|
+
updateTooltipPosition(left: number, top: number, mouseX?: number, mouseY?: number): void;
|
|
28
|
+
}
|
|
29
|
+
export interface ITooltipPosition {
|
|
30
|
+
startAtRight?: boolean;
|
|
31
|
+
startAtBottom?: boolean;
|
|
32
|
+
centerX?: boolean;
|
|
33
|
+
centerY?: boolean;
|
|
34
|
+
leftOffset?: number;
|
|
35
|
+
topOffset?: number;
|
|
36
|
+
clampRight?: boolean;
|
|
37
|
+
}
|
|
@@ -62,7 +62,7 @@ export declare enum ItemClasses {
|
|
|
62
62
|
NearlyDecayed = "item-component-nearly-decayed"
|
|
63
63
|
}
|
|
64
64
|
export declare namespace ItemClasses {
|
|
65
|
-
const IconLocation: (enumValue: ItemDetailIconLocation) => "item-component-icon-location-
|
|
65
|
+
const IconLocation: (enumValue: ItemDetailIconLocation) => "item-component-icon-location-topleft" | "item-component-icon-location-bottomright";
|
|
66
66
|
}
|
|
67
67
|
export interface IItemHandler {
|
|
68
68
|
noDrag?: true;
|
|
@@ -50,7 +50,7 @@ export default abstract class QuadrantComponent extends StaticComponent {
|
|
|
50
50
|
protected readonly scrollableHandler: void;
|
|
51
51
|
get preferredQuadrant(): Quadrant;
|
|
52
52
|
get quadrant(): Quadrant;
|
|
53
|
-
get quadrantName(): "None" | "Top" | "Bottom" | "
|
|
53
|
+
get quadrantName(): "None" | "Top" | "Bottom" | "Any" | "TopLeft" | "TopRight" | "BottomRight" | "BottomLeft";
|
|
54
54
|
readonly log: Log;
|
|
55
55
|
constructor(id: QuadrantComponentId);
|
|
56
56
|
protected registerDataHost(): void;
|
|
@@ -119,6 +119,7 @@ export declare class ActionSlot extends Button implements IRefreshable {
|
|
|
119
119
|
readonly slotted: ActionSlotSlottedContainer;
|
|
120
120
|
readonly useOnMoveIndicator: Component<HTMLElement>;
|
|
121
121
|
private lastItem?;
|
|
122
|
+
private lastQuality?;
|
|
122
123
|
usability: ReturnableUsableActionUsability;
|
|
123
124
|
constructor(number: number, slotData: IActionBarSlotData);
|
|
124
125
|
refresh(): this;
|
|
@@ -99,6 +99,7 @@ export default class ActionsConfigurationDrawer extends Component implements IRe
|
|
|
99
99
|
get configuringSlotData(): number | undefined;
|
|
100
100
|
private current?;
|
|
101
101
|
private savedUsing?;
|
|
102
|
+
get oldUsing(): IActionBarSlotData["using"];
|
|
102
103
|
constructor();
|
|
103
104
|
open(number: number, slot: IActionBarSlotData): Promise<this>;
|
|
104
105
|
refresh(updateSavedUsing?: boolean): this;
|
|
@@ -10,5 +10,10 @@
|
|
|
10
10
|
*/
|
|
11
11
|
declare namespace Functions {
|
|
12
12
|
const noOp: () => void;
|
|
13
|
+
const noOpString: () => string;
|
|
14
|
+
const noOpZero: () => number;
|
|
15
|
+
const noOpNull: () => null;
|
|
16
|
+
const noOpFalse: () => boolean;
|
|
17
|
+
const noOpTrue: () => boolean;
|
|
13
18
|
}
|
|
14
19
|
export default Functions;
|
|
@@ -8,7 +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
|
-
export declare const gameVersionStage = "beta", gameVersionMajor = 2, gameVersionMinor = 13, gameVersionPatch =
|
|
11
|
+
export declare const gameVersionStage = "beta", gameVersionMajor = 2, gameVersionMinor = 13, gameVersionPatch = 1, gameVersionName = "Beacon's Call";
|
|
12
12
|
export declare const gameVersion: string;
|
|
13
13
|
export declare const gameVersionTitleMajor: string;
|
|
14
14
|
export declare const gameVersionTitleMinor: string;
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
import Component from "ui/Component";
|
|
12
|
+
export declare enum ArticleClasses {
|
|
13
|
+
Main = "launcher-article",
|
|
14
|
+
Title = "launcher-article-title"
|
|
15
|
+
}
|
|
16
|
+
export default class Article extends Component<HTMLElement> {
|
|
17
|
+
readonly title: Component<HTMLHeadingElement>;
|
|
18
|
+
constructor(headingLevel: "h1" | "h2" | "h3" | "h4" | "h5" | "h6");
|
|
19
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
import Component from "ui/Component";
|
|
12
|
+
export declare enum ButtonClasses {
|
|
13
|
+
Main = "button",
|
|
14
|
+
DisplayModeBlock = "button-block",
|
|
15
|
+
DisplayModeIcon = "button-icon",
|
|
16
|
+
DisplayModeButtonList = "button-list",
|
|
17
|
+
NoAction = "button-no-action",
|
|
18
|
+
ListIconsZoom2To3 = "button-list-zoom-2-to-3",
|
|
19
|
+
IconZoom2To3 = "button-icon-zoom-2-to-3",
|
|
20
|
+
HasButtonButtons = "has-button-buttons",
|
|
21
|
+
ButtonButtons = "button-buttons",
|
|
22
|
+
Disabled = "disabled"
|
|
23
|
+
}
|
|
24
|
+
export default class Button extends Component<HTMLButtonElement | HTMLInputElement> {
|
|
25
|
+
private readonly _disabledReasons;
|
|
26
|
+
get disabled(): boolean;
|
|
27
|
+
wrapperButtons?: Component<HTMLDivElement>;
|
|
28
|
+
description?: Component<HTMLParagraphElement>;
|
|
29
|
+
constructor(elementType?: "button" | "input");
|
|
30
|
+
setDisplayMode(mode: ButtonClasses.DisplayModeButtonList, zoomClass: ButtonClasses.ListIconsZoom2To3): this;
|
|
31
|
+
setDisplayMode(mode: ButtonClasses.DisplayModeBlock | ButtonClasses.DisplayModeIcon | ButtonClasses.DisplayModeButtonList | false): this;
|
|
32
|
+
setActionless(isActionless?: boolean, setDisabled?: boolean): this;
|
|
33
|
+
isButtonList(): boolean;
|
|
34
|
+
setDisabled(val?: boolean, reason?: string): this;
|
|
35
|
+
addButton(initializer: (button: Button) => Button): this;
|
|
36
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
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
|
+
import { EventManager } from "utilities/EventManager";
|
|
12
|
+
export declare enum Classes {
|
|
13
|
+
Secondary = "secondary"
|
|
14
|
+
}
|
|
15
|
+
declare global {
|
|
16
|
+
interface Element {
|
|
17
|
+
component?: WeakRef<Component<this>>;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export interface IComponentEvents extends HTMLElementEventMap {
|
|
21
|
+
}
|
|
22
|
+
export type ComponentElement<COMPONENT extends Component> = COMPONENT["element"];
|
|
23
|
+
export type ComponentEventManager<HOST extends Component, EVENTS> = EventManager<HOST, EVENTS, ComponentElement<HOST>>;
|
|
24
|
+
export type ComponentEvents<COMPONENT extends Component = Component> = COMPONENT["event"] extends EventManager<any, infer SUPER_EVENTS, any> ? SUPER_EVENTS : never;
|
|
25
|
+
export default class Component<ELEMENT extends Element = Element> {
|
|
26
|
+
readonly element: ELEMENT;
|
|
27
|
+
static create(this: typeof Component): Component<HTMLDivElement>;
|
|
28
|
+
static create<TYPE_NAME extends keyof HTMLElementTagNameMap>(this: typeof Component, type: TYPE_NAME): Component<HTMLElementTagNameMap[TYPE_NAME]>;
|
|
29
|
+
static byId<ELEMENT extends Element = Element>(id: string, create?: boolean): Component<ELEMENT> | undefined;
|
|
30
|
+
get classes(): ClassManager<this & Component<HTMLElement>>;
|
|
31
|
+
get attributes(): AttributeManager<this & Component<HTMLElement>>;
|
|
32
|
+
get style(): StyleManager<this & Component<HTMLElement>>;
|
|
33
|
+
get text(): TextManager<this & Component<HTMLElement>>;
|
|
34
|
+
readonly event: EventManager<this & Component<HTMLElement>, IComponentEvents, ELEMENT>;
|
|
35
|
+
constructor(element: ELEMENT);
|
|
36
|
+
tweak<ARGS extends readonly any[]>(tweaker?: (self: this, ...args: ARGS) => any, ...args: ARGS): this;
|
|
37
|
+
parent(): Component | undefined;
|
|
38
|
+
hasContents(): boolean;
|
|
39
|
+
children<CHILD extends Component>(): Generator<CHILD, void>;
|
|
40
|
+
append(...elements: Array<Component | Node | undefined>): this;
|
|
41
|
+
prepend(...elements: Array<Component | Node | undefined>): this;
|
|
42
|
+
appendTo(componentOrParentNode?: ParentNode | Component): this;
|
|
43
|
+
prependTo(componentOrParentNode?: ParentNode | Component): this;
|
|
44
|
+
insertToBefore(componentOrParentNode?: ParentNode | Component, pivot?: ChildNode | Component): this;
|
|
45
|
+
insertToAfter(componentOrParentNode?: ParentNode | Component, pivot?: ChildNode | Component): this;
|
|
46
|
+
remove(): void;
|
|
47
|
+
removeContents(): this;
|
|
48
|
+
exists(): boolean;
|
|
49
|
+
index(): number;
|
|
50
|
+
contains(...nodes: Array<Component | Node | undefined | null>): boolean;
|
|
51
|
+
isFocused(): boolean;
|
|
52
|
+
focus(): void;
|
|
53
|
+
blur(): void;
|
|
54
|
+
}
|
|
55
|
+
export interface IBasicClassManager<HOST extends Component<HTMLElement>> {
|
|
56
|
+
add(...classes: string[]): HOST;
|
|
57
|
+
remove(...classes: string[]): HOST;
|
|
58
|
+
}
|
|
59
|
+
export declare class ClassManager<HOST extends Component<HTMLElement>> implements IBasicClassManager<HOST> {
|
|
60
|
+
private readonly host;
|
|
61
|
+
constructor(host: HOST);
|
|
62
|
+
all(): string[];
|
|
63
|
+
add(...classes: string[]): HOST;
|
|
64
|
+
remove(...classes: string[]): HOST;
|
|
65
|
+
removeWhere(filter: (cls: string) => any): HOST;
|
|
66
|
+
toggle(...classes: string[]): HOST;
|
|
67
|
+
toggle(present: boolean, ...classes: string[]): HOST;
|
|
68
|
+
has(...classes: string[]): boolean;
|
|
69
|
+
some(...classes: string[]): boolean;
|
|
70
|
+
until(promise: Promise<any>): IBasicClassManager<HOST>;
|
|
71
|
+
until(promise: Promise<any>, consumer: (manipulator: IBasicClassManager<HOST>) => any): HOST;
|
|
72
|
+
}
|
|
73
|
+
export declare class AttributeManager<HOST extends Component<HTMLElement>> {
|
|
74
|
+
private readonly host;
|
|
75
|
+
constructor(host: HOST);
|
|
76
|
+
get(name: string): string | null | undefined;
|
|
77
|
+
add(name: string): HOST;
|
|
78
|
+
toggle(present: boolean, name: string, value?: string): HOST;
|
|
79
|
+
set(name: string, value?: string): HOST;
|
|
80
|
+
remove(name: string): HOST;
|
|
81
|
+
}
|
|
82
|
+
export declare class StyleManager<HOST extends Component<HTMLElement>> {
|
|
83
|
+
private readonly host;
|
|
84
|
+
constructor(host: HOST);
|
|
85
|
+
set(name: string, value?: string): HOST;
|
|
86
|
+
remove(name: string): HOST;
|
|
87
|
+
}
|
|
88
|
+
export declare class TextManager<HOST extends Component<HTMLElement>> {
|
|
89
|
+
private readonly host;
|
|
90
|
+
constructor(host: HOST);
|
|
91
|
+
get(): string | null | undefined;
|
|
92
|
+
set(text?: string): HOST;
|
|
93
|
+
add(text: string): HOST;
|
|
94
|
+
remove(): HOST;
|
|
95
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
import Button from "ui/Button";
|
|
12
|
+
import Component from "ui/Component";
|
|
13
|
+
export declare enum InputButtonClasses {
|
|
14
|
+
Main = "button-input",
|
|
15
|
+
Active = "button-input-active",
|
|
16
|
+
Input = "button-input-input"
|
|
17
|
+
}
|
|
18
|
+
export default class InputButton extends Button {
|
|
19
|
+
readonly input: Component<HTMLInputElement> & Component<HTMLElement>;
|
|
20
|
+
constructor();
|
|
21
|
+
setPlaceholder(text: string): this;
|
|
22
|
+
protected shouldSelectInputOnClick(): boolean;
|
|
23
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
import Component from "ui/Component";
|
|
12
|
+
export declare enum SectionClasses {
|
|
13
|
+
Main = "launcher-section"
|
|
14
|
+
}
|
|
15
|
+
export default class Section extends Component<HTMLElement> {
|
|
16
|
+
constructor();
|
|
17
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
import type { ComponentEventManager, ComponentEvents } from "ui/Component";
|
|
12
|
+
import Component from "ui/Component";
|
|
13
|
+
import InputButton from "ui/InputButton";
|
|
14
|
+
import type { IFolder } from "ui/main/FolderSelector";
|
|
15
|
+
export declare enum FolderButtonClasses {
|
|
16
|
+
Main = "button-folder",
|
|
17
|
+
Title = "button-folder-title",
|
|
18
|
+
Path = "button-folder-path"
|
|
19
|
+
}
|
|
20
|
+
export interface IFolderButtonEvents extends ComponentEvents<InputButton> {
|
|
21
|
+
delete: any;
|
|
22
|
+
}
|
|
23
|
+
export default class FolderButton extends InputButton {
|
|
24
|
+
readonly folder: IFolder;
|
|
25
|
+
event: ComponentEventManager<this, IFolderButtonEvents>;
|
|
26
|
+
readonly path: Component<HTMLParagraphElement> & Component<HTMLElement>;
|
|
27
|
+
constructor(folder: IFolder);
|
|
28
|
+
protected shouldSelectInputOnClick(): boolean;
|
|
29
|
+
}
|