@wayward/types 2.15.0-beta.dev.20251002.1 → 2.15.0-beta.dev.20251003.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/IGame.d.ts +2 -1
- package/definitions/game/game/curse/Curse.d.ts +88 -0
- package/definitions/game/game/curse/CurseEvent.d.ts +111 -0
- package/definitions/game/game/curse/CurseEventDefinitions.d.ts +14 -0
- package/definitions/game/game/curse/ICurse.d.ts +49 -0
- package/definitions/game/game/curse/event/CurseEventFrigidNight.d.ts +13 -0
- package/definitions/game/game/curse/event/CurseEventHeatWave.d.ts +13 -0
- package/definitions/game/game/deity/Deity.d.ts +0 -2
- package/definitions/game/game/entity/IHuman.d.ts +5 -1
- package/definitions/game/game/entity/action/actions/SetTitle.d.ts +1 -1
- package/definitions/game/game/entity/player/MessageManager.d.ts +1 -1
- package/definitions/game/game/entity/status/IStatus.d.ts +30 -7
- package/definitions/game/game/entity/status/IStatusContext.d.ts +2 -1
- package/definitions/game/game/entity/status/Status.d.ts +2 -2
- package/definitions/game/game/entity/status/handler/BadTemperatureEffect.d.ts +3 -0
- package/definitions/game/game/entity/status/statuses/Cursed.d.ts +13 -0
- package/definitions/game/game/inspection/infoProviders/doodad/StillWater.d.ts +1 -0
- package/definitions/game/game/inspection/inspections/StatusInspection.d.ts +5 -2
- package/definitions/game/game/island/Island.d.ts +5 -1
- package/definitions/game/game/milestones/IMilestone.d.ts +1 -1
- package/definitions/game/game/temperature/TemperatureManager.d.ts +3 -0
- package/definitions/game/game/time/ITimeManager.d.ts +1 -0
- package/definitions/game/game/time/TimeManager.d.ts +4 -4
- package/definitions/game/language/Dictionary.d.ts +110 -108
- package/definitions/game/language/DictionaryMap.d.ts +221 -217
- package/definitions/game/language/dictionary/Message.d.ts +876 -869
- package/definitions/game/language/dictionary/Misc.d.ts +4 -0
- package/definitions/game/language/dictionary/UiTranslation.d.ts +665 -664
- package/definitions/game/language/english/game/CurseEventCategories.d.ts +13 -0
- package/definitions/game/language/english/game/CurseEvents.d.ts +13 -0
- package/definitions/game/language/english/ui/CurseComponents.d.ts +1 -1
- package/definitions/game/resource/IResourceLoader.d.ts +44 -42
- package/definitions/game/ui/screen/screens/game/static/stats/component/StatusContext.d.ts +2 -1
- package/definitions/game/ui/screen/screens/game/static/stats/component/StatusIcon.d.ts +2 -1
- package/definitions/game/ui/screen/screens/game/static/stats/component/Statuses.d.ts +1 -1
- package/definitions/utilities/class/Inject.d.ts +1 -1
- package/definitions/utilities/math/Math2.d.ts +1 -0
- package/definitions/utilities/object/Objects.d.ts +1 -0
- package/definitions/utilities/random/Random.d.ts +6 -0
- package/package.json +1 -1
- package/definitions/game/game/deity/Curse.d.ts +0 -40
|
@@ -0,0 +1,13 @@
|
|
|
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 { CurseCategory } from "@wayward/game/game/curse/ICurse";
|
|
12
|
+
declare const curseEventCategories: Record<CurseCategory, string>;
|
|
13
|
+
export default curseEventCategories;
|
|
@@ -0,0 +1,13 @@
|
|
|
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 { CurseEventType } from "@wayward/game/game/curse/ICurse";
|
|
12
|
+
declare const curseEvents: Record<CurseEventType, [string, string]>;
|
|
13
|
+
export default curseEvents;
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
|
-
import { CurseComponent } from "@wayward/game/game/
|
|
11
|
+
import { CurseComponent } from "@wayward/game/game/curse/ICurse";
|
|
12
12
|
declare const curseComponents: Descriptions<CurseComponent, string>;
|
|
13
13
|
export default curseComponents;
|
|
@@ -19,46 +19,48 @@ export declare enum PathType {
|
|
|
19
19
|
ContainerTabAction = 7,
|
|
20
20
|
Corpse = 8,
|
|
21
21
|
Creature = 9,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
22
|
+
CurseIcon = 10,
|
|
23
|
+
CurseCategory = 11,
|
|
24
|
+
Damage = 12,
|
|
25
|
+
Deity = 13,
|
|
26
|
+
Doodad = 14,
|
|
27
|
+
Equip = 15,
|
|
28
|
+
EquipSlot = 16,
|
|
29
|
+
GameOptionsIcon = 17,
|
|
30
|
+
Hairstyle = 18,
|
|
31
|
+
HelpArticleIcon = 19,
|
|
32
|
+
InfoIcon = 20,
|
|
33
|
+
InputIcon = 21,
|
|
34
|
+
Island = 22,
|
|
35
|
+
IslandModifier = 23,
|
|
36
|
+
Item = 24,
|
|
37
|
+
Map = 25,
|
|
38
|
+
MapTile = 26,
|
|
39
|
+
MarkerIcon = 27,
|
|
40
|
+
MenuBarButtonIcon = 28,
|
|
41
|
+
MilestoneIcon = 29,
|
|
42
|
+
Music = 30,
|
|
43
|
+
Notifier = 31,
|
|
44
|
+
Overlay = 32,
|
|
45
|
+
Pin = 33,
|
|
46
|
+
Quality = 34,
|
|
47
|
+
RecipeLevel = 35,
|
|
48
|
+
SkillIcon = 36,
|
|
49
|
+
Sleep = 37,
|
|
50
|
+
SoundEffect = 38,
|
|
51
|
+
StatIcon = 39,
|
|
52
|
+
StatusEffectGroup = 40,
|
|
53
|
+
StatusIcon = 41,
|
|
54
|
+
StatusIconFrame = 42,
|
|
55
|
+
StatusIconNotifier = 43,
|
|
56
|
+
StatusOverlay = 44,
|
|
57
|
+
StatusThreatLevel = 45,
|
|
58
|
+
Terrain = 46,
|
|
59
|
+
TerrainDecoration = 47,
|
|
60
|
+
TerrainDug = 48,
|
|
61
|
+
TerrainMound = 49,
|
|
62
|
+
TerrainTilled = 50,
|
|
63
|
+
TileEvent = 51,
|
|
64
|
+
Vehicle = 52,
|
|
65
|
+
Website = 53
|
|
64
66
|
}
|
|
@@ -13,7 +13,8 @@ import { InfoProviderContext } from "@wayward/game/game/inspection/InfoProviderC
|
|
|
13
13
|
export default class StatusContext extends InfoProviderContext {
|
|
14
14
|
private readonly statusRef?;
|
|
15
15
|
get status(): Status | undefined;
|
|
16
|
-
|
|
16
|
+
get display(): number | undefined;
|
|
17
|
+
constructor(status: Status, display?: number);
|
|
17
18
|
}
|
|
18
19
|
declare module "@wayward/game/game/inspection/InfoProviderContext" {
|
|
19
20
|
interface InfoProviderContextRegistration {
|
|
@@ -14,6 +14,7 @@ import Component from "@wayward/game/ui/component/Component";
|
|
|
14
14
|
import type { IRefreshable } from "@wayward/game/ui/component/Refreshable";
|
|
15
15
|
export default class StatusIcon extends Component implements IRefreshable {
|
|
16
16
|
readonly status: Status;
|
|
17
|
+
readonly display?: number | undefined;
|
|
17
18
|
background: Component<HTMLElement>;
|
|
18
19
|
effect: Component<HTMLElement>;
|
|
19
20
|
foreground: Component<HTMLElement>;
|
|
@@ -22,7 +23,7 @@ export default class StatusIcon extends Component implements IRefreshable {
|
|
|
22
23
|
private readonly pathFrameForeground;
|
|
23
24
|
private readonly entityRef;
|
|
24
25
|
get entity(): EntityWithStats | undefined;
|
|
25
|
-
constructor(entity: EntityWithStats, status: Status);
|
|
26
|
+
constructor(entity: EntityWithStats, status: Status, display?: number | undefined);
|
|
26
27
|
setTitleMode(): this;
|
|
27
28
|
updateIcon(): void;
|
|
28
29
|
refresh(): this;
|
|
@@ -28,7 +28,7 @@ export default class Statuses extends Component {
|
|
|
28
28
|
/**
|
|
29
29
|
* Event handler for the status effects of this entity changing
|
|
30
30
|
*/
|
|
31
|
-
onStatusChange(_: any,
|
|
31
|
+
onStatusChange(_: any, type: StatusType, level: number): void;
|
|
32
32
|
protected updateStatusScale(): void;
|
|
33
33
|
private initializeTooltipLocation;
|
|
34
34
|
}
|
|
@@ -76,6 +76,6 @@ export declare namespace Injector {
|
|
|
76
76
|
*
|
|
77
77
|
* Note: Due to the implementation, this operation is negligible, so don't worry about performance impacts of calling it.
|
|
78
78
|
*/
|
|
79
|
-
function deregister<T>(injectorClass
|
|
79
|
+
function deregister<T>(injectorClass?: Class<T>, instance?: T): boolean;
|
|
80
80
|
}
|
|
81
81
|
export {};
|
|
@@ -46,6 +46,7 @@ declare namespace Math2 {
|
|
|
46
46
|
* Example: `roundNumberToMultiple(97, 10): 100`
|
|
47
47
|
*/
|
|
48
48
|
function roundNumberToMultiple(num: number, multiple: number): number;
|
|
49
|
+
function listLerp(t: number, ...values: number[]): number;
|
|
49
50
|
/**
|
|
50
51
|
* Return a number between `from` and `to`, using the decimal `t`
|
|
51
52
|
*
|
|
@@ -17,6 +17,7 @@ export type UnWeakRefified<ARGS extends any[]> = {
|
|
|
17
17
|
[INDEX in keyof ARGS]: ARGS[INDEX] | (ARGS[INDEX] extends WeakKey ? undefined : never);
|
|
18
18
|
};
|
|
19
19
|
declare namespace Objects {
|
|
20
|
+
function as<T>(value: T): T;
|
|
20
21
|
function mapOrRecordKeys<RK extends PropertyKey, MK>(o: Partial<Record<RK, any>> | Map<MK, any>): Array<RK | MK>;
|
|
21
22
|
function mapOrRecordValues<V>(o: Partial<Record<PropertyKey, V>> | Map<any, V>): V[];
|
|
22
23
|
function mapOrRecordEntries<RK extends PropertyKey, MK, V>(o: Partial<Record<RK, V>> | Map<MK, V>): Array<[RK | MK, V]>;
|
|
@@ -61,6 +61,12 @@ export declare class Random<G extends IRandomGenerator = IRandomGenerator> {
|
|
|
61
61
|
* Example: `chance(0.1)` is a `1/10` chance, `chance(0.8)` is a `4/5` chance
|
|
62
62
|
*/
|
|
63
63
|
chance(decimal: number): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Returns the number procs that should happen, given a decimal number.
|
|
66
|
+
*
|
|
67
|
+
* Example: `procs(0.1)` is a `1/10` chance for one proc, `procs(1.8)` is 1 guaranteed and `4/5` chance of another
|
|
68
|
+
*/
|
|
69
|
+
procs(decimal: number): number;
|
|
64
70
|
/**
|
|
65
71
|
* Chooses a random entry in an array and returns it
|
|
66
72
|
*/
|
package/package.json
CHANGED
|
@@ -1,40 +0,0 @@
|
|
|
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 Human from "@wayward/game/game/entity/Human";
|
|
12
|
-
import { SkillType } from "@wayward/game/game/entity/IHuman";
|
|
13
|
-
export declare enum CurseComponent {
|
|
14
|
-
Skill = 0,
|
|
15
|
-
HighestAttack = 1,
|
|
16
|
-
HighestDefense = 2,
|
|
17
|
-
CumulativeEvilCrafting = 3,
|
|
18
|
-
Equipment = 4,
|
|
19
|
-
Modifier = 5
|
|
20
|
-
}
|
|
21
|
-
export declare const CURSE_WEIGHTS: PartialRecord<CurseComponent, number>;
|
|
22
|
-
export declare const CURSE_ATTACK_MAX = 50;
|
|
23
|
-
export declare const CURSE_DEFENSE_MAX = 100;
|
|
24
|
-
export declare const CURSE_CRAFTING_MAX = 100;
|
|
25
|
-
export declare const CURSE_SKILL_MAX = 100;
|
|
26
|
-
export declare const CURSE_COMPONENTS: Record<CurseComponent, (human: Human) => number>;
|
|
27
|
-
/**
|
|
28
|
-
* Gets the highest value of either current or max skill multiplied by the "evilness" of each skill (from rune chance)
|
|
29
|
-
* (Basically, high values in any of the evil-er skills make curse go brrrr)
|
|
30
|
-
*/
|
|
31
|
-
declare function getSkillValue(human: Human): {
|
|
32
|
-
value: number;
|
|
33
|
-
skill: SkillType;
|
|
34
|
-
};
|
|
35
|
-
declare namespace Curse {
|
|
36
|
-
const getSkill: typeof getSkillValue;
|
|
37
|
-
function getComponentValue(human: Human, component: CurseComponent): number;
|
|
38
|
-
function getValue(human: Human): number;
|
|
39
|
-
}
|
|
40
|
-
export default Curse;
|