@wayward/types 2.13.0-beta.dev.20230326.2 → 2.13.0-beta.dev.20230329.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/CombatStrengthManager.d.ts +13 -1
- package/definitions/game/game/entity/action/actions/ShipToIsland.d.ts +1 -1
- package/definitions/game/game/entity/action/usable/IUsableAction.d.ts +2 -0
- package/definitions/game/game/entity/action/usable/actions/UsableActionsCreatures.d.ts +2 -2
- package/definitions/game/game/entity/action/usable/actions/UsableActionsMain.d.ts +12 -12
- package/definitions/game/game/entity/action/usable/actions/UsableActionsUseNPC.d.ts +3 -1
- package/definitions/game/game/entity/npc/NPC.d.ts +2 -1
- package/definitions/game/game/entity/npc/npcs/Merchant.d.ts +2 -0
- package/definitions/game/game/entity/npc/npcs/Shipper.d.ts +1 -0
- package/definitions/game/game/inspection/InfoProvider.d.ts +1 -1
- package/definitions/game/game/reference/ReferenceManager.d.ts +1 -1
- package/definitions/game/game/temperature/TemperatureManager.d.ts +10 -5
- package/definitions/game/language/Dictionary.d.ts +93 -92
- package/definitions/game/language/DictionaryMap.d.ts +184 -181
- package/definitions/game/language/dictionary/Message.d.ts +811 -810
- package/definitions/game/{renderer/spriteBatch/SpriteBatch.d.ts → language/english/game/CombatDangerLevels.d.ts} +3 -3
- package/definitions/game/renderer/IRenderer.d.ts +2 -1
- package/definitions/game/renderer/context/RendererContext.d.ts +1 -1
- package/definitions/game/renderer/overlay/GenericOverlay.d.ts +24 -0
- package/definitions/game/renderer/spriteBatch/SpriteBatch1.d.ts +2 -1
- package/definitions/game/renderer/spriteBatch/SpriteBatch2.d.ts +2 -1
- package/definitions/game/renderer/world/WorldRenderer.d.ts +1 -1
- package/definitions/game/ui/component/Component.d.ts +3 -3
- package/definitions/game/ui/old/screens/InGameScreen.d.ts +1 -1
- package/definitions/game/ui/screen/screens/game/dialog/BookDialog.d.ts +1 -1
- package/definitions/game/ui/screen/screens/game/dialog/IslandsSelectionDialog.d.ts +1 -0
- package/definitions/game/utilities/math/IVector.d.ts +3 -0
- package/package.json +1 -1
|
@@ -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
|
-
import
|
|
12
|
-
|
|
13
|
-
export
|
|
11
|
+
import { CombatDangerLevel } from "game/entity/CombatStrengthManager";
|
|
12
|
+
declare const combatDangerLevels: Record<CombatDangerLevel, string>;
|
|
13
|
+
export default combatDangerLevels;
|
|
@@ -123,7 +123,8 @@ export declare enum RenderSource {
|
|
|
123
123
|
StartGame = 61,
|
|
124
124
|
Steamworks = 62,
|
|
125
125
|
Thumbnail = 63,
|
|
126
|
-
WorldLayerRendererFlush = 64
|
|
126
|
+
WorldLayerRendererFlush = 64,
|
|
127
|
+
GenericOverlay = 65
|
|
127
128
|
}
|
|
128
129
|
export declare function calculateAmbientLightLevel(origin: IFieldOfViewOrigin, z: number): number;
|
|
129
130
|
export declare const ZOOM_LEVEL_MIN = 1;
|
|
@@ -24,5 +24,5 @@ export default class RendererContext {
|
|
|
24
24
|
get isWebGl2(): boolean;
|
|
25
25
|
get origin(): IRendererOrigin;
|
|
26
26
|
get viewport(): IVector2;
|
|
27
|
-
createSpriteBatch(capacity: number, depthOffset?: number, yOffset?: number): SpriteBatch2 | SpriteBatch1;
|
|
27
|
+
createSpriteBatch(capacity: number, depthOffset?: number, yOffset?: number, enableAlphaMultiplcation?: boolean): SpriteBatch2 | SpriteBatch1;
|
|
28
28
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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 { IOverlayInfo } from "game/tile/ITerrain";
|
|
12
|
+
import type Tile from "game/tile/Tile";
|
|
13
|
+
export default abstract class GenericOverlay<OVERLAY extends IOverlayInfo = IOverlayInfo, PARAMS extends any[] = []> {
|
|
14
|
+
private readonly overlay;
|
|
15
|
+
protected alpha: number;
|
|
16
|
+
getDefaultAlpha(): number;
|
|
17
|
+
show(): void;
|
|
18
|
+
hide(): void;
|
|
19
|
+
addOrUpdate(tile: Tile, ...params: PARAMS): void;
|
|
20
|
+
protected abstract generateOverlayInfo(tile: Tile, ...params: PARAMS): OVERLAY | undefined;
|
|
21
|
+
protected updateOverlayAlpha(tile: Tile, overlay: OVERLAY, alpha: number): OVERLAY | undefined;
|
|
22
|
+
clear(): void;
|
|
23
|
+
private updateAlpha;
|
|
24
|
+
}
|
|
@@ -20,6 +20,7 @@ export default class SpriteBatch1 implements ISpriteBatch {
|
|
|
20
20
|
readonly capacity: number;
|
|
21
21
|
private readonly depthOffset;
|
|
22
22
|
private readonly yOffset;
|
|
23
|
+
private readonly enableAlphaMultiplcation;
|
|
23
24
|
private readonly shaderProgram;
|
|
24
25
|
texSprites: WebGLTexture | undefined;
|
|
25
26
|
inverseSpriteTextureSize: Vector2 | undefined;
|
|
@@ -31,7 +32,7 @@ export default class SpriteBatch1 implements ISpriteBatch {
|
|
|
31
32
|
private begun;
|
|
32
33
|
private _setup;
|
|
33
34
|
static initializePrograms(webGlContext: WebGlContext): Promise<void>;
|
|
34
|
-
constructor(context: RendererContext, capacity: number, depthOffset?: number, yOffset?: number);
|
|
35
|
+
constructor(context: RendererContext, capacity: number, depthOffset?: number, yOffset?: number, enableAlphaMultiplcation?: boolean);
|
|
35
36
|
setup(): void;
|
|
36
37
|
delete(): void;
|
|
37
38
|
clear(): void;
|
|
@@ -20,6 +20,7 @@ export default class SpriteBatch2 implements ISpriteBatch {
|
|
|
20
20
|
readonly capacity: number;
|
|
21
21
|
private readonly depthOffset;
|
|
22
22
|
private readonly yOffset;
|
|
23
|
+
private readonly enableAlphaMultiplcation;
|
|
23
24
|
private readonly shaderProgram;
|
|
24
25
|
texSprites: WebGLTexture | undefined;
|
|
25
26
|
inverseSpriteTextureSize: Vector2 | undefined;
|
|
@@ -33,7 +34,7 @@ export default class SpriteBatch2 implements ISpriteBatch {
|
|
|
33
34
|
private readonly vertexArray;
|
|
34
35
|
private _setup;
|
|
35
36
|
static initializePrograms(webGlContext: WebGlContext): Promise<void>;
|
|
36
|
-
constructor(context: RendererContext, capacity: number, depthOffset?: number, yOffset?: number);
|
|
37
|
+
constructor(context: RendererContext, capacity: number, depthOffset?: number, yOffset?: number, enableAlphaMultiplcation?: boolean);
|
|
37
38
|
setup(): void;
|
|
38
39
|
delete(): void;
|
|
39
40
|
clear(): void;
|
|
@@ -185,7 +185,7 @@ export default class WorldRenderer extends EventEmitter.Host<IWorldRendererEvent
|
|
|
185
185
|
getAmbientColorNight(): [number, number, number];
|
|
186
186
|
getAmbientColorDawn(): [number, number, number];
|
|
187
187
|
getAmbientIntensity(): number;
|
|
188
|
-
getFogColor(): [number, number, number];
|
|
188
|
+
getFogColor(): [x: number, y: number, z: number];
|
|
189
189
|
shouldRender(): RenderFlag;
|
|
190
190
|
renderWorld(timeStamp: number, x: number, y: number, z: number): void;
|
|
191
191
|
renderWorldLayer(worldLayer: WorldLayerRenderer, x: number, y: number, tileScale: number, viewWidth: number, viewHeight: number, renderFlags: RenderFlag, enableDepth: boolean): void;
|
|
@@ -194,7 +194,7 @@ export default class Component<E extends HTMLElement = HTMLElement> extends Even
|
|
|
194
194
|
/**
|
|
195
195
|
* Returns whether this component contains the given element.
|
|
196
196
|
*/
|
|
197
|
-
contains(what?: string |
|
|
197
|
+
contains(what?: string | Node | Component | null): boolean;
|
|
198
198
|
/**
|
|
199
199
|
* An alias for `element.querySelectorAll(selector)`
|
|
200
200
|
*/
|
|
@@ -270,14 +270,14 @@ export default class Component<E extends HTMLElement = HTMLElement> extends Even
|
|
|
270
270
|
* @param child The child to scroll to
|
|
271
271
|
* @param ms The time to take, defaulting to 1000 (1 second)
|
|
272
272
|
*/
|
|
273
|
-
scrollTo(child?: Component, ms?: number): void;
|
|
273
|
+
scrollTo(child?: HTMLElement | Component, ms?: number): void;
|
|
274
274
|
/**
|
|
275
275
|
* Scrolls this element so the given child is at the top of the viewport.
|
|
276
276
|
* @param child The child to scroll to
|
|
277
277
|
* @param offsetTop An offset for the position to scroll to, relative to the position of the child
|
|
278
278
|
* @param ms The time to take, defaulting to 1000 (1 second)
|
|
279
279
|
*/
|
|
280
|
-
scrollTo(child: Component | undefined, offsetTop: number, ms?: number): void;
|
|
280
|
+
scrollTo(child: HTMLElement | Component | undefined, offsetTop: number, ms?: number): void;
|
|
281
281
|
/**
|
|
282
282
|
* Triggers a repaint on this element.
|
|
283
283
|
*/
|
|
@@ -220,7 +220,7 @@ export default class InGameScreen extends BaseScreen {
|
|
|
220
220
|
private isOverlayVisible;
|
|
221
221
|
private readonly onInterrupt;
|
|
222
222
|
private readonly onInterruptClosed;
|
|
223
|
-
|
|
223
|
+
getHoveredItem(api: IBindHandlerApi): HTMLElement | undefined;
|
|
224
224
|
/**
|
|
225
225
|
* Get a number based on an item's magical type/skill/stat in order.
|
|
226
226
|
* @param item An item to sort.
|
|
@@ -16,7 +16,7 @@ export default class BookDialog extends Dialog {
|
|
|
16
16
|
private book?;
|
|
17
17
|
private readonly text;
|
|
18
18
|
constructor();
|
|
19
|
-
getName(): import("../../../../../language/ITranslation").ISerializedTranslation | import("../../../../../language/impl/TranslationImpl").default | import("../../../../../
|
|
19
|
+
getName(): import("../../../../../language/ITranslation").ISerializedTranslation | import("../../../../../language/impl/TranslationImpl").default | Iterable<import("../../../../../utilities/string/Interpolator").IStringSection> | import("../../../../../language/dictionary/UiTranslation").default | undefined;
|
|
20
20
|
openBook(item: Item): void;
|
|
21
21
|
private getText;
|
|
22
22
|
protected onInventoryItemRemove(_: any, item: Item): void;
|
|
@@ -18,5 +18,6 @@ export default class IslandsSelectionDialog extends IslandsDialog {
|
|
|
18
18
|
constructor();
|
|
19
19
|
setShipper(npc: ShipperNPC): this;
|
|
20
20
|
protected onChangedSelectedIsland(animate?: boolean): void;
|
|
21
|
+
get island(): import("../../../../../game/island/Island").default | undefined;
|
|
21
22
|
protected ship(): void;
|
|
22
23
|
}
|
package/package.json
CHANGED