@wayward/types 2.13.0-beta.dev.20230414.1 → 2.13.0-beta.dev.20230416.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 (49) hide show
  1. package/definitions/game/event/EventEmitter.d.ts +1 -8
  2. package/definitions/game/game/doodad/Doodad.d.ts +1 -1
  3. package/definitions/game/game/entity/EntityMovable.d.ts +1 -0
  4. package/definitions/game/game/entity/Human.d.ts +2 -1
  5. package/definitions/game/game/entity/IEntity.d.ts +2 -1
  6. package/definitions/game/game/entity/action/ActionsRegistration.d.ts +3 -3
  7. package/definitions/game/game/entity/action/actions/Noclip.d.ts +1 -1
  8. package/definitions/game/game/entity/action/actions/ShipToIsland.d.ts +3 -1
  9. package/definitions/game/game/entity/action/usable/actions/UsableActionsWorld.d.ts +1 -1
  10. package/definitions/game/game/entity/action/usable/actions/doodad/IUsableActionsDoodad.d.ts +2 -2
  11. package/definitions/game/game/entity/creature/Creature.d.ts +3 -3
  12. package/definitions/game/game/entity/creature/CreatureManager.d.ts +2 -1
  13. package/definitions/game/game/entity/creature/ICreature.d.ts +5 -0
  14. package/definitions/game/game/entity/npc/NPC.d.ts +8 -1
  15. package/definitions/game/game/entity/npc/NPCManager.d.ts +5 -0
  16. package/definitions/game/game/entity/npc/npcs/Shipper.d.ts +9 -3
  17. package/definitions/game/game/entity/player/PlayerManager.d.ts +1 -1
  18. package/definitions/game/game/entity/player/quest/quest/Challenge.d.ts +5 -0
  19. package/definitions/game/game/inspection/InfoProvider.d.ts +1 -1
  20. package/definitions/game/game/inspection/Inspection.d.ts +1 -3
  21. package/definitions/game/game/island/IIsland.d.ts +3 -0
  22. package/definitions/game/game/item/ItemManager.d.ts +8 -8
  23. package/definitions/game/language/DictionaryMap.d.ts +1 -110
  24. package/definitions/game/language/dictionary/Message.d.ts +755 -957
  25. package/definitions/game/language/dictionary/Misc.d.ts +7 -9
  26. package/definitions/game/language/dictionary/UiTranslation.d.ts +812 -868
  27. package/definitions/game/mod/Mod.d.ts +2 -6
  28. package/definitions/game/mod/ModRegistry.d.ts +47 -47
  29. package/definitions/game/save/data/ISaveDataGlobal.d.ts +1 -3
  30. package/definitions/game/ui/component/Dropdown.d.ts +13 -1
  31. package/definitions/game/ui/component/EnumContextMenu.d.ts +1 -3
  32. package/definitions/game/ui/input/Bind.d.ts +7 -21
  33. package/definitions/game/ui/screen/screens/game/DialogManager.d.ts +3 -3
  34. package/definitions/game/ui/screen/screens/game/DialogMap.d.ts +2 -2
  35. package/definitions/game/ui/screen/screens/game/Dialogs.d.ts +1 -1
  36. package/definitions/game/ui/screen/screens/game/component/CanvasDialog.d.ts +1 -1
  37. package/definitions/game/ui/screen/screens/game/component/Dialog.d.ts +2 -1
  38. package/definitions/game/ui/screen/screens/game/component/Item.d.ts +1 -1
  39. package/definitions/game/ui/screen/screens/game/component/QuadrantComponent.d.ts +1 -1
  40. package/definitions/game/ui/screen/screens/game/dialog/BookDialog.d.ts +1 -1
  41. package/definitions/game/ui/screen/screens/game/dialog/IslandsSailDialog.d.ts +3 -0
  42. package/definitions/game/ui/screen/screens/game/dialog/{IslandsSelectionDialog.d.ts → IslandsShippingDialog.d.ts} +6 -3
  43. package/definitions/game/ui/screen/screens/game/dialog/islands/IslandsDialog.d.ts +3 -1
  44. package/definitions/game/utilities/class/Inject.d.ts +2 -6
  45. package/definitions/game/utilities/enum/EnumCursor.d.ts +1 -3
  46. package/definitions/game/utilities/enum/Enums.d.ts +5 -15
  47. package/definitions/game/utilities/object/Objects.d.ts +1 -1
  48. package/definitions/game/utilities/typesglobal/Descriptions.d.ts +1 -3
  49. package/package.json +1 -1
@@ -44,7 +44,6 @@ type Handler<H, F> = (host: H, ...args: ArgsOf<F>) => ReturnOf<F>;
44
44
  type WeakHandler<H, F> = WeakRef<Handler<H, F>>;
45
45
  type UndefinedFromVoid<V> = V extends void ? undefined : V;
46
46
  export interface IEventEmitter<H = any, E = any> {
47
- event: IEventEmitter<this, IEventEmitterEvents<H, E>>;
48
47
  emit<K extends keyof E>(event: K, ...args: ArgsOf<E[K]>): H;
49
48
  /**
50
49
  * Emit an event only to the subscribers of this emitter instance.
@@ -70,17 +69,11 @@ export interface IEventEmitter<H = any, E = any> {
70
69
  export interface IUntilSubscriber<H, E> {
71
70
  subscribe<K extends ArrayOr<keyof E>>(event: K, handler: IterableOr<Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>>, priority?: number): H;
72
71
  }
73
- interface IEventEmitterEvents<H, E> {
74
- subscribe<K extends keyof E>(event: keyof E, handler: Iterable<(keyof H) | Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>>): any;
75
- unsubscribe<K extends keyof E>(event: keyof E, handler: Iterable<(keyof H) | Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>>): any;
76
- }
77
- declare class EventEmitter<H, E> implements IEventEmitter<H, E> {
72
+ declare class EventEmitter<H, E> {
78
73
  private readonly host;
79
74
  private readonly hostClass;
80
75
  private readonly subscriptions;
81
76
  private readonly cachedEmitSelfHandlers;
82
- private eventEmitterMeta?;
83
- get event(): IEventEmitter<this, IEventEmitterEvents<H, E>>;
84
77
  constructor(host: H);
85
78
  raw(): IEventEmitter<H, E>;
86
79
  emitSelf<K extends keyof E>(event: K, ...args: ArgsOf<E[K]>): H;
@@ -85,6 +85,7 @@ export default class Doodad extends Entity<IDoodadDescription, DoodadType, Dooda
85
85
  minDur: number;
86
86
  private fireStage?;
87
87
  aberrant?: boolean;
88
+ bonusAttack?: number;
88
89
  builderIdentifier?: string;
89
90
  containedItems?: Item[];
90
91
  crafterIdentifier?: string;
@@ -104,7 +105,6 @@ export default class Doodad extends Entity<IDoodadDescription, DoodadType, Dooda
104
105
  stillContainer?: Item;
105
106
  tradedFrom?: string[];
106
107
  weight?: number;
107
- bonusAttack?: number;
108
108
  private _tileId?;
109
109
  /**
110
110
  * Separate property just for wells because isInGroup is still expensive for processWell()
@@ -117,4 +117,5 @@ export default abstract class EntityMovable<DescriptionType = unknown, TypeType
117
117
  get isFlying(): boolean;
118
118
  getMoveType(): MoveType;
119
119
  setMoveType(moveType: MoveType): void;
120
+ canSwapWith(entity: EntityMovable, source: string | undefined): boolean;
120
121
  }
@@ -47,6 +47,7 @@ import type Tile from "game/tile/Tile";
47
47
  import type { ICanSailAwayResult } from "game/tile/Tile";
48
48
  import type TileEvent from "game/tile/TileEvent";
49
49
  import Message from "language/dictionary/Message";
50
+ import type { ISerializedTranslation } from "language/ITranslation";
50
51
  import Translation from "language/Translation";
51
52
  import type FieldOfView from "renderer/fieldOfView/FieldOfView";
52
53
  import { CanASeeBType } from "renderer/fieldOfView/IFieldOfView";
@@ -72,7 +73,7 @@ export default abstract class Human<TypeType extends number = number> extends En
72
73
  fromY: number;
73
74
  crafted: Record<number, ICrafted>;
74
75
  customization: ICustomizations;
75
- deathBy: import("language/ITranslation").ISerializedTranslation;
76
+ deathBy: ISerializedTranslation;
76
77
  defense: PlayerDefense;
77
78
  defenses: number[];
78
79
  equippedOffHandDisabled?: ItemReference;
@@ -291,7 +291,8 @@ export interface IMoveToOptions {
291
291
  }
292
292
  export declare enum MoveAnimation {
293
293
  Normal = 0,
294
- Jump = 1
294
+ Jump = 1,
295
+ Teleport = 2
295
296
  }
296
297
  export declare enum MoveFlag {
297
298
  None = 0,
@@ -78,7 +78,8 @@ export declare const actionDescriptionsSlow: {
78
78
  84: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default<number>, void, {
79
79
  usable: true;
80
80
  }, [import("../../item/Item").default]>;
81
- 118: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.Player], import("../Human").default<number>, void, import("game/entity/action/IAction").IActionUsable, [import("../player/Player").default]>;
81
+ 118: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.Human], import("../Human").default<number>, void, import("game/entity/action/IAction").IActionUsable, [import("../Human").default<number>]>;
82
+ 125: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.NPCNearby, [import("game/entity/action/IAction").ActionArgument.Undefined, import("game/entity/action/IAction").ActionArgument.Integer32]], import("../Human").default<number>, void, import("game/entity/action/IAction").IActionUsable, [import("../npc/NPC").default, (number | undefined)?]>;
82
83
  55: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default<number>, void, import("game/entity/action/actions/Offer").IOfferCanUse, [import("../../item/Item").default]>;
83
84
  31: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../Human").default<number>, void, {
84
85
  usable: true;
@@ -125,7 +126,7 @@ export declare const actionDescriptionsSlow: {
125
126
  122: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.Integer32], import("../Human").default<number>, void, import("game/entity/action/actions/SetCreatureAi").ISetCreatureAiCanUse, [number]>;
126
127
  6: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default<number>, void, import("game/entity/action/actions/SetDown").ISetDownCanUse, [import("../../item/Item").default]>;
127
128
  123: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.Undefined, import("game/entity/action/IAction").ActionArgument.Integer32]], import("../player/Player").default, void, import("game/entity/action/IAction").IActionUsable, [(number | undefined)?]>;
128
- 119: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.NPCNearby, [import("game/entity/action/IAction").ActionArgument.Island, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Integer32, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default<number>, void, import("game/entity/action/actions/ShipToIsland").IShipToIslandCanUse, [import("../npc/NPC").default, (import("../../island/Island").default | undefined)?, (number | undefined)?]>;
129
+ 119: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.NPCNearby, [import("game/entity/action/IAction").ActionArgument.Island, import("game/entity/action/IAction").ActionArgument.Vector2, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Integer32, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default<number>, void, import("game/entity/action/actions/ShipToIsland").IShipToIslandCanUse, [import("../npc/NPC").default, (import("../../island/Island").default | import("../../../utilities/math/IVector").IVector2 | undefined)?, (number | undefined)?]>;
129
130
  94: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default<number>, void, import("game/entity/action/actions/Shoot").IShootCanUse, [import("../../item/Item").default]>;
130
131
  11: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemNearby, import("game/entity/action/IAction").ActionArgument.Doodad, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.RestType, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default<number>, void, import("game/entity/action/actions/Rest").IRestCanUse, [(import("../../doodad/Doodad").default | import("../../item/Item").default | undefined)?, (import("../IHuman").RestType | undefined)?]>;
131
132
  72: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default<number>, void, import("game/entity/action/actions/SmotherFire").ISmotherFireCanUse, [import("../../item/Item").default]>;
@@ -164,5 +165,4 @@ export declare const actionDescriptionsSlow: {
164
165
  105: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.String, import("game/entity/action/IAction").ActionArgument.Object], import("../Human").default<number>, void, import("game/entity/action/IAction").IActionUsable, [string, any?]>;
165
166
  107: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.Vector2Array, 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/IAction").IActionUsable, [(import("../../../utilities/math/IVector").IVector2[] | undefined)?, (boolean | undefined)?]>;
166
167
  92: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby, [import("game/entity/action/IAction").ActionArgument.ItemNearby, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default<number>, void, import("game/entity/action/actions/Upgrade").IUpgradeCanUse, [import("../../item/Item").default, (import("../../item/Item").default | undefined)?]>;
167
- 125: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.NPCNearby, [import("game/entity/action/IAction").ActionArgument.Undefined, import("game/entity/action/IAction").ActionArgument.Integer32]], import("../Human").default<number>, void, import("game/entity/action/IAction").IActionUsable, [import("../npc/NPC").default, (number | undefined)?]>;
168
168
  };
@@ -10,5 +10,5 @@
10
10
  */
11
11
  import { Action } from "game/entity/action/Action";
12
12
  import { ActionArgument } from "game/entity/action/IAction";
13
- declare const _default: Action<[ActionArgument.Player], import("../../Human").default<number>, void, import("game/entity/action/IAction").IActionUsable, [import("../../player/Player").default]>;
13
+ declare const _default: Action<[ActionArgument.Human], import("../../Human").default<number>, void, import("game/entity/action/IAction").IActionUsable, [import("../../Human").default<number>]>;
14
14
  export default _default;
@@ -14,11 +14,13 @@ import type { IActionUsable } from "game/entity/action/IAction";
14
14
  import { ActionArgument } from "game/entity/action/IAction";
15
15
  import type ShipperNPC from "game/entity/npc/npcs/Shipper";
16
16
  import type { IIslandPort } from "game/island/IIsland";
17
+ import type Island from "game/island/Island";
17
18
  import type { IVector2 } from "utilities/math/IVector";
18
19
  export interface IShipToIslandCanUse extends IActionUsable {
19
20
  shipper: ShipperNPC;
20
21
  path?: IVector2[];
21
22
  port?: IIslandPort;
23
+ island?: Island;
22
24
  }
23
- declare const _default: Action<[ActionArgument.NPCNearby, [ActionArgument.Island, ActionArgument.Undefined], [ActionArgument.Integer32, ActionArgument.Undefined]], Human<number>, void, IShipToIslandCanUse, [import("../../npc/NPC").default, (import("../../../island/Island").default | undefined)?, (number | undefined)?]>;
25
+ declare const _default: Action<[ActionArgument.NPCNearby, [ActionArgument.Island, ActionArgument.Vector2, ActionArgument.Undefined], [ActionArgument.Integer32, ActionArgument.Undefined]], Human<number>, void, IShipToIslandCanUse, [import("../../npc/NPC").default, (Island | IVector2 | undefined)?, (number | undefined)?]>;
24
26
  export default _default;
@@ -17,7 +17,7 @@ export declare enum WorldContextMenuClasses {
17
17
  OptionText = "world-context-menu-option-text"
18
18
  }
19
19
  export declare namespace WorldContextMenuClasses {
20
- const OptionSpecific: (enumValue: UsableActionType) => "world-context-menu-option-none" | "world-context-menu-option-actions" | "world-context-menu-option-use" | "world-context-menu-option-move" | "world-context-menu-option-commandattack" | "world-context-menu-option-commanddefend" | "world-context-menu-option-commandfollowclose" | "world-context-menu-option-commandfollowfar" | "world-context-menu-option-commandstay" | "world-context-menu-option-digwithhands" | "world-context-menu-option-dropall" | "world-context-menu-option-dropallofsamequality" | "world-context-menu-option-gatherwithhands" | "world-context-menu-option-harvestwithhands" | "world-context-menu-option-movetoinventory" | "world-context-menu-option-pickupexcrementwithhands" | "world-context-menu-option-restonground" | "world-context-menu-option-tillwithhands" | "world-context-menu-option-quickslotremove" | "world-context-menu-option-quickslotadd" | "world-context-menu-option-quickslotaddtofree" | "world-context-menu-option-quickslotaddtoslot" | "world-context-menu-option-dropmenu" | "world-context-menu-option-repairwithitem" | "world-context-menu-option-reinforcewithitem" | "world-context-menu-option-enhancewithitem" | "world-context-menu-option-enchantwithitem" | "world-context-menu-option-transmogrifywithitem" | "world-context-menu-option-upgradewithitem" | "world-context-menu-option-alterwithitem" | "world-context-menu-option-refinewithitem" | "world-context-menu-option-preservewithitem" | "world-context-menu-option-addfuelwithitem" | "world-context-menu-option-ignitewithitem" | "world-context-menu-option-absorbwithitem" | "world-context-menu-option-exudewithitem" | "world-context-menu-option-movetoinventorymenu" | "world-context-menu-option-movetoactivecontainermenu" | "world-context-menu-option-movetofacingcontainermenu" | "world-context-menu-option-moveall" | "world-context-menu-option-moveallofsamequality" | "world-context-menu-option-tradetradersell" | "world-context-menu-option-tradetraderbuy" | "world-context-menu-option-itemactions" | "world-context-menu-option-equipheld" | "world-context-menu-option-equiplegs" | "world-context-menu-option-equipchest" | "world-context-menu-option-equiphead" | "world-context-menu-option-equipwaist" | "world-context-menu-option-equipfeet" | "world-context-menu-option-equipneck" | "world-context-menu-option-equiphands" | "world-context-menu-option-equipback" | "world-context-menu-option-equipmainhand" | "world-context-menu-option-equipoffhand" | "world-context-menu-option-sleeponground" | "world-context-menu-option-commandmenu";
20
+ const OptionSpecific: (enumValue: UsableActionType) => "world-context-menu-option-none" | "world-context-menu-option-actions" | "world-context-menu-option-move" | "world-context-menu-option-use" | "world-context-menu-option-commandattack" | "world-context-menu-option-commanddefend" | "world-context-menu-option-commandfollowclose" | "world-context-menu-option-commandfollowfar" | "world-context-menu-option-commandstay" | "world-context-menu-option-quickslotremove" | "world-context-menu-option-quickslotadd" | "world-context-menu-option-quickslotaddtofree" | "world-context-menu-option-quickslotaddtoslot" | "world-context-menu-option-movetoinventory" | "world-context-menu-option-dropmenu" | "world-context-menu-option-dropall" | "world-context-menu-option-dropallofsamequality" | "world-context-menu-option-repairwithitem" | "world-context-menu-option-reinforcewithitem" | "world-context-menu-option-enhancewithitem" | "world-context-menu-option-enchantwithitem" | "world-context-menu-option-transmogrifywithitem" | "world-context-menu-option-upgradewithitem" | "world-context-menu-option-alterwithitem" | "world-context-menu-option-refinewithitem" | "world-context-menu-option-preservewithitem" | "world-context-menu-option-addfuelwithitem" | "world-context-menu-option-ignitewithitem" | "world-context-menu-option-absorbwithitem" | "world-context-menu-option-exudewithitem" | "world-context-menu-option-movetoinventorymenu" | "world-context-menu-option-movetoactivecontainermenu" | "world-context-menu-option-movetofacingcontainermenu" | "world-context-menu-option-moveall" | "world-context-menu-option-moveallofsamequality" | "world-context-menu-option-tradetradersell" | "world-context-menu-option-tradetraderbuy" | "world-context-menu-option-itemactions" | "world-context-menu-option-gatherwithhands" | "world-context-menu-option-harvestwithhands" | "world-context-menu-option-digwithhands" | "world-context-menu-option-tillwithhands" | "world-context-menu-option-pickupexcrementwithhands" | "world-context-menu-option-equipheld" | "world-context-menu-option-equiplegs" | "world-context-menu-option-equipchest" | "world-context-menu-option-equiphead" | "world-context-menu-option-equipwaist" | "world-context-menu-option-equipfeet" | "world-context-menu-option-equipneck" | "world-context-menu-option-equiphands" | "world-context-menu-option-equipback" | "world-context-menu-option-equipmainhand" | "world-context-menu-option-equipoffhand" | "world-context-menu-option-restonground" | "world-context-menu-option-sleeponground" | "world-context-menu-option-commandmenu";
21
21
  }
22
22
  export declare const UsableActionsWorldActions: UsableActionGenerator<[]>;
23
23
  export declare const UsableActionsWorldItemActions: UsableActionGenerator<[]>;
@@ -15,10 +15,10 @@ declare namespace IUsableActionsDoodad {
15
15
  function getUnder(player: Player, filter?: (doodad: Doodad) => any): Doodad | undefined;
16
16
  function getUnderOrFacing(player: Player, filter?: (doodad: Doodad) => any): Doodad | undefined;
17
17
  function validate(player: Player, doodad: Doodad | undefined): doodad is Doodad;
18
- const requireFacing: (filter?: ((doodad: Doodad) => any) | undefined) => {
18
+ const requireFacing: (filter?: ((doodad: Doodad, player: Player) => any) | undefined) => {
19
19
  find: (player: Player) => Doodad | undefined;
20
20
  };
21
- const requireUnderOrFacing: (filter?: ((doodad: Doodad) => any) | undefined) => {
21
+ const requireUnderOrFacing: (filter?: ((doodad: Doodad, player: Player) => any) | undefined) => {
22
22
  find: (player: Player) => Doodad | undefined;
23
23
  };
24
24
  }
@@ -10,7 +10,7 @@
10
10
  */
11
11
  import { SfxType } from "audio/IAudio";
12
12
  import type { IEventEmitter } from "event/EventEmitter";
13
- import type { CreatureAttackOutcome, CreatureType, ICreatureAttackOutcomeAttack, ICreatureDescription, ICreatureEvents, IDamageInfo, IHitch } from "game/entity/creature/ICreature";
13
+ import type { CreatureAttackOutcome, CreatureType, ICreatureAttackOutcomeAttack, ICreatureCheckMoveOptions, ICreatureDescription, ICreatureEvents, IDamageInfo, IHitch } from "game/entity/creature/ICreature";
14
14
  import EntityWithStats from "game/entity/EntityWithStats";
15
15
  import type Human from "game/entity/Human";
16
16
  import type { IEntityConstructorOptions, IStatChangeInfo } from "game/entity/IEntity";
@@ -89,6 +89,7 @@ export default class Creature extends EntityWithStats<ICreatureDescription, Crea
89
89
  canTarget(target: Human | Creature | undefined): boolean;
90
90
  moveToIsland(targetTile: Tile, owner: Human): void;
91
91
  restore(targetTile: Tile, preventRendering?: boolean): void;
92
+ skipNextUpdate(): void;
92
93
  overrideNextMovement(tile: Tile): void;
93
94
  preventNextMovement(): void;
94
95
  checkForBurn(moveType?: MoveType): boolean;
@@ -105,7 +106,6 @@ export default class Creature extends EntityWithStats<ICreatureDescription, Crea
105
106
  getEnemy(): Human | Creature | undefined;
106
107
  setEnemy(enemy: Human | Creature | undefined): void;
107
108
  private incrementEnemyAttempts;
108
- skipNextUpdate(): void;
109
109
  getMoveType(): MoveType;
110
110
  queueSoundEffect(type: SfxType, delay?: number, speed?: number): void;
111
111
  update(playingHumans: Human[]): boolean;
@@ -155,7 +155,7 @@ export default class Creature extends EntityWithStats<ICreatureDescription, Crea
155
155
  * @param willMove Set to true if the object is about to move to this tile. This method will confirm if theres an existing npc/creature there and return false if so
156
156
  * @returns 0 if the creature can move, otherwise an error code
157
157
  */
158
- checkCreatureMove(isClientside: boolean, tile: Tile, moveType: MoveType, willMove: boolean, ignoreHuman?: Human, ignoreScareCrow?: boolean): number;
158
+ checkCreatureMove(isClientside: boolean, tile: Tile, moveType: MoveType, willMove: boolean, options?: Partial<ICreatureCheckMoveOptions>): number;
159
159
  /**
160
160
  * Returns the times a creature has been tamed.
161
161
  * @returns number if the creature has been tamed and undefined if it has never been tamed.
@@ -11,6 +11,7 @@
11
11
  import type { Events, IEventEmitter } from "event/EventEmitter";
12
12
  import CombatStrengthManager from "game/entity/CombatStrengthManager";
13
13
  import Creature from "game/entity/creature/Creature";
14
+ import type { ICreatureCheckMoveOptions } from "game/entity/creature/ICreature";
14
15
  import { CreatureType, SpawnGroup, TileGroup } from "game/entity/creature/ICreature";
15
16
  import EntityManager from "game/entity/EntityManager";
16
17
  import type Human from "game/entity/Human";
@@ -70,7 +71,7 @@ export default class CreatureManager extends EntityManager<Creature> {
70
71
  * @param willMove Set to true if the object is about to move to this tile. This method will confirm if theres an existing npc/creature there and return false if so
71
72
  * @return Blocked penalty - Do no return 0!
72
73
  */
73
- getMovePenalty(moveType: MoveType, tile: Tile, willMove: boolean, ignoreHuman?: Human): number;
74
+ getMovePenalty(moveType: MoveType, tile: Tile, willMove: boolean, options?: Partial<ICreatureCheckMoveOptions>): number;
74
75
  /**
75
76
  * wasm calls this when calculating penalties for flow fields
76
77
  */
@@ -421,3 +421,8 @@ export interface ICreatureAttackOutcomeAttack extends ICreatureAttackOutcomeBase
421
421
  damageScale: number;
422
422
  }
423
423
  export type CreatureAttackOutcome = ICreatureAttackOutcomeNoAttack | ICreatureAttackOutcomeHidden | ICreatureAttackOutcomeAttack;
424
+ export interface ICreatureCheckMoveOptions {
425
+ ignoreHuman: Human;
426
+ ignoreScareCrow: boolean;
427
+ ignoreMoveTypeNone: boolean;
428
+ }
@@ -48,6 +48,7 @@ export default abstract class NPC extends Human<NPCType> {
48
48
  weightCapacity: number;
49
49
  properties?: IProperties;
50
50
  talked?: Set<string>;
51
+ private shouldSkipNextUpdate?;
51
52
  static getRegistrarId(): number;
52
53
  static setRegistrarId(id: number): void;
53
54
  constructor(entityOptions?: IEntityConstructorOptions<NPCType>);
@@ -84,6 +85,12 @@ export default abstract class NPC extends Human<NPCType> {
84
85
  isWaiting(): boolean;
85
86
  getDamageModifier(): number;
86
87
  makeHostile(): void;
88
+ /**
89
+ * Allow swapping with npcs
90
+ */
91
+ canSwapWith(human: Human, source: string | undefined): boolean;
92
+ skipNextUpdate(): void;
93
+ overrideNextMovement(tile: Tile): void;
87
94
  getPublicContainer(): IContainer | undefined;
88
95
  /**
89
96
  * The actions available to use with this npc
@@ -149,7 +156,7 @@ export default abstract class NPC extends Human<NPCType> {
149
156
  protected changeZ(toZ: number, fromZ: number): boolean | void | undefined;
150
157
  protected updateTile(fromTile: Tile, toTile: Tile): boolean;
151
158
  protected postMove(): void;
152
- canMoveToTile(moveType: MoveType, tile: Tile): -1 | 0 | -2 | -3 | -4 | -5 | -6;
159
+ canMoveToTile(moveType: MoveType, tile: Tile, ignoreHuman?: Human): -1 | 0 | -2 | -3 | -4 | -5 | -6;
153
160
  getWeightOrStaminaMovementPenalty(): number;
154
161
  get asMerchant(): MerchantNPC | undefined;
155
162
  get asShipper(): ShipperNPC | undefined;
@@ -13,6 +13,7 @@ import type { IEntityCanCreateOptions } from "game/entity/EntityManager";
13
13
  import EntityManager from "game/entity/EntityManager";
14
14
  import type { NPCType } from "game/entity/npc/INPCs";
15
15
  import NPC from "game/entity/npc/NPC";
16
+ import type ShipperNPC from "game/entity/npc/npcs/Shipper";
16
17
  import type Tile from "game/tile/Tile";
17
18
  export interface INPCCanCreateOptions extends IEntityCanCreateOptions {
18
19
  uniqueNpcType?: string;
@@ -44,4 +45,8 @@ export default class NPCManager extends EntityManager<NPC> {
44
45
  addPlayerLike(npc: NPC): void;
45
46
  removePlayerLike(npc: NPC): void;
46
47
  updateAll(): void;
48
+ /**
49
+ * Get an array of shippers that are in the process of shipping things to another island
50
+ */
51
+ getPendingOutboundShippers(): ShipperNPC[];
47
52
  }
@@ -15,7 +15,7 @@ import { AiType, MoveType } from "game/entity/IEntity";
15
15
  import { EquipType } from "game/entity/IHuman";
16
16
  import type { INPCConstructorOptions } from "game/entity/npc/INPC";
17
17
  import NPC from "game/entity/npc/NPC";
18
- import type { IIslandPort } from "game/island/IIsland";
18
+ import type { IIslandPort, IslandId } from "game/island/IIsland";
19
19
  import type Island from "game/island/Island";
20
20
  import type { IContainer } from "game/item/IItem";
21
21
  import { ItemType } from "game/item/IItem";
@@ -26,8 +26,12 @@ export declare enum ShipperNPCInteractType {
26
26
  OpenContainer = 0,
27
27
  ShipToIsland = 1
28
28
  }
29
+ interface IShipTarget {
30
+ islandId: IslandId;
31
+ portId: number;
32
+ }
29
33
  export default class ShipperNPC extends NPC {
30
- private shipTarget;
34
+ shipTarget: IShipTarget | undefined;
31
35
  private nearbyPortId;
32
36
  constructor(options?: INPCConstructorOptions);
33
37
  spawn(): void;
@@ -39,6 +43,7 @@ export default class ShipperNPC extends NPC {
39
43
  * Closes container dialogs
40
44
  */
41
45
  closeContainerDialogs(): void;
46
+ canSailTo(x: number, y: number): boolean;
42
47
  getPublicContainer(): IContainer | undefined;
43
48
  protected getReputationChangeOnDeath(): number;
44
49
  protected getDefaultName(): import("../../../../language/impl/TranslationImpl").default;
@@ -55,7 +60,8 @@ export default class ShipperNPC extends NPC {
55
60
  get asMerchant(): undefined;
56
61
  get asShipper(): ShipperNPC;
57
62
  getShipContainerItem(): (Item & IContainer) | undefined;
58
- canMoveToTile(moveType: MoveType, tile: Tile): -1 | 0 | -2 | -3 | -4 | -5 | -6;
63
+ canMoveToTile(moveType: MoveType, tile: Tile, ignoreHuman?: Human): -1 | 0 | -2 | -3 | -4 | -5 | -6;
59
64
  shipToPort(island: Island, port: IIslandPort, pathToEdge: IVector2[]): void;
60
65
  private moveToPort;
61
66
  }
67
+ export {};
@@ -66,7 +66,7 @@ export default class PlayerManager extends EventEmitter.Host<IPlayerManagerEvent
66
66
  * Support loading single player saves in dedicated servers
67
67
  * All while not losing data for any players - regardless of if the player was in the server or not at the time of the backup
68
68
  */
69
- repair(options: Partial<IPlayOptions>): void;
69
+ repair(options: Partial<IPlayOptions>): Promise<void>;
70
70
  /**
71
71
  * Removes and deletes a player.
72
72
  * Use with caution!
@@ -41,6 +41,11 @@ export default class Challenge extends Quest {
41
41
  protected createRequirements(island: Island): Array<IQuestRequirement<any, any>>;
42
42
  protected onUpdate(quest: QuestInstance): void;
43
43
  protected onRequirementComplete(quest: QuestInstance, completedRequirement: RequirementInstance): void;
44
+ /**
45
+ *
46
+ * @param island
47
+ * @returns Technically a IQuestRequirement<any, any>, but specifying the exact types makes the typing much faster
48
+ */
44
49
  private createRandomRequirement;
45
50
  private getSpawnableCreatures;
46
51
  }
@@ -141,7 +141,7 @@ export declare class SimpleInfoProvider extends InfoProvider {
141
141
  private childComponentClass;
142
142
  private validWhen?;
143
143
  constructor(...translations: Array<TranslationGenerator | InfoProvider>);
144
- get(): (import("../../language/ITranslation").ISerializedTranslation | import("../../language/impl/TranslationImpl").default | import("../../language/dictionary/UiTranslation").default | (() => import("../../language/ITranslation").ISerializedTranslation | import("../../language/impl/TranslationImpl").default | Iterable<import("../../utilities/string/Interpolator").IStringSection> | import("../../language/dictionary/UiTranslation").default | undefined) | InfoProvider)[];
144
+ get(): (import("../../language/impl/TranslationImpl").default | import("../../language/ITranslation").ISerializedTranslation | import("../../language/dictionary/UiTranslation").default | (() => import("../../language/impl/TranslationImpl").default | import("../../language/ITranslation").ISerializedTranslation | Iterable<import("../../utilities/string/Interpolator").IStringSection> | import("../../language/dictionary/UiTranslation").default | undefined) | InfoProvider)[];
145
145
  add(...translations: Array<TranslationGenerator | InfoProvider | Falsy>): this;
146
146
  onlyIfHasContents(): this | undefined;
147
147
  addInfoGetter(provider: () => InfoProvider | undefined): this;
@@ -20,9 +20,7 @@ import type { IVector3 } from "utilities/math/IVector";
20
20
  export default abstract class Inspection<O> extends InfoProvider {
21
21
  readonly type: InspectType;
22
22
  readonly value: O;
23
- static createEnumReferenceHandler<R extends ReferenceType, E, K extends string>(referenceType: R, enumObject: {
24
- [key in K]: E;
25
- }, predicate?: (reference: [R, E], context?: InfoProviderContext) => any): (type: InspectType, value: unknown, context?: InfoProviderContext) => boolean;
23
+ static createEnumReferenceHandler<R extends ReferenceType, E, K extends string>(referenceType: R, enumObject: Record<K, E>, predicate?: (reference: [R, E], context?: InfoProviderContext) => any): (type: InspectType, value: unknown, context?: InfoProviderContext) => boolean;
26
24
  static createAnyHandler(...handlers: Array<Exclude<InspectionClass["handles"], undefined>>): (type: InspectType, ...args: any[]) => boolean;
27
25
  static createReferenceHandler<REFTYPE extends EnumReferenceTypes>(referenceType: REFTYPE, handler?: (resolvedReference: EnumReferenceResolved<REFTYPE>, context?: InfoProviderContext) => any): (type: InspectType, value: unknown, context?: InfoProviderContext) => boolean;
28
26
  static verifyHumanity(_: any, context?: InfoProviderContext): boolean;
@@ -113,6 +113,7 @@ export interface IIslandLoadOptions {
113
113
  pauseAndShowLoadingScreen?: boolean;
114
114
  multiplayerLoadingDescription?: MultiplayerLoadingDescription;
115
115
  newIslandOverrides?: Partial<INewIslandOverrides>;
116
+ disableLoadingScreen?: boolean;
116
117
  }
117
118
  export interface IMoveToIslandOptions {
118
119
  spawnPosition: IVector2;
@@ -122,6 +123,8 @@ export interface IMoveToIslandOptions {
122
123
  respawn: boolean;
123
124
  newIslandOverrides: Partial<INewIslandOverrides>;
124
125
  targetPortId: number;
126
+ disableLoadingScreen: boolean;
127
+ nestedTravelCount: number;
125
128
  }
126
129
  export interface INewIslandOverrides {
127
130
  biomeType: BiomeType;
@@ -66,22 +66,22 @@ export interface IItemManagerEvents {
66
66
  }
67
67
  export default class ItemManager extends ObjectManager<Item, IItemManagerEvents> {
68
68
  readonly worldContainer: IContainer;
69
- private static cachedBestItemForTier;
70
- private static cachedDefaultItemForGroup;
71
- private static cachedEquippables;
72
- private static cachedHighestItemActionTierForAction;
73
- private static cachedItemGroups;
74
69
  private static cachedItemTypeGroups;
75
70
  private static cachedItemTypes;
76
71
  private static cachedItemTypesWithRecipes;
77
- private static cachedWeights;
72
+ private static cachedUseItemActions;
73
+ private static readonly cachedBestItemForTier;
74
+ private static readonly cachedDefaultItemForGroup;
75
+ private static readonly cachedEquippables;
78
76
  private static readonly cachedGroupItems;
77
+ private static readonly cachedHighestItemActionTierForAction;
78
+ private static readonly cachedItemGroups;
79
79
  private static readonly cachedItemGroupsUsedInRecipes;
80
80
  private static readonly cachedItemsThatAreAcceptedAsOffer;
81
81
  private static readonly cachedItemsThatAreUsedForGrowingPlants;
82
82
  private static readonly cachedItemsThatAreUsedInRecipes;
83
- private static cachedUseItemActions;
84
- static cachedItemSpawns: OptionalDescriptions<BiomeType, OptionalDescriptions<WorldZ, OptionalDescriptions<TerrainType, ItemType[]>>>;
83
+ private static readonly cachedWeights;
84
+ static readonly cachedItemSpawns: Map<BiomeType, OptionalDescriptions<WorldZ, OptionalDescriptions<TerrainType, ItemType[]>>>;
85
85
  static getItemTypes(): readonly ItemType[];
86
86
  static getItemsWithRecipes(): readonly ItemType[];
87
87
  static getBestItemForTier(item: ItemType | ItemTypeGroup): ItemType | undefined;
@@ -312,116 +312,7 @@ export type DictionaryEntryEnums = {
312
312
  [DICTIONARY in keyof typeof dictionaryMap]: (typeof dictionaryMap)[DICTIONARY] extends infer ENTRY_ENUM ? ENTRY_ENUM[keyof ENTRY_ENUM] : never;
313
313
  };
314
314
  declare function getByEnum(enumObject: DictionaryEnum): Dictionary;
315
- declare const dictionaries: {
316
- 0: typeof SYMBOL_ANY_DICTIONARY | Enum;
317
- 1: typeof SYMBOL_ANY_DICTIONARY | Enum;
318
- 2: typeof SYMBOL_ANY_DICTIONARY | Enum;
319
- 3: typeof SYMBOL_ANY_DICTIONARY | Enum;
320
- 4: typeof SYMBOL_ANY_DICTIONARY | Enum;
321
- 5: typeof SYMBOL_ANY_DICTIONARY | Enum;
322
- 6: typeof SYMBOL_ANY_DICTIONARY | Enum;
323
- 7: typeof SYMBOL_ANY_DICTIONARY | Enum;
324
- 8: typeof SYMBOL_ANY_DICTIONARY | Enum;
325
- 9: typeof SYMBOL_ANY_DICTIONARY | Enum;
326
- 10: typeof SYMBOL_ANY_DICTIONARY | Enum;
327
- 11: typeof SYMBOL_ANY_DICTIONARY | Enum;
328
- 12: typeof SYMBOL_ANY_DICTIONARY | Enum;
329
- 13: typeof SYMBOL_ANY_DICTIONARY | Enum;
330
- 14: typeof SYMBOL_ANY_DICTIONARY | Enum;
331
- 15: typeof SYMBOL_ANY_DICTIONARY | Enum;
332
- 16: typeof SYMBOL_ANY_DICTIONARY | Enum;
333
- 17: typeof SYMBOL_ANY_DICTIONARY | Enum;
334
- 18: typeof SYMBOL_ANY_DICTIONARY | Enum;
335
- 19: typeof SYMBOL_ANY_DICTIONARY | Enum;
336
- 20: typeof SYMBOL_ANY_DICTIONARY | Enum;
337
- 21: typeof SYMBOL_ANY_DICTIONARY | Enum;
338
- 22: typeof SYMBOL_ANY_DICTIONARY | Enum;
339
- 23: typeof SYMBOL_ANY_DICTIONARY | Enum;
340
- 24: typeof SYMBOL_ANY_DICTIONARY | Enum;
341
- 25: typeof SYMBOL_ANY_DICTIONARY | Enum;
342
- 26: typeof SYMBOL_ANY_DICTIONARY | Enum;
343
- 27: typeof SYMBOL_ANY_DICTIONARY | Enum;
344
- 28: typeof SYMBOL_ANY_DICTIONARY | Enum;
345
- 29: typeof SYMBOL_ANY_DICTIONARY | Enum;
346
- 30: typeof SYMBOL_ANY_DICTIONARY | Enum;
347
- 31: typeof SYMBOL_ANY_DICTIONARY | Enum;
348
- 32: typeof SYMBOL_ANY_DICTIONARY | Enum;
349
- 33: typeof SYMBOL_ANY_DICTIONARY | Enum;
350
- 34: typeof SYMBOL_ANY_DICTIONARY | Enum;
351
- 35: typeof SYMBOL_ANY_DICTIONARY | Enum;
352
- 36: typeof SYMBOL_ANY_DICTIONARY | Enum;
353
- 37: typeof SYMBOL_ANY_DICTIONARY | Enum;
354
- 38: typeof SYMBOL_ANY_DICTIONARY | Enum;
355
- 39: typeof SYMBOL_ANY_DICTIONARY | Enum;
356
- 40: typeof SYMBOL_ANY_DICTIONARY | Enum;
357
- 41: typeof SYMBOL_ANY_DICTIONARY | Enum;
358
- 42: typeof SYMBOL_ANY_DICTIONARY | Enum;
359
- 43: typeof SYMBOL_ANY_DICTIONARY | Enum;
360
- 44: typeof SYMBOL_ANY_DICTIONARY | Enum;
361
- 45: typeof SYMBOL_ANY_DICTIONARY | Enum;
362
- 46: typeof SYMBOL_ANY_DICTIONARY | Enum;
363
- 47: typeof SYMBOL_ANY_DICTIONARY | Enum;
364
- 48: typeof SYMBOL_ANY_DICTIONARY | Enum;
365
- 49: typeof SYMBOL_ANY_DICTIONARY | Enum;
366
- 50: typeof SYMBOL_ANY_DICTIONARY | Enum;
367
- 51: typeof SYMBOL_ANY_DICTIONARY | Enum;
368
- 52: typeof SYMBOL_ANY_DICTIONARY | Enum;
369
- 53: typeof SYMBOL_ANY_DICTIONARY | Enum;
370
- 54: typeof SYMBOL_ANY_DICTIONARY | Enum;
371
- 55: typeof SYMBOL_ANY_DICTIONARY | Enum;
372
- 56: typeof SYMBOL_ANY_DICTIONARY | Enum;
373
- 57: typeof SYMBOL_ANY_DICTIONARY | Enum;
374
- 58: typeof SYMBOL_ANY_DICTIONARY | Enum;
375
- 59: typeof SYMBOL_ANY_DICTIONARY | Enum;
376
- 60: typeof SYMBOL_ANY_DICTIONARY | Enum;
377
- 61: typeof SYMBOL_ANY_DICTIONARY | Enum;
378
- 62: typeof SYMBOL_ANY_DICTIONARY | Enum;
379
- 63: typeof SYMBOL_ANY_DICTIONARY | Enum;
380
- 64: typeof SYMBOL_ANY_DICTIONARY | Enum;
381
- 65: typeof SYMBOL_ANY_DICTIONARY | Enum;
382
- 66: typeof SYMBOL_ANY_DICTIONARY | Enum;
383
- 67: typeof SYMBOL_ANY_DICTIONARY | Enum;
384
- 68: typeof SYMBOL_ANY_DICTIONARY | Enum;
385
- 69: typeof SYMBOL_ANY_DICTIONARY | Enum;
386
- 70: typeof SYMBOL_ANY_DICTIONARY | Enum;
387
- 71: typeof SYMBOL_ANY_DICTIONARY | Enum;
388
- 72: typeof SYMBOL_ANY_DICTIONARY | Enum;
389
- 73: typeof SYMBOL_ANY_DICTIONARY | Enum;
390
- 74: typeof SYMBOL_ANY_DICTIONARY | Enum;
391
- 75: typeof SYMBOL_ANY_DICTIONARY | Enum;
392
- 76: typeof SYMBOL_ANY_DICTIONARY | Enum;
393
- 77: typeof SYMBOL_ANY_DICTIONARY | Enum;
394
- 78: typeof SYMBOL_ANY_DICTIONARY | Enum;
395
- 79: typeof SYMBOL_ANY_DICTIONARY | Enum;
396
- 80: typeof SYMBOL_ANY_DICTIONARY | Enum;
397
- 81: typeof SYMBOL_ANY_DICTIONARY | Enum;
398
- 82: typeof SYMBOL_ANY_DICTIONARY | Enum;
399
- 83: typeof SYMBOL_ANY_DICTIONARY | Enum;
400
- 84: typeof SYMBOL_ANY_DICTIONARY | Enum;
401
- 85: typeof SYMBOL_ANY_DICTIONARY | Enum;
402
- 86: typeof SYMBOL_ANY_DICTIONARY | Enum;
403
- 87: typeof SYMBOL_ANY_DICTIONARY | Enum;
404
- 88: typeof SYMBOL_ANY_DICTIONARY | Enum;
405
- 89: typeof SYMBOL_ANY_DICTIONARY | Enum;
406
- 90: typeof SYMBOL_ANY_DICTIONARY | Enum;
407
- 91: typeof SYMBOL_ANY_DICTIONARY | Enum;
408
- 92: typeof SYMBOL_ANY_DICTIONARY | Enum;
409
- 93: typeof SYMBOL_ANY_DICTIONARY | Enum;
410
- 94: typeof SYMBOL_ANY_DICTIONARY | Enum;
411
- 95: typeof SYMBOL_ANY_DICTIONARY | Enum;
412
- 96: typeof SYMBOL_ANY_DICTIONARY | Enum;
413
- 97: typeof SYMBOL_ANY_DICTIONARY | Enum;
414
- 98: typeof SYMBOL_ANY_DICTIONARY | Enum;
415
- 99: typeof SYMBOL_ANY_DICTIONARY | Enum;
416
- 100: typeof SYMBOL_ANY_DICTIONARY | Enum;
417
- 101: typeof SYMBOL_ANY_DICTIONARY | Enum;
418
- 102: typeof SYMBOL_ANY_DICTIONARY | Enum;
419
- 103: typeof SYMBOL_ANY_DICTIONARY | Enum;
420
- 104: typeof SYMBOL_ANY_DICTIONARY | Enum;
421
- 105: typeof SYMBOL_ANY_DICTIONARY | Enum;
422
- 106: typeof SYMBOL_ANY_DICTIONARY | Enum;
423
- 107: typeof SYMBOL_ANY_DICTIONARY | Enum;
424
- } & Record<number, typeof SYMBOL_ANY_DICTIONARY | Enum | undefined> & {
315
+ declare const dictionaries: Record<Dictionary, typeof SYMBOL_ANY_DICTIONARY | Enum> & Record<number, typeof SYMBOL_ANY_DICTIONARY | Enum | undefined> & {
425
316
  getByEnum: typeof getByEnum;
426
317
  };
427
318
  export default dictionaries;