@wayward/types 2.13.0-beta.dev.20230405.1 → 2.13.0-beta.dev.20230407.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/event/EventBuses.d.ts +19 -16
- package/definitions/game/event/EventEmitter.d.ts +2 -1
- package/definitions/game/game/Game.d.ts +4 -0
- package/definitions/game/game/IGame.d.ts +1 -0
- package/definitions/game/game/entity/CombatStrengthManager.d.ts +3 -1
- package/definitions/game/game/entity/Human.d.ts +6 -1
- package/definitions/game/game/entity/IEntity.d.ts +4 -0
- package/definitions/game/game/entity/action/ActionsRegistration.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Attack.d.ts +0 -1
- package/definitions/game/game/entity/action/actions/SailToIsland.d.ts +2 -1
- package/definitions/game/game/entity/action/usable/actions/UsableActionsHidden.d.ts +13 -0
- package/definitions/game/game/entity/creature/Creature.d.ts +6 -3
- package/definitions/game/game/entity/creature/ICreature.d.ts +33 -0
- package/definitions/game/game/entity/player/Player.d.ts +7 -1
- package/definitions/game/game/inspection/InfoProvider.d.ts +1 -1
- package/definitions/game/game/inspection/infoProviders/LabelledValue.d.ts +2 -1
- package/definitions/game/game/inspection/infoProviders/creature/Aberrant.d.ts +3 -1
- package/definitions/game/game/inspection/infoProviders/creature/CreatureTamedInfo.d.ts +1 -1
- package/definitions/game/game/inspection/infoProviders/creature/Difficulty.d.ts +2 -0
- package/definitions/game/game/inspection/infoProviders/item/ItemDetails.d.ts +1 -1
- package/definitions/game/game/inspection/infoProviders/item/MagicalDamageType.d.ts +17 -0
- package/definitions/game/game/inspection/infoProviders/stat/AttackInfo.d.ts +1 -1
- package/definitions/game/game/inspection/inspections/CorpseInspection.d.ts +1 -1
- package/definitions/game/game/island/IIsland.d.ts +1 -0
- package/definitions/game/game/island/Island.d.ts +1 -1
- package/definitions/game/game/item/Item.d.ts +2 -1
- package/definitions/game/game/item/ItemManager.d.ts +0 -1
- package/definitions/game/game/magic/MagicalPropertyType.d.ts +4 -1
- package/definitions/game/game/milestones/IMilestone.d.ts +1 -1
- package/definitions/game/game/milestones/MilestoneManager.d.ts +3 -3
- package/definitions/game/game/options/modifiers/milestone/modifiers/{Multidisciplined.d.ts → Versatile.d.ts} +6 -3
- package/definitions/game/game/reference/ReferenceManager.d.ts +1 -1
- package/definitions/game/game/tile/Tile.d.ts +9 -8
- package/definitions/game/language/Translation.d.ts +1 -0
- package/definitions/game/language/dictionary/Message.d.ts +908 -901
- package/definitions/game/language/dictionary/Misc.d.ts +36 -35
- package/definitions/game/language/dictionary/UiTranslation.d.ts +731 -725
- package/definitions/game/language/impl/TranslationImpl.d.ts +2 -1
- package/definitions/game/mod/ModManager.d.ts +1 -0
- package/definitions/game/multiplayer/packets/server/UpdateActionBarPacket.d.ts +3 -2
- package/definitions/game/renderer/Renderer.d.ts +1 -1
- package/definitions/game/renderer/world/IWorldRenderer.d.ts +8 -0
- package/definitions/game/renderer/world/WorldRenderer.d.ts +6 -18
- package/definitions/game/ui/Ui.d.ts +2 -0
- package/definitions/game/ui/component/Component.d.ts +1 -0
- package/definitions/game/ui/input/Bindable.d.ts +166 -166
- package/definitions/game/ui/input/BindableManager.d.ts +2 -2
- package/definitions/game/ui/input/InputManager.d.ts +1 -0
- package/definitions/game/ui/screen/screens/GameScreen.d.ts +0 -2
- package/definitions/game/ui/screen/screens/game/DialogManager.d.ts +1 -0
- package/definitions/game/ui/screen/screens/game/dialog/BookDialog.d.ts +1 -1
- package/definitions/game/ui/screen/screens/game/dialog/IslandsSailDialog.d.ts +3 -1
- package/definitions/game/ui/screen/screens/game/dialog/IslandsSelectionDialog.d.ts +0 -3
- package/definitions/game/ui/screen/screens/game/dialog/islands/IslandsDialog.d.ts +5 -0
- package/definitions/game/ui/screen/screens/game/static/ActionBar.d.ts +8 -2
- package/definitions/game/ui/screen/screens/game/static/Messages.d.ts +3 -0
- package/definitions/game/ui/screen/screens/game/static/actions/IActionBar.d.ts +3 -1
- package/definitions/game/ui/screen/screens/menu/menus/GameEndMenu.d.ts +3 -1
- package/definitions/game/utilities/math/Range.d.ts +3 -0
- package/package.json +1 -1
|
@@ -30,6 +30,7 @@ import type Item from "game/item/Item";
|
|
|
30
30
|
import type ItemManager from "game/item/ItemManager";
|
|
31
31
|
import type Loading from "game/meta/Loading";
|
|
32
32
|
import type Prompts from "game/meta/prompt/Prompts";
|
|
33
|
+
import type { MilestoneManager } from "game/milestones/MilestoneManager";
|
|
33
34
|
import type TileEvent from "game/tile/TileEvent";
|
|
34
35
|
import type TileEventManager from "game/tile/TileEventManager";
|
|
35
36
|
import type LanguageManager from "language/LanguageManager";
|
|
@@ -62,22 +63,23 @@ export declare enum EventBus {
|
|
|
62
63
|
Loading = 17,
|
|
63
64
|
LocalIsland = 18,
|
|
64
65
|
LocalPlayer = 19,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
66
|
+
Milestones = 20,
|
|
67
|
+
Mods = 21,
|
|
68
|
+
Multiplayer = 22,
|
|
69
|
+
NPCManager = 23,
|
|
70
|
+
NPCs = 24,
|
|
71
|
+
PlayerManager = 25,
|
|
72
|
+
Players = 26,
|
|
73
|
+
Prompt = 27,
|
|
74
|
+
SaveManager = 28,
|
|
75
|
+
ScreenManager = 29,
|
|
76
|
+
Steamworks = 30,
|
|
77
|
+
TileEventManager = 31,
|
|
78
|
+
TileEvents = 32,
|
|
79
|
+
Ui = 33,
|
|
80
|
+
UiActionBar = 34,
|
|
81
|
+
UiMovementHandler = 35,
|
|
82
|
+
WorldRenderer = 36
|
|
81
83
|
}
|
|
82
84
|
declare const eventBuses: {
|
|
83
85
|
[EventBus.Actions](): ActionExecutor<any, any, any, any, any>;
|
|
@@ -100,6 +102,7 @@ declare const eventBuses: {
|
|
|
100
102
|
[EventBus.Loading](): Loading.Events;
|
|
101
103
|
[EventBus.LocalIsland](): Island;
|
|
102
104
|
[EventBus.LocalPlayer](): Player;
|
|
105
|
+
[EventBus.Milestones](): MilestoneManager;
|
|
103
106
|
[EventBus.Mods](): ModManager;
|
|
104
107
|
[EventBus.Multiplayer](): Multiplayer;
|
|
105
108
|
[EventBus.NPCManager](): NPCManager;
|
|
@@ -75,6 +75,7 @@ declare class EventEmitter<H, E> implements IEventEmitter<H, E> {
|
|
|
75
75
|
private readonly host;
|
|
76
76
|
private readonly hostClass;
|
|
77
77
|
private readonly subscriptions;
|
|
78
|
+
private readonly cachedEmitSelfHandlers;
|
|
78
79
|
private eventEmitterMeta?;
|
|
79
80
|
get event(): IEventEmitter<this, IEventEmitterEvents<H, E>>;
|
|
80
81
|
constructor(host: H);
|
|
@@ -94,7 +95,7 @@ declare class EventEmitter<H, E> implements IEventEmitter<H, E> {
|
|
|
94
95
|
until(promise: Promise<any>): IUntilSubscriber<H, E>;
|
|
95
96
|
hasHandlersForEvent(...events: Array<keyof E>): boolean;
|
|
96
97
|
private copyFrom;
|
|
97
|
-
protected handlersForEvent<K extends keyof E>(event: K, ignoreClassSubscriptions?: true):
|
|
98
|
+
protected handlersForEvent<K extends keyof E>(event: K, ignoreClassSubscriptions?: true): Array<keyof H | Handler<any, any>>;
|
|
98
99
|
}
|
|
99
100
|
declare module EventEmitter {
|
|
100
101
|
class Host<E> implements IEventEmitterHost<E> {
|
|
@@ -139,6 +139,10 @@ export declare class Game extends EventEmitter.Host<IGameEvents> {
|
|
|
139
139
|
setPaused(pause: boolean, source: PauseSource): void;
|
|
140
140
|
onPlayingEntityChange(_manager: any, entity: Entity): void;
|
|
141
141
|
gameLogicLoop: () => void;
|
|
142
|
+
/**
|
|
143
|
+
* Stops the game logic loop timer
|
|
144
|
+
*/
|
|
145
|
+
stopGameLogicLoop(): void;
|
|
142
146
|
/**
|
|
143
147
|
* Triggers a game logic loop to run in the next javascript event loop
|
|
144
148
|
*/
|
|
@@ -284,6 +284,7 @@ export declare const LINE_OF_SIGHT_RADIUS = 15;
|
|
|
284
284
|
export declare const LINE_OF_SIGHT_RADIUS_MAX = 20;
|
|
285
285
|
export declare const LINE_OF_SIGHT_DETAIL = 4;
|
|
286
286
|
export declare const INTERVAL = 16.6666;
|
|
287
|
+
export declare const REAL_TIME_MIN_START_DELAY = 1000;
|
|
287
288
|
export declare const TURN_DELAY_MAX: number;
|
|
288
289
|
export declare const TURN_DELAY_DEFAULT: number;
|
|
289
290
|
export declare const LIGHT_COLOR_DEFAULT: import("utilities/Color").IRGB;
|
|
@@ -46,7 +46,9 @@ export default class CombatStrengthManager {
|
|
|
46
46
|
* Calculates a float value between 0 and 1 representing a creature's difficulty.
|
|
47
47
|
*/
|
|
48
48
|
getCreature(creature: Creature | CreatureType, aberrant?: boolean): number;
|
|
49
|
-
getCreatureDifficultyAgainstHuman(creature: Creature
|
|
49
|
+
getCreatureDifficultyAgainstHuman(creature: Creature, human: Human): number;
|
|
50
|
+
private getEstimatedTurnsToKillHuman;
|
|
51
|
+
private getEstimatedTurnsToKillCreature;
|
|
50
52
|
/**
|
|
51
53
|
* Calculates a value representing a creature's combat strength.
|
|
52
54
|
*
|
|
@@ -173,6 +173,7 @@ export default abstract class Human<TypeType extends number = number> extends En
|
|
|
173
173
|
loadUi(): void;
|
|
174
174
|
startResting(restData: IRestData): void;
|
|
175
175
|
cancelResting(reason: RestCancelReason): boolean;
|
|
176
|
+
findPathToPort(portId: number, startReversed?: boolean, ensureVehicleIsAllowed?: boolean): Tile[] | undefined;
|
|
176
177
|
addTamedCreature(creature: Creature): void;
|
|
177
178
|
removeTamedCreature(creature: Creature): boolean;
|
|
178
179
|
resetMovementIntent(): void;
|
|
@@ -247,6 +248,10 @@ export default abstract class Human<TypeType extends number = number> extends En
|
|
|
247
248
|
checkUnder(inFacingDirection?: boolean, options?: ICheckUnderOptions): ICheckUnderOptions;
|
|
248
249
|
damageByInteractingWith(thing: Doodad | TileEvent, options: ICheckUnderOptions | undefined, damageLocation: EquipType): ICheckUnderOptions;
|
|
249
250
|
equip(item: Item, slot: EquipType, internal?: boolean): boolean;
|
|
251
|
+
/**
|
|
252
|
+
* Unequips an item.
|
|
253
|
+
* Note: This is safe to call even if the item isn't equipped. it'll do nothing in that case.
|
|
254
|
+
*/
|
|
250
255
|
unequip(item: Item, internal?: boolean, skipMessage?: boolean, skipRevertItem?: boolean): void;
|
|
251
256
|
private updateOffHandState;
|
|
252
257
|
unequipAll(): void;
|
|
@@ -308,7 +313,7 @@ export default abstract class Human<TypeType extends number = number> extends En
|
|
|
308
313
|
getWeightOrStaminaMovementPenalty(): number;
|
|
309
314
|
canSailAway(): ICanSailAwayResult;
|
|
310
315
|
canSailTo(x: number, y: number): boolean;
|
|
311
|
-
canCombatTides(): true |
|
|
316
|
+
canCombatTides(): true | Message.ActionSailToIslandCannotUseNotEnoughSwimmingSkill | Message.ActionSailToIslandCannotUseNotEnoughStamina;
|
|
312
317
|
protected calculateVoyageInfo(destination?: Island, distanceFromEdge?: number): IVoyageInfo;
|
|
313
318
|
/**
|
|
314
319
|
* Applies traveling effects to the player
|
|
@@ -244,6 +244,10 @@ declare class AttributesImpl {
|
|
|
244
244
|
all(): [DamageType, number][];
|
|
245
245
|
types(): DamageType[];
|
|
246
246
|
has(type?: DamageType): boolean;
|
|
247
|
+
/**
|
|
248
|
+
* Returns true if any of the given damage types are exactly the given value.
|
|
249
|
+
*/
|
|
250
|
+
hasTypeAtValue(damage: DamageType, exactly: number): boolean;
|
|
247
251
|
copy(): Attributes;
|
|
248
252
|
equals(attrs: Attributes): boolean;
|
|
249
253
|
}
|
|
@@ -121,7 +121,7 @@ export declare const actionDescriptionsSlow: {
|
|
|
121
121
|
usable: true;
|
|
122
122
|
}, [import("../../item/Item").default]>;
|
|
123
123
|
34: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemNearby, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Boolean, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../player/Player").default, void, import("game/entity/action/actions/SailToCivilization").ISailToCivilizationCanUse, [(import("../../item/Item").default | undefined)?, (boolean | undefined)?]>;
|
|
124
|
-
96: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.Integer32, import("game/entity/action/IAction").ActionArgument.Integer32], import("../Human").default<number>, void, import("game/entity/action/actions/SailToIsland").ISailToIslandCanUse, [number, number]>;
|
|
124
|
+
96: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.Integer32, import("game/entity/action/IAction").ActionArgument.Integer32, [import("game/entity/action/IAction").ActionArgument.Integer32, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default<number>, void, import("game/entity/action/actions/SailToIsland").ISailToIslandCanUse, [number, number, (number | undefined)?]>;
|
|
125
125
|
122: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.Integer32], import("../Human").default<number>, void, import("game/entity/action/actions/SetCreatureAi").ISetCreatureAiCanUse, [number]>;
|
|
126
126
|
6: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default<number>, void, import("game/entity/action/actions/SetDown").ISetDownCanUse, [import("../../item/Item").default]>;
|
|
127
127
|
123: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.Undefined, import("game/entity/action/IAction").ActionArgument.Integer32]], import("../player/Player").default, void, import("game/entity/action/IAction").IActionUsable, [(number | undefined)?]>;
|
|
@@ -37,7 +37,6 @@ export interface IAttackThrowItemCanUse extends IBaseCanUse {
|
|
|
37
37
|
export interface IAttackRangedWeaponCanUse extends IBaseCanUse {
|
|
38
38
|
attackType: AttackType.RangedWeapon;
|
|
39
39
|
weapon: Item;
|
|
40
|
-
weaponDescription: IItemDescription;
|
|
41
40
|
ranged: IRanged;
|
|
42
41
|
rangedRequiredWeapon?: Item;
|
|
43
42
|
ammoItem: Item;
|
|
@@ -12,7 +12,8 @@ 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
|
export interface ISailToIslandCanUse extends IActionUsable {
|
|
15
|
+
isLocalIslandSailing?: boolean;
|
|
15
16
|
distanceFromEdge?: number;
|
|
16
17
|
}
|
|
17
|
-
declare const _default: Action<[ActionArgument.Integer32, ActionArgument.Integer32], import("../../Human").default<number>, void, ISailToIslandCanUse, [number, number]>;
|
|
18
|
+
declare const _default: Action<[ActionArgument.Integer32, ActionArgument.Integer32, [ActionArgument.Integer32, ActionArgument.Undefined]], import("../../Human").default<number>, void, ISailToIslandCanUse, [number, number, (number | undefined)?]>;
|
|
18
19
|
export default _default;
|
|
@@ -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
|
+
import { UsableActionGenerator } from "game/entity/action/usable/UsableActionRegistrar";
|
|
12
|
+
declare const _default: UsableActionGenerator<[]>;
|
|
13
|
+
export default _default;
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { SfxType } from "audio/IAudio";
|
|
12
12
|
import type { IEventEmitter } from "event/EventEmitter";
|
|
13
|
-
import type { CreatureType, ICreatureDescription, ICreatureEvents, IDamageInfo, IHitch } from "game/entity/creature/ICreature";
|
|
13
|
+
import type { CreatureAttackOutcome, CreatureType, ICreatureAttackOutcomeAttack, ICreatureDescription, ICreatureEvents, IDamageInfo, IHitch } from "game/entity/creature/ICreature";
|
|
14
14
|
import EntityWithStats from "game/entity/EntityWithStats";
|
|
15
15
|
import type Human from "game/entity/Human";
|
|
16
16
|
import type { IEntityConstructorOptions, IStatChangeInfo } from "game/entity/IEntity";
|
|
17
|
-
import { AiType, EntityType, MoveType } from "game/entity/IEntity";
|
|
17
|
+
import { AiType, Defense, EntityType, MoveType } from "game/entity/IEntity";
|
|
18
18
|
import type { IStat } from "game/entity/IStats";
|
|
19
19
|
import type { IMovementTime } from "game/IGame";
|
|
20
20
|
import { TileUpdateType } from "game/IGame";
|
|
@@ -80,6 +80,7 @@ export default class Creature extends EntityWithStats<ICreatureDescription, Crea
|
|
|
80
80
|
isTamed(): boolean;
|
|
81
81
|
isValid(): boolean;
|
|
82
82
|
getCommandedAiType(): AiType | undefined;
|
|
83
|
+
getDefense(human?: Human): Defense;
|
|
83
84
|
/**
|
|
84
85
|
* Check is a creature is allowed to attack the target (rules of engagement)
|
|
85
86
|
* @param target Target thing to attack
|
|
@@ -131,7 +132,9 @@ export default class Creature extends EntityWithStats<ICreatureDescription, Crea
|
|
|
131
132
|
* Large creatures should render over the doodad over layer, which means we should hide the doodad over layer for doodads on the creatures tile.
|
|
132
133
|
*/
|
|
133
134
|
updateDoodadOverHiddenState(tile: Tile, shouldBeHidden: boolean): void;
|
|
134
|
-
|
|
135
|
+
getAttackOutcome(enemy: Human | Creature | undefined, force: true, humans?: Human[], description?: ICreatureDescription, moveType?: MoveType): ICreatureAttackOutcomeAttack;
|
|
136
|
+
getAttackOutcome(enemy: Human | Creature | undefined, force?: boolean, humans?: Human[], description?: ICreatureDescription, moveType?: MoveType): CreatureAttackOutcome;
|
|
137
|
+
processAttack(description: ICreatureDescription, humans: Human[], moveType: MoveType | undefined, enemyIn: Human | Creature | undefined): boolean;
|
|
135
138
|
getProducedTemperature(): number | undefined;
|
|
136
139
|
protected updateDoodadOverHiddenStateForCurrentTile(hidden?: boolean): void;
|
|
137
140
|
protected updateTile(fromTile: Tile, toTile: Tile): boolean;
|
|
@@ -19,6 +19,7 @@ import { AiType } from "game/entity/IEntity";
|
|
|
19
19
|
import type { IStat } from "game/entity/IStats";
|
|
20
20
|
import type { IPackedMessage } from "game/entity/player/IMessageManager";
|
|
21
21
|
import type { ItemType, ItemTypeGroup } from "game/item/IItem";
|
|
22
|
+
import type Item from "game/item/Item";
|
|
22
23
|
import type { LootGroupType } from "game/item/LootGroups";
|
|
23
24
|
import type { ITemperatureDescription } from "game/temperature/ITemperature";
|
|
24
25
|
import type { TileEventType } from "game/tile/ITileEvent";
|
|
@@ -30,6 +31,7 @@ import type Translation from "language/Translation";
|
|
|
30
31
|
import type { IModdable } from "mod/ModRegistry";
|
|
31
32
|
import type { StatNotificationType } from "renderer/notifier/INotifier";
|
|
32
33
|
import type { IRGB } from "utilities/Color";
|
|
34
|
+
import type { IRange } from "utilities/math/Range";
|
|
33
35
|
export declare enum CreatureType {
|
|
34
36
|
Slime = 0,
|
|
35
37
|
JellyCube = 1,
|
|
@@ -388,3 +390,34 @@ export declare const CREATURE_FLEE_DISTANCE_SQ: number;
|
|
|
388
390
|
export declare const TAMED_CREATURE_FOLLOW_CLOSE_DISTANCE = 1;
|
|
389
391
|
export declare const TAMED_CREATURE_FOLLOW_FAR_DISTANCE = 6;
|
|
390
392
|
export declare const settableAiTypes: Set<AiType>;
|
|
393
|
+
export interface ICreatureAttackOutcomeBase {
|
|
394
|
+
enemy?: Human | Creature;
|
|
395
|
+
willAttack: boolean;
|
|
396
|
+
breakAway: boolean;
|
|
397
|
+
hidden: boolean;
|
|
398
|
+
ai: AiType;
|
|
399
|
+
}
|
|
400
|
+
export interface ICreatureAttackOutcomeNoAttack extends ICreatureAttackOutcomeBase {
|
|
401
|
+
willAttack: false;
|
|
402
|
+
hidden: false;
|
|
403
|
+
}
|
|
404
|
+
export interface ICreatureAttackOutcomeHidden extends ICreatureAttackOutcomeBase {
|
|
405
|
+
willAttack: true;
|
|
406
|
+
hidden: true;
|
|
407
|
+
}
|
|
408
|
+
export interface ICreatureAttackOutcomeAttack extends ICreatureAttackOutcomeBase {
|
|
409
|
+
enemy: Human | Creature;
|
|
410
|
+
willAttack: true;
|
|
411
|
+
hidden: false;
|
|
412
|
+
ai: AiType;
|
|
413
|
+
maxParryingMultiplier: number;
|
|
414
|
+
damagedVehicle?: Item;
|
|
415
|
+
combatNote?: any[];
|
|
416
|
+
damageEquipment: boolean;
|
|
417
|
+
creatureHitRange: IRange;
|
|
418
|
+
enemyDefense: number;
|
|
419
|
+
pityPointOfDamageChance: number;
|
|
420
|
+
effectiveness: number;
|
|
421
|
+
damageScale: number;
|
|
422
|
+
}
|
|
423
|
+
export type CreatureAttackOutcome = ICreatureAttackOutcomeNoAttack | ICreatureAttackOutcomeHidden | ICreatureAttackOutcomeAttack;
|
|
@@ -21,6 +21,7 @@ import { TileUpdateType } from "game/IGame";
|
|
|
21
21
|
import type { IslandId } from "game/island/IIsland";
|
|
22
22
|
import type { IContainer } from "game/item/IItem";
|
|
23
23
|
import { ItemType } from "game/item/IItem";
|
|
24
|
+
import type Item from "game/item/Item";
|
|
24
25
|
import { Prompt } from "game/meta/prompt/IPrompt";
|
|
25
26
|
import { Milestone } from "game/milestones/IMilestone";
|
|
26
27
|
import type Tile from "game/tile/Tile";
|
|
@@ -42,6 +43,7 @@ export default class Player extends Human implements IPreSerializeCallback, IUns
|
|
|
42
43
|
islandId: IslandId;
|
|
43
44
|
name: string;
|
|
44
45
|
actionBar: IActionBarSlotData[];
|
|
46
|
+
useActionsWhileMoving: boolean;
|
|
45
47
|
revealedItems: Record<number, boolean>;
|
|
46
48
|
milestoneModifiers: Set<Milestone>;
|
|
47
49
|
milestoneTitle?: Milestone;
|
|
@@ -61,6 +63,10 @@ export default class Player extends Human implements IPreSerializeCallback, IUns
|
|
|
61
63
|
protected updateTile(fromTile: Tile, toTile: Tile): boolean;
|
|
62
64
|
changeId(id: number): void;
|
|
63
65
|
protected moveToIsland(targetTile: Tile): void;
|
|
66
|
+
/**
|
|
67
|
+
* This only does stuff when it's called on the local player
|
|
68
|
+
*/
|
|
69
|
+
addItemMilestones(item: Item): void;
|
|
64
70
|
checkSkillMilestones(): void;
|
|
65
71
|
protected onCanMove(direction: Direction.Cardinal): false | undefined;
|
|
66
72
|
addMilestone(milestone: Milestone, data?: number | string, update?: boolean): void;
|
|
@@ -81,7 +87,7 @@ export default class Player extends Human implements IPreSerializeCallback, IUns
|
|
|
81
87
|
* Prompts the player
|
|
82
88
|
*/
|
|
83
89
|
prompt(type: Prompt, ...args: any[]): Promise<boolean | InterruptChoice>;
|
|
84
|
-
updateActionSlots(slots: number[], data: IActionBarSlotData[]): void;
|
|
90
|
+
updateActionSlots(slots: number[], data: IActionBarSlotData[], enabled?: boolean): void;
|
|
85
91
|
updateDialogInfo(dialogIndex: string | number | undefined): void;
|
|
86
92
|
getDialogInfo(dialogIndex: string | number): IDialogInfo;
|
|
87
93
|
kill(): void;
|
|
@@ -141,7 +141,7 @@ export declare class SimpleInfoProvider extends InfoProvider {
|
|
|
141
141
|
private childComponentClass;
|
|
142
142
|
private validWhen?;
|
|
143
143
|
constructor(...translations: Array<TranslationGenerator | InfoProvider>);
|
|
144
|
-
get(): (import("../../language/ITranslation").ISerializedTranslation | import("../../language/impl/TranslationImpl").default | import("../../language/dictionary/UiTranslation").default | (() => import("../../language/ITranslation").ISerializedTranslation | import("../../language/impl/TranslationImpl").default |
|
|
144
|
+
get(): (import("../../language/ITranslation").ISerializedTranslation | import("../../language/impl/TranslationImpl").default | import("../../language/dictionary/UiTranslation").default | (() => import("../../language/ITranslation").ISerializedTranslation | import("../../language/impl/TranslationImpl").default | import("../../language/dictionary/UiTranslation").default | Iterable<import("../../utilities/string/Interpolator").IStringSection> | undefined) | InfoProvider)[];
|
|
145
145
|
add(...translations: Array<TranslationGenerator | InfoProvider | Falsy>): this;
|
|
146
146
|
onlyIfHasContents(): this | undefined;
|
|
147
147
|
addInfoGetter(provider: () => InfoProvider | undefined): this;
|
|
@@ -19,7 +19,8 @@ export declare enum LabelledValueDisplayMode {
|
|
|
19
19
|
"label (value)" = 1,
|
|
20
20
|
"value label" = 2,
|
|
21
21
|
"value (label)" = 3,
|
|
22
|
-
"label value" = 4
|
|
22
|
+
"label value" = 4,
|
|
23
|
+
"label - value" = 5
|
|
23
24
|
}
|
|
24
25
|
export default class LabelledValue extends InfoProvider {
|
|
25
26
|
private readonly label;
|
|
@@ -10,12 +10,14 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type Creature from "game/entity/creature/Creature";
|
|
12
12
|
import { InfoProvider } from "game/inspection/InfoProvider";
|
|
13
|
+
import LabelledValue from "game/inspection/infoProviders/LabelledValue";
|
|
13
14
|
export default class AberrantInfoProvider extends InfoProvider {
|
|
14
15
|
private readonly creature;
|
|
15
16
|
private aberrant;
|
|
17
|
+
private tamed;
|
|
16
18
|
constructor(creature: Creature);
|
|
17
19
|
getClass(): string[];
|
|
18
20
|
hasContent(): boolean;
|
|
19
|
-
get():
|
|
21
|
+
get(): LabelledValue;
|
|
20
22
|
onTickEnd(): void;
|
|
21
23
|
}
|
|
@@ -18,7 +18,7 @@ export default class CreatureTamedInfoProvider extends InfoProvider {
|
|
|
18
18
|
constructor(creature: Creature);
|
|
19
19
|
getClass(): string[];
|
|
20
20
|
hasContent(): boolean;
|
|
21
|
-
get(): (import("game/inspection/InfoProvider").SimpleInfoProvider
|
|
21
|
+
get(): (LabelledValue | import("game/inspection/InfoProvider").SimpleInfoProvider)[];
|
|
22
22
|
onTickEnd(): void;
|
|
23
23
|
private getHappinessMessage;
|
|
24
24
|
}
|
|
@@ -16,8 +16,10 @@ export default class DifficultyInfoProvider extends InfoProvider {
|
|
|
16
16
|
private health;
|
|
17
17
|
private ai;
|
|
18
18
|
private aberrant;
|
|
19
|
+
private tamed;
|
|
19
20
|
constructor(creature: Creature);
|
|
20
21
|
getClass(): string[];
|
|
22
|
+
hasContent(): boolean;
|
|
21
23
|
get(): LabelledValue;
|
|
22
24
|
onTickEnd(): void;
|
|
23
25
|
}
|
|
@@ -19,7 +19,7 @@ export default class ItemDetailsInfoProvider extends InfoProvider {
|
|
|
19
19
|
private readonly description;
|
|
20
20
|
constructor(item: Item | ItemType);
|
|
21
21
|
getClass(): string[];
|
|
22
|
-
get(): (0 | import("game/inspection/InfoProvider").SimpleInfoProvider |
|
|
22
|
+
get(): (0 | LabelledValue | import("game/inspection/InfoProvider").SimpleInfoProvider | ItemWorthInfoProvider)[];
|
|
23
23
|
private getInsulation;
|
|
24
24
|
private getPreservation;
|
|
25
25
|
private getGroupings;
|
|
@@ -0,0 +1,17 @@
|
|
|
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 { DamageType } from "game/entity/IEntity";
|
|
12
|
+
import type { IItemDescription } from "game/item/IItem";
|
|
13
|
+
import type Item from "game/item/Item";
|
|
14
|
+
declare namespace MagicalDamageType {
|
|
15
|
+
function translate(item?: Item, description?: IItemDescription, defaultDamageType?: DamageType): import("../../../../language/impl/TranslationImpl").default;
|
|
16
|
+
}
|
|
17
|
+
export default MagicalDamageType;
|
|
@@ -15,7 +15,7 @@ export default class AttackInfo extends InfoProvider {
|
|
|
15
15
|
private readonly human?;
|
|
16
16
|
constructor(human?: Human<number> | undefined);
|
|
17
17
|
getClass(): string[];
|
|
18
|
-
get(): (import("game/inspection/InfoProvider").SimpleInfoProvider
|
|
18
|
+
get(): (LabelledValue | import("game/inspection/InfoProvider").SimpleInfoProvider)[];
|
|
19
19
|
private getTactics;
|
|
20
20
|
private getMainHand;
|
|
21
21
|
private getOffHand;
|
|
@@ -19,7 +19,7 @@ export default class CorpseInspection extends Inspection<Corpse> {
|
|
|
19
19
|
static getFromTile(tile: Tile): CorpseInspection[];
|
|
20
20
|
static handles(type: InspectType, corpse: unknown): boolean;
|
|
21
21
|
constructor(corpse: Corpse);
|
|
22
|
-
get(context: InfoProviderContext): (0 | import("game/inspection/InfoProvider").SimpleInfoProvider
|
|
22
|
+
get(context: InfoProviderContext): (0 | LabelledValue | import("game/inspection/InfoProvider").SimpleInfoProvider)[];
|
|
23
23
|
private getDecay;
|
|
24
24
|
private decay;
|
|
25
25
|
private shouldRefreshDecay;
|
|
@@ -19,7 +19,7 @@ import CreatureManager from "game/entity/creature/CreatureManager";
|
|
|
19
19
|
import type { IDamageInfo, IDamageOutcome, IDamageOutcomeInput } from "game/entity/creature/ICreature";
|
|
20
20
|
import FlowFieldManager from "game/entity/flowfield/FlowFieldManager";
|
|
21
21
|
import Human from "game/entity/Human";
|
|
22
|
-
import { SkillType } from "game/entity/IHuman";
|
|
22
|
+
import type { SkillType } from "game/entity/IHuman";
|
|
23
23
|
import NPCManager from "game/entity/npc/NPCManager";
|
|
24
24
|
import type { Game } from "game/Game";
|
|
25
25
|
import type { IGameOld } from "game/IGame";
|
|
@@ -26,7 +26,7 @@ import type { IObject, IObjectOptions } from "game/IObject";
|
|
|
26
26
|
import { Quality } from "game/IObject";
|
|
27
27
|
import type { IslandId } from "game/island/IIsland";
|
|
28
28
|
import type { ContainerReference, DisplayableItemType, IConstructedInfo, IContainable, IContainer, IItemDescription, IItemDisassembleResult, IItemUsed, IMagicalPropertyInfo, IMoveToTileOptions, ItemCounter, ItemTag, ItemTypeExtra } from "game/item/IItem";
|
|
29
|
-
import { BookType, ItemType, ItemTypeGroup, ItemWeightChange, SYMBOL_CONTAINER_CACHED_REFERENCE
|
|
29
|
+
import { BookType, ItemDamageResult, ItemType, ItemTypeGroup, ItemWeightChange, SYMBOL_CONTAINER_CACHED_REFERENCE } from "game/item/IItem";
|
|
30
30
|
import type { IPlaceOnTileOptions } from "game/item/IItemManager";
|
|
31
31
|
import ItemMapManager from "game/item/ItemMapManager";
|
|
32
32
|
import type { IHasMagic, MagicalSubPropertySubTypes } from "game/magic/MagicalPropertyManager";
|
|
@@ -294,6 +294,7 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Item
|
|
|
294
294
|
* Gets the inherit item type.
|
|
295
295
|
*/
|
|
296
296
|
getInheritItemRecipeSkill(): SkillType;
|
|
297
|
+
getDamageType(): DamageType;
|
|
297
298
|
/**
|
|
298
299
|
* Returns the damage types associated with a skill with a fallback for whatever damage types the item normally provides
|
|
299
300
|
* @param skillType The skill to get default damage types from
|
|
@@ -285,7 +285,6 @@ export default class ItemManager extends ObjectManager<Item, IItemManagerEvents>
|
|
|
285
285
|
*/
|
|
286
286
|
getItemListTranslation(items: Item[], listEnder?: ListEnder | false): TranslationImpl;
|
|
287
287
|
saveTileReferences(): void;
|
|
288
|
-
checkMilestones(human: Human, item: Item): void;
|
|
289
288
|
getDefaultDurability(human: Human | undefined, weight: number, itemType: ItemType, getMax?: boolean): number;
|
|
290
289
|
updateItemOrder(container: IContainer, itemOrder: number[] | undefined): void;
|
|
291
290
|
/**
|
|
@@ -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
|
+
import { DamageType } from "game/entity/IEntity";
|
|
11
12
|
import { SkillType } from "game/entity/IHuman";
|
|
12
13
|
import { Stat } from "game/entity/IStats";
|
|
13
14
|
import type { IItemDescription, IMagicalPropertyInfo } from "game/item/IItem";
|
|
@@ -64,7 +65,8 @@ export declare enum MagicalPropertyType {
|
|
|
64
65
|
/**
|
|
65
66
|
* Adds a property that emits skill bonus to anybody within range (3x3 square) of the doodad.
|
|
66
67
|
*/
|
|
67
|
-
DoodadSkill = 27
|
|
68
|
+
DoodadSkill = 27,
|
|
69
|
+
ElementalDamage = 28
|
|
68
70
|
}
|
|
69
71
|
export interface IMagicalPropertyDescription {
|
|
70
72
|
/**
|
|
@@ -86,5 +88,6 @@ export interface MagicalPropertyTypeSubTypeMap {
|
|
|
86
88
|
[MagicalPropertyType.Skill]: SkillType;
|
|
87
89
|
[MagicalPropertyType.Reputation]: Stat;
|
|
88
90
|
[MagicalPropertyType.DoodadSkill]: SkillType;
|
|
91
|
+
[MagicalPropertyType.ElementalDamage]: DamageType;
|
|
89
92
|
}
|
|
90
93
|
export declare const magicalPropertyDescriptions: PartialRecord<MagicalPropertyType, IMagicalPropertyDescription>;
|
|
@@ -59,7 +59,7 @@ export declare enum Milestone {
|
|
|
59
59
|
Murderer = 47,
|
|
60
60
|
Retailer = 48,
|
|
61
61
|
Masochist = 49,
|
|
62
|
-
|
|
62
|
+
Versatile = 50
|
|
63
63
|
}
|
|
64
64
|
export type ExcludeInternalMilestones<MILESTONE extends Milestone> = PickValueKeys<typeof Milestone, MILESTONE> extends `Internal${string}` ? never : MILESTONE;
|
|
65
65
|
export declare enum MilestoneVisibility {
|
|
@@ -13,7 +13,7 @@ import type { CreatureType } from "game/entity/creature/ICreature";
|
|
|
13
13
|
import type { DamageType } from "game/entity/IEntity";
|
|
14
14
|
import type { Game } from "game/Game";
|
|
15
15
|
import { Milestone, MilestoneVisibility } from "game/milestones/IMilestone";
|
|
16
|
-
type
|
|
16
|
+
type MilestoneUpdate = [Milestone, (number | string)?];
|
|
17
17
|
export interface IMilestoneEvents {
|
|
18
18
|
/**
|
|
19
19
|
* @param milestone The milestone that is being updated
|
|
@@ -40,10 +40,10 @@ export declare class MilestoneManager extends EventEmitter.Host<IMilestoneEvents
|
|
|
40
40
|
*/
|
|
41
41
|
getDesiredAmount(milestone: Milestone): number;
|
|
42
42
|
/**
|
|
43
|
-
* Get
|
|
43
|
+
* Get an array of all completed milestones
|
|
44
44
|
*/
|
|
45
45
|
getCompleted(): Milestone[];
|
|
46
|
-
add(
|
|
46
|
+
add(update: MilestoneUpdate): void;
|
|
47
47
|
update(): void;
|
|
48
48
|
areUnlockable(mode?: import("../options/IGameOptions").GameMode): boolean;
|
|
49
49
|
areUnlockableInMode(mode?: import("../options/IGameOptions").GameMode): boolean;
|
|
@@ -14,15 +14,18 @@ import type Creature from "game/entity/creature/Creature";
|
|
|
14
14
|
import type { CreatureType, IDamageOutcome, IDamageOutcomeInput } from "game/entity/creature/ICreature";
|
|
15
15
|
import type Player from "game/entity/player/Player";
|
|
16
16
|
import type Island from "game/island/Island";
|
|
17
|
+
import type Item from "game/item/Item";
|
|
18
|
+
import type ItemManager from "game/item/ItemManager";
|
|
17
19
|
import type { Milestone } from "game/milestones/IMilestone";
|
|
18
20
|
import type { IGameOptionsPartial } from "game/options/IGameOptions";
|
|
19
21
|
import MilestoneModifier, { MilestoneModifierGroup, MilestoneModifierInstance } from "game/options/modifiers/milestone/MilestoneModifier";
|
|
20
|
-
export default class
|
|
22
|
+
export default class Versatile extends MilestoneModifier {
|
|
21
23
|
getOptions(): IGameOptionsPartial;
|
|
22
24
|
getGroup(): MilestoneModifierGroup;
|
|
23
|
-
instantiate(id: Milestone, player?: Player):
|
|
25
|
+
instantiate(id: Milestone, player?: Player): VersatileMilestoneModifierInstance | undefined;
|
|
24
26
|
}
|
|
25
|
-
declare class
|
|
27
|
+
declare class VersatileMilestoneModifierInstance extends MilestoneModifierInstance<Record<string, Map<CreatureType, Set<DamageType>>>> {
|
|
28
|
+
protected onCreateItem(manager: ItemManager, item: Item): void;
|
|
26
29
|
protected getDefense(island: Island, defense: Defense | undefined, target: Human | Creature | CreatureType, damageType?: DamageType): Defense | undefined;
|
|
27
30
|
protected calculateAttackOutcome(island: Island, outcome: IDamageOutcome, input: IDamageOutcomeInput, attackValue: number, defenseValue: number): IDamageOutcome | undefined;
|
|
28
31
|
protected hasDiscoveredVulnOrResist(player: Player, creature: CreatureType, damageType: DamageType): boolean | undefined;
|
|
@@ -33,7 +33,7 @@ export default class ReferenceManager {
|
|
|
33
33
|
constructor(game: Game);
|
|
34
34
|
create(): number;
|
|
35
35
|
reset(): void;
|
|
36
|
-
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 | import("game/entity/IHuman").EquipType[] | readonly
|
|
36
|
+
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[] | import("game/entity/IHuman").EquipType[] | readonly SkillType[] | readonly Milestone[] | readonly ItemType[] | IterableIterator<Island> | readonly Stat[] | (string | ActionType)[];
|
|
37
37
|
get(thing: Item): Reference<ReferenceType.Item> | undefined;
|
|
38
38
|
get(thing: Doodad): Reference<ReferenceType.Doodad> | undefined;
|
|
39
39
|
get(thing: Creature): Reference<ReferenceType.Creature> | undefined;
|
|
@@ -8,33 +8,34 @@
|
|
|
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 Stream from "@wayward/goodstream";
|
|
11
12
|
import { SfxType } from "audio/IAudio";
|
|
13
|
+
import { FireType } from "game/IGame";
|
|
14
|
+
import { Quality } from "game/IObject";
|
|
15
|
+
import { WorldZ } from "game/WorldZ";
|
|
12
16
|
import type Doodad from "game/doodad/Doodad";
|
|
13
|
-
import type Corpse from "game/entity/creature/corpse/Corpse";
|
|
14
|
-
import type Creature from "game/entity/creature/Creature";
|
|
15
17
|
import type Human from "game/entity/Human";
|
|
18
|
+
import type Creature from "game/entity/creature/Creature";
|
|
19
|
+
import type Corpse from "game/entity/creature/corpse/Corpse";
|
|
16
20
|
import type NPC from "game/entity/npc/NPC";
|
|
17
21
|
import type { IMessageManager } from "game/entity/player/IMessageManager";
|
|
18
|
-
import { FireType } from "game/IGame";
|
|
19
|
-
import { Quality } from "game/IObject";
|
|
20
22
|
import type { IslandId } from "game/island/IIsland";
|
|
23
|
+
import type Island from "game/island/Island";
|
|
21
24
|
import type Item from "game/item/Item";
|
|
22
25
|
import type { IMaybeTileContainer, IOverlayInfo, ITerrainDescription, ITileContainer, ITileData } from "game/tile/ITerrain";
|
|
23
26
|
import { TerrainType } from "game/tile/ITerrain";
|
|
24
27
|
import type TileEvent from "game/tile/TileEvent";
|
|
25
|
-
import { WorldZ } from "game/WorldZ";
|
|
26
|
-
import Message from "language/dictionary/Message";
|
|
27
28
|
import Translation from "language/Translation";
|
|
29
|
+
import Message from "language/dictionary/Message";
|
|
28
30
|
import FieldOfView from "renderer/fieldOfView/FieldOfView";
|
|
29
31
|
import type { IFieldOfViewOrigin } from "renderer/fieldOfView/IFieldOfView";
|
|
30
32
|
import { CanASeeBType } from "renderer/fieldOfView/IFieldOfView";
|
|
31
33
|
import type { IRGB } from "utilities/Color";
|
|
32
34
|
import type { IVector2, IVector3 } from "utilities/math/IVector";
|
|
33
35
|
import type { IVector4 } from "utilities/math/Vector4";
|
|
34
|
-
import type Stream from "@wayward/goodstream";
|
|
35
|
-
import type Island from "game/island/Island";
|
|
36
36
|
export interface ICanSailAwayResult {
|
|
37
37
|
canSailAway: boolean;
|
|
38
|
+
message?: Message;
|
|
38
39
|
distanceFromEdge?: number;
|
|
39
40
|
blockedTilesChecked?: Set<Tile>;
|
|
40
41
|
path?: IVector2[];
|
|
@@ -113,6 +113,7 @@ declare module Translation {
|
|
|
113
113
|
function colorizeImportance(importance: "primary" | "secondary"): Translation;
|
|
114
114
|
function colorizeImportance(importance: "primary" | "secondary", text: string | IStringSection): IStringSection;
|
|
115
115
|
function colorizeImportance(importance: "primary" | "secondary", text: IStringSection[]): IStringSection[];
|
|
116
|
+
function classes(...classes: string[]): TranslationImpl;
|
|
116
117
|
const formatList: typeof formatListTranslation;
|
|
117
118
|
const sorter: typeof ITranslationSorter.create;
|
|
118
119
|
function nameOf(type: Dictionary, thing: number | {
|