@wayward/types 2.13.2-beta.dev.20230605.2 → 2.13.2-beta.dev.20230606.2
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/IHuman.d.ts +12 -2
- package/definitions/game/game/entity/StatDescriptions.d.ts +38 -0
- package/definitions/game/game/entity/Stats.d.ts +2 -2
- package/definitions/game/game/temperature/TemperatureManager.d.ts +1 -0
- package/definitions/game/language/dictionary/UiTranslation.d.ts +788 -785
- package/definitions/game/mod/ModRegistry.d.ts +86 -45
- package/definitions/game/utilities/enum/IEnum.d.ts +2 -1
- package/definitions/game/utilities/math/Math2.d.ts +13 -2
- package/package.json +1 -1
|
@@ -311,11 +311,21 @@ export declare const EQUIP_SLOTS_FREE: EquipType[];
|
|
|
311
311
|
export declare const EQUIP_SLOT_ITEM_GROUPS: Record<EquipType, ItemTypeGroup | undefined>;
|
|
312
312
|
export declare const equipmentRenderOrder: EquipType[];
|
|
313
313
|
export type InsulationWeight = number | [number, "onlyWhenEquipped"];
|
|
314
|
-
export declare const equipSlotInsulationWeights: Record<TempType,
|
|
314
|
+
export declare const equipSlotInsulationWeights: Record<TempType, PartialRecord<EquipType, InsulationWeight>>;
|
|
315
315
|
export interface IExcludedWhenLowering {
|
|
316
316
|
excludeIfLowering: true;
|
|
317
317
|
}
|
|
318
|
-
|
|
318
|
+
/**
|
|
319
|
+
* @param weight The weight of this slot in the calculation. Compare this number to the weights of other slots.
|
|
320
|
+
* @param insulation The insulation value of the item in this slot.
|
|
321
|
+
* @param excluded Whether this slot's insulation should be excluded if it lowers the resulting insulation value.
|
|
322
|
+
*/
|
|
323
|
+
export type CalculatedEquipSlotInsulation = [
|
|
324
|
+
weight: number,
|
|
325
|
+
insulation: number,
|
|
326
|
+
excluded?: IExcludedWhenLowering
|
|
327
|
+
];
|
|
328
|
+
export declare function calculateEquipSlotInsulation(type: TempType, slot: EquipType, equipped?: Item): CalculatedEquipSlotInsulation;
|
|
319
329
|
export declare const insulationRangeWhenSwimming: Record<TempType, IRange>;
|
|
320
330
|
export declare enum HairColor {
|
|
321
331
|
"#e7c978" = 0,
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2011-2023 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 Human from "game/entity/Human";
|
|
12
|
+
import { Stat } from "game/entity/IStats";
|
|
13
|
+
export interface IStatGainInfo {
|
|
14
|
+
amount?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface IStatDescription {
|
|
17
|
+
/**
|
|
18
|
+
* A multiplier for stat gain
|
|
19
|
+
*/
|
|
20
|
+
gainMultiplier?: number;
|
|
21
|
+
/**
|
|
22
|
+
* When a human "gains" stat (ie from skill use), if this method is defined, it will be called.
|
|
23
|
+
* @param human The human that "gains" stat
|
|
24
|
+
* @param gainAmount The amount to gain. This will usually be 1. You should respect this if possible.
|
|
25
|
+
* @returns Whether the stat was truly gained
|
|
26
|
+
*
|
|
27
|
+
* **Note:** When implementing this, it is recommended to use
|
|
28
|
+
*/
|
|
29
|
+
gain?(human: Human, gainAmount: number): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* When a human performs an action that has a chance of raising a stat, the chance is `1 / getGainChanceOffset()`
|
|
32
|
+
*
|
|
33
|
+
* When `getGainChanceOffset` is not implemented, the stat max will be used instead.
|
|
34
|
+
* When the stat is not an `IStatMax`, the current value will be used instead.
|
|
35
|
+
*/
|
|
36
|
+
getGainChanceOffset?(human: Human, defaultGainChanceOffset: number): number;
|
|
37
|
+
}
|
|
38
|
+
export declare const statDescriptions: PartialRecord<Stat, IStatDescription>;
|
|
@@ -52,7 +52,7 @@ export default class Stats<T extends IStatHost> {
|
|
|
52
52
|
/**
|
|
53
53
|
* Returns the value of the given stat, or `undefined` if the stat does not exist. Stat bonus is *not* applied.
|
|
54
54
|
*/
|
|
55
|
-
getBaseValue(stat: Stat | IStat): number | undefined;
|
|
55
|
+
getBaseValue(stat: Stat | IStat, allowFailure?: boolean): number | undefined;
|
|
56
56
|
/**
|
|
57
57
|
* Sets the given `Stat`'s value to the given amount. Assumes the given value includes any bonus. Triggers `statChange`
|
|
58
58
|
* @param stat The `Stat` to set.
|
|
@@ -110,7 +110,7 @@ export default class Stats<T extends IStatHost> {
|
|
|
110
110
|
/**
|
|
111
111
|
* Returns the `max` of the given stat, or undefined if the stat isn't an `IStatMax`. Stat bonus is *not* applied.
|
|
112
112
|
*/
|
|
113
|
-
getBaseMax(stat: Stat | IStat): number | undefined;
|
|
113
|
+
getBaseMax(stat: Stat | IStat, allowFailure?: boolean): number | undefined;
|
|
114
114
|
/**
|
|
115
115
|
* Sets the given `Stat`'s `max` to the given amount. Triggers `statMaxChange`
|
|
116
116
|
* @param stat The `Stat` to set.
|
|
@@ -59,6 +59,7 @@ export default class TemperatureManager extends EventEmitter.Host<ITemperatureMa
|
|
|
59
59
|
private temperatureBoundaryMax;
|
|
60
60
|
temperatureBoundaryMaxVector: Vector2;
|
|
61
61
|
constructor(island: Island);
|
|
62
|
+
clearAll(): void;
|
|
62
63
|
/**
|
|
63
64
|
* Called after the island map size is configured
|
|
64
65
|
*/
|