@wayward/types 2.15.3-beta.dev.20260317.1 → 2.15.3-beta.dev.20260319.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/event/EventBuses.d.ts +8 -4
- package/definitions/game/event/EventManager.d.ts +3 -2
- package/definitions/game/game/curse/Curse.d.ts +16 -0
- package/definitions/game/game/curse/ICurse.d.ts +2 -1
- package/definitions/game/game/entity/Human.d.ts +1 -0
- package/definitions/game/game/magic/MagicalPropertyManager.d.ts +1 -0
- package/definitions/game/game/magic/MagicalPropertyType.d.ts +5 -1
- package/definitions/game/game/options/modifiers/custom/CustomModifierDefinitions.d.ts +43 -41
- package/definitions/game/game/options/modifiers/custom/ICustomModifier.d.ts +43 -42
- package/definitions/game/game/options/modifiers/custom/modifiers/CustomModifierStatCurse.d.ts +13 -0
- package/definitions/game/renderer/platform/webgl/WorldLayerRendererWebGl.d.ts +3 -1
- package/definitions/game/renderer/platform/webgpu/WorldLayerRendererWebGpu.d.ts +3 -1
- package/definitions/game/renderer/world/IWorldLayerRendererPlatform.d.ts +3 -1
- package/definitions/game/renderer/world/WorldLayerRenderer.d.ts +2 -0
- package/definitions/game/renderer/world/WorldRenderer.d.ts +2 -0
- package/definitions/game/ui/screen/screens/game/util/movement/ActionMenuHandler.d.ts +0 -2
- package/definitions/game/ui/screen/screens/game/util/movement/InteractionHandler.d.ts +3 -0
- package/definitions/game/ui/screen/screens/game/util/movement/InteractionManager.d.ts +2 -0
- package/definitions/game/ui/screen/screens/game/util/movement/PathQueryCache.d.ts +25 -0
- package/definitions/test/suite/unitTests/game/CurseFoW.spec.d.ts +13 -0
- package/package.json +1 -1
|
@@ -52,6 +52,7 @@ import type HoveredTileTracker from "@wayward/game/ui/screen/screens/game/util/H
|
|
|
52
52
|
import type ActionMenuHandler from "@wayward/game/ui/screen/screens/game/util/movement/ActionMenuHandler";
|
|
53
53
|
import type InteractionManager from "@wayward/game/ui/screen/screens/game/util/movement/InteractionManager";
|
|
54
54
|
import type MovementHandler from "@wayward/game/ui/screen/screens/game/util/movement/MovementHandler";
|
|
55
|
+
import type PathQueryCache from "@wayward/game/ui/screen/screens/game/util/movement/PathQueryCache";
|
|
55
56
|
import type PathingHandler from "@wayward/game/ui/screen/screens/game/util/movement/PathingHandler";
|
|
56
57
|
import { EventBusManager } from "@wayward/utilities/event/EventBusManager";
|
|
57
58
|
export declare enum EventBus {
|
|
@@ -101,8 +102,9 @@ export declare enum EventBus {
|
|
|
101
102
|
UiItemComponentStatic = 43,
|
|
102
103
|
UiMovementHandler = 44,
|
|
103
104
|
UiPathingHandler = 45,
|
|
104
|
-
|
|
105
|
-
|
|
105
|
+
UiPathQueryCache = 46,
|
|
106
|
+
UsableActions = 47,
|
|
107
|
+
WorldRenderer = 48
|
|
106
108
|
}
|
|
107
109
|
declare const eventBuses: {
|
|
108
110
|
[EventBus.Actions](): ActionExecutor<any, any, any, any, any>;
|
|
@@ -151,6 +153,7 @@ declare const eventBuses: {
|
|
|
151
153
|
[EventBus.UiItemComponentStatic](): ItemComponentEventBus;
|
|
152
154
|
[EventBus.UiMovementHandler](): MovementHandler;
|
|
153
155
|
[EventBus.UiPathingHandler](): PathingHandler;
|
|
156
|
+
[EventBus.UiPathQueryCache](): PathQueryCache;
|
|
154
157
|
[EventBus.UsableActions](): UsableAction;
|
|
155
158
|
[EventBus.WorldRenderer](): WorldRenderer;
|
|
156
159
|
};
|
|
@@ -202,8 +205,9 @@ export declare const eventBusManager: EventBusManager<EventBus, {
|
|
|
202
205
|
43(): ItemComponentEventBus;
|
|
203
206
|
44(): MovementHandler;
|
|
204
207
|
45(): PathingHandler;
|
|
205
|
-
46():
|
|
206
|
-
47():
|
|
208
|
+
46(): PathQueryCache;
|
|
209
|
+
47(): UsableAction;
|
|
210
|
+
48(): WorldRenderer;
|
|
207
211
|
}>;
|
|
208
212
|
/**
|
|
209
213
|
* For backwards compat / ease of use
|
|
@@ -62,8 +62,9 @@ export declare const eventManager: EventManager<EventBus, {
|
|
|
62
62
|
43(): import("../ui/screen/screens/game/component/item/ItemComponentEventBus").default;
|
|
63
63
|
44(): import("../ui/screen/screens/game/util/movement/MovementHandler").default;
|
|
64
64
|
45(): import("../ui/screen/screens/game/util/movement/PathingHandler").default;
|
|
65
|
-
46(): import("../game/
|
|
66
|
-
47(): import("../
|
|
65
|
+
46(): import("../ui/screen/screens/game/util/movement/PathQueryCache").default;
|
|
66
|
+
47(): import("../game/entity/action/usable/UsableAction").default;
|
|
67
|
+
48(): import("../renderer/world/WorldRenderer").WorldRenderer;
|
|
67
68
|
}>;
|
|
68
69
|
/**
|
|
69
70
|
* EventHandler that is typed with the games event buses
|
|
@@ -104,6 +104,11 @@ export declare const CURSE_EVENTS_RUNE_CHANCE_MULTIPLIER_LUCKY: IRange<number>;
|
|
|
104
104
|
export declare const CURSE_EVENTS_RUNES_KILL_TAME: Array<WeightedOption<IRange>>;
|
|
105
105
|
export declare const CURSE_EVENTS_RUNES_SURVIVED: IRange<number>;
|
|
106
106
|
export declare const CURSE_EVENTS_CREATURE_WANDER_CURSEBEARER_PRIORITY: IRange<number>;
|
|
107
|
+
export declare const CURSE_EVENTS_VISUAL_EXPLORED_FADE_TURNS = 30;
|
|
108
|
+
export declare const CURSE_EVENTS_VISUAL_EXPLORED_FAST_PHASE_TURNS = 50;
|
|
109
|
+
export declare const CURSE_EVENTS_VISUAL_EXPLORED_MAIN_ALGORITHM_RADIUS = 150;
|
|
110
|
+
export declare const CURSE_EVENTS_VISUAL_EXPLORED_ALPHA_BATCH_SIZE = 4096;
|
|
111
|
+
export declare const CURSE_EVENTS_VISUAL_EXPLORED_VISIBLE_BUFFER_RADIUS = 1;
|
|
107
112
|
declare namespace Curse {
|
|
108
113
|
interface Helper {
|
|
109
114
|
context: CurseEventContext;
|
|
@@ -127,6 +132,8 @@ declare namespace Curse {
|
|
|
127
132
|
function attemptCurseEventSpawn(category: CurseCategory | null, human: Human, curse: number, humans: Human[], events: CurseEventInstance[], allowDependents?: boolean): CurseEventInstance | undefined;
|
|
128
133
|
function attemptSpecificCurseEventSpawn(human: Human, type: CurseEventType, humans: Human[], curse?: number, force?: boolean | "full"): CurseEventInstance | undefined;
|
|
129
134
|
function attemptSpecificCurseEventSpawnOnPlayer(player: Human, curseType: CurseEventType, force: boolean | "full"): CurseEventInstance | undefined;
|
|
135
|
+
function resetVisualExploredState(island: Island): void;
|
|
136
|
+
function obscureVisualExploredState(island: Island): void;
|
|
130
137
|
function unload(island: Island): void;
|
|
131
138
|
function cleanup(island: Island, humans?: Human[], isMorning?: boolean): void;
|
|
132
139
|
function cleanupEphemerals(island: Island): void;
|
|
@@ -136,10 +143,19 @@ declare namespace Curse {
|
|
|
136
143
|
declare const SYMBOL_CURSE_EVENT_SUBSCRIBER_INSTANCES: unique symbol;
|
|
137
144
|
declare const SYMBOL_CURSE_EVENT_GLOBAL_SUBSCRIBER_INSTANCE: unique symbol;
|
|
138
145
|
declare const SYMBOL_CURSE_EVENT_ACTIVE_SUBSCRIBER_INSTANCE: unique symbol;
|
|
146
|
+
type CurseVisualHiddenExploredTilesByZ = Partial<Record<number, number[]>>;
|
|
147
|
+
type CurseVisualFastStepsByZ = Partial<Record<number, number>>;
|
|
148
|
+
type CurseVisualOriginsByZ = Partial<Record<number, IVector2>>;
|
|
139
149
|
interface Curse {
|
|
140
150
|
night?: true;
|
|
141
151
|
globalCurse?: number;
|
|
142
152
|
events?: CurseEventInstance[];
|
|
153
|
+
visualState?: CurseVisualHiddenExploredTilesByZ;
|
|
154
|
+
visualStateFastHideStepsByZ?: CurseVisualFastStepsByZ;
|
|
155
|
+
visualStateFastRestoreStepsByZ?: CurseVisualFastStepsByZ;
|
|
156
|
+
visualStateHideOriginsByZ?: CurseVisualOriginsByZ;
|
|
157
|
+
visualStateRestoreOriginsByZ?: CurseVisualOriginsByZ;
|
|
158
|
+
visualStateWeightedRestoreStepsByZ?: CurseVisualFastStepsByZ;
|
|
143
159
|
cooldown?: number;
|
|
144
160
|
ephemeralCreatures?: number[];
|
|
145
161
|
[SYMBOL_CURSE_EVENT_GLOBAL_SUBSCRIBER_INSTANCE]?: CurseEventSubscriber;
|
|
@@ -195,6 +195,7 @@ export default abstract class Human<DescriptionType = unknown, TypeType extends
|
|
|
195
195
|
* Luck is a multiplier applied to some random chance calculations.
|
|
196
196
|
*/
|
|
197
197
|
get luck(): number;
|
|
198
|
+
private getEquipmentLuckModifier;
|
|
198
199
|
get debug(): Debug.JIT<[]>;
|
|
199
200
|
updateDirection(tile: Tile | Direction.Cardinal, updateVehicleDirection?: boolean): Direction.Cardinal;
|
|
200
201
|
/**
|
|
@@ -89,6 +89,7 @@ export default class MagicalPropertyManager extends EventEmitter.Host<IMagicalPr
|
|
|
89
89
|
* @returns if this object has any of the given cursed magical property types
|
|
90
90
|
*/
|
|
91
91
|
hasCursed(...types: MagicalPropertyIdentityFlat[]): boolean;
|
|
92
|
+
private checkSupertypeCurseState;
|
|
92
93
|
/**
|
|
93
94
|
* @returns whether the given type of magical property is present on this object
|
|
94
95
|
*/
|
|
@@ -83,7 +83,11 @@ declare enum MagicalPropertyType {
|
|
|
83
83
|
/** Adds bonus durability to an item */
|
|
84
84
|
Persistence_MaxDurability = 30,
|
|
85
85
|
/** Adds a chance in which an item does reduce in decay when passing a turn */
|
|
86
|
-
Perpetuity_DecayLossChance = 31
|
|
86
|
+
Perpetuity_DecayLossChance = 31,
|
|
87
|
+
/** Increases the human luck multiplier while equipped */
|
|
88
|
+
Fortune_Luck = 32,
|
|
89
|
+
/** Reduces curse rate while equipped */
|
|
90
|
+
Warding_CurseReduction = 33
|
|
87
91
|
}
|
|
88
92
|
export default MagicalPropertyType;
|
|
89
93
|
export declare enum MagicalPropertyStat {
|
|
@@ -16,38 +16,38 @@ declare const map: {
|
|
|
16
16
|
1: GameOptionsIcon.Crafting;
|
|
17
17
|
2: GameOptionsIcon.Crafting;
|
|
18
18
|
3: GameOptionsIcon.Curse;
|
|
19
|
-
4: GameOptionsIcon.
|
|
20
|
-
5: GameOptionsIcon.
|
|
19
|
+
4: GameOptionsIcon.Curse;
|
|
20
|
+
5: GameOptionsIcon.Peaceful;
|
|
21
21
|
6: GameOptionsIcon.Creatures;
|
|
22
22
|
7: GameOptionsIcon.Creatures;
|
|
23
23
|
8: GameOptionsIcon.Creatures;
|
|
24
24
|
9: GameOptionsIcon.Creatures;
|
|
25
|
-
10: GameOptionsIcon.
|
|
25
|
+
10: GameOptionsIcon.Creatures;
|
|
26
26
|
11: GameOptionsIcon.Travel;
|
|
27
|
-
12: GameOptionsIcon.
|
|
28
|
-
13: GameOptionsIcon.
|
|
29
|
-
14: GameOptionsIcon.
|
|
30
|
-
15: GameOptionsIcon.
|
|
31
|
-
16: GameOptionsIcon.
|
|
32
|
-
17: GameOptionsIcon.
|
|
33
|
-
18: GameOptionsIcon.
|
|
34
|
-
19: GameOptionsIcon.
|
|
35
|
-
20: GameOptionsIcon.
|
|
27
|
+
12: GameOptionsIcon.Travel;
|
|
28
|
+
13: GameOptionsIcon.Luck;
|
|
29
|
+
14: GameOptionsIcon.Weight;
|
|
30
|
+
15: GameOptionsIcon.Health;
|
|
31
|
+
16: GameOptionsIcon.Stamina;
|
|
32
|
+
17: GameOptionsIcon.Hunger;
|
|
33
|
+
18: GameOptionsIcon.Thirst;
|
|
34
|
+
19: GameOptionsIcon.Items;
|
|
35
|
+
20: GameOptionsIcon.NoItems;
|
|
36
36
|
21: GameOptionsIcon.Items;
|
|
37
|
-
22: GameOptionsIcon.
|
|
37
|
+
22: GameOptionsIcon.Items;
|
|
38
38
|
23: GameOptionsIcon.Skills;
|
|
39
39
|
24: GameOptionsIcon.Skills;
|
|
40
40
|
25: GameOptionsIcon.Skills;
|
|
41
|
-
26: GameOptionsIcon.
|
|
42
|
-
27: GameOptionsIcon.
|
|
43
|
-
28: GameOptionsIcon.
|
|
41
|
+
26: GameOptionsIcon.Skills;
|
|
42
|
+
27: GameOptionsIcon.EternalDay;
|
|
43
|
+
28: GameOptionsIcon.EternalNight;
|
|
44
44
|
29: GameOptionsIcon.Time;
|
|
45
45
|
30: GameOptionsIcon.Time;
|
|
46
46
|
31: GameOptionsIcon.Time;
|
|
47
|
-
32: GameOptionsIcon.
|
|
48
|
-
33: GameOptionsIcon.
|
|
49
|
-
34: GameOptionsIcon.
|
|
50
|
-
35:
|
|
47
|
+
32: GameOptionsIcon.Time;
|
|
48
|
+
33: GameOptionsIcon.Bleeding;
|
|
49
|
+
34: GameOptionsIcon.Poisoned;
|
|
50
|
+
35: GameOptionsIcon.Burned;
|
|
51
51
|
36: null;
|
|
52
52
|
37: null;
|
|
53
53
|
38: null;
|
|
@@ -58,6 +58,7 @@ declare const map: {
|
|
|
58
58
|
43: null;
|
|
59
59
|
44: null;
|
|
60
60
|
45: null;
|
|
61
|
+
46: null;
|
|
61
62
|
};
|
|
62
63
|
export declare const customModifierToGameOptionsIconMap: Record<CustomModifierType, GameOptionsIcon | null>;
|
|
63
64
|
export type CustomModifierTypeReal = keyof {
|
|
@@ -68,37 +69,38 @@ export declare const customModifierDescriptions: {
|
|
|
68
69
|
1: CustomModifierDefinition<[]>;
|
|
69
70
|
2: CustomModifierDefinition<[]>;
|
|
70
71
|
3: CustomModifierDefinition<[]>;
|
|
71
|
-
4: CustomModifierDefinition<[]>;
|
|
72
|
+
4: CustomModifierDefinition<[initialCurse: number]>;
|
|
72
73
|
5: CustomModifierDefinition<[]>;
|
|
73
|
-
|
|
74
|
-
9: CustomModifierDefinition<[
|
|
75
|
-
|
|
76
|
-
7: CustomModifierDefinition<[
|
|
77
|
-
|
|
78
|
-
11: CustomModifierDefinition<[]>;
|
|
79
|
-
12: CustomModifierDefinition<[
|
|
80
|
-
13: CustomModifierDefinition<[
|
|
81
|
-
14: CustomModifierDefinition<[
|
|
74
|
+
6: CustomModifierDefinition<[]>;
|
|
75
|
+
9: CustomModifierDefinition<[creature: Map<import("../../../entity/creature/ICreature").CreatureType, import("@wayward/game/game/options/IGameOptions").IGameOptionsCreature>]>;
|
|
76
|
+
10: CustomModifierDefinition<[aberrants: boolean]>;
|
|
77
|
+
7: CustomModifierDefinition<[spawnLimit: number]>;
|
|
78
|
+
8: CustomModifierDefinition<[rateMultiplier: number]>;
|
|
79
|
+
11: CustomModifierDefinition<[biome: import("../../../biome/IBiome").BiomeType]>;
|
|
80
|
+
12: CustomModifierDefinition<[]>;
|
|
81
|
+
13: CustomModifierDefinition<[luckMultiplier: number]>;
|
|
82
|
+
14: CustomModifierDefinition<[bonus: number]>;
|
|
82
83
|
15: CustomModifierDefinition<[options: Partial<import("@wayward/game/game/options/IGameOptions").IGameOptionsStat>]>;
|
|
83
84
|
16: CustomModifierDefinition<[options: Partial<import("@wayward/game/game/options/IGameOptions").IGameOptionsStat>]>;
|
|
84
85
|
17: CustomModifierDefinition<[options: Partial<import("@wayward/game/game/options/IGameOptions").IGameOptionsStat>]>;
|
|
85
|
-
18: CustomModifierDefinition<[]>;
|
|
86
|
+
18: CustomModifierDefinition<[options: Partial<import("@wayward/game/game/options/IGameOptions").IGameOptionsStat>]>;
|
|
86
87
|
19: CustomModifierDefinition<[]>;
|
|
87
|
-
20: CustomModifierDefinition<[
|
|
88
|
+
20: CustomModifierDefinition<[]>;
|
|
88
89
|
21: CustomModifierDefinition<[multiplier: number]>;
|
|
89
|
-
22: CustomModifierDefinition<[
|
|
90
|
-
23: CustomModifierDefinition<[
|
|
91
|
-
24: CustomModifierDefinition<[
|
|
92
|
-
25: CustomModifierDefinition<[
|
|
93
|
-
26: CustomModifierDefinition<[]>;
|
|
90
|
+
22: CustomModifierDefinition<[multiplier: number]>;
|
|
91
|
+
23: CustomModifierDefinition<[count: number]>;
|
|
92
|
+
24: CustomModifierDefinition<[initial: number]>;
|
|
93
|
+
25: CustomModifierDefinition<[multiplier: number]>;
|
|
94
|
+
26: CustomModifierDefinition<[skill: Map<import("../../../entity/skill/ISkills").SkillType, import("@wayward/game/game/options/IGameOptions").IGameOptionsSkill>]>;
|
|
94
95
|
27: CustomModifierDefinition<[]>;
|
|
95
96
|
28: CustomModifierDefinition<[]>;
|
|
96
|
-
29: CustomModifierDefinition<[
|
|
97
|
-
30: CustomModifierDefinition<[
|
|
98
|
-
31: CustomModifierDefinition<[
|
|
99
|
-
32: CustomModifierDefinition<[
|
|
97
|
+
29: CustomModifierDefinition<[]>;
|
|
98
|
+
30: CustomModifierDefinition<[initial: number]>;
|
|
99
|
+
31: CustomModifierDefinition<[length: number]>;
|
|
100
|
+
32: CustomModifierDefinition<[percent: number]>;
|
|
100
101
|
33: CustomModifierDefinition<[options: Partial<import("@wayward/game/game/options/IGameOptions").IGameOptionsStatus>]>;
|
|
101
102
|
34: CustomModifierDefinition<[options: Partial<import("@wayward/game/game/options/IGameOptions").IGameOptionsStatus>]>;
|
|
103
|
+
35: CustomModifierDefinition<[options: Partial<import("@wayward/game/game/options/IGameOptions").IGameOptionsStatus>]>;
|
|
102
104
|
};
|
|
103
105
|
export type CustomModifierArgs = {
|
|
104
106
|
[TYPE in CustomModifierTypeReal]: ((typeof customModifierDescriptions)[TYPE] extends CustomModifierDefinition<infer ARGS> ? ARGS : never);
|
|
@@ -18,48 +18,49 @@ export declare enum CustomModifierType {
|
|
|
18
18
|
RecipesNone = 1,
|
|
19
19
|
RecipesAll = 2,
|
|
20
20
|
NoCurseEvents = 3,
|
|
21
|
-
|
|
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
|
-
|
|
21
|
+
InitialCurse = 4,
|
|
22
|
+
Peaceful = 5,
|
|
23
|
+
FearlessCreatures = 6,
|
|
24
|
+
SpawnLimit = 7,
|
|
25
|
+
SpawnRate = 8,
|
|
26
|
+
Creatures = 9,
|
|
27
|
+
OtherCreatures = 10,
|
|
28
|
+
StartingBiome = 11,
|
|
29
|
+
NoTravelEffects = 12,
|
|
30
|
+
Luck = 13,
|
|
31
|
+
Strength = 14,
|
|
32
|
+
Health = 15,
|
|
33
|
+
Stamina = 16,
|
|
34
|
+
Hunger = 17,
|
|
35
|
+
Thirst = 18,
|
|
36
|
+
TileContainers = 19,
|
|
37
|
+
NoStartingItems = 20,
|
|
38
|
+
ItemDurability = 21,
|
|
39
|
+
ItemDecay = 22,
|
|
40
|
+
StartingSkills = 23,
|
|
41
|
+
GlobalInitialSkillsValue = 24,
|
|
42
|
+
GlobalSkillGainMultiplier = 25,
|
|
43
|
+
Skills = 26,
|
|
44
|
+
EternalDay = 27,
|
|
45
|
+
EternalNight = 28,
|
|
46
|
+
FrozenTime = 29,
|
|
47
|
+
InitialTime = 30,
|
|
48
|
+
DayLength = 31,
|
|
49
|
+
DayPercent = 32,
|
|
50
|
+
Bleeding = 33,
|
|
51
|
+
Poisoned = 34,
|
|
52
|
+
Burned = 35,
|
|
53
|
+
SpecificCreatureAlwaysSpawns = 36,
|
|
54
|
+
SpecificCreatureSpawningDisabled = 37,
|
|
55
|
+
SpecificCreatureSpawns = 38,
|
|
56
|
+
StatInitial = 39,
|
|
57
|
+
StatMax = 40,
|
|
58
|
+
StatMultiplier = 41,
|
|
59
|
+
SpecificSkillInitial = 42,
|
|
60
|
+
SpecificSkillGainMultiplier = 43,
|
|
61
|
+
StatusInitial = 44,
|
|
62
|
+
StatusUntreatable = 45,
|
|
63
|
+
StatusPassChanceMultiplier = 46
|
|
63
64
|
}
|
|
64
65
|
export interface CustomModifierTranslationGroup {
|
|
65
66
|
label: Translation;
|
|
@@ -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 { CustomModifierDefinition } from "@wayward/game/game/options/modifiers/custom/ICustomModifier";
|
|
12
|
+
declare const _default: CustomModifierDefinition<[initialCurse: number]>;
|
|
13
|
+
export default _default;
|
|
@@ -8,6 +8,7 @@
|
|
|
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 type { IExploredTileAlpha } from "@wayward/game/renderer/fieldOfView/IFieldOfViewPlatform";
|
|
11
12
|
import type { WebGlRendererContext } from "@wayward/game/renderer/platform/webgl/WebGlRendererContext";
|
|
12
13
|
import type ExploreMap from "@wayward/game/renderer/exploreMap/ExploreMap";
|
|
13
14
|
import type { IWorldLayerRendererPlatform } from "@wayward/game/renderer/world/IWorldLayerRendererPlatform";
|
|
@@ -21,7 +22,8 @@ export declare class WorldLayerRendererWebGl implements IWorldLayerRendererPlatf
|
|
|
21
22
|
texExplored: WebGLTexture;
|
|
22
23
|
constructor(context: WebGlRendererContext, worldLayerRenderer: WorldLayerRenderer);
|
|
23
24
|
delete(): void;
|
|
24
|
-
setWorldLayer(worldLayer: WorldLayer, exploreMap: ExploreMap, sizeChanged: boolean): void;
|
|
25
|
+
setWorldLayer(worldLayer: WorldLayer, exploreMap: ExploreMap, sizeChanged: boolean, exploredData?: Uint8Array): void;
|
|
26
|
+
setExploredAlpha(tiles: IExploredTileAlpha[]): void;
|
|
25
27
|
updateTileLightBlock(x: number, y: number, value: number): void;
|
|
26
28
|
updateTileLightBlockMap(lightBlockMap: Uint8Array): void;
|
|
27
29
|
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import type ExploreMap from "@wayward/game/renderer/exploreMap/ExploreMap";
|
|
12
|
+
import type { IExploredTileAlpha } from "@wayward/game/renderer/fieldOfView/IFieldOfViewPlatform";
|
|
12
13
|
import type { WebGpuRendererContext } from "@wayward/game/renderer/platform/webgpu/WebGpuRendererContext";
|
|
13
14
|
import type { IWorldLayerRendererPlatform } from "@wayward/game/renderer/world/IWorldLayerRendererPlatform";
|
|
14
15
|
import type { WorldLayer } from "@wayward/game/renderer/world/WorldLayer";
|
|
@@ -16,7 +17,8 @@ import type { WorldLayerRenderer } from "@wayward/game/renderer/world/WorldLayer
|
|
|
16
17
|
export declare class WorldLayerRendererWebGpu implements IWorldLayerRendererPlatform {
|
|
17
18
|
constructor(context: WebGpuRendererContext, worldLayerRenderer: WorldLayerRenderer);
|
|
18
19
|
delete(): void;
|
|
19
|
-
setWorldLayer(worldLayer: WorldLayer, exploreMap: ExploreMap, sizeChanged: boolean): void;
|
|
20
|
+
setWorldLayer(worldLayer: WorldLayer, exploreMap: ExploreMap, sizeChanged: boolean, exploredData?: Uint8Array): void;
|
|
21
|
+
setExploredAlpha(tiles: IExploredTileAlpha[]): void;
|
|
20
22
|
updateTileLightBlock(x: number, y: number, value: number): void;
|
|
21
23
|
updateTileLightBlockMap(lightBlockMap: Uint8Array): void;
|
|
22
24
|
}
|
|
@@ -9,10 +9,12 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import type ExploreMap from "@wayward/game/renderer/exploreMap/ExploreMap";
|
|
12
|
+
import type { IExploredTileAlpha } from "@wayward/game/renderer/fieldOfView/IFieldOfViewPlatform";
|
|
12
13
|
import type { WorldLayer } from "@wayward/game/renderer/world/WorldLayer";
|
|
13
14
|
export interface IWorldLayerRendererPlatform {
|
|
14
15
|
delete(): void;
|
|
15
|
-
setWorldLayer(worldLayer: WorldLayer, exploreMap: ExploreMap, sizeChanged: boolean): void;
|
|
16
|
+
setWorldLayer(worldLayer: WorldLayer, exploreMap: ExploreMap, sizeChanged: boolean, exploredData?: Uint8Array): void;
|
|
17
|
+
setExploredAlpha(tiles: IExploredTileAlpha[]): void;
|
|
16
18
|
updateTileLightBlock(x: number, y: number, value: number): void;
|
|
17
19
|
updateTileLightBlockMap(lightBlockMap: Uint8Array): void;
|
|
18
20
|
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import EventEmitter from "@wayward/utilities/event/EventEmitter";
|
|
12
12
|
import type Tile from "@wayward/game/game/tile/Tile";
|
|
13
|
+
import type { IExploredTileAlpha } from "@wayward/game/renderer/fieldOfView/IFieldOfViewPlatform";
|
|
13
14
|
import type { IDoodadUpdate } from "@wayward/game/renderer/world/IWorldLayer";
|
|
14
15
|
import type { IWorldLayerRendererEvents } from "@wayward/game/renderer/world/IWorldLayerRenderer";
|
|
15
16
|
import { RenderLayerFlag } from "@wayward/game/renderer/world/IWorldRenderer";
|
|
@@ -72,6 +73,7 @@ export declare class WorldLayerRenderer extends EventEmitter.Host<IWorldLayerRen
|
|
|
72
73
|
private deleteTileLayers;
|
|
73
74
|
reset(): void;
|
|
74
75
|
setWorldLayer(worldLayer: WorldLayer, exploredMapClientData: ExploredMapClientData): void;
|
|
76
|
+
setExploredAlpha(tiles: IExploredTileAlpha[]): void;
|
|
75
77
|
addTileLayer(tileLayer: ITileLayerRendererPlatform): void;
|
|
76
78
|
updateAll(): void;
|
|
77
79
|
updateDoodad({ x, y }: Tile, flushTileImmediately: boolean, { doodadDescription, doodadInfo, doodadVariationX, doodadVariationY, terrainMasks }: IDoodadUpdate): void;
|
|
@@ -26,6 +26,7 @@ import WallTileAdaptor from "@wayward/game/renderer/tile/adaptors/Wall";
|
|
|
26
26
|
import type TileAtlas from "@wayward/game/renderer/tile/atlas/TileAtlas";
|
|
27
27
|
import type { IBounds } from "@wayward/game/renderer/world/IWorldRenderer";
|
|
28
28
|
import { RenderFlag, SpriteBatchLayer } from "@wayward/game/renderer/world/IWorldRenderer";
|
|
29
|
+
import type { WorldLayer } from "@wayward/game/renderer/world/WorldLayer";
|
|
29
30
|
import { WorldLayerRenderer } from "@wayward/game/renderer/world/WorldLayerRenderer";
|
|
30
31
|
import EventEmitter from "@wayward/utilities/event/EventEmitter";
|
|
31
32
|
import type { IRendererContext } from "@wayward/game/renderer/context/IRendererContext";
|
|
@@ -33,6 +34,7 @@ import type { IWorldRendererPlatform } from "@wayward/game/renderer/world/IWorld
|
|
|
33
34
|
import type { IVector2 } from "@wayward/game/utilities/math/IVector";
|
|
34
35
|
import Vector2 from "@wayward/game/utilities/math/Vector2";
|
|
35
36
|
export interface IWorldRendererEvents {
|
|
37
|
+
getExploredMapTextureData(data: Uint8Array, worldLayer: WorldLayer): Uint8Array;
|
|
36
38
|
/**
|
|
37
39
|
* Called when calculating creatures in the viewport
|
|
38
40
|
* @param creature The creature object
|
|
@@ -24,7 +24,6 @@ export default class ActionMenuHandler extends InteractionHandler {
|
|
|
24
24
|
private overlay?;
|
|
25
25
|
private path?;
|
|
26
26
|
private contextMenu?;
|
|
27
|
-
private previewDistance;
|
|
28
27
|
protected onActionsInFront(api: IBindHandlerApi): boolean;
|
|
29
28
|
protected onActions(api: IBindHandlerApi): boolean;
|
|
30
29
|
private reset;
|
|
@@ -32,5 +31,4 @@ export default class ActionMenuHandler extends InteractionHandler {
|
|
|
32
31
|
private onHide;
|
|
33
32
|
private onContextMenuOptionHovered;
|
|
34
33
|
private updatePath;
|
|
35
|
-
private getInitialPath;
|
|
36
34
|
}
|
|
@@ -13,6 +13,7 @@ import type { IBindHandlerApi } from "@wayward/game/ui/input/Bind";
|
|
|
13
13
|
import type HoveredTileTracker from "@wayward/game/ui/screen/screens/game/util/HoveredTileTracker";
|
|
14
14
|
import type ActionMenuHandler from "@wayward/game/ui/screen/screens/game/util/movement/ActionMenuHandler";
|
|
15
15
|
import type MovementHandler from "@wayward/game/ui/screen/screens/game/util/movement/MovementHandler";
|
|
16
|
+
import type PathQueryCache from "@wayward/game/ui/screen/screens/game/util/movement/PathQueryCache";
|
|
16
17
|
import type PathingHandler from "@wayward/game/ui/screen/screens/game/util/movement/PathingHandler";
|
|
17
18
|
import EventEmitter from "@wayward/utilities/event/EventEmitter";
|
|
18
19
|
export interface IInteractionHandlerEvents {
|
|
@@ -23,6 +24,7 @@ export interface IInteractionHandlerHost {
|
|
|
23
24
|
surface?: Component;
|
|
24
25
|
hoveredTile: HoveredTileTracker;
|
|
25
26
|
movement: MovementHandler;
|
|
27
|
+
pathQuery: PathQueryCache;
|
|
26
28
|
pathing: PathingHandler;
|
|
27
29
|
actionMenu: ActionMenuHandler;
|
|
28
30
|
}
|
|
@@ -32,6 +34,7 @@ export default class InteractionHandler extends EventEmitter.Host<IInteractionHa
|
|
|
32
34
|
protected get host(): IInteractionHandlerHost | undefined;
|
|
33
35
|
protected get hoveredTile(): HoveredTileTracker | undefined;
|
|
34
36
|
protected get movement(): MovementHandler | undefined;
|
|
37
|
+
protected get pathQuery(): PathQueryCache | undefined;
|
|
35
38
|
protected get pathing(): PathingHandler | undefined;
|
|
36
39
|
protected get actionMenu(): ActionMenuHandler | undefined;
|
|
37
40
|
constructor(host: IInteractionHandlerHost);
|
|
@@ -13,12 +13,14 @@ import HoveredTileTracker from "@wayward/game/ui/screen/screens/game/util/Hovere
|
|
|
13
13
|
import ActionMenuHandler from "@wayward/game/ui/screen/screens/game/util/movement/ActionMenuHandler";
|
|
14
14
|
import type { IInteractionHandlerHost } from "@wayward/game/ui/screen/screens/game/util/movement/InteractionHandler";
|
|
15
15
|
import MovementHandler from "@wayward/game/ui/screen/screens/game/util/movement/MovementHandler";
|
|
16
|
+
import PathQueryCache from "@wayward/game/ui/screen/screens/game/util/movement/PathQueryCache";
|
|
16
17
|
import PathingHandler from "@wayward/game/ui/screen/screens/game/util/movement/PathingHandler";
|
|
17
18
|
import EventEmitter from "@wayward/utilities/event/EventEmitter";
|
|
18
19
|
export interface IInteractionManagerEvents {
|
|
19
20
|
}
|
|
20
21
|
export default class InteractionManager extends EventEmitter.Host<IInteractionManagerEvents> implements IInteractionHandlerHost {
|
|
21
22
|
readonly hoveredTile: HoveredTileTracker;
|
|
23
|
+
readonly pathQuery: PathQueryCache;
|
|
22
24
|
readonly pathing: PathingHandler;
|
|
23
25
|
readonly movement: MovementHandler;
|
|
24
26
|
readonly actionMenu: ActionMenuHandler;
|
|
@@ -0,0 +1,25 @@
|
|
|
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 InteractionDistance as InteractionDistanceTypeOrRange } from "@wayward/game/game/entity/action/usable/IUsableAction";
|
|
12
|
+
import { MoveFlag } from "@wayward/game/game/entity/IEntity";
|
|
13
|
+
import type Tile from "@wayward/game/game/tile/Tile";
|
|
14
|
+
import InteractionHandler from "@wayward/game/ui/screen/screens/game/util/movement/InteractionHandler";
|
|
15
|
+
export default class PathQueryCache extends InteractionHandler {
|
|
16
|
+
private target?;
|
|
17
|
+
private readonly paths;
|
|
18
|
+
deregister(): this;
|
|
19
|
+
getPath(targetTile: Tile, distance?: InteractionDistanceTypeOrRange): Tile[] | undefined;
|
|
20
|
+
reset(targetTile?: Tile): void;
|
|
21
|
+
protected onPlayerStateChange(): void;
|
|
22
|
+
protected onPlayerPostMove(_player: typeof localPlayer, _lastTile: Tile, _tile: Tile, moveFlag: MoveFlag): void;
|
|
23
|
+
protected onTickEnd(): void;
|
|
24
|
+
private getKey;
|
|
25
|
+
}
|
|
@@ -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 type { IPaths } from "@wayward/test/interfaces";
|
|
12
|
+
import type { TestConfig } from "@wayward/test";
|
|
13
|
+
export default function (_paths: IPaths, _config: TestConfig): void;
|
package/package.json
CHANGED