isaacscript-common 67.2.0 → 68.0.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 +17 -38
- package/dist/isaacscript-common.lua +5 -37
- package/dist/src/functions/collectibles.d.ts +3 -1
- package/dist/src/functions/collectibles.d.ts.map +1 -1
- package/dist/src/functions/collectibles.lua +6 -1
- package/dist/src/functions/frames.d.ts +13 -37
- package/dist/src/functions/frames.d.ts.map +1 -1
- package/dist/src/functions/frames.lua +1 -61
- package/package.json +1 -1
- package/src/functions/collectibles.ts +9 -1
- package/src/functions/frames.ts +13 -109
package/dist/index.rollup.d.ts
CHANGED
|
@@ -8574,7 +8574,7 @@ export declare function isActionTriggered(controllerIndex: ControllerIndex, ...b
|
|
|
8574
8574
|
*/
|
|
8575
8575
|
export declare function isActionTriggeredOnAnyInput(...buttonActions: ButtonAction[]): boolean;
|
|
8576
8576
|
|
|
8577
|
-
/** Returns true if the item type in the item config is equal to `ItemType.
|
|
8577
|
+
/** Returns true if the item type in the item config is equal to `ItemType.ACTIVE`. */
|
|
8578
8578
|
export declare function isActiveCollectible(collectibleType: CollectibleType): boolean;
|
|
8579
8579
|
|
|
8580
8580
|
/**
|
|
@@ -8597,26 +8597,20 @@ export declare function isActiveSlotEmpty(player: EntityPlayer, activeSlot?: Act
|
|
|
8597
8597
|
/**
|
|
8598
8598
|
* Helper function to check if the current game frame count is higher than a specific game frame
|
|
8599
8599
|
* count.
|
|
8600
|
-
*
|
|
8601
|
-
* This returns false if the submitted game frame count is null or undefined.
|
|
8602
8600
|
*/
|
|
8603
|
-
export declare function isAfterGameFrame(gameFrameCount: int
|
|
8601
|
+
export declare function isAfterGameFrame(gameFrameCount: int): boolean;
|
|
8604
8602
|
|
|
8605
8603
|
/**
|
|
8606
8604
|
* Helper function to check if the current render frame count is higher than a specific render frame
|
|
8607
8605
|
* count.
|
|
8608
|
-
*
|
|
8609
|
-
* This returns false if the submitted render frame count is null or undefined.
|
|
8610
8606
|
*/
|
|
8611
|
-
export declare function isAfterRenderFrame(renderFrameCount: int
|
|
8607
|
+
export declare function isAfterRenderFrame(renderFrameCount: int): boolean;
|
|
8612
8608
|
|
|
8613
8609
|
/**
|
|
8614
8610
|
* Helper function to check if the current room frame count is higher than a specific room frame
|
|
8615
8611
|
* count.
|
|
8616
|
-
*
|
|
8617
|
-
* This returns false if the submitted room frame count is null or undefined.
|
|
8618
8612
|
*/
|
|
8619
|
-
export declare function isAfterRoomFrame(roomFrameCount: int
|
|
8613
|
+
export declare function isAfterRoomFrame(roomFrameCount: int): boolean;
|
|
8620
8614
|
|
|
8621
8615
|
/**
|
|
8622
8616
|
* Checks for specific NPCs that have "CanShutDoors" set to true naturally by the game, but should
|
|
@@ -8701,26 +8695,20 @@ export declare function isBeastRoom(roomData: RoomConfig): boolean;
|
|
|
8701
8695
|
/**
|
|
8702
8696
|
* Helper function to check if the current game frame count is lower than a specific game frame
|
|
8703
8697
|
* count.
|
|
8704
|
-
*
|
|
8705
|
-
* This returns false if the submitted game frame count is null or undefined.
|
|
8706
8698
|
*/
|
|
8707
|
-
export declare function isBeforeGameFrame(gameFrameCount: int
|
|
8699
|
+
export declare function isBeforeGameFrame(gameFrameCount: int): boolean;
|
|
8708
8700
|
|
|
8709
8701
|
/**
|
|
8710
8702
|
* Helper function to check if the current render frame count is lower than a specific render frame
|
|
8711
8703
|
* count.
|
|
8712
|
-
*
|
|
8713
|
-
* This returns false if the submitted render frame count is null or undefined.
|
|
8714
8704
|
*/
|
|
8715
|
-
export declare function isBeforeRenderFrame(renderFrameCount: int
|
|
8705
|
+
export declare function isBeforeRenderFrame(renderFrameCount: int): boolean;
|
|
8716
8706
|
|
|
8717
8707
|
/**
|
|
8718
8708
|
* Helper function to check if the current room frame count is lower than a specific room frame
|
|
8719
8709
|
* count.
|
|
8720
|
-
*
|
|
8721
|
-
* This returns false if the submitted room frame count is null or undefined.
|
|
8722
8710
|
*/
|
|
8723
|
-
export declare function isBeforeRoomFrame(roomFrameCount: int
|
|
8711
|
+
export declare function isBeforeRoomFrame(roomFrameCount: int): boolean;
|
|
8724
8712
|
|
|
8725
8713
|
/**
|
|
8726
8714
|
* Helper function for detecting when a player is Bethany or Tainted Bethany. This is useful if you
|
|
@@ -9175,6 +9163,9 @@ export declare function isEven(num: int): boolean;
|
|
|
9175
9163
|
/** Helper function to detect if a variable is of type `EntityFamiliar`. */
|
|
9176
9164
|
export declare function isFamiliar(variable: unknown): variable is EntityFamiliar;
|
|
9177
9165
|
|
|
9166
|
+
/** Returns true if the item type in the item config is equal to `ItemType.FAMILIAR`. */
|
|
9167
|
+
export declare function isFamiliarCollectible(collectibleType: CollectibleType): boolean;
|
|
9168
|
+
|
|
9178
9169
|
/**
|
|
9179
9170
|
* Helper function to detect if the given familiar is "stolen" by The Siren boss.
|
|
9180
9171
|
*
|
|
@@ -14472,57 +14463,45 @@ export declare function onFirstFloor(): boolean;
|
|
|
14472
14463
|
* Helper function to check if the current game frame count is exactly equal to a specific game
|
|
14473
14464
|
* frame count.
|
|
14474
14465
|
*
|
|
14475
|
-
* This returns false if the submitted
|
|
14466
|
+
* This returns false if the submitted render frame count is null or undefined.
|
|
14476
14467
|
*/
|
|
14477
14468
|
export declare function onGameFrame(gameFrameCount: int | null | undefined): boolean;
|
|
14478
14469
|
|
|
14479
14470
|
/**
|
|
14480
14471
|
* Helper function to check if the current game frame count is equal to or higher than a specific
|
|
14481
14472
|
* game frame count.
|
|
14482
|
-
*
|
|
14483
|
-
* This returns false if the submitted game frame count is null or undefined.
|
|
14484
14473
|
*/
|
|
14485
|
-
export declare function onOrAfterGameFrame(gameFrameCount: int
|
|
14474
|
+
export declare function onOrAfterGameFrame(gameFrameCount: int): boolean;
|
|
14486
14475
|
|
|
14487
14476
|
/**
|
|
14488
14477
|
* Helper function to check if the current render frame count is equal to or higher than a specific
|
|
14489
14478
|
* render frame count.
|
|
14490
|
-
*
|
|
14491
|
-
* This returns false if the submitted render frame count is null or undefined.
|
|
14492
14479
|
*/
|
|
14493
|
-
export declare function onOrAfterRenderFrame(renderFrameCount: int
|
|
14480
|
+
export declare function onOrAfterRenderFrame(renderFrameCount: int): boolean;
|
|
14494
14481
|
|
|
14495
14482
|
/**
|
|
14496
14483
|
* Helper function to check if the current room frame count is equal to or higher than a specific
|
|
14497
14484
|
* room frame count.
|
|
14498
|
-
*
|
|
14499
|
-
* This returns false if the submitted room frame count is null or undefined.
|
|
14500
14485
|
*/
|
|
14501
|
-
export declare function onOrAfterRoomFrame(roomFrameCount: int
|
|
14486
|
+
export declare function onOrAfterRoomFrame(roomFrameCount: int): boolean;
|
|
14502
14487
|
|
|
14503
14488
|
/**
|
|
14504
14489
|
* Helper function to check if the current game frame count is equal to or lower than a specific
|
|
14505
14490
|
* game frame count.
|
|
14506
|
-
*
|
|
14507
|
-
* This returns false if the submitted game frame count is null or undefined.
|
|
14508
14491
|
*/
|
|
14509
|
-
export declare function onOrBeforeGameFrame(gameFrameCount: int
|
|
14492
|
+
export declare function onOrBeforeGameFrame(gameFrameCount: int): boolean;
|
|
14510
14493
|
|
|
14511
14494
|
/**
|
|
14512
14495
|
* Helper function to check if the current render frame count is equal to or lower than a specific
|
|
14513
14496
|
* render frame count.
|
|
14514
|
-
*
|
|
14515
|
-
* This returns false if the submitted render frame count is null or undefined.
|
|
14516
14497
|
*/
|
|
14517
|
-
export declare function onOrBeforeRenderFrame(renderFrameCount: int
|
|
14498
|
+
export declare function onOrBeforeRenderFrame(renderFrameCount: int): boolean;
|
|
14518
14499
|
|
|
14519
14500
|
/**
|
|
14520
14501
|
* Helper function to check if the current room frame count is equal to or lower than a specific
|
|
14521
14502
|
* room frame count.
|
|
14522
|
-
*
|
|
14523
|
-
* This returns false if the submitted room frame count is null or undefined.
|
|
14524
14503
|
*/
|
|
14525
|
-
export declare function onOrBeforeRoomFrame(roomFrameCount: int
|
|
14504
|
+
export declare function onOrBeforeRoomFrame(roomFrameCount: int): boolean;
|
|
14526
14505
|
|
|
14527
14506
|
/**
|
|
14528
14507
|
* Helper function to check if the current render frame count is exactly equal to a specific render
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common
|
|
3
|
+
isaacscript-common 68.0.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -19114,45 +19114,27 @@ function ____exports.getElapsedRoomFramesSince(self, roomFrameCount)
|
|
|
19114
19114
|
return thisRoomFrameCount - roomFrameCount
|
|
19115
19115
|
end
|
|
19116
19116
|
function ____exports.isAfterGameFrame(self, gameFrameCount)
|
|
19117
|
-
if gameFrameCount == nil or gameFrameCount == nil then
|
|
19118
|
-
return false
|
|
19119
|
-
end
|
|
19120
19117
|
local thisGameFrameCount = game:GetFrameCount()
|
|
19121
19118
|
return thisGameFrameCount > gameFrameCount
|
|
19122
19119
|
end
|
|
19123
19120
|
function ____exports.isAfterRenderFrame(self, renderFrameCount)
|
|
19124
|
-
if renderFrameCount == nil or renderFrameCount == nil then
|
|
19125
|
-
return false
|
|
19126
|
-
end
|
|
19127
19121
|
local thisRenderFrameCount = Isaac.GetFrameCount()
|
|
19128
19122
|
return thisRenderFrameCount > renderFrameCount
|
|
19129
19123
|
end
|
|
19130
19124
|
function ____exports.isAfterRoomFrame(self, roomFrameCount)
|
|
19131
|
-
if roomFrameCount == nil or roomFrameCount == nil then
|
|
19132
|
-
return false
|
|
19133
|
-
end
|
|
19134
19125
|
local room = game:GetRoom()
|
|
19135
19126
|
local thisGameFrameCount = room:GetFrameCount()
|
|
19136
19127
|
return thisGameFrameCount > roomFrameCount
|
|
19137
19128
|
end
|
|
19138
19129
|
function ____exports.isBeforeGameFrame(self, gameFrameCount)
|
|
19139
|
-
if gameFrameCount == nil or gameFrameCount == nil then
|
|
19140
|
-
return false
|
|
19141
|
-
end
|
|
19142
19130
|
local thisGameFrameCount = game:GetFrameCount()
|
|
19143
19131
|
return thisGameFrameCount < gameFrameCount
|
|
19144
19132
|
end
|
|
19145
19133
|
function ____exports.isBeforeRenderFrame(self, renderFrameCount)
|
|
19146
|
-
if renderFrameCount == nil or renderFrameCount == nil then
|
|
19147
|
-
return false
|
|
19148
|
-
end
|
|
19149
19134
|
local thisRenderFrameCount = Isaac.GetFrameCount()
|
|
19150
19135
|
return thisRenderFrameCount < renderFrameCount
|
|
19151
19136
|
end
|
|
19152
19137
|
function ____exports.isBeforeRoomFrame(self, roomFrameCount)
|
|
19153
|
-
if roomFrameCount == nil or roomFrameCount == nil then
|
|
19154
|
-
return false
|
|
19155
|
-
end
|
|
19156
19138
|
local room = game:GetRoom()
|
|
19157
19139
|
local thisGameFrameCount = room:GetFrameCount()
|
|
19158
19140
|
return thisGameFrameCount < roomFrameCount
|
|
@@ -19165,45 +19147,27 @@ function ____exports.onGameFrame(self, gameFrameCount)
|
|
|
19165
19147
|
return thisGameFrameCount == gameFrameCount
|
|
19166
19148
|
end
|
|
19167
19149
|
function ____exports.onOrAfterGameFrame(self, gameFrameCount)
|
|
19168
|
-
if gameFrameCount == nil or gameFrameCount == nil then
|
|
19169
|
-
return false
|
|
19170
|
-
end
|
|
19171
19150
|
local thisGameFrameCount = game:GetFrameCount()
|
|
19172
19151
|
return thisGameFrameCount >= gameFrameCount
|
|
19173
19152
|
end
|
|
19174
19153
|
function ____exports.onOrAfterRenderFrame(self, renderFrameCount)
|
|
19175
|
-
if renderFrameCount == nil or renderFrameCount == nil then
|
|
19176
|
-
return false
|
|
19177
|
-
end
|
|
19178
19154
|
local thisRenderFrameCount = Isaac.GetFrameCount()
|
|
19179
19155
|
return thisRenderFrameCount >= renderFrameCount
|
|
19180
19156
|
end
|
|
19181
19157
|
function ____exports.onOrAfterRoomFrame(self, roomFrameCount)
|
|
19182
|
-
if roomFrameCount == nil or roomFrameCount == nil then
|
|
19183
|
-
return false
|
|
19184
|
-
end
|
|
19185
19158
|
local room = game:GetRoom()
|
|
19186
19159
|
local thisGameFrameCount = room:GetFrameCount()
|
|
19187
19160
|
return thisGameFrameCount >= roomFrameCount
|
|
19188
19161
|
end
|
|
19189
19162
|
function ____exports.onOrBeforeGameFrame(self, gameFrameCount)
|
|
19190
|
-
if gameFrameCount == nil or gameFrameCount == nil then
|
|
19191
|
-
return false
|
|
19192
|
-
end
|
|
19193
19163
|
local thisGameFrameCount = game:GetFrameCount()
|
|
19194
19164
|
return thisGameFrameCount <= gameFrameCount
|
|
19195
19165
|
end
|
|
19196
19166
|
function ____exports.onOrBeforeRenderFrame(self, renderFrameCount)
|
|
19197
|
-
if renderFrameCount == nil or renderFrameCount == nil then
|
|
19198
|
-
return false
|
|
19199
|
-
end
|
|
19200
19167
|
local thisRenderFrameCount = Isaac.GetFrameCount()
|
|
19201
19168
|
return thisRenderFrameCount <= renderFrameCount
|
|
19202
19169
|
end
|
|
19203
19170
|
function ____exports.onOrBeforeRoomFrame(self, roomFrameCount)
|
|
19204
|
-
if roomFrameCount == nil or roomFrameCount == nil then
|
|
19205
|
-
return false
|
|
19206
|
-
end
|
|
19207
19171
|
local room = game:GetRoom()
|
|
19208
19172
|
local thisGameFrameCount = room:GetFrameCount()
|
|
19209
19173
|
return thisGameFrameCount <= roomFrameCount
|
|
@@ -24463,6 +24427,10 @@ function ____exports.isBlindCollectible(self, collectible)
|
|
|
24463
24427
|
questionMarkSprite:SetFrame(animation, frame)
|
|
24464
24428
|
return ____exports.collectibleSpriteEquals(nil, sprite, questionMarkSprite)
|
|
24465
24429
|
end
|
|
24430
|
+
function ____exports.isFamiliarCollectible(self, collectibleType)
|
|
24431
|
+
local itemType = ____exports.getCollectibleItemType(nil, collectibleType)
|
|
24432
|
+
return itemType == ItemType.FAMILIAR
|
|
24433
|
+
end
|
|
24466
24434
|
function ____exports.isGlitchedCollectible(self, collectible)
|
|
24467
24435
|
return collectible.Variant == PickupVariant.COLLECTIBLE and collectible.SubType > GLITCHED_ITEM_THRESHOLD
|
|
24468
24436
|
end
|
|
@@ -92,7 +92,7 @@ export declare function getCollectibleTags(collectibleOrCollectibleType: EntityP
|
|
|
92
92
|
* types, use the `getCollectibleTypesOfQuality` helper function instead.
|
|
93
93
|
*/
|
|
94
94
|
export declare function getVanillaCollectibleTypesOfQuality(quality: Quality): ReadonlySet<CollectibleType>;
|
|
95
|
-
/** Returns true if the item type in the item config is equal to `ItemType.
|
|
95
|
+
/** Returns true if the item type in the item config is equal to `ItemType.ACTIVE`. */
|
|
96
96
|
export declare function isActiveCollectible(collectibleType: CollectibleType): boolean;
|
|
97
97
|
/**
|
|
98
98
|
* Returns true if the collectible has a red question mark sprite.
|
|
@@ -101,6 +101,8 @@ export declare function isActiveCollectible(collectibleType: CollectibleType): b
|
|
|
101
101
|
* `RenderMode.WATER_REFLECT`. If this is detected, this function will throw a run-time error.
|
|
102
102
|
*/
|
|
103
103
|
export declare function isBlindCollectible(collectible: EntityPickup): boolean;
|
|
104
|
+
/** Returns true if the item type in the item config is equal to `ItemType.FAMILIAR`. */
|
|
105
|
+
export declare function isFamiliarCollectible(collectibleType: CollectibleType): boolean;
|
|
104
106
|
/**
|
|
105
107
|
* Returns whether the given collectible is a "glitched" item. All items are replaced by glitched
|
|
106
108
|
* items once a player has TMTRAINER. However, glitched items can also "naturally" appear in secret
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collectibles.d.ts","sourceRoot":"","sources":["../../../src/functions/collectibles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,uBAAuB,EACvB,aAAa,EACd,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,eAAe,EAEf,oBAAoB,EAEpB,QAAQ,EACR,WAAW,EAGZ,MAAM,8BAA8B,CAAC;AAgEtC,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAStE;AAED,iGAAiG;AACjG,wBAAgB,uBAAuB,CACrC,4BAA4B,EAAE,YAAY,GAAG,eAAe,EAC5D,SAAS,EAAE,SAAS,GACnB,OAAO,CAYT;AAED,6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AAE,YAAY,GAAG,eAAe,GAC3D,QAAQ,CAAC,aAAa,CAAC,CAQzB;AAED;;;;;GAKG;AACH,wBAAgB,mCAAmC,CACjD,OAAO,EAAE,OAAO,GACf,WAAW,CAAC,eAAe,CAAC,CAS9B;AAED,
|
|
1
|
+
{"version":3,"file":"collectibles.d.ts","sourceRoot":"","sources":["../../../src/functions/collectibles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,uBAAuB,EACvB,aAAa,EACd,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,eAAe,EAEf,oBAAoB,EAEpB,QAAQ,EACR,WAAW,EAGZ,MAAM,8BAA8B,CAAC;AAgEtC,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAStE;AAED,iGAAiG;AACjG,wBAAgB,uBAAuB,CACrC,4BAA4B,EAAE,YAAY,GAAG,eAAe,EAC5D,SAAS,EAAE,SAAS,GACnB,OAAO,CAYT;AAED,6FAA6F;AAC7F,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAsBT;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAC3D,oBAAoB,CAYtB;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAC3D,MAAM,CAqBR;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAC3D,GAAG,CAgBL;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,4BAA4B,EAAE,YAAY,GAAG,eAAe,EAC5D,MAAM,EAAE,YAAY,GACnB,WAAW,CA6Bb;AAED;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CACvC,4BAA4B,EAAE,YAAY,GAAG,eAAe,GAAG,CAAC,CAAC,GAChE,MAAM,CAgB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AI,CAK5D"}
|
|
@@ -352,7 +352,7 @@ function ____exports.getVanillaCollectibleTypesOfQuality(self, quality)
|
|
|
352
352
|
)
|
|
353
353
|
return collectibleTypes
|
|
354
354
|
end
|
|
355
|
-
--- Returns true if the item type in the item config is equal to `ItemType.
|
|
355
|
+
--- Returns true if the item type in the item config is equal to `ItemType.ACTIVE`.
|
|
356
356
|
function ____exports.isActiveCollectible(self, collectibleType)
|
|
357
357
|
local itemType = ____exports.getCollectibleItemType(nil, collectibleType)
|
|
358
358
|
return itemType == ItemType.ACTIVE
|
|
@@ -377,6 +377,11 @@ function ____exports.isBlindCollectible(self, collectible)
|
|
|
377
377
|
questionMarkSprite:SetFrame(animation, frame)
|
|
378
378
|
return ____exports.collectibleSpriteEquals(nil, sprite, questionMarkSprite)
|
|
379
379
|
end
|
|
380
|
+
--- Returns true if the item type in the item config is equal to `ItemType.FAMILIAR`.
|
|
381
|
+
function ____exports.isFamiliarCollectible(self, collectibleType)
|
|
382
|
+
local itemType = ____exports.getCollectibleItemType(nil, collectibleType)
|
|
383
|
+
return itemType == ItemType.FAMILIAR
|
|
384
|
+
end
|
|
380
385
|
--- Returns whether the given collectible is a "glitched" item. All items are replaced by glitched
|
|
381
386
|
-- items once a player has TMTRAINER. However, glitched items can also "naturally" appear in secret
|
|
382
387
|
-- rooms and I AM ERROR rooms if the "Corrupted Data" achievement is unlocked.
|
|
@@ -5,94 +5,70 @@ export declare function getElapsedRoomFramesSince(roomFrameCount: int): int;
|
|
|
5
5
|
/**
|
|
6
6
|
* Helper function to check if the current game frame count is higher than a specific game frame
|
|
7
7
|
* count.
|
|
8
|
-
*
|
|
9
|
-
* This returns false if the submitted game frame count is null or undefined.
|
|
10
8
|
*/
|
|
11
|
-
export declare function isAfterGameFrame(gameFrameCount: int
|
|
9
|
+
export declare function isAfterGameFrame(gameFrameCount: int): boolean;
|
|
12
10
|
/**
|
|
13
11
|
* Helper function to check if the current render frame count is higher than a specific render frame
|
|
14
12
|
* count.
|
|
15
|
-
*
|
|
16
|
-
* This returns false if the submitted render frame count is null or undefined.
|
|
17
13
|
*/
|
|
18
|
-
export declare function isAfterRenderFrame(renderFrameCount: int
|
|
14
|
+
export declare function isAfterRenderFrame(renderFrameCount: int): boolean;
|
|
19
15
|
/**
|
|
20
16
|
* Helper function to check if the current room frame count is higher than a specific room frame
|
|
21
17
|
* count.
|
|
22
|
-
*
|
|
23
|
-
* This returns false if the submitted room frame count is null or undefined.
|
|
24
18
|
*/
|
|
25
|
-
export declare function isAfterRoomFrame(roomFrameCount: int
|
|
19
|
+
export declare function isAfterRoomFrame(roomFrameCount: int): boolean;
|
|
26
20
|
/**
|
|
27
21
|
* Helper function to check if the current game frame count is lower than a specific game frame
|
|
28
22
|
* count.
|
|
29
|
-
*
|
|
30
|
-
* This returns false if the submitted game frame count is null or undefined.
|
|
31
23
|
*/
|
|
32
|
-
export declare function isBeforeGameFrame(gameFrameCount: int
|
|
24
|
+
export declare function isBeforeGameFrame(gameFrameCount: int): boolean;
|
|
33
25
|
/**
|
|
34
26
|
* Helper function to check if the current render frame count is lower than a specific render frame
|
|
35
27
|
* count.
|
|
36
|
-
*
|
|
37
|
-
* This returns false if the submitted render frame count is null or undefined.
|
|
38
28
|
*/
|
|
39
|
-
export declare function isBeforeRenderFrame(renderFrameCount: int
|
|
29
|
+
export declare function isBeforeRenderFrame(renderFrameCount: int): boolean;
|
|
40
30
|
/**
|
|
41
31
|
* Helper function to check if the current room frame count is lower than a specific room frame
|
|
42
32
|
* count.
|
|
43
|
-
*
|
|
44
|
-
* This returns false if the submitted room frame count is null or undefined.
|
|
45
33
|
*/
|
|
46
|
-
export declare function isBeforeRoomFrame(roomFrameCount: int
|
|
34
|
+
export declare function isBeforeRoomFrame(roomFrameCount: int): boolean;
|
|
47
35
|
/**
|
|
48
36
|
* Helper function to check if the current game frame count is exactly equal to a specific game
|
|
49
37
|
* frame count.
|
|
50
38
|
*
|
|
51
|
-
* This returns false if the submitted
|
|
39
|
+
* This returns false if the submitted render frame count is null or undefined.
|
|
52
40
|
*/
|
|
53
41
|
export declare function onGameFrame(gameFrameCount: int | null | undefined): boolean;
|
|
54
42
|
/**
|
|
55
43
|
* Helper function to check if the current game frame count is equal to or higher than a specific
|
|
56
44
|
* game frame count.
|
|
57
|
-
*
|
|
58
|
-
* This returns false if the submitted game frame count is null or undefined.
|
|
59
45
|
*/
|
|
60
|
-
export declare function onOrAfterGameFrame(gameFrameCount: int
|
|
46
|
+
export declare function onOrAfterGameFrame(gameFrameCount: int): boolean;
|
|
61
47
|
/**
|
|
62
48
|
* Helper function to check if the current render frame count is equal to or higher than a specific
|
|
63
49
|
* render frame count.
|
|
64
|
-
*
|
|
65
|
-
* This returns false if the submitted render frame count is null or undefined.
|
|
66
50
|
*/
|
|
67
|
-
export declare function onOrAfterRenderFrame(renderFrameCount: int
|
|
51
|
+
export declare function onOrAfterRenderFrame(renderFrameCount: int): boolean;
|
|
68
52
|
/**
|
|
69
53
|
* Helper function to check if the current room frame count is equal to or higher than a specific
|
|
70
54
|
* room frame count.
|
|
71
|
-
*
|
|
72
|
-
* This returns false if the submitted room frame count is null or undefined.
|
|
73
55
|
*/
|
|
74
|
-
export declare function onOrAfterRoomFrame(roomFrameCount: int
|
|
56
|
+
export declare function onOrAfterRoomFrame(roomFrameCount: int): boolean;
|
|
75
57
|
/**
|
|
76
58
|
* Helper function to check if the current game frame count is equal to or lower than a specific
|
|
77
59
|
* game frame count.
|
|
78
|
-
*
|
|
79
|
-
* This returns false if the submitted game frame count is null or undefined.
|
|
80
60
|
*/
|
|
81
|
-
export declare function onOrBeforeGameFrame(gameFrameCount: int
|
|
61
|
+
export declare function onOrBeforeGameFrame(gameFrameCount: int): boolean;
|
|
82
62
|
/**
|
|
83
63
|
* Helper function to check if the current render frame count is equal to or lower than a specific
|
|
84
64
|
* render frame count.
|
|
85
|
-
*
|
|
86
|
-
* This returns false if the submitted render frame count is null or undefined.
|
|
87
65
|
*/
|
|
88
|
-
export declare function onOrBeforeRenderFrame(renderFrameCount: int
|
|
66
|
+
export declare function onOrBeforeRenderFrame(renderFrameCount: int): boolean;
|
|
89
67
|
/**
|
|
90
68
|
* Helper function to check if the current room frame count is equal to or lower than a specific
|
|
91
69
|
* room frame count.
|
|
92
|
-
*
|
|
93
|
-
* This returns false if the submitted room frame count is null or undefined.
|
|
94
70
|
*/
|
|
95
|
-
export declare function onOrBeforeRoomFrame(roomFrameCount: int
|
|
71
|
+
export declare function onOrBeforeRoomFrame(roomFrameCount: int): boolean;
|
|
96
72
|
/**
|
|
97
73
|
* Helper function to check if the current render frame count is exactly equal to a specific render
|
|
98
74
|
* frame count.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frames.d.ts","sourceRoot":"","sources":["../../../src/functions/frames.ts"],"names":[],"mappings":";AAEA,wBAAgB,yBAAyB,CAAC,cAAc,EAAE,GAAG,GAAG,GAAG,CAGlE;AAED,wBAAgB,2BAA2B,CAAC,gBAAgB,EAAE,GAAG,GAAG,GAAG,CAGtE;AAED,wBAAgB,yBAAyB,CAAC,cAAc,EAAE,GAAG,GAAG,GAAG,CAIlE;AAED
|
|
1
|
+
{"version":3,"file":"frames.d.ts","sourceRoot":"","sources":["../../../src/functions/frames.ts"],"names":[],"mappings":";AAEA,wBAAgB,yBAAyB,CAAC,cAAc,EAAE,GAAG,GAAG,GAAG,CAGlE;AAED,wBAAgB,2BAA2B,CAAC,gBAAgB,EAAE,GAAG,GAAG,GAAG,CAGtE;AAED,wBAAgB,yBAAyB,CAAC,cAAc,EAAE,GAAG,GAAG,GAAG,CAIlE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,cAAc,EAAE,GAAG,GAAG,OAAO,CAG7D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,gBAAgB,EAAE,GAAG,GAAG,OAAO,CAGjE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,cAAc,EAAE,GAAG,GAAG,OAAO,CAK7D;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,GAAG,GAAG,OAAO,CAG9D;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,gBAAgB,EAAE,GAAG,GAAG,OAAO,CAGlE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,GAAG,GAAG,OAAO,CAK9D;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,cAAc,EAAE,GAAG,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAO3E;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,cAAc,EAAE,GAAG,GAAG,OAAO,CAG/D;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,gBAAgB,EAAE,GAAG,GAAG,OAAO,CAGnE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,cAAc,EAAE,GAAG,GAAG,OAAO,CAK/D;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,cAAc,EAAE,GAAG,GAAG,OAAO,CAGhE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,gBAAgB,EAAE,GAAG,GAAG,OAAO,CAGpE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,cAAc,EAAE,GAAG,GAAG,OAAO,CAKhE;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,gBAAgB,EAAE,GAAG,GAAG,IAAI,GAAG,SAAS,GACvC,OAAO,CAOT;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,cAAc,EAAE,GAAG,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAS3E"}
|
|
@@ -16,68 +16,38 @@ function ____exports.getElapsedRoomFramesSince(self, roomFrameCount)
|
|
|
16
16
|
end
|
|
17
17
|
--- Helper function to check if the current game frame count is higher than a specific game frame
|
|
18
18
|
-- count.
|
|
19
|
-
--
|
|
20
|
-
-- This returns false if the submitted game frame count is null or undefined.
|
|
21
19
|
function ____exports.isAfterGameFrame(self, gameFrameCount)
|
|
22
|
-
if gameFrameCount == nil or gameFrameCount == nil then
|
|
23
|
-
return false
|
|
24
|
-
end
|
|
25
20
|
local thisGameFrameCount = game:GetFrameCount()
|
|
26
21
|
return thisGameFrameCount > gameFrameCount
|
|
27
22
|
end
|
|
28
23
|
--- Helper function to check if the current render frame count is higher than a specific render frame
|
|
29
24
|
-- count.
|
|
30
|
-
--
|
|
31
|
-
-- This returns false if the submitted render frame count is null or undefined.
|
|
32
25
|
function ____exports.isAfterRenderFrame(self, renderFrameCount)
|
|
33
|
-
if renderFrameCount == nil or renderFrameCount == nil then
|
|
34
|
-
return false
|
|
35
|
-
end
|
|
36
26
|
local thisRenderFrameCount = Isaac.GetFrameCount()
|
|
37
27
|
return thisRenderFrameCount > renderFrameCount
|
|
38
28
|
end
|
|
39
29
|
--- Helper function to check if the current room frame count is higher than a specific room frame
|
|
40
30
|
-- count.
|
|
41
|
-
--
|
|
42
|
-
-- This returns false if the submitted room frame count is null or undefined.
|
|
43
31
|
function ____exports.isAfterRoomFrame(self, roomFrameCount)
|
|
44
|
-
if roomFrameCount == nil or roomFrameCount == nil then
|
|
45
|
-
return false
|
|
46
|
-
end
|
|
47
32
|
local room = game:GetRoom()
|
|
48
33
|
local thisGameFrameCount = room:GetFrameCount()
|
|
49
34
|
return thisGameFrameCount > roomFrameCount
|
|
50
35
|
end
|
|
51
36
|
--- Helper function to check if the current game frame count is lower than a specific game frame
|
|
52
37
|
-- count.
|
|
53
|
-
--
|
|
54
|
-
-- This returns false if the submitted game frame count is null or undefined.
|
|
55
38
|
function ____exports.isBeforeGameFrame(self, gameFrameCount)
|
|
56
|
-
if gameFrameCount == nil or gameFrameCount == nil then
|
|
57
|
-
return false
|
|
58
|
-
end
|
|
59
39
|
local thisGameFrameCount = game:GetFrameCount()
|
|
60
40
|
return thisGameFrameCount < gameFrameCount
|
|
61
41
|
end
|
|
62
42
|
--- Helper function to check if the current render frame count is lower than a specific render frame
|
|
63
43
|
-- count.
|
|
64
|
-
--
|
|
65
|
-
-- This returns false if the submitted render frame count is null or undefined.
|
|
66
44
|
function ____exports.isBeforeRenderFrame(self, renderFrameCount)
|
|
67
|
-
if renderFrameCount == nil or renderFrameCount == nil then
|
|
68
|
-
return false
|
|
69
|
-
end
|
|
70
45
|
local thisRenderFrameCount = Isaac.GetFrameCount()
|
|
71
46
|
return thisRenderFrameCount < renderFrameCount
|
|
72
47
|
end
|
|
73
48
|
--- Helper function to check if the current room frame count is lower than a specific room frame
|
|
74
49
|
-- count.
|
|
75
|
-
--
|
|
76
|
-
-- This returns false if the submitted room frame count is null or undefined.
|
|
77
50
|
function ____exports.isBeforeRoomFrame(self, roomFrameCount)
|
|
78
|
-
if roomFrameCount == nil or roomFrameCount == nil then
|
|
79
|
-
return false
|
|
80
|
-
end
|
|
81
51
|
local room = game:GetRoom()
|
|
82
52
|
local thisGameFrameCount = room:GetFrameCount()
|
|
83
53
|
return thisGameFrameCount < roomFrameCount
|
|
@@ -85,7 +55,7 @@ end
|
|
|
85
55
|
--- Helper function to check if the current game frame count is exactly equal to a specific game
|
|
86
56
|
-- frame count.
|
|
87
57
|
--
|
|
88
|
-
-- This returns false if the submitted
|
|
58
|
+
-- This returns false if the submitted render frame count is null or undefined.
|
|
89
59
|
function ____exports.onGameFrame(self, gameFrameCount)
|
|
90
60
|
if gameFrameCount == nil or gameFrameCount == nil then
|
|
91
61
|
return false
|
|
@@ -95,68 +65,38 @@ function ____exports.onGameFrame(self, gameFrameCount)
|
|
|
95
65
|
end
|
|
96
66
|
--- Helper function to check if the current game frame count is equal to or higher than a specific
|
|
97
67
|
-- game frame count.
|
|
98
|
-
--
|
|
99
|
-
-- This returns false if the submitted game frame count is null or undefined.
|
|
100
68
|
function ____exports.onOrAfterGameFrame(self, gameFrameCount)
|
|
101
|
-
if gameFrameCount == nil or gameFrameCount == nil then
|
|
102
|
-
return false
|
|
103
|
-
end
|
|
104
69
|
local thisGameFrameCount = game:GetFrameCount()
|
|
105
70
|
return thisGameFrameCount >= gameFrameCount
|
|
106
71
|
end
|
|
107
72
|
--- Helper function to check if the current render frame count is equal to or higher than a specific
|
|
108
73
|
-- render frame count.
|
|
109
|
-
--
|
|
110
|
-
-- This returns false if the submitted render frame count is null or undefined.
|
|
111
74
|
function ____exports.onOrAfterRenderFrame(self, renderFrameCount)
|
|
112
|
-
if renderFrameCount == nil or renderFrameCount == nil then
|
|
113
|
-
return false
|
|
114
|
-
end
|
|
115
75
|
local thisRenderFrameCount = Isaac.GetFrameCount()
|
|
116
76
|
return thisRenderFrameCount >= renderFrameCount
|
|
117
77
|
end
|
|
118
78
|
--- Helper function to check if the current room frame count is equal to or higher than a specific
|
|
119
79
|
-- room frame count.
|
|
120
|
-
--
|
|
121
|
-
-- This returns false if the submitted room frame count is null or undefined.
|
|
122
80
|
function ____exports.onOrAfterRoomFrame(self, roomFrameCount)
|
|
123
|
-
if roomFrameCount == nil or roomFrameCount == nil then
|
|
124
|
-
return false
|
|
125
|
-
end
|
|
126
81
|
local room = game:GetRoom()
|
|
127
82
|
local thisGameFrameCount = room:GetFrameCount()
|
|
128
83
|
return thisGameFrameCount >= roomFrameCount
|
|
129
84
|
end
|
|
130
85
|
--- Helper function to check if the current game frame count is equal to or lower than a specific
|
|
131
86
|
-- game frame count.
|
|
132
|
-
--
|
|
133
|
-
-- This returns false if the submitted game frame count is null or undefined.
|
|
134
87
|
function ____exports.onOrBeforeGameFrame(self, gameFrameCount)
|
|
135
|
-
if gameFrameCount == nil or gameFrameCount == nil then
|
|
136
|
-
return false
|
|
137
|
-
end
|
|
138
88
|
local thisGameFrameCount = game:GetFrameCount()
|
|
139
89
|
return thisGameFrameCount <= gameFrameCount
|
|
140
90
|
end
|
|
141
91
|
--- Helper function to check if the current render frame count is equal to or lower than a specific
|
|
142
92
|
-- render frame count.
|
|
143
|
-
--
|
|
144
|
-
-- This returns false if the submitted render frame count is null or undefined.
|
|
145
93
|
function ____exports.onOrBeforeRenderFrame(self, renderFrameCount)
|
|
146
|
-
if renderFrameCount == nil or renderFrameCount == nil then
|
|
147
|
-
return false
|
|
148
|
-
end
|
|
149
94
|
local thisRenderFrameCount = Isaac.GetFrameCount()
|
|
150
95
|
return thisRenderFrameCount <= renderFrameCount
|
|
151
96
|
end
|
|
152
97
|
--- Helper function to check if the current room frame count is equal to or lower than a specific
|
|
153
98
|
-- room frame count.
|
|
154
|
-
--
|
|
155
|
-
-- This returns false if the submitted room frame count is null or undefined.
|
|
156
99
|
function ____exports.onOrBeforeRoomFrame(self, roomFrameCount)
|
|
157
|
-
if roomFrameCount == nil or roomFrameCount == nil then
|
|
158
|
-
return false
|
|
159
|
-
end
|
|
160
100
|
local room = game:GetRoom()
|
|
161
101
|
local thisGameFrameCount = room:GetFrameCount()
|
|
162
102
|
return thisGameFrameCount <= roomFrameCount
|
package/package.json
CHANGED
|
@@ -451,7 +451,7 @@ export function getVanillaCollectibleTypesOfQuality(
|
|
|
451
451
|
return collectibleTypes;
|
|
452
452
|
}
|
|
453
453
|
|
|
454
|
-
/** Returns true if the item type in the item config is equal to `ItemType.
|
|
454
|
+
/** Returns true if the item type in the item config is equal to `ItemType.ACTIVE`. */
|
|
455
455
|
export function isActiveCollectible(collectibleType: CollectibleType): boolean {
|
|
456
456
|
const itemType = getCollectibleItemType(collectibleType);
|
|
457
457
|
return itemType === ItemType.ACTIVE;
|
|
@@ -487,6 +487,14 @@ export function isBlindCollectible(collectible: EntityPickup): boolean {
|
|
|
487
487
|
return collectibleSpriteEquals(sprite, questionMarkSprite);
|
|
488
488
|
}
|
|
489
489
|
|
|
490
|
+
/** Returns true if the item type in the item config is equal to `ItemType.FAMILIAR`. */
|
|
491
|
+
export function isFamiliarCollectible(
|
|
492
|
+
collectibleType: CollectibleType,
|
|
493
|
+
): boolean {
|
|
494
|
+
const itemType = getCollectibleItemType(collectibleType);
|
|
495
|
+
return itemType === ItemType.FAMILIAR;
|
|
496
|
+
}
|
|
497
|
+
|
|
490
498
|
/**
|
|
491
499
|
* Returns whether the given collectible is a "glitched" item. All items are replaced by glitched
|
|
492
500
|
* items once a player has TMTRAINER. However, glitched items can also "naturally" appear in secret
|
package/src/functions/frames.ts
CHANGED
|
@@ -19,16 +19,8 @@ export function getElapsedRoomFramesSince(roomFrameCount: int): int {
|
|
|
19
19
|
/**
|
|
20
20
|
* Helper function to check if the current game frame count is higher than a specific game frame
|
|
21
21
|
* count.
|
|
22
|
-
*
|
|
23
|
-
* This returns false if the submitted game frame count is null or undefined.
|
|
24
22
|
*/
|
|
25
|
-
export function isAfterGameFrame(
|
|
26
|
-
gameFrameCount: int | null | undefined,
|
|
27
|
-
): boolean {
|
|
28
|
-
if (gameFrameCount === null || gameFrameCount === undefined) {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
|
|
23
|
+
export function isAfterGameFrame(gameFrameCount: int): boolean {
|
|
32
24
|
const thisGameFrameCount = game.GetFrameCount();
|
|
33
25
|
return thisGameFrameCount > gameFrameCount;
|
|
34
26
|
}
|
|
@@ -36,16 +28,8 @@ export function isAfterGameFrame(
|
|
|
36
28
|
/**
|
|
37
29
|
* Helper function to check if the current render frame count is higher than a specific render frame
|
|
38
30
|
* count.
|
|
39
|
-
*
|
|
40
|
-
* This returns false if the submitted render frame count is null or undefined.
|
|
41
31
|
*/
|
|
42
|
-
export function isAfterRenderFrame(
|
|
43
|
-
renderFrameCount: int | null | undefined,
|
|
44
|
-
): boolean {
|
|
45
|
-
if (renderFrameCount === null || renderFrameCount === undefined) {
|
|
46
|
-
return false;
|
|
47
|
-
}
|
|
48
|
-
|
|
32
|
+
export function isAfterRenderFrame(renderFrameCount: int): boolean {
|
|
49
33
|
const thisRenderFrameCount = Isaac.GetFrameCount();
|
|
50
34
|
return thisRenderFrameCount > renderFrameCount;
|
|
51
35
|
}
|
|
@@ -53,16 +37,8 @@ export function isAfterRenderFrame(
|
|
|
53
37
|
/**
|
|
54
38
|
* Helper function to check if the current room frame count is higher than a specific room frame
|
|
55
39
|
* count.
|
|
56
|
-
*
|
|
57
|
-
* This returns false if the submitted room frame count is null or undefined.
|
|
58
40
|
*/
|
|
59
|
-
export function isAfterRoomFrame(
|
|
60
|
-
roomFrameCount: int | null | undefined,
|
|
61
|
-
): boolean {
|
|
62
|
-
if (roomFrameCount === null || roomFrameCount === undefined) {
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
|
|
41
|
+
export function isAfterRoomFrame(roomFrameCount: int): boolean {
|
|
66
42
|
const room = game.GetRoom();
|
|
67
43
|
|
|
68
44
|
const thisGameFrameCount = room.GetFrameCount();
|
|
@@ -72,16 +48,8 @@ export function isAfterRoomFrame(
|
|
|
72
48
|
/**
|
|
73
49
|
* Helper function to check if the current game frame count is lower than a specific game frame
|
|
74
50
|
* count.
|
|
75
|
-
*
|
|
76
|
-
* This returns false if the submitted game frame count is null or undefined.
|
|
77
51
|
*/
|
|
78
|
-
export function isBeforeGameFrame(
|
|
79
|
-
gameFrameCount: int | null | undefined,
|
|
80
|
-
): boolean {
|
|
81
|
-
if (gameFrameCount === null || gameFrameCount === undefined) {
|
|
82
|
-
return false;
|
|
83
|
-
}
|
|
84
|
-
|
|
52
|
+
export function isBeforeGameFrame(gameFrameCount: int): boolean {
|
|
85
53
|
const thisGameFrameCount = game.GetFrameCount();
|
|
86
54
|
return thisGameFrameCount < gameFrameCount;
|
|
87
55
|
}
|
|
@@ -89,16 +57,8 @@ export function isBeforeGameFrame(
|
|
|
89
57
|
/**
|
|
90
58
|
* Helper function to check if the current render frame count is lower than a specific render frame
|
|
91
59
|
* count.
|
|
92
|
-
*
|
|
93
|
-
* This returns false if the submitted render frame count is null or undefined.
|
|
94
60
|
*/
|
|
95
|
-
export function isBeforeRenderFrame(
|
|
96
|
-
renderFrameCount: int | null | undefined,
|
|
97
|
-
): boolean {
|
|
98
|
-
if (renderFrameCount === null || renderFrameCount === undefined) {
|
|
99
|
-
return false;
|
|
100
|
-
}
|
|
101
|
-
|
|
61
|
+
export function isBeforeRenderFrame(renderFrameCount: int): boolean {
|
|
102
62
|
const thisRenderFrameCount = Isaac.GetFrameCount();
|
|
103
63
|
return thisRenderFrameCount < renderFrameCount;
|
|
104
64
|
}
|
|
@@ -106,16 +66,8 @@ export function isBeforeRenderFrame(
|
|
|
106
66
|
/**
|
|
107
67
|
* Helper function to check if the current room frame count is lower than a specific room frame
|
|
108
68
|
* count.
|
|
109
|
-
*
|
|
110
|
-
* This returns false if the submitted room frame count is null or undefined.
|
|
111
69
|
*/
|
|
112
|
-
export function isBeforeRoomFrame(
|
|
113
|
-
roomFrameCount: int | null | undefined,
|
|
114
|
-
): boolean {
|
|
115
|
-
if (roomFrameCount === null || roomFrameCount === undefined) {
|
|
116
|
-
return false;
|
|
117
|
-
}
|
|
118
|
-
|
|
70
|
+
export function isBeforeRoomFrame(roomFrameCount: int): boolean {
|
|
119
71
|
const room = game.GetRoom();
|
|
120
72
|
|
|
121
73
|
const thisGameFrameCount = room.GetFrameCount();
|
|
@@ -126,7 +78,7 @@ export function isBeforeRoomFrame(
|
|
|
126
78
|
* Helper function to check if the current game frame count is exactly equal to a specific game
|
|
127
79
|
* frame count.
|
|
128
80
|
*
|
|
129
|
-
* This returns false if the submitted
|
|
81
|
+
* This returns false if the submitted render frame count is null or undefined.
|
|
130
82
|
*/
|
|
131
83
|
export function onGameFrame(gameFrameCount: int | null | undefined): boolean {
|
|
132
84
|
if (gameFrameCount === null || gameFrameCount === undefined) {
|
|
@@ -140,16 +92,8 @@ export function onGameFrame(gameFrameCount: int | null | undefined): boolean {
|
|
|
140
92
|
/**
|
|
141
93
|
* Helper function to check if the current game frame count is equal to or higher than a specific
|
|
142
94
|
* game frame count.
|
|
143
|
-
*
|
|
144
|
-
* This returns false if the submitted game frame count is null or undefined.
|
|
145
95
|
*/
|
|
146
|
-
export function onOrAfterGameFrame(
|
|
147
|
-
gameFrameCount: int | null | undefined,
|
|
148
|
-
): boolean {
|
|
149
|
-
if (gameFrameCount === null || gameFrameCount === undefined) {
|
|
150
|
-
return false;
|
|
151
|
-
}
|
|
152
|
-
|
|
96
|
+
export function onOrAfterGameFrame(gameFrameCount: int): boolean {
|
|
153
97
|
const thisGameFrameCount = game.GetFrameCount();
|
|
154
98
|
return thisGameFrameCount >= gameFrameCount;
|
|
155
99
|
}
|
|
@@ -157,16 +101,8 @@ export function onOrAfterGameFrame(
|
|
|
157
101
|
/**
|
|
158
102
|
* Helper function to check if the current render frame count is equal to or higher than a specific
|
|
159
103
|
* render frame count.
|
|
160
|
-
*
|
|
161
|
-
* This returns false if the submitted render frame count is null or undefined.
|
|
162
104
|
*/
|
|
163
|
-
export function onOrAfterRenderFrame(
|
|
164
|
-
renderFrameCount: int | null | undefined,
|
|
165
|
-
): boolean {
|
|
166
|
-
if (renderFrameCount === null || renderFrameCount === undefined) {
|
|
167
|
-
return false;
|
|
168
|
-
}
|
|
169
|
-
|
|
105
|
+
export function onOrAfterRenderFrame(renderFrameCount: int): boolean {
|
|
170
106
|
const thisRenderFrameCount = Isaac.GetFrameCount();
|
|
171
107
|
return thisRenderFrameCount >= renderFrameCount;
|
|
172
108
|
}
|
|
@@ -174,16 +110,8 @@ export function onOrAfterRenderFrame(
|
|
|
174
110
|
/**
|
|
175
111
|
* Helper function to check if the current room frame count is equal to or higher than a specific
|
|
176
112
|
* room frame count.
|
|
177
|
-
*
|
|
178
|
-
* This returns false if the submitted room frame count is null or undefined.
|
|
179
113
|
*/
|
|
180
|
-
export function onOrAfterRoomFrame(
|
|
181
|
-
roomFrameCount: int | null | undefined,
|
|
182
|
-
): boolean {
|
|
183
|
-
if (roomFrameCount === null || roomFrameCount === undefined) {
|
|
184
|
-
return false;
|
|
185
|
-
}
|
|
186
|
-
|
|
114
|
+
export function onOrAfterRoomFrame(roomFrameCount: int): boolean {
|
|
187
115
|
const room = game.GetRoom();
|
|
188
116
|
|
|
189
117
|
const thisGameFrameCount = room.GetFrameCount();
|
|
@@ -193,16 +121,8 @@ export function onOrAfterRoomFrame(
|
|
|
193
121
|
/**
|
|
194
122
|
* Helper function to check if the current game frame count is equal to or lower than a specific
|
|
195
123
|
* game frame count.
|
|
196
|
-
*
|
|
197
|
-
* This returns false if the submitted game frame count is null or undefined.
|
|
198
124
|
*/
|
|
199
|
-
export function onOrBeforeGameFrame(
|
|
200
|
-
gameFrameCount: int | null | undefined,
|
|
201
|
-
): boolean {
|
|
202
|
-
if (gameFrameCount === null || gameFrameCount === undefined) {
|
|
203
|
-
return false;
|
|
204
|
-
}
|
|
205
|
-
|
|
125
|
+
export function onOrBeforeGameFrame(gameFrameCount: int): boolean {
|
|
206
126
|
const thisGameFrameCount = game.GetFrameCount();
|
|
207
127
|
return thisGameFrameCount <= gameFrameCount;
|
|
208
128
|
}
|
|
@@ -210,16 +130,8 @@ export function onOrBeforeGameFrame(
|
|
|
210
130
|
/**
|
|
211
131
|
* Helper function to check if the current render frame count is equal to or lower than a specific
|
|
212
132
|
* render frame count.
|
|
213
|
-
*
|
|
214
|
-
* This returns false if the submitted render frame count is null or undefined.
|
|
215
133
|
*/
|
|
216
|
-
export function onOrBeforeRenderFrame(
|
|
217
|
-
renderFrameCount: int | null | undefined,
|
|
218
|
-
): boolean {
|
|
219
|
-
if (renderFrameCount === null || renderFrameCount === undefined) {
|
|
220
|
-
return false;
|
|
221
|
-
}
|
|
222
|
-
|
|
134
|
+
export function onOrBeforeRenderFrame(renderFrameCount: int): boolean {
|
|
223
135
|
const thisRenderFrameCount = Isaac.GetFrameCount();
|
|
224
136
|
return thisRenderFrameCount <= renderFrameCount;
|
|
225
137
|
}
|
|
@@ -227,16 +139,8 @@ export function onOrBeforeRenderFrame(
|
|
|
227
139
|
/**
|
|
228
140
|
* Helper function to check if the current room frame count is equal to or lower than a specific
|
|
229
141
|
* room frame count.
|
|
230
|
-
*
|
|
231
|
-
* This returns false if the submitted room frame count is null or undefined.
|
|
232
142
|
*/
|
|
233
|
-
export function onOrBeforeRoomFrame(
|
|
234
|
-
roomFrameCount: int | null | undefined,
|
|
235
|
-
): boolean {
|
|
236
|
-
if (roomFrameCount === null || roomFrameCount === undefined) {
|
|
237
|
-
return false;
|
|
238
|
-
}
|
|
239
|
-
|
|
143
|
+
export function onOrBeforeRoomFrame(roomFrameCount: int): boolean {
|
|
240
144
|
const room = game.GetRoom();
|
|
241
145
|
|
|
242
146
|
const thisGameFrameCount = room.GetFrameCount();
|