@wayward/types 2.13.0-beta.dev.20230403.1 → 2.13.0-beta.dev.20230405.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.
Files changed (24) hide show
  1. package/definitions/game/event/EventManager.d.ts +4 -1
  2. package/definitions/game/game/doodad/Doodad.d.ts +4 -0
  3. package/definitions/game/game/entity/Entity.d.ts +2 -1
  4. package/definitions/game/game/entity/IHuman.d.ts +5 -0
  5. package/definitions/game/game/entity/action/ActionsRegistration.d.ts +4 -4
  6. package/definitions/game/game/entity/action/actions/Chop.d.ts +1 -1
  7. package/definitions/game/game/entity/action/actions/Dig.d.ts +1 -0
  8. package/definitions/game/game/entity/action/actions/Gather.d.ts +2 -2
  9. package/definitions/game/game/entity/action/actions/Harvest.d.ts +1 -1
  10. package/definitions/game/game/entity/action/actions/Mine.d.ts +1 -1
  11. package/definitions/game/game/entity/action/actions/helper/ConfirmGatherHarvest.d.ts +2 -1
  12. package/definitions/game/game/entity/npc/npcs/Merchant.d.ts +2 -3
  13. package/definitions/game/game/entity/player/IPlayer.d.ts +0 -6
  14. package/definitions/game/game/inspection/infoProviders/creature/ResistancesAndVulnerabilities.d.ts +6 -1
  15. package/definitions/game/game/island/IIsland.d.ts +2 -2
  16. package/definitions/game/game/island/Island.d.ts +0 -7
  17. package/definitions/game/game/item/IItemManager.d.ts +2 -2
  18. package/definitions/game/game/options/modifiers/milestone/modifiers/Multidisciplined.d.ts +2 -1
  19. package/definitions/game/game/tile/Tile.d.ts +14 -0
  20. package/definitions/game/game/tile/TileEventManager.d.ts +4 -1
  21. package/definitions/game/ui/component/Dropdown.d.ts +8 -3
  22. package/definitions/game/ui/component/dropdown/ItemDropdown.d.ts +3 -1
  23. package/definitions/game/ui/old/screens/InGameScreen.d.ts +2 -0
  24. package/package.json +1 -1
@@ -11,8 +11,11 @@
11
11
  import type { EventBusHost } from "event/EventBuses";
12
12
  import { EventBus } from "event/EventBuses";
13
13
  import type { Events, IEventEmitterHost, IEventEmitterHostClass } from "event/EventEmitter";
14
+ import type EventEmitter from "event/EventEmitter";
14
15
  type HostOrHostClass = IEventEmitterHost<any> | IEventEmitterHostClass<any>;
15
- type HostFromHostOrHostClass<H> = H extends IEventEmitterHostClass<any> ? InstanceOf<H> : H;
16
+ type HostFromHostOrHostClass<H> = H extends {
17
+ event: EventEmitter<null, any>;
18
+ } ? H : H extends IEventEmitterHostClass<any> ? InstanceOf<H> : H;
16
19
  export type Emitter = HostOrHostClass;
17
20
  export type EmitterOrBus = EventBus | Emitter;
18
21
  export type Event<E extends EmitterOrBus> = keyof Events<E extends EventBus ? EventBusHost<E> : E>;
@@ -189,6 +189,10 @@ export default class Doodad extends Entity<IDoodadDescription, DoodadType, Dooda
189
189
  unhitch(): void;
190
190
  damage(forceBreak?: boolean, skipDropAsItem?: boolean, skipSound?: boolean, skipResources?: boolean): void;
191
191
  getDefaultDurability(random?: import("../../utilities/random/Random").Random<import("../../utilities/random/generators/LegacySeededGenerator").LegacySeededGenerator | import("../../utilities/random/generators/PCGSeededGenerator").PCGSeededGenerator>): number;
192
+ /**
193
+ * Gets the container to use for doodad executed actions
194
+ */
195
+ getTargetContainer(): IContainer | undefined;
192
196
  addTreasureChestLoot(): void;
193
197
  attachStillContainer(item: Item): void;
194
198
  detachStillContainer(human: Human): Item | undefined;
@@ -34,7 +34,8 @@ import type EntityWithStats from "game/entity/EntityWithStats";
34
34
  import type Tile from "game/tile/Tile";
35
35
  import type EntityMovable from "game/entity/EntityMovable";
36
36
  import type { RenderSource, UpdateRenderFlag } from "renderer/IRenderer";
37
- export default abstract class Entity<DescriptionType = unknown, TypeType extends number = number, TagType = unknown, CounterType = unknown> extends EventEmitter.Host<IEntityEvents> implements IReferenceable, IInspector, ITemperatureSource, INotificationLocation, IVector3 {
37
+ import type { IVector4 } from "utilities/math/Vector4";
38
+ export default abstract class Entity<DescriptionType = unknown, TypeType extends number = number, TagType = unknown, CounterType = unknown> extends EventEmitter.Host<IEntityEvents> implements IReferenceable, IInspector, ITemperatureSource, INotificationLocation, IVector4 {
38
39
  abstract readonly entityType: EntityType;
39
40
  abstract readonly tileUpdateType: TileUpdateType;
40
41
  id: number;
@@ -191,6 +191,11 @@ export interface IHumanEvents extends Events<EntityWithStats>, ISkillEvents {
191
191
  * @returns The amount of damage the player should take (the player will take this damage)
192
192
  */
193
193
  damage(damageInfo: IDamageInfo): number | void;
194
+ /**
195
+ * Called when an doodad is picked up
196
+ * @param doodad The doodad object
197
+ */
198
+ pickUpDoodad?(doodad: Doodad): any;
194
199
  /**
195
200
  * Called when the player tick starts
196
201
  */
@@ -23,7 +23,7 @@ export declare const actionDescriptionsSlow: {
23
23
  5: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default<number>, void, import("game/entity/action/actions/Butcher").IButcherCanUse, [import("../../item/Item").default]>;
24
24
  120: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default<number>, void, import("game/entity/action/actions/CageCreature").ICageCreature, [import("../../item/Item").default]>;
25
25
  16: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default<number>, void, import("game/entity/action/actions/Cast").ICastCanUse, [import("../../item/Item").default]>;
26
- 99: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default<number>, void, import("game/entity/action/actions/Gather").IGatherCanUse, [(import("../../item/Item").default | undefined)?]>;
26
+ 99: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Tile, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../../doodad/Doodad").default | import("../Human").default<number>, void, import("game/entity/action/actions/Gather").IGatherCanUse, [(import("../../item/Item").default | undefined)?, (import("../../tile/Tile").default | undefined)?]>;
27
27
  71: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.Container, import("game/entity/action/IAction").ActionArgument.NPCNearby, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Boolean, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default<number>, void, import("game/entity/action/actions/ToggleContainer").IToggleContainerCanUse, [(import("../npc/NPC").default | import("../../item/IItem").IContainer | undefined)?, (boolean | undefined)?]>;
28
28
  50: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.Doodad, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Boolean, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default<number>, true | undefined, import("game/entity/action/actions/ToggleDoor").IToggleDoorCanUse, [(import("../../doodad/Doodad").default | undefined)?, (boolean | undefined)?]>;
29
29
  26: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../Human").default<number>, void, import("game/entity/action/IAction").IActionUsable, [import("../../item/Item").default]>;
@@ -49,11 +49,11 @@ export declare const actionDescriptionsSlow: {
49
49
  38: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.Undefined, import("game/entity/action/IAction").ActionArgument.ItemNearby, import("game/entity/action/IAction").ActionArgument.Doodad]], import("../Human").default<number>, void, import("game/entity/action/IAction").IActionUsable, [(import("../../doodad/Doodad").default | import("../../item/Item").default | undefined)?]>;
50
50
  110: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory, [import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default<number>, void, import("game/entity/action/actions/Exude").IExudeCanUse, [import("../../item/Item").default, (import("../../item/Item").default | undefined)?]>;
51
51
  36: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default<number>, void, import("game/entity/action/actions/Attack").IAttackCloseUpCanUse | import("game/entity/action/actions/Attack").IAttackThrowItemCanUse | import("game/entity/action/actions/Attack").IAttackRangedWeaponCanUse, [import("../../item/Item").default]>;
52
- 22: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default<number>, void, import("game/entity/action/actions/Gather").IGatherCanUse, [(import("../../item/Item").default | undefined)?]>;
52
+ 22: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Tile, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../../doodad/Doodad").default | import("../Human").default<number>, void, import("game/entity/action/actions/Gather").IGatherCanUse, [(import("../../item/Item").default | undefined)?, (import("../../tile/Tile").default | undefined)?]>;
53
53
  15: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../Human").default<number>, void, import("game/entity/action/actions/GatherLiquid").IGatherLiquidCanUse, [import("../../item/Item").default]>;
54
54
  86: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemNearbyIncludingTradeContainer, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Container, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.ItemType, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Quality, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.String, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default<number>, void, import("game/entity/action/actions/MoveItem").MoveItemCanUse, [(import("../../item/Item").default | undefined)?, (import("../../item/IItem").IContainer | undefined)?, (import("../../item/IItem").ItemType | undefined)?, (import("../../IObject").Quality | undefined)?, (string | undefined)?]>;
55
55
  52: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default<number>, void, import("game/entity/action/actions/Grasp").IGraspCanUse, [import("../../item/Item").default]>;
56
- 69: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default<number>, void, import("game/entity/action/actions/Harvest").IHarvestCanUse, [(import("../../item/Item").default | undefined)?]>;
56
+ 69: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Tile, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../../doodad/Doodad").default | import("../Human").default<number>, void, import("game/entity/action/actions/Harvest").IHarvestCanUse, [(import("../../item/Item").default | undefined)?, (import("../../tile/Tile").default | undefined)?]>;
57
57
  12: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../Human").default<number>, void, import("./actions/ConsumeItem").IConsumeItemCanUse, [import("../../item/Item").default]>;
58
58
  46: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default<number>, void, import("game/entity/action/actions/HealOther").IHealOtherCanUse, [import("../../item/Item").default]>;
59
59
  76: import("./Action").Action<[], import("../Human").default<number>, void, import("game/entity/action/actions/ToggleHitch").IToggleHitchCanUse, []>;
@@ -67,7 +67,7 @@ export declare const actionDescriptionsSlow: {
67
67
  }, [import("../../item/Item").default]>;
68
68
  17: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default<number>, void, import("game/entity/action/actions/Lockpick").ILockpickCanUse, [import("../../item/Item").default]>;
69
69
  85: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.AttackType, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default<number>, void, import("game/entity/action/actions/Attack").IAttackCanUse, [(import("../../item/Item").default | undefined)?, (import("../IEntity").AttackType | undefined)?, (import("../../item/Item").default | undefined)?]>;
70
- 100: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default<number>, void, import("game/entity/action/actions/Gather").IGatherCanUse, [(import("../../item/Item").default | undefined)?]>;
70
+ 100: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Tile, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../../doodad/Doodad").default | import("../Human").default<number>, void, import("game/entity/action/actions/Gather").IGatherCanUse, [(import("../../item/Item").default | undefined)?, (import("../../tile/Tile").default | undefined)?]>;
71
71
  58: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.Direction], import("../Human").default<number>, void, {
72
72
  usable: true;
73
73
  }, [import("../../../utilities/math/Direction").Direction.None | import("../../../utilities/math/Direction").Direction.East | import("../../../utilities/math/Direction").Direction.North | import("../../../utilities/math/Direction").Direction.West | import("../../../utilities/math/Direction").Direction.South]>;
@@ -8,5 +8,5 @@
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
- declare const _default: import("../Action").Action<[[import("../IAction").ActionArgument.ItemInventory, import("../IAction").ActionArgument.Undefined]], import("../../Human").default<number>, void, import("game/entity/action/actions/Gather").IGatherCanUse, [(import("../../../item/Item").default | undefined)?]>;
11
+ declare const _default: import("../Action").Action<[[import("../IAction").ActionArgument.ItemInventory, import("../IAction").ActionArgument.Undefined], [import("../IAction").ActionArgument.Tile, import("../IAction").ActionArgument.Undefined]], import("../../../doodad/Doodad").default | import("../../Human").default<number>, void, import("game/entity/action/actions/Gather").IGatherCanUse, [(import("../../../item/Item").default | undefined)?, (import("../../../tile/Tile").default | undefined)?]>;
12
12
  export default _default;
@@ -17,6 +17,7 @@ import { TerrainType } from "game/tile/ITerrain";
17
17
  import type Tile from "game/tile/Tile";
18
18
  export interface IDigGenericCanUse extends IActionUsable {
19
19
  type: "PickUpExcrement" | "PickUp" | "Gather";
20
+ tile: Tile;
20
21
  }
21
22
  export interface IDigTileCanUse extends IActionUsable {
22
23
  type: "Tile";
@@ -54,7 +54,7 @@ export interface IGatherDoodadCanUse extends IGatherBaseCanUse {
54
54
  doodadDescription: IDoodadDescription;
55
55
  growingStage?: GrowingStage;
56
56
  }
57
- export interface IGatherDoodadHarvestCanUse extends IActionUsable {
57
+ export interface IGatherDoodadHarvestCanUse extends IGatherBaseCanUse {
58
58
  gatherType: GatherType.DoodadHarvest;
59
59
  tool?: Item;
60
60
  }
@@ -63,5 +63,5 @@ export interface IGatherTerrainCanUse extends IGatherBaseCanUse {
63
63
  terrainDescription: ITerrainDescription;
64
64
  }
65
65
  export type IGatherCanUse = IGatherTileEventCanUse | IGatherDoodadCanUse | IGatherDoodadHarvestCanUse | IGatherTerrainCanUse;
66
- declare const _default: Action<[[ActionArgument.ItemInventory, ActionArgument.Undefined]], import("../../Human").default<number>, void, IGatherCanUse, [(Item | undefined)?]>;
66
+ declare const _default: Action<[[ActionArgument.ItemInventory, ActionArgument.Undefined], [ActionArgument.Tile, ActionArgument.Undefined]], Doodad | import("../../Human").default<number>, void, IGatherCanUse, [(Item | undefined)?, (Tile | undefined)?]>;
67
67
  export default _default;
@@ -20,5 +20,5 @@ export interface IHarvestCanUse extends IActionUsable {
20
20
  doodad: Doodad;
21
21
  resources: ILootItem[];
22
22
  }
23
- declare const _default: Action<[[ActionArgument.ItemInventory, ActionArgument.Undefined]], import("../../Human").default<number>, void, IHarvestCanUse, [(Item | undefined)?]>;
23
+ declare const _default: Action<[[ActionArgument.ItemInventory, ActionArgument.Undefined], [ActionArgument.Tile, ActionArgument.Undefined]], Doodad | import("../../Human").default<number>, void, IHarvestCanUse, [(Item | undefined)?, (import("../../../tile/Tile").default | undefined)?]>;
24
24
  export default _default;
@@ -8,5 +8,5 @@
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
- declare const _default: import("../Action").Action<[[import("../IAction").ActionArgument.ItemInventory, import("../IAction").ActionArgument.Undefined]], import("../../Human").default<number>, void, import("game/entity/action/actions/Gather").IGatherCanUse, [(import("../../../item/Item").default | undefined)?]>;
11
+ declare const _default: import("../Action").Action<[[import("../IAction").ActionArgument.ItemInventory, import("../IAction").ActionArgument.Undefined], [import("../IAction").ActionArgument.Tile, import("../IAction").ActionArgument.Undefined]], import("../../../doodad/Doodad").default | import("../../Human").default<number>, void, import("game/entity/action/actions/Gather").IGatherCanUse, [(import("../../../item/Item").default | undefined)?, (import("../../../tile/Tile").default | undefined)?]>;
12
12
  export default _default;
@@ -8,6 +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 Doodad from "game/doodad/Doodad";
11
12
  import type { IActionConfirmerApi } from "game/entity/action/IAction";
12
13
  import type Human from "game/entity/Human";
13
- export default function (action: IActionConfirmerApi<Human>): Promise<boolean>;
14
+ export default function (action: IActionConfirmerApi<Human | Doodad>): Promise<boolean>;
@@ -14,7 +14,6 @@ import { AiType } from "game/entity/IEntity";
14
14
  import { EquipType } from "game/entity/IHuman";
15
15
  import type { INPCConstructorOptions } from "game/entity/npc/INPC";
16
16
  import NPC from "game/entity/npc/NPC";
17
- import type Player from "game/entity/player/Player";
18
17
  import type { IContainer } from "game/item/IItem";
19
18
  import { ItemType } from "game/item/IItem";
20
19
  import type Item from "game/item/Item";
@@ -30,8 +29,8 @@ export default class MerchantNPC extends NPC {
30
29
  modifyCustomerCredit(customer: Human, creditChange: number): number;
31
30
  getActions(): ActionType[] | undefined;
32
31
  getPublicContainer(): IContainer | undefined;
33
- getSellPrice(player: Player, item: Item): number | undefined;
34
- getBuyPrice(player: Player, item: Item): IMerchantBuyPrice | undefined;
32
+ getSellPrice(human: Human, item: Item): number | undefined;
33
+ getBuyPrice(human: Human, item: Item): IMerchantBuyPrice | undefined;
35
34
  /**
36
35
  * Closes container dialogs
37
36
  */
@@ -9,7 +9,6 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import type { Events } from "event/EventEmitter";
12
- import type Doodad from "game/doodad/Doodad";
13
12
  import type Human from "game/entity/Human";
14
13
  import type { HairColor, HairStyle, SkinColor } from "game/entity/IHuman";
15
14
  import type { IMessage } from "game/entity/player/IMessageManager";
@@ -86,11 +85,6 @@ export interface IPlayerEvents extends Events<Human> {
86
85
  * @param id The id of the note that was read.
87
86
  */
88
87
  readNote(id: number): any;
89
- /**
90
- * Called when an doodad is picked up
91
- * @param doodad The doodad object
92
- */
93
- pickUpDoodad?(doodad: Doodad): any;
94
88
  /**
95
89
  * Called when a player sails to civilization.
96
90
  */
@@ -8,6 +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 EventEmitter from "event/EventEmitter";
11
12
  import type Creature from "game/entity/creature/Creature";
12
13
  import type { CreatureType } from "game/entity/creature/ICreature";
13
14
  import type Human from "game/entity/Human";
@@ -15,9 +16,13 @@ import { InfoDisplayLevel } from "game/inspection/IInfoProvider";
15
16
  import { InfoProvider } from "game/inspection/InfoProvider";
16
17
  import type { InfoProviderContext } from "game/inspection/InfoProviderContext";
17
18
  import type { TranslationGenerator } from "ui/component/IComponent";
19
+ export interface IResistancesAndVulnerabilitiesInfoProviderClassEvents {
20
+ shouldDisplayUndiscoveredResistsAndVulns(skill: number, human: Human): boolean | undefined;
21
+ }
18
22
  export default class ResistancesAndVulnerabilitiesInfoProvider extends InfoProvider {
19
23
  private readonly creature;
20
- static get(creatureType: CreatureType, human?: Human): import("game/inspection/InfoProvider").SimpleInfoProvider;
24
+ static event: EventEmitter<null, IResistancesAndVulnerabilitiesInfoProviderClassEvents>;
25
+ static get(creatureType: CreatureType, human?: Human): import("game/inspection/InfoProvider").SimpleInfoProvider[];
21
26
  private static translateVulnOrResist;
22
27
  constructor(creature: Creature);
23
28
  getClass(): string[];
@@ -13,7 +13,7 @@ import type Doodad from "game/doodad/Doodad";
13
13
  import type Creature from "game/entity/creature/Creature";
14
14
  import type { CreatureType, IDamageOutcome, IDamageOutcomeInput } from "game/entity/creature/ICreature";
15
15
  import type Human from "game/entity/Human";
16
- import type { Defense } from "game/entity/IEntity";
16
+ import type { DamageType, Defense } from "game/entity/IEntity";
17
17
  import type NPC from "game/entity/npc/NPC";
18
18
  import type { IIslandTemplate, TickFlag, TileUpdateType } from "game/IGame";
19
19
  import type { MultiplayerLoadingDescription } from "game/meta/Loading";
@@ -89,7 +89,7 @@ export interface IIslandEvents {
89
89
  * @param doodad Doodad that caused the change
90
90
  */
91
91
  portsChanged(doodad: Doodad): any;
92
- getDefense(defense: Defense | undefined, target: Human | Creature | CreatureType): Defense | undefined;
92
+ getDefense(defense: Defense | undefined, target: Human | Creature | CreatureType, damageType?: DamageType): Defense | undefined;
93
93
  calculateAttackOutcome(damageOutcome: IDamageOutcome, input: IDamageOutcomeInput, attackValue: number, defenseValue: number): IDamageOutcome | undefined;
94
94
  }
95
95
  export interface ILegacySeeds {
@@ -179,8 +179,6 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
179
179
  createTile(x: number, y: number, z: number, index: number): Tile;
180
180
  setTile(x: number, y: number, z: number, tile: Tile): Tile;
181
181
  getOrCreateTile(index: number, x: number, y: number, z: number): Tile;
182
- makeLavaPassage(human: Human): TerrainType | undefined;
183
- makeCaveEntrance(human: Human, chance?: number): TerrainType | undefined;
184
182
  updateFlowFieldTile(tile: Tile, tileUpdateType: TileUpdateType, updatedRenderer?: boolean): void;
185
183
  /**
186
184
  * Checks if island.tileData is synced with Tile.data
@@ -215,11 +213,6 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
215
213
  checkForTargetInRange(tile: Tile, direction: Direction.Cardinal, range: number, includePlayers?: boolean): IMobCheck;
216
214
  fireBreath(x: number, y: number, z: number, facingDirection: Direction, itemName?: Translation, player?: boolean): void;
217
215
  coolFires(requirements: IRequirementInfo, human: Human): void;
218
- /**
219
- * Create puddles around a point and limit them (so they can't expand infinitely).
220
- * @param point x/y/z of the splash/puddle source.
221
- */
222
- createPuddles(point: IVector3): void;
223
216
  /**
224
217
  * Resets & recalculates the civilization score
225
218
  */
@@ -15,9 +15,9 @@ import type Creature from "game/entity/creature/Creature";
15
15
  import type { Quality } from "game/IObject";
16
16
  import type { IMoveToTileOptions, ItemType, ItemTypeGroup } from "game/item/IItem";
17
17
  import type Item from "game/item/Item";
18
+ import type Tile from "game/tile/Tile";
18
19
  import type TileEvent from "game/tile/TileEvent";
19
20
  import type { Direction } from "utilities/math/Direction";
20
- import type { IVector3 } from "utilities/math/IVector";
21
21
  /**
22
22
  * Includes all protected items by default
23
23
  */
@@ -81,7 +81,7 @@ export interface IRequirementInfo {
81
81
  missingDoodads?: Set<DoodadType | DoodadTypeGroup>;
82
82
  fireSourceDoodad?: Doodad;
83
83
  fireSourceTileEvent?: TileEvent;
84
- fireSourceLavaPosition?: IVector3;
84
+ fireSourceLavaTile?: Tile;
85
85
  faceDirection?: Direction.Cardinal;
86
86
  actionNotUsable?: IActionNotUsable;
87
87
  }
@@ -23,10 +23,11 @@ export default class Multidisciplined extends MilestoneModifier {
23
23
  instantiate(id: Milestone, player?: Player): MultidisciplinedMilestoneModifierInstance | undefined;
24
24
  }
25
25
  declare class MultidisciplinedMilestoneModifierInstance extends MilestoneModifierInstance<Record<string, Map<CreatureType, Set<DamageType>>>> {
26
- protected getDefense(island: Island, defense: Defense | undefined, target: Human | Creature | CreatureType): Defense | undefined;
26
+ protected getDefense(island: Island, defense: Defense | undefined, target: Human | Creature | CreatureType, damageType?: DamageType): Defense | undefined;
27
27
  protected calculateAttackOutcome(island: Island, outcome: IDamageOutcome, input: IDamageOutcomeInput, attackValue: number, defenseValue: number): IDamageOutcome | undefined;
28
28
  protected hasDiscoveredVulnOrResist(player: Player, creature: CreatureType, damageType: DamageType): boolean | undefined;
29
29
  protected discoverVulnOrResist(player: Player, creature: CreatureType, damageType: DamageType): void;
30
30
  protected getDiscoveredVulnsAndResists(player: Player): Map<CreatureType, Set<DamageType>>;
31
+ protected shouldDisplayUndiscoveredResistsAndVulns(host: any, skill: number, human: Human): boolean | undefined;
31
32
  }
32
33
  export {};
@@ -235,6 +235,20 @@ export default class Tile implements IVector4, Partial<ITileContainer>, IFieldOf
235
235
  * Decrease the depth of a water tile if under 6 connected tiles
236
236
  */
237
237
  consumeWaterTile(): void;
238
+ /**
239
+ * Used to check if lava exists below, then create a passage above
240
+ * @returns True if it created a lava passage
241
+ */
242
+ makeLavaPassage(source: Human | undefined): boolean;
243
+ /**
244
+ * Used to genererate and find appropriate cave entrances
245
+ * @returns True if it created cave entrances
246
+ */
247
+ makeCaveEntrance(source: Human | undefined, chance?: number): boolean;
248
+ /**
249
+ * Create puddles around a point and limit them (so they can't expand infinitely)
250
+ */
251
+ createPuddles(): void;
238
252
  addOrUpdateOverlay(overlay: IOverlayInfo): void;
239
253
  removeOverlay(overlay: IOverlayInfo): void;
240
254
  canSeeObject(type: CanASeeBType, object: IVector4 & {
@@ -47,7 +47,10 @@ export default class TileEventManager extends ObjectManager<TileEvent, ITileMana
47
47
  getPuddles(tile: Tile): TileEvent[] | undefined;
48
48
  canGather(tile: Tile): TileEvent | undefined;
49
49
  updateAll(): void;
50
- fireOverflow(x: number, y: number, z: number): boolean;
50
+ /**
51
+ * Overflow fire around the tile
52
+ */
53
+ fireOverflow(tile: Tile): boolean;
51
54
  canPickUp(tile: Tile): TileEvent | undefined;
52
55
  blocksTile(tile: Tile): boolean;
53
56
  /**
@@ -34,10 +34,14 @@ export interface IDropdownData<OptionId = string | number> {
34
34
  }
35
35
  export default class Dropdown<O = string | number> extends Component implements IRefreshableValue<IDropdownData<O>> {
36
36
  event: IEventEmitter<this, IDropdownEvents<O>>;
37
- readonly options: Map<O, Button>;
37
+ private using?;
38
+ private readonly _options;
39
+ get options(): Map<O, Button>;
38
40
  readonly inputButton: InputButton;
39
- protected optionsWrapper: Component;
40
- private readonly optionsWrapperWrapper;
41
+ protected _optionsWrapper: Component;
42
+ private get optionsWrapper();
43
+ private readonly _optionsWrapperWrapper;
44
+ private get optionsWrapperWrapper();
41
45
  private refreshMethod;
42
46
  private visibleOptions;
43
47
  private defaultOption?;
@@ -49,6 +53,7 @@ export default class Dropdown<O = string | number> extends Component implements
49
53
  private hovered;
50
54
  private shouldRetainLastFilter;
51
55
  constructor();
56
+ use(dropdown?: Dropdown<O>): this;
52
57
  retainLastFilter(retainLastFilter?: boolean): this;
53
58
  open(): void;
54
59
  close(input?: InputButton): boolean;
@@ -12,7 +12,9 @@ import { ItemType, ItemTypeGroup } from "game/item/IItem";
12
12
  import type { IDropdownOption } from "ui/component/Dropdown";
13
13
  import GroupDropdown from "ui/component/GroupDropdown";
14
14
  export default class ItemDropdown<OTHER_OPTIONS extends string = never> extends GroupDropdown<typeof ItemType, OTHER_OPTIONS, ItemTypeGroup, Exclude<ItemType, ItemType.None>> {
15
- constructor(defaultOption: OTHER_OPTIONS | Exclude<ItemType, ItemType.None>, options?: Iterable<IDropdownOption<OTHER_OPTIONS>>);
15
+ private canRefresh;
16
+ constructor(defaultOption: OTHER_OPTIONS | Exclude<ItemType, ItemType.None>, options?: Iterable<IDropdownOption<OTHER_OPTIONS>>, inherit?: boolean);
17
+ refresh(): this;
16
18
  protected filterEnum(value: ItemType): boolean;
17
19
  protected getGroupName(group: ItemTypeGroup): string;
18
20
  protected isInGroup(item: ItemType, group: ItemTypeGroup): boolean;
@@ -205,6 +205,8 @@ export default class InGameScreen extends BaseScreen {
205
205
  */
206
206
  updateTablesDirty(which?: "crafting" | "dismantle"): void;
207
207
  createSortMenu(container: JQuery, messageType: Message, containerSortInfo?: IContainerSortInfo): SortRow<number>;
208
+ getContainerSortInfo(index: "inventory" | "crafting-tabs" | number): IContainerSortInfo;
209
+ getDefaultSortType(index: "inventory" | "crafting-tabs" | number): SortType;
208
210
  sortItems(containerElement: JQuery, sortType: SortType, direction: SortDirection, messageType?: Message, activeSort?: boolean): void;
209
211
  onUpdateContainer(containerElement: JQuery, activeSort: boolean): void;
210
212
  updateSort(containerElement: JQuery, activeSort: boolean): 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.13.0-beta.dev.20230403.1",
4
+ "version": "2.13.0-beta.dev.20230405.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",