@wayward/types 2.14.4-beta.dev.20250329.1 → 2.14.4-beta.dev.20250404.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/game/game/ILoot.d.ts +1 -0
- package/definitions/game/game/doodad/Doodad.d.ts +1 -1
- package/definitions/game/game/entity/Entity.d.ts +6 -1
- package/definitions/game/game/entity/EntityManager.d.ts +10 -3
- package/definitions/game/game/entity/action/ActionsRegistration.d.ts +3 -3
- package/definitions/game/game/entity/action/actions/SetCreatureAi.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/SetCreatureAiAll.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/SetTitle.d.ts +1 -1
- package/definitions/game/game/entity/creature/Creature.d.ts +3 -0
- package/definitions/game/game/entity/creature/CreatureManager.d.ts +2 -1
- package/definitions/game/game/item/IItemManager.d.ts +2 -1
- package/definitions/game/game/milestones/milestone/Runekeeper.d.ts +1 -1
- package/definitions/game/language/dictionary/Message.d.ts +2 -1
- package/definitions/game/renderer/notifier/INotifier.d.ts +12 -2
- package/definitions/game/ui/screen/screens/game/dialog/EquipmentDialog.d.ts +1 -1
- package/definitions/utilities/event/EventEmitter.d.ts +10 -2
- package/package.json +1 -1
@@ -253,7 +253,7 @@ export default class Doodad extends EntityMovable<IDoodadDescription, DoodadType
|
|
253
253
|
setOffTrap(human?: Human, withMessage?: boolean, damage?: boolean): void;
|
254
254
|
getGrowthParticles(): IRGB | undefined;
|
255
255
|
/**
|
256
|
-
* Increased the fertility (spread) of a plant/growing doodad.
|
256
|
+
* Increased the fertility (spread) of a plant/growing doodad when its ripening.
|
257
257
|
* @param bypassChange Set to true if you just want to check if fertility can be increased.
|
258
258
|
* @returns True or false depending on if it increased in fertility or not.
|
259
259
|
*/
|
@@ -122,10 +122,15 @@ export default abstract class Entity<DescriptionType = unknown, TypeType extends
|
|
122
122
|
* This is called clientside the first time the renderer seens the entity
|
123
123
|
*/
|
124
124
|
onFirstRender(renderer: Renderer): void;
|
125
|
-
|
125
|
+
getCurrentMarker(): Readonly<MarkerDescription> | undefined;
|
126
126
|
setMarkerIconHidden(hidden: boolean): void;
|
127
|
+
/**
|
128
|
+
* Adds a marker that shows up over the entity
|
129
|
+
* @param description The marker description
|
130
|
+
*/
|
127
131
|
addMarker(description: MappedOmit<MarkerDescription, "guid">): void;
|
128
132
|
removeMarker(...types: MarkerType[]): void;
|
133
|
+
getDynamicMarker(type: string): MarkerType | undefined;
|
129
134
|
getProducedTemperature(): number | undefined;
|
130
135
|
setName(renamed: string | ISerializedTranslation | undefined): void;
|
131
136
|
canInspect(human: Human): boolean;
|
@@ -24,7 +24,10 @@ export interface IEntityCanCreateOptions {
|
|
24
24
|
allowOverDooadsAndTileEvents?: boolean;
|
25
25
|
blockOnScarecrow?: boolean;
|
26
26
|
}
|
27
|
-
export
|
27
|
+
export interface IEntityRemoveOptions {
|
28
|
+
keepMarker?: boolean;
|
29
|
+
}
|
30
|
+
export default abstract class EntityManager<T extends Entity, RemoveOptions extends IEntityRemoveOptions = IEntityRemoveOptions> extends ObjectManager<T, IEntityManagerEvents<T>> implements IEntityManager<T> {
|
28
31
|
/**
|
29
32
|
* Indicates if objects should be re-registered to the memory leak detector after loading
|
30
33
|
*/
|
@@ -34,10 +37,14 @@ export default abstract class EntityManager<T extends Entity, IRemoveOptions = u
|
|
34
37
|
* @param entity Entity to remove
|
35
38
|
* @returns Return true if this method handled tile updates
|
36
39
|
*/
|
37
|
-
protected abstract onRemove(entity: T, options?:
|
40
|
+
protected abstract onRemove(entity: T, options?: RemoveOptions & IEntityRemoveOptions): boolean;
|
38
41
|
protected abstract loadEntity?(entity: T): void;
|
39
42
|
load(): void;
|
40
|
-
|
43
|
+
/**
|
44
|
+
* Restores a previous removed entity
|
45
|
+
*/
|
46
|
+
restore(entity: T): void;
|
47
|
+
remove(entity: T, options?: RemoveOptions): void;
|
41
48
|
updateFov(humanBounds: IHumanBound[]): void;
|
42
49
|
/**
|
43
50
|
* Checks if the target position is a good spot for a new entity
|
@@ -139,10 +139,10 @@ export declare const actionDescriptionsSlow: {
|
|
139
139
|
130: import("./Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.DoodadNearby]], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, boolean, import("@wayward/game/game/entity/action/actions/Rotate").IRotate, [(import("../../doodad/Doodad").default | undefined)?]>;
|
140
140
|
34: import("./Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby], [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Boolean]], import("../player/Player").default, void, import("@wayward/game/game/entity/action/actions/SailToCivilization").ISailToCivilizationCanUse, [(import("../../item/Item").default | undefined)?, (boolean | undefined)?]>;
|
141
141
|
96: import("./Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.Integer32, import("@wayward/game/game/entity/action/IAction").ActionArgument.Integer32, [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Integer32]], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/actions/SailToIsland").ISailToIslandCanUse, [number, number, (number | undefined)?]>;
|
142
|
-
122: import("./Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Creature], [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemInventory], import("./argument/ActionArgumentEnum").default<import("../ai/AI").AiType, "None" | "Attack" | "Pacified" | "
|
143
|
-
136: import("./Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Creature], [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemInventory], import("./argument/ActionArgumentEnum").default<import("../ai/AI").AiType, "None" | "Attack" | "Pacified" | "
|
142
|
+
122: import("./Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Creature], [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemInventory], import("./argument/ActionArgumentEnum").default<import("../ai/AI").AiType, "None" | "Attack" | "Pacified" | "Idle" | "Neutral" | "Scared" | "Hostile" | "Fearless" | "HostileFearless" | "Alerted" | "Waiting" | "Hidden" | "CanSwapWith" | "CanSwapLayers" | "FollowClose" | "FollowFar" | "Stay" | "AttackAdjacent" | "AttackInSight" | "Defend" | "Heel">], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/actions/SetCreatureAi").ISetCreatureAiCanUse, [import("../creature/Creature").default | undefined, import("../../item/Item").default | undefined, import("../ai/AI").AiType]>;
|
143
|
+
136: import("./Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Creature], [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemInventory], import("./argument/ActionArgumentEnum").default<import("../ai/AI").AiType, "None" | "Attack" | "Pacified" | "Idle" | "Neutral" | "Scared" | "Hostile" | "Fearless" | "HostileFearless" | "Alerted" | "Waiting" | "Hidden" | "CanSwapWith" | "CanSwapLayers" | "FollowClose" | "FollowFar" | "Stay" | "AttackAdjacent" | "AttackInSight" | "Defend" | "Heel">], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/actions/SetCreatureAi").ISetCreatureAiCanUse, [import("../creature/Creature").default | undefined, import("../../item/Item").default | undefined, import("../ai/AI").AiType]>;
|
144
144
|
6: import("./Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/actions/SetDown").ISetDownCanUse, [import("../../item/Item").default]>;
|
145
|
-
123: import("./Action").Action<[[import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("./argument/ActionArgumentEnum").default<import("@wayward/game/game/entity/action/actions/SetTitle").TitleType, "Skill" | "Milestone">], [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("./argument/ActionArgumentEnum").default<import("../../milestones/IMilestone").Milestone, "Abnormalizer" | "Chef" | "Exterminator" | "Crafter" | "Gardener" | "Gatherer" | "Hunter" | "Locksmith" | "ReaperOfSouls" | "Survivor" | "Pitcher" | "Trapsetter" | "TreasureHunter" | "Collector" | "Explorer" | "Grandmaster" | "Prepared" | "Doctor" | "Artificer" | "Returned" | "
|
145
|
+
123: import("./Action").Action<[[import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("./argument/ActionArgumentEnum").default<import("@wayward/game/game/entity/action/actions/SetTitle").TitleType, "Skill" | "Milestone">], [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("./argument/ActionArgumentEnum").default<import("../../milestones/IMilestone").Milestone, "Navigator" | "Abnormalizer" | "Chef" | "Exterminator" | "Crafter" | "Gardener" | "Gatherer" | "Hunter" | "Locksmith" | "ReaperOfSouls" | "Survivor" | "Pitcher" | "Trapsetter" | "TreasureHunter" | "Collector" | "Explorer" | "Grandmaster" | "Prepared" | "Doctor" | "Artificer" | "Returned" | "DragonSlayer" | "Treasurer" | "Pulchritudinous" | "Friendly" | "Malevolent" | "Benevolent" | "Boundless" | "Talented" | "Weathered" | "Seasoned" | "Pacifier" | "Merchant" | "Notekeeper" | "Operator" | "Huntsman" | "Contender" | "Challenger" | "DestroyerOfMagi" | "Helmsman" | "Multitasker" | "Apocryphal" | "Diverse" | "InternalDiscoveredBoats" | "Traitor" | "MasterOfAll" | "Rouseabout" | "Murderer" | "Retailer" | "Masochist" | "Versatile" | "InternalStatDiscovery" | "Dedicated" | "Hounded" | "Serene" | "InternalRuneOrAltarDiscovery" | "Curator" | "Thaumaturgic" | "Runekeeper" | "InternalDeityDiscovery" | "InternalMerchantsDiscovery" | "InternalDeitySystemDiscovery" | "Invoker" | "InternalDeityInvoked" | "InternalInsulationDiscovery" | "Turbulent" | "Statistician" | "Afflicted" | "Exsanguinated">, import("./argument/ActionArgumentEnum").default<import("../IHuman").SkillType, "None" | "Chemistry" | "Anatomy" | "Marksmanship" | "Blacksmithing" | "Botany" | "Camping" | "Cartography" | "Claythrowing" | "Cooking" | "Fishing" | "Fletching" | "Glassblowing" | "Leatherworking" | "Lockpicking" | "Lumberjacking" | "Mining" | "Mycology" | "Parrying" | "Stonecrafting" | "Swimming" | "Tactics" | "Tailoring" | "Throwing" | "Tinkering" | "Trapping" | "Woodworking" | "Taming" | "Horticulture" | "Bartering" | "Seafaring" | "Thaumaturgy" | "DualWielding" | "Theurgy">]], import("../player/Player").default, void, import("@wayward/game/game/entity/action/IAction").IActionUsable, [(import("@wayward/game/game/entity/action/actions/SetTitle").TitleType | undefined)?, (import("../IHuman").SkillType | import("../../milestones/IMilestone").Milestone | undefined)?]>;
|
146
146
|
119: import("./Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.NPCNearby, [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Island, import("@wayward/game/game/entity/action/IAction").ActionArgument.Vector2], [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Integer32]], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/actions/ShipToIsland").IShipToIslandCanUse, [import("../npc/NPC").default, (import("../../island/Island").default | import("../../../utilities/math/IVector").IVector2 | undefined)?, (number | undefined)?]>;
|
147
147
|
94: import("./Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/actions/Shoot").IShootCanUse, [import("../../item/Item").default]>;
|
148
148
|
11: import("./Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby, import("@wayward/game/game/entity/action/IAction").ActionArgument.DoodadNearby], [import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("./argument/ActionArgumentEnum").default<import("../IHuman").RestType, "Resting" | "Sleeping">]], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/actions/Rest").IRestCanUse, [(import("../../doodad/Doodad").default | import("../../item/Item").default | undefined)?, (import("../IHuman").RestType | undefined)?]>;
|
@@ -19,5 +19,5 @@ export interface ISetCreatureAiCanUse extends IActionUsable {
|
|
19
19
|
creatures: Creature[];
|
20
20
|
}
|
21
21
|
export declare function hasSkillToSetCreatureAi(human: Human, creatureDescription: ICreatureDescription | undefined, ai: AiType): boolean;
|
22
|
-
declare const _default: Action<[[arg1: ActionArgument.Undefined, ActionArgument.Creature], [arg1: ActionArgument.Undefined, ActionArgument.ItemInventory], import("../argument/ActionArgumentEnum").default<AiType, "None" | "Attack" | "Pacified" | "
|
22
|
+
declare const _default: Action<[[arg1: ActionArgument.Undefined, ActionArgument.Creature], [arg1: ActionArgument.Undefined, ActionArgument.ItemInventory], import("../argument/ActionArgumentEnum").default<AiType, "None" | "Attack" | "Pacified" | "Idle" | "Neutral" | "Scared" | "Hostile" | "Fearless" | "HostileFearless" | "Alerted" | "Waiting" | "Hidden" | "CanSwapWith" | "CanSwapLayers" | "FollowClose" | "FollowFar" | "Stay" | "AttackAdjacent" | "AttackInSight" | "Defend" | "Heel">], Human<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player>, void, ISetCreatureAiCanUse, [Creature | undefined, import("../../../item/Item").default | undefined, AiType]>;
|
23
23
|
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<[[arg1: import("../IAction").ActionArgument.Undefined, import("../IAction").ActionArgument.Creature], [arg1: import("../IAction").ActionArgument.Undefined, import("../IAction").ActionArgument.ItemInventory], import("../argument/ActionArgumentEnum").default<import("../../ai/AI").AiType, "None" | "Attack" | "Pacified" | "
|
11
|
+
declare const _default: import("../Action").Action<[[arg1: import("../IAction").ActionArgument.Undefined, import("../IAction").ActionArgument.Creature], [arg1: import("../IAction").ActionArgument.Undefined, import("../IAction").ActionArgument.ItemInventory], import("../argument/ActionArgumentEnum").default<import("../../ai/AI").AiType, "None" | "Attack" | "Pacified" | "Idle" | "Neutral" | "Scared" | "Hostile" | "Fearless" | "HostileFearless" | "Alerted" | "Waiting" | "Hidden" | "CanSwapWith" | "CanSwapLayers" | "FollowClose" | "FollowFar" | "Stay" | "AttackAdjacent" | "AttackInSight" | "Defend" | "Heel">], import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/actions/SetCreatureAi").ISetCreatureAiCanUse, [import("../../creature/Creature").default | undefined, import("../../../item/Item").default | undefined, import("../../ai/AI").AiType]>;
|
12
12
|
export default _default;
|
@@ -16,5 +16,5 @@ export declare enum TitleType {
|
|
16
16
|
Milestone = 0,
|
17
17
|
Skill = 1
|
18
18
|
}
|
19
|
-
declare const _default: Action<[[ActionArgument.Undefined, import("../argument/ActionArgumentEnum").default<TitleType, "Skill" | "Milestone">], [arg1: ActionArgument.Undefined, import("../argument/ActionArgumentEnum").default<Milestone, "Abnormalizer" | "Chef" | "Exterminator" | "Crafter" | "Gardener" | "Gatherer" | "Hunter" | "Locksmith" | "ReaperOfSouls" | "Survivor" | "Pitcher" | "Trapsetter" | "TreasureHunter" | "Collector" | "Explorer" | "Grandmaster" | "Prepared" | "Doctor" | "Artificer" | "Returned" | "
|
19
|
+
declare const _default: Action<[[ActionArgument.Undefined, import("../argument/ActionArgumentEnum").default<TitleType, "Skill" | "Milestone">], [arg1: ActionArgument.Undefined, import("../argument/ActionArgumentEnum").default<Milestone, "Navigator" | "Abnormalizer" | "Chef" | "Exterminator" | "Crafter" | "Gardener" | "Gatherer" | "Hunter" | "Locksmith" | "ReaperOfSouls" | "Survivor" | "Pitcher" | "Trapsetter" | "TreasureHunter" | "Collector" | "Explorer" | "Grandmaster" | "Prepared" | "Doctor" | "Artificer" | "Returned" | "DragonSlayer" | "Treasurer" | "Pulchritudinous" | "Friendly" | "Malevolent" | "Benevolent" | "Boundless" | "Talented" | "Weathered" | "Seasoned" | "Pacifier" | "Merchant" | "Notekeeper" | "Operator" | "Huntsman" | "Contender" | "Challenger" | "DestroyerOfMagi" | "Helmsman" | "Multitasker" | "Apocryphal" | "Diverse" | "InternalDiscoveredBoats" | "Traitor" | "MasterOfAll" | "Rouseabout" | "Murderer" | "Retailer" | "Masochist" | "Versatile" | "InternalStatDiscovery" | "Dedicated" | "Hounded" | "Serene" | "InternalRuneOrAltarDiscovery" | "Curator" | "Thaumaturgic" | "Runekeeper" | "InternalDeityDiscovery" | "InternalMerchantsDiscovery" | "InternalDeitySystemDiscovery" | "Invoker" | "InternalDeityInvoked" | "InternalInsulationDiscovery" | "Turbulent" | "Statistician" | "Afflicted" | "Exsanguinated">, import("../argument/ActionArgumentEnum").default<SkillType, "None" | "Chemistry" | "Anatomy" | "Marksmanship" | "Blacksmithing" | "Botany" | "Camping" | "Cartography" | "Claythrowing" | "Cooking" | "Fishing" | "Fletching" | "Glassblowing" | "Leatherworking" | "Lockpicking" | "Lumberjacking" | "Mining" | "Mycology" | "Parrying" | "Stonecrafting" | "Swimming" | "Tactics" | "Tailoring" | "Throwing" | "Tinkering" | "Trapping" | "Woodworking" | "Taming" | "Horticulture" | "Bartering" | "Seafaring" | "Thaumaturgy" | "DualWielding" | "Theurgy">]], import("../../player/Player").default, void, import("@wayward/game/game/entity/action/IAction").IActionUsable, [(TitleType | undefined)?, (SkillType | Milestone | undefined)?]>;
|
20
20
|
export default _default;
|
@@ -34,6 +34,7 @@ import type { Reference, ReferenceType } from "@wayward/game/game/reference/IRef
|
|
34
34
|
import type Tile from "@wayward/game/game/tile/Tile";
|
35
35
|
import type TileEvent from "@wayward/game/game/tile/TileEvent";
|
36
36
|
import Translation, { Article } from "@wayward/game/language/Translation";
|
37
|
+
import { MarkerType } from "@wayward/game/renderer/notifier/INotifier";
|
37
38
|
import type { IUnserializedCallback } from "@wayward/game/save/serializer/ISerializer";
|
38
39
|
import { Direction } from "@wayward/game/utilities/math/Direction";
|
39
40
|
import type { IVector2, IVector3 } from "@wayward/game/utilities/math/IVector";
|
@@ -215,10 +216,12 @@ export default class Creature extends EntityWithStats<ICreatureDescription, Crea
|
|
215
216
|
*/
|
216
217
|
private breakItems;
|
217
218
|
private processAiChanges;
|
219
|
+
private addAlertedMarker;
|
218
220
|
/**
|
219
221
|
* @returns Whether the creature has lost interest
|
220
222
|
*/
|
221
223
|
private processAiInterest;
|
224
|
+
getDynamicMarker(type: string): MarkerType | undefined;
|
222
225
|
getWanderChance(defaultChance: number): number | undefined;
|
223
226
|
getWanderIdleChance(defaultChance: number): number | undefined;
|
224
227
|
getWanderNewDirectionChance(defaultChance: number): number | undefined;
|
@@ -12,6 +12,7 @@ import CombatStrengthManager from "@wayward/game/game/entity/CombatStrengthManag
|
|
12
12
|
import Creature from "@wayward/game/game/entity/creature/Creature";
|
13
13
|
import type { ICreatureCheckMoveOptions } from "@wayward/game/game/entity/creature/ICreature";
|
14
14
|
import { CreatureType, TileGroup } from "@wayward/game/game/entity/creature/ICreature";
|
15
|
+
import type { IEntityRemoveOptions } from "@wayward/game/game/entity/EntityManager";
|
15
16
|
import EntityManager from "@wayward/game/game/entity/EntityManager";
|
16
17
|
import type Human from "@wayward/game/game/entity/Human";
|
17
18
|
import { MoveType } from "@wayward/game/game/entity/IEntity";
|
@@ -30,7 +31,7 @@ export interface ICreatureManagerEvents extends Events<EntityManager<Creature>>
|
|
30
31
|
*/
|
31
32
|
canSpawn(type: CreatureType, tile: Tile, aberrant: boolean): boolean | undefined;
|
32
33
|
}
|
33
|
-
export default class CreatureManager extends EntityManager<Creature, {
|
34
|
+
export default class CreatureManager extends EntityManager<Creature, IEntityRemoveOptions & {
|
34
35
|
remainTamed?: boolean;
|
35
36
|
}> {
|
36
37
|
protected readonly name = "CreatureManager";
|
@@ -12,6 +12,7 @@ import type { Quality } from "@wayward/game/game/IObject";
|
|
12
12
|
import type Doodad from "@wayward/game/game/doodad/Doodad";
|
13
13
|
import type DoodadManager from "@wayward/game/game/doodad/DoodadManager";
|
14
14
|
import type { DoodadType, DoodadTypeGroup } from "@wayward/game/game/doodad/IDoodad";
|
15
|
+
import type { IEntityRemoveOptions } from "@wayward/game/game/entity/EntityManager";
|
15
16
|
import type { ActionType, IActionNotUsable } from "@wayward/game/game/entity/action/IAction";
|
16
17
|
import type ActionContext from "@wayward/game/game/entity/action/IActionContext";
|
17
18
|
import type { DropAllowProtected } from "@wayward/game/game/entity/action/actions/Drop";
|
@@ -28,7 +29,7 @@ import type { Direction } from "@wayward/game/utilities/math/Direction";
|
|
28
29
|
/**
|
29
30
|
* Options when removing an item
|
30
31
|
*/
|
31
|
-
export interface IItemRemoveOptions {
|
32
|
+
export interface IItemRemoveOptions extends IEntityRemoveOptions {
|
32
33
|
/**
|
33
34
|
* Defaults to false
|
34
35
|
*/
|
@@ -27,7 +27,7 @@ declare namespace Runekeeper {
|
|
27
27
|
Dismantle = 8
|
28
28
|
}
|
29
29
|
type DomainName = Lowercase<keyof typeof Domain>;
|
30
|
-
const DOMAINS: ("action" | "event" | "dismantle" | "
|
30
|
+
const DOMAINS: ("action" | "event" | "dismantle" | "craft" | "skill" | "disassemble" | "killcreature" | "tamecreature" | "killnpc")[];
|
31
31
|
type DomainData = `${DomainName}:${number}`;
|
32
32
|
function domainName(domain: Domain): DomainName;
|
33
33
|
function isDiscovered(domain: DomainData): boolean;
|
@@ -10,6 +10,7 @@
|
|
10
10
|
*/
|
11
11
|
import type { SfxType } from "@wayward/game/audio/IAudio";
|
12
12
|
import type { ItemType } from "@wayward/game/game/item/IItem";
|
13
|
+
import type { Reference, ReferenceType } from "@wayward/game/game/reference/IReferenceManager";
|
13
14
|
import type { IVector2 } from "@wayward/game/utilities/math/IVector";
|
14
15
|
import type { IVector4 } from "@wayward/game/utilities/math/Vector4";
|
15
16
|
import type { IRGB } from "@wayward/utilities/Color";
|
@@ -63,7 +64,8 @@ export declare enum MarkerType {
|
|
63
64
|
Item = 4,
|
64
65
|
AlertedHostileHighDanger = 5,
|
65
66
|
AlertedHostileVeryHighDanger = 6,
|
66
|
-
|
67
|
+
AlertedHostileExtremeDanger = 7,
|
68
|
+
Dynamic = 8
|
67
69
|
}
|
68
70
|
export interface IBaseMarkerDescription {
|
69
71
|
guid: string;
|
@@ -76,6 +78,14 @@ export interface IBaseMarkerDescription {
|
|
76
78
|
export interface ISpriteMarkerDescription extends IBaseMarkerDescription {
|
77
79
|
type: MarkerType.Tamed | MarkerType.AlertedHostile | MarkerType.AlertedScared;
|
78
80
|
}
|
81
|
+
/**
|
82
|
+
* Dynamic markers that change based on some callback
|
83
|
+
*/
|
84
|
+
export interface IDynamicSpriteMarkerDescription extends IBaseMarkerDescription {
|
85
|
+
type: MarkerType.Dynamic;
|
86
|
+
dynamicType: "AlertedHostile";
|
87
|
+
entityReference: Reference<ReferenceType.Player | ReferenceType.NPC | ReferenceType.Creature>;
|
88
|
+
}
|
79
89
|
/**
|
80
90
|
* Item icon
|
81
91
|
*/
|
@@ -95,6 +105,6 @@ export interface ITextMarkerDescription extends IBaseMarkerDescription {
|
|
95
105
|
/**
|
96
106
|
* This value may be saved into Entity._persistentMarker!
|
97
107
|
*/
|
98
|
-
export type MarkerDescription = ISpriteMarkerDescription | ITextMarkerDescription | IItemMarkerDescription;
|
108
|
+
export type MarkerDescription = ISpriteMarkerDescription | ITextMarkerDescription | IItemMarkerDescription | IDynamicSpriteMarkerDescription;
|
99
109
|
export declare const itemDamageNotifierThreshold = 3;
|
100
110
|
export declare const doodadDamageNotifierThreshold = 5;
|
@@ -29,7 +29,7 @@ export declare enum EquipmentClasses {
|
|
29
29
|
SlotsWrapper = "game-dialog-equipment-slots-wrapper"
|
30
30
|
}
|
31
31
|
export declare namespace EquipmentClasses {
|
32
|
-
const SlotType: (enumValue: EquipType) => "game-dialog-equipment-slot-none" | "game-dialog-equipment-slot-
|
32
|
+
const SlotType: (enumValue: EquipType) => "game-dialog-equipment-slot-none" | "game-dialog-equipment-slot-head" | "game-dialog-equipment-slot-held" | "game-dialog-equipment-slot-legs" | "game-dialog-equipment-slot-chest" | "game-dialog-equipment-slot-waist" | "game-dialog-equipment-slot-feet" | "game-dialog-equipment-slot-neck" | "game-dialog-equipment-slot-hands" | "game-dialog-equipment-slot-back" | "game-dialog-equipment-slot-mainhand" | "game-dialog-equipment-slot-offhand" | "game-dialog-equipment-slot-dualwield";
|
33
33
|
}
|
34
34
|
export default class EquipmentDialog extends Dialog {
|
35
35
|
readonly slots: Component<HTMLElement>;
|
@@ -49,7 +49,7 @@ type Handler<H, F> = (host: H, ...args: ArgsOf<F>) => ReturnOf<F>;
|
|
49
49
|
type WeakHandler<H, F> = WeakRef<Handler<H, F>>;
|
50
50
|
type UndefinedFromVoid<V> = V extends void ? undefined : V;
|
51
51
|
export interface IEventEmitter<H = any, E = any> {
|
52
|
-
readonly closed?:
|
52
|
+
readonly closed?: boolean;
|
53
53
|
emit<K extends keyof E>(event: K, ...args: ArgsOf<E[K]>): H;
|
54
54
|
/**
|
55
55
|
* Emit an event only to the subscribers of this emitter instance.
|
@@ -80,6 +80,10 @@ export interface IEventEmitter<H = any, E = any> {
|
|
80
80
|
until<E2>(emitter: IEventEmitterHost<E2>, ...events: Array<keyof E2>): IUntilSubscriber<H, E>;
|
81
81
|
until(promise: Promise<any>): IUntilSubscriber<H, E>;
|
82
82
|
hasHandlersForEvent(...events: Array<keyof E>): boolean;
|
83
|
+
/**
|
84
|
+
* Re-opens a closed event emitter
|
85
|
+
*/
|
86
|
+
open(): void;
|
83
87
|
/**
|
84
88
|
* Closes an event emitter, which will prevent any further subscriptions from being made.
|
85
89
|
*/
|
@@ -111,8 +115,12 @@ declare class EventEmitter<H, E> {
|
|
111
115
|
* This means no more events will be emitted and no more subscriptions can be made.
|
112
116
|
* Public so that the interface can expose a readonly version of this.
|
113
117
|
*/
|
114
|
-
closed?:
|
118
|
+
closed?: boolean;
|
115
119
|
constructor(host: H);
|
120
|
+
/**
|
121
|
+
* Re-opens a closed event emitter
|
122
|
+
*/
|
123
|
+
open(): void;
|
116
124
|
/**
|
117
125
|
* Closes an event emitter, which will prevent any further subscriptions from being made.
|
118
126
|
*/
|
package/package.json
CHANGED