@wayward/types 2.12.0-beta.dev.20220827.4 → 2.12.0-beta.dev.20220830.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/entity/Human.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/SailToIsland.d.ts +0 -2
- package/definitions/game/game/entity/creature/Creature.d.ts +3 -3
- package/definitions/game/game/entity/creature/ICreature.d.ts +0 -1
- package/definitions/game/game/entity/creature/corpse/Corpse.d.ts +1 -0
- package/definitions/game/game/entity/creature/corpse/CorpseManager.d.ts +1 -1
- package/definitions/game/game/entity/creature/corpse/ICorpse.d.ts +1 -0
- package/definitions/game/game/entity/player/Player.d.ts +1 -1
- package/definitions/game/game/island/Island.d.ts +1 -1
- package/definitions/game/game/item/IItemManager.d.ts +3 -0
- package/definitions/game/game/item/Item.d.ts +1 -1
- package/definitions/game/game/item/ItemManager.d.ts +4 -4
- package/definitions/game/game/reference/ReferenceManager.d.ts +1 -1
- package/definitions/game/multiplayer/Multiplayer.d.ts +2 -2
- package/definitions/game/ui/old/OldUi.d.ts +1 -0
- package/definitions/game/ui/old/screens/InGameScreen.d.ts +0 -1
- package/definitions/game/ui/screen/screens/GameScreen.d.ts +1 -0
- package/definitions/game/ui/screen/screens/game/DialogManager.d.ts +2 -2
- package/definitions/game/utilities/Timer.d.ts +1 -0
- package/definitions/game/utilities/random/Random.d.ts +3 -3
- package/definitions/test/util/random.d.ts +1 -2
- package/package.json +1 -1
|
@@ -153,7 +153,7 @@ export default abstract class Human extends Entity implements IHasInsulation {
|
|
|
153
153
|
getDamageModifier(): number;
|
|
154
154
|
calculateDamageAmount(attackType: AttackType, weapon?: Item, ammoItem?: Item): number;
|
|
155
155
|
isDualWielding(): boolean;
|
|
156
|
-
getAttack(attack?: AttackType): IAttack;
|
|
156
|
+
getAttack(attack?: AttackType, weapon?: Item): IAttack;
|
|
157
157
|
private getAttackType;
|
|
158
158
|
private getAttackSkillBonus;
|
|
159
159
|
private getAttackSkill;
|
|
@@ -11,9 +11,7 @@
|
|
|
11
11
|
import { Action } from "game/entity/action/Action";
|
|
12
12
|
import type { IActionUsable } from "game/entity/action/IAction";
|
|
13
13
|
import { ActionArgument } from "game/entity/action/IAction";
|
|
14
|
-
import type Island from "game/island/Island";
|
|
15
14
|
export interface ISailToIslandCanUse extends IActionUsable {
|
|
16
|
-
newIsland?: Island;
|
|
17
15
|
distanceFromEdge?: number;
|
|
18
16
|
}
|
|
19
17
|
declare const _default: Action<[ActionArgument.Integer32, ActionArgument.Integer32], import("../../Human").default, void, ISailToIslandCanUse, [number, number]>;
|
|
@@ -17,7 +17,7 @@ import type Human from "game/entity/Human";
|
|
|
17
17
|
import type { IStatChangeInfo } from "game/entity/IEntity";
|
|
18
18
|
import { AiType, EntityType, MoveType, StatusType } from "game/entity/IEntity";
|
|
19
19
|
import type { IStat } from "game/entity/IStats";
|
|
20
|
-
import
|
|
20
|
+
import { CreationId } from "game/IGame";
|
|
21
21
|
import { TileUpdateType } from "game/IGame";
|
|
22
22
|
import type { IObject } from "game/IObject";
|
|
23
23
|
import type Island from "game/island/Island";
|
|
@@ -28,7 +28,7 @@ import type { IUnserializedCallback } from "save/serializer/ISerializer";
|
|
|
28
28
|
import type { IVector2, IVector3 } from "utilities/math/IVector";
|
|
29
29
|
export default class Creature extends Entity implements IUnserializedCallback, IObject<CreatureType> {
|
|
30
30
|
static is(value: any): value is Creature;
|
|
31
|
-
readonly objectType
|
|
31
|
+
readonly objectType = CreationId.Creature;
|
|
32
32
|
event: IEventEmitter<this, ICreatureEvents>;
|
|
33
33
|
readonly entityType: EntityType.Creature;
|
|
34
34
|
readonly tileUpdateType = TileUpdateType.Creature;
|
|
@@ -40,7 +40,7 @@ export default class Creature extends Entity implements IUnserializedCallback, I
|
|
|
40
40
|
attacks: number;
|
|
41
41
|
attempts: number;
|
|
42
42
|
};
|
|
43
|
-
respawned?:
|
|
43
|
+
respawned?: number;
|
|
44
44
|
shouldSkipNextUpdate: boolean;
|
|
45
45
|
type: CreatureType;
|
|
46
46
|
originalMoveType: MoveType | undefined;
|
|
@@ -150,7 +150,6 @@ export interface ICreatureDescription extends IModdable, ITemperatureDescription
|
|
|
150
150
|
lootGroup?: LootGroupType;
|
|
151
151
|
jumpOver?: boolean;
|
|
152
152
|
noCorpse?: boolean;
|
|
153
|
-
respawn?: boolean;
|
|
154
153
|
reputation: number;
|
|
155
154
|
waterAnimations?: boolean;
|
|
156
155
|
tamingDifficulty?: number;
|
|
@@ -32,6 +32,7 @@ export default class Corpse extends EventEmitter.Host<ICorpseEvents> implements
|
|
|
32
32
|
referenceId?: number;
|
|
33
33
|
renamed?: string | ISerializedTranslation | undefined;
|
|
34
34
|
step?: number | undefined;
|
|
35
|
+
respawned?: number;
|
|
35
36
|
type: CreatureType;
|
|
36
37
|
x: number;
|
|
37
38
|
y: number;
|
|
@@ -21,7 +21,7 @@ export interface ICorpseManagerEvents {
|
|
|
21
21
|
export default class CorpseManager extends ObjectManager<Corpse, ICorpseManagerEvents> {
|
|
22
22
|
protected readonly creationId: CreationId;
|
|
23
23
|
load(): void;
|
|
24
|
-
create(type: CreatureType, x: number, y: number, z: number, decay?: number, aberrant?: boolean, name?: string, qualityBonus?: number): Corpse | undefined;
|
|
24
|
+
create(type: CreatureType, x: number, y: number, z: number, decay?: number, aberrant?: boolean, name?: string, qualityBonus?: number, respawned?: number): Corpse | undefined;
|
|
25
25
|
updateAll(): void;
|
|
26
26
|
remove(corpse: Corpse): void;
|
|
27
27
|
getName(typeOrCorpse: CreatureType | Corpse, article?: false | "definite" | "indefinite", count?: number, showCount?: boolean): import("../../../../language/impl/TranslationImpl").default;
|
|
@@ -23,7 +23,7 @@ import type { IslandId } from "game/island/IIsland";
|
|
|
23
23
|
import type Island from "game/island/Island";
|
|
24
24
|
import type { IContainer } from "game/item/IItem";
|
|
25
25
|
import { ItemType } from "game/item/IItem";
|
|
26
|
-
import
|
|
26
|
+
import { Prompt } from "game/meta/prompt/IPrompt";
|
|
27
27
|
import { Milestone } from "game/milestones/IMilestone";
|
|
28
28
|
import type InterruptChoice from "language/dictionary/InterruptChoice";
|
|
29
29
|
import type IClientStore from "save/clientStore/IClientStore";
|
|
@@ -42,7 +42,7 @@ import World from "renderer/world/World";
|
|
|
42
42
|
import type { IPreSerializeCallback, ISerializer } from "save/serializer/ISerializer";
|
|
43
43
|
import { Direction } from "utilities/math/Direction";
|
|
44
44
|
import type { IVector2, IVector3 } from "utilities/math/IVector";
|
|
45
|
-
import { Random, SeededGenerator } from "utilities/random/Random";
|
|
45
|
+
import type { Random, SeededGenerator } from "utilities/random/Random";
|
|
46
46
|
import type { IVersionInfo } from "utilities/Version";
|
|
47
47
|
import Vector3 from "utilities/math/Vector3";
|
|
48
48
|
export interface IIslandDetails {
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import type Doodad from "game/doodad/Doodad";
|
|
12
12
|
import type { DoodadType, DoodadTypeGroup } from "game/doodad/IDoodad";
|
|
13
13
|
import type { ActionType, IActionNotUsable } from "game/entity/action/IAction";
|
|
14
|
+
import type Creature from "game/entity/creature/Creature";
|
|
14
15
|
import type { ItemType, ItemTypeGroup } from "game/item/IItem";
|
|
15
16
|
import type Item from "game/item/Item";
|
|
16
17
|
import type TileEvent from "game/tile/TileEvent";
|
|
@@ -49,6 +50,8 @@ export interface IGetBestItemsOptions extends IGetItemsOptions {
|
|
|
49
50
|
filterType: ItemType;
|
|
50
51
|
filterGroup: ItemTypeGroup;
|
|
51
52
|
filterConsumable: true;
|
|
53
|
+
targetCreature: Creature;
|
|
54
|
+
ammoItem: Item;
|
|
52
55
|
filter(item: Item): any;
|
|
53
56
|
}
|
|
54
57
|
export declare enum CraftStatus {
|
|
@@ -276,7 +276,7 @@ export default class Item extends EventEmitter.Host<IItemEvents> implements IRef
|
|
|
276
276
|
* @returns A number (possibly 0 if no quality or action level).
|
|
277
277
|
*/
|
|
278
278
|
getItemUseBonus(action?: ActionType): number;
|
|
279
|
-
|
|
279
|
+
getBestRangedWeapon(human: Human): Item | undefined;
|
|
280
280
|
/**
|
|
281
281
|
* Extinguishes to item if it is lit.
|
|
282
282
|
* @param human Human entity that is carrying the item to extinguish.
|
|
@@ -214,13 +214,13 @@ export default class ItemManager extends ObjectManager<Item, IItemManagerEvents>
|
|
|
214
214
|
countItemsInContainer(containers: IContainer | IContainer[], itemTypeSearch: ItemType, ignoreItem?: Item): number;
|
|
215
215
|
countItemsInContainerByGroup(containers: IContainer | IContainer[], itemTypeGroupSearch: ItemTypeGroup, ignoreItem?: Item): number;
|
|
216
216
|
/**
|
|
217
|
-
* Get the best
|
|
217
|
+
* Get the best items sorted by how good they are
|
|
218
218
|
*/
|
|
219
|
-
getBestSafeItems(container: IContainer, options?: Partial<IGetBestItemsOptions>): Item[];
|
|
219
|
+
getBestSafeItems(human: Human, container: IContainer, options?: Partial<IGetBestItemsOptions>): Item[];
|
|
220
220
|
/**
|
|
221
|
-
* Get the best
|
|
221
|
+
* Get the best item
|
|
222
222
|
*/
|
|
223
|
-
getBestSafeItem(container: IContainer, options?: Partial<IGetBestItemsOptions>): Item | undefined;
|
|
223
|
+
getBestSafeItem(human: Human, container: IContainer, options?: Partial<IGetBestItemsOptions>): Item | undefined;
|
|
224
224
|
getItemInContainer(container: IContainer, itemTypeSearch: ItemType, options?: Partial<IGetItemOptions>): Item | undefined;
|
|
225
225
|
getItemForHuman(human: Human, search: ItemType | ItemTypeGroup, options?: Partial<IGetItemOptions>): Item | undefined;
|
|
226
226
|
getItemInContainerByGroup(container: IContainer, itemTypeGroupSearch: ItemTypeGroup, options?: Partial<IGetItemOptions>): Item | undefined;
|
|
@@ -59,7 +59,7 @@ export declare module Reference {
|
|
|
59
59
|
}
|
|
60
60
|
export default class ReferenceManager {
|
|
61
61
|
static isEnumReference(type: ReferenceType): type is EnumReferenceTypes;
|
|
62
|
-
static getList(type: ReferenceType, gameIsland?: Island): import("../entity/creature/corpse/CorpseManager").default | import("../entity/creature/CreatureManager").default | import("../doodad/DoodadManager").default | import("../item/ItemManager").default | import("../entity/npc/NPCManager").default | import("../tile/TileEventManager").default |
|
|
62
|
+
static getList(type: ReferenceType, gameIsland?: Island): import("../entity/creature/corpse/CorpseManager").default | import("../entity/creature/CreatureManager").default | import("../doodad/DoodadManager").default | import("../item/ItemManager").default | import("../entity/npc/NPCManager").default | import("../tile/TileEventManager").default | (Player | undefined)[] | readonly Milestone[] | readonly SkillType[] | readonly ItemType[] | EquipType[] | IterableIterator<Island> | readonly Stat[] | (string | ActionType)[];
|
|
63
63
|
static get(thing: Referenceable): Reference | undefined;
|
|
64
64
|
static getReferenceType(thing: Value<IReferenceTypeMap>): ReferenceType;
|
|
65
65
|
private referenceCursor;
|
|
@@ -61,10 +61,10 @@ export default class Multiplayer extends EventEmitter.Host<IMultiplayerEvents> {
|
|
|
61
61
|
private readonly _matchmakingSecret;
|
|
62
62
|
constructor();
|
|
63
63
|
isConnected(): boolean;
|
|
64
|
-
|
|
64
|
+
isPacketProcessingPaused(): boolean;
|
|
65
|
+
isProcessingPacket(): boolean;
|
|
65
66
|
isServer(): boolean;
|
|
66
67
|
isClient(): boolean;
|
|
67
|
-
isProcessingPacket(): boolean;
|
|
68
68
|
getPlayerIdentifier(): string;
|
|
69
69
|
getOptions(): IMultiplayerOptions;
|
|
70
70
|
setOptions(options: IMultiplayerOptions, updateGame?: boolean): void;
|
|
@@ -208,7 +208,6 @@ export default class InGameScreen extends BaseScreen {
|
|
|
208
208
|
onItemRename(api: IBindHandlerApi): boolean;
|
|
209
209
|
onDropItem(api: IBindHandlerApi): boolean;
|
|
210
210
|
onReleaseDrop(): void;
|
|
211
|
-
onCloseAllDialogs(): boolean;
|
|
212
211
|
onMoreInformation(api: IBindHandlerApi): boolean;
|
|
213
212
|
onDismantleTab(): boolean;
|
|
214
213
|
private isOverlayVisible;
|
|
@@ -25,8 +25,8 @@ export default class DialogManager {
|
|
|
25
25
|
open<ID extends DialogId>(id: ID, subId?: string): DialogById[ID];
|
|
26
26
|
open<DIALOG extends Dialog>(id: DialogId, subId?: string): DIALOG;
|
|
27
27
|
isVisible(id: DialogId, subId?: string): boolean | undefined;
|
|
28
|
-
close(id: DialogId | `${DialogId}` | `${DialogId},${string}`, subId?: string):
|
|
29
|
-
closeAll():
|
|
28
|
+
close(id: DialogId | `${DialogId}` | `${DialogId},${string}`, subId?: string): boolean;
|
|
29
|
+
closeAll(): boolean;
|
|
30
30
|
toggle<ID extends DialogId>(id: ID, force?: boolean, initializer?: (dialog: DialogById[ID]) => any, subId?: string): this;
|
|
31
31
|
toggle<DIALOG extends Dialog>(id: DialogId, force?: boolean, initializer?: (dialog: DIALOG) => any, subId?: string): this;
|
|
32
32
|
toggleAll(states: IDialogStates): this;
|
|
@@ -13,6 +13,7 @@ import { ExpectedLifetime } from "utilities/memory/ILifetime";
|
|
|
13
13
|
declare module Timer {
|
|
14
14
|
function apply(): void;
|
|
15
15
|
function printActiveTimers(expectedLifetime: ExpectedLifetime): void;
|
|
16
|
+
function clearAllTimers(): void;
|
|
16
17
|
/**
|
|
17
18
|
* Creates a timeout with the provided expected lifetime
|
|
18
19
|
*/
|
|
@@ -99,12 +99,12 @@ export declare class Random<G extends IRandomGenerator = IRandomGenerator> {
|
|
|
99
99
|
*/
|
|
100
100
|
export declare function convertStringToSeed(seed: string | number): number;
|
|
101
101
|
export declare class SeededGenerator implements IRandomGenerator {
|
|
102
|
-
private readonly
|
|
102
|
+
private readonly requiresSynchronization;
|
|
103
103
|
private history;
|
|
104
104
|
private maxHistoryLength;
|
|
105
105
|
private seed;
|
|
106
106
|
private readonly pushedSeeds;
|
|
107
|
-
constructor(
|
|
107
|
+
constructor(requiresSynchronization: boolean, seed?: number);
|
|
108
108
|
tickSeed(s: number): number;
|
|
109
109
|
getSeed(): number;
|
|
110
110
|
setSeed(newSeed: number): void;
|
|
@@ -128,7 +128,7 @@ export declare module RandomReference {
|
|
|
128
128
|
function resolve(reference: RandomInstance | RandomReference): RandomReference;
|
|
129
129
|
}
|
|
130
130
|
export declare function getRandom(randomInstance: RandomInstance, islandId?: IslandId): Random<SeededGenerator>;
|
|
131
|
-
export declare function createSeededRandom(
|
|
131
|
+
export declare function createSeededRandom(requiresSynchronization: boolean, seed?: number): Random<SeededGenerator>;
|
|
132
132
|
export declare const mapGenRandom: Random<SeededGenerator>;
|
|
133
133
|
export declare const generalRandom: Random<{
|
|
134
134
|
get: () => number;
|
|
@@ -8,6 +8,5 @@
|
|
|
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
|
-
|
|
12
|
-
export declare function createRandom(): Random<SeededGenerator>;
|
|
11
|
+
export declare function createRandom(): import("../../game/utilities/random/Random").Random<import("../../game/utilities/random/Random").SeededGenerator>;
|
|
13
12
|
export declare function getSeed(): number | undefined;
|
package/package.json
CHANGED