@wayward/types 2.13.2-beta.dev.20230525.1 → 2.13.2-beta.dev.20230528.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.
@@ -46,6 +46,7 @@ export default abstract class Entity<DescriptionType = unknown, TypeType extends
46
46
  x: number;
47
47
  y: number;
48
48
  z: number;
49
+ private _data?;
49
50
  private _tags?;
50
51
  islandId: IslandId;
51
52
  preventRendering?: boolean;
@@ -111,6 +112,31 @@ export default abstract class Entity<DescriptionType = unknown, TypeType extends
111
112
  hasTag(tag: TagType): boolean;
112
113
  addTag(tag: TagType): void;
113
114
  removeTag(tag: TagType): void;
115
+ /**
116
+ * Check if a data was set
117
+ * @param key Data key
118
+ * @returns True if the data exists, false if it doesn't
119
+ */
120
+ hasData(key: string): boolean;
121
+ /**
122
+ * Sets a data
123
+ * @param key Data key
124
+ * @param value Data value
125
+ * @rturns The value
126
+ */
127
+ setData<T>(key: string, value: T): T;
128
+ /**
129
+ * Gets a data
130
+ * @param key Data key
131
+ * @returns Data value or undefined if it wasn't found
132
+ */
133
+ getData<T>(key: string): T | undefined;
134
+ /**
135
+ * Removes a data
136
+ * @param key Data key
137
+ * @returns True when the data is removed. False if the key wasn't set
138
+ */
139
+ removeData(key: string): boolean;
114
140
  abstract isValid(): boolean;
115
141
  get asEntity(): Entity<DescriptionType, TypeType, TagType>;
116
142
  get asEntityMovable(): EntityMovable<DescriptionType, TypeType, TagType> | undefined;
@@ -92,9 +92,6 @@ export interface ICausesStatusEffect {
92
92
  export interface ICausesDamage {
93
93
  damage?: number;
94
94
  }
95
- export declare enum Property {
96
- }
97
- export type IProperties = Map<Property, any>;
98
95
  export declare enum EntityType {
99
96
  Player = 0,
100
97
  Creature = 1,
@@ -12,7 +12,7 @@ import type { Events, IEventEmitter } from "event/EventEmitter";
12
12
  import type { IActionHandlerApi, IActionNotUsable, IActionUsable } from "game/entity/action/IAction";
13
13
  import { ActionType } from "game/entity/action/IAction";
14
14
  import Human from "game/entity/Human";
15
- import type { IEntityConstructorOptions, IProperties, Property } from "game/entity/IEntity";
15
+ import type { IEntityConstructorOptions } from "game/entity/IEntity";
16
16
  import { AiType, EntityType, MoveType, StatusType } from "game/entity/IEntity";
17
17
  import type { ICustomizations } from "game/entity/IHuman";
18
18
  import { EquipType } from "game/entity/IHuman";
@@ -52,7 +52,6 @@ export default abstract class NPC extends Human<NPCType> {
52
52
  ai: AiType;
53
53
  seen: number;
54
54
  weightCapacity: number;
55
- properties?: IProperties;
56
55
  talked?: Map<string, number>;
57
56
  interactions?: Map<string, Set<number>>;
58
57
  static getRegistrarId(): number;
@@ -179,13 +178,6 @@ export default abstract class NPC extends Human<NPCType> {
179
178
  get asNPC(): NPC;
180
179
  get asPlayer(): undefined;
181
180
  get asLocalPlayer(): undefined;
182
- /**
183
- * Properties system that is only used for merchants
184
- */
185
- hasProperty(property: Property): boolean;
186
- addProperty(property: Property, value: any): void;
187
- getProperty<T>(property: Property): T | undefined;
188
- removeProperty(property: Property): boolean;
189
181
  /**
190
182
  * Equip better things when available
191
183
  */
@@ -33,4 +33,5 @@ export default class ActionInspection extends Inspection<ActionId | undefined> {
33
33
  private getActionDiscovered;
34
34
  private getActionTier;
35
35
  private getActionUsability;
36
+ private getActionExample;
36
37
  }
@@ -112,6 +112,7 @@ export interface IIslandLoadOptions {
112
112
  * Set to true when the island load is happening for everyone eveywhere all at once
113
113
  */
114
114
  isSynced: boolean;
115
+ isTransient?: boolean;
115
116
  travelTime?: number;
116
117
  pauseAndShowLoadingScreen?: boolean;
117
118
  multiplayerLoadingDescription?: MultiplayerLoadingDescription;
@@ -169,6 +170,7 @@ export declare enum LiquidType {
169
170
  export declare const ISLAND_NAME_MAX_LENGTH = 32;
170
171
  export declare const DEFAULT_ISLAND_ID = "0,0";
171
172
  export declare const DEFAULT_ISLAND_MAP_SIZE = 512;
173
+ export declare const GENERIC_TRANSIENT_ISLAND_ID_START: IslandId;
172
174
  export declare const TRAVEL_ANIMATION_ISLAND_ID: IslandId;
173
175
  export interface IIslandPort {
174
176
  id: number;
@@ -189,3 +191,14 @@ export interface IMobCheck extends IVector3 {
189
191
  waterTiles?: number;
190
192
  voidTiles?: number;
191
193
  }
194
+ /**
195
+ * Allows choosing what to copy from the human.
196
+ * All options default to true
197
+ */
198
+ export interface ICopyHumanOptions {
199
+ human: Human;
200
+ copyCustomizations?: false;
201
+ copyItemsAndEquipment?: false;
202
+ copyStats?: false;
203
+ copyStatus?: false;
204
+ }
@@ -134,6 +134,7 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
134
134
  */
135
135
  get isActive(): boolean;
136
136
  get isDefaultIsland(): boolean;
137
+ get isTransient(): boolean;
137
138
  getDetails(): IIslandDetails;
138
139
  /**
139
140
  * Activates the island.
@@ -9,7 +9,7 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import type Human from "game/entity/Human";
12
- import type { IIslandLoadOptions, IslandId } from "game/island/IIsland";
12
+ import { type ICopyHumanOptions, type IIslandLoadOptions, type IslandId } from "game/island/IIsland";
13
13
  import type Island from "game/island/Island";
14
14
  import type { Direction } from "utilities/math/Direction";
15
15
  import type { IVector3 } from "utilities/math/IVector";
@@ -18,7 +18,8 @@ import type { IVector3 } from "utilities/math/IVector";
18
18
  */
19
19
  export declare class TransientIsland {
20
20
  readonly island: Island;
21
- static create(islandId: IslandId, islandOptions?: Partial<IIslandLoadOptions>): Promise<TransientIsland>;
21
+ static createIslandId(): IslandId;
22
+ static create(islandId?: IslandId, islandOptions?: Partial<IIslandLoadOptions>): Promise<TransientIsland>;
22
23
  private deleted;
23
24
  private constructor();
24
25
  delete(): void;
@@ -26,8 +27,8 @@ export declare class TransientIsland {
26
27
  * Creates a human you can do stuff with
27
28
  * @param spawnPoint Spawn point. Set to undefined to use the default island spawn point
28
29
  * @param facingDirection Direction they should face when spawing
29
- * @param copyFromHuman Human object to copy customizations, items, and vehicles from
30
+ * @param copyFromHumanOptions Human object to copy customizations, items, and vehicles from
30
31
  * @returns Human
31
32
  */
32
- createHuman(spawnPoint?: IVector3, facingDirection?: Direction.Cardinal, copyFromHuman?: Human): Human;
33
+ createHuman(spawnPoint?: IVector3, facingDirection?: Direction.Cardinal, copyFromHumanOptions?: ICopyHumanOptions): Human;
33
34
  }
@@ -0,0 +1,28 @@
1
+ /*!
2
+ * Copyright 2011-2023 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 Human from "game/entity/Human";
12
+ import type { AutomationStep } from "game/island/automation/AutomationStep";
13
+ import type { IAutomationInitialState } from "game/island/automation/IAutomation";
14
+ export declare class Automation {
15
+ private running;
16
+ private repeat;
17
+ private repeatDelay;
18
+ private initialState;
19
+ private readonly steps;
20
+ private readonly resetSteps;
21
+ setRepeat(repeat: boolean, delay?: number): this;
22
+ setInitialState(initialState: IAutomationInitialState): this;
23
+ addStep(step: AutomationStep): this;
24
+ start(human: Human): Promise<void>;
25
+ stop(): void;
26
+ private execute;
27
+ private reset;
28
+ }
@@ -0,0 +1,14 @@
1
+ /*!
2
+ * Copyright 2011-2023 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 { IAutomationContextState } from "game/island/automation/IAutomation";
12
+ export declare abstract class AutomationStep {
13
+ abstract execute(context: IAutomationContextState): Promise<void>;
14
+ }
@@ -0,0 +1,29 @@
1
+ /*!
2
+ * Copyright 2011-2023 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 Human from "game/entity/Human";
12
+ import type { IslandId } from "game/island/IIsland";
13
+ import type { ItemType, ItemTypeGroup } from "game/item/IItem";
14
+ import type Item from "game/item/Item";
15
+ export interface IAutomationInitialState {
16
+ items?: Array<ItemType | ItemTypeGroup>;
17
+ /**
18
+ * Delay before executing steps
19
+ */
20
+ delay?: number;
21
+ }
22
+ export interface IAutomationContextState {
23
+ human: Human;
24
+ islandId: IslandId;
25
+ /**
26
+ * Items created via initial state
27
+ */
28
+ items: Item[];
29
+ }
@@ -0,0 +1,20 @@
1
+ /*!
2
+ * Copyright 2011-2023 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 { ActionArguments, AnyActionDescription } from "game/entity/action/IAction";
12
+ import { AutomationStep } from "game/island/automation/AutomationStep";
13
+ import type { IAutomationContextState } from "game/island/automation/IAutomation";
14
+ export type GetActionArguments<T extends AnyActionDescription, AV = ActionArguments<T>> = AV | ((context: IAutomationContextState) => Promise<AV>);
15
+ export declare class ExecuteActionStep<T extends AnyActionDescription> extends AutomationStep {
16
+ private readonly action;
17
+ private readonly args;
18
+ constructor(action: T, args: GetActionArguments<T>);
19
+ execute(context: IAutomationContextState): Promise<void>;
20
+ }
@@ -344,6 +344,10 @@ export interface IItemBuild {
344
344
  * When defined, allows the build to work only on these tile types
345
345
  */
346
346
  allowedTileTypes?: Set<TerrainType>;
347
+ /**
348
+ * Skill to gain 0.1 of when building the item
349
+ */
350
+ skillGain?: SkillType;
347
351
  }
348
352
  export interface ISummon {
349
353
  /**
@@ -1567,7 +1571,7 @@ export declare enum ItemTypeGroup {
1567
1571
  Spine = 892,
1568
1572
  Spores = 893,
1569
1573
  Stick = 894,
1570
- NotForSale = 895,
1574
+ NotStockedOnMerchants = 895,
1571
1575
  ContainerOfSwampWater = 896,
1572
1576
  ContainerOfFilteredWater = 897,
1573
1577
  Sundial = 898,
@@ -154,6 +154,7 @@ export interface IGameOptions {
154
154
  */
155
155
  decayMultiplier: number;
156
156
  };
157
+ randomEvents: boolean;
157
158
  }
158
159
  export declare enum UnlockedRecipesStrategy {
159
160
  StartWithNone = 0,
@@ -258,6 +258,11 @@ export default class Tile implements IVector4, Partial<ITileContainer>, IFieldOf
258
258
  * @returns True if it created a lava passage
259
259
  */
260
260
  makeLavaPassage(source: Human | undefined): boolean;
261
+ /**
262
+ * Checks if another cave entrance is nearby.
263
+ * @returns True if it created cave entrances
264
+ */
265
+ isCaveEntranceNearby(): boolean;
261
266
  /**
262
267
  * Used to genererate and find appropriate cave entrances
263
268
  * @returns True if it created cave entrances
@@ -68,6 +68,7 @@ export default class TranslationImpl implements Omit<ISerializable, "deserialize
68
68
  withSegments(...segments: ISegment[]): this;
69
69
  withSegments(priority: true, ...segments: ISegment[]): this;
70
70
  withTooltip(tooltip?: Falsy | ITooltipSection["tooltip"]): this;
71
+ getReference(): Reference | undefined;
71
72
  setReference(reference?: Reference | Referenceable): this;
72
73
  addArgs(...args: TranslationArg[]): this;
73
74
  inContext(context?: TextContext, normalize?: boolean): this;
@@ -105,24 +105,25 @@ export declare enum ModRegistrationType {
105
105
  NPC = 32,
106
106
  OptionsSection = 33,
107
107
  Overlay = 34,
108
- Packet = 35,
109
- Prompt = 36,
110
- QuadrantComponent = 37,
111
- Quest = 38,
112
- QuestRequirement = 39,
113
- Registry = 40,
114
- Skill = 41,
115
- SoundEffect = 42,
116
- Stat = 43,
117
- StatusEffect = 44,
118
- Terrain = 45,
119
- TerrainDecoration = 46,
120
- TileEvent = 47,
121
- TileLayerType = 48,
122
- UsableActions = 49,
123
- UsableActionType = 50,
124
- UsableActionTypePlaceholder = 51,
125
- WorldLayer = 52
108
+ Override = 35,
109
+ Packet = 36,
110
+ Prompt = 37,
111
+ QuadrantComponent = 38,
112
+ Quest = 39,
113
+ QuestRequirement = 40,
114
+ Registry = 41,
115
+ Skill = 42,
116
+ SoundEffect = 43,
117
+ Stat = 44,
118
+ StatusEffect = 45,
119
+ Terrain = 46,
120
+ TerrainDecoration = 47,
121
+ TileEvent = 48,
122
+ TileLayerType = 49,
123
+ UsableActions = 50,
124
+ UsableActionType = 51,
125
+ UsableActionTypePlaceholder = 52,
126
+ WorldLayer = 53
126
127
  }
127
128
  export interface ILanguageRegistration extends IBaseModRegistration {
128
129
  type: ModRegistrationType.Language;
@@ -375,10 +376,19 @@ export interface IEntityTagRegistration extends IBaseModRegistration {
375
376
  type: ModRegistrationType.EntityTag;
376
377
  name: string;
377
378
  }
379
+ export interface IOverrideDescription<OBJECT extends object, PROPERTY extends keyof OBJECT> {
380
+ object: OBJECT;
381
+ property: PROPERTY;
382
+ value: OBJECT[PROPERTY];
383
+ }
384
+ export interface IOverrideRegistration<OBJECT extends object, PROPERTY extends keyof OBJECT> extends IBaseModRegistration {
385
+ type: ModRegistrationType.Override;
386
+ overrider: () => IOverrideDescription<OBJECT, PROPERTY>;
387
+ }
378
388
  export interface IInheritsRegistrationTime {
379
389
  useRegistrationTime: ModRegistrationType;
380
390
  }
381
- export type ModRegistration = IActionRegistration | IBindableRegistration | IBiomeRegistration | IBulkRegistration | ICommandRegistration | ICreatureRegistration | IDialogRegistration | IDictionaryRegistration | IDoodadGroupRegistration | IDoodadRegistration | IDoodadTagRegistration | IEntityTagRegistration | IHelpArticleRegistration | IInspectionTypeRegistration | IInterModRegistration | IInterModRegistryRegistration | IInterruptChoiceRegistration | IInterruptRegistration | IItemGroupRegistration | IItemRegistration | IItemTagRegistration | ILanguageExtensionRegistration | ILanguageRegistration | ILoadRegistration | IMagicalPropertyRegistration | IMenuBarButtonRegistration | IMessageRegistration | IMessageSourceRegistration | IMusicTrackRegistration | INoteRegistration | INPCRegistration | IOptionsSectionRegistration | IOverlayRegistration | IPacketRegistration | IPromptRegistration | IQuadrantComponentRegistration | IQuestRegistration | IQuestRequirementRegistration | IRegistryRegistration | ISkillRegistration | ISoundEffectRegistration | IStatRegistration | IStatusEffectRegistration | ITerrainDecorationRegistration | ITerrainRegistration | ITileEventRegistration | ITileLayerTypeRegistration | IUsableActionsRegistration | IUsableActionTypePlaceholderRegistration | IUsableActionTypeRegistration;
391
+ export type ModRegistration = IActionRegistration | IBindableRegistration | IBiomeRegistration | IBulkRegistration | ICommandRegistration | ICreatureRegistration | IDialogRegistration | IDictionaryRegistration | IDoodadGroupRegistration | IDoodadRegistration | IDoodadTagRegistration | IEntityTagRegistration | IHelpArticleRegistration | IInspectionTypeRegistration | IInterModRegistration | IInterModRegistryRegistration | IInterruptChoiceRegistration | IInterruptRegistration | IItemGroupRegistration | IItemRegistration | IItemTagRegistration | ILanguageExtensionRegistration | ILanguageRegistration | ILoadRegistration | IMagicalPropertyRegistration | IMenuBarButtonRegistration | IMessageRegistration | IMessageSourceRegistration | IMusicTrackRegistration | INoteRegistration | INPCRegistration | IOptionsSectionRegistration | IOverlayRegistration | IOverrideRegistration<any, any> | IPacketRegistration | IPromptRegistration | IQuadrantComponentRegistration | IQuestRegistration | IQuestRequirementRegistration | IRegistryRegistration | ISkillRegistration | ISoundEffectRegistration | IStatRegistration | IStatusEffectRegistration | ITerrainDecorationRegistration | ITerrainRegistration | ITileEventRegistration | ITileLayerTypeRegistration | IUsableActionsRegistration | IUsableActionTypePlaceholderRegistration | IUsableActionTypeRegistration;
382
392
  export declare const SYMBOL_SUPER_REGISTRY: unique symbol;
383
393
  declare module Register {
384
394
  /**
@@ -695,6 +705,23 @@ declare module Register {
695
705
  export function usableActionTypePlaceholder(name: string): <K extends string | number | symbol, T extends Record<K, UsableActionType>>(target: T, key: K) => void;
696
706
  export function interModRegistry<V>(name: string): <K extends string | number | symbol, T extends Record<K, InterModRegistry<V>>>(target: T, key: K) => void;
697
707
  export function interModRegistration<V>(modName: string, registryName: string, value: V): <K extends string | number | symbol, T extends Record<K, InterModRegistration<V>>>(target: T, key: K) => void;
708
+ /**
709
+ * Register custom values that will replace default values in a vanilla object.
710
+ *
711
+ * For example, say you want to change the number of planks to dismantle from a log from 2 to 4. That would look like this:
712
+ * ```ts
713
+ * @Register.override(() => ({
714
+ * object: itemDescriptions[ItemType.Log].dismantle!,
715
+ * property: "items",
716
+ * value: [
717
+ * { type: ItemType.TreeBark, amount: 2 },
718
+ * { type: ItemType.WoodenPlank, amount: 4 }
719
+ * ],
720
+ * }))
721
+ * public itemDescriptionLogDismantle: IDismantleDescription;
722
+ * ```
723
+ */
724
+ export function override<OBJECT extends object, PROPERTY extends keyof OBJECT>(overrider: () => IOverrideDescription<OBJECT, PROPERTY>): <K extends string | number | symbol, T extends Record<K, OBJECT>>(target: T, key: K) => void;
698
725
  type ExtractRegisteredType<F> = F extends (...args: any) => infer F2 ? F2 extends (t: infer T, k: infer K) => any ? T[Extract<K, keyof T>] : never : never;
699
726
  /**
700
727
  * Registers any number of registrations of a single type. Any other registration type can be used.
@@ -63,61 +63,62 @@ export declare enum RenderSource {
63
63
  ActionsMenu = 1,
64
64
  AmbientLightLevelUpdate = 2,
65
65
  AttackAnimationStart = 3,
66
- DoodadChangeType = 4,
67
- FadeIn = 5,
68
- FovTransition = 6,
69
- FovUpdate = 7,
70
- FovUpdateRadius = 8,
71
- GameAnimating = 9,
72
- GamePassTurn = 10,
73
- GameResumed = 11,
74
- GameTick = 12,
75
- GenericOverlay = 13,
76
- HiddenMob = 14,
77
- HumanRest = 15,
78
- HumanRestStart = 16,
79
- HumanRestStop = 17,
80
- HumanSetPosition = 18,
81
- HumanVehicle = 19,
82
- InspectOverlay = 20,
83
- IslandLoad = 21,
84
- IslandTravel = 22,
85
- ItemEquip = 23,
86
- ItemEquipEffect = 24,
87
- ItemMovement = 25,
88
- ItemUnequip = 26,
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
66
+ Automation = 4,
67
+ DoodadChangeType = 5,
68
+ FadeIn = 6,
69
+ FovTransition = 7,
70
+ FovUpdate = 8,
71
+ FovUpdateRadius = 9,
72
+ GameAnimating = 10,
73
+ GamePassTurn = 11,
74
+ GameResumed = 12,
75
+ GameTick = 13,
76
+ GenericOverlay = 14,
77
+ HiddenMob = 15,
78
+ HumanRest = 16,
79
+ HumanRestStart = 17,
80
+ HumanRestStop = 18,
81
+ HumanSetPosition = 19,
82
+ HumanVehicle = 20,
83
+ InspectOverlay = 21,
84
+ IslandLoad = 22,
85
+ IslandTravel = 23,
86
+ ItemEquip = 24,
87
+ ItemEquipEffect = 25,
88
+ ItemMovement = 26,
89
+ ItemUnequip = 27,
90
+ Mod = 28,
91
+ MovementPlayerPost = 29,
92
+ MovementPlayerZPost = 30,
93
+ MultiplayerDisconnect = 31,
94
+ Notifier = 32,
95
+ NotifierAddCreature = 33,
96
+ NotifierAddItem = 34,
97
+ NotifierAddNotifierIcon = 35,
98
+ NotifierAddStat = 36,
99
+ NotifierAddStatusType = 37,
100
+ OptionEquipment = 38,
101
+ OptionVisionMode = 39,
102
+ OptionZoomLevel = 40,
103
+ Particles = 41,
104
+ PlayerAdd = 42,
105
+ PlayerKill = 43,
106
+ PlayerNoclip = 44,
107
+ PlayerProcessMovement = 45,
108
+ PlayerReady = 46,
109
+ PlayerRemove = 47,
110
+ PlayerRespawn = 48,
111
+ PlayerWalkToTilePath = 49,
112
+ PlayerWalkToTilePathOverburdened = 50,
113
+ PlayerWalkToTilePathPreview = 51,
114
+ PlayerWalkToTilePathReset = 52,
115
+ Resize = 53,
116
+ SetupGl = 54,
117
+ SpawnAnimationStart = 55,
118
+ StartGame = 56,
119
+ Steamworks = 57,
120
+ Thumbnail = 58,
121
+ WorldLayerRendererFlush = 59
121
122
  }
122
123
  export declare function calculateAmbientLightLevel(origin: IFieldOfViewOrigin, z: number): number;
123
124
  export declare const ZOOM_LEVEL_MIN = 1;
@@ -14,7 +14,7 @@ export default class ByteGrid implements IByteGrid {
14
14
  readonly height: number;
15
15
  readonly size: number;
16
16
  readonly data: Uint8Array;
17
- constructor(width: number, height?: number);
17
+ constructor(width: number, height: number);
18
18
  get(x: number, y: number): number;
19
19
  set(x: number, y: number, value: number): void;
20
20
  rawSet(i: number, value: number): void;
@@ -0,0 +1,29 @@
1
+ /*!
2
+ * Copyright 2011-2023 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 { IIslandTemplate } from "game/IGame";
12
+ import type { Automation } from "game/island/automation/Automation";
13
+ import Component from "ui/component/Component";
14
+ export default class TransientIslandComponent extends Component {
15
+ private readonly template;
16
+ private readonly automation?;
17
+ private canvas?;
18
+ private renderer?;
19
+ private transientIsland?;
20
+ private transientHuman?;
21
+ private readonly zoomLevel;
22
+ constructor(template: IIslandTemplate, automation?: Automation | undefined);
23
+ protected onAppend(): void;
24
+ protected onDispose(): void;
25
+ initialize(template: IIslandTemplate): Promise<void>;
26
+ private createViewport;
27
+ private resize;
28
+ private rerender;
29
+ }
@@ -44,7 +44,7 @@ export default abstract class Screen extends Component {
44
44
  removeBackground(): this;
45
45
  hasContextMenu(): boolean;
46
46
  getPartialContextMenuMacros(): Macros.IBindableMatch | undefined;
47
- hasPartialContextMenuMacro(api: IBindHandlerApi, macroMatch?: Macros.IBindableMatch): boolean;
47
+ hasPartialContextMenuMacro(api?: Pick<IBindHandlerApi, "input">, macroMatch?: Macros.IBindableMatch): boolean;
48
48
  /**
49
49
  * Remove the context menu from this element
50
50
  */
@@ -12,7 +12,7 @@ import type { Source } from "game/entity/player/IMessageManager";
12
12
  import { ThreeStateButtonState } from "ui/component/IThreeStateButton";
13
13
  export declare const DEFAULT_MAX_MESSAGES = 15;
14
14
  export declare const MESSAGES_MAX_PINNED = 3;
15
- export type IFilters = Record<string, IFilter>;
15
+ export type IFilters = PartialRecord<string, IFilter>;
16
16
  export type IFilter = {
17
17
  -readonly [K in keyof typeof Source]?: ThreeStateButtonState;
18
18
  };
@@ -35,7 +35,8 @@ export default class MovementHandler extends EventEmitter.Host<IMovementHandlerE
35
35
  protected onPlayerDamage(_: any, damageInfo: IDamageInfo): void;
36
36
  protected onPlayerDeath(): void;
37
37
  protected onFaceDown(api: IBindHandlerApi): boolean;
38
- protected onFaceDirection(api: IBindHandlerApi): boolean;
38
+ faceTowardsMouse(api?: Pick<IBindHandlerApi, "mouse">): void;
39
+ protected onFaceDirection(api?: Pick<IBindHandlerApi, "mouse" | "input">): boolean;
39
40
  protected onIdle(api: IBindHandlerApi): boolean;
40
41
  protected onMoveToTile(api: IBindHandlerApi): boolean;
41
42
  protected onMove(api: IBindHandlerApi): boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wayward/types",
3
3
  "description": "TypeScript declarations for Wayward, used for modding.",
4
- "version": "2.13.2-beta.dev.20230525.1",
4
+ "version": "2.13.2-beta.dev.20230528.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",