@wayward/types 2.14.0-beta.dev.20241202.1 → 2.14.0-beta.dev.20241204.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.
@@ -513,7 +513,7 @@ export default abstract class Human<DescriptionType = unknown, TypeType extends
513
513
  /**
514
514
  * Recompute lights around the human
515
515
  */
516
- computeLights(): void;
516
+ computeLights(z?: number): void;
517
517
  /**
518
518
  * Moves inventory items to the target island
519
519
  * This should be called before switching islands
@@ -31,9 +31,7 @@ export interface IMagicalSubProperty<T extends number> {
31
31
  value: number;
32
32
  }>;
33
33
  }
34
- export type MagicalProperty<T extends MagicalPropertyType> = MagicalPropertyTypeSubTypeMap extends {
35
- [key in T]: any;
36
- } ? IMagicalSubProperty<MagicalPropertyTypeSubTypeMap[T]> : IMagicalProperty;
34
+ export type MagicalProperty<T extends MagicalPropertyType> = MagicalPropertyTypeSubTypeMap extends Record<T, any> ? IMagicalSubProperty<MagicalPropertyTypeSubTypeMap[T]> : IMagicalProperty;
37
35
  type MagicalNormalPropertyEntry = {
38
36
  type: MagicalNormalPropertyTypes;
39
37
  value: number;
@@ -130,10 +130,14 @@ declare namespace Translation {
130
130
  type: number;
131
131
  renamed?: string | ISerializedTranslation;
132
132
  }, count?: number, article?: Article, showRenamedQuotes?: boolean, preArticleReformatters?: [ArrayOr<TranslationReformatter>, ...TranslationArg[]]): Translation;
133
- type Translator<ENTRY extends number = number, ARGS extends any[] = []> = (entry: string | ENTRY, ...args: ARGS) => Translation;
134
- export function translator<ENTRY extends number = number, ARGS extends any[] = []>(_translator: Translator<ENTRY, ARGS> | Dictionary): Translator<ENTRY, ARGS>;
133
+ interface Translator<ENTRY extends number = number, ARGS extends any[] = []> {
134
+ (entry: string | ENTRY, ...args: ARGS): Translation;
135
+ (entry?: string | ENTRY, ...args: ARGS): Translation | undefined;
136
+ }
137
+ type TranslatorImpl<ENTRY extends number = number, ARGS extends any[] = []> = (entry?: string | ENTRY, ...args: ARGS) => Translation | undefined;
138
+ export function translator<ENTRY extends number = number, ARGS extends any[] = []>(_translator: TranslatorImpl<ENTRY, ARGS> | Dictionary): Translator<ENTRY, ARGS>;
135
139
  export function refTranslator<ENTRY extends number = number>(refType: EnumReferenceTypes, dictionary: SupplierOr<Dictionary, [number]>, color?: (entry: string | ENTRY) => TranslationImpl): Translator<ENTRY, [color?: boolean]>;
136
- export function customRefTranslator<TRANSLATOR extends Translator<number, [reference: Reference, ...any[]]>>(refType: EnumReferenceTypes, _translator: TRANSLATOR, color?: (entry: string | number) => TranslationImpl): TRANSLATOR extends Translator<infer ENTRY, [reference: Reference | undefined, ...infer ARGS]> ? Translator<ENTRY, ARGS> : never;
140
+ export function customRefTranslator<TRANSLATOR extends TranslatorImpl<number, [reference: Reference, ...any[]]>>(refType: EnumReferenceTypes, _translator: TRANSLATOR, color?: (entry: string | number) => TranslationImpl): TRANSLATOR extends TranslatorImpl<infer ENTRY, [reference: Reference | undefined, ...infer ARGS]> ? Translator<ENTRY, ARGS> : never;
137
141
  export const empty: () => Translation;
138
142
  export const sentence: () => Translation;
139
143
  export const count: (amount: number, noun?: TranslationArg) => Translation;
@@ -102,30 +102,32 @@ export declare enum RenderSource {
102
102
  NotifierAddNotifierIcon = 37,
103
103
  NotifierAddStat = 38,
104
104
  NotifierAddStatusType = 39,
105
- OptionEquipment = 40,
106
- OptionVisionMode = 41,
107
- OptionZoomLevel = 42,
108
- Particles = 43,
109
- PlayerAdd = 44,
110
- PlayerKill = 45,
111
- PlayerNoclip = 46,
112
- PlayerProcessMovement = 47,
113
- PlayerReady = 48,
114
- PlayerRemove = 49,
115
- PlayerRespawn = 50,
116
- PlayerWalkToTilePath = 51,
117
- PlayerWalkToTilePathOverburdened = 52,
118
- PlayerWalkToTilePathPreview = 53,
119
- PlayerWalkToTilePathReset = 54,
120
- RendererReinitialize = 55,
121
- Resize = 56,
122
- Sacrifice = 57,
123
- SetupGl = 58,
124
- SpawnAnimationStart = 59,
125
- StartGame = 60,
126
- Steamworks = 61,
127
- Thumbnail = 62,
128
- WorldLayerRendererFlush = 63
105
+ NotifierRemoveMarker = 40,
106
+ NotifierRemoveNotification = 41,
107
+ OptionEquipment = 42,
108
+ OptionVisionMode = 43,
109
+ OptionZoomLevel = 44,
110
+ Particles = 45,
111
+ PlayerAdd = 46,
112
+ PlayerKill = 47,
113
+ PlayerNoclip = 48,
114
+ PlayerProcessMovement = 49,
115
+ PlayerReady = 50,
116
+ PlayerRemove = 51,
117
+ PlayerRespawn = 52,
118
+ PlayerWalkToTilePath = 53,
119
+ PlayerWalkToTilePathOverburdened = 54,
120
+ PlayerWalkToTilePathPreview = 55,
121
+ PlayerWalkToTilePathReset = 56,
122
+ RendererReinitialize = 57,
123
+ Resize = 58,
124
+ Sacrifice = 59,
125
+ SetupGl = 60,
126
+ SpawnAnimationStart = 61,
127
+ StartGame = 62,
128
+ Steamworks = 63,
129
+ Thumbnail = 64,
130
+ WorldLayerRendererFlush = 65
129
131
  }
130
132
  export declare function calculateAmbientLightLevel(origin: IFieldOfViewOrigin, z: number): number;
131
133
  export declare const ZOOM_LEVEL_MIN = 1;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wayward/types",
3
3
  "description": "TypeScript declarations for Wayward, used for modding.",
4
- "version": "2.14.0-beta.dev.20241202.1",
4
+ "version": "2.14.0-beta.dev.20241204.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",