@wayward/types 2.12.0-beta.dev.20221002.1 → 2.12.0-beta.dev.20221004.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/IGlobal.d.ts +1 -1
- package/definitions/game/game/ObjectManager.d.ts +1 -1
- package/definitions/game/game/doodad/DoodadManager.d.ts +1 -1
- package/definitions/game/game/entity/Human.d.ts +1 -1
- package/definitions/game/game/entity/action/usable/actions/UsableActionsMain.d.ts +2 -2
- package/definitions/game/game/entity/action/usable/actions/item/UsableActionsUseItem.d.ts +2 -1
- package/definitions/game/game/entity/player/PlayerManager.d.ts +11 -1
- package/definitions/game/game/island/IIsland.d.ts +2 -1
- package/definitions/game/game/island/Island.d.ts +2 -1
- package/definitions/game/game/item/IItem.d.ts +4 -0
- package/definitions/game/game/item/Item.d.ts +1 -1
- package/definitions/game/game/item/ItemManager.d.ts +1 -1
- package/definitions/game/language/impl/TranslationImpl.d.ts +1 -0
- package/definitions/game/multiplayer/Multiplayer.d.ts +1 -0
- package/definitions/game/multiplayer/packets/client/LoadIslandPacket.d.ts +1 -0
- package/definitions/game/save/upgrade/UpgradeIsland.d.ts +0 -4
- package/definitions/game/ui/screen/screens/game/static/actions/ActionsDrawer.d.ts +1 -1
- package/definitions/test/interfaces.d.ts +1 -0
- package/package.json +1 -1
|
@@ -43,7 +43,7 @@ import "utilities/typesglobal/Misc";
|
|
|
43
43
|
import "utilities/typesglobal/Objects";
|
|
44
44
|
import "utilities/typesglobal/Types";
|
|
45
45
|
declare global {
|
|
46
|
-
let absentPlayers: Player
|
|
46
|
+
let absentPlayers: Array<Player | undefined>;
|
|
47
47
|
let audio: WAudio | undefined;
|
|
48
48
|
let commandManager: CommandManager;
|
|
49
49
|
let game: Game;
|
|
@@ -30,7 +30,7 @@ export declare abstract class ObjectManager<ObjectType extends StringableObject,
|
|
|
30
30
|
get(id: number): ObjectType | undefined;
|
|
31
31
|
set(id: number, value: ObjectType | undefined): void;
|
|
32
32
|
getObjects(): SaferArray<ObjectType>;
|
|
33
|
-
findUnusedId
|
|
33
|
+
findUnusedId(): number;
|
|
34
34
|
protected replaceNullsWithUndefined(): void;
|
|
35
35
|
protected registerForMemoryLeakDetection(object: SaferArray<ObjectType>): void;
|
|
36
36
|
}
|
|
@@ -78,7 +78,7 @@ export default class DoodadManager extends ObjectManager<Doodad, IDoodadManagerE
|
|
|
78
78
|
* Runs a full gamut of updates on doodads including decaying items inside containers, spreading/growing plants/mushrooms, water distillation/desenation and more.
|
|
79
79
|
*/
|
|
80
80
|
updateAllAsync(ticks: number, playingHumans: Human[], updatesPerTick: number | undefined, onProgress: (progess: number) => Promise<void>): Promise<void>;
|
|
81
|
-
verifyAndFixItemWeights(): void;
|
|
81
|
+
verifyAndFixItemWeights(allowFixesInMultiplayer?: boolean): void;
|
|
82
82
|
/**
|
|
83
83
|
* Used to spawn a random doodad on the current biome type and at a set location (and terrain type) based on spawnOnWorldGen properties in doodad descriptions.
|
|
84
84
|
* @param terrainType The terrain type to check.
|
|
@@ -168,7 +168,7 @@ export default abstract class Human extends Entity implements IHasInsulation {
|
|
|
168
168
|
* Returns the result of the `"getMaxHealth"` event, or the `max` in `Stat.Health`,
|
|
169
169
|
* if the result of the hook is `undefined`.
|
|
170
170
|
*/
|
|
171
|
-
getMaxHealth(): number;
|
|
171
|
+
getMaxHealth(withBonus?: boolean): number;
|
|
172
172
|
getCraftingDifficulty(level: RecipeLevel): number;
|
|
173
173
|
update(): void;
|
|
174
174
|
updateStatsAndAttributes(): void;
|
|
@@ -46,7 +46,7 @@ export declare const usableActionSets: {
|
|
|
46
46
|
4: UsableActionGenerator<[]>;
|
|
47
47
|
5: UsableActionGenerator<[]>;
|
|
48
48
|
6: UsableActionGenerator<[]>;
|
|
49
|
-
7: import("./UsableActionsDynamic").default<import("game/entity/action/usable/actions/item/UsableActionsUseItem").IUseItemAction, import("
|
|
49
|
+
7: import("./UsableActionsDynamic").default<import("game/entity/action/usable/actions/item/UsableActionsUseItem").IUseItemAction, import("game/entity/action/usable/IUsableAction").IUsableActionRequirements>;
|
|
50
50
|
8: UsableActionGenerator<[]>;
|
|
51
51
|
9: UsableActionGenerator<[]>;
|
|
52
52
|
10: UsableActionGenerator<[]>;
|
|
@@ -56,7 +56,7 @@ export declare const usableActionSets: {
|
|
|
56
56
|
14: UsableActionGenerator<[]>;
|
|
57
57
|
15: UsableActionGenerator<[]>;
|
|
58
58
|
16: UsableActionGenerator<[]>;
|
|
59
|
-
17: import("./UsableActionsDynamic").default<import("game/entity/action/usable/actions/UsableActionsUseNPC").IUseNPCAction, import("
|
|
59
|
+
17: import("./UsableActionsDynamic").default<import("game/entity/action/usable/actions/UsableActionsUseNPC").IUseNPCAction, import("game/entity/action/usable/IUsableAction").IUsableActionRequirements>;
|
|
60
60
|
18: UsableActionGenerator<[]>;
|
|
61
61
|
19: UsableActionGenerator<[]>;
|
|
62
62
|
20: UsableActionGenerator<[]>;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import { ActionType } from "game/entity/action/IAction";
|
|
12
12
|
import type { IUsableActionDynamicDefinition } from "game/entity/action/usable/actions/UsableActionsDynamic";
|
|
13
13
|
import UsableActionsDynamic from "game/entity/action/usable/actions/UsableActionsDynamic";
|
|
14
|
-
import type { IUsableActionItemRequirement, IUsableActionRequirements } from "game/entity/action/usable/IUsableAction";
|
|
14
|
+
import type { ActionId, IUsableActionItemRequirement, IUsableActionPossibleUsing, IUsableActionRequirements } from "game/entity/action/usable/IUsableAction";
|
|
15
15
|
import type { IGetBestItemsOptions } from "game/item/IItemManager";
|
|
16
16
|
import type Item from "game/item/Item";
|
|
17
17
|
export interface IUseItemAction extends IUsableActionDynamicDefinition {
|
|
@@ -25,6 +25,7 @@ export interface IUseItemAction extends IUsableActionDynamicDefinition {
|
|
|
25
25
|
export declare namespace IUseItemAction {
|
|
26
26
|
function getGetItemOptions(actionType: ActionType, useItemAction?: Omit<IUseItemAction, keyof IUsableActionDynamicDefinition>): Partial<IGetBestItemsOptions>;
|
|
27
27
|
function getItemRequirement(actionType: ActionType, useItemAction?: Omit<IUseItemAction, keyof IUsableActionDynamicDefinition>, getItemOptions?: Partial<IGetBestItemsOptions>): IUsableActionItemRequirement;
|
|
28
|
+
function getPriority(action: ActionId, using: IUsableActionPossibleUsing): number | undefined;
|
|
28
29
|
}
|
|
29
30
|
declare const _default: UsableActionsDynamic<IUseItemAction, IUsableActionRequirements>;
|
|
30
31
|
export default _default;
|
|
@@ -61,5 +61,15 @@ export default class PlayerManager extends EntityManager<Player> {
|
|
|
61
61
|
* Use with caution!
|
|
62
62
|
*/
|
|
63
63
|
permanentlyDelete(player: Player): void;
|
|
64
|
-
|
|
64
|
+
/**
|
|
65
|
+
* Moves to the player to the target array
|
|
66
|
+
* @param source Where they are coming from. It's okay if they aren't in this array
|
|
67
|
+
* @param destination Where the player should be added to
|
|
68
|
+
* @param player The player to move
|
|
69
|
+
*/
|
|
70
|
+
private movePlayerTo;
|
|
71
|
+
/**
|
|
72
|
+
* Finds the first available player id in the array
|
|
73
|
+
*/
|
|
74
|
+
private findAvailablePlayerId;
|
|
65
75
|
}
|
|
@@ -85,7 +85,8 @@ export interface IIslandLoadOptions {
|
|
|
85
85
|
travelTime: number;
|
|
86
86
|
newWorldBiomeTypeOverride: BiomeType;
|
|
87
87
|
pauseAndShowLoadingScreen: boolean;
|
|
88
|
-
multiplayerLoadingDescription
|
|
88
|
+
multiplayerLoadingDescription: MultiplayerLoadingDescription;
|
|
89
|
+
allowItemAndDoodadFixesInMultiplayer: boolean;
|
|
89
90
|
}
|
|
90
91
|
export interface IMoveToIslandOptions {
|
|
91
92
|
spawnPosition: IVector2;
|
|
@@ -106,6 +106,7 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
|
106
106
|
private _world;
|
|
107
107
|
modifiersCollection?: IslandModifiersCollection;
|
|
108
108
|
details?: IIslandDetails;
|
|
109
|
+
ranUpgrades: boolean;
|
|
109
110
|
constructor(position?: IVector2, seed?: number);
|
|
110
111
|
toString(): string;
|
|
111
112
|
private registerMemoryLeakDetector;
|
|
@@ -323,7 +324,7 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
|
323
324
|
* Only allow loading references once
|
|
324
325
|
* Even if an island is unloaded, the loaded references will remain
|
|
325
326
|
*/
|
|
326
|
-
loadReferences(): void;
|
|
327
|
+
loadReferences(allowFixesInMultiplayer?: boolean): void;
|
|
327
328
|
/**
|
|
328
329
|
* Gets the items/resources from terrain based on the TerrainResources definition and checks if it is based on the current biome type.
|
|
329
330
|
* @param terrainLoot The resource to check.
|
|
@@ -253,6 +253,10 @@ export interface IItemDescription extends IObjectDescription, IModdable, ITemper
|
|
|
253
253
|
* If set to true, this item will not grant quality bonuses (durability/quality bonuses) when used in a craft. Aptitude and tiers will still apply.
|
|
254
254
|
*/
|
|
255
255
|
noCraftingQualityBonus?: boolean;
|
|
256
|
+
/**
|
|
257
|
+
* A float that items inside the container will be reduced by when in a player's inventory.
|
|
258
|
+
*/
|
|
259
|
+
reducedStoredItemsWeight?: number;
|
|
256
260
|
onEquip?(item: Item): void;
|
|
257
261
|
onUnequip?(item: Item): void;
|
|
258
262
|
}
|
|
@@ -190,7 +190,7 @@ export default class Item extends EventEmitter.Host<IItemEvents> implements IRef
|
|
|
190
190
|
* Fixes item issues.
|
|
191
191
|
* Note: Be careful with what gets fixed in multiplayer! (when onlyRestoreIslandIds is set)
|
|
192
192
|
*/
|
|
193
|
-
verifyAndFixItem(
|
|
193
|
+
verifyAndFixItem(allowFixes: boolean): void;
|
|
194
194
|
/**
|
|
195
195
|
* @param source A string representing the reason for this damage. Used for multiplayer debugging. Just put a unique string of characters here
|
|
196
196
|
* @param modifier The amount of damage to take. Defaults to 1.
|
|
@@ -314,7 +314,7 @@ export default class ItemManager extends ObjectManager<Item, IItemManagerEvents>
|
|
|
314
314
|
/**
|
|
315
315
|
* Note: don't print items to the console because the console will hold the item indefinitely
|
|
316
316
|
*/
|
|
317
|
-
loadReference(container: IContainer, loadChildReferences?: boolean, parentContainer?: IContainer): boolean;
|
|
317
|
+
loadReference(allowFixes: boolean, container: IContainer, loadChildReferences?: boolean, parentContainer?: IContainer): boolean;
|
|
318
318
|
private removeFromContainerInternal;
|
|
319
319
|
private onItemMoveOrRemove;
|
|
320
320
|
private getCraftTierBonus;
|
|
@@ -64,6 +64,7 @@ export default class TranslationImpl implements Omit<ISerializable, "deserialize
|
|
|
64
64
|
constructor(dictionary: Dictionary | string, entry: number | string, index?: "random" | number);
|
|
65
65
|
constructor(translationId: string);
|
|
66
66
|
equals(translation: TranslationImpl): boolean;
|
|
67
|
+
clone(): TranslationImpl;
|
|
67
68
|
withSegments(...segments: ISegment[]): this;
|
|
68
69
|
withSegments(priority: true, ...segments: ISegment[]): this;
|
|
69
70
|
withTooltip(tooltip?: Falsy | ITooltipSection["tooltip"]): this;
|
|
@@ -67,6 +67,7 @@ export default class Multiplayer extends EventEmitter.Host<IMultiplayerEvents> {
|
|
|
67
67
|
isServer(): boolean;
|
|
68
68
|
isClient(): boolean;
|
|
69
69
|
getPlayerIdentifier(): string;
|
|
70
|
+
setPlayerIdentifier(identifier: string): void;
|
|
70
71
|
getOptions(): IMultiplayerOptions;
|
|
71
72
|
setOptions(options: IMultiplayerOptions, updateGame?: boolean): void;
|
|
72
73
|
updateOptions(updates: Partial<IMultiplayerOptions>): void;
|
|
@@ -12,6 +12,7 @@ import type { IslandId } from "game/island/IIsland";
|
|
|
12
12
|
import ClientPacket from "multiplayer/packets/ClientPacket";
|
|
13
13
|
export default class LoadIslandPacket extends ClientPacket<Promise<void>> {
|
|
14
14
|
islandId: IslandId;
|
|
15
|
+
allowItemFixes: boolean;
|
|
15
16
|
getDebugInfo(): string;
|
|
16
17
|
isSyncCheckEnabled(): boolean;
|
|
17
18
|
process(): Promise<void>;
|
|
@@ -84,6 +84,6 @@ export default class ActionsConfigurationDrawer extends Component implements IRe
|
|
|
84
84
|
private slottedItemActionButton?;
|
|
85
85
|
private slotButton;
|
|
86
86
|
private selectAction;
|
|
87
|
-
|
|
87
|
+
updateConfigurationColumn(): void;
|
|
88
88
|
private getAction;
|
|
89
89
|
}
|
|
@@ -26,6 +26,7 @@ export declare type IDedicatedServerGameOptions = ICommonGameOptions;
|
|
|
26
26
|
export interface IJoinServerOptions {
|
|
27
27
|
joinProgrammatically: boolean;
|
|
28
28
|
enableAllMilestoneModifiers?: boolean;
|
|
29
|
+
multiplayerIdentifier?: string;
|
|
29
30
|
}
|
|
30
31
|
export declare enum GameMode {
|
|
31
32
|
Hardcore = "Hardcore Mode",
|
package/package.json
CHANGED