@wayward/types 2.15.0-beta.dev.20251012.1 → 2.15.0-beta.dev.20251019.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 +64 -62
- package/definitions/game/game/curse/Curse.d.ts +12 -5
- package/definitions/game/game/curse/CurseEvent.d.ts +14 -5
- package/definitions/game/game/curse/ICurse.d.ts +11 -1
- package/definitions/game/game/curse/event/CurseEventCraftingInspiration.d.ts +2 -0
- package/definitions/game/game/curse/event/CurseEventFrigidNight.d.ts +1 -0
- package/definitions/game/game/curse/event/CurseEventHeatWave.d.ts +1 -0
- package/definitions/game/game/curse/event/CurseEventHorde.d.ts +20 -0
- package/definitions/game/game/curse/event/CurseEventLucky.d.ts +1 -0
- package/definitions/game/game/curse/event/CurseEventNewPlants.d.ts +15 -0
- package/definitions/game/game/curse/event/CurseEventPlantDeath.d.ts +15 -0
- package/definitions/game/game/curse/event/CurseEventShadows.d.ts +2 -1
- package/definitions/game/game/curse/event/CurseEventSwarm.d.ts +18 -0
- package/definitions/game/game/curse/event/CurseEventUnlucky.d.ts +1 -0
- package/definitions/game/game/doodad/Doodad.d.ts +3 -2
- package/definitions/game/game/doodad/Doodads.d.ts +2 -1
- package/definitions/game/game/doodad/IDoodad.d.ts +27 -3
- package/definitions/game/game/entity/CombatStrengthManager.d.ts +1 -1
- package/definitions/game/game/entity/Human.d.ts +3 -4
- package/definitions/game/game/entity/IHuman.d.ts +2 -2
- package/definitions/game/game/entity/IStats.d.ts +17 -42
- package/definitions/game/game/entity/Stats.d.ts +1 -0
- package/definitions/game/game/entity/player/IMessageManager.d.ts +5 -1
- package/definitions/game/game/entity/skill/ISkills.d.ts +1 -0
- package/definitions/game/game/entity/status/IStatus.d.ts +13 -8
- package/definitions/game/game/entity/status/IStatusContext.d.ts +1 -1
- package/definitions/game/game/entity/status/StatusEffectList.d.ts +2 -0
- package/definitions/game/game/inspection/IInspection.d.ts +5 -3
- package/definitions/game/game/inspection/InspectionTypeMap.d.ts +4 -2
- package/definitions/game/game/inspection/infoProviders/MagicalCurseProperties.d.ts +30 -0
- package/definitions/game/game/inspection/infoProviders/MagicalPropertyValue.d.ts +1 -0
- package/definitions/game/game/inspection/infoProviders/item/MagicalSourceTooltip.d.ts +3 -3
- package/definitions/game/game/inspection/inspections/MagicCurseInspection.d.ts +29 -0
- package/definitions/game/game/item/IItem.d.ts +24 -2
- package/definitions/game/game/item/ItemManager.d.ts +5 -0
- package/definitions/game/game/magic/MagicalPropertyManager.d.ts +35 -3
- package/definitions/game/game/magic/MagicalPropertyType.d.ts +4 -0
- package/definitions/game/game/milestones/MilestoneDefinition.d.ts +2 -2
- package/definitions/game/game/options/IGameOptions.d.ts +7 -0
- package/definitions/game/game/reference/IReferenceManager.d.ts +12 -1
- package/definitions/game/game/tile/Tile.d.ts +1 -0
- package/definitions/game/game/time/TimeManager.d.ts +4 -1
- package/definitions/game/language/DictionaryMap.d.ts +32 -0
- package/definitions/game/language/Translation.d.ts +1 -0
- package/definitions/game/language/dictionary/Message.d.ts +566 -564
- package/definitions/game/language/dictionary/Misc.d.ts +69 -65
- package/definitions/game/language/dictionary/UiTranslation.d.ts +858 -850
- package/definitions/game/language/english/item/DoodadsExtra.d.ts +2 -2
- package/definitions/game/language/english/item/ItemsExtra.d.ts +2 -2
- package/definitions/game/language/english/item/MagicalPropertyTypes.d.ts +1 -1
- package/definitions/game/renderer/fieldOfView/IFieldOfView.d.ts +4 -1
- package/definitions/game/renderer/world/WorldRenderer.d.ts +4 -0
- package/definitions/game/save/data/ISaveDataGlobal.d.ts +1 -0
- package/definitions/game/save/upgrade/UpgradeVersion.d.ts +2 -0
- package/definitions/game/save/upgrade/versions/beta2.15.0/beta2.15.0-dev20251016.d.ts +12 -0
- package/definitions/game/save/upgrade/versions/beta2.15.0/beta2.15.0-dev20251018.d.ts +12 -0
- package/definitions/game/ui/screen/screens/game/component/ItemComponent.d.ts +1 -0
- package/definitions/game/ui/screen/screens/game/static/Stats.d.ts +1 -0
- package/definitions/game/ui/screen/screens/game/static/stats/IStatDisplayDescription.d.ts +16 -4
- package/definitions/game/ui/screen/screens/game/static/stats/TemperatureDisplay.d.ts +13 -0
- package/definitions/game/ui/screen/screens/game/static/stats/component/StatComponent.d.ts +9 -3
- package/definitions/game/ui/screen/screens/menu/menus/options/TabPerformance.d.ts +1 -0
- package/definitions/game/ui/screen/screens/menu/menus/options/TabVideo.d.ts +2 -0
- package/definitions/utilities/log/ErrorReporting.d.ts +2 -0
- package/definitions/utilities/math/Range.d.ts +6 -6
- package/package.json +1 -1
|
@@ -34,6 +34,7 @@ export interface IStatusDisplayable {
|
|
|
34
34
|
getBorderColorOverride?(status?: Status): string | undefined;
|
|
35
35
|
getCategoryOverride?(status?: Status): IStatusCategoryOverride | undefined;
|
|
36
36
|
getDescriptionContent?(status: Status): IStatusDescriptionContent | undefined;
|
|
37
|
+
effects?: SupplierOr<StatusEffectList | undefined, [IStatusContext, StatusEffectList]>;
|
|
37
38
|
}
|
|
38
39
|
export interface IStatusCategoryOverride {
|
|
39
40
|
icon: string | IIcon;
|
|
@@ -64,8 +65,8 @@ export interface IStatusDescription extends IStatusDisplayable {
|
|
|
64
65
|
* Currently, "important" statuses have the same bounce animation that "threats" have.
|
|
65
66
|
*/
|
|
66
67
|
important?: true;
|
|
68
|
+
disableNotifier?: true;
|
|
67
69
|
interval?: SupplierOr<number | undefined, [IStatusContext]> | false;
|
|
68
|
-
effects?: SupplierOr<StatusEffectList | undefined, [IStatusContext, StatusEffectList]>;
|
|
69
70
|
particles?: SupplierOr<StatusParticle | undefined, [IStatusContext, StatusParticleEvent?]>;
|
|
70
71
|
/** A list of `StatusRenderer`s that could be returned by a supplier in the `renderer` property */
|
|
71
72
|
renderers?: StatusRenderer[];
|
|
@@ -149,19 +150,23 @@ export declare enum StatusEffectType {
|
|
|
149
150
|
CannotX = 1,
|
|
150
151
|
DealingAroundXDamageY = 2,
|
|
151
152
|
DealingXDamageY = 3,
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
153
|
+
DecreasesXByY = 4,
|
|
154
|
+
IncreasesXByY = 5,
|
|
155
|
+
IncreasesXRate = 6,
|
|
156
|
+
IncreasesXRateByY = 7,
|
|
157
|
+
LosingXEveryY = 8,
|
|
158
|
+
MovementSpeedSlowed = 9,
|
|
159
|
+
PercentChanceToPassEveryX = 10,
|
|
160
|
+
ReducesXByYEveryZ = 11,
|
|
161
|
+
XCannotBeRegained = 12
|
|
159
162
|
}
|
|
160
163
|
export interface StatusEffectTypeArguments {
|
|
161
164
|
[StatusEffectType.AddsAChanceOfXOnY]: [effect: TranslationArg, on?: TranslationArg];
|
|
162
165
|
[StatusEffectType.CannotX]: [x: TranslationArg];
|
|
163
166
|
[StatusEffectType.DealingAroundXDamageY]: [amount?: TranslationArg, eventOrDuration?: TranslationArg];
|
|
164
167
|
[StatusEffectType.DealingXDamageY]: [amount?: TranslationArg, eventOrDuration?: TranslationArg];
|
|
168
|
+
[StatusEffectType.DecreasesXByY]: [decreases: TranslationArg, amount?: TranslationArg];
|
|
169
|
+
[StatusEffectType.IncreasesXByY]: [increases: TranslationArg, amount?: TranslationArg];
|
|
165
170
|
[StatusEffectType.IncreasesXRate]: [increased: TranslationArg];
|
|
166
171
|
[StatusEffectType.IncreasesXRateByY]: [increased: TranslationArg, by: TranslationArg];
|
|
167
172
|
[StatusEffectType.LosingXEveryY]: [lost: TranslationArg, eventOrDuration?: TranslationArg];
|
|
@@ -29,6 +29,6 @@ declare namespace IStatusContext {
|
|
|
29
29
|
function withLevel(status: IStatusContext, level: number): IStatusContext;
|
|
30
30
|
function getInterval(status: IStatusContext): number | false;
|
|
31
31
|
function getOptions(type: StatusType, entity?: EntityWithStats): IGameOptionsStatus;
|
|
32
|
-
function getEffects(status: IStatusContext): StatusEffectList;
|
|
32
|
+
function getEffects(status: IStatusContext, displayIndex?: number): StatusEffectList;
|
|
33
33
|
}
|
|
34
34
|
export default IStatusContext;
|
|
@@ -21,6 +21,7 @@ export declare class StatusEffectList {
|
|
|
21
21
|
private readonly array;
|
|
22
22
|
private skill?;
|
|
23
23
|
private skillThresholds?;
|
|
24
|
+
private sortingDisabled;
|
|
24
25
|
constructor(context: IStatusContext);
|
|
25
26
|
private add;
|
|
26
27
|
setSkillThresholds<THRESHOLDS extends number[]>(skill: SkillType, ...thresholds: THRESHOLDS): THRESHOLDS;
|
|
@@ -30,6 +31,7 @@ export declare class StatusEffectList {
|
|
|
30
31
|
good<TYPE extends StatusEffectType>(type: TYPE | false | undefined, ...args: StatusEffectTypeArguments[TYPE]): this;
|
|
31
32
|
veryGood<TYPE extends StatusEffectType>(type: TYPE | false | undefined, ...args: StatusEffectTypeArguments[TYPE]): this;
|
|
32
33
|
passChance(revealedAt?: number): this;
|
|
34
|
+
disableSorting(): this;
|
|
33
35
|
get(): StatusEffect[];
|
|
34
36
|
getSkillThresholds(): ISkillThresholds | undefined;
|
|
35
37
|
}
|
|
@@ -34,8 +34,9 @@ export declare enum InspectType {
|
|
|
34
34
|
Deity = 22,
|
|
35
35
|
Quality = 23,
|
|
36
36
|
Magic = 24,
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
MagicCurse = 25,
|
|
38
|
+
Status = 26,
|
|
39
|
+
Damage = 27
|
|
39
40
|
}
|
|
40
41
|
/**
|
|
41
42
|
* A convenience object for the priority of an inspection compared to other inspections. Useful to make an inspection priority
|
|
@@ -48,5 +49,6 @@ export declare enum InfoIcon {
|
|
|
48
49
|
PinSelf = 2,
|
|
49
50
|
PinFriend = 3,
|
|
50
51
|
PinMap = 4,
|
|
51
|
-
PinLighthouse = 5
|
|
52
|
+
PinLighthouse = 5,
|
|
53
|
+
Curse = 6
|
|
52
54
|
}
|
|
@@ -22,6 +22,7 @@ import EquipSlotInspection from "@wayward/game/game/inspection/inspections/Equip
|
|
|
22
22
|
import IslandInspection from "@wayward/game/game/inspection/inspections/IslandInspection";
|
|
23
23
|
import ItemInspection from "@wayward/game/game/inspection/inspections/ItemInspection";
|
|
24
24
|
import ItemsInspection from "@wayward/game/game/inspection/inspections/ItemsInspection";
|
|
25
|
+
import MagicCurseInspection from "@wayward/game/game/inspection/inspections/MagicCurseInspection";
|
|
25
26
|
import MagicInspection from "@wayward/game/game/inspection/inspections/MagicInspection";
|
|
26
27
|
import MilestoneInspection from "@wayward/game/game/inspection/inspections/MilestoneInspection";
|
|
27
28
|
import NPCInspection from "@wayward/game/game/inspection/inspections/NPCInspection";
|
|
@@ -40,7 +41,7 @@ declare const inspectionTypeMap: {
|
|
|
40
41
|
14: typeof CorpseInspection;
|
|
41
42
|
15: typeof CorpsesInspection;
|
|
42
43
|
3: typeof CreatureInspection;
|
|
43
|
-
|
|
44
|
+
27: typeof DamageInspection;
|
|
44
45
|
22: typeof DeityInspection;
|
|
45
46
|
10: typeof ItemInspection;
|
|
46
47
|
4: typeof DoodadInspection;
|
|
@@ -51,6 +52,7 @@ declare const inspectionTypeMap: {
|
|
|
51
52
|
13: typeof ItemsInspection;
|
|
52
53
|
11: typeof ItemInspection;
|
|
53
54
|
24: typeof MagicInspection;
|
|
55
|
+
25: typeof MagicCurseInspection;
|
|
54
56
|
19: typeof MilestoneInspection;
|
|
55
57
|
2: typeof NPCInspection;
|
|
56
58
|
1: typeof PlayerInspection;
|
|
@@ -59,7 +61,7 @@ declare const inspectionTypeMap: {
|
|
|
59
61
|
0: typeof SelfInspection;
|
|
60
62
|
18: typeof SkillInspection;
|
|
61
63
|
20: typeof StatInspection;
|
|
62
|
-
|
|
64
|
+
26: typeof StatusInspection;
|
|
63
65
|
17: typeof TileInspection;
|
|
64
66
|
5: typeof TileEventInspection;
|
|
65
67
|
16: typeof TileEventInspection.Minors;
|
|
@@ -0,0 +1,30 @@
|
|
|
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 { InfoProvider } from "@wayward/game/game/inspection/InfoProvider";
|
|
12
|
+
import MagicalPropertyManager from "@wayward/game/game/magic/MagicalPropertyManager";
|
|
13
|
+
import type TranslationImpl from "@wayward/game/language/impl/TranslationImpl";
|
|
14
|
+
import { PathType } from "@wayward/game/resource/IResourceLoader";
|
|
15
|
+
import ImagePath from "@wayward/game/ui/util/ImagePath";
|
|
16
|
+
export default class MagicalCursePropertiesInfoProvider extends InfoProvider {
|
|
17
|
+
private readonly magic;
|
|
18
|
+
static get(magic?: MagicalPropertyManager | {
|
|
19
|
+
magic?: MagicalPropertyManager;
|
|
20
|
+
}): MagicalCursePropertiesInfoProvider | undefined;
|
|
21
|
+
constructor(magic: MagicalPropertyManager);
|
|
22
|
+
getClass(): string[];
|
|
23
|
+
getIcon(): {
|
|
24
|
+
path: ImagePath<PathType.InfoIcon>;
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
};
|
|
28
|
+
hasContent(): boolean;
|
|
29
|
+
get(): TranslationImpl;
|
|
30
|
+
}
|
|
@@ -12,7 +12,7 @@ import type { MagicalNormalPropertyTypes, MagicalPropertyIdentity } from "@waywa
|
|
|
12
12
|
import type { MagicalSubPropertyTypes } from "@wayward/game/game/magic/IMagicalProperty";
|
|
13
13
|
import type { MagicalPropertyTypeSubTypeMap } from "@wayward/game/game/magic/MagicalPropertyType";
|
|
14
14
|
import Translation from "@wayward/game/language/Translation";
|
|
15
|
-
declare function MagicalSourceTooltip(type: MagicalNormalPropertyTypes): Translation;
|
|
16
|
-
declare function MagicalSourceTooltip<T extends MagicalSubPropertyTypes>(type: T, subType: MagicalPropertyTypeSubTypeMap[T]): Translation;
|
|
17
|
-
declare function MagicalSourceTooltip(...
|
|
15
|
+
declare function MagicalSourceTooltip(type: MagicalNormalPropertyTypes, curse?: true): Translation;
|
|
16
|
+
declare function MagicalSourceTooltip<T extends MagicalSubPropertyTypes>(type: T, subType: MagicalPropertyTypeSubTypeMap[T], curse?: true): Translation;
|
|
17
|
+
declare function MagicalSourceTooltip(...identityAndIsCurse: MagicalPropertyIdentity<[curse?: true]>): Translation;
|
|
18
18
|
export default MagicalSourceTooltip;
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { InspectType } from "@wayward/game/game/inspection/IInspection";
|
|
12
|
+
import type { SimpleInfoProvider } from "@wayward/game/game/inspection/InfoProvider";
|
|
13
|
+
import { InfoProvider } from "@wayward/game/game/inspection/InfoProvider";
|
|
14
|
+
import type { InfoProviderContext } from "@wayward/game/game/inspection/InfoProviderContext";
|
|
15
|
+
import Inspection from "@wayward/game/game/inspection/Inspection";
|
|
16
|
+
import type { MagicalPropertyIdentityHash } from "@wayward/game/game/magic/IMagicalProperty";
|
|
17
|
+
import { MagicalPropertyIdentity } from "@wayward/game/game/magic/IMagicalProperty";
|
|
18
|
+
import Translation from "@wayward/game/language/Translation";
|
|
19
|
+
import type { TranslationGenerator } from "@wayward/game/ui/component/IComponent";
|
|
20
|
+
export default class MagicCurseInspection extends Inspection<MagicalPropertyIdentityHash> {
|
|
21
|
+
static handles: (type: InspectType, value: unknown, context?: InfoProviderContext) => boolean;
|
|
22
|
+
readonly magic: MagicalPropertyIdentity;
|
|
23
|
+
constructor([, magic]: [any, MagicalPropertyIdentityHash], context?: InfoProviderContext);
|
|
24
|
+
getId(): string;
|
|
25
|
+
getBorder(): string;
|
|
26
|
+
protected getTitle(context: InfoProviderContext): Translation | SimpleInfoProvider | undefined;
|
|
27
|
+
protected getSubtitle(context: InfoProviderContext): Translation | SimpleInfoProvider | undefined;
|
|
28
|
+
protected getContent(context: InfoProviderContext): ArrayOr<TranslationGenerator | InfoProvider | undefined>;
|
|
29
|
+
}
|
|
@@ -379,6 +379,19 @@ export interface IItemDescription extends IObjectDescription, IModdable, ITemper
|
|
|
379
379
|
* The item type to display instead of the described item type
|
|
380
380
|
*/
|
|
381
381
|
displayItem?: SupplierOr<DisplayableItemType | undefined, [Item]>;
|
|
382
|
+
/**
|
|
383
|
+
* A number of "display variants" for this item.
|
|
384
|
+
*
|
|
385
|
+
* Each variant must be in `ItemTypeExtra`, named `${main item type name}${1-based variant index}`.
|
|
386
|
+
* IE, `ItemType.JackOLantern` having `displayVariants: 3` will look for `ItemTypeExtra.JackOLantern1`, `JackOLantern2`, and `JackOLantern3`.
|
|
387
|
+
*
|
|
388
|
+
* Setting `displayItem` disables the functionality provided by `displayVariants`.
|
|
389
|
+
*
|
|
390
|
+
* `displayVariants` uses `aestheticRandom` to determine which variant to use.
|
|
391
|
+
* `aestheticRandom` is transferred when converting from Item to Doodad and vice versa, so the variant will remain the same,
|
|
392
|
+
* assuming `displayVariants` is set to the same count on both the item description and doodad description.
|
|
393
|
+
*/
|
|
394
|
+
displayVariants?: number;
|
|
382
395
|
onEquip?(item: Item): void;
|
|
383
396
|
onUnequip?(item: Item): void;
|
|
384
397
|
canUnequip?(item: Item): boolean | void;
|
|
@@ -1744,7 +1757,15 @@ export declare enum ItemTypeExtra {
|
|
|
1744
1757
|
WoodenBookcase_100 = 845,
|
|
1745
1758
|
RuneOfEvilSplinters = 846,
|
|
1746
1759
|
RuneOfGoodCharred = 847,
|
|
1747
|
-
TallySticks = 848
|
|
1760
|
+
TallySticks = 848,
|
|
1761
|
+
JackOLantern2 = 849,
|
|
1762
|
+
JackOLantern3 = 850,
|
|
1763
|
+
StrawScarecrow2 = 851,
|
|
1764
|
+
StrawScarecrow3 = 852,
|
|
1765
|
+
CactusScarecrow2 = 853,
|
|
1766
|
+
CactusScarecrow3 = 854,
|
|
1767
|
+
SnowScarecrow2 = 855,
|
|
1768
|
+
SnowScarecrow3 = 856
|
|
1748
1769
|
}
|
|
1749
1770
|
export type DisplayableItemType = ItemType | ItemTypeExtra;
|
|
1750
1771
|
export declare enum ItemTag {
|
|
@@ -1911,7 +1932,8 @@ export declare enum ItemTypeGroup {
|
|
|
1911
1932
|
InternalNoDropOnDoodadBreak = -9852,
|
|
1912
1933
|
Sugar = -9851,
|
|
1913
1934
|
Pan = -9850,
|
|
1914
|
-
|
|
1935
|
+
CurseWard = -9849,
|
|
1936
|
+
All = -9848
|
|
1915
1937
|
}
|
|
1916
1938
|
export type StillContainerBaseItemType = ItemType.Waterskin | ItemType.GlassBottle | ItemType.ClayJug | ItemType.CoconutContainer;
|
|
1917
1939
|
export interface IItemMovementResult {
|
|
@@ -38,6 +38,8 @@ import type { ISorter } from "@wayward/utilities/collection/sort/Sorter";
|
|
|
38
38
|
import type { Events, IEventEmitter } from "@wayward/utilities/event/EventEmitter";
|
|
39
39
|
import WorldZ from "@wayward/utilities/game/WorldZ";
|
|
40
40
|
import type { Random } from "@wayward/utilities/random/Random";
|
|
41
|
+
import type { DeityReal } from "@wayward/game/game/deity/Deity";
|
|
42
|
+
import type { IRange } from "@wayward/utilities/math/Range";
|
|
41
43
|
export interface IItemManagerEvents extends Events<EntityManager<Item>> {
|
|
42
44
|
/**
|
|
43
45
|
* Called before moving items to another container
|
|
@@ -109,8 +111,10 @@ export default class ItemManager extends EntityManager<Item, IItemRemoveOptions>
|
|
|
109
111
|
private static readonly cachedWeights;
|
|
110
112
|
private static readonly cachedMostCommonItemColors;
|
|
111
113
|
private static readonly cachedItemsThatCanBeRelic;
|
|
114
|
+
private static readonly cachedRuneChanceRanges;
|
|
112
115
|
static readonly cachedItemSpawns: Map<BiomeType, Map<WorldZ, Map<TerrainType, ItemType[]>>>;
|
|
113
116
|
static getItemTypes(): readonly ItemType[];
|
|
117
|
+
static getRuneChanceRange(deity: DeityReal): IRange;
|
|
114
118
|
static getItemsWithRecipes(): readonly ItemType[];
|
|
115
119
|
static getBestItemForTier(item: ItemType | ItemTypeGroup): ItemType | undefined;
|
|
116
120
|
static getHighestItemActionTierForAction(action: ActionType): number;
|
|
@@ -153,6 +157,7 @@ export default class ItemManager extends EntityManager<Item, IItemRemoveOptions>
|
|
|
153
157
|
private static cacheItemTypes;
|
|
154
158
|
private static cacheItemWeights;
|
|
155
159
|
private static cacheCreatureOfferingsAndResources;
|
|
160
|
+
private static cacheRuneChanceRanges;
|
|
156
161
|
static cacheAsync(): Promise<void>;
|
|
157
162
|
private static cacheRelicItems;
|
|
158
163
|
private static getDisassemblyAndBurnItemTypes;
|
|
@@ -26,11 +26,11 @@ export interface IMagicalPropertyManagerEvents extends IEventSubscriberEvents {
|
|
|
26
26
|
/**
|
|
27
27
|
* Emitted when a property was added
|
|
28
28
|
*/
|
|
29
|
-
add(...args: MagicalPropertyIdentity<[value: number]>): any;
|
|
29
|
+
add(...args: MagicalPropertyIdentity<[value: number, curse?: true]>): any;
|
|
30
30
|
/**
|
|
31
31
|
* Emitted when a property was set, and the value it was set to
|
|
32
32
|
*/
|
|
33
|
-
set(...args: MagicalPropertyIdentity<[value: number]>): any;
|
|
33
|
+
set(...args: MagicalPropertyIdentity<[value: number, curse?: true]>): any;
|
|
34
34
|
/**
|
|
35
35
|
* Emitted when a property was set or removed
|
|
36
36
|
*/
|
|
@@ -73,6 +73,22 @@ export default class MagicalPropertyManager extends EventEmitter.Host<IMagicalPr
|
|
|
73
73
|
* @returns if this object has any of the given magical property types
|
|
74
74
|
*/
|
|
75
75
|
hasAny(...types: MagicalPropertyIdentityFlat[]): boolean;
|
|
76
|
+
/**
|
|
77
|
+
* @returns if this object has any uncursed magical properties
|
|
78
|
+
*/
|
|
79
|
+
hasUncursed(): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* @returns if this object has any of the given uncursed magical property types
|
|
82
|
+
*/
|
|
83
|
+
hasUncursed(...types: MagicalPropertyIdentityFlat[]): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* @returns if this object has any cursed magical properties
|
|
86
|
+
*/
|
|
87
|
+
hasCursed(): boolean;
|
|
88
|
+
/**
|
|
89
|
+
* @returns if this object has any of the given cursed magical property types
|
|
90
|
+
*/
|
|
91
|
+
hasCursed(...types: MagicalPropertyIdentityFlat[]): boolean;
|
|
76
92
|
/**
|
|
77
93
|
* @returns whether the given type of magical property is present on this object
|
|
78
94
|
*/
|
|
@@ -109,6 +125,13 @@ export default class MagicalPropertyManager extends EventEmitter.Host<IMagicalPr
|
|
|
109
125
|
* Sets a magical sub-property on this object. Replaces any existing magical sub-property of that type
|
|
110
126
|
*/
|
|
111
127
|
set<T extends MagicalSubPropertyTypes>(type: T, subType: MagicalPropertyTypeSubTypeMap[T], value: number, curse?: true): this;
|
|
128
|
+
/**
|
|
129
|
+
* Sets a magical property or sub-property on this object. Replaces any existing of that type
|
|
130
|
+
*/
|
|
131
|
+
set(...identityAndValueAndCurse: MagicalPropertyIdentity<[value: number, curse?: true]>): this;
|
|
132
|
+
setCurse<T extends MagicalNormalPropertyTypes>(type: T, curse?: boolean): this;
|
|
133
|
+
setCurse<T extends MagicalSubPropertyTypes>(type: T, subType: MagicalPropertyTypeSubTypeMap[T], curse?: boolean): this;
|
|
134
|
+
setCurse(...identityAndCurse: MagicalPropertyIdentity<[curse?: boolean]>): this;
|
|
112
135
|
/**
|
|
113
136
|
* Removes a magical property on this object, if it exists
|
|
114
137
|
* @returns whether the magical property was removed — ie, if it existed
|
|
@@ -170,7 +193,7 @@ export default class MagicalPropertyManager extends EventEmitter.Host<IMagicalPr
|
|
|
170
193
|
* @param ender The way to end this list translation, ie and/or
|
|
171
194
|
* @param format A formatting-translation to apply to each magical property
|
|
172
195
|
*/
|
|
173
|
-
translate(ender?: ListEnder | false, format?: Translation | ((...identity: MagicalPropertyIdentity) => Translation)): TranslationImpl;
|
|
196
|
+
translate(ender?: ListEnder | false, format?: Translation | ((...identity: MagicalPropertyIdentity) => Translation), curseFilter?: "cursed" | "uncursed"): TranslationImpl;
|
|
174
197
|
/**
|
|
175
198
|
* @returns a translation for a magical property type
|
|
176
199
|
*/
|
|
@@ -180,6 +203,15 @@ export default class MagicalPropertyManager extends EventEmitter.Host<IMagicalPr
|
|
|
180
203
|
*/
|
|
181
204
|
static translate<T extends MagicalSubPropertyTypes>(type: T, subType: MagicalPropertyTypeSubTypeMap[T]): Translation;
|
|
182
205
|
static translate(...identity: MagicalPropertyIdentity): Translation;
|
|
206
|
+
/**
|
|
207
|
+
* @returns a curse translation for a magical property type
|
|
208
|
+
*/
|
|
209
|
+
static translateCurse(type: MagicalNormalPropertyTypes): Translation;
|
|
210
|
+
/**
|
|
211
|
+
* @returns a curse translation for a magical sub-property type
|
|
212
|
+
*/
|
|
213
|
+
static translateCurse<T extends MagicalSubPropertyTypes>(type: T, subType: MagicalPropertyTypeSubTypeMap[T]): Translation;
|
|
214
|
+
static translateCurse(...identity: MagicalPropertyIdentity): Translation;
|
|
183
215
|
/**
|
|
184
216
|
* @returns a translation for a magical property type
|
|
185
217
|
*/
|
|
@@ -104,6 +104,10 @@ export interface IMagicalPropertyDescription {
|
|
|
104
104
|
* By default, all magical property types can be inscribed. This allows disabling that feature for this magical property type.
|
|
105
105
|
*/
|
|
106
106
|
disableInscription?: true;
|
|
107
|
+
/**
|
|
108
|
+
* If set, this magical property cannot appear as a "curse" (inverted value) magical property.
|
|
109
|
+
*/
|
|
110
|
+
disableCurse?: true;
|
|
107
111
|
subTypeEnum?: Record<string, string | number>;
|
|
108
112
|
isValidEnum?(enumValue: number): boolean;
|
|
109
113
|
translateArgs?(...identity: MagicalPropertyIdentity): TranslationArg[];
|
|
@@ -71,7 +71,7 @@ export default class MilestoneDefinition {
|
|
|
71
71
|
*/
|
|
72
72
|
inherit(def: MilestoneDefinition): this;
|
|
73
73
|
visibility: MilestoneVisibility;
|
|
74
|
-
visibleThreshold: number | Milestone | [Milestone, number];
|
|
74
|
+
visibleThreshold: number | Milestone | [Milestone, string | number];
|
|
75
75
|
/**
|
|
76
76
|
* @param visibility Whether the milestone is completely visible, has its name hidden, or has its required amount hidden. Defaults to `Visible`
|
|
77
77
|
* @param until Sets the time when the milestone will become `Visible`. This can be any of:
|
|
@@ -79,7 +79,7 @@ export default class MilestoneDefinition {
|
|
|
79
79
|
* - A different milestone to complete first
|
|
80
80
|
* - A tuple of a different milestone and a value that must be discovered in that milestone
|
|
81
81
|
*/
|
|
82
|
-
setVisibility(visibility: MilestoneVisibility, until?: number | [Milestone, number]): this;
|
|
82
|
+
setVisibility(visibility: MilestoneVisibility, until?: number | [Milestone, string | number]): this;
|
|
83
83
|
/**
|
|
84
84
|
* Sets this milestone to be unlockable in all game modes, and not disabled by mods.
|
|
85
85
|
*/
|
|
@@ -173,7 +173,14 @@ export interface IGameOptions {
|
|
|
173
173
|
*/
|
|
174
174
|
qualities: DefaultMap<Quality, IGameOptionsItemQuality>;
|
|
175
175
|
};
|
|
176
|
+
/**
|
|
177
|
+
* Controls random island events (excluding curse events).
|
|
178
|
+
*/
|
|
176
179
|
randomEvents: boolean;
|
|
180
|
+
/**
|
|
181
|
+
* Controls curse events
|
|
182
|
+
*/
|
|
183
|
+
curseEvents: boolean;
|
|
177
184
|
}
|
|
178
185
|
export declare enum UnlockedRecipesStrategy {
|
|
179
186
|
StartWithNone = 0,
|
|
@@ -55,7 +55,8 @@ export declare enum ReferenceType {
|
|
|
55
55
|
Quality = 17,
|
|
56
56
|
Magic = 18,
|
|
57
57
|
Status = 19,
|
|
58
|
-
Damage = 20
|
|
58
|
+
Damage = 20,
|
|
59
|
+
MagicCurse = 21
|
|
59
60
|
}
|
|
60
61
|
export declare const enumRefTypes: {
|
|
61
62
|
8: typeof SkillType;
|
|
@@ -910,6 +911,14 @@ export declare const enumRefTypes: {
|
|
|
910
911
|
RuneOfEvilSplinters: ItemTypeExtra.RuneOfEvilSplinters;
|
|
911
912
|
RuneOfGoodCharred: ItemTypeExtra.RuneOfGoodCharred;
|
|
912
913
|
TallySticks: ItemTypeExtra.TallySticks;
|
|
914
|
+
JackOLantern2: ItemTypeExtra.JackOLantern2;
|
|
915
|
+
JackOLantern3: ItemTypeExtra.JackOLantern3;
|
|
916
|
+
StrawScarecrow2: ItemTypeExtra.StrawScarecrow2;
|
|
917
|
+
StrawScarecrow3: ItemTypeExtra.StrawScarecrow3;
|
|
918
|
+
CactusScarecrow2: ItemTypeExtra.CactusScarecrow2;
|
|
919
|
+
CactusScarecrow3: ItemTypeExtra.CactusScarecrow3;
|
|
920
|
+
SnowScarecrow2: ItemTypeExtra.SnowScarecrow2;
|
|
921
|
+
SnowScarecrow3: ItemTypeExtra.SnowScarecrow3;
|
|
913
922
|
};
|
|
914
923
|
12: typeof ItemType;
|
|
915
924
|
13: typeof Stat;
|
|
@@ -919,6 +928,7 @@ export declare const enumRefTypes: {
|
|
|
919
928
|
16: typeof Deity;
|
|
920
929
|
17: typeof Quality;
|
|
921
930
|
18: boolean;
|
|
931
|
+
21: boolean;
|
|
922
932
|
20: typeof DamageType;
|
|
923
933
|
};
|
|
924
934
|
export type EnumReferenceTypes = keyof typeof enumRefTypes;
|
|
@@ -949,6 +959,7 @@ export interface IReferenceTypeMap {
|
|
|
949
959
|
[ReferenceType.Deity]: [ReferenceType.Deity, Deity];
|
|
950
960
|
[ReferenceType.Quality]: [ReferenceType.Quality, Quality];
|
|
951
961
|
[ReferenceType.Magic]: [ReferenceType.Magic, MagicalPropertyIdentityHash];
|
|
962
|
+
[ReferenceType.MagicCurse]: [ReferenceType.MagicCurse, MagicalPropertyIdentityHash];
|
|
952
963
|
[ReferenceType.Status]: [ReferenceType.Status, StatusType];
|
|
953
964
|
[ReferenceType.Damage]: [ReferenceType.Damage, DamageType];
|
|
954
965
|
}
|
|
@@ -153,6 +153,7 @@ export default class Tile implements IVector4, Partial<ITileContainer>, IFieldOf
|
|
|
153
153
|
* Gets the primary/first blocking entity on this tile.
|
|
154
154
|
*/
|
|
155
155
|
get entity(): Entity | undefined;
|
|
156
|
+
get entities(): Entity[];
|
|
156
157
|
/**
|
|
157
158
|
* Gets well data on this tile.
|
|
158
159
|
*/
|
|
@@ -12,10 +12,11 @@ import type { PartOfDayGranular, TimeString } from "@wayward/game/game/time/ITim
|
|
|
12
12
|
import { DayQuarter, TimeFormat } from "@wayward/game/game/time/ITimeManager";
|
|
13
13
|
import type TranslationImpl from "@wayward/game/language/impl/TranslationImpl";
|
|
14
14
|
export default class TimeManager {
|
|
15
|
-
dayLength
|
|
15
|
+
private dayLength;
|
|
16
16
|
dayPercent: number;
|
|
17
17
|
frozenTime?: number;
|
|
18
18
|
private _ticks;
|
|
19
|
+
private dayAnchor;
|
|
19
20
|
private readonly transitionPercent;
|
|
20
21
|
get dayStart(): number;
|
|
21
22
|
constructor(turns: number);
|
|
@@ -31,6 +32,7 @@ export default class TimeManager {
|
|
|
31
32
|
* Returns which day it is. Starts at 1.
|
|
32
33
|
*/
|
|
33
34
|
get day(): number;
|
|
35
|
+
getDayLength(): number;
|
|
34
36
|
/**
|
|
35
37
|
* Returns whether time is frozen.
|
|
36
38
|
*/
|
|
@@ -131,6 +133,7 @@ export default class TimeManager {
|
|
|
131
133
|
* Used exclusively for save conversion.
|
|
132
134
|
*/
|
|
133
135
|
restoreFromDayNight(dayNight: number, dayNightSwitch: 0 | 1): void;
|
|
136
|
+
setDayLength(value: number): void;
|
|
134
137
|
/**
|
|
135
138
|
* Sets the time.
|
|
136
139
|
* @param time A number between `0` and `1`, where `0` is the start of the day and `1` is the end.
|
|
@@ -1013,6 +1013,14 @@ declare const dictionaryMap: {
|
|
|
1013
1013
|
RuneOfEvilSplinters: ItemTypeExtra.RuneOfEvilSplinters;
|
|
1014
1014
|
RuneOfGoodCharred: ItemTypeExtra.RuneOfGoodCharred;
|
|
1015
1015
|
TallySticks: ItemTypeExtra.TallySticks;
|
|
1016
|
+
JackOLantern2: ItemTypeExtra.JackOLantern2;
|
|
1017
|
+
JackOLantern3: ItemTypeExtra.JackOLantern3;
|
|
1018
|
+
StrawScarecrow2: ItemTypeExtra.StrawScarecrow2;
|
|
1019
|
+
StrawScarecrow3: ItemTypeExtra.StrawScarecrow3;
|
|
1020
|
+
CactusScarecrow2: ItemTypeExtra.CactusScarecrow2;
|
|
1021
|
+
CactusScarecrow3: ItemTypeExtra.CactusScarecrow3;
|
|
1022
|
+
SnowScarecrow2: ItemTypeExtra.SnowScarecrow2;
|
|
1023
|
+
SnowScarecrow3: ItemTypeExtra.SnowScarecrow3;
|
|
1016
1024
|
};
|
|
1017
1025
|
65: {
|
|
1018
1026
|
Bow: ItemType.Bow;
|
|
@@ -1863,6 +1871,14 @@ declare const dictionaryMap: {
|
|
|
1863
1871
|
RuneOfEvilSplinters: ItemTypeExtra.RuneOfEvilSplinters;
|
|
1864
1872
|
RuneOfGoodCharred: ItemTypeExtra.RuneOfGoodCharred;
|
|
1865
1873
|
TallySticks: ItemTypeExtra.TallySticks;
|
|
1874
|
+
JackOLantern2: ItemTypeExtra.JackOLantern2;
|
|
1875
|
+
JackOLantern3: ItemTypeExtra.JackOLantern3;
|
|
1876
|
+
StrawScarecrow2: ItemTypeExtra.StrawScarecrow2;
|
|
1877
|
+
StrawScarecrow3: ItemTypeExtra.StrawScarecrow3;
|
|
1878
|
+
CactusScarecrow2: ItemTypeExtra.CactusScarecrow2;
|
|
1879
|
+
CactusScarecrow3: ItemTypeExtra.CactusScarecrow3;
|
|
1880
|
+
SnowScarecrow2: ItemTypeExtra.SnowScarecrow2;
|
|
1881
|
+
SnowScarecrow3: ItemTypeExtra.SnowScarecrow3;
|
|
1866
1882
|
};
|
|
1867
1883
|
66: typeof ItemTypeExtra;
|
|
1868
1884
|
67: typeof ItemTypeGroup;
|
|
@@ -2847,6 +2863,14 @@ export declare const strictDictionaries: {
|
|
|
2847
2863
|
RuneOfEvilSplinters: ItemTypeExtra.RuneOfEvilSplinters;
|
|
2848
2864
|
RuneOfGoodCharred: ItemTypeExtra.RuneOfGoodCharred;
|
|
2849
2865
|
TallySticks: ItemTypeExtra.TallySticks;
|
|
2866
|
+
JackOLantern2: ItemTypeExtra.JackOLantern2;
|
|
2867
|
+
JackOLantern3: ItemTypeExtra.JackOLantern3;
|
|
2868
|
+
StrawScarecrow2: ItemTypeExtra.StrawScarecrow2;
|
|
2869
|
+
StrawScarecrow3: ItemTypeExtra.StrawScarecrow3;
|
|
2870
|
+
CactusScarecrow2: ItemTypeExtra.CactusScarecrow2;
|
|
2871
|
+
CactusScarecrow3: ItemTypeExtra.CactusScarecrow3;
|
|
2872
|
+
SnowScarecrow2: ItemTypeExtra.SnowScarecrow2;
|
|
2873
|
+
SnowScarecrow3: ItemTypeExtra.SnowScarecrow3;
|
|
2850
2874
|
};
|
|
2851
2875
|
65: {
|
|
2852
2876
|
Bow: ItemType.Bow;
|
|
@@ -3697,6 +3721,14 @@ export declare const strictDictionaries: {
|
|
|
3697
3721
|
RuneOfEvilSplinters: ItemTypeExtra.RuneOfEvilSplinters;
|
|
3698
3722
|
RuneOfGoodCharred: ItemTypeExtra.RuneOfGoodCharred;
|
|
3699
3723
|
TallySticks: ItemTypeExtra.TallySticks;
|
|
3724
|
+
JackOLantern2: ItemTypeExtra.JackOLantern2;
|
|
3725
|
+
JackOLantern3: ItemTypeExtra.JackOLantern3;
|
|
3726
|
+
StrawScarecrow2: ItemTypeExtra.StrawScarecrow2;
|
|
3727
|
+
StrawScarecrow3: ItemTypeExtra.StrawScarecrow3;
|
|
3728
|
+
CactusScarecrow2: ItemTypeExtra.CactusScarecrow2;
|
|
3729
|
+
CactusScarecrow3: ItemTypeExtra.CactusScarecrow3;
|
|
3730
|
+
SnowScarecrow2: ItemTypeExtra.SnowScarecrow2;
|
|
3731
|
+
SnowScarecrow3: ItemTypeExtra.SnowScarecrow3;
|
|
3700
3732
|
};
|
|
3701
3733
|
66: typeof ItemTypeExtra;
|
|
3702
3734
|
67: typeof ItemTypeGroup;
|
|
@@ -135,6 +135,7 @@ declare namespace Translation {
|
|
|
135
135
|
export const deity: Translator<Deity, [color?: boolean | undefined]>;
|
|
136
136
|
export let action: Translator<ActionType | UsableActionType>;
|
|
137
137
|
export let magic: Translator<MagicalPropertyType, [color?: boolean, obscured?: boolean]>;
|
|
138
|
+
export let magicCurse: Translator<MagicalPropertyType, [color?: boolean, obscured?: boolean]>;
|
|
138
139
|
export const equipSlot: Translator<EquipType, [type?: EquipSlotTranslation | undefined]>;
|
|
139
140
|
export const quality: Translator<Quality, [color?: any]>;
|
|
140
141
|
export const qualityList: (qualities: ArrayOr<Quality>, color?: boolean, ender?: ListEnder | false) => Translation;
|