isaacscript-common 36.0.0 → 36.2.0
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/dist/index.rollup.d.ts +13 -4
- package/dist/isaacscript-common.lua +34 -27
- package/dist/src/classes/features/callbackLogic/CustomGridEntities.lua +2 -2
- package/dist/src/enums/ModCallbackCustom.d.ts +3 -0
- package/dist/src/enums/ModCallbackCustom.d.ts.map +1 -1
- package/dist/src/functions/bitwise.d.ts +2 -2
- package/dist/src/functions/bitwise.d.ts.map +1 -1
- package/dist/src/functions/bitwise.lua +4 -4
- package/dist/src/functions/collectibleTag.d.ts +2 -2
- package/dist/src/functions/collectibleTag.d.ts.map +1 -1
- package/dist/src/functions/collectibleTag.lua +6 -2
- package/dist/src/functions/collectibles.lua +3 -4
- package/dist/src/functions/gridEntities.d.ts +5 -0
- package/dist/src/functions/gridEntities.d.ts.map +1 -1
- package/dist/src/functions/gridEntities.lua +21 -13
- package/dist/src/functions/minimap.lua +2 -2
- package/package.json +1 -1
- package/src/classes/features/callbackLogic/CustomGridEntities.ts +2 -2
- package/src/enums/ModCallbackCustom.ts +3 -0
- package/src/functions/bitwise.ts +4 -4
- package/src/functions/collectibleTag.ts +13 -2
- package/src/functions/collectibles.ts +3 -4
- package/src/functions/gridEntities.ts +29 -14
- package/src/functions/minimap.ts +2 -2
package/dist/index.rollup.d.ts
CHANGED
|
@@ -1583,7 +1583,7 @@ export declare const COLLECTIBLE_INITIAL_WAIT = 20;
|
|
|
1583
1583
|
/** Helper function to check in the item config if a given collectible has a given cache flag. */
|
|
1584
1584
|
export declare function collectibleHasCacheFlag(collectibleOrCollectibleType: EntityPickup | CollectibleType, cacheFlag: CacheFlag): boolean;
|
|
1585
1585
|
|
|
1586
|
-
export declare function collectibleHasTag(
|
|
1586
|
+
export declare function collectibleHasTag(collectibleOrCollectibleType: EntityPickupCollectible | CollectibleType, tag: ItemConfigTag): boolean;
|
|
1587
1587
|
|
|
1588
1588
|
declare class CollectibleItemPoolType extends Feature {
|
|
1589
1589
|
private readonly pickupIndexCreation;
|
|
@@ -1675,13 +1675,13 @@ export declare function convertBinaryToDecimal(bits: int[]): number;
|
|
|
1675
1675
|
/**
|
|
1676
1676
|
* Helper function to convert a number to an array of bits.
|
|
1677
1677
|
*
|
|
1678
|
-
* @param
|
|
1678
|
+
* @param num The number to convert.
|
|
1679
1679
|
* @param minLength Optional. Equal to the minimum amount of bits that should be returned. If the
|
|
1680
1680
|
* converted number of bits is below this number, 0's will be padded to the left
|
|
1681
1681
|
* side until the minimum length is met. Default is undefined (which will not cause
|
|
1682
1682
|
* any padding).
|
|
1683
1683
|
*/
|
|
1684
|
-
export declare function convertDecimalToBinary(
|
|
1684
|
+
export declare function convertDecimalToBinary(num: number, minLength?: int): int[];
|
|
1685
1685
|
|
|
1686
1686
|
/**
|
|
1687
1687
|
* Helper function to convert the grid entity type found in a room XML file to the corresponding
|
|
@@ -8648,6 +8648,12 @@ export declare function isGridEntityBreakableByExplosion(gridEntity: GridEntity)
|
|
|
8648
8648
|
*/
|
|
8649
8649
|
export declare function isGridEntityBroken(gridEntity: GridEntity): boolean;
|
|
8650
8650
|
|
|
8651
|
+
/**
|
|
8652
|
+
* Helper function to see if an arbitrary number is a valid `GridEntityXMLType`. This is useful in
|
|
8653
|
+
* the `PRE_ROOM_ENTITY_SPAWN` callback for narrowing the type of the first argument.
|
|
8654
|
+
*/
|
|
8655
|
+
export declare function isGridEntityXMLType(num: number): num is GridEntityXMLType;
|
|
8656
|
+
|
|
8651
8657
|
/** For `PickupVariant.HEART` (10). */
|
|
8652
8658
|
export declare function isHeart(pickup: EntityPickup): pickup is EntityPickupHeart;
|
|
8653
8659
|
|
|
@@ -8886,7 +8892,7 @@ export declare function isProjectile(variable: unknown): variable is EntityProje
|
|
|
8886
8892
|
/** Helper function to check if a collectible type is a particular quality. */
|
|
8887
8893
|
export declare function isQuality(collectibleOrCollectibleType: EntityPickup | CollectibleType, quality: int): boolean;
|
|
8888
8894
|
|
|
8889
|
-
export declare function isQuestCollectible(
|
|
8895
|
+
export declare function isQuestCollectible(collectibleOrCollectibleType: EntityPickupCollectible | CollectibleType): boolean;
|
|
8890
8896
|
|
|
8891
8897
|
/**
|
|
8892
8898
|
* Helper function to detect the custom death state of a Rag Man Ragling. When Rag Man Raglings die,
|
|
@@ -12543,6 +12549,9 @@ export declare enum ModCallbackCustom {
|
|
|
12543
12549
|
* - You can provide an optional fifth argument that will make the callback only fire if it
|
|
12544
12550
|
* matches the sub-type provided.
|
|
12545
12551
|
*
|
|
12552
|
+
* You can use the `isGridEntityXMLType` helper function to convert the
|
|
12553
|
+
* `entityTypeOrGridEntityXMLType` argument to an `EntityType` or `GridEntityXMLType`, if needed.
|
|
12554
|
+
*
|
|
12546
12555
|
* ```ts
|
|
12547
12556
|
* function preRoomEntitySpawnFilter(
|
|
12548
12557
|
* entityTypeOrGridEntityXMLType: EntityType | GridEntityXMLType,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 36.
|
|
3
|
+
isaacscript-common 36.2.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -21508,7 +21508,7 @@ local ____sprites = require("src.functions.sprites")
|
|
|
21508
21508
|
local clearSprite = ____sprites.clearSprite
|
|
21509
21509
|
local spriteEquals = ____sprites.spriteEquals
|
|
21510
21510
|
local ____types = require("src.functions.types")
|
|
21511
|
-
local
|
|
21511
|
+
local isInteger = ____types.isInteger
|
|
21512
21512
|
local ____utils = require("src.functions.utils")
|
|
21513
21513
|
local iRange = ____utils.iRange
|
|
21514
21514
|
function initQuestionMarkSprite(self)
|
|
@@ -21568,9 +21568,8 @@ function ____exports.setCollectibleSubType(self, collectible, newCollectibleType
|
|
|
21568
21568
|
)
|
|
21569
21569
|
end
|
|
21570
21570
|
function getCollectibleTypeFromArg(self, collectibleOrCollectibleType, functionName)
|
|
21571
|
-
if
|
|
21572
|
-
|
|
21573
|
-
return collectibleType
|
|
21571
|
+
if isInteger(nil, collectibleOrCollectibleType) then
|
|
21572
|
+
return collectibleOrCollectibleType
|
|
21574
21573
|
end
|
|
21575
21574
|
local collectible = collectibleOrCollectibleType
|
|
21576
21575
|
if not isCollectible(nil, collectible) then
|
|
@@ -22930,15 +22929,15 @@ function ____exports.convertBinaryToDecimal(self, bits)
|
|
|
22930
22929
|
local bitsString = table.concat(bits, "")
|
|
22931
22930
|
return __TS__ParseInt(bitsString, 2)
|
|
22932
22931
|
end
|
|
22933
|
-
function ____exports.convertDecimalToBinary(self,
|
|
22932
|
+
function ____exports.convertDecimalToBinary(self, num, minLength)
|
|
22934
22933
|
local bits = {}
|
|
22935
|
-
local bitsString = __TS__NumberToString(
|
|
22934
|
+
local bitsString = __TS__NumberToString(num, 2)
|
|
22936
22935
|
for ____, bitString in __TS__Iterator(bitsString) do
|
|
22937
22936
|
local bit = tonumber(bitString)
|
|
22938
22937
|
assertDefined(
|
|
22939
22938
|
nil,
|
|
22940
22939
|
bit,
|
|
22941
|
-
"Failed to convert the following number to binary: " .. tostring(
|
|
22940
|
+
"Failed to convert the following number to binary: " .. tostring(num)
|
|
22942
22941
|
)
|
|
22943
22942
|
bits[#bits + 1] = bit
|
|
22944
22943
|
end
|
|
@@ -28015,6 +28014,8 @@ local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
|
28015
28014
|
local PoopGridEntityVariant = ____isaac_2Dtypescript_2Ddefinitions.PoopGridEntityVariant
|
|
28016
28015
|
local StatueVariant = ____isaac_2Dtypescript_2Ddefinitions.StatueVariant
|
|
28017
28016
|
local TrapdoorVariant = ____isaac_2Dtypescript_2Ddefinitions.TrapdoorVariant
|
|
28017
|
+
local ____cachedEnumValues = require("src.arrays.cachedEnumValues")
|
|
28018
|
+
local GRID_ENTITY_XML_TYPE_VALUES = ____cachedEnumValues.GRID_ENTITY_XML_TYPE_VALUES
|
|
28018
28019
|
local ____cachedClasses = require("src.core.cachedClasses")
|
|
28019
28020
|
local game = ____cachedClasses.game
|
|
28020
28021
|
local ____constants = require("src.core.constants")
|
|
@@ -28041,7 +28042,7 @@ local ____rooms = require("src.functions.rooms")
|
|
|
28041
28042
|
local roomUpdateSafe = ____rooms.roomUpdateSafe
|
|
28042
28043
|
local ____types = require("src.functions.types")
|
|
28043
28044
|
local asNumber = ____types.asNumber
|
|
28044
|
-
local
|
|
28045
|
+
local isInteger = ____types.isInteger
|
|
28045
28046
|
local ____utils = require("src.functions.utils")
|
|
28046
28047
|
local assertDefined = ____utils.assertDefined
|
|
28047
28048
|
local eRange = ____utils.eRange
|
|
@@ -28078,20 +28079,20 @@ function ____exports.getTopLeftWallGridIndex(self)
|
|
|
28078
28079
|
end
|
|
28079
28080
|
function ____exports.removeGridEntity(self, gridEntityOrGridIndex, updateRoom)
|
|
28080
28081
|
local room = game:GetRoom()
|
|
28081
|
-
local
|
|
28082
|
-
if
|
|
28083
|
-
|
|
28082
|
+
local ____isInteger_result_2
|
|
28083
|
+
if isInteger(nil, gridEntityOrGridIndex) then
|
|
28084
|
+
____isInteger_result_2 = room:GetGridEntity(gridEntityOrGridIndex)
|
|
28084
28085
|
else
|
|
28085
|
-
|
|
28086
|
+
____isInteger_result_2 = gridEntityOrGridIndex
|
|
28086
28087
|
end
|
|
28087
|
-
local gridEntity =
|
|
28088
|
+
local gridEntity = ____isInteger_result_2
|
|
28088
28089
|
if gridEntity == nil then
|
|
28089
28090
|
return
|
|
28090
28091
|
end
|
|
28091
28092
|
local gridEntityType = gridEntity:GetType()
|
|
28092
28093
|
local variant = gridEntity:GetVariant()
|
|
28093
28094
|
local position = gridEntity.Position
|
|
28094
|
-
local gridIndex =
|
|
28095
|
+
local gridIndex = isInteger(nil, gridEntityOrGridIndex) and gridEntityOrGridIndex or gridEntityOrGridIndex:GetGridIndex()
|
|
28095
28096
|
room:RemoveGridEntity(gridIndex, 0, false)
|
|
28096
28097
|
if updateRoom then
|
|
28097
28098
|
roomUpdateSafe(nil)
|
|
@@ -28133,6 +28134,7 @@ function ____exports.spawnGridEntityWithVariant(self, gridEntityType, variant, g
|
|
|
28133
28134
|
end
|
|
28134
28135
|
return gridEntity
|
|
28135
28136
|
end
|
|
28137
|
+
local GRID_ENTITY_TYPES_THAT_KEEP_GRID_ENTITY_XML_VARIANT = __TS__New(ReadonlySet, {GridEntityType.SPIKES_ON_OFF, GridEntityType.PRESSURE_PLATE, GridEntityType.TELEPORTER})
|
|
28136
28138
|
local BREAKABLE_GRID_ENTITY_TYPES_BY_EXPLOSIONS = __TS__New(ReadonlySet, {
|
|
28137
28139
|
GridEntityType.ROCK,
|
|
28138
28140
|
GridEntityType.ROCK_TINTED,
|
|
@@ -28150,6 +28152,7 @@ local BREAKABLE_GRID_ENTITY_TYPES_VARIANTS_BY_EXPLOSIONS = __TS__New(
|
|
|
28150
28152
|
ReadonlySet,
|
|
28151
28153
|
{(tostring(GridEntityType.STATUE) .. ".") .. tostring(StatueVariant.ANGEL)}
|
|
28152
28154
|
)
|
|
28155
|
+
local GRID_ENTITY_XML_TYPES_SET = __TS__New(ReadonlySet, GRID_ENTITY_XML_TYPE_VALUES)
|
|
28153
28156
|
function ____exports.convertXMLGridEntityType(self, gridEntityXMLType, gridEntityXMLVariant)
|
|
28154
28157
|
local gridEntityArray = GRID_ENTITY_XML_MAP:get(gridEntityXMLType)
|
|
28155
28158
|
assertDefined(
|
|
@@ -28158,10 +28161,7 @@ function ____exports.convertXMLGridEntityType(self, gridEntityXMLType, gridEntit
|
|
|
28158
28161
|
"Failed to find an entry in the grid entity map for XML entity type: " .. tostring(gridEntityXMLType)
|
|
28159
28162
|
)
|
|
28160
28163
|
local gridEntityType = gridEntityArray[1]
|
|
28161
|
-
local variant = gridEntityArray[2]
|
|
28162
|
-
if gridEntityType == GridEntityType.SPIKES_ON_OFF or gridEntityType == GridEntityType.PRESSURE_PLATE or gridEntityType == GridEntityType.TELEPORTER then
|
|
28163
|
-
variant = gridEntityXMLVariant
|
|
28164
|
-
end
|
|
28164
|
+
local variant = GRID_ENTITY_TYPES_THAT_KEEP_GRID_ENTITY_XML_VARIANT:has(gridEntityType) and gridEntityXMLVariant or gridEntityArray[2]
|
|
28165
28165
|
return {gridEntityType, variant}
|
|
28166
28166
|
end
|
|
28167
28167
|
function ____exports.doesGridEntityExist(self, gridEntityType, variant)
|
|
@@ -28266,7 +28266,7 @@ function ____exports.getGridEntitiesInRadius(self, targetPosition, radius)
|
|
|
28266
28266
|
local gridIndex = room:GetGridIndex(position)
|
|
28267
28267
|
local gridEntity = room:GetGridEntityFromPos(position)
|
|
28268
28268
|
if gridEntity == nil or registeredGridIndexes:has(gridIndex) then
|
|
28269
|
-
goto
|
|
28269
|
+
goto __continue23
|
|
28270
28270
|
end
|
|
28271
28271
|
registeredGridIndexes:add(gridIndex)
|
|
28272
28272
|
local ____exports_getGridEntityCollisionPoints_result_1 = ____exports.getGridEntityCollisionPoints(nil, gridEntity)
|
|
@@ -28282,7 +28282,7 @@ function ____exports.getGridEntitiesInRadius(self, targetPosition, radius)
|
|
|
28282
28282
|
gridEntities[#gridEntities + 1] = gridEntity
|
|
28283
28283
|
end
|
|
28284
28284
|
end
|
|
28285
|
-
::
|
|
28285
|
+
::__continue23::
|
|
28286
28286
|
end
|
|
28287
28287
|
end
|
|
28288
28288
|
return gridEntities
|
|
@@ -28350,6 +28350,9 @@ function ____exports.isGridEntityBroken(self, gridEntity)
|
|
|
28350
28350
|
local brokenState = GRID_ENTITY_TYPE_TO_BROKEN_STATE_MAP:get(gridEntityType)
|
|
28351
28351
|
return gridEntity.State == brokenState
|
|
28352
28352
|
end
|
|
28353
|
+
function ____exports.isGridEntityXMLType(self, num)
|
|
28354
|
+
return GRID_ENTITY_XML_TYPES_SET:has(num)
|
|
28355
|
+
end
|
|
28353
28356
|
function ____exports.isPoopGridEntityXMLType(self, gridEntityXMLType)
|
|
28354
28357
|
return POOP_GRID_ENTITY_XML_TYPES_SET:has(gridEntityXMLType)
|
|
28355
28358
|
end
|
|
@@ -34974,7 +34977,7 @@ local getPlayerFromPtr = ____players.getPlayerFromPtr
|
|
|
34974
34977
|
local ____roomData = require("src.functions.roomData")
|
|
34975
34978
|
local getRoomListIndex = ____roomData.getRoomListIndex
|
|
34976
34979
|
local ____types = require("src.functions.types")
|
|
34977
|
-
local
|
|
34980
|
+
local isInteger = ____types.isInteger
|
|
34978
34981
|
local ____utils = require("src.functions.utils")
|
|
34979
34982
|
local assertDefined = ____utils.assertDefined
|
|
34980
34983
|
local ____vector = require("src.functions.vector")
|
|
@@ -35151,7 +35154,7 @@ function CustomGridEntities.prototype.getCustomGridEntityType(self, gridEntityOr
|
|
|
35151
35154
|
if not self.initialized then
|
|
35152
35155
|
return nil
|
|
35153
35156
|
end
|
|
35154
|
-
local gridIndex =
|
|
35157
|
+
local gridIndex = isInteger(nil, gridEntityOrGridIndex) and gridEntityOrGridIndex or gridEntityOrGridIndex:GetGridIndex()
|
|
35155
35158
|
local roomListIndex = getRoomListIndex(nil)
|
|
35156
35159
|
local roomCustomGridEntities = v.level.customGridEntities:get(roomListIndex)
|
|
35157
35160
|
if roomCustomGridEntities == nil then
|
|
@@ -38295,14 +38298,18 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescri
|
|
|
38295
38298
|
local ItemConfigTag = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigTag
|
|
38296
38299
|
local ____cachedClasses = require("src.core.cachedClasses")
|
|
38297
38300
|
local itemConfig = ____cachedClasses.itemConfig
|
|
38298
|
-
|
|
38301
|
+
local ____types = require("src.functions.types")
|
|
38302
|
+
local isInteger = ____types.isInteger
|
|
38303
|
+
function ____exports.collectibleHasTag(self, collectibleOrCollectibleType, tag)
|
|
38304
|
+
local collectibleType = isInteger(nil, collectibleOrCollectibleType) and collectibleOrCollectibleType or collectibleOrCollectibleType.SubType
|
|
38299
38305
|
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
38300
38306
|
if itemConfigItem == nil then
|
|
38301
38307
|
return false
|
|
38302
38308
|
end
|
|
38303
38309
|
return itemConfigItem:HasTags(tag)
|
|
38304
38310
|
end
|
|
38305
|
-
function ____exports.isQuestCollectible(self,
|
|
38311
|
+
function ____exports.isQuestCollectible(self, collectibleOrCollectibleType)
|
|
38312
|
+
local collectibleType = isInteger(nil, collectibleOrCollectibleType) and collectibleOrCollectibleType or collectibleOrCollectibleType.SubType
|
|
38306
38313
|
return ____exports.collectibleHasTag(nil, collectibleType, ItemConfigTag.QUEST)
|
|
38307
38314
|
end
|
|
38308
38315
|
return ____exports
|
|
@@ -53924,7 +53931,7 @@ local getRoomGridIndex = ____roomData.getRoomGridIndex
|
|
|
53924
53931
|
local ____rooms = require("src.functions.rooms")
|
|
53925
53932
|
local getRoomsInsideGrid = ____rooms.getRoomsInsideGrid
|
|
53926
53933
|
local ____types = require("src.functions.types")
|
|
53927
|
-
local
|
|
53934
|
+
local isInteger = ____types.isInteger
|
|
53928
53935
|
local ____utils = require("src.functions.utils")
|
|
53929
53936
|
local assertDefined = ____utils.assertDefined
|
|
53930
53937
|
function ____exports.getRoomDisplayFlags(self, roomGridIndex, minimapAPI)
|
|
@@ -54021,7 +54028,7 @@ function ____exports.isRoomVisible(self, roomGridIndexOrRoomDescriptor, minimapA
|
|
|
54021
54028
|
if minimapAPI == nil then
|
|
54022
54029
|
minimapAPI = true
|
|
54023
54030
|
end
|
|
54024
|
-
local roomGridIndex =
|
|
54031
|
+
local roomGridIndex = isInteger(nil, roomGridIndexOrRoomDescriptor) and roomGridIndexOrRoomDescriptor or roomGridIndexOrRoomDescriptor.SafeGridIndex
|
|
54025
54032
|
local roomDisplayFlags = ____exports.getRoomDisplayFlags(nil, roomGridIndex, minimapAPI)
|
|
54026
54033
|
return roomDisplayFlags ~= DisplayFlagZero
|
|
54027
54034
|
end
|
|
@@ -28,7 +28,7 @@ local getPlayerFromPtr = ____players.getPlayerFromPtr
|
|
|
28
28
|
local ____roomData = require("src.functions.roomData")
|
|
29
29
|
local getRoomListIndex = ____roomData.getRoomListIndex
|
|
30
30
|
local ____types = require("src.functions.types")
|
|
31
|
-
local
|
|
31
|
+
local isInteger = ____types.isInteger
|
|
32
32
|
local ____utils = require("src.functions.utils")
|
|
33
33
|
local assertDefined = ____utils.assertDefined
|
|
34
34
|
local ____vector = require("src.functions.vector")
|
|
@@ -205,7 +205,7 @@ function CustomGridEntities.prototype.getCustomGridEntityType(self, gridEntityOr
|
|
|
205
205
|
if not self.initialized then
|
|
206
206
|
return nil
|
|
207
207
|
end
|
|
208
|
-
local gridIndex =
|
|
208
|
+
local gridIndex = isInteger(nil, gridEntityOrGridIndex) and gridEntityOrGridIndex or gridEntityOrGridIndex:GetGridIndex()
|
|
209
209
|
local roomListIndex = getRoomListIndex(nil)
|
|
210
210
|
local roomCustomGridEntities = v.level.customGridEntities:get(roomListIndex)
|
|
211
211
|
if roomCustomGridEntities == nil then
|
|
@@ -2437,6 +2437,9 @@ export declare enum ModCallbackCustom {
|
|
|
2437
2437
|
* - You can provide an optional fifth argument that will make the callback only fire if it
|
|
2438
2438
|
* matches the sub-type provided.
|
|
2439
2439
|
*
|
|
2440
|
+
* You can use the `isGridEntityXMLType` helper function to convert the
|
|
2441
|
+
* `entityTypeOrGridEntityXMLType` argument to an `EntityType` or `GridEntityXMLType`, if needed.
|
|
2442
|
+
*
|
|
2440
2443
|
* ```ts
|
|
2441
2444
|
* function preRoomEntitySpawnFilter(
|
|
2442
2445
|
* entityTypeOrGridEntityXMLType: EntityType | GridEntityXMLType,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModCallbackCustom.d.ts","sourceRoot":"","sources":["../../../src/enums/ModCallbackCustom.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,oBAAY,iBAAiB;IAC3B;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,sBAAsB,IAAA;IAEtB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,sBAAsB,IAAA;IAEtB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;;;;;;OAkBG;IACH,eAAe,MAAA;IAEf;;;;;;;;;;;;;;;;;OAiBG;IACH,0BAA0B,MAAA;IAE1B;;;;;;;;;;;;OAYG;IACH,aAAa,MAAA;IAEb;;;;;;;;;;;;;;;;;;;OAmBG;IACH,wBAAwB,MAAA;IAExB;;;;;;;;;;;;;;;OAeG;IACH,qBAAqB,MAAA;IAErB;;;;;;;;;;;;;;;;;OAiBG;IACH,+BAA+B,MAAA;IAE/B;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,4BAA4B,MAAA;IAE5B;;;;;;;;;;;;;;;;;OAiBG;IACH,yBAAyB,MAAA;CAC1B"}
|
|
@@ -9,13 +9,13 @@ export declare function convertBinaryToDecimal(bits: int[]): number;
|
|
|
9
9
|
/**
|
|
10
10
|
* Helper function to convert a number to an array of bits.
|
|
11
11
|
*
|
|
12
|
-
* @param
|
|
12
|
+
* @param num The number to convert.
|
|
13
13
|
* @param minLength Optional. Equal to the minimum amount of bits that should be returned. If the
|
|
14
14
|
* converted number of bits is below this number, 0's will be padded to the left
|
|
15
15
|
* side until the minimum length is met. Default is undefined (which will not cause
|
|
16
16
|
* any padding).
|
|
17
17
|
*/
|
|
18
|
-
export declare function convertDecimalToBinary(
|
|
18
|
+
export declare function convertDecimalToBinary(num: number, minLength?: int): int[];
|
|
19
19
|
/**
|
|
20
20
|
* Helper function to count the number of bits that are set to 1 in a binary representation of a
|
|
21
21
|
* number.
|
|
@@ -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,CAAC,EAAE,GAAG,SAAS,CAAC,EAAE,GACxB,QAAQ,CAAC,CAAC,CAAC,CAOb;AAED,mFAAmF;AACnF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,MAAM,CAG1D;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,
|
|
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,CAAC,EAAE,GAAG,SAAS,CAAC,EAAE,GACxB,QAAQ,CAAC,CAAC,CAAC,CAOb;AAED,mFAAmF;AACnF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,MAAM,CAG1D;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,GAAG,GAAG,GAAG,EAAE,CAqB1E;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,GAAG,GAAG,GAAG,CASxC;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,GAAG,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,GAC3B,QAAQ,CAAC,CAAC,CAAC,CAOb"}
|
|
@@ -23,20 +23,20 @@ function ____exports.convertBinaryToDecimal(self, bits)
|
|
|
23
23
|
end
|
|
24
24
|
--- Helper function to convert a number to an array of bits.
|
|
25
25
|
--
|
|
26
|
-
-- @param
|
|
26
|
+
-- @param num The number to convert.
|
|
27
27
|
-- @param minLength Optional. Equal to the minimum amount of bits that should be returned. If the
|
|
28
28
|
-- converted number of bits is below this number, 0's will be padded to the left
|
|
29
29
|
-- side until the minimum length is met. Default is undefined (which will not cause
|
|
30
30
|
-- any padding).
|
|
31
|
-
function ____exports.convertDecimalToBinary(self,
|
|
31
|
+
function ____exports.convertDecimalToBinary(self, num, minLength)
|
|
32
32
|
local bits = {}
|
|
33
|
-
local bitsString = __TS__NumberToString(
|
|
33
|
+
local bitsString = __TS__NumberToString(num, 2)
|
|
34
34
|
for ____, bitString in __TS__Iterator(bitsString) do
|
|
35
35
|
local bit = tonumber(bitString)
|
|
36
36
|
assertDefined(
|
|
37
37
|
nil,
|
|
38
38
|
bit,
|
|
39
|
-
"Failed to convert the following number to binary: " .. tostring(
|
|
39
|
+
"Failed to convert the following number to binary: " .. tostring(num)
|
|
40
40
|
)
|
|
41
41
|
bits[#bits + 1] = bit
|
|
42
42
|
end
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CollectibleType } from "isaac-typescript-definitions";
|
|
2
2
|
import { ItemConfigTag } from "isaac-typescript-definitions";
|
|
3
|
-
export declare function collectibleHasTag(
|
|
4
|
-
export declare function isQuestCollectible(
|
|
3
|
+
export declare function collectibleHasTag(collectibleOrCollectibleType: EntityPickupCollectible | CollectibleType, tag: ItemConfigTag): boolean;
|
|
4
|
+
export declare function isQuestCollectible(collectibleOrCollectibleType: EntityPickupCollectible | CollectibleType): boolean;
|
|
5
5
|
//# sourceMappingURL=collectibleTag.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collectibleTag.d.ts","sourceRoot":"","sources":["../../../src/functions/collectibleTag.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"collectibleTag.d.ts","sourceRoot":"","sources":["../../../src/functions/collectibleTag.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAI7D,wBAAgB,iBAAiB,CAC/B,4BAA4B,EAAE,uBAAuB,GAAG,eAAe,EACvE,GAAG,EAAE,aAAa,GACjB,OAAO,CAWT;AAED,wBAAgB,kBAAkB,CAChC,4BAA4B,EAAE,uBAAuB,GAAG,eAAe,GACtE,OAAO,CAMT"}
|
|
@@ -3,14 +3,18 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
|
|
|
3
3
|
local ItemConfigTag = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigTag
|
|
4
4
|
local ____cachedClasses = require("src.core.cachedClasses")
|
|
5
5
|
local itemConfig = ____cachedClasses.itemConfig
|
|
6
|
-
|
|
6
|
+
local ____types = require("src.functions.types")
|
|
7
|
+
local isInteger = ____types.isInteger
|
|
8
|
+
function ____exports.collectibleHasTag(self, collectibleOrCollectibleType, tag)
|
|
9
|
+
local collectibleType = isInteger(nil, collectibleOrCollectibleType) and collectibleOrCollectibleType or collectibleOrCollectibleType.SubType
|
|
7
10
|
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
8
11
|
if itemConfigItem == nil then
|
|
9
12
|
return false
|
|
10
13
|
end
|
|
11
14
|
return itemConfigItem:HasTags(tag)
|
|
12
15
|
end
|
|
13
|
-
function ____exports.isQuestCollectible(self,
|
|
16
|
+
function ____exports.isQuestCollectible(self, collectibleOrCollectibleType)
|
|
17
|
+
local collectibleType = isInteger(nil, collectibleOrCollectibleType) and collectibleOrCollectibleType or collectibleOrCollectibleType.SubType
|
|
14
18
|
return ____exports.collectibleHasTag(nil, collectibleType, ItemConfigTag.QUEST)
|
|
15
19
|
end
|
|
16
20
|
return ____exports
|
|
@@ -37,7 +37,7 @@ local ____sprites = require("src.functions.sprites")
|
|
|
37
37
|
local clearSprite = ____sprites.clearSprite
|
|
38
38
|
local spriteEquals = ____sprites.spriteEquals
|
|
39
39
|
local ____types = require("src.functions.types")
|
|
40
|
-
local
|
|
40
|
+
local isInteger = ____types.isInteger
|
|
41
41
|
local ____utils = require("src.functions.utils")
|
|
42
42
|
local iRange = ____utils.iRange
|
|
43
43
|
function initQuestionMarkSprite(self)
|
|
@@ -114,9 +114,8 @@ function ____exports.setCollectibleSubType(self, collectible, newCollectibleType
|
|
|
114
114
|
)
|
|
115
115
|
end
|
|
116
116
|
function getCollectibleTypeFromArg(self, collectibleOrCollectibleType, functionName)
|
|
117
|
-
if
|
|
118
|
-
|
|
119
|
-
return collectibleType
|
|
117
|
+
if isInteger(nil, collectibleOrCollectibleType) then
|
|
118
|
+
return collectibleOrCollectibleType
|
|
120
119
|
end
|
|
121
120
|
local collectible = collectibleOrCollectibleType
|
|
122
121
|
if not isCollectible(nil, collectible) then
|
|
@@ -135,6 +135,11 @@ export declare function isGridEntityBreakableByExplosion(gridEntity: GridEntity)
|
|
|
135
135
|
* the actual collision for the entity is removed.
|
|
136
136
|
*/
|
|
137
137
|
export declare function isGridEntityBroken(gridEntity: GridEntity): boolean;
|
|
138
|
+
/**
|
|
139
|
+
* Helper function to see if an arbitrary number is a valid `GridEntityXMLType`. This is useful in
|
|
140
|
+
* the `PRE_ROOM_ENTITY_SPAWN` callback for narrowing the type of the first argument.
|
|
141
|
+
*/
|
|
142
|
+
export declare function isGridEntityXMLType(num: number): num is GridEntityXMLType;
|
|
138
143
|
/** Helper function to see if a `GridEntityXMLType` is some kind of poop. */
|
|
139
144
|
export declare function isPoopGridEntityXMLType(gridEntityXMLType: GridEntityXMLType): boolean;
|
|
140
145
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gridEntities.d.ts","sourceRoot":"","sources":["../../../src/functions/gridEntities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAGL,cAAc,EAIf,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"gridEntities.d.ts","sourceRoot":"","sources":["../../../src/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CAC3C,GAAG,cAAc,EAAE,cAAc,EAAE,GAClC,UAAU,EAAE,CAYd;AAED;;;;;;GAMG;AACH,wBAAgB,mCAAmC,CACjD,QAAQ,EAAE,MAAM,EAAE,EAClB,UAAU,EAAE,UAAU,GACrB,IAAI,CAON;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,aAAa,EACxD,YAAY,EAAE,CAAC,EAAE,EACjB,UAAU,EAAE,OAAO,EACnB,GAAG,CAAC,EAAE,GAAG,GACR,CAAC,EAAE,CAoBL;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAC9B,qBAAqB,EAAE,UAAU,GAAG,GAAG,EACvC,UAAU,EAAE,OAAO,GAClB,IAAI,CAqCN;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAGnE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,gBAAgB,EAAE,GAAG,GAAG,OAAO,CAwD7D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,cAAc,EAAE,cAAc,EAC9B,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAExB;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,GAAG,EACZ,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAgCxB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,GAAG,GAAG,UAAU,GAAG,SAAS,CAkBtE"}
|
|
@@ -14,6 +14,8 @@ local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
|
14
14
|
local PoopGridEntityVariant = ____isaac_2Dtypescript_2Ddefinitions.PoopGridEntityVariant
|
|
15
15
|
local StatueVariant = ____isaac_2Dtypescript_2Ddefinitions.StatueVariant
|
|
16
16
|
local TrapdoorVariant = ____isaac_2Dtypescript_2Ddefinitions.TrapdoorVariant
|
|
17
|
+
local ____cachedEnumValues = require("src.arrays.cachedEnumValues")
|
|
18
|
+
local GRID_ENTITY_XML_TYPE_VALUES = ____cachedEnumValues.GRID_ENTITY_XML_TYPE_VALUES
|
|
17
19
|
local ____cachedClasses = require("src.core.cachedClasses")
|
|
18
20
|
local game = ____cachedClasses.game
|
|
19
21
|
local ____constants = require("src.core.constants")
|
|
@@ -40,7 +42,7 @@ local ____rooms = require("src.functions.rooms")
|
|
|
40
42
|
local roomUpdateSafe = ____rooms.roomUpdateSafe
|
|
41
43
|
local ____types = require("src.functions.types")
|
|
42
44
|
local asNumber = ____types.asNumber
|
|
43
|
-
local
|
|
45
|
+
local isInteger = ____types.isInteger
|
|
44
46
|
local ____utils = require("src.functions.utils")
|
|
45
47
|
local assertDefined = ____utils.assertDefined
|
|
46
48
|
local eRange = ____utils.eRange
|
|
@@ -97,20 +99,20 @@ end
|
|
|
97
99
|
-- this to false if you need to run this function multiple times.
|
|
98
100
|
function ____exports.removeGridEntity(self, gridEntityOrGridIndex, updateRoom)
|
|
99
101
|
local room = game:GetRoom()
|
|
100
|
-
local
|
|
101
|
-
if
|
|
102
|
-
|
|
102
|
+
local ____isInteger_result_2
|
|
103
|
+
if isInteger(nil, gridEntityOrGridIndex) then
|
|
104
|
+
____isInteger_result_2 = room:GetGridEntity(gridEntityOrGridIndex)
|
|
103
105
|
else
|
|
104
|
-
|
|
106
|
+
____isInteger_result_2 = gridEntityOrGridIndex
|
|
105
107
|
end
|
|
106
|
-
local gridEntity =
|
|
108
|
+
local gridEntity = ____isInteger_result_2
|
|
107
109
|
if gridEntity == nil then
|
|
108
110
|
return
|
|
109
111
|
end
|
|
110
112
|
local gridEntityType = gridEntity:GetType()
|
|
111
113
|
local variant = gridEntity:GetVariant()
|
|
112
114
|
local position = gridEntity.Position
|
|
113
|
-
local gridIndex =
|
|
115
|
+
local gridIndex = isInteger(nil, gridEntityOrGridIndex) and gridEntityOrGridIndex or gridEntityOrGridIndex:GetGridIndex()
|
|
114
116
|
room:RemoveGridEntity(gridIndex, 0, false)
|
|
115
117
|
if updateRoom then
|
|
116
118
|
roomUpdateSafe(nil)
|
|
@@ -158,6 +160,9 @@ function ____exports.spawnGridEntityWithVariant(self, gridEntityType, variant, g
|
|
|
158
160
|
end
|
|
159
161
|
return gridEntity
|
|
160
162
|
end
|
|
163
|
+
--- For some specific grid entities, the variant defined in the XML is what is used by the actual
|
|
164
|
+
-- game (which is not the case for e.g. poops).
|
|
165
|
+
local GRID_ENTITY_TYPES_THAT_KEEP_GRID_ENTITY_XML_VARIANT = __TS__New(ReadonlySet, {GridEntityType.SPIKES_ON_OFF, GridEntityType.PRESSURE_PLATE, GridEntityType.TELEPORTER})
|
|
161
166
|
local BREAKABLE_GRID_ENTITY_TYPES_BY_EXPLOSIONS = __TS__New(ReadonlySet, {
|
|
162
167
|
GridEntityType.ROCK,
|
|
163
168
|
GridEntityType.ROCK_TINTED,
|
|
@@ -175,6 +180,7 @@ local BREAKABLE_GRID_ENTITY_TYPES_VARIANTS_BY_EXPLOSIONS = __TS__New(
|
|
|
175
180
|
ReadonlySet,
|
|
176
181
|
{(tostring(GridEntityType.STATUE) .. ".") .. tostring(StatueVariant.ANGEL)}
|
|
177
182
|
)
|
|
183
|
+
local GRID_ENTITY_XML_TYPES_SET = __TS__New(ReadonlySet, GRID_ENTITY_XML_TYPE_VALUES)
|
|
178
184
|
--- Helper function to convert the grid entity type found in a room XML file to the corresponding
|
|
179
185
|
-- grid entity type and variant normally used by the game. For example, `GridEntityXMLType.ROCK` is
|
|
180
186
|
-- 1000 (in a room XML file), but `GridEntityType.ROCK` is equal to 2 (in-game).
|
|
@@ -186,10 +192,7 @@ function ____exports.convertXMLGridEntityType(self, gridEntityXMLType, gridEntit
|
|
|
186
192
|
"Failed to find an entry in the grid entity map for XML entity type: " .. tostring(gridEntityXMLType)
|
|
187
193
|
)
|
|
188
194
|
local gridEntityType = gridEntityArray[1]
|
|
189
|
-
local variant = gridEntityArray[2]
|
|
190
|
-
if gridEntityType == GridEntityType.SPIKES_ON_OFF or gridEntityType == GridEntityType.PRESSURE_PLATE or gridEntityType == GridEntityType.TELEPORTER then
|
|
191
|
-
variant = gridEntityXMLVariant
|
|
192
|
-
end
|
|
195
|
+
local variant = GRID_ENTITY_TYPES_THAT_KEEP_GRID_ENTITY_XML_VARIANT:has(gridEntityType) and gridEntityXMLVariant or gridEntityArray[2]
|
|
193
196
|
return {gridEntityType, variant}
|
|
194
197
|
end
|
|
195
198
|
--- Helper function to check if one or more of a specific kind of grid entity is present in the
|
|
@@ -337,7 +340,7 @@ function ____exports.getGridEntitiesInRadius(self, targetPosition, radius)
|
|
|
337
340
|
local gridIndex = room:GetGridIndex(position)
|
|
338
341
|
local gridEntity = room:GetGridEntityFromPos(position)
|
|
339
342
|
if gridEntity == nil or registeredGridIndexes:has(gridIndex) then
|
|
340
|
-
goto
|
|
343
|
+
goto __continue23
|
|
341
344
|
end
|
|
342
345
|
registeredGridIndexes:add(gridIndex)
|
|
343
346
|
local ____exports_getGridEntityCollisionPoints_result_1 = ____exports.getGridEntityCollisionPoints(nil, gridEntity)
|
|
@@ -353,7 +356,7 @@ function ____exports.getGridEntitiesInRadius(self, targetPosition, radius)
|
|
|
353
356
|
gridEntities[#gridEntities + 1] = gridEntity
|
|
354
357
|
end
|
|
355
358
|
end
|
|
356
|
-
::
|
|
359
|
+
::__continue23::
|
|
357
360
|
end
|
|
358
361
|
end
|
|
359
362
|
return gridEntities
|
|
@@ -451,6 +454,11 @@ function ____exports.isGridEntityBroken(self, gridEntity)
|
|
|
451
454
|
local brokenState = GRID_ENTITY_TYPE_TO_BROKEN_STATE_MAP:get(gridEntityType)
|
|
452
455
|
return gridEntity.State == brokenState
|
|
453
456
|
end
|
|
457
|
+
--- Helper function to see if an arbitrary number is a valid `GridEntityXMLType`. This is useful in
|
|
458
|
+
-- the `PRE_ROOM_ENTITY_SPAWN` callback for narrowing the type of the first argument.
|
|
459
|
+
function ____exports.isGridEntityXMLType(self, num)
|
|
460
|
+
return GRID_ENTITY_XML_TYPES_SET:has(num)
|
|
461
|
+
end
|
|
454
462
|
--- Helper function to see if a `GridEntityXMLType` is some kind of poop.
|
|
455
463
|
function ____exports.isPoopGridEntityXMLType(self, gridEntityXMLType)
|
|
456
464
|
return POOP_GRID_ENTITY_XML_TYPES_SET:has(gridEntityXMLType)
|
|
@@ -15,7 +15,7 @@ local getRoomGridIndex = ____roomData.getRoomGridIndex
|
|
|
15
15
|
local ____rooms = require("src.functions.rooms")
|
|
16
16
|
local getRoomsInsideGrid = ____rooms.getRoomsInsideGrid
|
|
17
17
|
local ____types = require("src.functions.types")
|
|
18
|
-
local
|
|
18
|
+
local isInteger = ____types.isInteger
|
|
19
19
|
local ____utils = require("src.functions.utils")
|
|
20
20
|
local assertDefined = ____utils.assertDefined
|
|
21
21
|
--- Helper function to get a particular room's minimap display flags (e.g. whether it is visible and
|
|
@@ -178,7 +178,7 @@ function ____exports.isRoomVisible(self, roomGridIndexOrRoomDescriptor, minimapA
|
|
|
178
178
|
if minimapAPI == nil then
|
|
179
179
|
minimapAPI = true
|
|
180
180
|
end
|
|
181
|
-
local roomGridIndex =
|
|
181
|
+
local roomGridIndex = isInteger(nil, roomGridIndexOrRoomDescriptor) and roomGridIndexOrRoomDescriptor or roomGridIndexOrRoomDescriptor.SafeGridIndex
|
|
182
182
|
local roomDisplayFlags = ____exports.getRoomDisplayFlags(nil, roomGridIndex, minimapAPI)
|
|
183
183
|
return roomDisplayFlags ~= DisplayFlagZero
|
|
184
184
|
end
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "../../../functions/gridEntities";
|
|
16
16
|
import { getPlayerFromPtr } from "../../../functions/players";
|
|
17
17
|
import { getRoomListIndex } from "../../../functions/roomData";
|
|
18
|
-
import {
|
|
18
|
+
import { isInteger } from "../../../functions/types";
|
|
19
19
|
import { assertDefined } from "../../../functions/utils";
|
|
20
20
|
import { isVector } from "../../../functions/vector";
|
|
21
21
|
import type { GridEntityCustomData } from "../../../interfaces/GridEntityCustomData";
|
|
@@ -386,7 +386,7 @@ export class CustomGridEntities extends Feature {
|
|
|
386
386
|
return undefined;
|
|
387
387
|
}
|
|
388
388
|
|
|
389
|
-
const gridIndex =
|
|
389
|
+
const gridIndex = isInteger(gridEntityOrGridIndex)
|
|
390
390
|
? gridEntityOrGridIndex
|
|
391
391
|
: gridEntityOrGridIndex.GetGridIndex();
|
|
392
392
|
|
|
@@ -2576,6 +2576,9 @@ export enum ModCallbackCustom {
|
|
|
2576
2576
|
* - You can provide an optional fifth argument that will make the callback only fire if it
|
|
2577
2577
|
* matches the sub-type provided.
|
|
2578
2578
|
*
|
|
2579
|
+
* You can use the `isGridEntityXMLType` helper function to convert the
|
|
2580
|
+
* `entityTypeOrGridEntityXMLType` argument to an `EntityType` or `GridEntityXMLType`, if needed.
|
|
2581
|
+
*
|
|
2579
2582
|
* ```ts
|
|
2580
2583
|
* function preRoomEntitySpawnFilter(
|
|
2581
2584
|
* entityTypeOrGridEntityXMLType: EntityType | GridEntityXMLType,
|
package/src/functions/bitwise.ts
CHANGED
|
@@ -22,21 +22,21 @@ export function convertBinaryToDecimal(bits: int[]): number {
|
|
|
22
22
|
/**
|
|
23
23
|
* Helper function to convert a number to an array of bits.
|
|
24
24
|
*
|
|
25
|
-
* @param
|
|
25
|
+
* @param num The number to convert.
|
|
26
26
|
* @param minLength Optional. Equal to the minimum amount of bits that should be returned. If the
|
|
27
27
|
* converted number of bits is below this number, 0's will be padded to the left
|
|
28
28
|
* side until the minimum length is met. Default is undefined (which will not cause
|
|
29
29
|
* any padding).
|
|
30
30
|
*/
|
|
31
|
-
export function convertDecimalToBinary(
|
|
31
|
+
export function convertDecimalToBinary(num: number, minLength?: int): int[] {
|
|
32
32
|
const bits: int[] = [];
|
|
33
33
|
|
|
34
|
-
const bitsString =
|
|
34
|
+
const bitsString = num.toString(2);
|
|
35
35
|
for (const bitString of bitsString) {
|
|
36
36
|
const bit = tonumber(bitString);
|
|
37
37
|
assertDefined(
|
|
38
38
|
bit,
|
|
39
|
-
`Failed to convert the following number to binary: ${
|
|
39
|
+
`Failed to convert the following number to binary: ${num}`,
|
|
40
40
|
);
|
|
41
41
|
|
|
42
42
|
bits.push(bit);
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import type { CollectibleType } from "isaac-typescript-definitions";
|
|
2
2
|
import { ItemConfigTag } from "isaac-typescript-definitions";
|
|
3
3
|
import { itemConfig } from "../core/cachedClasses";
|
|
4
|
+
import { isInteger } from "./types";
|
|
4
5
|
|
|
5
6
|
export function collectibleHasTag(
|
|
6
|
-
|
|
7
|
+
collectibleOrCollectibleType: EntityPickupCollectible | CollectibleType,
|
|
7
8
|
tag: ItemConfigTag,
|
|
8
9
|
): boolean {
|
|
10
|
+
const collectibleType = isInteger(collectibleOrCollectibleType)
|
|
11
|
+
? collectibleOrCollectibleType
|
|
12
|
+
: collectibleOrCollectibleType.SubType;
|
|
13
|
+
|
|
9
14
|
const itemConfigItem = itemConfig.GetCollectible(collectibleType);
|
|
10
15
|
if (itemConfigItem === undefined) {
|
|
11
16
|
return false;
|
|
@@ -14,6 +19,12 @@ export function collectibleHasTag(
|
|
|
14
19
|
return itemConfigItem.HasTags(tag);
|
|
15
20
|
}
|
|
16
21
|
|
|
17
|
-
export function isQuestCollectible(
|
|
22
|
+
export function isQuestCollectible(
|
|
23
|
+
collectibleOrCollectibleType: EntityPickupCollectible | CollectibleType,
|
|
24
|
+
): boolean {
|
|
25
|
+
const collectibleType = isInteger(collectibleOrCollectibleType)
|
|
26
|
+
? collectibleOrCollectibleType
|
|
27
|
+
: collectibleOrCollectibleType.SubType;
|
|
28
|
+
|
|
18
29
|
return collectibleHasTag(collectibleType, ItemConfigTag.QUEST);
|
|
19
30
|
}
|
|
@@ -33,7 +33,7 @@ import { getEntityID } from "./entities";
|
|
|
33
33
|
import { hasFlag } from "./flag";
|
|
34
34
|
import { isCollectible } from "./pickupVariants";
|
|
35
35
|
import { clearSprite, spriteEquals } from "./sprites";
|
|
36
|
-
import {
|
|
36
|
+
import { isInteger } from "./types";
|
|
37
37
|
import { iRange } from "./utils";
|
|
38
38
|
|
|
39
39
|
const COLLECTIBLE_ANM2_PATH = "gfx/005.100_collectible.anm2";
|
|
@@ -754,9 +754,8 @@ function getCollectibleTypeFromArg(
|
|
|
754
754
|
collectibleOrCollectibleType: EntityPickup | CollectibleType,
|
|
755
755
|
functionName: string,
|
|
756
756
|
): CollectibleType {
|
|
757
|
-
if (
|
|
758
|
-
|
|
759
|
-
return collectibleType;
|
|
757
|
+
if (isInteger(collectibleOrCollectibleType)) {
|
|
758
|
+
return collectibleOrCollectibleType;
|
|
760
759
|
}
|
|
761
760
|
|
|
762
761
|
const collectible = collectibleOrCollectibleType;
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
StatueVariant,
|
|
8
8
|
TrapdoorVariant,
|
|
9
9
|
} from "isaac-typescript-definitions";
|
|
10
|
+
import { GRID_ENTITY_XML_TYPE_VALUES } from "../arrays/cachedEnumValues";
|
|
10
11
|
import { game } from "../core/cachedClasses";
|
|
11
12
|
import { DISTANCE_OF_GRID_TILE, VectorOne } from "../core/constants";
|
|
12
13
|
import { GRID_ENTITY_TYPE_TO_BROKEN_STATE_MAP } from "../maps/gridEntityTypeToBrokenStateMap";
|
|
@@ -23,10 +24,20 @@ import { removeEntities } from "./entities";
|
|
|
23
24
|
import { getEffects } from "./entitiesSpecific";
|
|
24
25
|
import { isCircleIntersectingRectangle } from "./math";
|
|
25
26
|
import { roomUpdateSafe } from "./rooms";
|
|
26
|
-
import { asNumber,
|
|
27
|
+
import { asNumber, isInteger } from "./types";
|
|
27
28
|
import { assertDefined, eRange, iRange } from "./utils";
|
|
28
29
|
import { isVector, vectorEquals } from "./vector";
|
|
29
30
|
|
|
31
|
+
/**
|
|
32
|
+
* For some specific grid entities, the variant defined in the XML is what is used by the actual
|
|
33
|
+
* game (which is not the case for e.g. poops).
|
|
34
|
+
*/
|
|
35
|
+
const GRID_ENTITY_TYPES_THAT_KEEP_GRID_ENTITY_XML_VARIANT = new ReadonlySet([
|
|
36
|
+
GridEntityType.SPIKES_ON_OFF, // 9
|
|
37
|
+
GridEntityType.PRESSURE_PLATE, // 20
|
|
38
|
+
GridEntityType.TELEPORTER, // 23
|
|
39
|
+
]);
|
|
40
|
+
|
|
30
41
|
const BREAKABLE_GRID_ENTITY_TYPES_BY_EXPLOSIONS =
|
|
31
42
|
new ReadonlySet<GridEntityType>([
|
|
32
43
|
GridEntityType.ROCK, // 2
|
|
@@ -47,6 +58,8 @@ const BREAKABLE_GRID_ENTITY_TYPES_BY_EXPLOSIONS =
|
|
|
47
58
|
const BREAKABLE_GRID_ENTITY_TYPES_VARIANTS_BY_EXPLOSIONS =
|
|
48
59
|
new ReadonlySet<string>([`${GridEntityType.STATUE}.${StatueVariant.ANGEL}`]);
|
|
49
60
|
|
|
61
|
+
const GRID_ENTITY_XML_TYPES_SET = new ReadonlySet(GRID_ENTITY_XML_TYPE_VALUES);
|
|
62
|
+
|
|
50
63
|
/**
|
|
51
64
|
* Helper function to convert the grid entity type found in a room XML file to the corresponding
|
|
52
65
|
* grid entity type and variant normally used by the game. For example, `GridEntityXMLType.ROCK` is
|
|
@@ -63,17 +76,11 @@ export function convertXMLGridEntityType(
|
|
|
63
76
|
);
|
|
64
77
|
|
|
65
78
|
const gridEntityType = gridEntityArray[0];
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
gridEntityType === GridEntityType.SPIKES_ON_OFF || // 9
|
|
72
|
-
gridEntityType === GridEntityType.PRESSURE_PLATE || // 20
|
|
73
|
-
gridEntityType === GridEntityType.TELEPORTER // 23
|
|
74
|
-
) {
|
|
75
|
-
variant = gridEntityXMLVariant;
|
|
76
|
-
}
|
|
79
|
+
const variant = GRID_ENTITY_TYPES_THAT_KEEP_GRID_ENTITY_XML_VARIANT.has(
|
|
80
|
+
gridEntityType,
|
|
81
|
+
)
|
|
82
|
+
? gridEntityXMLVariant
|
|
83
|
+
: gridEntityArray[1];
|
|
77
84
|
|
|
78
85
|
return [gridEntityType, variant];
|
|
79
86
|
}
|
|
@@ -477,6 +484,14 @@ export function isGridEntityBroken(gridEntity: GridEntity): boolean {
|
|
|
477
484
|
return gridEntity.State === brokenState;
|
|
478
485
|
}
|
|
479
486
|
|
|
487
|
+
/**
|
|
488
|
+
* Helper function to see if an arbitrary number is a valid `GridEntityXMLType`. This is useful in
|
|
489
|
+
* the `PRE_ROOM_ENTITY_SPAWN` callback for narrowing the type of the first argument.
|
|
490
|
+
*/
|
|
491
|
+
export function isGridEntityXMLType(num: number): num is GridEntityXMLType {
|
|
492
|
+
return GRID_ENTITY_XML_TYPES_SET.has(num); // eslint-disable-line isaacscript/strict-enums
|
|
493
|
+
}
|
|
494
|
+
|
|
480
495
|
/** Helper function to see if a `GridEntityXMLType` is some kind of poop. */
|
|
481
496
|
export function isPoopGridEntityXMLType(
|
|
482
497
|
gridEntityXMLType: GridEntityXMLType,
|
|
@@ -647,7 +662,7 @@ export function removeGridEntity(
|
|
|
647
662
|
): void {
|
|
648
663
|
const room = game.GetRoom();
|
|
649
664
|
|
|
650
|
-
const gridEntity =
|
|
665
|
+
const gridEntity = isInteger(gridEntityOrGridIndex)
|
|
651
666
|
? room.GetGridEntity(gridEntityOrGridIndex)
|
|
652
667
|
: gridEntityOrGridIndex;
|
|
653
668
|
if (gridEntity === undefined) {
|
|
@@ -659,7 +674,7 @@ export function removeGridEntity(
|
|
|
659
674
|
const variant = gridEntity.GetVariant();
|
|
660
675
|
const position = gridEntity.Position;
|
|
661
676
|
|
|
662
|
-
const gridIndex =
|
|
677
|
+
const gridIndex = isInteger(gridEntityOrGridIndex)
|
|
663
678
|
? gridEntityOrGridIndex
|
|
664
679
|
: gridEntityOrGridIndex.GetGridIndex();
|
|
665
680
|
room.RemoveGridEntity(gridIndex, 0, false);
|
package/src/functions/minimap.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { game } from "../core/cachedClasses";
|
|
|
4
4
|
import { addFlag } from "./flag";
|
|
5
5
|
import { getRoomDescriptor, getRoomGridIndex } from "./roomData";
|
|
6
6
|
import { getRoomsInsideGrid } from "./rooms";
|
|
7
|
-
import {
|
|
7
|
+
import { isInteger } from "./types";
|
|
8
8
|
import { assertDefined } from "./utils";
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -145,7 +145,7 @@ export function isRoomVisible(
|
|
|
145
145
|
roomGridIndexOrRoomDescriptor: int | RoomDescriptor,
|
|
146
146
|
minimapAPI = true,
|
|
147
147
|
): boolean {
|
|
148
|
-
const roomGridIndex =
|
|
148
|
+
const roomGridIndex = isInteger(roomGridIndexOrRoomDescriptor)
|
|
149
149
|
? roomGridIndexOrRoomDescriptor
|
|
150
150
|
: roomGridIndexOrRoomDescriptor.SafeGridIndex;
|
|
151
151
|
const roomDisplayFlags = getRoomDisplayFlags(roomGridIndex, minimapAPI);
|