@wayward/types 2.11.0-beta.dev.20211127.1 → 2.11.0-beta.dev.20211128.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/Game.d.ts +2 -0
- package/definitions/game/game/entity/EntityManager.d.ts +11 -0
- package/definitions/game/game/entity/creature/CreatureManager.d.ts +1 -1
- package/definitions/game/game/entity/npc/INPC.d.ts +13 -0
- package/definitions/game/ui/input/InputManager.d.ts +2 -0
- package/package.json +1 -1
|
@@ -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
|
+
/// <reference types="node" />
|
|
11
12
|
import EventEmitter from "event/EventEmitter";
|
|
12
13
|
import type Entity from "game/entity/Entity";
|
|
13
14
|
import type { Defense } from "game/entity/IEntity";
|
|
@@ -60,6 +61,7 @@ export declare class Game extends EventEmitter.Host<IGameEvents> {
|
|
|
60
61
|
lastTickTime: number | undefined;
|
|
61
62
|
saveClear: boolean;
|
|
62
63
|
tileDecorations: Uint16Array;
|
|
64
|
+
initialThumbnailTimeout: NodeJS.Timer | undefined;
|
|
63
65
|
mapSize: number;
|
|
64
66
|
mapSizeSq: number;
|
|
65
67
|
readonly itemStylesheetHandler: ItemStylesheetHandler | undefined;
|
|
@@ -17,9 +17,20 @@ export interface IEntityManagerEvents<T extends Entity> {
|
|
|
17
17
|
spawn(entity: T): any;
|
|
18
18
|
remove(entity: T): any;
|
|
19
19
|
}
|
|
20
|
+
export interface IEntityCanCreateOptions {
|
|
21
|
+
allowEdgeSpawning?: boolean;
|
|
22
|
+
allowOnBlockedTiles?: boolean;
|
|
23
|
+
allowOnFire?: boolean;
|
|
24
|
+
allowOverDooadsAndTileEvents?: boolean;
|
|
25
|
+
chanceOfScarecrowScare?: number;
|
|
26
|
+
}
|
|
20
27
|
export default abstract class EntityManager<T extends Entity> extends ObjectManager<T, IEntityManagerEvents<T>> implements IEntityManager<T> {
|
|
21
28
|
private readonly moveTypesInFov;
|
|
22
29
|
remove(entity: T): void;
|
|
23
30
|
updateFov(bounds: Bound3[]): number;
|
|
24
31
|
getMoveTypesInFov(): IMoveTypeZ[];
|
|
32
|
+
/**
|
|
33
|
+
* Checks if the target position is a good spot for a new entity
|
|
34
|
+
*/
|
|
35
|
+
protected canCreateEntity(x: number, y: number, z: number, options?: IEntityCanCreateOptions): boolean;
|
|
25
36
|
}
|
|
@@ -16,7 +16,7 @@ import type Human from "game/entity/Human";
|
|
|
16
16
|
import { MoveType } from "game/entity/IEntity";
|
|
17
17
|
import type Player from "game/entity/player/Player";
|
|
18
18
|
import type { ITile } from "game/tile/ITerrain";
|
|
19
|
-
import Vector3 from "utilities/math/Vector3";
|
|
19
|
+
import type Vector3 from "utilities/math/Vector3";
|
|
20
20
|
export interface ICreatureManagerEvents extends Events<EntityManager<Creature>> {
|
|
21
21
|
/**
|
|
22
22
|
* Called when a creature is about to be spawned
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2011-2021 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
|
+
export interface INPCOld {
|
|
12
|
+
equipped?: Record<number, number>;
|
|
13
|
+
}
|
|
@@ -111,6 +111,8 @@ declare class InputManager extends EventEmitter.Host<IInputManagerEvents> {
|
|
|
111
111
|
extractModifiers(evt: Event): Set<Modifier> | undefined;
|
|
112
112
|
getCatalyst(evt: Event): InputCatalyst | undefined;
|
|
113
113
|
disableUntil(until: number | Promise<any>, disabler: string): void;
|
|
114
|
+
disable(disabler: string): boolean;
|
|
115
|
+
enable(disabler: string): void;
|
|
114
116
|
isDisabled(): boolean;
|
|
115
117
|
isDisabledBy(disabler: string): boolean;
|
|
116
118
|
private handleRising;
|
package/package.json
CHANGED