@wayward/types 2.15.0-beta.dev.20251008.1 → 2.15.0-beta.dev.20251010.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/audio/IAudio.d.ts +2 -1
- package/definitions/game/game/curse/Curse.d.ts +21 -7
- package/definitions/game/game/curse/ICurse.d.ts +5 -6
- package/definitions/game/game/doodad/Doodad.d.ts +5 -0
- package/definitions/game/game/doodad/DoodadManager.d.ts +1 -1
- package/definitions/game/game/doodad/IDoodad.d.ts +4 -1
- package/definitions/game/game/entity/Human.d.ts +0 -4
- package/definitions/game/game/entity/creature/CreatureManager.d.ts +3 -7
- package/definitions/game/game/entity/creature/ICreature.d.ts +26 -0
- package/definitions/game/game/entity/data/DataComponent.d.ts +38 -0
- package/definitions/game/game/inspection/infoProviders/doodad/StillWater.d.ts +1 -0
- package/definitions/game/game/item/Item.d.ts +6 -0
- package/definitions/game/language/dictionary/Message.d.ts +190 -189
- package/definitions/game/language/dictionary/UiTranslation.d.ts +666 -664
- package/package.json +1 -1
|
@@ -71,7 +71,8 @@ export declare enum SfxType {
|
|
|
71
71
|
UiUnstack = 59,
|
|
72
72
|
Walk = 60,
|
|
73
73
|
Water = 61,
|
|
74
|
-
Wheelbarrow = 62
|
|
74
|
+
Wheelbarrow = 62,
|
|
75
|
+
CraftFail = 63
|
|
75
76
|
}
|
|
76
77
|
export type SfxUi = Extract<keyof typeof SfxType, `Ui${string}`> extends `Ui${infer RESULT}` ? Lowercase<RESULT> : never;
|
|
77
78
|
export declare enum Music {
|
|
@@ -16,13 +16,24 @@ import { SkillType } from "@wayward/game/game/entity/IHuman";
|
|
|
16
16
|
import type Island from "@wayward/game/game/island/Island";
|
|
17
17
|
import type { IVector2 } from "@wayward/game/utilities/math/IVector";
|
|
18
18
|
import { IRange, IRangeRange } from "@wayward/utilities/math/Range";
|
|
19
|
-
|
|
20
|
-
export declare const
|
|
21
|
-
export declare const
|
|
22
|
-
export declare const
|
|
23
|
-
export declare const
|
|
24
|
-
export declare const
|
|
25
|
-
export declare const
|
|
19
|
+
import DataComponent from "@wayward/game/game/entity/data/DataComponent";
|
|
20
|
+
export declare const CURSE_CAP = 10000;
|
|
21
|
+
export declare const CURSE_COMPONENT_ATTACK_CAP = 50;
|
|
22
|
+
export declare const CURSE_COMPONENT_DEFENSE_CAP = 100;
|
|
23
|
+
export declare const CURSE_COMPONENT_CRAFTING_CAP = 3000;
|
|
24
|
+
export declare const CURSE_COMPONENT_KILLING_CAP = 500;
|
|
25
|
+
export declare const CURSE_COMPONENT_SKILL_CAP = 100;
|
|
26
|
+
export declare const CURSE_COMPONENT_SLEEPLESSNESS_CAP_DAYS = 6;
|
|
27
|
+
interface CurseComponentDefinition {
|
|
28
|
+
readonly maxCurseContribution: number | null;
|
|
29
|
+
compute(human: Human): number;
|
|
30
|
+
}
|
|
31
|
+
export declare const CURSE_COMPONENTS: Record<CurseComponent, CurseComponentDefinition>;
|
|
32
|
+
export declare const CumulativeEvilCrafting: DataComponent<number, number>;
|
|
33
|
+
export declare const CumulativeKilling: DataComponent<number, number>;
|
|
34
|
+
export declare const Sleeplessness: DataComponent<number, number>;
|
|
35
|
+
export declare const HighestAttack: DataComponent.Live<number>;
|
|
36
|
+
export declare const HighestDefense: DataComponent.Live<number>;
|
|
26
37
|
/**
|
|
27
38
|
* Gets the highest value of either current or max skill multiplied by the "evilness" of each skill (from rune chance)
|
|
28
39
|
* (Basically, high values in any of the evil-er skills make curse go brrrr)
|
|
@@ -34,6 +45,7 @@ declare function getSkillValue(human: Human): {
|
|
|
34
45
|
declare namespace Curse {
|
|
35
46
|
const getSkill: typeof getSkillValue;
|
|
36
47
|
function getComponentValue(human: Human, component: CurseComponent): number;
|
|
48
|
+
function getComponentCap(component: CurseComponent): number | null;
|
|
37
49
|
function getValue(human: Human): number;
|
|
38
50
|
}
|
|
39
51
|
/**
|
|
@@ -90,6 +102,7 @@ declare namespace Curse {
|
|
|
90
102
|
}
|
|
91
103
|
declare const SYMBOL_CURSE_EVENT_SUBSCRIBER_INSTANCES: unique symbol;
|
|
92
104
|
declare const SYMBOL_CURSE_EVENT_GLOBAL_SUBSCRIBER_INSTANCE: unique symbol;
|
|
105
|
+
declare const SYMBOL_CURSE_EVENT_ACTIVE_SUBSCRIBER_INSTANCE: unique symbol;
|
|
93
106
|
interface Curse {
|
|
94
107
|
night?: true;
|
|
95
108
|
events?: CurseEventInstance[];
|
|
@@ -97,6 +110,7 @@ interface Curse {
|
|
|
97
110
|
warned?: true;
|
|
98
111
|
ephemeralCreatures?: number[];
|
|
99
112
|
[SYMBOL_CURSE_EVENT_GLOBAL_SUBSCRIBER_INSTANCE]?: CurseEventSubscriber;
|
|
113
|
+
[SYMBOL_CURSE_EVENT_ACTIVE_SUBSCRIBER_INSTANCE]?: CurseEventSubscriber;
|
|
100
114
|
}
|
|
101
115
|
interface CurseEventInstance {
|
|
102
116
|
type: CurseEventType;
|
|
@@ -63,12 +63,11 @@ export declare enum CursePosition {
|
|
|
63
63
|
}
|
|
64
64
|
export declare enum CurseComponent {
|
|
65
65
|
Skill = 0,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
CumulativeKilling = 6
|
|
66
|
+
AttackDefense = 1,
|
|
67
|
+
CumulativeEvilCrafting = 2,
|
|
68
|
+
Modifier = 3,
|
|
69
|
+
CumulativeKilling = 4,
|
|
70
|
+
Sleeplessness = 5
|
|
72
71
|
}
|
|
73
72
|
export declare enum CurseSystemDiscovery {
|
|
74
73
|
CurseFactors = 0,
|
|
@@ -398,6 +398,11 @@ export default class Doodad extends EntityMovable<IDoodadDescription, DoodadType
|
|
|
398
398
|
* Gets the skill type associated with the doodad, or choose a random one if the description is an array.
|
|
399
399
|
*/
|
|
400
400
|
getSkillUse(): SkillType;
|
|
401
|
+
/**
|
|
402
|
+
* Checks if a solar still can work in the current temperature.
|
|
403
|
+
* @returns True if the solar still can work in the current temperature, false if not.
|
|
404
|
+
*/
|
|
405
|
+
willStillWorkInTemperature(): boolean;
|
|
401
406
|
/**
|
|
402
407
|
* Decay over time
|
|
403
408
|
*/
|
|
@@ -86,7 +86,7 @@ export default class DoodadManager extends EntityManager<Doodad> {
|
|
|
86
86
|
*/
|
|
87
87
|
updateAllAsync(ticks: number, playingHumans: Human[], playerHumanTiles: Set<Tile>, onProgress: (progess: number) => Promise<void>): Promise<void>;
|
|
88
88
|
verifyAndFixItemWeights(): void;
|
|
89
|
-
getScarecrowInRange(tile: Tile): Doodad | undefined;
|
|
89
|
+
getScarecrowInRange(tile: Tile, group?: DoodadTypeGroup): Doodad | undefined;
|
|
90
90
|
getScarecrowInLineOfSight(creature: Creature, isClientside: boolean): Doodad | undefined;
|
|
91
91
|
addScarecrow(doodad: Doodad): void;
|
|
92
92
|
removeScarecrow(doodad: Doodad): void;
|
|
@@ -17,6 +17,7 @@ import type { SkillType } from "@wayward/game/game/entity/IHuman";
|
|
|
17
17
|
import type { IDecayTemperatureRange } from "@wayward/game/game/IGame";
|
|
18
18
|
import type { ILootItem } from "@wayward/game/game/ILoot";
|
|
19
19
|
import type { IObjectDescription, IObjectOptions } from "@wayward/game/game/IObject";
|
|
20
|
+
import type { WaterType } from "@wayward/game/game/island/IIsland";
|
|
20
21
|
import type Island from "@wayward/game/game/island/Island";
|
|
21
22
|
import type { IContainer, IItemOld, ItemType, ItemTypeExtra, ItemTypeGroup } from "@wayward/game/game/item/IItem";
|
|
22
23
|
import type Item from "@wayward/game/game/item/Item";
|
|
@@ -528,7 +529,8 @@ export declare enum DoodadTypeGroup {
|
|
|
528
529
|
Altar = -9978,
|
|
529
530
|
OpenFireSource = -9977,
|
|
530
531
|
RequiresCandleToLight = -9976,
|
|
531
|
-
ContainsFuelSource = -9975
|
|
532
|
+
ContainsFuelSource = -9975,
|
|
533
|
+
CurseWard = -9974
|
|
532
534
|
}
|
|
533
535
|
export declare enum DoorOrientation {
|
|
534
536
|
/**
|
|
@@ -559,6 +561,7 @@ export interface IHasBuilder {
|
|
|
559
561
|
export interface IHasWater {
|
|
560
562
|
top?: true;
|
|
561
563
|
bottom?: true;
|
|
564
|
+
waterType?: WaterType;
|
|
562
565
|
}
|
|
563
566
|
export interface IDoodadGetNameOptions {
|
|
564
567
|
count: number;
|
|
@@ -127,10 +127,6 @@ export default abstract class Human<DescriptionType = unknown, TypeType extends
|
|
|
127
127
|
quests: IQuestManager;
|
|
128
128
|
messages: IMessageManager;
|
|
129
129
|
notes: INoteManager;
|
|
130
|
-
highestAttack?: number;
|
|
131
|
-
highestDefense?: number;
|
|
132
|
-
cumulativeEvilCrafting: number;
|
|
133
|
-
cumulativeKilling: number;
|
|
134
130
|
itemDiscovered: ItemType[];
|
|
135
131
|
private _humanTags?;
|
|
136
132
|
/** @deprecated (use the entity itself) */
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import CombatStrengthManager from "@wayward/game/game/entity/CombatStrengthManager";
|
|
12
12
|
import Creature from "@wayward/game/game/entity/creature/Creature";
|
|
13
|
-
import type { ICreatureCheckMoveOptions } from "@wayward/game/game/entity/creature/ICreature";
|
|
14
|
-
import { CreatureType
|
|
13
|
+
import type { ICreatureCheckMoveOptions, ICreatureSpawnOptions } from "@wayward/game/game/entity/creature/ICreature";
|
|
14
|
+
import { CreatureType } from "@wayward/game/game/entity/creature/ICreature";
|
|
15
15
|
import type { IEntityRemoveOptions } from "@wayward/game/game/entity/EntityManager";
|
|
16
16
|
import EntityManager from "@wayward/game/game/entity/EntityManager";
|
|
17
17
|
import type Human from "@wayward/game/game/entity/Human";
|
|
@@ -48,12 +48,8 @@ export default class CreatureManager extends EntityManager<Creature, IEntityRemo
|
|
|
48
48
|
* Spawns a creature.
|
|
49
49
|
* @param type The type of creature to spawn.
|
|
50
50
|
* @param tile The tile
|
|
51
|
-
* @param bypass Whether to bypass checks for whether the creature can spawn there naturally. Defaults to false, if the creature can't spawn naturally, it won't.
|
|
52
|
-
* @param forceAberrant If provided, forces the spawned creature's aberrant state to be the passed boolean. True = aberrant, false = not aberrant. If not provided, the aberrant state is decided based on chance.
|
|
53
|
-
* @param spawnTiles If set, this will overwrite the creature's description for which tiles it can spawn on
|
|
54
|
-
* @param bypassCreatureLimit If set, the creature limit will be ignored and spawn the creature over the set limit
|
|
55
51
|
*/
|
|
56
|
-
spawn(type: CreatureType, tile: Tile,
|
|
52
|
+
spawn(type: CreatureType, tile: Tile, options?: ICreatureSpawnOptions): Creature | undefined;
|
|
57
53
|
spawnFromZone(tile: Tile, bypassCreatureLimit?: boolean, checkTerrainType?: boolean): Creature | undefined;
|
|
58
54
|
createFake(type: CreatureType, aberrant: boolean, tile?: Tile, id?: number): Creature;
|
|
59
55
|
exists(creature: Creature): boolean;
|
|
@@ -521,3 +521,29 @@ export interface ICreatureCheckMoveOptions {
|
|
|
521
521
|
ignoreScareCrow: boolean;
|
|
522
522
|
ignoreMoveTypeNone: boolean;
|
|
523
523
|
}
|
|
524
|
+
export interface ICreatureSpawnOptions {
|
|
525
|
+
/**
|
|
526
|
+
* If set to true, the creature will ignore blocked or full tile checks as well as ignore spawnTiles definitions set on the creature.
|
|
527
|
+
*/
|
|
528
|
+
bypassTiles?: boolean;
|
|
529
|
+
/**
|
|
530
|
+
* If provided, forces the spawned creature's aberrant state to be the passed boolean. True = aberrant, false = not aberrant. If not provided, the aberrant state is decided based on chance.
|
|
531
|
+
*/
|
|
532
|
+
forceAberrant?: boolean;
|
|
533
|
+
/**
|
|
534
|
+
* If set, this will overwrite the creature's description for which tiles it can spawn on. This will also change which tiles it can path on to, differing from its set definitions.
|
|
535
|
+
*/
|
|
536
|
+
spawnTiles?: TileGroup;
|
|
537
|
+
/**
|
|
538
|
+
* If set to true, this will bypass the current zone's creature limit and spawn it regardless.
|
|
539
|
+
*/
|
|
540
|
+
bypassCreatureLimit?: boolean;
|
|
541
|
+
/**
|
|
542
|
+
* If set to true, the creatures will ignore scarecrows when spawning. Note that this does NOT ignore the chance of being scared by a scarecrow when moving, just the initial spawn checks.
|
|
543
|
+
*/
|
|
544
|
+
bypassScarecrows?: boolean;
|
|
545
|
+
/**
|
|
546
|
+
* If set to true, all checks will be bypassed and the creature will spawn no matter what.
|
|
547
|
+
*/
|
|
548
|
+
bypassAll?: boolean;
|
|
549
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2011-2025 Unlok
|
|
3
|
+
* https://www.unlok.ca
|
|
4
|
+
*
|
|
5
|
+
* Credits & Thanks:
|
|
6
|
+
* https://www.unlok.ca/credits-thanks/
|
|
7
|
+
*
|
|
8
|
+
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
|
9
|
+
* https://github.com/WaywardGame/types/wiki
|
|
10
|
+
*/
|
|
11
|
+
import type Entity from "@wayward/game/game/entity/Entity";
|
|
12
|
+
export declare enum DataComponentType {
|
|
13
|
+
None = 0,
|
|
14
|
+
CurseSleeplessness = 1,
|
|
15
|
+
CurseCumulativeEvilCrafting = 2,
|
|
16
|
+
CurseCumulativeKilling = 3,
|
|
17
|
+
CurseHighestAttack = 4,
|
|
18
|
+
CurseHighestDefense = 5
|
|
19
|
+
}
|
|
20
|
+
interface DataComponent<T, DEFAULT_VALUE extends T | undefined = undefined> {
|
|
21
|
+
readonly type: DataComponentType;
|
|
22
|
+
has(entity: Entity): boolean;
|
|
23
|
+
get(entity: Entity): T | DEFAULT_VALUE;
|
|
24
|
+
compute(entity: Entity, compute: (defaultValue: DEFAULT_VALUE) => T): T;
|
|
25
|
+
set(entity: Entity, value: T): void;
|
|
26
|
+
modify(entity: Entity, modify: (current: T | DEFAULT_VALUE) => T): T;
|
|
27
|
+
remove(entity: Entity): void;
|
|
28
|
+
}
|
|
29
|
+
declare function DataComponent<T>(type: DataComponentType, defaultValue: T): DataComponent<T, T>;
|
|
30
|
+
declare function DataComponent<T>(type: DataComponentType, defaultValue?: T): DataComponent<T>;
|
|
31
|
+
declare namespace DataComponent {
|
|
32
|
+
interface Live<T> {
|
|
33
|
+
get(entity: Entity): T;
|
|
34
|
+
update(entity: Entity): void;
|
|
35
|
+
}
|
|
36
|
+
function Live<T>(type: DataComponentType, compute: (entity: Entity, current: T | undefined) => T): Live<T>;
|
|
37
|
+
}
|
|
38
|
+
export default DataComponent;
|
|
@@ -16,6 +16,7 @@ export default class StillWaterInfoProvider extends InfoProvider {
|
|
|
16
16
|
private readonly waterTopMessage;
|
|
17
17
|
private readonly waterBottomMessage;
|
|
18
18
|
private readonly waterContainerMessage;
|
|
19
|
+
private readonly willStillWorkInTemperature;
|
|
19
20
|
private constructor();
|
|
20
21
|
getClass(): string[];
|
|
21
22
|
hasContent(): boolean;
|
|
@@ -29,6 +29,7 @@ import type Corpse from "@wayward/game/game/entity/creature/corpse/Corpse";
|
|
|
29
29
|
import type NPC from "@wayward/game/game/entity/npc/NPC";
|
|
30
30
|
import type Player from "@wayward/game/game/entity/player/Player";
|
|
31
31
|
import type { IMobCheck, IslandId } from "@wayward/game/game/island/IIsland";
|
|
32
|
+
import { WaterType } from "@wayward/game/game/island/IIsland";
|
|
32
33
|
import type { ContainerReference, DisplayableItemType, IConstructedInfo, IContainable, IContainer, IItemChangeIntoOptions, IItemDescription, IItemDisassembleResult, IItemDisassembly, IItemGetNameOptions, IItemUsed, IItemVehicle, IMagicalPropertyInfo, IItemMovementResult as IMoveToTileMobCheckResult, IMoveToTileOptions, ItemTag } from "@wayward/game/game/item/IItem";
|
|
33
34
|
import { ItemTypeExtra } from "@wayward/game/game/item/IItem";
|
|
34
35
|
import { BookType, ContainerSort, ItemDamageResult, ItemType, ItemTypeGroup, ItemWeightChange, SYMBOL_CONTAINER_CACHED_REFERENCE } from "@wayward/game/game/item/IItem";
|
|
@@ -525,6 +526,11 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
|
|
|
525
526
|
*/
|
|
526
527
|
getReturnType(): ItemType;
|
|
527
528
|
createReturnItem(returnType: ItemType, container?: IContainer): Item | undefined;
|
|
529
|
+
/**
|
|
530
|
+
* Returns the type of water contained in the item in the case of containers of liquid.
|
|
531
|
+
* @returns WaterType enum value.
|
|
532
|
+
*/
|
|
533
|
+
getWaterType(): WaterType;
|
|
528
534
|
private checkIfItemsMatch;
|
|
529
535
|
private checkIfItemArraysMatch;
|
|
530
536
|
}
|