@wayward/types 2.13.2-beta.dev.20230522.1 → 2.13.2-beta.dev.20230525.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/README.md CHANGED
@@ -1,11 +1,27 @@
1
- # Wayward Types
1
+ # [Wayward Modding Guide](https://github.com/WaywardGame/types/wiki)
2
+ Learn how to mod Wayward.
2
3
 
3
- TypeScript declarations used for modding Wayward.
4
+ ## **[➡ New Modders Start Here! ⬅](https://github.com/WaywardGame/types/wiki)**
4
5
 
5
- ## Usage
6
+ ## Documentation
7
+ - [`+mod create` & `+mod update`](https://github.com/WaywardGame/types/wiki/mod-create-&-update) — Documentation on the commands used to generate starter files for modding, and updating script mods.
8
+ - [`mod.json`](https://github.com/WaywardGame/types/wiki/mod.json) — Documentation on what all can be declared in the main mod metadata file.
9
+ - [Extracting assets](https://github.com/WaywardGame/types/wiki/Extracting-Wayward-Assets) — A guide on extracting textures, sounds, and more from Wayward.
6
10
 
7
- Visit the [Wiki](https://github.com/WaywardGame/types/wiki/mod-create-&-update) of this repository for more information on `+mod create` to create mods and `+mod update` to update preexisting mods.
11
+ ## Mod Content
12
+ - [Scripts](https://github.com/WaywardGame/types/wiki/Script-Mods) — Create mods that change the functionality of the game, or add new content
13
+ - [Languages & Extensions](https://github.com/WaywardGame/types/wiki/Languages-&-Extensions) — Adding new languages to Wayward, or adding translatable strings to mods.
14
+ - [Customizations](https://github.com/WaywardGame/types/wiki/Customizations) — Adding new hair styles, hair colours, and skin tones
15
+ - [Image Overrides](https://github.com/WaywardGame/types/wiki/Image-Overrides) — Replacing default sprites & textures
16
+ - [Stylesheets](https://github.com/WaywardGame/types/wiki/Stylesheets) — Changing the appearance of the UI
8
17
 
9
- ## Documentation
18
+ # Other Useful Links
19
+
20
+ ## [Wayward Types Viewer](https://waywardgame.github.io/)
21
+ A pretty, searchable list of all the type definitions in Wayward. This `types` repository is actually the same stuff you can find on this website, but it's the *raw* form of it!
22
+
23
+ ## [Modding Examples](https://github.com/WaywardGame)
24
+ Every official mod created for Wayward, and some other Wayward-related projects.
10
25
 
11
- Visit [waywardgame.github.io](https://waywardgame.github.io/) for documentation and an organized view of these types.
26
+ ## [Steam Workshop](http://steamcommunity.com/app/379210/workshop/)
27
+ Where Wayward mods are published.
@@ -420,7 +420,7 @@ export declare enum DoodadTag {
420
420
  * All tree types that can be spawned during map gen
421
421
  * !! This must be kept in sync with the tree list in setupTiles !!
422
422
  */
423
- export type MapGenDoodadTrees = DoodadType.MapleTree | DoodadType.CoconutTree | DoodadType.JoshuaTree | DoodadType.SpruceTree | DoodadType.CypressTree | DoodadType.AppleTree | DoodadType.SpruceTreeWithSnow | DoodadType.WhitePineTree | DoodadType.WhitePineTreeWithSnow | DoodadType.PapayaTree | DoodadType.Palapalai | DoodadType.ButtonMushrooms | DoodadType.PoisonIvy | DoodadType.Cattails;
423
+ export type MapGenDoodadTrees = DoodadType.MapleTree | DoodadType.CoconutTree | DoodadType.JoshuaTree | DoodadType.SpruceTree | DoodadType.CypressTree | DoodadType.AppleTree | DoodadType.SpruceTreeWithSnow | DoodadType.WhitePineTree | DoodadType.WhitePineTreeWithSnow | DoodadType.PapayaTree | DoodadType.Palapalai | DoodadType.ButtonMushrooms | DoodadType.PoisonIvy | DoodadType.Cattails | DoodadType.FlyAmanita;
424
424
  export declare enum DoodadTypeGroup {
425
425
  Invalid = 400,
426
426
  LitCampfire = 401,
@@ -103,6 +103,7 @@ export interface IPlayerEvents extends Events<Human> {
103
103
  * @param isAbsentPlayer True if the player is absent
104
104
  */
105
105
  idChanged(currentId: number, newId: number, isAbsentPlayer: boolean): any;
106
+ updateCraftTable(): any;
106
107
  }
107
108
  export declare enum TurnTypeFlag {
108
109
  CheckUnderPlayer = 1,
@@ -67,7 +67,7 @@ export interface IIcon {
67
67
  height: number;
68
68
  imageWidth?: number;
69
69
  imageHeight?: number;
70
- scale?: number;
70
+ scale?: string | number;
71
71
  }
72
72
  export interface ISerializedIcon extends IIcon {
73
73
  path: string | ISerializedImagePath;
@@ -140,6 +140,11 @@ export interface IWell {
140
140
  export interface IWaterFill {
141
141
  count: number;
142
142
  tiles: Record<number, Record<number, boolean>>;
143
+ tile?: Tile;
144
+ }
145
+ export interface IWaterFillReturn {
146
+ count: number;
147
+ tile?: Tile;
143
148
  }
144
149
  export interface IWaterContamination {
145
150
  x: number;
@@ -24,7 +24,7 @@ import type { IDamageInfo, IDamageOutcome, IDamageOutcomeInput } from "game/enti
24
24
  import CorpseManager from "game/entity/creature/corpse/CorpseManager";
25
25
  import FlowFieldManager from "game/entity/flowfield/FlowFieldManager";
26
26
  import NPCManager from "game/entity/npc/NPCManager";
27
- import type { IIslandEvents, IIslandLoadOptions, IMobCheck, ISeeds, IWaterContamination, IWaterFill, IWell, IslandId } from "game/island/IIsland";
27
+ import type { IIslandEvents, IIslandLoadOptions, IMobCheck, ISeeds, IWaterContamination, IWaterFill, IWaterFillReturn, IWell, IslandId } from "game/island/IIsland";
28
28
  import { WaterType } from "game/island/IIsland";
29
29
  import { PortManager } from "game/island/Port";
30
30
  import type { ILiquidGather } from "game/item/IItem";
@@ -109,6 +109,7 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
109
109
  readonly id: IslandId;
110
110
  readonly mapSizeSq: number;
111
111
  spawnPoint: IVector3;
112
+ private _activated;
112
113
  private _loadedReferences;
113
114
  private _tiles;
114
115
  modifiersCollection?: IslandModifiersCollection;
@@ -134,8 +135,20 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
134
135
  get isActive(): boolean;
135
136
  get isDefaultIsland(): boolean;
136
137
  getDetails(): IIslandDetails;
137
- onActivated(): void;
138
- onDeactivated(): void;
138
+ /**
139
+ * Activates the island.
140
+ * Islands should be activated when a player is going to load onto it
141
+ */
142
+ private activate;
143
+ /**
144
+ * Runs some logic while ensuring the island is activated
145
+ */
146
+ private runWhileActivated;
147
+ /**
148
+ * Deactivates the island.
149
+ * Islands should be deactivated when the last player leaves it or when it's being unloaded.
150
+ */
151
+ private deactivate;
139
152
  private gameOptionsCached?;
140
153
  getGameOptions(): IGameOptions;
141
154
  clearGameOptionsCache(): void;
@@ -199,7 +212,7 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
199
212
  /**
200
213
  * Check the amount of water tiles there is connected to a supplied x/y area
201
214
  */
202
- checkWaterFill(tile: Tile, needed: number, waterType: WaterType, waterFill?: IWaterFill): number;
215
+ checkWaterFill(tile: Tile, needed: number, waterType: WaterType, waterFill?: IWaterFill): IWaterFillReturn;
203
216
  getSpawnPoint(): Tile;
204
217
  getSuitableSpawnPoint(): Tile;
205
218
  calculateDamageOutcome(input: IDamageOutcomeInput): IDamageOutcome | undefined;
@@ -183,7 +183,8 @@ export declare enum TileTemplateType {
183
183
  StoneHouses = 12,
184
184
  Railways = 13,
185
185
  GraniteLighthouse = 14,
186
- BasaltLighthouse = 15
186
+ BasaltLighthouse = 15,
187
+ FairyRings = 16
187
188
  }
188
189
  export interface ITemplate {
189
190
  mapTile?: MapTile;
@@ -110,7 +110,11 @@ export default class Tile implements IVector4, Partial<ITileContainer>, IFieldOf
110
110
  get variation(): number;
111
111
  get isMapEdge(): boolean;
112
112
  /**
113
- * Check if this Tile containers some items
113
+ * Check if this tile is Void type
114
+ */
115
+ get isVoid(): boolean;
116
+ /**
117
+ * Check if this tile contains some items
114
118
  */
115
119
  get hasTileContainer(): boolean;
116
120
  /**
@@ -768,107 +768,105 @@ declare enum UiTranslation {
768
768
  MenuMultiplayerOptionsCheckConnectionResultSteamRelayNetwork = 753,
769
769
  MenuMultiplayerOptionsCheckConnectionResultSteamRelayNetworkFail = 754,
770
770
  MenuMultiplayerOptionsCheckConnectionResultSteamRelayNetworkUnavailable = 755,
771
- MenuMultiplayerOptionsCheckConnectionResultWebRTC = 756,
772
- MenuMultiplayerOptionsCheckConnectionResultWebRTCFail = 757,
773
- MenuMultiplayerOptionsCheckConnectionResultWebSocket = 758,
774
- MenuMultiplayerOptionsCheckConnectionResultWebSocketFail = 759,
775
- MenuMultiplayerOptionsCheckConnectionResultWebSocketUnavailable = 760,
776
- MenuMultiplayerOptionsCheckConnectionResultSuccess = 761,
777
- MenuJoinServerTitle = 762,
778
- MenuJoinServerDescription = 763,
779
- MenuJoinServerInputPlaceholder = 764,
780
- MenuJoinServerChooseModifiersTitle = 765,
781
- MenuJoinServerChooseModifiersDescription = 766,
782
- MenuSharedMultiplayerChoiceLobbyTypeFriends = 767,
783
- MenuSharedMultiplayerChoiceLobbyTypeFriendsDescription = 768,
784
- MenuSharedMultiplayerChoiceLobbyTypePublic = 769,
785
- MenuSharedMultiplayerChoiceLobbyTypePublicDescription = 770,
786
- MenuSharedMultiplayerChoiceLobbyTypePrivate = 771,
787
- MenuSharedMultiplayerChoiceLobbyTypePrivateDescription = 772,
788
- MenuSharedMultiplayerChoicePVP = 773,
789
- MenuSharedMultiplayerChoicePVPDescription = 774,
790
- MenuSharedMultiplayerChoiceAllowTraveling = 775,
791
- MenuSharedMultiplayerChoiceAllowTravelingDescription = 776,
792
- MenuSharedMultiplayerChoiceAllowHardcoreRespawns = 777,
793
- MenuSharedMultiplayerChoiceAllowHardcoreRespawnsDescription = 778,
794
- MenuSharedMultiplayerDescription = 779,
795
- MenuSharedMultiplayerMessageOfTheDay = 780,
796
- MenuSharedMultiplayerMaxPlayers = 781,
797
- MenuSharedRealTimeTickSpeedTooltip = 782,
798
- MenuSharedRealTimeTickSpeedLabel = 783,
799
- MenuSharedMaxTravelTimeLabel = 784,
800
- MenuSharedMaxTravelTimeLabelTooltip = 785,
801
- MenuSharedButtonDefault = 786,
802
- MenuSharedValueSeconds = 787,
803
- MenuSharedValueMillseconds = 788,
804
- MenuSharedValueTurns = 789,
805
- MenuSharedValuePercentage = 790,
806
- MenuSharedMilestonesNotUnlockable = 791,
807
- MenuSharedMilestonesNotUnlockableDescription = 792,
808
- MenuSharedMilestonesNotUnlockableButtonShowMods = 793,
809
- MenuSharedButtonDisableAll = 794,
810
- MenuSharedButtonEnableAll = 795,
811
- MenuSharedMilestoneModifiersSelected = 796,
812
- MiscSortBy = 797,
813
- MiscSortDirection = 798,
814
- MiscFilter = 799,
815
- MiscPlayerNameDefault = 800,
816
- MiscPlayerNameServer = 801,
817
- MiscSaveNameDefault = 802,
818
- MiscSaveNameDailyChallenge = 803,
819
- MiscSaveNameChallenge = 804,
820
- MiscSaveVersionUnknown = 805,
821
- MiscVersion = 806,
822
- MiscVersionBuildInfoTooltip = 807,
823
- MiscVersionUpdate = 808,
824
- MiscTime = 809,
825
- MiscTimeMeridiem = 810,
826
- MiscError = 811,
827
- MiscContextMenuCopyTooltip = 812,
828
- MiscBindableNoBindings = 813,
829
- DifficultyOptionsPeaceful = 814,
830
- DifficultyOptionsAberrantSpawnsDisabled = 815,
831
- DifficultyOptionsAberrantSpawnsOnly = 816,
832
- DifficultyOptionsCreatureSpawningDisabled = 817,
833
- DifficultyOptionsCreatureAlwaysSpawns = 818,
834
- DifficultyOptionsCreatureSpawnsDefault = 819,
835
- DifficultyOptionsCreatureSpawnsAberrantOnly = 820,
836
- DifficultyOptionsCreatureSpawnsNoAberrants = 821,
837
- DifficultyOptionsSpawnLimit = 822,
838
- DifficultyOptionsRespawn = 823,
839
- DifficultyOptionsEternalNight = 824,
840
- DifficultyOptionsEternalDay = 825,
841
- DifficultyOptionsTimeInitial = 826,
842
- DifficultyOptionsTimeFrozen = 827,
843
- DifficultyOptionsTimeDayLength = 828,
844
- DifficultyOptionsTimeDayPercent = 829,
845
- DifficultyOptionsNoItems = 830,
846
- DifficultyOptionsRecipes = 831,
847
- DifficultyOptionsStartingIsland = 832,
848
- DifficultyOptionsTravelingEffectsDisabled = 833,
849
- DifficultyOptionsBenignityInitial = 834,
850
- DifficultyOptionsBenignityMultiplier = 835,
851
- DifficultyOptionsMalignityInitial = 836,
852
- DifficultyOptionsMalignityMultiplier = 837,
853
- DifficultyOptionsWeightBonus = 838,
854
- DifficultyOptionsStatInitial = 839,
855
- DifficultyOptionsStatMax = 840,
856
- DifficultyOptionsStatMultiplier = 841,
857
- DifficultyOptionsStatusEffectStartWith = 842,
858
- DifficultyOptionsStatusEffectUntreatable = 843,
859
- DifficultyOptionsStatusEffectPassChanceMultiplier = 844,
860
- DifficultyOptionsNoRandomSkills = 845,
861
- DifficultyOptionsSkillStartingCount = 846,
862
- DifficultyOptionsSkillGainMultiplier = 847,
863
- DifficultyOptionsSkillInitial = 848,
864
- DifficultyOptionsStatusEffectPermanent = 849,
865
- DifficultyOptionsStatusEffectRateMultiplier = 850,
866
- DifficultyOptionsStatusEffectMultiplier = 851,
867
- DifficultyOptionsItemDurabilityMultiplier = 852,
868
- DifficultyOptionsItemDecayMultiplier = 853,
869
- TabCrafting = 854,
870
- TabDismantle = 855,
871
- WindowTitleContainer = 856,
872
- WindowTitleInventory = 857
771
+ MenuMultiplayerOptionsCheckConnectionResultWebSocket = 756,
772
+ MenuMultiplayerOptionsCheckConnectionResultWebSocketFail = 757,
773
+ MenuMultiplayerOptionsCheckConnectionResultWebSocketUnavailable = 758,
774
+ MenuMultiplayerOptionsCheckConnectionResultSuccess = 759,
775
+ MenuJoinServerTitle = 760,
776
+ MenuJoinServerDescription = 761,
777
+ MenuJoinServerInputPlaceholder = 762,
778
+ MenuJoinServerChooseModifiersTitle = 763,
779
+ MenuJoinServerChooseModifiersDescription = 764,
780
+ MenuSharedMultiplayerChoiceLobbyTypeFriends = 765,
781
+ MenuSharedMultiplayerChoiceLobbyTypeFriendsDescription = 766,
782
+ MenuSharedMultiplayerChoiceLobbyTypePublic = 767,
783
+ MenuSharedMultiplayerChoiceLobbyTypePublicDescription = 768,
784
+ MenuSharedMultiplayerChoiceLobbyTypePrivate = 769,
785
+ MenuSharedMultiplayerChoiceLobbyTypePrivateDescription = 770,
786
+ MenuSharedMultiplayerChoicePVP = 771,
787
+ MenuSharedMultiplayerChoicePVPDescription = 772,
788
+ MenuSharedMultiplayerChoiceAllowTraveling = 773,
789
+ MenuSharedMultiplayerChoiceAllowTravelingDescription = 774,
790
+ MenuSharedMultiplayerChoiceAllowHardcoreRespawns = 775,
791
+ MenuSharedMultiplayerChoiceAllowHardcoreRespawnsDescription = 776,
792
+ MenuSharedMultiplayerDescription = 777,
793
+ MenuSharedMultiplayerMessageOfTheDay = 778,
794
+ MenuSharedMultiplayerMaxPlayers = 779,
795
+ MenuSharedRealTimeTickSpeedTooltip = 780,
796
+ MenuSharedRealTimeTickSpeedLabel = 781,
797
+ MenuSharedMaxTravelTimeLabel = 782,
798
+ MenuSharedMaxTravelTimeLabelTooltip = 783,
799
+ MenuSharedButtonDefault = 784,
800
+ MenuSharedValueSeconds = 785,
801
+ MenuSharedValueMillseconds = 786,
802
+ MenuSharedValueTurns = 787,
803
+ MenuSharedValuePercentage = 788,
804
+ MenuSharedMilestonesNotUnlockable = 789,
805
+ MenuSharedMilestonesNotUnlockableDescription = 790,
806
+ MenuSharedMilestonesNotUnlockableButtonShowMods = 791,
807
+ MenuSharedButtonDisableAll = 792,
808
+ MenuSharedButtonEnableAll = 793,
809
+ MenuSharedMilestoneModifiersSelected = 794,
810
+ MiscSortBy = 795,
811
+ MiscSortDirection = 796,
812
+ MiscFilter = 797,
813
+ MiscPlayerNameDefault = 798,
814
+ MiscPlayerNameServer = 799,
815
+ MiscSaveNameDefault = 800,
816
+ MiscSaveNameDailyChallenge = 801,
817
+ MiscSaveNameChallenge = 802,
818
+ MiscSaveVersionUnknown = 803,
819
+ MiscVersion = 804,
820
+ MiscVersionBuildInfoTooltip = 805,
821
+ MiscVersionUpdate = 806,
822
+ MiscTime = 807,
823
+ MiscTimeMeridiem = 808,
824
+ MiscError = 809,
825
+ MiscContextMenuCopyTooltip = 810,
826
+ MiscBindableNoBindings = 811,
827
+ DifficultyOptionsPeaceful = 812,
828
+ DifficultyOptionsAberrantSpawnsDisabled = 813,
829
+ DifficultyOptionsAberrantSpawnsOnly = 814,
830
+ DifficultyOptionsCreatureSpawningDisabled = 815,
831
+ DifficultyOptionsCreatureAlwaysSpawns = 816,
832
+ DifficultyOptionsCreatureSpawnsDefault = 817,
833
+ DifficultyOptionsCreatureSpawnsAberrantOnly = 818,
834
+ DifficultyOptionsCreatureSpawnsNoAberrants = 819,
835
+ DifficultyOptionsSpawnLimit = 820,
836
+ DifficultyOptionsRespawn = 821,
837
+ DifficultyOptionsEternalNight = 822,
838
+ DifficultyOptionsEternalDay = 823,
839
+ DifficultyOptionsTimeInitial = 824,
840
+ DifficultyOptionsTimeFrozen = 825,
841
+ DifficultyOptionsTimeDayLength = 826,
842
+ DifficultyOptionsTimeDayPercent = 827,
843
+ DifficultyOptionsNoItems = 828,
844
+ DifficultyOptionsRecipes = 829,
845
+ DifficultyOptionsStartingIsland = 830,
846
+ DifficultyOptionsTravelingEffectsDisabled = 831,
847
+ DifficultyOptionsBenignityInitial = 832,
848
+ DifficultyOptionsBenignityMultiplier = 833,
849
+ DifficultyOptionsMalignityInitial = 834,
850
+ DifficultyOptionsMalignityMultiplier = 835,
851
+ DifficultyOptionsWeightBonus = 836,
852
+ DifficultyOptionsStatInitial = 837,
853
+ DifficultyOptionsStatMax = 838,
854
+ DifficultyOptionsStatMultiplier = 839,
855
+ DifficultyOptionsStatusEffectStartWith = 840,
856
+ DifficultyOptionsStatusEffectUntreatable = 841,
857
+ DifficultyOptionsStatusEffectPassChanceMultiplier = 842,
858
+ DifficultyOptionsNoRandomSkills = 843,
859
+ DifficultyOptionsSkillStartingCount = 844,
860
+ DifficultyOptionsSkillGainMultiplier = 845,
861
+ DifficultyOptionsSkillInitial = 846,
862
+ DifficultyOptionsStatusEffectPermanent = 847,
863
+ DifficultyOptionsStatusEffectRateMultiplier = 848,
864
+ DifficultyOptionsStatusEffectMultiplier = 849,
865
+ DifficultyOptionsItemDurabilityMultiplier = 850,
866
+ DifficultyOptionsItemDecayMultiplier = 851,
867
+ TabCrafting = 852,
868
+ TabDismantle = 853,
869
+ WindowTitleContainer = 854,
870
+ WindowTitleInventory = 855
873
871
  }
874
872
  export default UiTranslation;
@@ -24,29 +24,43 @@ export interface IRegistry {
24
24
  [SYMBOL_MOD_REGISTRATIONS]: ModRegistration[];
25
25
  }
26
26
  export declare abstract class BaseMod extends EventEmitter.Host<IModEvents> {
27
- private readonly index;
27
+ readonly index: number;
28
28
  private allocatedEnums;
29
29
  private registeredPackets;
30
30
  private readonly subRegistries;
31
31
  private subscribedHandlers;
32
32
  constructor(index: number);
33
+ /** @deprecated Use the `index` property */
33
34
  getIndex(): number;
34
35
  /**
35
36
  * Returns the name of this mod.
37
+ * @deprecated Use the `name` property
36
38
  */
37
39
  getName(): string;
38
40
  /**
39
41
  * Returns the prefix for this mod used in registrations. Example: A mod named `Debug Tools` would be `ModDebugTools`
42
+ * @deprecated Use the `prefix` property
40
43
  */
41
44
  getPrefix(): string;
45
+ /** @deprecated Use the `log` property */
46
+ getLog(): Log;
47
+ /** @deprecated Use the `path` property */
48
+ getPath(): string;
49
+ /** @deprecated Use the `version` property */
50
+ getVersion(): string;
51
+ get name(): string;
52
+ /**
53
+ * The prefix for this mod used in registrations. Example: A mod named `Debug Tools` would be `ModDebugTools`
54
+ */
55
+ get prefix(): string;
56
+ get log(): Log;
57
+ get path(): string;
58
+ get version(): string;
42
59
  /**
43
60
  * Returns the full registry name for the given registration name, concatenating the mod registration prefix.
44
61
  * Example: A mod named `Debug Tools` registering `Cool Thingy` would be `ModDebugToolsCoolThingy`
45
62
  */
46
63
  getRegistryName(name: string): string;
47
- getLog(): Log;
48
- getPath(): string;
49
- getVersion(): string;
50
64
  loadFile(file: string): Promise<string | undefined>;
51
65
  /**
52
66
  * Called when the save data for this mod is retrieved from a field decorated with `@Mod.saveData`.
@@ -11,6 +11,7 @@
11
11
  import type DoodadInfo from "game/doodad/DoodadInfo";
12
12
  import type { DoodadType, IDoodadDescription } from "game/doodad/IDoodad";
13
13
  import type { TerrainType } from "game/tile/ITerrain";
14
+ import type Tile from "game/tile/Tile";
14
15
  import type ExploreMap from "renderer/exploreMap/ExploreMap";
15
16
  export interface ITileUpdate {
16
17
  terrainType: TerrainType;
@@ -27,8 +28,8 @@ export interface IDoodadUpdate {
27
28
  hasGraphicVariation: boolean;
28
29
  terrainMasks: TerrainMask;
29
30
  }
30
- export type onTileUpdateDelegate = (x: number, y: number, flushTileImmediately: boolean, debug?: boolean) => void;
31
- export type onDoodadUpdateDelegate = (x: number, y: number, flushTileImmediately: boolean, doodadUpdate: IDoodadUpdate) => void;
31
+ export type onTileUpdateDelegate = (tile: Tile, flushTileImmediately: boolean, debug?: boolean) => void;
32
+ export type onDoodadUpdateDelegate = (tile: Tile, flushTileImmediately: boolean, doodadUpdate: IDoodadUpdate) => void;
32
33
  export type TerrainData = number;
33
34
  export declare enum TerrainMask {
34
35
  None = 0,
@@ -60,7 +60,7 @@ export default class WorldLayer implements IPreSerializeCallback {
60
60
  * Updates the rendered tile.
61
61
  * All neighbors are updated by default, but the neighbor tile update is only done when updateNeighbors is true
62
62
  */
63
- updateTile(x: number, y: number, tile: Tile, shouldUpdate: boolean, updateNeighbors: boolean, flushTileImmediately: boolean, isUpdatingNeighbors?: boolean, debug?: boolean): void;
63
+ updateTile(tile: Tile, shouldUpdate: boolean, updateNeighbors: boolean, flushTileImmediately: boolean, isUpdatingNeighbors?: boolean, debug?: boolean): void;
64
64
  getTileUpdate(tile: Tile): ITileUpdate;
65
65
  private setTileInternal;
66
66
  /**
@@ -19,6 +19,7 @@ import type { IBound3 } from "utilities/math/Bound3";
19
19
  import type RendererContext from "renderer/context/RendererContext";
20
20
  import type ExploredMapClientData from "save/clientStore/clientData/ExploredMap";
21
21
  import type { IWorldLayerRendererEvents } from "renderer/world/IWorldLayerRenderer";
22
+ import type Tile from "game/tile/Tile";
22
23
  export default class WorldLayerRenderer extends EventEmitter.Host<IWorldLayerRendererEvents> {
23
24
  readonly context: RendererContext;
24
25
  protected readonly worldRenderer: WorldRenderer;
@@ -58,7 +59,7 @@ export default class WorldLayerRenderer extends EventEmitter.Host<IWorldLayerRen
58
59
  * Note: You must call bind the texture before calling this
59
60
  */
60
61
  setExploredAlpha(x: number, y: number, alpha: Uint8Array): void;
61
- updateDoodad(x: number, y: number, flushTileImmediately: boolean, { doodadDescription, doodadType, doodadInfo, doodadVariationX, doodadVariationY, terrainMasks }: IDoodadUpdate): void;
62
+ updateDoodad({ x, y }: Tile, flushTileImmediately: boolean, { doodadDescription, doodadType, doodadInfo, doodadVariationX, doodadVariationY, terrainMasks }: IDoodadUpdate): void;
62
63
  renderFullbright(x: number, y: number, tileScale: number, viewWidth: number, viewHeight: number, renderFixedDepth: boolean, flags?: RenderLayerFlag): void;
63
64
  getDataIndex(x: number, y: number): number;
64
65
  setLayer(layer: TileLayer, dataIndex: number, tileAdaptation: TileAdaptor.ITileAdaptation): void;
@@ -78,7 +79,7 @@ export default class WorldLayerRenderer extends EventEmitter.Host<IWorldLayerRen
78
79
  * Processes pending tile/doodad updates
79
80
  */
80
81
  private processUpdates;
81
- updateTile(x: number, y: number, flushTileImmediately?: boolean, debug?: boolean): void;
82
+ updateTile(tile: Tile, flushTileImmediately?: boolean, debug?: boolean): void;
82
83
  private computeDoodad;
83
84
  private computeTilled;
84
85
  private computeDecorations;
@@ -94,8 +94,8 @@ export default class InGameScreen extends BaseScreen {
94
94
  private sortingCancelled;
95
95
  private onSortableAction;
96
96
  private isCurrentlySorting;
97
- private craftableItemTypes;
98
- private nonCraftableItemTypes;
97
+ craftableItemTypes: ItemType[] | undefined;
98
+ nonCraftableItemTypes: ItemType[] | undefined;
99
99
  private dismantleItems;
100
100
  private craftingDialogDirty;
101
101
  private dismantleDialogDirty;
@@ -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
- import type { IRGB } from "utilities/Color";
11
+ import type { IRGBA } from "utilities/Color";
12
12
  export default class SpriteGlow {
13
13
  private readonly data;
14
14
  private readonly canvas;
@@ -24,7 +24,7 @@ export default class SpriteGlow {
24
24
  * Releases a cache of data used for generation.
25
25
  */
26
26
  releaseGenerationImageDataCache(): void;
27
- render(path: string, color: IRGB, signal: AbortSignal): Promise<string | undefined>;
27
+ render(path: string, color: IRGBA, signal: AbortSignal): Promise<string | undefined>;
28
28
  private renderInternal;
29
29
  private getVersion;
30
30
  private getGitVersionID;
@@ -18,10 +18,8 @@ export default class MultiplayerOptionsMenu extends Menu {
18
18
  private readonly choiceLobbyFriends;
19
19
  private readonly choiceLobbyPrivate;
20
20
  private readonly textSteamRelayNetworkResult;
21
- private readonly textWebRTCResult;
22
21
  private readonly textWebSocketResult;
23
22
  private readonly steamRelayNetworkSpacer;
24
- private readonly webRTCSpacer;
25
23
  private readonly pvp;
26
24
  private readonly allowTraveling;
27
25
  private readonly allowHardcoreRespawns;
@@ -21,10 +21,6 @@ export default class GlobalServerDirectory extends Server {
21
21
  protected onMessage(connection: shared.ClientConnection, data: ws.Data, ipAddress: string): void;
22
22
  private sendResponse;
23
23
  private checkConnection;
24
- /**
25
- * Creates a new websocket connection to the matchmaking server and "joins" the game via webrtc
26
- */
27
- private checkWebRTCConnection;
28
24
  /**
29
25
  * Connects to the servers websocket
30
26
  * @param serverAddress Address to connect to
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.20230522.1",
4
+ "version": "2.13.2-beta.dev.20230525.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",