@wayward/types 2.13.0-beta.dev.20230422.1 → 2.13.0-beta.dev.20230424.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/audio/Music.d.ts +1 -2
- package/definitions/game/audio/SoundEffects.d.ts +1 -1
- package/definitions/game/game/Game.d.ts +1 -0
- package/definitions/game/game/doodad/Doodad.d.ts +1 -1
- package/definitions/game/game/doodad/DoodadManager.d.ts +3 -4
- package/definitions/game/game/doodad/IDoodad.d.ts +2 -2
- package/definitions/game/game/entity/Entity.d.ts +4 -1
- package/definitions/game/game/entity/IHuman.d.ts +10 -10
- package/definitions/game/game/entity/action/actions/SetCreatureAi.d.ts +4 -1
- package/definitions/game/game/entity/action/usable/IUsableAction.d.ts +1 -1
- package/definitions/game/game/entity/action/usable/UsableActionType.d.ts +2 -1
- package/definitions/game/game/entity/action/usable/actions/UsableActionsDynamic.d.ts +3 -1
- package/definitions/game/game/entity/npc/npcs/Merchant.d.ts +7 -0
- package/definitions/game/game/entity/player/Customizations.d.ts +4 -4
- package/definitions/game/game/entity/player/IMessageManager.d.ts +2 -0
- package/definitions/game/game/entity/player/MessageManager.d.ts +3 -0
- package/definitions/game/game/entity/player/note/NoteManager.d.ts +1 -1
- package/definitions/game/game/entity/player/quest/Quests.d.ts +1 -2
- package/definitions/game/game/entity/player/quest/quest/Challenge.d.ts +2 -1
- package/definitions/game/game/entity/player/quest/quest/Quest.d.ts +1 -1
- package/definitions/game/game/inspection/handlers/TilePositionInspection.d.ts +1 -1
- package/definitions/game/game/inspection/infoProviders/CivilizationScore.d.ts +1 -1
- package/definitions/game/game/inspection/infoProviders/ContainedItems.d.ts +1 -1
- package/definitions/game/game/inspection/infoProviders/DoodadSkill.d.ts +1 -1
- package/definitions/game/game/island/IIsland.d.ts +2 -3
- package/definitions/game/game/island/Island.d.ts +5 -6
- package/definitions/game/game/island/IslandManager.d.ts +1 -1
- package/definitions/game/game/island/Port.d.ts +43 -0
- package/definitions/game/game/item/IItem.d.ts +13 -5
- package/definitions/game/game/item/IItemManager.d.ts +16 -2
- package/definitions/game/game/item/ItemDescriptions.d.ts +2 -2
- package/definitions/game/game/item/ItemFinder.d.ts +2 -2
- package/definitions/game/game/item/ItemManager.d.ts +52 -30
- package/definitions/game/game/mapping/IRegion.d.ts +22 -0
- package/definitions/game/game/temperature/TemperatureManager.d.ts +2 -2
- package/definitions/game/language/Dictionary.d.ts +2 -1
- package/definitions/game/language/DictionaryMap.d.ts +17 -15
- package/definitions/game/language/Translation.d.ts +4 -1
- package/definitions/game/language/TranslationsProvider.d.ts +1 -1
- package/definitions/game/language/dictionary/Message.d.ts +333 -329
- package/definitions/game/language/dictionary/Misc.d.ts +5 -4
- package/definitions/game/language/dictionary/UiTranslation.d.ts +791 -786
- package/definitions/game/language/english/creature/AiTypes.d.ts +1 -1
- package/definitions/game/language/english/creature/Corpses.d.ts +1 -1
- package/definitions/game/language/english/game/Regions.d.ts +13 -0
- package/definitions/game/language/english/game/WorldLayers.d.ts +1 -1
- package/definitions/game/language/english/game/islandName/IslandNameBiomeNouns.d.ts +1 -1
- package/definitions/game/language/english/game/islandName/IslandNameOverrunWithCreatureDescriptors.d.ts +1 -1
- package/definitions/game/language/english/ui/ModLoadErrors.d.ts +1 -1
- package/definitions/game/language/english/ui/UsableActionTypes.d.ts +2 -2
- package/definitions/game/language/utility/TranslationSorter.d.ts +3 -3
- package/definitions/game/renderer/Overlays.d.ts +1 -1
- package/definitions/game/renderer/tile/atlas/TileAtlas.d.ts +15 -14
- package/definitions/game/resource/IResourcePath.d.ts +1 -1
- package/definitions/game/save/serializer/Serializer.d.ts +1 -1
- package/definitions/game/ui/IUi.d.ts +2 -1
- package/definitions/game/ui/component/dropdown/IslandPortsDropdown.d.ts +1 -1
- package/definitions/game/ui/old/OldUi.d.ts +0 -2
- package/definitions/game/ui/old/screens/InGameScreen.d.ts +11 -4
- package/definitions/game/ui/screen/screens/game/dialog/BookDialog.d.ts +2 -2
- package/definitions/game/ui/screen/screens/game/dialog/CraftingDialog.d.ts +4 -4
- package/definitions/game/ui/screen/screens/game/dialog/IslandsShippingDialog.d.ts +5 -0
- package/definitions/game/ui/screen/screens/game/dialog/MapDialog.d.ts +3 -3
- package/definitions/game/ui/screen/screens/game/dialog/islands/IslandsDialog.d.ts +5 -1
- package/definitions/game/ui/screen/screens/game/static/ActionBar.d.ts +1 -1
- package/definitions/game/ui/screen/screens/game/static/menubar/MenuBarButtonDescriptions.d.ts +1 -2
- package/definitions/game/ui/screen/screens/game/static/stats/StatDisplayDescriptions.d.ts +1 -2
- package/definitions/game/ui/screen/screens/menu/menus/character/Swatch.d.ts +1 -1
- package/definitions/game/utilities/Version.d.ts +15 -9
- package/definitions/game/utilities/enum/Enums.d.ts +1 -1
- package/package.json +1 -1
|
@@ -9,5 +9,4 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import type { Music } from "audio/IAudio";
|
|
12
|
-
|
|
13
|
-
export declare const musicDescriptions: OptionalDescriptions<Music, IMusicDescription>;
|
|
12
|
+
export declare const musicDescriptions: Map<Music, import("../mod/ModRegistry").IModdable>;
|
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { SfxType } from "audio/IAudio";
|
|
12
12
|
import type { ISoundEffectDescription } from "audio/IMusic";
|
|
13
|
-
export declare const soundEffectDescriptions:
|
|
13
|
+
export declare const soundEffectDescriptions: Map<SfxType, ISoundEffectDescription>;
|
|
@@ -119,6 +119,7 @@ export declare class Game extends EventEmitter.Host<IGameEvents> {
|
|
|
119
119
|
*/
|
|
120
120
|
getPlayingHumans(includeGhosts?: boolean, includeConnecting?: boolean, includeDedicatedServer?: boolean, includeAbsent?: boolean): Human[];
|
|
121
121
|
getNonPlayerHumans(): Human[];
|
|
122
|
+
getPlayingHuman(identifier: string): Human<number> | undefined;
|
|
122
123
|
initializeRenderer(): void;
|
|
123
124
|
/**
|
|
124
125
|
* It's important that this is lowest, so that it happens after modManager's globalSlotReady event
|
|
@@ -300,7 +300,7 @@ export default class Doodad extends Entity<IDoodadDescription, DoodadType, Dooda
|
|
|
300
300
|
* @param item The item that is being added to the bookcase.
|
|
301
301
|
* @param add True if adding score, false if you are substracting.
|
|
302
302
|
*/
|
|
303
|
-
updateBookcase(
|
|
303
|
+
updateBookcase(items: Item[], add: boolean): void;
|
|
304
304
|
/**
|
|
305
305
|
* Determines which graphic to show based on how full the bookcase is with books/text.
|
|
306
306
|
* @param item set to true if DisplayableItemType is to be returned.
|
|
@@ -39,9 +39,9 @@ export interface IDoodadManagerEvents {
|
|
|
39
39
|
remove(doodad: Doodad): any;
|
|
40
40
|
}
|
|
41
41
|
export default class DoodadManager extends ObjectManager<Doodad, IDoodadManagerEvents> {
|
|
42
|
-
private static cachedBestDoodadForTier;
|
|
43
|
-
private static
|
|
44
|
-
static cachedDoodadSpawns:
|
|
42
|
+
private static readonly cachedBestDoodadForTier;
|
|
43
|
+
private static readonly cachedDoodadGroups;
|
|
44
|
+
static readonly cachedDoodadSpawns: Map<BiomeType, Map<WorldZ, Map<TerrainType, Set<DoodadType>>>>;
|
|
45
45
|
private readonly scarecrows;
|
|
46
46
|
static getBestDoodadForTier(doodad: DoodadType | DoodadTypeGroup): DoodadType | undefined;
|
|
47
47
|
static generateLookups(): void;
|
|
@@ -55,7 +55,6 @@ export default class DoodadManager extends ObjectManager<Doodad, IDoodadManagerE
|
|
|
55
55
|
* @returns true or false depending on if the number is a DoodadType or DoodadTypeExtra.
|
|
56
56
|
*/
|
|
57
57
|
static isDoodadExtra(type: number): type is DoodadTypeExtra;
|
|
58
|
-
static getGroupDoodads(doodadGroup: DoodadTypeGroup): Set<DoodadType>;
|
|
59
58
|
static getDoodadTypeGroupName(doodadType: DoodadType | DoodadTypeGroup, article?: Article, count?: number): Translation;
|
|
60
59
|
/**
|
|
61
60
|
* Note: This can be called multiple times in the same game depending on loading/unloading of islands
|
|
@@ -188,8 +188,8 @@ export interface IDoodadDescription extends IObjectDescription, IModdable, ICaus
|
|
|
188
188
|
*/
|
|
189
189
|
getAssociatedItem?(doodad: Doodad): ItemType | ItemTypeExtra | undefined;
|
|
190
190
|
getVariation?(island: Island, tile: Tile, doodad: Doodad | undefined, existingVariationX: number, existingVariationY: number): [number, number] | undefined;
|
|
191
|
-
onContainerItemAdd?(container: Doodad & IContainer,
|
|
192
|
-
onContainerItemRemove?(container: Doodad & IContainer,
|
|
191
|
+
onContainerItemAdd?(container: Doodad & IContainer, items: Item[]): void;
|
|
192
|
+
onContainerItemRemove?(container: Doodad & IContainer, items: Item[]): void;
|
|
193
193
|
/**
|
|
194
194
|
* Item groups of this type in the container will provide skill bonuses to adjacent players.
|
|
195
195
|
*/
|
|
@@ -18,6 +18,7 @@ import type EntityWithStats from "game/entity/EntityWithStats";
|
|
|
18
18
|
import type Human from "game/entity/Human";
|
|
19
19
|
import type { IEntityConstructorOptions, IEntityEvents } from "game/entity/IEntity";
|
|
20
20
|
import { EntityType } from "game/entity/IEntity";
|
|
21
|
+
import type { IHumanBound } from "game/entity/IEntityManager";
|
|
21
22
|
import type Creature from "game/entity/creature/Creature";
|
|
22
23
|
import type Corpse from "game/entity/creature/corpse/Corpse";
|
|
23
24
|
import type NPC from "game/entity/npc/NPC";
|
|
@@ -41,6 +42,7 @@ export default abstract class Entity<DescriptionType = unknown, TypeType extends
|
|
|
41
42
|
id: number;
|
|
42
43
|
type: TypeType;
|
|
43
44
|
referenceId?: number;
|
|
45
|
+
private _humansVisible;
|
|
44
46
|
renamed?: string | ISerializedTranslation;
|
|
45
47
|
x: number;
|
|
46
48
|
y: number;
|
|
@@ -93,7 +95,8 @@ export default abstract class Entity<DescriptionType = unknown, TypeType extends
|
|
|
93
95
|
clearTileCache(): void;
|
|
94
96
|
isNearby(entity: Entity<DescriptionType>): boolean;
|
|
95
97
|
isInFov(): boolean;
|
|
96
|
-
setInFov(inFov: boolean): void;
|
|
98
|
+
setInFov(inFov: boolean, humansWithinBound: IHumanBound[]): void;
|
|
99
|
+
humansVisible(): Human[];
|
|
97
100
|
isOnFire(): FireType;
|
|
98
101
|
queueSoundEffect(type: SfxType, delay?: number, speed?: number): void;
|
|
99
102
|
updateRender(source: RenderSource, flag: UpdateRenderFlag): void;
|
|
@@ -49,23 +49,23 @@ export interface IHumanEvents extends Events<EntityWithStats>, ISkillEvents {
|
|
|
49
49
|
restEnd(restData: IRestData): any;
|
|
50
50
|
/**
|
|
51
51
|
* Called when an item is added to the player's inventory
|
|
52
|
-
* @param item The
|
|
53
|
-
* @param container The container object the
|
|
52
|
+
* @param item The items
|
|
53
|
+
* @param container The container object the items were added to. This container might be inventory or a container within the inventory.
|
|
54
54
|
*/
|
|
55
|
-
inventoryItemAdd(
|
|
55
|
+
inventoryItemAdd(items: Item[], container: IContainer): any;
|
|
56
56
|
/**
|
|
57
57
|
* Called when an item is removed from the players inventory
|
|
58
|
-
* @param item The
|
|
59
|
-
* @param container The container object the
|
|
58
|
+
* @param item The items
|
|
59
|
+
* @param container The container object the items were moved to.
|
|
60
60
|
*/
|
|
61
|
-
inventoryItemRemove(
|
|
61
|
+
inventoryItemRemove(items: Item[], container: IContainer): any;
|
|
62
62
|
/**
|
|
63
63
|
* Called when an item is moved from one container to another, while still in the players inventory.
|
|
64
|
-
* @param
|
|
65
|
-
* @param container The container object the
|
|
66
|
-
* @param previousContainer The container object the
|
|
64
|
+
* @param items The items
|
|
65
|
+
* @param container The container object the items were moved to. This container might be inventory or a container within the inventory.
|
|
66
|
+
* @param previousContainer The container object the items were moved from. This container might be inventory or a container within the inventory.
|
|
67
67
|
*/
|
|
68
|
-
inventoryItemUpdate(
|
|
68
|
+
inventoryItemUpdate(items: Item[], container: IContainer, previousContainer?: IContainer): any;
|
|
69
69
|
/**
|
|
70
70
|
* Called when the human equips an item to a slot
|
|
71
71
|
* @param item The item being equipped
|
|
@@ -12,8 +12,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
14
|
import type Creature from "game/entity/creature/Creature";
|
|
15
|
+
import type Human from "game/entity/Human";
|
|
16
|
+
import { AiType } from "game/entity/IEntity";
|
|
15
17
|
export interface ISetCreatureAiCanUse extends IActionUsable {
|
|
16
18
|
creature: Creature;
|
|
17
19
|
}
|
|
18
|
-
declare
|
|
20
|
+
export declare function hasSkillToSetCreatureAi(human: Human, ai: AiType): boolean;
|
|
21
|
+
declare const _default: Action<[ActionArgument.Integer32], Human<number>, void, ISetCreatureAiCanUse, [number]>;
|
|
19
22
|
export default _default;
|
|
@@ -236,7 +236,7 @@ export interface IUsableActionDefinitionSubmenu<REQUIREMENTS extends IUsableActi
|
|
|
236
236
|
}
|
|
237
237
|
export interface IUsableActionDefinitionExecutable<REQUIREMENTS extends IUsableActionRequirements = IUsableActionRequirements> extends IUsableActionDefinitionBase<REQUIREMENTS> {
|
|
238
238
|
slottable?: boolean;
|
|
239
|
-
discoveredByDefault?: true;
|
|
239
|
+
discoveredByDefault?: true | (() => boolean);
|
|
240
240
|
submenu?: undefined;
|
|
241
241
|
forceDisplayWhenEmpty?: undefined;
|
|
242
242
|
execute(player: Player, using: IUsableActionUsing<REQUIREMENTS>, context: IUsableActionExecutionContext): any;
|
|
@@ -81,6 +81,7 @@ export declare enum UsableActionTypePlaceholder {
|
|
|
81
81
|
MoveAllToInventory = 200001,
|
|
82
82
|
MoveAllOfSameQualityToInventory = 200002,
|
|
83
83
|
Paddle = 200003,
|
|
84
|
-
Operate = 200004
|
|
84
|
+
Operate = 200004,
|
|
85
|
+
SwimToIsland = 200005
|
|
85
86
|
}
|
|
86
87
|
export declare const usableActionDescriptions: PartialRecord<UsableActionType | UsableActionTypePlaceholder, IModdable>;
|
|
@@ -12,14 +12,16 @@ import type { ActionDisplayLevel } from "game/entity/action/IAction";
|
|
|
12
12
|
import { ActionType } from "game/entity/action/IAction";
|
|
13
13
|
import type { IUsableActionPossibleUsing, IUsableActionRequirements, IUsableActionUsing, ReturnableUsableActionUsability, UsableActionIconReference } from "game/entity/action/usable/IUsableAction";
|
|
14
14
|
import { UsableActionGenerator } from "game/entity/action/usable/UsableActionRegistrar";
|
|
15
|
+
import type { UsableActionTranslator } from "game/entity/action/usable/UsableActionTranslator";
|
|
15
16
|
import type Player from "game/entity/player/Player";
|
|
16
17
|
import type Bindable from "ui/input/Bindable";
|
|
17
18
|
export interface IUsableActionDynamicDefinition {
|
|
18
|
-
icon?: UsableActionIconReference
|
|
19
|
+
icon?: SupplierOr<UsableActionIconReference>;
|
|
19
20
|
bindable: Bindable;
|
|
20
21
|
displayLevel?: ActionDisplayLevel;
|
|
21
22
|
priority?: number;
|
|
22
23
|
discoveredByDefault?: true;
|
|
24
|
+
translate?: (translator: UsableActionTranslator) => UsableActionTranslator;
|
|
23
25
|
}
|
|
24
26
|
export interface IUsableActionsDynamicConfig<DEFINITION extends IUsableActionDynamicDefinition, REQUIREMENTS extends IUsableActionRequirements> {
|
|
25
27
|
id: string;
|
|
@@ -24,9 +24,16 @@ export interface IMerchantBuyPrice {
|
|
|
24
24
|
bonus: number;
|
|
25
25
|
total: number;
|
|
26
26
|
}
|
|
27
|
+
export declare enum MerchantCustomerKnowledgeState {
|
|
28
|
+
None = 0,
|
|
29
|
+
KnowsOfNewStock = 1,
|
|
30
|
+
HasSeenInventory = 2
|
|
31
|
+
}
|
|
27
32
|
export default class MerchantNPC extends NPC {
|
|
28
33
|
credit: Record<string, number>;
|
|
34
|
+
customerKnowledge: Map<string, MerchantCustomerKnowledgeState>;
|
|
29
35
|
constructor(options?: INPCConstructorOptions);
|
|
36
|
+
knowsOfUnseenStock(customer: Human): boolean;
|
|
30
37
|
getCustomerCredit(customer: Human): number;
|
|
31
38
|
modifyCustomerCredit(customer: Human, creditChange: number): number;
|
|
32
39
|
getActions(): ActionType[] | undefined;
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import type { ICharacter, IColorDescription, ICustomizations, IHairstyleDescription } from "game/entity/IHuman";
|
|
12
|
-
import { HairStyle } from "game/entity/IHuman";
|
|
12
|
+
import { HairColor, HairStyle, SkinColor } from "game/entity/IHuman";
|
|
13
13
|
import type { Random } from "utilities/random/Random";
|
|
14
|
-
export declare const hairstyleDescriptions:
|
|
15
|
-
export declare const hairColorDescriptions:
|
|
16
|
-
export declare const skinColorDescriptions:
|
|
14
|
+
export declare const hairstyleDescriptions: Map<HairStyle, IHairstyleDescription>;
|
|
15
|
+
export declare const hairColorDescriptions: Map<HairColor, IColorDescription>;
|
|
16
|
+
export declare const skinColorDescriptions: Map<SkinColor, IColorDescription>;
|
|
17
17
|
export declare function generateRandomCustomization(random: Random): ICustomizations;
|
|
18
18
|
export declare function generateRandomCharacter(random: Random): ICharacter;
|
|
19
19
|
export declare enum ColorType {
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import type Stream from "@wayward/goodstream";
|
|
12
12
|
import type Human from "game/entity/Human";
|
|
13
13
|
import type Island from "game/island/Island";
|
|
14
|
+
import type Dictionary from "language/Dictionary";
|
|
14
15
|
import type { ISerializedTranslation, TranslationArg } from "language/ITranslation";
|
|
15
16
|
import type Translation from "language/Translation";
|
|
16
17
|
import type Message from "language/dictionary/Message";
|
|
@@ -127,6 +128,7 @@ export interface IMessageManager {
|
|
|
127
128
|
* Signal that the message was sent to everyone
|
|
128
129
|
*/
|
|
129
130
|
sentToAll(sentToAll?: boolean): this;
|
|
131
|
+
upgrade(id: `${keyof typeof Dictionary}:${string}`, dictionary: Dictionary, entry: number): this;
|
|
130
132
|
}
|
|
131
133
|
export interface IMessageHistoryItem {
|
|
132
134
|
id: number;
|
|
@@ -14,6 +14,7 @@ import type { IMessage, IMessageHistoryItem, IMessageManager, IPackedMessage } f
|
|
|
14
14
|
import { MessageType, Source } from "game/entity/player/IMessageManager";
|
|
15
15
|
import type Player from "game/entity/player/Player";
|
|
16
16
|
import type Island from "game/island/Island";
|
|
17
|
+
import type Dictionary from "language/Dictionary";
|
|
17
18
|
import Message from "language/dictionary/Message";
|
|
18
19
|
import type { TranslationArg } from "language/ITranslation";
|
|
19
20
|
import Translation from "language/Translation";
|
|
@@ -33,6 +34,7 @@ export declare class MessageManagerNoOp implements IMessageManager {
|
|
|
33
34
|
sentToAll(sentToAll?: boolean): this;
|
|
34
35
|
pruneMessageHistory(isLocalPlayer: boolean): boolean;
|
|
35
36
|
addToHistory(messageHistoryItem: IMessageHistoryItem): void;
|
|
37
|
+
upgrade(): this;
|
|
36
38
|
}
|
|
37
39
|
export interface IMessageManagerOptions {
|
|
38
40
|
shouldDisplayMessage(message: IMessage, id: number): boolean | undefined;
|
|
@@ -123,4 +125,5 @@ export default class MessageManager implements IMessageManager {
|
|
|
123
125
|
*/
|
|
124
126
|
sentToAll(sentToAll?: boolean): this;
|
|
125
127
|
private reset;
|
|
128
|
+
upgrade(id: `${keyof typeof Dictionary}:${string}`, dictionary: Dictionary, entry: number): this;
|
|
126
129
|
}
|
|
@@ -16,7 +16,7 @@ import { HelpArticle } from "ui/screen/screens/menu/menus/help/HelpArticleDescri
|
|
|
16
16
|
export interface INoteDescription extends IModdable {
|
|
17
17
|
learnMore?: HelpArticle;
|
|
18
18
|
}
|
|
19
|
-
export declare const noteDescriptions:
|
|
19
|
+
export declare const noteDescriptions: Map<Note, INoteDescription>;
|
|
20
20
|
export type Time = PartOfDay | string;
|
|
21
21
|
export interface INote {
|
|
22
22
|
id: keyof typeof Note;
|
|
@@ -10,5 +10,4 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { QuestType } from "game/entity/player/quest/quest/IQuest";
|
|
12
12
|
import type { Quest } from "game/entity/player/quest/quest/Quest";
|
|
13
|
-
declare const
|
|
14
|
-
export default quests;
|
|
13
|
+
export declare const questDescriptions: Map<QuestType, Quest>;
|
|
@@ -8,13 +8,14 @@
|
|
|
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 { CreatureType } from "game/entity/creature/ICreature";
|
|
11
12
|
import type { RequirementInstance } from "game/entity/player/quest/quest/Quest";
|
|
12
13
|
import { Quest } from "game/entity/player/quest/quest/Quest";
|
|
13
14
|
import type { QuestInstance } from "game/entity/player/quest/QuestManager";
|
|
14
15
|
import type { IQuestRequirement } from "game/entity/player/quest/requirement/IRequirement";
|
|
15
16
|
import type Island from "game/island/Island";
|
|
16
17
|
export default class Challenge extends Quest {
|
|
17
|
-
static getCreaturesOfRequirements():
|
|
18
|
+
static getCreaturesOfRequirements(): CreatureType[];
|
|
18
19
|
private static readonly possibleRequirements;
|
|
19
20
|
/**
|
|
20
21
|
* These are the only items that can be requested to collect
|
|
@@ -46,7 +46,7 @@ export declare class Quest extends EventEmitter.Host<IQuestEvents> {
|
|
|
46
46
|
getRequirements(host: Player, instance: IQuest): RequirementInstance[];
|
|
47
47
|
getRequirement(host: Player, quest: IQuest, requirement: IQuestRequirement): RequirementInstance | undefined;
|
|
48
48
|
needsManualCompletion(): boolean;
|
|
49
|
-
protected createRequirements(island: Island): IQuestRequirement
|
|
49
|
+
protected createRequirements(island: Island): IQuestRequirement[];
|
|
50
50
|
protected createRequirement<R extends QuestRequirementType>(type: R, ...options: RequirementArgs<R>): IQuestRequirement<RequirementArgs<R>>;
|
|
51
51
|
}
|
|
52
52
|
export declare class RequirementInstance extends EventEmitter.Host<IQuestRequirementEvents> {
|
|
@@ -31,7 +31,7 @@ export default class TilePositionInspection extends InspectionsHandler {
|
|
|
31
31
|
protected onTileEventMove(tileEvent: TileEvent): void;
|
|
32
32
|
protected onTileEventCreate(_: any, tileEvent: TileEvent): void;
|
|
33
33
|
protected onItemCreate(_: any, item: Item): void;
|
|
34
|
-
protected onItemMove(_: any,
|
|
34
|
+
protected onItemMove(_: any, _items: Item[], containerFrom: IContainer | undefined, _containerFromTile: Tile | undefined, containerTo: IContainer): void;
|
|
35
35
|
protected onCorpseCreate(_: any, corpse: Corpse): void;
|
|
36
36
|
protected onDoodadCreate(_: any, doodad: Doodad): void;
|
|
37
37
|
private updateInspectionsForEntity;
|
|
@@ -25,6 +25,6 @@ export default class CivilizationInfoProvider extends InfoProvider {
|
|
|
25
25
|
getDefaultDisplayLevel(): InfoDisplayLevel;
|
|
26
26
|
hasContent(): boolean;
|
|
27
27
|
get(): LabelledValue;
|
|
28
|
-
protected onItemMove(_: any,
|
|
28
|
+
protected onItemMove(_: any, items: Item[], previousContainer: IContainer | undefined, _previousContainerTile: Tile | undefined, newContainer: IContainer): void;
|
|
29
29
|
private getCivilizationScore;
|
|
30
30
|
}
|
|
@@ -24,5 +24,5 @@ export default class ContainedItemsInfoProvider extends InfoProvider {
|
|
|
24
24
|
getDefaultDisplayLevel(): InfoDisplayLevel;
|
|
25
25
|
hasContent(): boolean;
|
|
26
26
|
get(): LabelledValue;
|
|
27
|
-
protected onItemMove(_: any,
|
|
27
|
+
protected onItemMove(_: any, items: Item[], previousContainer: IContainer | undefined, _previousContainerTile: Tile | undefined, newContainer: IContainer): void;
|
|
28
28
|
}
|
|
@@ -25,5 +25,5 @@ export default class DoodadSkillInfoProvider extends InfoProvider {
|
|
|
25
25
|
getDefaultDisplayLevel(): InfoDisplayLevel;
|
|
26
26
|
hasContent(): boolean;
|
|
27
27
|
get(): LabelledValue;
|
|
28
|
-
protected onItemMove(_: any,
|
|
28
|
+
protected onItemMove(_: any, items: Item[], previousContainer: IContainer | undefined, _previousContainerTile: Tile | undefined, newContainer: IContainer): void;
|
|
29
29
|
}
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import type { BiomeType } from "game/biome/IBiome";
|
|
12
|
-
import type Doodad from "game/doodad/Doodad";
|
|
13
12
|
import type Creature from "game/entity/creature/Creature";
|
|
14
13
|
import type { CreatureType, IDamageOutcome, IDamageOutcomeInput } from "game/entity/creature/ICreature";
|
|
15
14
|
import type Human from "game/entity/Human";
|
|
16
15
|
import type { DamageType, Defense } from "game/entity/IEntity";
|
|
17
16
|
import type NPC from "game/entity/npc/NPC";
|
|
18
17
|
import type { IIslandTemplate, TickFlag, TileUpdateType } from "game/IGame";
|
|
18
|
+
import type Port from "game/island/Port";
|
|
19
19
|
import type { MultiplayerLoadingDescription } from "game/meta/Loading";
|
|
20
20
|
import type { TerrainType } from "game/tile/ITerrain";
|
|
21
21
|
import type Tile from "game/tile/Tile";
|
|
@@ -86,9 +86,8 @@ export interface IIslandEvents {
|
|
|
86
86
|
rename(human: Human, newName?: string, oldName?: string): any;
|
|
87
87
|
/**
|
|
88
88
|
* Emitted when island ports have changed
|
|
89
|
-
* @param doodad Doodad that caused the change
|
|
90
89
|
*/
|
|
91
|
-
portsChanged(
|
|
90
|
+
portsChanged(addedPort?: Port, removedPort?: Port): any;
|
|
92
91
|
getDefense(defense: Defense | undefined, target: Human | Creature | CreatureType, damageType?: DamageType): Defense | undefined;
|
|
93
92
|
calculateAttackOutcome(damageOutcome: IDamageOutcome, input: IDamageOutcomeInput, attackValue: number, defenseValue: number): IDamageOutcome | undefined;
|
|
94
93
|
}
|
|
@@ -15,7 +15,6 @@ import { TickFlag, TileUpdateType } from "game/IGame";
|
|
|
15
15
|
import { Quality } from "game/IObject";
|
|
16
16
|
import type { BiomeTypes } from "game/biome/IBiome";
|
|
17
17
|
import type { ITemplateBiomeOptions } from "game/biome/template/Template";
|
|
18
|
-
import type Doodad from "game/doodad/Doodad";
|
|
19
18
|
import DoodadManager from "game/doodad/DoodadManager";
|
|
20
19
|
import Human from "game/entity/Human";
|
|
21
20
|
import type { SkillType } from "game/entity/IHuman";
|
|
@@ -25,8 +24,9 @@ import type { IDamageInfo, IDamageOutcome, IDamageOutcomeInput } from "game/enti
|
|
|
25
24
|
import CorpseManager from "game/entity/creature/corpse/CorpseManager";
|
|
26
25
|
import FlowFieldManager from "game/entity/flowfield/FlowFieldManager";
|
|
27
26
|
import NPCManager from "game/entity/npc/NPCManager";
|
|
28
|
-
import type { IIslandEvents, IIslandLoadOptions,
|
|
27
|
+
import type { IIslandEvents, IIslandLoadOptions, IMobCheck, ISeeds, IWaterContamination, IWaterFill, IWell, IslandId } from "game/island/IIsland";
|
|
29
28
|
import { WaterType } from "game/island/IIsland";
|
|
29
|
+
import { PortManager } from "game/island/Port";
|
|
30
30
|
import type { ILiquidGather } from "game/item/IItem";
|
|
31
31
|
import type { IRequirementInfo } from "game/item/IItemManager";
|
|
32
32
|
import ItemManager from "game/item/ItemManager";
|
|
@@ -69,9 +69,12 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
|
69
69
|
readonly flowFieldManager: FlowFieldManager;
|
|
70
70
|
readonly items: ItemManager;
|
|
71
71
|
readonly npcs: NPCManager;
|
|
72
|
+
readonly ports: PortManager;
|
|
72
73
|
readonly temperature: TemperatureManager;
|
|
73
74
|
readonly tileEvents: TileEventManager;
|
|
74
75
|
readonly time: TimeManager;
|
|
76
|
+
saveVersion: string;
|
|
77
|
+
saveBuildTime?: number;
|
|
75
78
|
biomeType: BiomeTypes;
|
|
76
79
|
civilizationScore: number;
|
|
77
80
|
civilizationScoreTiles: Record<number, number>;
|
|
@@ -81,11 +84,9 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
|
81
84
|
name?: string;
|
|
82
85
|
position: IVector2;
|
|
83
86
|
readonly mapSize: number;
|
|
84
|
-
readonly ports: Map<number, IIslandPort>;
|
|
85
87
|
readonly treasureMaps: DrawnMap[];
|
|
86
88
|
readonly wellData: SaferNumberIndexedObject<IWell>;
|
|
87
89
|
referenceId?: number;
|
|
88
|
-
saveVersion: string;
|
|
89
90
|
templateBiomeOptions: ITemplateBiomeOptions | undefined;
|
|
90
91
|
tileContainers: ITileContainer[];
|
|
91
92
|
version: string;
|
|
@@ -263,6 +264,4 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
|
263
264
|
* Returns the type of liquid that can be gathered from the tile
|
|
264
265
|
*/
|
|
265
266
|
getLiquidGatherType(terrainType: TerrainType, terrainDescription: ITerrainDescription): keyof ILiquidGather | undefined;
|
|
266
|
-
addIslandPort(doodad: Doodad): void;
|
|
267
|
-
removeIslandPort(doodad: Doodad): boolean;
|
|
268
267
|
}
|
|
@@ -38,7 +38,7 @@ export default class IslandManager extends Map<IslandId, Island> {
|
|
|
38
38
|
* Gets an island by id. Try to use "get" instead!
|
|
39
39
|
* @returns Island or undefined if it does not exist
|
|
40
40
|
*/
|
|
41
|
-
getIfExists(islandId
|
|
41
|
+
getIfExists(islandId?: IslandId): Island | undefined;
|
|
42
42
|
/**
|
|
43
43
|
* Gets an island by position
|
|
44
44
|
*/
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
import type Doodad from "game/doodad/Doodad";
|
|
12
|
+
import type { IslandId } from "game/island/IIsland";
|
|
13
|
+
import type Island from "game/island/Island";
|
|
14
|
+
import type { Reference, ReferenceType } from "game/reference/IReferenceManager";
|
|
15
|
+
import { type ISerializedTranslation } from "language/ITranslation";
|
|
16
|
+
import TranslationImpl from "language/impl/TranslationImpl";
|
|
17
|
+
import { type ISerializer, type IUnserializedCallback } from "save/serializer/ISerializer";
|
|
18
|
+
import type { IVector3 } from "utilities/math/IVector";
|
|
19
|
+
interface IPort {
|
|
20
|
+
id: number;
|
|
21
|
+
islandId: IslandId;
|
|
22
|
+
renamed?: string | ISerializedTranslation;
|
|
23
|
+
name: ISerializedTranslation;
|
|
24
|
+
position: IVector3;
|
|
25
|
+
doodadRef?: Reference<ReferenceType.Doodad>;
|
|
26
|
+
}
|
|
27
|
+
interface Port extends Readonly<IPort> {
|
|
28
|
+
}
|
|
29
|
+
declare class Port {
|
|
30
|
+
static fromDoodad(doodad: Doodad): Port;
|
|
31
|
+
constructor(port: IPort);
|
|
32
|
+
get doodad(): Doodad | undefined;
|
|
33
|
+
get island(): Island | undefined;
|
|
34
|
+
getName(): TranslationImpl;
|
|
35
|
+
}
|
|
36
|
+
export default Port;
|
|
37
|
+
export declare class PortManager extends Map<number, Port> implements IUnserializedCallback {
|
|
38
|
+
private readonly island;
|
|
39
|
+
constructor(island: Island);
|
|
40
|
+
onUnserialized(serializer: ISerializer): void;
|
|
41
|
+
register(doodad: Doodad): void;
|
|
42
|
+
deregister(doodad: Doodad): boolean;
|
|
43
|
+
}
|
|
@@ -20,7 +20,7 @@ import type { Stat } from "game/entity/IStats";
|
|
|
20
20
|
import type { IDecayTemperatureRange } from "game/IGame";
|
|
21
21
|
import type { IObjectDescription, Quality } from "game/IObject";
|
|
22
22
|
import type { IslandId } from "game/island/IIsland";
|
|
23
|
-
import type {
|
|
23
|
+
import type { IMoveItemOptions } from "game/item/IItemManager";
|
|
24
24
|
import type Item from "game/item/Item";
|
|
25
25
|
import type Recipe from "game/item/recipe/Recipe";
|
|
26
26
|
import type MagicalPropertyManager from "game/magic/MagicalPropertyManager";
|
|
@@ -142,6 +142,11 @@ export interface IItemDescription extends IObjectDescription, IModdable, ITemper
|
|
|
142
142
|
use?: ActionType[];
|
|
143
143
|
ranged?: IRanged;
|
|
144
144
|
recipe?: IRecipe;
|
|
145
|
+
/**
|
|
146
|
+
* A list of groups the item should belong too.
|
|
147
|
+
* Do not use this during runtime - use itemManager.getGroups instead!
|
|
148
|
+
*/
|
|
149
|
+
group?: ItemTypeGroup[];
|
|
145
150
|
/**
|
|
146
151
|
* A list of recipes that have this item as an output.
|
|
147
152
|
*
|
|
@@ -289,8 +294,8 @@ export interface IItemDescription extends IObjectDescription, IModdable, ITemper
|
|
|
289
294
|
displayItem?: SupplierOr<DisplayableItemType | undefined, [Item]>;
|
|
290
295
|
onEquip?(item: Item): void;
|
|
291
296
|
onUnequip?(item: Item): void;
|
|
292
|
-
onContainerItemAdd?(container: Item & IContainer,
|
|
293
|
-
onContainerItemRemove?(container: Item & IContainer,
|
|
297
|
+
onContainerItemAdd?(container: Item & IContainer, items: Item[]): void;
|
|
298
|
+
onContainerItemRemove?(container: Item & IContainer, items: Item[]): void;
|
|
294
299
|
onCreate?(item: Item): void;
|
|
295
300
|
onChangeInto?(item: Item, fromItemType: ItemType): void;
|
|
296
301
|
}
|
|
@@ -449,7 +454,7 @@ export interface IMoveToTileOptions {
|
|
|
449
454
|
toTile: Tile;
|
|
450
455
|
toTileApplyPlayerOffset?: boolean;
|
|
451
456
|
toContainer?: IContainer;
|
|
452
|
-
toContainerOptions?:
|
|
457
|
+
toContainerOptions?: IMoveItemOptions;
|
|
453
458
|
beforeMovement?: IMoveToTileBeforeMovementOptions;
|
|
454
459
|
extinguishTorches?: boolean;
|
|
455
460
|
/**
|
|
@@ -554,8 +559,11 @@ export interface IDismantleItemDescription {
|
|
|
554
559
|
transferDecay?: boolean;
|
|
555
560
|
}
|
|
556
561
|
export interface IItemGroupDescription {
|
|
557
|
-
types: Array<ItemType | ItemTypeGroup>;
|
|
558
562
|
default: ItemType | ItemTypeGroup;
|
|
563
|
+
/**
|
|
564
|
+
* An array of additional Item types / group's that should be added to this one during lookup generation.
|
|
565
|
+
*/
|
|
566
|
+
types?: Array<ItemType | ItemTypeGroup>;
|
|
559
567
|
/**
|
|
560
568
|
* Whether this group is hidden to the player. Defaults to `false`
|
|
561
569
|
*/
|
|
@@ -89,10 +89,20 @@ export interface IDoodadsUsed {
|
|
|
89
89
|
doodad: Doodad;
|
|
90
90
|
group: DoodadType | DoodadTypeGroup;
|
|
91
91
|
}
|
|
92
|
-
export interface
|
|
92
|
+
export interface IMoveItemOptions {
|
|
93
|
+
onMoveItem?: (item: Item) => void;
|
|
94
|
+
filter?: {
|
|
95
|
+
itemType?: ItemType;
|
|
96
|
+
itemQuality?: Quality;
|
|
97
|
+
filterText?: string;
|
|
98
|
+
};
|
|
93
99
|
skipMessage?: boolean;
|
|
94
|
-
|
|
100
|
+
skipSound?: boolean;
|
|
95
101
|
skipTileUpdate?: boolean;
|
|
102
|
+
skipUpdateTables?: boolean;
|
|
103
|
+
skipWeightChecks?: boolean;
|
|
104
|
+
suspendNotifier?: boolean;
|
|
105
|
+
moveToTileOptions?: IMoveToTileOptions;
|
|
96
106
|
}
|
|
97
107
|
export interface IPlaceOnTileOptions {
|
|
98
108
|
force?: boolean;
|
|
@@ -124,3 +134,7 @@ export interface ICraftResultChances {
|
|
|
124
134
|
export declare namespace ICraftResultChances {
|
|
125
135
|
const NEVER: Readonly<ICraftResultChances>;
|
|
126
136
|
}
|
|
137
|
+
export interface IAddToContainerResult {
|
|
138
|
+
itemsMoved: Item[];
|
|
139
|
+
noMoreRoomForItems: Item[];
|
|
140
|
+
}
|
|
@@ -8,8 +8,8 @@
|
|
|
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 { IItemDescription, IItemGroupDescription, IRecipeComponent
|
|
12
|
-
import type { ItemType } from "game/item/IItem";
|
|
11
|
+
import type { IItemDescription, IItemGroupDescription, IRecipeComponent } from "game/item/IItem";
|
|
12
|
+
import type { ItemType, ItemTypeGroup } from "game/item/IItem";
|
|
13
13
|
export declare const itemDescriptions: Descriptions<ItemType, IItemDescription>;
|
|
14
14
|
export declare const itemGroupDescriptions: Descriptions<ItemTypeGroup, IItemGroupDescription>;
|
|
15
15
|
export declare function RecipeComponent(type: ItemType | ItemTypeGroup, requiredAmount: number, consumedAmount: number, disassembleAmount?: number, ignoreWeight?: boolean, tileEventByProduct?: boolean): IRecipeComponent;
|
|
@@ -39,8 +39,8 @@ export default class ItemFinder extends EventEmitter.Host<IItemFinderEvents> {
|
|
|
39
39
|
markDirty(): void;
|
|
40
40
|
private compute;
|
|
41
41
|
protected onItemStateChange(item: Item): void;
|
|
42
|
-
protected onContainerItemAdd(items: ItemManager,
|
|
43
|
-
protected onContainerItemRemove(items: ItemManager,
|
|
42
|
+
protected onContainerItemAdd(items: ItemManager, itemsAdded: Item[], containerAddedTo: IContainer): void;
|
|
43
|
+
protected onContainerItemRemove(items: ItemManager, itemsRemoved: Item[], containerRemovedFrom?: IContainer): void;
|
|
44
44
|
protected onLoadOnIsland(player: Player): void;
|
|
45
45
|
private trackContainer;
|
|
46
46
|
private untrackContainer;
|