@wayward/types 2.12.1-beta.dev.20221028.1 → 2.12.2-beta.dev.20221030.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.
@@ -288,6 +288,7 @@ export declare const INTERVAL = 16.6666;
288
288
  export declare const TURN_DELAY_MAX: number;
289
289
  export declare const TURN_DELAY_DEFAULT: number;
290
290
  export declare const LIGHT_COLOR_DEFAULT: import("utilities/Color").IRGB;
291
- export declare const TOOLTIP_DELAY_DEFAULT = 170;
291
+ export declare const TOOLTIP_DELAY_DEFAULT = 0;
292
+ export declare const TOOLTIP_DELAY_MAX = 3000;
292
293
  export declare const ZOOM_LEVEL_MAX = 16;
293
294
  export declare const ZOOM_LEVEL_MIN = 1;
@@ -51,7 +51,6 @@ export default class DoodadManager extends ObjectManager<Doodad, IDoodadManagerE
51
51
  static isInGroup(doodadType: DoodadType, doodadGroup: DoodadTypeGroup | DoodadType): boolean;
52
52
  static getGroupDoodads(doodadGroup: DoodadTypeGroup): Set<DoodadType>;
53
53
  static getDoodadTypeGroupName(doodadType: DoodadType | DoodadTypeGroup, article?: false | "definite" | "indefinite", count?: number): Translation;
54
- delete(): void;
55
54
  /**
56
55
  * Note: This can be called multiple times in the same game depending on loading/unloading of islands
57
56
  */
@@ -74,6 +74,7 @@ export default abstract class Entity extends EventEmitter.Host<IEntityEvents> im
74
74
  private _tags?;
75
75
  get tags(): Set<EntityTag>;
76
76
  islandId: IslandId;
77
+ spawnAnimationTime: IMovementTime | undefined;
77
78
  attackAnimationType: DamageType | undefined;
78
79
  attackAnimationTime: IMovementTime | undefined;
79
80
  /**
@@ -133,6 +134,7 @@ export default abstract class Entity extends EventEmitter.Host<IEntityEvents> im
133
134
  */
134
135
  animateBumpTowards(x: number, y: number): void;
135
136
  protected setMoving(delay: Delay, fromX: number, fromY: number, toZ?: number): void;
137
+ animateSpawn(): void;
136
138
  animateAttack(damageType: DamageType[] | undefined): void;
137
139
  getMovementPoint(timeStamp: number): IVector2;
138
140
  /**
@@ -149,6 +149,7 @@ export interface ICreatureDescription extends IModdable, ITemperatureDescription
149
149
  aberrantLoot?: ICreatureLoot[];
150
150
  spawnTiles: TileGroup;
151
151
  spawnGroup?: OptionalDescriptions<BiomeType, SpawnGroup[]>;
152
+ spawnAnimation?: boolean;
152
153
  makeNoise?: boolean;
153
154
  lootGroup?: LootGroupType;
154
155
  jumpOver?: boolean;
@@ -165,6 +166,7 @@ export interface ICreatureDescription extends IModdable, ITemperatureDescription
165
166
  */
166
167
  noSplash?: boolean;
167
168
  particlesOnMove?: boolean;
169
+ particlesOnSpawn?: boolean;
168
170
  providesFire?: boolean;
169
171
  canTrample?: boolean;
170
172
  helpPlants?: boolean;
@@ -252,6 +252,10 @@ export interface IItemDescription extends IObjectDescription, IModdable, ITemper
252
252
  * A float that items inside the container will be reduced by when in a player's inventory.
253
253
  */
254
254
  reducedStoredItemsWeight?: number;
255
+ /**
256
+ * The item type to display instead of the describe item type
257
+ */
258
+ displayItem?: SupplierOr<ItemType | undefined, [Item]>;
255
259
  onEquip?(item: Item): void;
256
260
  onUnequip?(item: Item): void;
257
261
  }
@@ -1322,7 +1326,8 @@ export declare enum ItemType {
1322
1326
  WaterLilies = 718,
1323
1327
  Mud = 719,
1324
1328
  SpikerushSheaths = 720,
1325
- SpikerushSeeds = 721
1329
+ SpikerushSeeds = 721,
1330
+ TatteredMap_RolledUp = 722
1326
1331
  }
1327
1332
  export declare enum ItemTag {
1328
1333
  None = 0
@@ -119,6 +119,7 @@ export default class Item extends EventEmitter.Host<IItemEvents> implements IRef
119
119
  set durability(value: number);
120
120
  get durabilityMax(): number;
121
121
  set durabilityMax(value: number);
122
+ getDisplayItem(): ItemType;
122
123
  isContainer(): this is Item & IContainer;
123
124
  /**
124
125
  * Gets the owner of this item.
@@ -781,92 +781,93 @@ declare enum UiTranslation {
781
781
  MenuSharedMaxTravelTimeLabel = 766,
782
782
  MenuSharedMaxTravelTimeLabelTooltip = 767,
783
783
  MenuSharedButtonDefault = 768,
784
- MenuSharedValueMillseconds = 769,
785
- MenuSharedValueTurns = 770,
786
- MenuSharedValuePercentage = 771,
787
- MenuSharedMilestonesNotUnlockable = 772,
788
- MenuSharedMilestonesNotUnlockableDescription = 773,
789
- MenuSharedMilestonesNotUnlockableButtonShowMods = 774,
790
- MenuSharedButtonDisableAll = 775,
791
- MenuSharedButtonEnableAll = 776,
792
- MenuSharedMilestoneModifiersSelected = 777,
793
- MiscSortBy = 778,
794
- MiscSortDirection = 779,
795
- MiscFilter = 780,
796
- MiscPlayerNameDefault = 781,
797
- MiscPlayerNameServer = 782,
798
- MiscSaveNameDefault = 783,
799
- MiscSaveNameDailyChallenge = 784,
800
- MiscSaveNameChallenge = 785,
801
- MiscSaveVersionUnknown = 786,
802
- MiscVersion = 787,
803
- MiscVersionBuildInfoTooltip = 788,
804
- MiscVersionUpdate = 789,
805
- MiscTime = 790,
806
- MiscTimeMeridiem = 791,
807
- MiscError = 792,
808
- MiscContextMenuCopyTooltip = 793,
809
- MiscBindableOr = 794,
810
- MiscBindableNoBindings = 795,
811
- DifficultyOptionsPeaceful = 796,
812
- DifficultyOptionsAberrantSpawnsDisabled = 797,
813
- DifficultyOptionsAberrantSpawnsOnly = 798,
814
- DifficultyOptionsCreatureSpawningDisabled = 799,
815
- DifficultyOptionsCreatureAlwaysSpawns = 800,
816
- DifficultyOptionsCreatureSpawnsDefault = 801,
817
- DifficultyOptionsCreatureSpawnsAberrantOnly = 802,
818
- DifficultyOptionsCreatureSpawnsNoAberrants = 803,
819
- DifficultyOptionsSpawnLimit = 804,
820
- DifficultyOptionsRespawn = 805,
821
- DifficultyOptionsEternalNight = 806,
822
- DifficultyOptionsEternalDay = 807,
823
- DifficultyOptionsTimeInitial = 808,
824
- DifficultyOptionsTimeFrozen = 809,
825
- DifficultyOptionsTimeDayLength = 810,
826
- DifficultyOptionsTimeDayPercent = 811,
827
- DifficultyOptionsNoItems = 812,
828
- DifficultyOptionsRecipes = 813,
829
- DifficultyOptionsStartingIsland = 814,
830
- DifficultyOptionsTravelingEffectsDisabled = 815,
831
- DifficultyOptionsBenignityInitial = 816,
832
- DifficultyOptionsBenignityMultiplier = 817,
833
- DifficultyOptionsMalignityInitial = 818,
834
- DifficultyOptionsMalignityMultiplier = 819,
835
- DifficultyOptionsWeightBonus = 820,
836
- DifficultyOptionsStatInitial = 821,
837
- DifficultyOptionsStatMax = 822,
838
- DifficultyOptionsStatMultiplier = 823,
839
- DifficultyOptionsStatusEffectStartWith = 824,
840
- DifficultyOptionsStatusEffectUntreatable = 825,
841
- DifficultyOptionsStatusEffectPassChanceMultiplier = 826,
842
- DifficultyOptionsNoRandomSkills = 827,
843
- DifficultyOptionsSkillStartingCount = 828,
844
- DifficultyOptionsSkillGainMultiplier = 829,
845
- DifficultyOptionsSkillInitial = 830,
846
- DifficultyOptionsStatusEffectPermanent = 831,
847
- DifficultyOptionsStatusEffectRateMultiplier = 832,
848
- DifficultyOptionsStatusEffectMultiplier = 833,
849
- DifficultyOptionsItemDurabilityMultiplier = 834,
850
- DifficultyOptionsItemDecayMultiplier = 835,
851
- EquipmentBack = 836,
852
- EquipmentChest = 837,
853
- EquipmentFeet = 838,
854
- EquipmentHands = 839,
855
- EquipmentHead = 840,
856
- EquipmentLegs = 841,
857
- EquipmentMainHand = 842,
858
- EquipmentMainHandOption = 843,
859
- EquipmentNeck = 844,
860
- EquipmentOffHand = 845,
861
- EquipmentOffHandOption = 846,
862
- EquipmentUse = 847,
863
- EquipmentWaist = 848,
864
- HudFilter = 849,
865
- TabCrafting = 850,
866
- TabDismantle = 851,
867
- WindowTitleContainer = 852,
868
- WindowTitleCrafting = 853,
869
- WindowTitleEquipment = 854,
870
- WindowTitleInventory = 855
784
+ MenuSharedValueSeconds = 769,
785
+ MenuSharedValueMillseconds = 770,
786
+ MenuSharedValueTurns = 771,
787
+ MenuSharedValuePercentage = 772,
788
+ MenuSharedMilestonesNotUnlockable = 773,
789
+ MenuSharedMilestonesNotUnlockableDescription = 774,
790
+ MenuSharedMilestonesNotUnlockableButtonShowMods = 775,
791
+ MenuSharedButtonDisableAll = 776,
792
+ MenuSharedButtonEnableAll = 777,
793
+ MenuSharedMilestoneModifiersSelected = 778,
794
+ MiscSortBy = 779,
795
+ MiscSortDirection = 780,
796
+ MiscFilter = 781,
797
+ MiscPlayerNameDefault = 782,
798
+ MiscPlayerNameServer = 783,
799
+ MiscSaveNameDefault = 784,
800
+ MiscSaveNameDailyChallenge = 785,
801
+ MiscSaveNameChallenge = 786,
802
+ MiscSaveVersionUnknown = 787,
803
+ MiscVersion = 788,
804
+ MiscVersionBuildInfoTooltip = 789,
805
+ MiscVersionUpdate = 790,
806
+ MiscTime = 791,
807
+ MiscTimeMeridiem = 792,
808
+ MiscError = 793,
809
+ MiscContextMenuCopyTooltip = 794,
810
+ MiscBindableOr = 795,
811
+ MiscBindableNoBindings = 796,
812
+ DifficultyOptionsPeaceful = 797,
813
+ DifficultyOptionsAberrantSpawnsDisabled = 798,
814
+ DifficultyOptionsAberrantSpawnsOnly = 799,
815
+ DifficultyOptionsCreatureSpawningDisabled = 800,
816
+ DifficultyOptionsCreatureAlwaysSpawns = 801,
817
+ DifficultyOptionsCreatureSpawnsDefault = 802,
818
+ DifficultyOptionsCreatureSpawnsAberrantOnly = 803,
819
+ DifficultyOptionsCreatureSpawnsNoAberrants = 804,
820
+ DifficultyOptionsSpawnLimit = 805,
821
+ DifficultyOptionsRespawn = 806,
822
+ DifficultyOptionsEternalNight = 807,
823
+ DifficultyOptionsEternalDay = 808,
824
+ DifficultyOptionsTimeInitial = 809,
825
+ DifficultyOptionsTimeFrozen = 810,
826
+ DifficultyOptionsTimeDayLength = 811,
827
+ DifficultyOptionsTimeDayPercent = 812,
828
+ DifficultyOptionsNoItems = 813,
829
+ DifficultyOptionsRecipes = 814,
830
+ DifficultyOptionsStartingIsland = 815,
831
+ DifficultyOptionsTravelingEffectsDisabled = 816,
832
+ DifficultyOptionsBenignityInitial = 817,
833
+ DifficultyOptionsBenignityMultiplier = 818,
834
+ DifficultyOptionsMalignityInitial = 819,
835
+ DifficultyOptionsMalignityMultiplier = 820,
836
+ DifficultyOptionsWeightBonus = 821,
837
+ DifficultyOptionsStatInitial = 822,
838
+ DifficultyOptionsStatMax = 823,
839
+ DifficultyOptionsStatMultiplier = 824,
840
+ DifficultyOptionsStatusEffectStartWith = 825,
841
+ DifficultyOptionsStatusEffectUntreatable = 826,
842
+ DifficultyOptionsStatusEffectPassChanceMultiplier = 827,
843
+ DifficultyOptionsNoRandomSkills = 828,
844
+ DifficultyOptionsSkillStartingCount = 829,
845
+ DifficultyOptionsSkillGainMultiplier = 830,
846
+ DifficultyOptionsSkillInitial = 831,
847
+ DifficultyOptionsStatusEffectPermanent = 832,
848
+ DifficultyOptionsStatusEffectRateMultiplier = 833,
849
+ DifficultyOptionsStatusEffectMultiplier = 834,
850
+ DifficultyOptionsItemDurabilityMultiplier = 835,
851
+ DifficultyOptionsItemDecayMultiplier = 836,
852
+ EquipmentBack = 837,
853
+ EquipmentChest = 838,
854
+ EquipmentFeet = 839,
855
+ EquipmentHands = 840,
856
+ EquipmentHead = 841,
857
+ EquipmentLegs = 842,
858
+ EquipmentMainHand = 843,
859
+ EquipmentMainHandOption = 844,
860
+ EquipmentNeck = 845,
861
+ EquipmentOffHand = 846,
862
+ EquipmentOffHandOption = 847,
863
+ EquipmentUse = 848,
864
+ EquipmentWaist = 849,
865
+ HudFilter = 850,
866
+ TabCrafting = 851,
867
+ TabDismantle = 852,
868
+ WindowTitleContainer = 853,
869
+ WindowTitleCrafting = 854,
870
+ WindowTitleEquipment = 855,
871
+ WindowTitleInventory = 856
871
872
  }
872
873
  export default UiTranslation;
@@ -103,9 +103,10 @@ export declare enum RenderSource {
103
103
  RemoveBlood = 54,
104
104
  Resize = 55,
105
105
  SetupGl = 56,
106
- StartGame = 57,
107
- Steamworks = 58,
108
- Thumbnail = 59,
109
- WorldLayerRendererFlush = 60
106
+ SpawnAnimationStart = 57,
107
+ StartGame = 58,
108
+ Steamworks = 59,
109
+ Thumbnail = 60,
110
+ WorldLayerRendererFlush = 61
110
111
  }
111
112
  export declare function calculateAmbientLightLevel(origin: IRendererOrigin, z: number): number;
@@ -110,6 +110,7 @@ export default class ItemComponent extends Component {
110
110
  protected onUpdateDurability(): void;
111
111
  protected onUpdateQuality(): void;
112
112
  protected onTickEnd(): void;
113
+ protected onLoadedOnIsland(): void;
113
114
  refresh(refreshType: ItemRefreshType): void;
114
115
  clone(): ItemComponent;
115
116
  setItemMenu(initialiser?: (contextMenu: ContextMenu<ActionId>) => any): this;
@@ -85,8 +85,8 @@ export default class Tooltip extends Component {
85
85
  */
86
86
  setMaxWidth(maxWidth?: number | `${number}vw`): this;
87
87
  setText(translation: GetterOfOr<Translation | UiTranslation>, ...args: any[]): this;
88
- private delay;
89
- setDelay(delay: number): this;
88
+ private delay?;
89
+ setDelay(delay?: number): this;
90
90
  getLastBlock(): TooltipBlock;
91
91
  getBlocks(): import("@wayward/goodstream").default<TooltipBlock>;
92
92
  addBlock(initializer: (block: TooltipBlock) => any): this;
@@ -0,0 +1,25 @@
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 { IVector2 } from "utilities/math/IVector";
12
+ export interface IKdNearestPoint {
13
+ point: IVector2;
14
+ distance: number;
15
+ }
16
+ export declare class KdNearestPoints {
17
+ private readonly maxPoints;
18
+ private readonly _points;
19
+ private _updates;
20
+ constructor(maxPoints: number);
21
+ get points(): IKdNearestPoint[];
22
+ get worstDistance(): number;
23
+ update(point: IVector2, distance: number): void;
24
+ private getPointId;
25
+ }
@@ -0,0 +1,22 @@
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 { IKdNearestPoint } from "utilities/collection/tree/KdNearestPoints";
12
+ import { KdTreeNode } from "utilities/collection/tree/KdTreeNode";
13
+ import type { IVector2 } from "utilities/math/IVector";
14
+ export declare class KdTree {
15
+ private readonly root;
16
+ add(point: IVector2): void;
17
+ remove(point: IVector2): void;
18
+ _remove(point: IVector2, node: KdTreeNode | undefined, cd: number): KdTreeNode | undefined;
19
+ nearestPoints(point: IVector2, maxPoints: number): IKdNearestPoint[];
20
+ private _nearestPoints;
21
+ private findMin;
22
+ }
@@ -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 type { IVector2 } from "utilities/math/IVector";
12
+ export declare class KdTreeNode {
13
+ parent: KdTreeNode | undefined;
14
+ point: IVector2;
15
+ left: KdTreeNode | undefined;
16
+ right: KdTreeNode | undefined;
17
+ constructor(parent: KdTreeNode | undefined, point: IVector2);
18
+ setPoint(point: IVector2): void;
19
+ }
@@ -57,6 +57,8 @@ export default class Vector2 implements IVector2, ISerializable {
57
57
  static isDistanceWithin(vector: IVector2, vector2: IVector2, distance: number): boolean;
58
58
  static distance(vector: IVector2, vector2: IVector2): number;
59
59
  static squaredDistance(vector: IVector2, vector2: IVector2): number;
60
+ static manhattanDistance(vec1: IVector2, vec2: IVector2): number;
61
+ static equals(vec1: IVector2, vec2: IVector2): boolean;
60
62
  static direction(vector: IVector2, vector2: IVector2): Vector2;
61
63
  static direction<D extends IVector2>(vector: IVector2, vector2: IVector2, dest: D): D;
62
64
  static mix(vector: IVector2, vector2: IVector2, time: number): Vector2;
@@ -88,8 +90,7 @@ export default class Vector2 implements IVector2, ISerializable {
88
90
  map(mapper: (v2: Vector2) => Vector2): Vector2;
89
91
  negate(): Vector2;
90
92
  negate<D extends IVector2>(dest: D): D;
91
- equals(x: number, y: number, threshold?: number): boolean;
92
- equals(vector?: IVector2, threshold?: number): boolean;
93
+ equals(vector?: IVector2): boolean;
93
94
  length(): number;
94
95
  squaredLength(): number;
95
96
  add(vector: IVector2 | IVector3): this;
@@ -55,9 +55,9 @@ export interface IChangelog {
55
55
  export declare enum ChangeType {
56
56
  New = 0,
57
57
  Improvement = 1,
58
- Bug = 2,
59
- Balance = 3,
60
- Modding = 4,
61
- Mod = 5,
62
- Technical = 6
58
+ Balance = 2,
59
+ Bug = 3,
60
+ Technical = 4,
61
+ Modding = 5,
62
+ Mod = 6
63
63
  }
@@ -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 = 12, gameVersionPatch = 1, gameVersionName = "Wheels & Wetlands";
11
+ export declare const gameVersionStage = "beta", gameVersionMajor = 2, gameVersionMinor = 12, gameVersionPatch = 2, gameVersionName = "Wheels & Wetlands";
12
12
  export declare const gameVersion: string;
13
13
  export declare const gameVersionTitleMajor: string;
14
14
  export declare const gameVersionTitleMinor: string;
@@ -0,0 +1,13 @@
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 { IPaths } from "../../../interfaces";
12
+ import type { Config } from "../../..";
13
+ export default function (paths: IPaths, config: Config): void;
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.12.1-beta.dev.20221028.1",
4
+ "version": "2.12.2-beta.dev.20221030.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",