@wayward/types 2.13.0-beta.dev.20230508.1 → 2.13.0-beta.dev.20230511.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/audio/IAudio.d.ts +36 -37
- package/definitions/game/game/IGame.d.ts +2 -1
- package/definitions/game/game/entity/Human.d.ts +4 -0
- package/definitions/game/game/entity/npc/NPC.d.ts +5 -0
- package/definitions/game/game/island/Port.d.ts +3 -1
- package/definitions/game/game/temperature/TemperatureManager.d.ts +2 -1
- package/definitions/game/game/tile/Tile.d.ts +8 -1
- package/definitions/game/language/LanguageManager.d.ts +7 -11
- package/definitions/game/language/Translation.d.ts +1 -1
- package/definitions/game/language/dictionary/Message.d.ts +667 -663
- package/definitions/game/language/dictionary/UiTranslation.d.ts +444 -443
- package/definitions/game/mod/ModRegistry.d.ts +1 -0
- package/definitions/game/save/SaveManager.d.ts +8 -0
- package/definitions/game/steamworks/ISteamworks.d.ts +1 -0
- package/definitions/game/ui/component/Button.d.ts +1 -0
- package/definitions/game/ui/component/Text.d.ts +2 -0
- package/definitions/game/ui/old/OldUi.d.ts +1 -1
- package/definitions/game/ui/old/screens/InGameScreen.d.ts +0 -1
- package/definitions/game/ui/screen/screens/game/component/Dialog.d.ts +5 -0
- package/definitions/game/ui/screen/screens/game/dialog/CraftingDialog.d.ts +4 -0
- package/definitions/game/ui/screen/screens/game/dialog/EquipmentDialog.d.ts +4 -0
- package/definitions/game/ui/screen/screens/game/dialog/IslandsSailDialog.d.ts +5 -2
- package/definitions/game/ui/screen/screens/game/dialog/MessagesDialog.d.ts +4 -0
- package/definitions/game/ui/screen/screens/game/dialog/MilestonesDialog.d.ts +4 -0
- package/definitions/game/ui/screen/screens/game/dialog/NotesDialog.d.ts +4 -0
- package/definitions/game/ui/screen/screens/game/dialog/QuestDialog.d.ts +4 -0
- package/definitions/game/ui/screen/screens/game/dialog/QuickSettingsDialog.d.ts +4 -0
- package/definitions/game/ui/screen/screens/game/dialog/SkillsDialog.d.ts +4 -0
- package/definitions/game/ui/screen/screens/game/dialog/islands/IslandsDialog.d.ts +0 -3
- package/definitions/game/ui/screen/screens/game/static/menubar/IMenuBarButton.d.ts +3 -1
- package/definitions/game/ui/screen/screens/menu/menus/loadgame/SaveSlot.d.ts +6 -1
- package/definitions/game/ui/util/ScaleManager.d.ts +4 -1
- package/definitions/game/utilities/math/Math2.d.ts +4 -0
- package/definitions/launcher/App.d.ts +4 -0
- package/definitions/launcher/ui/LauncherUI.d.ts +7 -1
- package/definitions/launcher/ui/launcher/FolderSelector.d.ts +5 -3
- package/definitions/launcher/ui/launcher/Saves.d.ts +16 -0
- package/definitions/launcher/utilities/Data.d.ts +16 -0
- package/definitions/test/suite/unitTests/game/Actions.spec.d.ts +1 -1
- package/package.json +1 -1
|
@@ -12,43 +12,42 @@ export declare enum SfxType {
|
|
|
12
12
|
Boat = 0,
|
|
13
13
|
Bow = 1,
|
|
14
14
|
Chat = 2,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
Water = 39
|
|
15
|
+
Craft = 3,
|
|
16
|
+
CreatureHit = 4,
|
|
17
|
+
CreatureNoise = 5,
|
|
18
|
+
Damaged = 6,
|
|
19
|
+
DangerousMove = 7,
|
|
20
|
+
Death = 8,
|
|
21
|
+
Eating = 9,
|
|
22
|
+
Exceptional = 10,
|
|
23
|
+
Extinguish = 11,
|
|
24
|
+
Fail = 12,
|
|
25
|
+
GraniteHit = 13,
|
|
26
|
+
Hit = 14,
|
|
27
|
+
Hurt = 15,
|
|
28
|
+
Minecart = 16,
|
|
29
|
+
Miss = 17,
|
|
30
|
+
PickUp = 18,
|
|
31
|
+
SandstoneHit = 19,
|
|
32
|
+
Swim = 20,
|
|
33
|
+
Throw = 21,
|
|
34
|
+
Trample = 22,
|
|
35
|
+
TreeHit = 23,
|
|
36
|
+
UiActivate = 24,
|
|
37
|
+
UiChoose = 25,
|
|
38
|
+
UiClose = 26,
|
|
39
|
+
UiDisable = 27,
|
|
40
|
+
UiEnable = 28,
|
|
41
|
+
UiInput = 29,
|
|
42
|
+
UiInputdelete = 30,
|
|
43
|
+
UiInvalid = 31,
|
|
44
|
+
UiOpen = 32,
|
|
45
|
+
UiOpensmall = 33,
|
|
46
|
+
UiProtect = 34,
|
|
47
|
+
UiSelect = 35,
|
|
48
|
+
UiUnprotect = 36,
|
|
49
|
+
Walk = 37,
|
|
50
|
+
Water = 38
|
|
52
51
|
}
|
|
53
52
|
export type SfxUi = Extract<keyof typeof SfxType, `Ui${string}`> extends `Ui${infer RESULT}` ? Lowercase<RESULT> : never;
|
|
54
53
|
export declare enum Music {
|
|
@@ -356,6 +356,10 @@ export default abstract class Human<TypeType extends number = number> extends En
|
|
|
356
356
|
kill(): void;
|
|
357
357
|
protected resetDefense(skipStatChangedEvent?: boolean): void;
|
|
358
358
|
protected swimAndSootheCheck(): void;
|
|
359
|
+
/**
|
|
360
|
+
* Chance to stop frostbite when next to a fire
|
|
361
|
+
*/
|
|
362
|
+
protected fireSootheCheck(): void;
|
|
359
363
|
/**
|
|
360
364
|
* Event handler for when a status effect is applied or removed.
|
|
361
365
|
*/
|
|
@@ -36,6 +36,11 @@ export interface INPCEvents extends Events<Human> {
|
|
|
36
36
|
* @returns True if the npc can move, false if the npc cannot move, or undefined to use the default logic
|
|
37
37
|
*/
|
|
38
38
|
canNPCMove(tile: Tile, moveType: MoveType): boolean | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Called when a npc tries to attack
|
|
41
|
+
* @returns True if the npc can attack, false if the npc cannot attack, or undefined to use the default logic
|
|
42
|
+
*/
|
|
43
|
+
canNPCAttack(): boolean | undefined;
|
|
39
44
|
}
|
|
40
45
|
export default abstract class NPC extends Human<NPCType> {
|
|
41
46
|
protected static registrarId: number;
|
|
@@ -23,13 +23,14 @@ interface IPort {
|
|
|
23
23
|
name: ISerializedTranslation;
|
|
24
24
|
position: IVector3;
|
|
25
25
|
doodadRef?: Reference<ReferenceType.Doodad>;
|
|
26
|
+
lit: boolean;
|
|
26
27
|
}
|
|
27
28
|
interface Port extends Readonly<IPort> {
|
|
28
29
|
}
|
|
29
30
|
declare class Port {
|
|
30
31
|
static fromDoodad(doodad: Doodad): Port;
|
|
31
32
|
constructor(port: IPort);
|
|
32
|
-
|
|
33
|
+
getDoodad(): Doodad | undefined;
|
|
33
34
|
get island(): Island | undefined;
|
|
34
35
|
getName(): TranslationImpl;
|
|
35
36
|
}
|
|
@@ -40,4 +41,5 @@ export declare class PortManager extends Map<number, Port> implements IUnseriali
|
|
|
40
41
|
onUnserialized(serializer: ISerializer): void;
|
|
41
42
|
register(doodad: Doodad): void;
|
|
42
43
|
deregister(doodad: Doodad): boolean;
|
|
44
|
+
get litPortCount(): number;
|
|
43
45
|
}
|
|
@@ -30,6 +30,7 @@ import type { IPreSerializeCallback } from "save/serializer/ISerializer";
|
|
|
30
30
|
import type { IVector3 } from "utilities/math/IVector";
|
|
31
31
|
import { IRange } from "utilities/math/Range";
|
|
32
32
|
import Vector2 from "utilities/math/Vector2";
|
|
33
|
+
export declare const TEMPERATURE_DIFFUSION_RATE: number;
|
|
33
34
|
export declare const TEMPERATURE_BOUNDARY_MIN_VEC2: Vector2;
|
|
34
35
|
export declare const TEMPERATURE_INVALID = 255;
|
|
35
36
|
export interface ITemperatureManagerEvents {
|
|
@@ -121,7 +122,7 @@ export default class TemperatureManager extends EventEmitter.Host<ITemperatureMa
|
|
|
121
122
|
/**
|
|
122
123
|
* Returns the temperature of the given tile, produced by combining the temperatures of each type.
|
|
123
124
|
*/
|
|
124
|
-
|
|
125
|
+
getTile(tile: Tile, serverSideSource: GetterOfOr<string> | undefined): number;
|
|
125
126
|
/**
|
|
126
127
|
* Returns the temperature on the tile of the given type. IE, some things can produce "cold", and some things can produce "heat",
|
|
127
128
|
* and both of them are cached per-tile.
|
|
@@ -89,7 +89,7 @@ export default class Tile implements IVector4, Partial<ITileContainer>, IFieldOf
|
|
|
89
89
|
get point(): IVector3;
|
|
90
90
|
get description(): ITerrainDescription | undefined;
|
|
91
91
|
toString(): string;
|
|
92
|
-
getName(): Translation;
|
|
92
|
+
getName(includeCoordinates?: boolean): Translation;
|
|
93
93
|
get type(): TerrainType;
|
|
94
94
|
/**
|
|
95
95
|
* Use game.changeTile or game.removeTopTile when modifying tiles.
|
|
@@ -145,7 +145,14 @@ export default class Tile implements IVector4, Partial<ITileContainer>, IFieldOf
|
|
|
145
145
|
* Check is a tile is open
|
|
146
146
|
*/
|
|
147
147
|
get isOpenTile(): boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Gets the fire type of a fire on the tile if there is one
|
|
150
|
+
*/
|
|
148
151
|
get isOnFire(): FireType;
|
|
152
|
+
/**
|
|
153
|
+
* Gets the source of a fire on the tile if there is one
|
|
154
|
+
*/
|
|
155
|
+
get fireSource(): Doodad | TileEvent | Tile | Creature | undefined;
|
|
149
156
|
/**
|
|
150
157
|
* Check if the tile can be lit on fire (has terrain/doodad/items that are flammable)
|
|
151
158
|
*/
|
|
@@ -9,11 +9,12 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import EventEmitter from "event/EventEmitter";
|
|
12
|
+
import type { IIcon } from "game/inspection/InfoProvider";
|
|
12
13
|
import Dictionary from "language/Dictionary";
|
|
13
14
|
import Language from "language/Language";
|
|
14
15
|
import LanguageExtension from "language/LanguageExtension";
|
|
15
|
-
import Translation from "language/Translation";
|
|
16
16
|
import type TranslationsProvider from "language/TranslationsProvider";
|
|
17
|
+
import type { TranslationGenerator } from "ui/component/IComponent";
|
|
17
18
|
import type { IStringSection } from "utilities/string/Interpolator";
|
|
18
19
|
import { CaseStyle } from "utilities/string/Strings";
|
|
19
20
|
type ArticleRules = Array<[number | {
|
|
@@ -95,17 +96,12 @@ export default class LanguageManager extends EventEmitter.Host<ILanguageEvents>
|
|
|
95
96
|
private setDebug;
|
|
96
97
|
private debugFor;
|
|
97
98
|
private debugLog;
|
|
98
|
-
private readonly uiTranslationsToSelector;
|
|
99
|
-
private setup;
|
|
100
|
-
private addTranslateSelector;
|
|
101
|
-
private addTranslateSelectors;
|
|
102
99
|
private refreshUiTranslation;
|
|
103
100
|
}
|
|
104
|
-
export interface
|
|
105
|
-
selector: string
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
101
|
+
export interface ITranslationInjection {
|
|
102
|
+
selector: string;
|
|
103
|
+
translation: TranslationGenerator;
|
|
104
|
+
type?: "title" | "generic";
|
|
105
|
+
icon?: IIcon;
|
|
109
106
|
}
|
|
110
|
-
export type ISelectorArray = Record<number, ISelector>;
|
|
111
107
|
export {};
|
|
@@ -107,7 +107,7 @@ declare module Translation {
|
|
|
107
107
|
const misc: (entry: string | MiscTranslation) => TranslationImpl;
|
|
108
108
|
const skill: (entry: string | SkillType, color?: boolean) => TranslationImpl;
|
|
109
109
|
const milestone: (entry: string | Milestone, color?: boolean) => TranslationImpl;
|
|
110
|
-
const stat: (entry: string | Stat, color?: boolean) => TranslationImpl;
|
|
110
|
+
const stat: (entry: string | Stat, color?: boolean, ref?: boolean) => TranslationImpl;
|
|
111
111
|
const equipSlot: (entry: string | EquipType, type?: EquipSlotTranslation) => TranslationImpl;
|
|
112
112
|
const quality: (entry: string | Quality, color?: boolean) => TranslationImpl;
|
|
113
113
|
/**
|