@wayward/types 2.14.4-beta.dev.20250304.1 → 2.14.4-beta.dev.20250309.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.
@@ -38,6 +38,7 @@ export default class DoodadManager extends EntityManager<Doodad> {
|
|
38
38
|
private static readonly cachedDoodadGroups;
|
39
39
|
static readonly cachedDoodadSpawns: Map<BiomeType, Map<WorldZ, Map<TerrainType, DoodadType[]>>>;
|
40
40
|
private static readonly cachedDoodadsInGroup;
|
41
|
+
private static cachedMaximumGrowthTime;
|
41
42
|
private readonly scarecrows;
|
42
43
|
static getBestDoodadForTier(doodad: DoodadType | DoodadTypeGroup): DoodadType | undefined;
|
43
44
|
static generateLookups(): void;
|
@@ -46,6 +47,7 @@ export default class DoodadManager extends EntityManager<Doodad> {
|
|
46
47
|
static isInGroup(doodadType: DoodadType, doodadGroup: DoodadTypeGroup | DoodadType): boolean;
|
47
48
|
static getGroups(doodadType: DoodadType): DoodadTypeGroup[];
|
48
49
|
static getDoodadsInGroup(doodadTypeGroup: DoodadTypeGroup): DoodadType[];
|
50
|
+
static getMaximumGrowthTime(): number;
|
49
51
|
/**
|
50
52
|
* Checks if a number is a DoodadType or DoodadTypeExtra.
|
51
53
|
* @param type a number (DoodadType/DoodadTypeExtra enum).
|
@@ -99,6 +99,7 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
99
99
|
loadCount: number;
|
100
100
|
name?: string;
|
101
101
|
position: IVector2;
|
102
|
+
lastPlayerGameTimeTicks?: number;
|
102
103
|
readonly mapSize: number;
|
103
104
|
readonly treasureMaps: DrawnMap[];
|
104
105
|
readonly wellData: SaferNumberIndexedObject<IWell>;
|
@@ -280,6 +281,7 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
280
281
|
* In manual turn mode, it will tick the humans stat timers & the game
|
281
282
|
*/
|
282
283
|
passTurn(human: Human, turnType?: TurnTypeFlag, dueToAction?: boolean): void;
|
284
|
+
private travelTimeFastForward;
|
283
285
|
/**
|
284
286
|
* Fast forwards an island by running lots of ticks.
|
285
287
|
* Defaults to IslandFastForward tick flag with no playing humans.
|
@@ -330,4 +332,9 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
330
332
|
* Returns the type of liquid that can be gathered from the tile
|
331
333
|
*/
|
332
334
|
getLiquidGatherType(terrainType: TerrainType, terrainDescription: ITerrainDescription): keyof ILiquidGather | undefined;
|
335
|
+
/**
|
336
|
+
* Calculate the maximum travel time (derived currently from the maximum growth time of doodads - we don't need to simulate past that value).
|
337
|
+
* @returns number equal to the maximum travel time.
|
338
|
+
*/
|
339
|
+
getMaximumTravelTime(): number;
|
333
340
|
}
|
@@ -67,13 +67,13 @@ export declare class GlobalMouseInfo extends EventEmitter.Host<IGlobalMouseInfoE
|
|
67
67
|
* @param what A component, element, or selector.
|
68
68
|
* @param recalcTarget Whether to recalculate the target before this operation. Defaults to `false`
|
69
69
|
*/
|
70
|
-
isWithin<W extends Component | Element | string | undefined>(what?: W, recalcTarget?: boolean):
|
70
|
+
isWithin<W extends Component | Element | string | undefined>(what?: W, recalcTarget?: boolean): W extends undefined ? undefined : W extends Component ? W : W extends Element | string ? HTMLElement | undefined : never;
|
71
71
|
/**
|
72
72
|
* Returns whether the mouse is currently within the given component, element, or selector.
|
73
73
|
* @param what A component, element, or selector.
|
74
74
|
* @param recalcTarget Whether to recalculate the target before this operation. Defaults to `false`
|
75
75
|
*/
|
76
|
-
isTarget<W extends Component | Element | string | undefined>(what?: W, recalcTarget?: boolean):
|
76
|
+
isTarget<W extends Component | Element | string | undefined>(what?: W, recalcTarget?: boolean): W extends undefined ? undefined : W extends Component ? W : W extends Element | string ? HTMLElement | undefined : never;
|
77
77
|
clearTarget(target?: Element): void;
|
78
78
|
private _updateTarget;
|
79
79
|
}
|
package/package.json
CHANGED