isaacscript-common 7.5.0 → 7.6.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.
Files changed (86) hide show
  1. package/dist/classes/DefaultMap.d.ts +3 -2
  2. package/dist/classes/DefaultMap.d.ts.map +1 -1
  3. package/dist/classes/DefaultMap.lua +2 -1
  4. package/dist/features/customGridEntity.d.ts +6 -3
  5. package/dist/features/customGridEntity.d.ts.map +1 -1
  6. package/dist/features/customGridEntity.lua +20 -11
  7. package/dist/features/customStage/customStageConstants.d.ts +1 -0
  8. package/dist/features/customStage/customStageConstants.d.ts.map +1 -1
  9. package/dist/features/customStage/customStageConstants.lua +1 -0
  10. package/dist/features/customStage/customStageGridEntities.d.ts.map +1 -1
  11. package/dist/features/customStage/customStageGridEntities.lua +9 -5
  12. package/dist/features/customStage/customStageUtils.d.ts +2 -1
  13. package/dist/features/customStage/customStageUtils.d.ts.map +1 -1
  14. package/dist/features/customStage/customStageUtils.lua +40 -1
  15. package/dist/features/customStage/exports.d.ts +1 -25
  16. package/dist/features/customStage/exports.d.ts.map +1 -1
  17. package/dist/features/customStage/exports.lua +28 -29
  18. package/dist/features/customStage/init.d.ts.map +1 -1
  19. package/dist/features/customStage/init.lua +3 -1
  20. package/dist/features/customStage/v.d.ts +0 -2
  21. package/dist/features/customStage/v.d.ts.map +1 -1
  22. package/dist/features/customStage/v.lua +0 -2
  23. package/dist/features/customStage/versusScreen.d.ts.map +1 -1
  24. package/dist/features/customStage/versusScreen.lua +80 -60
  25. package/dist/features/customTrapdoor/exports.d.ts +28 -16
  26. package/dist/features/customTrapdoor/exports.d.ts.map +1 -1
  27. package/dist/features/customTrapdoor/exports.lua +45 -61
  28. package/dist/features/customTrapdoor/init.d.ts.map +1 -1
  29. package/dist/features/customTrapdoor/init.lua +12 -10
  30. package/dist/features/customTrapdoor/spawn.d.ts +6 -0
  31. package/dist/features/customTrapdoor/spawn.d.ts.map +1 -0
  32. package/dist/features/customTrapdoor/spawn.lua +51 -0
  33. package/dist/features/customTrapdoor/v.d.ts +2 -2
  34. package/dist/features/customTrapdoor/v.d.ts.map +1 -1
  35. package/dist/functions/doors.d.ts +6 -5
  36. package/dist/functions/doors.d.ts.map +1 -1
  37. package/dist/functions/doors.lua +25 -12
  38. package/dist/functions/enums.d.ts +3 -3
  39. package/dist/functions/enums.lua +3 -3
  40. package/dist/functions/players.d.ts.map +1 -1
  41. package/dist/functions/players.lua +3 -2
  42. package/dist/index.d.ts +172 -11145
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.lua +4 -4
  45. package/dist/interfaces/{CustomStageLua.d.ts → CustomStageTSConfig.d.ts} +87 -61
  46. package/dist/interfaces/CustomStageTSConfig.d.ts.map +1 -0
  47. package/dist/interfaces/{CustomStageLua.lua → CustomStageTSConfig.lua} +0 -0
  48. package/dist/interfaces/GridEntityCustomData.d.ts +2 -2
  49. package/dist/interfaces/GridEntityCustomData.d.ts.map +1 -1
  50. package/dist/interfaces/JSONRoomsFile.d.ts +6 -5
  51. package/dist/interfaces/JSONRoomsFile.d.ts.map +1 -1
  52. package/dist/interfaces/private/CustomStage.d.ts +1 -1
  53. package/dist/interfaces/private/CustomStage.d.ts.map +1 -1
  54. package/dist/interfaces/private/CustomTrapdoorDescription.d.ts +2 -2
  55. package/dist/interfaces/private/CustomTrapdoorDescription.d.ts.map +1 -1
  56. package/dist/interfaces/private/CustomTrapdoorDestination.d.ts +14 -0
  57. package/dist/interfaces/private/CustomTrapdoorDestination.d.ts.map +1 -0
  58. package/dist/{types/TrapdoorDestination.lua → interfaces/private/CustomTrapdoorDestination.lua} +0 -0
  59. package/package.json +1 -1
  60. package/src/classes/DefaultMap.ts +3 -2
  61. package/src/features/customGridEntity.ts +30 -20
  62. package/src/features/customStage/customStageConstants.ts +2 -0
  63. package/src/features/customStage/customStageGridEntities.ts +20 -16
  64. package/src/features/customStage/customStageUtils.ts +52 -1
  65. package/src/features/customStage/exports.ts +33 -45
  66. package/src/features/customStage/init.ts +3 -2
  67. package/src/features/customStage/v.ts +0 -6
  68. package/src/features/customStage/versusScreen.ts +78 -57
  69. package/src/features/customTrapdoor/exports.ts +60 -66
  70. package/src/features/customTrapdoor/init.ts +12 -11
  71. package/src/features/customTrapdoor/spawn.ts +53 -0
  72. package/src/features/customTrapdoor/v.ts +2 -2
  73. package/src/functions/doors.ts +37 -21
  74. package/src/functions/enums.ts +3 -3
  75. package/src/functions/players.ts +7 -3
  76. package/src/index.ts +3 -4
  77. package/src/interfaces/{CustomStageLua.ts → CustomStageTSConfig.ts} +108 -42
  78. package/src/interfaces/GridEntityCustomData.ts +2 -2
  79. package/src/interfaces/JSONRoomsFile.ts +6 -5
  80. package/src/interfaces/private/CustomStage.ts +4 -1
  81. package/src/interfaces/private/CustomTrapdoorDescription.ts +2 -2
  82. package/src/interfaces/private/CustomTrapdoorDestination.ts +14 -0
  83. package/dist/interfaces/CustomStageLua.d.ts.map +0 -1
  84. package/dist/types/TrapdoorDestination.d.ts +0 -6
  85. package/dist/types/TrapdoorDestination.d.ts.map +0 -1
  86. package/src/types/TrapdoorDestination.ts +0 -8
@@ -10,6 +10,7 @@ local ____exports = {}
10
10
  local ROOM_ENTRY_OFFSET_FROM_DOOR
11
11
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
12
12
  local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
13
+ local DoorSlotFlag = ____isaac_2Dtypescript_2Ddefinitions.DoorSlotFlag
13
14
  local DoorState = ____isaac_2Dtypescript_2Ddefinitions.DoorState
14
15
  local DoorVariant = ____isaac_2Dtypescript_2Ddefinitions.DoorVariant
15
16
  local GridRoom = ____isaac_2Dtypescript_2Ddefinitions.GridRoom
@@ -35,6 +36,8 @@ local ____direction = require("functions.direction")
35
36
  local directionToVector = ____direction.directionToVector
36
37
  local ____enums = require("functions.enums")
37
38
  local getEnumValues = ____enums.getEnumValues
39
+ local ____flag = require("functions.flag")
40
+ local hasFlag = ____flag.hasFlag
38
41
  local ____tstlClass = require("functions.tstlClass")
39
42
  local isTSTLSet = ____tstlClass.isTSTLSet
40
43
  local ____types = require("functions.types")
@@ -66,13 +69,13 @@ function ____exports.getDoors(self, ...)
66
69
  do
67
70
  local door = room:GetDoor(doorSlot)
68
71
  if door == nil then
69
- goto __continue18
72
+ goto __continue22
70
73
  end
71
74
  if roomTypesSet.size == 0 or roomTypesSet:has(door.TargetRoomType) then
72
75
  doors[#doors + 1] = door
73
76
  end
74
77
  end
75
- ::__continue18::
78
+ ::__continue22::
76
79
  end
77
80
  return doors
78
81
  end
@@ -120,9 +123,29 @@ function ____exports.doorSlotFlagToDoorSlot(self, doorSlotFlag)
120
123
  local doorSlot = DOOR_SLOT_FLAG_TO_DOOR_SLOT[doorSlotFlag]
121
124
  return doorSlot == nil and DEFAULT_DOOR_SLOT or doorSlot
122
125
  end
126
+ function ____exports.doorSlotFlagsToDoorSlots(self, doorSlotFlags)
127
+ local doorSlots = {}
128
+ for ____, doorSlotFlag in ipairs(getEnumValues(nil, DoorSlotFlag)) do
129
+ if hasFlag(nil, doorSlotFlags, doorSlotFlag) then
130
+ local doorSlot = ____exports.doorSlotFlagToDoorSlot(nil, doorSlotFlag)
131
+ doorSlots[#doorSlots + 1] = doorSlot
132
+ end
133
+ end
134
+ return doorSlots
135
+ end
123
136
  function ____exports.doorSlotToDoorSlotFlag(self, doorSlot)
124
137
  return DOOR_SLOT_TO_DOOR_SLOT_FLAG[doorSlot]
125
138
  end
139
+ --- Helper function to convert an array of door slots or a set of door slots to the resulting bit
140
+ -- flag number.
141
+ function ____exports.doorSlotsToDoorSlotFlags(self, doorSlots)
142
+ local doorSlotArray = isTSTLSet(nil, doorSlots) and ({__TS__Spread(doorSlots:values())}) or doorSlots
143
+ local doorSlotFlagArray = __TS__ArrayMap(
144
+ doorSlotArray,
145
+ function(____, doorSlot) return ____exports.doorSlotToDoorSlotFlag(nil, doorSlot) end
146
+ )
147
+ return arrayToBitFlags(nil, doorSlotFlagArray)
148
+ end
126
149
  function ____exports.getAngelRoomDoor(self)
127
150
  local angelRoomDoors = ____exports.getDoors(nil, RoomType.ANGEL)
128
151
  local ____temp_0
@@ -164,16 +187,6 @@ function ____exports.getDoorEnterPosition(self, door)
164
187
  local offset = ____exports.getDoorSlotEnterPositionOffset(nil, door.Slot)
165
188
  return door.Position + offset
166
189
  end
167
- --- Helper function to convert an array of door slots or a set of door slots to the resulting bit
168
- -- flag number.
169
- function ____exports.getDoorSlotFlags(self, doorSlots)
170
- local doorSlotArray = isTSTLSet(nil, doorSlots) and ({__TS__Spread(doorSlots:values())}) or doorSlots
171
- local doorSlotFlagArray = __TS__ArrayMap(
172
- doorSlotArray,
173
- function(____, doorSlot) return ____exports.doorSlotToDoorSlotFlag(nil, doorSlot) end
174
- )
175
- return arrayToBitFlags(nil, doorSlotFlagArray)
176
- end
177
190
  --- Helper function to get the possible door slots that can exist for a given room shape.
178
191
  function ____exports.getDoorSlotsForRoomShape(self, roomShape)
179
192
  return ROOM_SHAPE_TO_DOOR_SLOTS[roomShape]
@@ -16,7 +16,7 @@
16
16
  * Also see the `getEnumKeys` and `getEnumValues` helper functions.
17
17
  *
18
18
  * For a more in depth explanation, see:
19
- * https://isaacscript.github.io/gotchas#iterating-over-enums
19
+ * https://isaacscript.github.io/main/gotchas#iterating-over-enums
20
20
  */
21
21
  export declare function getEnumEntries<T>(transpiledEnum: T): Array<[key: string, value: T[keyof T]]>;
22
22
  /**
@@ -33,7 +33,7 @@ export declare function getEnumEntries<T>(transpiledEnum: T): Array<[key: string
33
33
  * Also see the `getEnumEntries` and `getEnumValues` helper functions.
34
34
  *
35
35
  * For a more in depth explanation, see:
36
- * https://isaacscript.github.io/gotchas#iterating-over-enums
36
+ * https://isaacscript.github.io/main/gotchas#iterating-over-enums
37
37
  */
38
38
  export declare function getEnumKeys<T>(transpiledEnum: T): string[];
39
39
  /** Helper function to get the amount of entries inside of an enum. */
@@ -52,7 +52,7 @@ export declare function getEnumLength<T>(transpiledEnum: T): int;
52
52
  * Also see the `getEnumEntries` and `getEnumKeys` helper functions.
53
53
  *
54
54
  * For a more in depth explanation, see:
55
- * https://isaacscript.github.io/gotchas#iterating-over-enums
55
+ * https://isaacscript.github.io/main/gotchas#iterating-over-enums
56
56
  */
57
57
  export declare function getEnumValues<T>(transpiledEnum: T): Array<T[keyof T]>;
58
58
  /**
@@ -26,7 +26,7 @@ local irange = ____utils.irange
26
26
  -- Also see the `getEnumKeys` and `getEnumValues` helper functions.
27
27
  --
28
28
  -- For a more in depth explanation, see:
29
- -- https://isaacscript.github.io/gotchas#iterating-over-enums
29
+ -- https://isaacscript.github.io/main/gotchas#iterating-over-enums
30
30
  function ____exports.getEnumEntries(self, transpiledEnum)
31
31
  local enumEntries = {}
32
32
  for key, value in pairs(transpiledEnum) do
@@ -61,7 +61,7 @@ end
61
61
  -- Also see the `getEnumEntries` and `getEnumValues` helper functions.
62
62
  --
63
63
  -- For a more in depth explanation, see:
64
- -- https://isaacscript.github.io/gotchas#iterating-over-enums
64
+ -- https://isaacscript.github.io/main/gotchas#iterating-over-enums
65
65
  function ____exports.getEnumKeys(self, transpiledEnum)
66
66
  local enumEntries = ____exports.getEnumEntries(nil, transpiledEnum)
67
67
  return __TS__ArrayMap(
@@ -92,7 +92,7 @@ end
92
92
  -- Also see the `getEnumEntries` and `getEnumKeys` helper functions.
93
93
  --
94
94
  -- For a more in depth explanation, see:
95
- -- https://isaacscript.github.io/gotchas#iterating-over-enums
95
+ -- https://isaacscript.github.io/main/gotchas#iterating-over-enums
96
96
  function ____exports.getEnumValues(self, transpiledEnum)
97
97
  local enumEntries = ____exports.getEnumEntries(nil, transpiledEnum)
98
98
  return __TS__ArrayMap(
@@ -1 +1 @@
1
- {"version":3,"file":"players.d.ts","sourceRoot":"","sources":["../../src/functions/players.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EAET,eAAe,EAIf,UAAU,EACV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AA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AY,EACpB,eAAe,EAAE,eAAe,EAChC,UAAU,EAAE,UAAU,EACtB,MAAM,CAAC,EAAE,GAAG,EACZ,WAAW,UAAQ,GAClB,IAAI,CA6DN;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,EAChB,aAAa,UAAO,GACnB,IAAI,CAsBN;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAEN"}
@@ -42,6 +42,7 @@ local getCollectibleArray = ____collectibleSet.getCollectibleArray
42
42
  local ____enums = require("functions.enums")
43
43
  local getEnumValues = ____enums.getEnumValues
44
44
  local ____playerIndex = require("functions.playerIndex")
45
+ local getAllPlayers = ____playerIndex.getAllPlayers
45
46
  local getPlayerIndexVanilla = ____playerIndex.getPlayerIndexVanilla
46
47
  local getPlayers = ____playerIndex.getPlayers
47
48
  local ____tears = require("functions.tears")
@@ -214,14 +215,14 @@ function ____exports.addTrinketCostume(self, player, trinketType)
214
215
  player:AddCostume(itemConfigTrinket, false)
215
216
  end
216
217
  function ____exports.anyPlayerHasCollectible(self, collectibleType)
217
- local players = getPlayers(nil)
218
+ local players = getAllPlayers(nil)
218
219
  return __TS__ArraySome(
219
220
  players,
220
221
  function(____, player) return player:HasCollectible(collectibleType) end
221
222
  )
222
223
  end
223
224
  function ____exports.anyPlayerHasTrinket(self, trinketType)
224
- local players = getPlayers(nil)
225
+ local players = getAllPlayers(nil)
225
226
  return __TS__ArraySome(
226
227
  players,
227
228
  function(____, player) return player:HasTrinket(trinketType) end