isaacscript-common 51.10.0 → 51.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.rollup.d.ts +8 -0
- package/dist/isaacscript-common.lua +118 -85
- package/dist/src/functions/collectibles.d.ts +7 -0
- package/dist/src/functions/collectibles.d.ts.map +1 -1
- package/dist/src/functions/collectibles.lua +57 -20
- package/dist/src/sets/bossSets.d.ts.map +1 -1
- package/dist/src/sets/bossSets.lua +2 -0
- package/package.json +1 -1
- package/src/functions/collectibles.ts +51 -6
- package/src/sets/bossSets.ts +2 -0
package/dist/index.rollup.d.ts
CHANGED
|
@@ -7781,6 +7781,14 @@ export declare function getUnusedDoorSlots(): DoorSlot[];
|
|
|
7781
7781
|
*/
|
|
7782
7782
|
export declare function getUsableActiveItemSlots(player: EntityPlayer, collectibleType: CollectibleType): ActiveSlot[];
|
|
7783
7783
|
|
|
7784
|
+
/**
|
|
7785
|
+
* Returns a set containing every vanilla collectible type with the given quality.
|
|
7786
|
+
*
|
|
7787
|
+
* Note that this function will only return vanilla collectible types. To handle modded collectible
|
|
7788
|
+
* types, use the `getCollectibleTypesOfQuality` helper function instead.
|
|
7789
|
+
*/
|
|
7790
|
+
export declare function getVanillaCollectibleTypesOfQuality(quality: Quality): ReadonlySet<CollectibleType>;
|
|
7791
|
+
|
|
7784
7792
|
/**
|
|
7785
7793
|
* Helper function to get the set of grid indexes that represent where the walls are supposed to be
|
|
7786
7794
|
* in a given room shape.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 51.
|
|
3
|
+
isaacscript-common 51.11.1
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -23054,6 +23054,73 @@ function PostHolyMantleRemoved.prototype.____constructor(self)
|
|
|
23054
23054
|
end
|
|
23055
23055
|
self.customCallbacksUsed = {{ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, self.postPEffectUpdateReordered}}
|
|
23056
23056
|
end
|
|
23057
|
+
return ____exports
|
|
23058
|
+
end,
|
|
23059
|
+
["src.core.constantsVanilla"] = function(...)
|
|
23060
|
+
local ____lualib = require("lualib_bundle")
|
|
23061
|
+
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
23062
|
+
local __TS__New = ____lualib.__TS__New
|
|
23063
|
+
local ____exports = {}
|
|
23064
|
+
local ____types = require("src.functions.types")
|
|
23065
|
+
local asCardType = ____types.asCardType
|
|
23066
|
+
local asCollectibleType = ____types.asCollectibleType
|
|
23067
|
+
local asPillEffect = ____types.asPillEffect
|
|
23068
|
+
local asTrinketType = ____types.asTrinketType
|
|
23069
|
+
local ____utils = require("src.functions.utils")
|
|
23070
|
+
local iRange = ____utils.iRange
|
|
23071
|
+
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
23072
|
+
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
23073
|
+
local ____cachedClasses = require("src.core.cachedClasses")
|
|
23074
|
+
local itemConfig = ____cachedClasses.itemConfig
|
|
23075
|
+
local ____constantsFirstLast = require("src.core.constantsFirstLast")
|
|
23076
|
+
local FIRST_CARD_TYPE = ____constantsFirstLast.FIRST_CARD_TYPE
|
|
23077
|
+
local FIRST_COLLECTIBLE_TYPE = ____constantsFirstLast.FIRST_COLLECTIBLE_TYPE
|
|
23078
|
+
local FIRST_PILL_EFFECT = ____constantsFirstLast.FIRST_PILL_EFFECT
|
|
23079
|
+
local FIRST_TRINKET_TYPE = ____constantsFirstLast.FIRST_TRINKET_TYPE
|
|
23080
|
+
local LAST_VANILLA_CARD_TYPE = ____constantsFirstLast.LAST_VANILLA_CARD_TYPE
|
|
23081
|
+
local LAST_VANILLA_COLLECTIBLE_TYPE = ____constantsFirstLast.LAST_VANILLA_COLLECTIBLE_TYPE
|
|
23082
|
+
local LAST_VANILLA_PILL_EFFECT = ____constantsFirstLast.LAST_VANILLA_PILL_EFFECT
|
|
23083
|
+
local LAST_VANILLA_TRINKET_TYPE = ____constantsFirstLast.LAST_VANILLA_TRINKET_TYPE
|
|
23084
|
+
____exports.VANILLA_COLLECTIBLE_TYPE_RANGE = iRange(nil, FIRST_COLLECTIBLE_TYPE, LAST_VANILLA_COLLECTIBLE_TYPE)
|
|
23085
|
+
____exports.VANILLA_COLLECTIBLE_TYPES = __TS__ArrayFilter(
|
|
23086
|
+
____exports.VANILLA_COLLECTIBLE_TYPE_RANGE,
|
|
23087
|
+
function(____, potentialCollectibleType)
|
|
23088
|
+
local collectibleType = asCollectibleType(nil, potentialCollectibleType)
|
|
23089
|
+
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
23090
|
+
return itemConfigItem ~= nil
|
|
23091
|
+
end
|
|
23092
|
+
)
|
|
23093
|
+
____exports.VANILLA_COLLECTIBLE_TYPES_SET = __TS__New(ReadonlySet, ____exports.VANILLA_COLLECTIBLE_TYPES)
|
|
23094
|
+
____exports.VANILLA_TRINKET_TYPE_RANGE = iRange(nil, FIRST_TRINKET_TYPE, LAST_VANILLA_TRINKET_TYPE)
|
|
23095
|
+
____exports.VANILLA_TRINKET_TYPES = __TS__ArrayFilter(
|
|
23096
|
+
____exports.VANILLA_TRINKET_TYPE_RANGE,
|
|
23097
|
+
function(____, potentialTrinketType)
|
|
23098
|
+
local trinketType = asTrinketType(nil, potentialTrinketType)
|
|
23099
|
+
local itemConfigTrinket = itemConfig:GetTrinket(trinketType)
|
|
23100
|
+
return itemConfigTrinket ~= nil
|
|
23101
|
+
end
|
|
23102
|
+
)
|
|
23103
|
+
____exports.VANILLA_TRINKET_TYPES_SET = __TS__New(ReadonlySet, ____exports.VANILLA_TRINKET_TYPES)
|
|
23104
|
+
____exports.VANILLA_CARD_TYPE_RANGE = iRange(nil, FIRST_CARD_TYPE, LAST_VANILLA_CARD_TYPE)
|
|
23105
|
+
____exports.VANILLA_CARD_TYPES = __TS__ArrayFilter(
|
|
23106
|
+
____exports.VANILLA_CARD_TYPE_RANGE,
|
|
23107
|
+
function(____, potentialCardType)
|
|
23108
|
+
local cardType = asCardType(nil, potentialCardType)
|
|
23109
|
+
local itemConfigCard = itemConfig:GetCard(cardType)
|
|
23110
|
+
return itemConfigCard ~= nil
|
|
23111
|
+
end
|
|
23112
|
+
)
|
|
23113
|
+
____exports.VANILLA_CARD_TYPES_SET = __TS__New(ReadonlySet, ____exports.VANILLA_CARD_TYPES)
|
|
23114
|
+
____exports.VANILLA_PILL_EFFECT_RANGE = iRange(nil, FIRST_PILL_EFFECT, LAST_VANILLA_PILL_EFFECT)
|
|
23115
|
+
____exports.VANILLA_PILL_EFFECTS = __TS__ArrayFilter(
|
|
23116
|
+
____exports.VANILLA_PILL_EFFECT_RANGE,
|
|
23117
|
+
function(____, potentialPillEffect)
|
|
23118
|
+
local pillEffect = asPillEffect(nil, potentialPillEffect)
|
|
23119
|
+
local itemConfigPillEffect = itemConfig:GetPillEffect(pillEffect)
|
|
23120
|
+
return itemConfigPillEffect ~= nil
|
|
23121
|
+
end
|
|
23122
|
+
)
|
|
23123
|
+
____exports.VANILLA_PILL_EFFECTS_SET = __TS__New(ReadonlySet, ____exports.VANILLA_PILL_EFFECTS)
|
|
23057
23124
|
return ____exports
|
|
23058
23125
|
end,
|
|
23059
23126
|
["src.types.ReadonlyMap"] = function(...)
|
|
@@ -24586,8 +24653,12 @@ end
|
|
|
24586
24653
|
return ____exports
|
|
24587
24654
|
end,
|
|
24588
24655
|
["src.functions.collectibles"] = function(...)
|
|
24656
|
+
local ____lualib = require("lualib_bundle")
|
|
24657
|
+
local Map = ____lualib.Map
|
|
24658
|
+
local __TS__New = ____lualib.__TS__New
|
|
24659
|
+
local Set = ____lualib.Set
|
|
24589
24660
|
local ____exports = {}
|
|
24590
|
-
local
|
|
24661
|
+
local getCollectibleTypeFromArg
|
|
24591
24662
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
24592
24663
|
local CollectibleSpriteLayer = ____isaac_2Dtypescript_2Ddefinitions.CollectibleSpriteLayer
|
|
24593
24664
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
@@ -24604,8 +24675,11 @@ local itemConfig = ____cachedClasses.itemConfig
|
|
|
24604
24675
|
local ____constants = require("src.core.constants")
|
|
24605
24676
|
local BLIND_ITEM_PNG_PATH = ____constants.BLIND_ITEM_PNG_PATH
|
|
24606
24677
|
local DEFAULT_ITEM_POOL_TYPE = ____constants.DEFAULT_ITEM_POOL_TYPE
|
|
24678
|
+
local QUALITIES = ____constants.QUALITIES
|
|
24607
24679
|
local ____constantsFirstLast = require("src.core.constantsFirstLast")
|
|
24608
24680
|
local LAST_VANILLA_COLLECTIBLE_TYPE = ____constantsFirstLast.LAST_VANILLA_COLLECTIBLE_TYPE
|
|
24681
|
+
local ____constantsVanilla = require("src.core.constantsVanilla")
|
|
24682
|
+
local VANILLA_COLLECTIBLE_TYPES = ____constantsVanilla.VANILLA_COLLECTIBLE_TYPES
|
|
24609
24683
|
local ____collectibleDescriptionMap = require("src.maps.collectibleDescriptionMap")
|
|
24610
24684
|
local COLLECTIBLE_DESCRIPTION_MAP = ____collectibleDescriptionMap.COLLECTIBLE_DESCRIPTION_MAP
|
|
24611
24685
|
local DEFAULT_COLLECTIBLE_DESCRIPTION = ____collectibleDescriptionMap.DEFAULT_COLLECTIBLE_DESCRIPTION
|
|
@@ -24625,13 +24699,8 @@ local clearSprite = ____sprites.clearSprite
|
|
|
24625
24699
|
local spriteEquals = ____sprites.spriteEquals
|
|
24626
24700
|
local ____types = require("src.functions.types")
|
|
24627
24701
|
local isInteger = ____types.isInteger
|
|
24628
|
-
|
|
24629
|
-
|
|
24630
|
-
sprite:Load("gfx/005.100_collectible.anm2", false)
|
|
24631
|
-
sprite:ReplaceSpritesheet(1, "gfx/items/collectibles/questionmark.png")
|
|
24632
|
-
sprite:LoadGraphics()
|
|
24633
|
-
return sprite
|
|
24634
|
-
end
|
|
24702
|
+
local ____utils = require("src.functions.utils")
|
|
24703
|
+
local assertDefined = ____utils.assertDefined
|
|
24635
24704
|
function ____exports.clearCollectibleSprite(self, collectible)
|
|
24636
24705
|
if not isCollectible(nil, collectible) then
|
|
24637
24706
|
local entityID = getEntityID(nil, collectible)
|
|
@@ -24639,6 +24708,14 @@ function ____exports.clearCollectibleSprite(self, collectible)
|
|
|
24639
24708
|
end
|
|
24640
24709
|
____exports.setCollectibleSprite(nil, collectible, nil)
|
|
24641
24710
|
end
|
|
24711
|
+
function ____exports.getCollectibleQuality(self, collectibleOrCollectibleType)
|
|
24712
|
+
local collectibleType = getCollectibleTypeFromArg(nil, collectibleOrCollectibleType, "getCollectibleQuality")
|
|
24713
|
+
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
24714
|
+
if itemConfigItem == nil then
|
|
24715
|
+
return 0
|
|
24716
|
+
end
|
|
24717
|
+
return itemConfigItem.Quality
|
|
24718
|
+
end
|
|
24642
24719
|
function ____exports.isVanillaCollectibleType(self, collectibleType)
|
|
24643
24720
|
return collectibleType <= LAST_VANILLA_COLLECTIBLE_TYPE
|
|
24644
24721
|
end
|
|
@@ -24695,7 +24772,27 @@ end
|
|
|
24695
24772
|
local COLLECTIBLE_ANM2_PATH = "gfx/005.100_collectible.anm2"
|
|
24696
24773
|
local DEFAULT_COLLECTIBLE_PRICE = 15
|
|
24697
24774
|
local GLITCHED_ITEM_THRESHOLD = 4000000000
|
|
24698
|
-
local
|
|
24775
|
+
local QUALITY_TO_VANILLA_COLLECTIBLE_TYPES_MAP = (function()
|
|
24776
|
+
local qualityToCollectibleTypesMap = __TS__New(Map)
|
|
24777
|
+
for ____, quality in ipairs(QUALITIES) do
|
|
24778
|
+
local collectibleTypesSet = __TS__New(Set)
|
|
24779
|
+
for ____, collectibleType in ipairs(VANILLA_COLLECTIBLE_TYPES) do
|
|
24780
|
+
local collectibleTypeQuality = ____exports.getCollectibleQuality(nil, collectibleType)
|
|
24781
|
+
if collectibleTypeQuality == quality then
|
|
24782
|
+
collectibleTypesSet:add(collectibleType)
|
|
24783
|
+
end
|
|
24784
|
+
end
|
|
24785
|
+
qualityToCollectibleTypesMap:set(quality, collectibleTypesSet)
|
|
24786
|
+
end
|
|
24787
|
+
return qualityToCollectibleTypesMap
|
|
24788
|
+
end)(nil)
|
|
24789
|
+
local questionMarkSprite = (function()
|
|
24790
|
+
local sprite = Sprite()
|
|
24791
|
+
sprite:Load("gfx/005.100_collectible.anm2", false)
|
|
24792
|
+
sprite:ReplaceSpritesheet(1, "gfx/items/collectibles/questionmark.png")
|
|
24793
|
+
sprite:LoadGraphics()
|
|
24794
|
+
return sprite
|
|
24795
|
+
end)(nil)
|
|
24699
24796
|
function ____exports.collectibleHasCacheFlag(self, collectibleOrCollectibleType, cacheFlag)
|
|
24700
24797
|
local collectibleType = getCollectibleTypeFromArg(nil, collectibleOrCollectibleType, "collectibleHasCacheFlag")
|
|
24701
24798
|
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
@@ -24827,19 +24924,20 @@ function ____exports.getCollectiblePedestalType(self, collectible)
|
|
|
24827
24924
|
local sprite = collectible:GetSprite()
|
|
24828
24925
|
return sprite:GetOverlayFrame()
|
|
24829
24926
|
end
|
|
24830
|
-
function ____exports.getCollectibleQuality(self, collectibleOrCollectibleType)
|
|
24831
|
-
local collectibleType = getCollectibleTypeFromArg(nil, collectibleOrCollectibleType, "getCollectibleQuality")
|
|
24832
|
-
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
24833
|
-
if itemConfigItem == nil then
|
|
24834
|
-
return 0
|
|
24835
|
-
end
|
|
24836
|
-
return itemConfigItem.Quality
|
|
24837
|
-
end
|
|
24838
24927
|
function ____exports.getCollectibleTags(self, collectibleOrCollectibleType)
|
|
24839
24928
|
local collectibleType = getCollectibleTypeFromArg(nil, collectibleOrCollectibleType, "getCollectibleTags")
|
|
24840
24929
|
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
24841
24930
|
return itemConfigItem == nil and ItemConfigTagZero or itemConfigItem.Tags
|
|
24842
24931
|
end
|
|
24932
|
+
function ____exports.getVanillaCollectibleTypesOfQuality(self, quality)
|
|
24933
|
+
local collectibleTypes = QUALITY_TO_VANILLA_COLLECTIBLE_TYPES_MAP:get(quality)
|
|
24934
|
+
assertDefined(
|
|
24935
|
+
nil,
|
|
24936
|
+
collectibleTypes,
|
|
24937
|
+
"Failed to find the vanilla collectible types corresponding to quality: " .. tostring(quality)
|
|
24938
|
+
)
|
|
24939
|
+
return collectibleTypes
|
|
24940
|
+
end
|
|
24843
24941
|
function ____exports.isActiveCollectible(self, collectibleType)
|
|
24844
24942
|
local itemType = ____exports.getCollectibleItemType(nil, collectibleType)
|
|
24845
24943
|
return itemType == ItemType.ACTIVE
|
|
@@ -38273,73 +38371,6 @@ function PickupChangeDetection.prototype.____constructor(self, postPickupChanged
|
|
|
38273
38371
|
self.postPickupChanged = postPickupChanged
|
|
38274
38372
|
self.pickupIndexCreation = pickupIndexCreation
|
|
38275
38373
|
end
|
|
38276
|
-
return ____exports
|
|
38277
|
-
end,
|
|
38278
|
-
["src.core.constantsVanilla"] = function(...)
|
|
38279
|
-
local ____lualib = require("lualib_bundle")
|
|
38280
|
-
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
38281
|
-
local __TS__New = ____lualib.__TS__New
|
|
38282
|
-
local ____exports = {}
|
|
38283
|
-
local ____types = require("src.functions.types")
|
|
38284
|
-
local asCardType = ____types.asCardType
|
|
38285
|
-
local asCollectibleType = ____types.asCollectibleType
|
|
38286
|
-
local asPillEffect = ____types.asPillEffect
|
|
38287
|
-
local asTrinketType = ____types.asTrinketType
|
|
38288
|
-
local ____utils = require("src.functions.utils")
|
|
38289
|
-
local iRange = ____utils.iRange
|
|
38290
|
-
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
38291
|
-
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
38292
|
-
local ____cachedClasses = require("src.core.cachedClasses")
|
|
38293
|
-
local itemConfig = ____cachedClasses.itemConfig
|
|
38294
|
-
local ____constantsFirstLast = require("src.core.constantsFirstLast")
|
|
38295
|
-
local FIRST_CARD_TYPE = ____constantsFirstLast.FIRST_CARD_TYPE
|
|
38296
|
-
local FIRST_COLLECTIBLE_TYPE = ____constantsFirstLast.FIRST_COLLECTIBLE_TYPE
|
|
38297
|
-
local FIRST_PILL_EFFECT = ____constantsFirstLast.FIRST_PILL_EFFECT
|
|
38298
|
-
local FIRST_TRINKET_TYPE = ____constantsFirstLast.FIRST_TRINKET_TYPE
|
|
38299
|
-
local LAST_VANILLA_CARD_TYPE = ____constantsFirstLast.LAST_VANILLA_CARD_TYPE
|
|
38300
|
-
local LAST_VANILLA_COLLECTIBLE_TYPE = ____constantsFirstLast.LAST_VANILLA_COLLECTIBLE_TYPE
|
|
38301
|
-
local LAST_VANILLA_PILL_EFFECT = ____constantsFirstLast.LAST_VANILLA_PILL_EFFECT
|
|
38302
|
-
local LAST_VANILLA_TRINKET_TYPE = ____constantsFirstLast.LAST_VANILLA_TRINKET_TYPE
|
|
38303
|
-
____exports.VANILLA_COLLECTIBLE_TYPE_RANGE = iRange(nil, FIRST_COLLECTIBLE_TYPE, LAST_VANILLA_COLLECTIBLE_TYPE)
|
|
38304
|
-
____exports.VANILLA_COLLECTIBLE_TYPES = __TS__ArrayFilter(
|
|
38305
|
-
____exports.VANILLA_COLLECTIBLE_TYPE_RANGE,
|
|
38306
|
-
function(____, potentialCollectibleType)
|
|
38307
|
-
local collectibleType = asCollectibleType(nil, potentialCollectibleType)
|
|
38308
|
-
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
38309
|
-
return itemConfigItem ~= nil
|
|
38310
|
-
end
|
|
38311
|
-
)
|
|
38312
|
-
____exports.VANILLA_COLLECTIBLE_TYPES_SET = __TS__New(ReadonlySet, ____exports.VANILLA_COLLECTIBLE_TYPES)
|
|
38313
|
-
____exports.VANILLA_TRINKET_TYPE_RANGE = iRange(nil, FIRST_TRINKET_TYPE, LAST_VANILLA_TRINKET_TYPE)
|
|
38314
|
-
____exports.VANILLA_TRINKET_TYPES = __TS__ArrayFilter(
|
|
38315
|
-
____exports.VANILLA_TRINKET_TYPE_RANGE,
|
|
38316
|
-
function(____, potentialTrinketType)
|
|
38317
|
-
local trinketType = asTrinketType(nil, potentialTrinketType)
|
|
38318
|
-
local itemConfigTrinket = itemConfig:GetTrinket(trinketType)
|
|
38319
|
-
return itemConfigTrinket ~= nil
|
|
38320
|
-
end
|
|
38321
|
-
)
|
|
38322
|
-
____exports.VANILLA_TRINKET_TYPES_SET = __TS__New(ReadonlySet, ____exports.VANILLA_TRINKET_TYPES)
|
|
38323
|
-
____exports.VANILLA_CARD_TYPE_RANGE = iRange(nil, FIRST_CARD_TYPE, LAST_VANILLA_CARD_TYPE)
|
|
38324
|
-
____exports.VANILLA_CARD_TYPES = __TS__ArrayFilter(
|
|
38325
|
-
____exports.VANILLA_CARD_TYPE_RANGE,
|
|
38326
|
-
function(____, potentialCardType)
|
|
38327
|
-
local cardType = asCardType(nil, potentialCardType)
|
|
38328
|
-
local itemConfigCard = itemConfig:GetCard(cardType)
|
|
38329
|
-
return itemConfigCard ~= nil
|
|
38330
|
-
end
|
|
38331
|
-
)
|
|
38332
|
-
____exports.VANILLA_CARD_TYPES_SET = __TS__New(ReadonlySet, ____exports.VANILLA_CARD_TYPES)
|
|
38333
|
-
____exports.VANILLA_PILL_EFFECT_RANGE = iRange(nil, FIRST_PILL_EFFECT, LAST_VANILLA_PILL_EFFECT)
|
|
38334
|
-
____exports.VANILLA_PILL_EFFECTS = __TS__ArrayFilter(
|
|
38335
|
-
____exports.VANILLA_PILL_EFFECT_RANGE,
|
|
38336
|
-
function(____, potentialPillEffect)
|
|
38337
|
-
local pillEffect = asPillEffect(nil, potentialPillEffect)
|
|
38338
|
-
local itemConfigPillEffect = itemConfig:GetPillEffect(pillEffect)
|
|
38339
|
-
return itemConfigPillEffect ~= nil
|
|
38340
|
-
end
|
|
38341
|
-
)
|
|
38342
|
-
____exports.VANILLA_PILL_EFFECTS_SET = __TS__New(ReadonlySet, ____exports.VANILLA_PILL_EFFECTS)
|
|
38343
38374
|
return ____exports
|
|
38344
38375
|
end,
|
|
38345
38376
|
["src.objects.cardDescriptions"] = function(...)
|
|
@@ -44466,7 +44497,9 @@ local STORY_BOSS_IDS_SET = __TS__New(ReadonlySet, {
|
|
|
44466
44497
|
BossID.MOM,
|
|
44467
44498
|
BossID.MOMS_HEART,
|
|
44468
44499
|
BossID.SATAN,
|
|
44500
|
+
BossID.IT_LIVES,
|
|
44469
44501
|
BossID.ISAAC,
|
|
44502
|
+
BossID.BLUE_BABY,
|
|
44470
44503
|
BossID.LAMB,
|
|
44471
44504
|
BossID.MEGA_SATAN,
|
|
44472
44505
|
BossID.ULTRA_GREED,
|
|
@@ -85,6 +85,13 @@ export declare function getCollectibleQuality(collectibleOrCollectibleType: Enti
|
|
|
85
85
|
* ```
|
|
86
86
|
*/
|
|
87
87
|
export declare function getCollectibleTags(collectibleOrCollectibleType: EntityPickup | CollectibleType): BitFlags<ItemConfigTag>;
|
|
88
|
+
/**
|
|
89
|
+
* Returns a set containing every vanilla collectible type with the given quality.
|
|
90
|
+
*
|
|
91
|
+
* Note that this function will only return vanilla collectible types. To handle modded collectible
|
|
92
|
+
* types, use the `getCollectibleTypesOfQuality` helper function instead.
|
|
93
|
+
*/
|
|
94
|
+
export declare function getVanillaCollectibleTypesOfQuality(quality: Quality): ReadonlySet<CollectibleType>;
|
|
88
95
|
/** Returns true if the item type in the item config is equal to `ItemType.ITEM_ACTIVE`. */
|
|
89
96
|
export declare function isActiveCollectible(collectibleType: CollectibleType): boolean;
|
|
90
97
|
/**
|
|
@@ -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,8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|
4
|
+
local Set = ____lualib.Set
|
|
1
5
|
local ____exports = {}
|
|
2
|
-
local
|
|
6
|
+
local getCollectibleTypeFromArg
|
|
3
7
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
4
8
|
local CollectibleSpriteLayer = ____isaac_2Dtypescript_2Ddefinitions.CollectibleSpriteLayer
|
|
5
9
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
@@ -16,8 +20,11 @@ local itemConfig = ____cachedClasses.itemConfig
|
|
|
16
20
|
local ____constants = require("src.core.constants")
|
|
17
21
|
local BLIND_ITEM_PNG_PATH = ____constants.BLIND_ITEM_PNG_PATH
|
|
18
22
|
local DEFAULT_ITEM_POOL_TYPE = ____constants.DEFAULT_ITEM_POOL_TYPE
|
|
23
|
+
local QUALITIES = ____constants.QUALITIES
|
|
19
24
|
local ____constantsFirstLast = require("src.core.constantsFirstLast")
|
|
20
25
|
local LAST_VANILLA_COLLECTIBLE_TYPE = ____constantsFirstLast.LAST_VANILLA_COLLECTIBLE_TYPE
|
|
26
|
+
local ____constantsVanilla = require("src.core.constantsVanilla")
|
|
27
|
+
local VANILLA_COLLECTIBLE_TYPES = ____constantsVanilla.VANILLA_COLLECTIBLE_TYPES
|
|
21
28
|
local ____collectibleDescriptionMap = require("src.maps.collectibleDescriptionMap")
|
|
22
29
|
local COLLECTIBLE_DESCRIPTION_MAP = ____collectibleDescriptionMap.COLLECTIBLE_DESCRIPTION_MAP
|
|
23
30
|
local DEFAULT_COLLECTIBLE_DESCRIPTION = ____collectibleDescriptionMap.DEFAULT_COLLECTIBLE_DESCRIPTION
|
|
@@ -37,13 +44,8 @@ local clearSprite = ____sprites.clearSprite
|
|
|
37
44
|
local spriteEquals = ____sprites.spriteEquals
|
|
38
45
|
local ____types = require("src.functions.types")
|
|
39
46
|
local isInteger = ____types.isInteger
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
sprite:Load("gfx/005.100_collectible.anm2", false)
|
|
43
|
-
sprite:ReplaceSpritesheet(1, "gfx/items/collectibles/questionmark.png")
|
|
44
|
-
sprite:LoadGraphics()
|
|
45
|
-
return sprite
|
|
46
|
-
end
|
|
47
|
+
local ____utils = require("src.functions.utils")
|
|
48
|
+
local assertDefined = ____utils.assertDefined
|
|
47
49
|
function ____exports.clearCollectibleSprite(self, collectible)
|
|
48
50
|
if not isCollectible(nil, collectible) then
|
|
49
51
|
local entityID = getEntityID(nil, collectible)
|
|
@@ -51,6 +53,17 @@ function ____exports.clearCollectibleSprite(self, collectible)
|
|
|
51
53
|
end
|
|
52
54
|
____exports.setCollectibleSprite(nil, collectible, nil)
|
|
53
55
|
end
|
|
56
|
+
--- Helper function to get a collectible's quality, which ranges from 0 to 4 (inclusive). For
|
|
57
|
+
-- example, Mom's Knife has a quality of 4. Returns 0 if the provided collectible type was not
|
|
58
|
+
-- valid.
|
|
59
|
+
function ____exports.getCollectibleQuality(self, collectibleOrCollectibleType)
|
|
60
|
+
local collectibleType = getCollectibleTypeFromArg(nil, collectibleOrCollectibleType, "getCollectibleQuality")
|
|
61
|
+
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
62
|
+
if itemConfigItem == nil then
|
|
63
|
+
return 0
|
|
64
|
+
end
|
|
65
|
+
return itemConfigItem.Quality
|
|
66
|
+
end
|
|
54
67
|
function ____exports.isVanillaCollectibleType(self, collectibleType)
|
|
55
68
|
return collectibleType <= LAST_VANILLA_COLLECTIBLE_TYPE
|
|
56
69
|
end
|
|
@@ -123,8 +136,30 @@ function getCollectibleTypeFromArg(self, collectibleOrCollectibleType, functionN
|
|
|
123
136
|
end
|
|
124
137
|
local COLLECTIBLE_ANM2_PATH = "gfx/005.100_collectible.anm2"
|
|
125
138
|
local DEFAULT_COLLECTIBLE_PRICE = 15
|
|
139
|
+
--- Glitched items start at id 4294967295 (the final 32-bit integer) and increment backwards.
|
|
126
140
|
local GLITCHED_ITEM_THRESHOLD = 4000000000
|
|
127
|
-
local
|
|
141
|
+
local QUALITY_TO_VANILLA_COLLECTIBLE_TYPES_MAP = (function()
|
|
142
|
+
local qualityToCollectibleTypesMap = __TS__New(Map)
|
|
143
|
+
for ____, quality in ipairs(QUALITIES) do
|
|
144
|
+
local collectibleTypesSet = __TS__New(Set)
|
|
145
|
+
for ____, collectibleType in ipairs(VANILLA_COLLECTIBLE_TYPES) do
|
|
146
|
+
local collectibleTypeQuality = ____exports.getCollectibleQuality(nil, collectibleType)
|
|
147
|
+
if collectibleTypeQuality == quality then
|
|
148
|
+
collectibleTypesSet:add(collectibleType)
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
qualityToCollectibleTypesMap:set(quality, collectibleTypesSet)
|
|
152
|
+
end
|
|
153
|
+
return qualityToCollectibleTypesMap
|
|
154
|
+
end)(nil)
|
|
155
|
+
--- The `isBlindCollectible` function needs a reference sprite to work properly.
|
|
156
|
+
local questionMarkSprite = (function()
|
|
157
|
+
local sprite = Sprite()
|
|
158
|
+
sprite:Load("gfx/005.100_collectible.anm2", false)
|
|
159
|
+
sprite:ReplaceSpritesheet(1, "gfx/items/collectibles/questionmark.png")
|
|
160
|
+
sprite:LoadGraphics()
|
|
161
|
+
return sprite
|
|
162
|
+
end)(nil)
|
|
128
163
|
--- Helper function to check in the item config if a given collectible has a given cache flag.
|
|
129
164
|
function ____exports.collectibleHasCacheFlag(self, collectibleOrCollectibleType, cacheFlag)
|
|
130
165
|
local collectibleType = getCollectibleTypeFromArg(nil, collectibleOrCollectibleType, "collectibleHasCacheFlag")
|
|
@@ -290,17 +325,6 @@ function ____exports.getCollectiblePedestalType(self, collectible)
|
|
|
290
325
|
local sprite = collectible:GetSprite()
|
|
291
326
|
return sprite:GetOverlayFrame()
|
|
292
327
|
end
|
|
293
|
-
--- Helper function to get a collectible's quality, which ranges from 0 to 4 (inclusive). For
|
|
294
|
-
-- example, Mom's Knife has a quality of 4. Returns 0 if the provided collectible type was not
|
|
295
|
-
-- valid.
|
|
296
|
-
function ____exports.getCollectibleQuality(self, collectibleOrCollectibleType)
|
|
297
|
-
local collectibleType = getCollectibleTypeFromArg(nil, collectibleOrCollectibleType, "getCollectibleQuality")
|
|
298
|
-
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
299
|
-
if itemConfigItem == nil then
|
|
300
|
-
return 0
|
|
301
|
-
end
|
|
302
|
-
return itemConfigItem.Quality
|
|
303
|
-
end
|
|
304
328
|
--- Helper function to get the tags of a collectible (which is the composition of zero or more
|
|
305
329
|
-- `ItemConfigTag`). Returns 0 if the provided collectible type is not valid.
|
|
306
330
|
--
|
|
@@ -315,6 +339,19 @@ function ____exports.getCollectibleTags(self, collectibleOrCollectibleType)
|
|
|
315
339
|
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
316
340
|
return itemConfigItem == nil and ItemConfigTagZero or itemConfigItem.Tags
|
|
317
341
|
end
|
|
342
|
+
--- Returns a set containing every vanilla collectible type with the given quality.
|
|
343
|
+
--
|
|
344
|
+
-- Note that this function will only return vanilla collectible types. To handle modded collectible
|
|
345
|
+
-- types, use the `getCollectibleTypesOfQuality` helper function instead.
|
|
346
|
+
function ____exports.getVanillaCollectibleTypesOfQuality(self, quality)
|
|
347
|
+
local collectibleTypes = QUALITY_TO_VANILLA_COLLECTIBLE_TYPES_MAP:get(quality)
|
|
348
|
+
assertDefined(
|
|
349
|
+
nil,
|
|
350
|
+
collectibleTypes,
|
|
351
|
+
"Failed to find the vanilla collectible types corresponding to quality: " .. tostring(quality)
|
|
352
|
+
)
|
|
353
|
+
return collectibleTypes
|
|
354
|
+
end
|
|
318
355
|
--- Returns true if the item type in the item config is equal to `ItemType.ITEM_ACTIVE`.
|
|
319
356
|
function ____exports.isActiveCollectible(self, collectibleType)
|
|
320
357
|
local itemType = ____exports.getCollectibleItemType(nil, collectibleType)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bossSets.d.ts","sourceRoot":"","sources":["../../../src/sets/bossSets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAa,MAAM,8BAA8B,CAAC;AA6e7E,eAAO,MAAM,mCAAmC,gEAiB9C,CAAC;AAEH,eAAO,MAAM,8BAA8B,8CAiBzC,CAAC;AAEH,eAAO,MAAM,cAAc,qBAE1B,CAAC;
|
|
1
|
+
{"version":3,"file":"bossSets.d.ts","sourceRoot":"","sources":["../../../src/sets/bossSets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAa,MAAM,8BAA8B,CAAC;AA6e7E,eAAO,MAAM,mCAAmC,gEAiB9C,CAAC;AAEH,eAAO,MAAM,8BAA8B,8CAiBzC,CAAC;AAEH,eAAO,MAAM,cAAc,qBAE1B,CAAC;AAqBF,eAAO,MAAM,qCAAqC,qBAEjD,CAAC"}
|
package/package.json
CHANGED
|
@@ -15,8 +15,13 @@ import {
|
|
|
15
15
|
RenderMode,
|
|
16
16
|
} from "isaac-typescript-definitions";
|
|
17
17
|
import { game, itemConfig } from "../core/cachedClasses";
|
|
18
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
BLIND_ITEM_PNG_PATH,
|
|
20
|
+
DEFAULT_ITEM_POOL_TYPE,
|
|
21
|
+
QUALITIES,
|
|
22
|
+
} from "../core/constants";
|
|
19
23
|
import { LAST_VANILLA_COLLECTIBLE_TYPE } from "../core/constantsFirstLast";
|
|
24
|
+
import { VANILLA_COLLECTIBLE_TYPES } from "../core/constantsVanilla";
|
|
20
25
|
import {
|
|
21
26
|
COLLECTIBLE_DESCRIPTION_MAP,
|
|
22
27
|
DEFAULT_COLLECTIBLE_DESCRIPTION,
|
|
@@ -31,25 +36,46 @@ import { hasFlag } from "./flag";
|
|
|
31
36
|
import { isCollectible } from "./pickupVariants";
|
|
32
37
|
import { clearSprite, spriteEquals } from "./sprites";
|
|
33
38
|
import { isInteger } from "./types";
|
|
39
|
+
import { assertDefined } from "./utils";
|
|
34
40
|
|
|
35
41
|
const COLLECTIBLE_ANM2_PATH = "gfx/005.100_collectible.anm2";
|
|
36
42
|
|
|
37
43
|
const DEFAULT_COLLECTIBLE_PRICE = 15;
|
|
38
44
|
|
|
39
|
-
|
|
45
|
+
/** Glitched items start at id 4294967295 (the final 32-bit integer) and increment backwards. */
|
|
40
46
|
const GLITCHED_ITEM_THRESHOLD = 4_000_000_000;
|
|
41
47
|
|
|
42
|
-
|
|
43
|
-
|
|
48
|
+
const QUALITY_TO_VANILLA_COLLECTIBLE_TYPES_MAP: ReadonlyMap<
|
|
49
|
+
Quality,
|
|
50
|
+
Set<CollectibleType>
|
|
51
|
+
> = (() => {
|
|
52
|
+
const qualityToCollectibleTypesMap = new Map<Quality, Set<CollectibleType>>();
|
|
53
|
+
|
|
54
|
+
for (const quality of QUALITIES) {
|
|
55
|
+
const collectibleTypesSet = new Set<CollectibleType>();
|
|
44
56
|
|
|
45
|
-
|
|
57
|
+
for (const collectibleType of VANILLA_COLLECTIBLE_TYPES) {
|
|
58
|
+
const collectibleTypeQuality = getCollectibleQuality(collectibleType);
|
|
59
|
+
if (collectibleTypeQuality === quality) {
|
|
60
|
+
collectibleTypesSet.add(collectibleType);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
qualityToCollectibleTypesMap.set(quality, collectibleTypesSet);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return qualityToCollectibleTypesMap;
|
|
68
|
+
})();
|
|
69
|
+
|
|
70
|
+
/** The `isBlindCollectible` function needs a reference sprite to work properly. */
|
|
71
|
+
const questionMarkSprite = (() => {
|
|
46
72
|
const sprite = Sprite();
|
|
47
73
|
sprite.Load("gfx/005.100_collectible.anm2", false);
|
|
48
74
|
sprite.ReplaceSpritesheet(1, "gfx/items/collectibles/questionmark.png");
|
|
49
75
|
sprite.LoadGraphics();
|
|
50
76
|
|
|
51
77
|
return sprite;
|
|
52
|
-
}
|
|
78
|
+
})();
|
|
53
79
|
|
|
54
80
|
export function clearCollectibleSprite(collectible: EntityPickup): void {
|
|
55
81
|
if (!isCollectible(collectible)) {
|
|
@@ -403,6 +429,25 @@ export function getCollectibleTags(
|
|
|
403
429
|
return itemConfigItem === undefined ? ItemConfigTagZero : itemConfigItem.Tags;
|
|
404
430
|
}
|
|
405
431
|
|
|
432
|
+
/**
|
|
433
|
+
* Returns a set containing every vanilla collectible type with the given quality.
|
|
434
|
+
*
|
|
435
|
+
* Note that this function will only return vanilla collectible types. To handle modded collectible
|
|
436
|
+
* types, use the `getCollectibleTypesOfQuality` helper function instead.
|
|
437
|
+
*/
|
|
438
|
+
export function getVanillaCollectibleTypesOfQuality(
|
|
439
|
+
quality: Quality,
|
|
440
|
+
): ReadonlySet<CollectibleType> {
|
|
441
|
+
const collectibleTypes =
|
|
442
|
+
QUALITY_TO_VANILLA_COLLECTIBLE_TYPES_MAP.get(quality);
|
|
443
|
+
assertDefined(
|
|
444
|
+
collectibleTypes,
|
|
445
|
+
`Failed to find the vanilla collectible types corresponding to quality: ${quality}`,
|
|
446
|
+
);
|
|
447
|
+
|
|
448
|
+
return collectibleTypes;
|
|
449
|
+
}
|
|
450
|
+
|
|
406
451
|
/** Returns true if the item type in the item config is equal to `ItemType.ITEM_ACTIVE`. */
|
|
407
452
|
export function isActiveCollectible(collectibleType: CollectibleType): boolean {
|
|
408
453
|
const itemType = getCollectibleItemType(collectibleType);
|
package/src/sets/bossSets.ts
CHANGED
|
@@ -537,7 +537,9 @@ const STORY_BOSS_IDS_SET = new ReadonlySet([
|
|
|
537
537
|
BossID.MOM, // 6
|
|
538
538
|
BossID.MOMS_HEART, // 8
|
|
539
539
|
BossID.SATAN, // 24
|
|
540
|
+
BossID.IT_LIVES, // 25
|
|
540
541
|
BossID.ISAAC, // 39
|
|
542
|
+
BossID.BLUE_BABY, // 40
|
|
541
543
|
BossID.LAMB, // 54
|
|
542
544
|
BossID.MEGA_SATAN, // 55
|
|
543
545
|
BossID.ULTRA_GREED, // 62
|