isaacscript-common 72.8.0 → 72.9.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.
@@ -1230,6 +1230,14 @@ export declare function asPillEffect(num: int): PillEffect;
1230
1230
  */
1231
1231
  export declare function asPlayerType(num: int): PlayerType;
1232
1232
 
1233
+ /**
1234
+ * Helper function to safely cast an `int` to a `RoomType`. (This is better than using the `as`
1235
+ * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
1236
+ *
1237
+ * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
1238
+ */
1239
+ export declare function asRoomType(num: int): RoomType;
1240
+
1233
1241
  /**
1234
1242
  * Helper function to throw an error (using the `error` Lua function) if the provided value is equal
1235
1243
  * to `undefined`.
@@ -7304,12 +7312,16 @@ export declare function getRoomListIndex(roomGridIndex?: int): int;
7304
7312
  *
7305
7313
  * (The version of the function without any arguments will not return undefined since the current
7306
7314
  * room is guaranteed to have data.)
7315
+ *
7316
+ * If you want to get the room name for a specific room type, use the `getRoomTypeName` function.
7307
7317
  */
7308
7318
  export declare function getRoomName(): string;
7309
7319
 
7310
7320
  /**
7311
7321
  * Helper function to get the name of the room as it appears in the STB/XML data.
7312
7322
  *
7323
+ * If you want to get the room name for a specific room type, use the `getRoomTypeName` function.
7324
+ *
7313
7325
  * @param roomGridIndex Optional. Default is the current room index.
7314
7326
  * @returns The room name. Returns undefined if the room data was not found.
7315
7327
  */
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 72.8.0
3
+ isaacscript-common 72.9.1
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -15871,6 +15871,9 @@ end
15871
15871
  function ____exports.asPlayerType(self, num)
15872
15872
  return num
15873
15873
  end
15874
+ function ____exports.asRoomType(self, num)
15875
+ return num
15876
+ end
15874
15877
  function ____exports.asString(self, str)
15875
15878
  return str
15876
15879
  end
@@ -27333,8 +27336,8 @@ local ____exports = {}
27333
27336
  local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
27334
27337
  local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
27335
27338
  ____exports.ROOM_TYPE_NAMES = {
27336
- [RoomType.DEFAULT] = "default room",
27337
- [RoomType.SHOP] = "shop",
27339
+ [RoomType.DEFAULT] = "Default Room",
27340
+ [RoomType.SHOP] = "Shop",
27338
27341
  [RoomType.ERROR] = "I AM ERROR Room",
27339
27342
  [RoomType.TREASURE] = "Treasure Room",
27340
27343
  [RoomType.BOSS] = "Boss Room",
@@ -70,11 +70,15 @@ export declare function getRoomListIndex(roomGridIndex?: int): int;
70
70
  *
71
71
  * (The version of the function without any arguments will not return undefined since the current
72
72
  * room is guaranteed to have data.)
73
+ *
74
+ * If you want to get the room name for a specific room type, use the `getRoomTypeName` function.
73
75
  */
74
76
  export declare function getRoomName(): string;
75
77
  /**
76
78
  * Helper function to get the name of the room as it appears in the STB/XML data.
77
79
  *
80
+ * If you want to get the room name for a specific room type, use the `getRoomTypeName` function.
81
+ *
78
82
  * @param roomGridIndex Optional. Default is the current room index.
79
83
  * @returns The room name. Returns undefined if the room data was not found.
80
84
  */
@@ -1 +1 @@
1
- {"version":3,"file":"roomData.d.ts","sourceRoot":"","sources":["../../../src/functions/roomData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,OAAO,EACR,MAAM,8BAA8B,CAAC;AAMtC;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC,QAAQ,CAAC,CAgBtE;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,IAAI,UAAU,CAAC;AAE1C;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,UAAU,GAAG,SAAS,CAAC;AAOzE;;;;GAIG;AACH,wBAAgB,i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a,CAAC,EAAE,GAAG,GAAG,SAAS,GAAG,SAAS,CAAC;AAOzE;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAAC;AAE1C;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,OAAO,GAAG,SAAS,CAAC;AAOzE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,IAAI,GAAG,CAAC;AAEtC;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,SAAS,CAAC;AAOrE;;;;;;;;GAQG;AACH,wBAAgB,WAAW,IAAI,QAAQ,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,QAAQ,GAAG,SAAS,CAAC;AAavE;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,IAAI,GAAG,CAAC;AAEtC;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,SAAS,CAAC;AAOrE;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,CAAC,EAAE,GAAG,GAAG,GAAG,CAG5D;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,aAAa,EAAE,GAAG,EAAE,QAAQ,EAAE,UAAU,GAAG,IAAI,CAG1E"}
@@ -101,8 +101,12 @@ end
101
101
  --
102
102
  -- (The version of the function without any arguments will not return undefined since the current
103
103
  -- room is guaranteed to have data.)
104
+ --
105
+ -- If you want to get the room name for a specific room type, use the `getRoomTypeName` function.
104
106
  -- Helper function to get the name of the room as it appears in the STB/XML data.
105
107
  --
108
+ -- If you want to get the room name for a specific room type, use the `getRoomTypeName` function.
109
+ --
106
110
  -- @param roomGridIndex Optional. Default is the current room index.
107
111
  -- @returns The room name. Returns undefined if the room data was not found.
108
112
  function ____exports.getRoomName(self, roomGridIndex)
@@ -1,6 +1,6 @@
1
1
  /// <reference types="@typescript-to-lua/language-extensions" />
2
2
  /// <reference types="lua-types/5.3" />
3
- import type { CardType, CollectibleType, LevelStage, NPCState, PillColor, PillEffect, PlayerType, TrinketType } from "isaac-typescript-definitions";
3
+ import type { CardType, CollectibleType, LevelStage, NPCState, PillColor, PillEffect, PlayerType, RoomType, TrinketType } from "isaac-typescript-definitions";
4
4
  /**
5
5
  * Helper function to safely cast an `int` to a `CardType`. (This is better than using the `as`
6
6
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
@@ -71,6 +71,13 @@ export declare function asPillEffect(num: int): PillEffect;
71
71
  * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
72
72
  */
73
73
  export declare function asPlayerType(num: int): PlayerType;
74
+ /**
75
+ * Helper function to safely cast an `int` to a `RoomType`. (This is better than using the `as`
76
+ * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
77
+ *
78
+ * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
79
+ */
80
+ export declare function asRoomType(num: int): RoomType;
74
81
  /**
75
82
  * Helper function to safely cast an enum to a `string`. (This is better than using the `as`
76
83
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/functions/types.ts"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EACV,QAAQ,EACR,eAAe,EACf,UAAU,EACV,QAAQ,EACR,SAAS,EACT,UAAU,EACV,UAAU,EACV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAEtC;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,QAAQ,CAE7C;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,GAAG,GAAG,eAAe,CAE3D;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAE1C;AAED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G,QAAQ,CAE7C;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,GAAG,GAAG,WAAW,CAEnD;AAED,wBAAgB,SAAS,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,OAAO,CAEhE;AAGD,wBAAgB,UAAU,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,QAAQ,CAElE;AAED,wBAAgB,SAAS,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,GAAG,CAM5D;AAED,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,MAAM,CAE9D;AAED,+EAA+E;AAC/E,wBAAgB,WAAW,CACzB,QAAQ,EAAE,OAAO,GAChB,QAAQ,IAAI,OAAO,GAAG,MAAM,GAAG,MAAM,CAOvC;AAED,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,MAAM,CAE9D;AAED,wBAAgB,OAAO,CACrB,QAAQ,EAAE,OAAO,GAChB,QAAQ,IAAI,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAExC;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,WAAW,CAErE"}
@@ -72,6 +72,13 @@ end
72
72
  function ____exports.asPlayerType(self, num)
73
73
  return num
74
74
  end
75
+ --- Helper function to safely cast an `int` to a `RoomType`. (This is better than using the `as`
76
+ -- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
77
+ --
78
+ -- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
79
+ function ____exports.asRoomType(self, num)
80
+ return num
81
+ end
75
82
  --- Helper function to safely cast an enum to a `string`. (This is better than using the `as`
76
83
  -- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
77
84
  --
@@ -1,6 +1,6 @@
1
1
  export declare const ROOM_TYPE_NAMES: {
2
- readonly 1: "default room";
3
- readonly 2: "shop";
2
+ readonly 1: "Default Room";
3
+ readonly 2: "Shop";
4
4
  readonly 3: "I AM ERROR Room";
5
5
  readonly 4: "Treasure Room";
6
6
  readonly 5: "Boss Room";
@@ -2,8 +2,8 @@ local ____exports = {}
2
2
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
3
  local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
4
4
  ____exports.ROOM_TYPE_NAMES = {
5
- [RoomType.DEFAULT] = "default room",
6
- [RoomType.SHOP] = "shop",
5
+ [RoomType.DEFAULT] = "Default Room",
6
+ [RoomType.SHOP] = "Shop",
7
7
  [RoomType.ERROR] = "I AM ERROR Room",
8
8
  [RoomType.TREASURE] = "Treasure Room",
9
9
  [RoomType.BOSS] = "Boss Room",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "72.8.0",
3
+ "version": "72.9.1",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -132,12 +132,16 @@ export function getRoomListIndex(roomGridIndex?: int): int {
132
132
  *
133
133
  * (The version of the function without any arguments will not return undefined since the current
134
134
  * room is guaranteed to have data.)
135
+ *
136
+ * If you want to get the room name for a specific room type, use the `getRoomTypeName` function.
135
137
  */
136
138
  export function getRoomName(): string;
137
139
 
138
140
  /**
139
141
  * Helper function to get the name of the room as it appears in the STB/XML data.
140
142
  *
143
+ * If you want to get the room name for a specific room type, use the `getRoomTypeName` function.
144
+ *
141
145
  * @param roomGridIndex Optional. Default is the current room index.
142
146
  * @returns The room name. Returns undefined if the room data was not found.
143
147
  */
@@ -6,6 +6,7 @@ import type {
6
6
  PillColor,
7
7
  PillEffect,
8
8
  PlayerType,
9
+ RoomType,
9
10
  TrinketType,
10
11
  } from "isaac-typescript-definitions";
11
12
 
@@ -109,6 +110,16 @@ export function asPlayerType(num: int): PlayerType {
109
110
  return num;
110
111
  }
111
112
 
113
+ /**
114
+ * Helper function to safely cast an `int` to a `RoomType`. (This is better than using the `as`
115
+ * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
116
+ *
117
+ * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
118
+ */
119
+ export function asRoomType(num: int): RoomType {
120
+ return num;
121
+ }
122
+
112
123
  /**
113
124
  * Helper function to safely cast an enum to a `string`. (This is better than using the `as`
114
125
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
@@ -1,8 +1,8 @@
1
1
  import { RoomType } from "isaac-typescript-definitions";
2
2
 
3
3
  export const ROOM_TYPE_NAMES = {
4
- [RoomType.DEFAULT]: "default room", // 1
5
- [RoomType.SHOP]: "shop", // 2
4
+ [RoomType.DEFAULT]: "Default Room", // 1
5
+ [RoomType.SHOP]: "Shop", // 2
6
6
  [RoomType.ERROR]: "I AM ERROR Room", // 3
7
7
  [RoomType.TREASURE]: "Treasure Room", // 4
8
8
  [RoomType.BOSS]: "Boss Room", // 5