isaacscript-common 84.2.1 → 84.2.3

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.
Files changed (111) hide show
  1. package/dist/{arrays/cachedEnumValues.d.ts → cachedEnumValues.d.ts} +4 -4
  2. package/dist/cachedEnumValues.d.ts.map +1 -0
  3. package/dist/{arrays/cachedEnumValues.js → cachedEnumValues.js} +5 -5
  4. package/dist/callbacks.js +1 -1
  5. package/dist/callbacks.lua +1 -1
  6. package/dist/classes/callbacks/PostItemDischarge.js +1 -1
  7. package/dist/classes/callbacks/PostItemDischarge.lua +1 -1
  8. package/dist/classes/callbacks/PostKeyboardChanged.js +1 -1
  9. package/dist/classes/callbacks/PostKeyboardChanged.lua +1 -1
  10. package/dist/classes/callbacks/PostPlayerChangeHealth.js +1 -1
  11. package/dist/classes/callbacks/PostPlayerChangeHealth.lua +1 -1
  12. package/dist/classes/callbacks/PostPlayerChangeStat.js +1 -1
  13. package/dist/classes/callbacks/PostPlayerChangeStat.lua +1 -1
  14. package/dist/classes/callbacks/PostTransformation.js +1 -1
  15. package/dist/classes/callbacks/PostTransformation.lua +1 -1
  16. package/dist/classes/callbacks/PreRoomEntitySpawnFilter.d.ts +1 -1
  17. package/dist/classes/features/callbackLogic/PlayerCollectibleDetection.js +1 -1
  18. package/dist/classes/features/callbackLogic/PlayerCollectibleDetection.lua +1 -1
  19. package/dist/classes/features/other/DeployJSONRoom.js +1 -1
  20. package/dist/classes/features/other/DeployJSONRoom.lua +1 -1
  21. package/dist/classes/features/other/ModdedElementSets.js +1 -1
  22. package/dist/classes/features/other/ModdedElementSets.lua +1 -1
  23. package/dist/classes/features/other/customStages/streakText.js +1 -1
  24. package/dist/classes/features/other/customStages/streakText.lua +1 -1
  25. package/dist/classes/features/other/extraConsoleCommands/commands.js +1 -1
  26. package/dist/classes/features/other/extraConsoleCommands/commands.lua +1 -1
  27. package/dist/functions/bitwise.d.ts.map +1 -1
  28. package/dist/functions/bitwise.js +2 -1
  29. package/dist/functions/bitwise.lua +3 -1
  30. package/dist/functions/cards.js +1 -1
  31. package/dist/functions/cards.lua +1 -1
  32. package/dist/functions/doors.d.ts.map +1 -1
  33. package/dist/functions/doors.js +1 -1
  34. package/dist/functions/doors.lua +1 -1
  35. package/dist/functions/enums.d.ts.map +1 -1
  36. package/dist/functions/enums.js +6 -11
  37. package/dist/functions/enums.lua +14 -7
  38. package/dist/functions/gridEntities.js +1 -1
  39. package/dist/functions/gridEntities.lua +1 -1
  40. package/dist/functions/input.js +1 -1
  41. package/dist/functions/input.lua +1 -1
  42. package/dist/functions/itemPool.js +1 -1
  43. package/dist/functions/itemPool.lua +1 -1
  44. package/dist/functions/level.js +1 -1
  45. package/dist/functions/level.lua +1 -1
  46. package/dist/functions/math.d.ts.map +1 -1
  47. package/dist/functions/math.js +2 -1
  48. package/dist/functions/math.lua +3 -2
  49. package/dist/functions/pills.js +1 -1
  50. package/dist/functions/pills.lua +1 -1
  51. package/dist/functions/playerCollectibles.js +1 -1
  52. package/dist/functions/playerCollectibles.lua +1 -1
  53. package/dist/functions/playerTrinkets.js +1 -1
  54. package/dist/functions/playerTrinkets.lua +1 -1
  55. package/dist/functions/pocketItems.js +1 -1
  56. package/dist/functions/pocketItems.lua +1 -1
  57. package/dist/functions/roomData.js +1 -1
  58. package/dist/functions/roomData.lua +1 -1
  59. package/dist/functions/roomShapeWalls.js +1 -1
  60. package/dist/functions/roomShapeWalls.lua +1 -1
  61. package/dist/functions/run.js +1 -1
  62. package/dist/functions/run.lua +1 -1
  63. package/dist/functions/sound.js +1 -1
  64. package/dist/functions/sound.lua +1 -1
  65. package/dist/functions/transformations.js +1 -1
  66. package/dist/functions/transformations.lua +1 -1
  67. package/dist/functions/types.js +1 -1
  68. package/dist/isaacscript-common.lua +1406 -1396
  69. package/dist/objects/itemPoolTypeToCollectibleTypesSet.js +1 -1
  70. package/dist/objects/itemPoolTypeToCollectibleTypesSet.lua +1 -1
  71. package/dist/serialization.js +1 -1
  72. package/dist/serialization.lua +1 -1
  73. package/dist/sets/bossSets.js +1 -1
  74. package/dist/sets/bossSets.lua +1 -1
  75. package/package.json +1 -1
  76. package/src/{arrays/cachedEnumValues.ts → cachedEnumValues.ts} +5 -5
  77. package/src/callbacks.ts +1 -1
  78. package/src/classes/callbacks/PostItemDischarge.ts +1 -1
  79. package/src/classes/callbacks/PostKeyboardChanged.ts +1 -1
  80. package/src/classes/callbacks/PostPlayerChangeHealth.ts +1 -1
  81. package/src/classes/callbacks/PostPlayerChangeStat.ts +1 -1
  82. package/src/classes/callbacks/PostTransformation.ts +1 -1
  83. package/src/classes/features/callbackLogic/PlayerCollectibleDetection.ts +1 -1
  84. package/src/classes/features/other/DeployJSONRoom.ts +1 -1
  85. package/src/classes/features/other/ModdedElementSets.ts +1 -1
  86. package/src/classes/features/other/customStages/streakText.ts +1 -1
  87. package/src/classes/features/other/extraConsoleCommands/commands.ts +1 -1
  88. package/src/functions/bitwise.ts +2 -1
  89. package/src/functions/cards.ts +1 -1
  90. package/src/functions/doors.ts +1 -4
  91. package/src/functions/enums.ts +9 -11
  92. package/src/functions/gridEntities.ts +1 -1
  93. package/src/functions/input.ts +1 -1
  94. package/src/functions/itemPool.ts +1 -1
  95. package/src/functions/level.ts +1 -1
  96. package/src/functions/math.ts +2 -1
  97. package/src/functions/pills.ts +1 -1
  98. package/src/functions/playerCollectibles.ts +1 -1
  99. package/src/functions/playerTrinkets.ts +1 -1
  100. package/src/functions/pocketItems.ts +1 -1
  101. package/src/functions/roomData.ts +1 -1
  102. package/src/functions/roomShapeWalls.ts +1 -1
  103. package/src/functions/run.ts +1 -1
  104. package/src/functions/sound.ts +1 -1
  105. package/src/functions/transformations.ts +1 -1
  106. package/src/functions/types.ts +1 -1
  107. package/src/objects/itemPoolTypeToCollectibleTypesSet.ts +1 -1
  108. package/src/serialization.ts +1 -1
  109. package/src/sets/bossSets.ts +1 -1
  110. package/dist/arrays/cachedEnumValues.d.ts.map +0 -1
  111. /package/dist/{arrays/cachedEnumValues.lua → cachedEnumValues.lua} +0 -0
@@ -1,8 +1,8 @@
1
1
  import { ActiveSlot, BossID, ControllerIndex, DoorSlot, GridEntityType, GridEntityXMLType, ItemConfigCardType, ItemPoolType, Keyboard, PillColor, PlayerForm, PocketItemSlot, RoomShape, SeedEffect, SoundEffect, TrinketSlot } from "isaac-typescript-definitions";
2
- import { HealthType } from "../enums/HealthType";
3
- import { ModCallbackCustom } from "../enums/ModCallbackCustom";
4
- import { PlayerStat } from "../enums/PlayerStat";
5
- import { SerializationBrand } from "../enums/private/SerializationBrand";
2
+ import { HealthType } from "./enums/HealthType";
3
+ import { ModCallbackCustom } from "./enums/ModCallbackCustom";
4
+ import { PlayerStat } from "./enums/PlayerStat";
5
+ import { SerializationBrand } from "./enums/private/SerializationBrand";
6
6
  export declare const ACTIVE_SLOT_VALUES: readonly ActiveSlot[];
7
7
  export declare const BOSS_ID_VALUES: readonly BossID[];
8
8
  export declare const CACHE_FLAG_VALUES: readonly (number & {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cachedEnumValues.d.ts","sourceRoot":"","sources":["../src/cachedEnumValues.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EACV,MAAM,EAEN,eAAe,EACf,QAAQ,EAER,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAElB,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,UAAU,EACV,cAAc,EACd,SAAS,EACT,UAAU,EACV,WAAW,EACX,WAAW,EACZ,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAGxE,eAAO,MAAM,kBAAkB,uBAA4B,CAAC;AAE5D,eAAO,MAAM,cAAc,mBAAwB,CAAC;AAEpD,eAAO,MAAM,iBAAiB;;;;IAA2B,CAAC;AAE1D,eAAO,MAAM,uBAAuB,4BAAiC,CAAC;AAEtE,eAAO,MAAM,qBAAqB;;;;IAA8B,CAAC;AAEjE,eAAO,MAAM,gBAAgB,qBAA0B,CAAC;AAExD,eAAO,MAAM,uBAAuB,2BAAgC,CAAC;AAErE,eAAO,MAAM,2BAA2B,8BAAmC,CAAC;AAE5E,eAAO,MAAM,0BAA0B,8BAAmC,CAAC;AAE3E,eAAO,MAAM,sBAAsB;;;;IAA+B,CAAC;AAEnE,eAAO,MAAM,4BAA4B,+BAAoC,CAAC;AAE9E,eAAO,MAAM,qBAAqB,yBAA8B,CAAC;AAEjE,eAAO,MAAM,eAAe,qBAA0B,CAAC;AAEvD,eAAO,MAAM,kBAAkB,uBAA4B,CAAC;AAE5D,eAAO,MAAM,iBAAiB,sBAA2B,CAAC;AAE1D,eAAO,MAAM,kBAAkB,uBAA4B,CAAC;AAE5D,eAAO,MAAM,uBAAuB,2BAAgC,CAAC;AAErE,eAAO,MAAM,iBAAiB,sBAA2B,CAAC;AAE1D,eAAO,MAAM,YAAY,uBAA4B,CAAC;AAEtD,eAAO,MAAM,0BAA0B,+BAAoC,CAAC;AAE5E,eAAO,MAAM,mBAAmB,wBAA6B,CAAC;AAE9D,eAAO,MAAM,kBAAkB,uBAA4B,CAAC;AAE5D,eAAO,MAAM,mBAAmB,wBAA6B,CAAC"}
@@ -3,11 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.TRINKET_SLOT_VALUES = exports.PLAYER_STAT_VALUES = exports.SOUND_EFFECT_VALUES = exports.SERIALIZATION_BRAND_VALUES = exports.SEED_EFFECTS = exports.ROOM_SHAPE_VALUES = exports.POCKET_ITEM_SLOT_VALUES = exports.PLAYER_FORM_VALUES = exports.PILL_COLOR_VALUES = exports.HEALTH_TYPE_VALUES = exports.KEYBOARD_VALUES = exports.ITEM_POOL_TYPE_VALUES = exports.ITEM_CONFIG_CARD_TYPE_VALUES = exports.ITEM_CONFIG_TAG_VALUES = exports.MOD_CALLBACK_CUSTOM_VALUES = exports.GRID_ENTITY_XML_TYPE_VALUES = exports.GRID_ENTITY_TYPE_VALUES = exports.DOOR_SLOT_VALUES = exports.DOOR_SLOT_FLAG_VALUES = exports.CONTROLLER_INDEX_VALUES = exports.CACHE_FLAG_VALUES = exports.BOSS_ID_VALUES = exports.ACTIVE_SLOT_VALUES = void 0;
5
5
  const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
6
- const HealthType_1 = require("../enums/HealthType");
7
- const ModCallbackCustom_1 = require("../enums/ModCallbackCustom");
8
- const PlayerStat_1 = require("../enums/PlayerStat");
9
- const SerializationBrand_1 = require("../enums/private/SerializationBrand");
10
- const enums_1 = require("../functions/enums");
6
+ const HealthType_1 = require("./enums/HealthType");
7
+ const ModCallbackCustom_1 = require("./enums/ModCallbackCustom");
8
+ const PlayerStat_1 = require("./enums/PlayerStat");
9
+ const SerializationBrand_1 = require("./enums/private/SerializationBrand");
10
+ const enums_1 = require("./functions/enums");
11
11
  exports.ACTIVE_SLOT_VALUES = (0, enums_1.getEnumValues)(isaac_typescript_definitions_1.ActiveSlot);
12
12
  exports.BOSS_ID_VALUES = (0, enums_1.getEnumValues)(isaac_typescript_definitions_1.BossID);
13
13
  exports.CACHE_FLAG_VALUES = (0, enums_1.getEnumValues)(isaac_typescript_definitions_1.CacheFlag);
package/dist/callbacks.js CHANGED
@@ -24,7 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.getCallbacks = void 0;
27
- const cachedEnumValues_1 = require("./arrays/cachedEnumValues");
27
+ const cachedEnumValues_1 = require("./cachedEnumValues");
28
28
  const cc = __importStar(require("./callbackClasses"));
29
29
  const ModCallbackCustom_1 = require("./enums/ModCallbackCustom");
30
30
  const MOD_CALLBACK_CUSTOM_TO_CLASS = {
@@ -1,7 +1,7 @@
1
1
  local ____lualib = require("lualib_bundle")
2
2
  local __TS__New = ____lualib.__TS__New
3
3
  local ____exports = {}
4
- local ____cachedEnumValues = require("arrays.cachedEnumValues")
4
+ local ____cachedEnumValues = require("cachedEnumValues")
5
5
  local MOD_CALLBACK_CUSTOM_VALUES = ____cachedEnumValues.MOD_CALLBACK_CUSTOM_VALUES
6
6
  local cc = require("callbackClasses")
7
7
  local ____ModCallbackCustom = require("enums.ModCallbackCustom")
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PostItemDischarge = void 0;
4
4
  const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
5
- const cachedEnumValues_1 = require("../../arrays/cachedEnumValues");
5
+ const cachedEnumValues_1 = require("../../cachedEnumValues");
6
6
  const cachedClasses_1 = require("../../core/cachedClasses");
7
7
  const ModCallbackCustom_1 = require("../../enums/ModCallbackCustom");
8
8
  const charge_1 = require("../../functions/charge");
@@ -8,7 +8,7 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
8
8
  local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
9
9
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
10
10
  local SuckerVariant = ____isaac_2Dtypescript_2Ddefinitions.SuckerVariant
11
- local ____cachedEnumValues = require("arrays.cachedEnumValues")
11
+ local ____cachedEnumValues = require("cachedEnumValues")
12
12
  local ACTIVE_SLOT_VALUES = ____cachedEnumValues.ACTIVE_SLOT_VALUES
13
13
  local ____cachedClasses = require("core.cachedClasses")
14
14
  local game = ____cachedClasses.game
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PostKeyboardChanged = void 0;
4
4
  const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
5
- const cachedEnumValues_1 = require("../../arrays/cachedEnumValues");
5
+ const cachedEnumValues_1 = require("../../cachedEnumValues");
6
6
  const input_1 = require("../../functions/input");
7
7
  const CustomCallback_1 = require("../private/CustomCallback");
8
8
  const v = {
@@ -7,7 +7,7 @@ local __TS__Iterator = ____lualib.__TS__Iterator
7
7
  local ____exports = {}
8
8
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
9
9
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
10
- local ____cachedEnumValues = require("arrays.cachedEnumValues")
10
+ local ____cachedEnumValues = require("cachedEnumValues")
11
11
  local KEYBOARD_VALUES = ____cachedEnumValues.KEYBOARD_VALUES
12
12
  local ____input = require("functions.input")
13
13
  local isKeyboardPressed = ____input.isKeyboardPressed
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PostPlayerChangeHealth = void 0;
4
- const cachedEnumValues_1 = require("../../arrays/cachedEnumValues");
4
+ const cachedEnumValues_1 = require("../../cachedEnumValues");
5
5
  const ModCallbackCustom_1 = require("../../enums/ModCallbackCustom");
6
6
  const playerHealth_1 = require("../../functions/playerHealth");
7
7
  const playerIndex_1 = require("../../functions/playerIndex");
@@ -4,7 +4,7 @@ local __TS__New = ____lualib.__TS__New
4
4
  local __TS__Class = ____lualib.__TS__Class
5
5
  local __TS__ClassExtends = ____lualib.__TS__ClassExtends
6
6
  local ____exports = {}
7
- local ____cachedEnumValues = require("arrays.cachedEnumValues")
7
+ local ____cachedEnumValues = require("cachedEnumValues")
8
8
  local HEALTH_TYPE_VALUES = ____cachedEnumValues.HEALTH_TYPE_VALUES
9
9
  local ____ModCallbackCustom = require("enums.ModCallbackCustom")
10
10
  local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PostPlayerChangeStat = void 0;
4
- const cachedEnumValues_1 = require("../../arrays/cachedEnumValues");
4
+ const cachedEnumValues_1 = require("../../cachedEnumValues");
5
5
  const ModCallbackCustom_1 = require("../../enums/ModCallbackCustom");
6
6
  const bitSet128_1 = require("../../functions/bitSet128");
7
7
  const color_1 = require("../../functions/color");
@@ -5,7 +5,7 @@ local __TS__Class = ____lualib.__TS__Class
5
5
  local __TS__ClassExtends = ____lualib.__TS__ClassExtends
6
6
  local ____exports = {}
7
7
  local statEquals
8
- local ____cachedEnumValues = require("arrays.cachedEnumValues")
8
+ local ____cachedEnumValues = require("cachedEnumValues")
9
9
  local PLAYER_STAT_VALUES = ____cachedEnumValues.PLAYER_STAT_VALUES
10
10
  local ____ModCallbackCustom = require("enums.ModCallbackCustom")
11
11
  local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PostTransformation = void 0;
4
- const cachedEnumValues_1 = require("../../arrays/cachedEnumValues");
4
+ const cachedEnumValues_1 = require("../../cachedEnumValues");
5
5
  const ModCallbackCustom_1 = require("../../enums/ModCallbackCustom");
6
6
  const playerDataStructures_1 = require("../../functions/playerDataStructures");
7
7
  const DefaultMap_1 = require("../DefaultMap");
@@ -4,7 +4,7 @@ local __TS__New = ____lualib.__TS__New
4
4
  local __TS__Class = ____lualib.__TS__Class
5
5
  local __TS__ClassExtends = ____lualib.__TS__ClassExtends
6
6
  local ____exports = {}
7
- local ____cachedEnumValues = require("arrays.cachedEnumValues")
7
+ local ____cachedEnumValues = require("cachedEnumValues")
8
8
  local PLAYER_FORM_VALUES = ____cachedEnumValues.PLAYER_FORM_VALUES
9
9
  local ____ModCallbackCustom = require("enums.ModCallbackCustom")
10
10
  local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
@@ -4,7 +4,7 @@ import { CustomCallback } from "../private/CustomCallback";
4
4
  type T = ModCallbackCustom.PRE_ROOM_ENTITY_SPAWN_FILTER;
5
5
  export declare class PreRoomEntitySpawnFilter extends CustomCallback<T> {
6
6
  constructor();
7
- protected shouldFire: (fireArgs: [entityTypeOrGridEntityXMLType: EntityType | GridEntityXMLType, variant: int, subType: int, gridIndex: int, initSeed: Seed], optionalArgs: [entityTypeOrGridEntityXMLType?: EntityType | GridEntityXMLType | undefined, variant?: int | undefined, subType?: int | undefined]) => boolean;
7
+ protected shouldFire: (fireArgs: [entityTypeOrGridEntityXMLType: GridEntityXMLType | EntityType, variant: int, subType: int, gridIndex: int, initSeed: Seed], optionalArgs: [entityTypeOrGridEntityXMLType?: GridEntityXMLType | EntityType | undefined, variant?: int | undefined, subType?: int | undefined]) => boolean;
8
8
  private readonly preRoomEntitySpawn;
9
9
  }
10
10
  export {};
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PlayerCollectibleDetection = void 0;
4
4
  const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
5
- const cachedEnumValues_1 = require("../../../arrays/cachedEnumValues");
5
+ const cachedEnumValues_1 = require("../../../cachedEnumValues");
6
6
  const ISCFeature_1 = require("../../../enums/ISCFeature");
7
7
  const ModCallbackCustom_1 = require("../../../enums/ModCallbackCustom");
8
8
  const array_1 = require("../../../functions/array");
@@ -17,7 +17,7 @@ local DamageFlag = ____isaac_2Dtypescript_2Ddefinitions.DamageFlag
17
17
  local ItemType = ____isaac_2Dtypescript_2Ddefinitions.ItemType
18
18
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
19
19
  local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
20
- local ____cachedEnumValues = require("arrays.cachedEnumValues")
20
+ local ____cachedEnumValues = require("cachedEnumValues")
21
21
  local ACTIVE_SLOT_VALUES = ____cachedEnumValues.ACTIVE_SLOT_VALUES
22
22
  local ____ISCFeature = require("enums.ISCFeature")
23
23
  local ISCFeature = ____ISCFeature.ISCFeature
@@ -8,7 +8,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.DeployJSONRoom = void 0;
10
10
  const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
11
- const cachedEnumValues_1 = require("../../../arrays/cachedEnumValues");
11
+ const cachedEnumValues_1 = require("../../../cachedEnumValues");
12
12
  const cachedClasses_1 = require("../../../core/cachedClasses");
13
13
  const decorators_1 = require("../../../decorators");
14
14
  const ISCFeature_1 = require("../../../enums/ISCFeature");
@@ -15,7 +15,7 @@ local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
15
15
  local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
16
16
  local PitfallVariant = ____isaac_2Dtypescript_2Ddefinitions.PitfallVariant
17
17
  local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
18
- local ____cachedEnumValues = require("arrays.cachedEnumValues")
18
+ local ____cachedEnumValues = require("cachedEnumValues")
19
19
  local GRID_ENTITY_XML_TYPE_VALUES = ____cachedEnumValues.GRID_ENTITY_XML_TYPE_VALUES
20
20
  local ____cachedClasses = require("core.cachedClasses")
21
21
  local game = ____cachedClasses.game
@@ -8,7 +8,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.ModdedElementSets = void 0;
10
10
  const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
11
- const cachedEnumValues_1 = require("../../../arrays/cachedEnumValues");
11
+ const cachedEnumValues_1 = require("../../../cachedEnumValues");
12
12
  const cachedClasses_1 = require("../../../core/cachedClasses");
13
13
  const constants_1 = require("../../../core/constants");
14
14
  const constantsVanilla_1 = require("../../../core/constantsVanilla");
@@ -17,7 +17,7 @@ local ItemConfigCardType = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigCardTy
17
17
  local ItemConfigTag = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigTag
18
18
  local PlayerForm = ____isaac_2Dtypescript_2Ddefinitions.PlayerForm
19
19
  local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
20
- local ____cachedEnumValues = require("arrays.cachedEnumValues")
20
+ local ____cachedEnumValues = require("cachedEnumValues")
21
21
  local CACHE_FLAG_VALUES = ____cachedEnumValues.CACHE_FLAG_VALUES
22
22
  local ITEM_CONFIG_CARD_TYPE_VALUES = ____cachedEnumValues.ITEM_CONFIG_CARD_TYPE_VALUES
23
23
  local ITEM_CONFIG_TAG_VALUES = ____cachedEnumValues.ITEM_CONFIG_TAG_VALUES
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.topStreakTextStart = exports.streakTextGetShaderParams = exports.streakTextPostRender = void 0;
4
4
  const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
5
- const cachedEnumValues_1 = require("../../../../arrays/cachedEnumValues");
5
+ const cachedEnumValues_1 = require("../../../../cachedEnumValues");
6
6
  const cachedClasses_1 = require("../../../../core/cachedClasses");
7
7
  const constants_1 = require("../../../../core/constants");
8
8
  const UIStreakAnimation_1 = require("../../../../enums/private/UIStreakAnimation");
@@ -4,7 +4,7 @@ local ____exports = {}
4
4
  local checkEndTopStreakText, trackMapInputPressed, checkStartBottomStreakText, checkEndBottomStreakText, renderStreakText, UI_STREAK_ANIMATION_END_FRAMES, TEXT_STAY_FRAME, TEXT_OUT_FRAME, STREAK_TEXT_BOTTOM_Y_OFFSET, NUM_RENDER_FRAMES_MAP_HELD_BEFORE_STREAK_TEXT, TEXT_IN_ADJUSTMENTS, TEXT_OUT_ADJUSTMENTS, TEXT_IN_SCALES, TEXT_OUT_SCALES
5
5
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
6
6
  local ButtonAction = ____isaac_2Dtypescript_2Ddefinitions.ButtonAction
7
- local ____cachedEnumValues = require("arrays.cachedEnumValues")
7
+ local ____cachedEnumValues = require("cachedEnumValues")
8
8
  local CONTROLLER_INDEX_VALUES = ____cachedEnumValues.CONTROLLER_INDEX_VALUES
9
9
  local ____cachedClasses = require("core.cachedClasses")
10
10
  local fonts = ____cachedClasses.fonts
@@ -5,7 +5,7 @@ exports.getPosition = exports.getCharge = exports.getChallenge = exports.fool =
5
5
  exports.right = exports.reloadRoom = exports.redHearts = exports.position = exports.poopMana = exports.poop = exports.pocket = exports.playSound = exports.planetarium = exports.pills = exports.pill = exports.oneHP = exports.noCurses = exports.music = exports.miniboss = exports.maze = exports.maxHearts = exports.map = exports.mana = exports.luck = exports.lowHP = exports.lost = exports.listGridAll = exports.listGrid = exports.listAll = exports.list = exports.library = exports.left = exports.labyrinth = exports.keys = exports.key = exports.iAmErrorRoom = exports.hush = exports.horse = exports.hitboxes = exports.hearts = exports.gridEntities = exports.gridCosts = exports.grid2 = exports.grid = exports.goldenTrinket = exports.goldenKey = exports.goldenHearts = exports.goldenBomb = exports.goldTrinket = exports.goldKey = exports.goldHearts = exports.goldBomb = exports.gigaBomb = exports.giant = void 0;
6
6
  exports.xl = exports.warp = exports.up = exports.unseed = exports.unknown = exports.ultraSecretRoom = exports.trinket = exports.treasureRoom = exports.trapdoor = exports.tests = exports.tears = exports.superSecretRoom = exports.startingRoom = exports.startRoom = exports.spikes = exports.speed = exports.spawnTrinketAt = exports.spawnTrinket = exports.spawnGoldenTrinketAt = exports.spawnGoldenTrinket = exports.spawnGoldTrinket = exports.spawnCollectibleAt = exports.spawnCollectible = exports.spam = exports.sounds = exports.sound = exports.soulHearts = exports.soulCharges = exports.smelt = exports.shop = exports.setPosition = exports.setCharges = exports.seeds = exports.seedStick = exports.secretShop = exports.secretRoom = exports.sacrificeRoom = exports.s = exports.runTests = exports.rottenHearts = exports.room = void 0;
7
7
  const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
8
- const cachedEnumValues_1 = require("../../../../arrays/cachedEnumValues");
8
+ const cachedEnumValues_1 = require("../../../../cachedEnumValues");
9
9
  const cachedClasses_1 = require("../../../../core/cachedClasses");
10
10
  const constants_1 = require("../../../../core/constants");
11
11
  const constantsFirstLast_1 = require("../../../../core/constantsFirstLast");
@@ -20,7 +20,7 @@ local PocketItemSlot = ____isaac_2Dtypescript_2Ddefinitions.PocketItemSlot
20
20
  local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
21
21
  local SoundEffect = ____isaac_2Dtypescript_2Ddefinitions.SoundEffect
22
22
  local StageType = ____isaac_2Dtypescript_2Ddefinitions.StageType
23
- local ____cachedEnumValues = require("arrays.cachedEnumValues")
23
+ local ____cachedEnumValues = require("cachedEnumValues")
24
24
  local GRID_ENTITY_TYPE_VALUES = ____cachedEnumValues.GRID_ENTITY_TYPE_VALUES
25
25
  local ____cachedClasses = require("core.cachedClasses")
26
26
  local game = ____cachedClasses.game
@@ -1 +1 @@
1
- {"version":3,"file":"bitwise.d.ts","sourceRoot":"","sources":["../../src/functions/bitwise.ts"],"names":[],"mappings":";;;;AAGA,+EAA+E;AAC/E,wBAAgB,eAAe,CAAC,CAAC,SAAS,OAAO,GAAG,UAAU,EAC5D,KAAK,EAAE,SAAS,CAAC,EAAE,GAClB,QAAQ,CAAC,CAAC,CAAC,CAOb;AAED,mFAAmF;AACnF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,SAAS,GAAG,EAAE,GAAG,MAAM,CAGnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,MAAM,EACX,SAAS,CAAC,EAAE,GAAG,GACd,SAAS,GAAG,EAAE,CAqBhB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CAS1C;AAED,iGAAiG;AACjG,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,GAAG,GAAG,CAE9C;AAED,wFAAwF;AACxF,wBAAgB,aAAa,CAAC,CAAC,EAAE,GAAG,GAAG,GAAG,CAQzC;AAED,+EAA+E;AAC/E,wBAAgB,aAAa,CAAC,CAAC,SAAS,OAAO,GAAG,UAAU,EAC1D,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC,GAClB,QAAQ,CAAC,CAAC,CAAC,CAOb"}
1
+ {"version":3,"file":"bitwise.d.ts","sourceRoot":"","sources":["../../src/functions/bitwise.ts"],"names":[],"mappings":";;;;AAIA,+EAA+E;AAC/E,wBAAgB,eAAe,CAAC,CAAC,SAAS,OAAO,GAAG,UAAU,EAC5D,KAAK,EAAE,SAAS,CAAC,EAAE,GAClB,QAAQ,CAAC,CAAC,CAAC,CAOb;AAED,mFAAmF;AACnF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,SAAS,GAAG,EAAE,GAAG,MAAM,CAGnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,MAAM,EACX,SAAS,CAAC,EAAE,GAAG,GACd,SAAS,GAAG,EAAE,CAqBhB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CAS1C;AAED,iGAAiG;AACjG,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,GAAG,GAAG,CAE9C;AAED,wFAAwF;AACxF,wBAAgB,aAAa,CAAC,CAAC,EAAE,GAAG,GAAG,GAAG,CAQzC;AAED,+EAA+E;AAC/E,wBAAgB,aAAa,CAAC,CAAC,SAAS,OAAO,GAAG,UAAU,EAC1D,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC,GAClB,QAAQ,CAAC,CAAC,CAAC,CAOb"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.setToBitFlags = exports.getNumBitsOfN = exports.getKBitOfN = exports.countSetBits = exports.convertDecimalToBinary = exports.convertBinaryToDecimal = exports.arrayToBitFlags = void 0;
4
4
  const flag_1 = require("./flag");
5
+ const types_1 = require("./types");
5
6
  const utils_1 = require("./utils");
6
7
  /** Helper function to convert a set of flags to a single `BitFlags` object. */
7
8
  function arrayToBitFlags(array) {
@@ -31,7 +32,7 @@ function convertDecimalToBinary(num, minLength) {
31
32
  const bits = [];
32
33
  const bitsString = num.toString(2);
33
34
  for (const bitString of bitsString) {
34
- const bit = tonumber(bitString);
35
+ const bit = (0, types_1.parseIntSafe)(bitString);
35
36
  (0, utils_1.assertDefined)(bit, `Failed to convert the following number to binary: ${num}`);
36
37
  bits.push(bit);
37
38
  }
@@ -6,6 +6,8 @@ local __TS__ArrayUnshift = ____lualib.__TS__ArrayUnshift
6
6
  local ____exports = {}
7
7
  local ____flag = require("functions.flag")
8
8
  local addFlag = ____flag.addFlag
9
+ local ____types = require("functions.types")
10
+ local parseIntSafe = ____types.parseIntSafe
9
11
  local ____utils = require("functions.utils")
10
12
  local assertDefined = ____utils.assertDefined
11
13
  --- Helper function to convert a set of flags to a single `BitFlags` object.
@@ -32,7 +34,7 @@ function ____exports.convertDecimalToBinary(self, num, minLength)
32
34
  local bits = {}
33
35
  local bitsString = __TS__NumberToString(num, 2)
34
36
  for ____, bitString in __TS__Iterator(bitsString) do
35
- local bit = tonumber(bitString)
37
+ local bit = parseIntSafe(nil, bitString)
36
38
  assertDefined(
37
39
  nil,
38
40
  bit,
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useCardTemp = exports.isVanillaCardType = exports.isValidCardType = exports.isTarotCard = exports.isSuitCard = exports.isSpecialCard = exports.isRune = exports.isReverseTarotCard = exports.isPocketItemObject = exports.isModdedCardType = exports.isCardType = exports.isCard = exports.hasCard = exports.getItemConfigCardType = exports.getCardName = exports.getCardDescription = void 0;
4
4
  const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
5
- const cachedEnumValues_1 = require("../arrays/cachedEnumValues");
5
+ const cachedEnumValues_1 = require("../cachedEnumValues");
6
6
  const cachedClasses_1 = require("../core/cachedClasses");
7
7
  const constantsFirstLast_1 = require("../core/constantsFirstLast");
8
8
  const cardDescriptions_1 = require("../objects/cardDescriptions");
@@ -6,7 +6,7 @@ local ____exports = {}
6
6
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
7
7
  local ItemConfigCardType = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigCardType
8
8
  local UseFlag = ____isaac_2Dtypescript_2Ddefinitions.UseFlag
9
- local ____cachedEnumValues = require("arrays.cachedEnumValues")
9
+ local ____cachedEnumValues = require("cachedEnumValues")
10
10
  local POCKET_ITEM_SLOT_VALUES = ____cachedEnumValues.POCKET_ITEM_SLOT_VALUES
11
11
  local ____cachedClasses = require("core.cachedClasses")
12
12
  local itemConfig = ____cachedClasses.itemConfig
@@ -1 +1 @@
1
- {"version":3,"file":"doors.d.ts","sourceRoot":"","sources":["../../src/functions/doors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EACZ,SAAS,EACV,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,QAAQ,EAKR,QAAQ,EACT,MAAM,8BAA8B,CAAC;AAwBtC,wBAAgB,aAAa,IAAI,IAAI,CAIpC;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAKxD;AAED,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,YAAY,GAAG,QAAQ,CAG3E;AAED,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,QAAQ,CAAC,YAAY,CAAC,GACpC,SAAS,QAAQ,EAAE,CAWrB;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAEjE;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,QAAQ,GAAG,YAAY,CAEvE;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,SAAS,QAAQ,EAAE,GAAG,WAAW,CAAC,QAAQ,CAAC,GACrD,QAAQ,CAAC,YAAY,CAAC,CAYxB;AAED,wBAAgB,gBAAgB,IAAI,cAAc,GAAG,SAAS,CAG7D;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,IAAI,cAAc,GAAG,SAAS,CAG5D;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,I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-2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.removeDoors = exports.removeDoor = exports.removeAllDoors = exports.openDoorFast = exports.openAllDoors = exports.lockDoor = exports.isVoidDoor = exports.isSecretRoomDoor = exports.isRepentanceDoor = exports.isMegaSatanDoor = exports.isHiddenSecretRoomDoor = exports.isDoorToMomsHeart = exports.isDoorToMines = exports.isDoorToMausoleumAscent = exports.isDoorToMausoleum = exports.isDoorToDownpour = exports.isDoorSlotInRoomShape = exports.isDevilRoomDoor = exports.isBossRushDoor = exports.isBlueWombDoor = exports.isAngelRoomDoor = exports.hasUnusedDoorSlot = exports.hasDoorType = exports.getVoidDoor = exports.getUnusedDoorSlots = exports.getRoomShapeDoorSlotCoordinates = exports.getRoomShapeDoorSlot = exports.getRepentanceDoor = exports.getOppositeDoorSlot = exports.getMegaSatanDoor = exports.getDoorsToRoomIndex = exports.getDoors = exports.getDoorSlotsForRoomShape = exports.getDoorSlotEnterPositionOffset = exports.getDoorSlotEnterPosition = exports.getDoorEnterPosition = exports.getDevilRoomOrAngelRoomDoor = exports.getDevilRoomDoor = exports.getBossRushDoor = exports.getBlueWombDoor = exports.getAngelRoomDoor = exports.doorSlotsToDoorSlotFlags = exports.doorSlotToDoorSlotFlag = exports.doorSlotToDirection = exports.doorSlotFlagsToDoorSlots = exports.doorSlotFlagToDoorSlot = exports.closeDoorFast = exports.closeAllDoors = void 0;
4
4
  const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
5
- const cachedEnumValues_1 = require("../arrays/cachedEnumValues");
5
+ const cachedEnumValues_1 = require("../cachedEnumValues");
6
6
  const cachedClasses_1 = require("../core/cachedClasses");
7
7
  const constants_1 = require("../core/constants");
8
8
  const doorSlotFlagToDoorSlot_1 = require("../objects/doorSlotFlagToDoorSlot");
@@ -16,7 +16,7 @@ local DoorVariant = ____isaac_2Dtypescript_2Ddefinitions.DoorVariant
16
16
  local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
17
17
  local GridRoom = ____isaac_2Dtypescript_2Ddefinitions.GridRoom
18
18
  local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
19
- local ____cachedEnumValues = require("arrays.cachedEnumValues")
19
+ local ____cachedEnumValues = require("cachedEnumValues")
20
20
  local DOOR_SLOT_FLAG_VALUES = ____cachedEnumValues.DOOR_SLOT_FLAG_VALUES
21
21
  local DOOR_SLOT_VALUES = ____cachedEnumValues.DOOR_SLOT_VALUES
22
22
  local ____cachedClasses = require("core.cachedClasses")
@@ -1 +1 @@
1
- {"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../src/functions/enums.ts"],"names":[],"mappings":";;;;;AAMA;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CACjC,MAAM,EACN,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CACvC,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,cAAc,EACrD,cAAc,EAAE,CAAC,GAChB,aAAa,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAmBjD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,WAAW,CAAC,cAAc,EAAE,cAAc,GAAG,SAAS,MAAM,EAAE,CAG7E;AAED,sEAAsE;AACtE,wBAAgB,aAAa,CAAC,cAAc,EAAE,cAAc,GAAG,GAAG,CAGjE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAC1B,cAAc,EAAE,cAAc,GAC7B,SAAS,MAAM,EAAE,CAanB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,cAAc,EACpD,cAAc,EAAE,CAAC,GAChB,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAG3B;AAED;;;;;;;GAOG;AACH,wBAAgB,mBA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CAGZ;AAED,oFAAoF;AACpF,wBAAgB,WAAW,CAAC,CAAC,SAAS,cAAc,EAClD,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,EAC7C,cAAc,EAAE,CAAC,GAChB,KAAK,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAGrB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAChC,kBAAkB,EAAE,MAAM,EAC1B,cAAc,EAAE,cAAc,GAC7B,IAAI,CAQN;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,cAAc,EAC7D,kBAAkB,EAAE,MAAM,EAC1B,cAAc,EAAE,CAAC,GAChB,IAAI,CAsBN;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,4BAA4B,CAE1C,CAAC,SAAS,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,EAC/B,IAAI,SAAS,MAAM,GAAG,MAAM,KACzB,IAAI,CAAG"}
@@ -25,19 +25,14 @@ const utils_1 = require("./utils");
25
25
  * https://isaacscript.github.io/main/gotchas#iterating-over-enums
26
26
  */
27
27
  function getEnumEntries(transpiledEnum) {
28
- // The values cannot simply be type `T` due to the special construction of bit flag enums.
29
- const enumEntries = [];
30
- for (const [key, value] of pairs(transpiledEnum)) {
31
- // Ignore the reverse mappings created by TypeScriptToLua. Note that reverse mappings are not
32
- // created for string enums.
33
- if ((0, types_1.isString)(key)) {
34
- enumEntries.push([key, value]);
35
- }
36
- }
28
+ const entries = Object.entries(transpiledEnum);
29
+ const numberEntries = entries.filter(([_key, value]) => typeof value === "number");
30
+ // If there are no number values, then this must be a string enum, and no filtration is required.
31
+ const entriesToReturn = numberEntries.length > 0 ? numberEntries : entries;
37
32
  // The enums will be in a random order (because of "pairs"), so sort them based on the values.
38
33
  // https://stackoverflow.com/questions/5199901/how-to-sort-an-associative-array-by-its-values-in-javascript
39
- enumEntries.sort(([_key1, value1], [_key2, value2]) => value1 < value2 ? -1 : value1 > value2 ? 1 : 0);
40
- return enumEntries;
34
+ entriesToReturn.sort(([_key1, value1], [_key2, value2]) => value1 < value2 ? -1 : value1 > value2 ? 1 : 0);
35
+ return entriesToReturn;
41
36
  }
42
37
  exports.getEnumEntries = getEnumEntries;
43
38
  /**
@@ -1,4 +1,6 @@
1
1
  local ____lualib = require("lualib_bundle")
2
+ local __TS__ObjectEntries = ____lualib.__TS__ObjectEntries
3
+ local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
2
4
  local __TS__ArraySort = ____lualib.__TS__ArraySort
3
5
  local __TS__ArrayMap = ____lualib.__TS__ArrayMap
4
6
  local __TS__ArrayToSorted = ____lualib.__TS__ArrayToSorted
@@ -35,14 +37,19 @@ local iRange = ____utils.iRange
35
37
  -- For a more in depth explanation, see:
36
38
  -- https://isaacscript.github.io/main/gotchas#iterating-over-enums
37
39
  function ____exports.getEnumEntries(self, transpiledEnum)
38
- local enumEntries = {}
39
- for key, value in pairs(transpiledEnum) do
40
- if isString(nil, key) then
41
- enumEntries[#enumEntries + 1] = {key, value}
40
+ local entries = __TS__ObjectEntries(transpiledEnum)
41
+ local numberEntries = __TS__ArrayFilter(
42
+ entries,
43
+ function(____, ____bindingPattern0)
44
+ local value
45
+ local _key = ____bindingPattern0[1]
46
+ value = ____bindingPattern0[2]
47
+ return type(value) == "number"
42
48
  end
43
- end
49
+ )
50
+ local entriesToReturn = #numberEntries > 0 and numberEntries or entries
44
51
  __TS__ArraySort(
45
- enumEntries,
52
+ entriesToReturn,
46
53
  function(____, ____bindingPattern0, ____bindingPattern1)
47
54
  local value1
48
55
  local _key1 = ____bindingPattern0[1]
@@ -53,7 +60,7 @@ function ____exports.getEnumEntries(self, transpiledEnum)
53
60
  return value1 < value2 and -1 or (value1 > value2 and 1 or 0)
54
61
  end
55
62
  )
56
- return enumEntries
63
+ return entriesToReturn
57
64
  end
58
65
  --- TypeScriptToLua will transpile TypeScript number enums to Lua tables that have a double mapping.
59
66
  -- Thus, when you iterate over them, you will get both the names of the enums and the values of the
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.spawnVoidPortal = exports.spawnGridEntityWithVariant = exports.spawnGridEntity = exports.spawnGiantPoop = exports.setGridEntityType = exports.setGridEntityInvisible = exports.removeGridEntity = exports.removeGridEntities = exports.removeEntitiesSpawnedFromGridEntity = exports.removeAllMatchingGridEntities = exports.removeAllGridEntitiesExcept = exports.isPostBossVoidPortal = exports.isPoopGridEntityXMLType = exports.isGridIndexAdjacentToDoor = exports.isGridEntityXMLType = exports.isGridEntityBroken = exports.isGridEntityBreakableByExplosion = exports.getTopLeftWallGridIndex = exports.getTopLeftWall = exports.getSurroundingGridIndexes = exports.getSurroundingGridEntities = exports.getRockPNGPath = exports.getMatchingGridEntities = exports.getGridEntityIDFromConstituents = exports.getGridEntityID = exports.getGridEntityCollisionPoints = exports.getGridEntityANM2Path = exports.getGridEntitiesMap = exports.getGridEntitiesInRadius = exports.getGridEntitiesExcept = exports.getGridEntities = exports.getConstituentsFromGridEntityID = exports.getCollidingEntitiesWithGridEntity = exports.getAllGridIndexes = exports.doesGridEntityExist = exports.convertXMLGridEntityType = void 0;
4
4
  const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
5
- const cachedEnumValues_1 = require("../arrays/cachedEnumValues");
5
+ const cachedEnumValues_1 = require("../cachedEnumValues");
6
6
  const cachedClasses_1 = require("../core/cachedClasses");
7
7
  const constants_1 = require("../core/constants");
8
8
  const gridEntityTypeToBrokenStateMap_1 = require("../maps/gridEntityTypeToBrokenStateMap");
@@ -15,7 +15,7 @@ local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
15
15
  local PoopGridEntityVariant = ____isaac_2Dtypescript_2Ddefinitions.PoopGridEntityVariant
16
16
  local StatueVariant = ____isaac_2Dtypescript_2Ddefinitions.StatueVariant
17
17
  local TrapdoorVariant = ____isaac_2Dtypescript_2Ddefinitions.TrapdoorVariant
18
- local ____cachedEnumValues = require("arrays.cachedEnumValues")
18
+ local ____cachedEnumValues = require("cachedEnumValues")
19
19
  local GRID_ENTITY_XML_TYPE_VALUES = ____cachedEnumValues.GRID_ENTITY_XML_TYPE_VALUES
20
20
  local ____cachedClasses = require("core.cachedClasses")
21
21
  local game = ____cachedClasses.game
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.keyboardToString = exports.isShootActionTriggeredOnAnyInput = exports.isShootActionTriggered = exports.isShootActionPressedOnAnyInput = exports.isShootActionPressed = exports.isShootAction = exports.isMoveActionTriggeredOnAnyInput = exports.isMoveActionTriggered = exports.isMoveActionPressedOnAnyInput = exports.isMoveActionPressed = exports.isMoveAction = exports.isModifierKeyPressed = exports.isKeyboardPressed = exports.isActionTriggeredOnAnyInput = exports.isActionTriggered = exports.isActionPressedOnAnyInput = exports.isActionPressed = exports.getShootButtonActions = exports.getMoveButtonActions = exports.controllerToString = exports.SHOOTING_BUTTON_ACTIONS_SET = exports.SHOOTING_BUTTON_ACTIONS = exports.MOVEMENT_BUTTON_ACTIONS_SET = exports.MOVEMENT_BUTTON_ACTIONS = exports.MODIFIER_KEYS = void 0;
4
4
  const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
5
- const cachedEnumValues_1 = require("../arrays/cachedEnumValues");
5
+ const cachedEnumValues_1 = require("../cachedEnumValues");
6
6
  const keyboardToStringMap_1 = require("../maps/keyboardToStringMap");
7
7
  const ReadonlySet_1 = require("../types/ReadonlySet");
8
8
  const string_1 = require("./string");
@@ -8,7 +8,7 @@ local ButtonAction = ____isaac_2Dtypescript_2Ddefinitions.ButtonAction
8
8
  local Controller = ____isaac_2Dtypescript_2Ddefinitions.Controller
9
9
  local ControllerIndex = ____isaac_2Dtypescript_2Ddefinitions.ControllerIndex
10
10
  local Keyboard = ____isaac_2Dtypescript_2Ddefinitions.Keyboard
11
- local ____cachedEnumValues = require("arrays.cachedEnumValues")
11
+ local ____cachedEnumValues = require("cachedEnumValues")
12
12
  local CONTROLLER_INDEX_VALUES = ____cachedEnumValues.CONTROLLER_INDEX_VALUES
13
13
  local ____keyboardToStringMap = require("maps.keyboardToStringMap")
14
14
  local KEYBOARD_TO_STRING_MAP = ____keyboardToStringMap.KEYBOARD_TO_STRING_MAP
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.removeTrinketFromPools = exports.removeCollectibleFromPools = exports.isCollectibleTypeInDefaultItemPool = exports.getRandomItemPool = exports.getItemPoolName = exports.getDefaultItemPoolsForCollectibleType = exports.getDefaultCollectibleTypesInItemPool = void 0;
4
4
  const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
5
- const cachedEnumValues_1 = require("../arrays/cachedEnumValues");
5
+ const cachedEnumValues_1 = require("../cachedEnumValues");
6
6
  const cachedClasses_1 = require("../core/cachedClasses");
7
7
  const itemPoolTypeToItemPoolName_1 = require("../maps/itemPoolTypeToItemPoolName");
8
8
  const itemPoolTypeToCollectibleTypesSet_1 = require("../objects/itemPoolTypeToCollectibleTypesSet");
@@ -5,7 +5,7 @@ local __TS__SparseArraySpread = ____lualib.__TS__SparseArraySpread
5
5
  local ____exports = {}
6
6
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
7
7
  local ItemPoolType = ____isaac_2Dtypescript_2Ddefinitions.ItemPoolType
8
- local ____cachedEnumValues = require("arrays.cachedEnumValues")
8
+ local ____cachedEnumValues = require("cachedEnumValues")
9
9
  local ITEM_POOL_TYPE_VALUES = ____cachedEnumValues.ITEM_POOL_TYPE_VALUES
10
10
  local ____cachedClasses = require("core.cachedClasses")
11
11
  local game = ____cachedClasses.game
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.levelHasRoomType = exports.levelHasBossID = exports.getLevelBossIDs = exports.fillLevelWithRedRooms = void 0;
4
4
  const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
5
- const cachedEnumValues_1 = require("../arrays/cachedEnumValues");
5
+ const cachedEnumValues_1 = require("../cachedEnumValues");
6
6
  const cachedClasses_1 = require("../core/cachedClasses");
7
7
  const array_1 = require("./array");
8
8
  const levelGrid_1 = require("./levelGrid");
@@ -6,7 +6,7 @@ local ____exports = {}
6
6
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
7
7
  local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
8
8
  local StageID = ____isaac_2Dtypescript_2Ddefinitions.StageID
9
- local ____cachedEnumValues = require("arrays.cachedEnumValues")
9
+ local ____cachedEnumValues = require("cachedEnumValues")
10
10
  local DOOR_SLOT_VALUES = ____cachedEnumValues.DOOR_SLOT_VALUES
11
11
  local ____cachedClasses = require("core.cachedClasses")
12
12
  local game = ____cachedClasses.game
@@ -1 +1 @@
1
- {"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../src/functions/math.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAGzD;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,GAAG,CAEvD;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAG,KAAK,CAGtE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,KAAK,EACb,SAAS,EAAE,GAAG,EACd,WAAW,SAAI,EACf,WAAW,SAAI,EACf,gBAAgB,YAAe,GAC9B,aAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAajC;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,GAClB,OAAO,CAOT;AAED;;GAEG;AACH,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E,GAAG,EAAE,GAAG,CAAC,CAAC,CAuB9C;AAED,wBAAgB,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAEtC"}
@@ -95,7 +95,8 @@ exports.lerpAngleDegrees = lerpAngleDegrees;
95
95
  * @param numDecimalPlaces Optional. Default is 0.
96
96
  */
97
97
  function round(num, numDecimalPlaces = 0) {
98
- const roundedNum = tonumber(string.format(`%.${numDecimalPlaces}f`, num));
98
+ const roundedString = string.format(`%.${numDecimalPlaces}f`, num);
99
+ const roundedNum = tonumber(roundedString);
99
100
  return roundedNum ?? 0;
100
101
  }
101
102
  exports.round = round;
@@ -96,10 +96,11 @@ function ____exports.round(self, num, numDecimalPlaces)
96
96
  if numDecimalPlaces == nil then
97
97
  numDecimalPlaces = 0
98
98
  end
99
- local roundedNum = tonumber(string.format(
99
+ local roundedString = string.format(
100
100
  ("%." .. tostring(numDecimalPlaces)) .. "f",
101
101
  num
102
- ))
102
+ )
103
+ local roundedNum = tonumber(roundedString)
103
104
  return roundedNum or 0
104
105
  end
105
106
  ---