isaacscript-common 15.3.2 → 15.3.4
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.d.ts +12 -8
- package/dist/isaacscript-common.lua +320 -314
- package/dist/src/classes/ModFeature.d.ts +8 -1
- package/dist/src/classes/ModFeature.d.ts.map +1 -1
- package/dist/src/classes/ModFeature.lua +2 -1
- package/dist/src/classes/features/other/CollectibleItemPoolType.d.ts +4 -7
- package/dist/src/classes/features/other/CollectibleItemPoolType.d.ts.map +1 -1
- package/dist/src/classes/features/other/CollectibleItemPoolType.lua +10 -9
- package/dist/src/features.d.ts.map +1 -1
- package/dist/src/features.lua +3 -2
- package/package.json +1 -1
- package/src/classes/ModFeature.ts +14 -2
- package/src/classes/features/other/CollectibleItemPoolType.ts +19 -14
- package/src/features.ts +5 -2
package/dist/index.d.ts
CHANGED
|
@@ -1244,17 +1244,14 @@ export declare type CollectibleIndex = string & {
|
|
|
1244
1244
|
readonly __collectibleIndexBrand: symbol;
|
|
1245
1245
|
};
|
|
1246
1246
|
|
|
1247
|
-
/**
|
|
1248
|
-
* The item pool type of a collectible is not stored on the collectible. Thus, we scan for incoming
|
|
1249
|
-
* item pool types in the `PRE_GET_COLLECTIBLE` callback, and then assume that the next spawned
|
|
1250
|
-
* collectible has this item pool type.
|
|
1251
|
-
*/
|
|
1252
1247
|
declare class CollectibleItemPoolType extends Feature {
|
|
1248
|
+
private pickupIndexCreation;
|
|
1253
1249
|
private postPickupInitCollectible;
|
|
1254
1250
|
/**
|
|
1255
1251
|
* Helper function to get the item pool type that a given collectible came from. Since there is no
|
|
1256
|
-
* native method in the API to get this, we listen in the `
|
|
1257
|
-
*
|
|
1252
|
+
* native method in the API to get this, we listen in the `POST_PICKUP_INIT` callback for
|
|
1253
|
+
* collectibles, use the `ItemPool.GetLastPool` method, and then assume that the collectible
|
|
1254
|
+
* matches.
|
|
1258
1255
|
*
|
|
1259
1256
|
* In order to use this function, you must upgrade your mod with
|
|
1260
1257
|
* `ISCFeature.COLLECTIBLE_ITEM_POOL_TYPE`.
|
|
@@ -10724,7 +10721,14 @@ declare class ModdedElementSets extends Feature {
|
|
|
10724
10721
|
*/
|
|
10725
10722
|
export declare class ModFeature {
|
|
10726
10723
|
private mod;
|
|
10727
|
-
|
|
10724
|
+
/**
|
|
10725
|
+
* Whether or not the feature has registered its callbacks yet (and submitted its variables to the
|
|
10726
|
+
* save data manager, if any).
|
|
10727
|
+
*
|
|
10728
|
+
* This will almost always be equal to true unless you explicitly passed `false` to the second
|
|
10729
|
+
* argument of the constructor.
|
|
10730
|
+
*/
|
|
10731
|
+
initialized: boolean;
|
|
10728
10732
|
constructor(mod: ModUpgradedBase, init?: boolean);
|
|
10729
10733
|
/**
|
|
10730
10734
|
* Runs the `Mod.AddCallback` and `ModUpgraded.AddCallbackCustom` methods for all of the decorated
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 15.3.
|
|
3
|
+
isaacscript-common 15.3.4
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -33205,6 +33205,310 @@ function CharacterStats.prototype.registerCharacterStats(self, playerType, statM
|
|
|
33205
33205
|
self.charactersStatMap:set(playerType, statMap)
|
|
33206
33206
|
end
|
|
33207
33207
|
__TS__Decorate({Exported}, CharacterStats.prototype, "registerCharacterStats", true)
|
|
33208
|
+
return ____exports
|
|
33209
|
+
end,
|
|
33210
|
+
["src.types.PickupIndex"] = function(...)
|
|
33211
|
+
local ____exports = {}
|
|
33212
|
+
return ____exports
|
|
33213
|
+
end,
|
|
33214
|
+
["src.interfaces.RoomDescription"] = function(...)
|
|
33215
|
+
local ____exports = {}
|
|
33216
|
+
return ____exports
|
|
33217
|
+
end,
|
|
33218
|
+
["src.classes.features.other.RoomHistory"] = function(...)
|
|
33219
|
+
local ____lualib = require("lualib_bundle")
|
|
33220
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
33221
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
33222
|
+
local __TS__Decorate = ____lualib.__TS__Decorate
|
|
33223
|
+
local ____exports = {}
|
|
33224
|
+
local ____cachedClasses = require("src.core.cachedClasses")
|
|
33225
|
+
local game = ____cachedClasses.game
|
|
33226
|
+
local ____decorators = require("src.decorators")
|
|
33227
|
+
local Exported = ____decorators.Exported
|
|
33228
|
+
local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
|
|
33229
|
+
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
33230
|
+
local ____array = require("src.functions.array")
|
|
33231
|
+
local getLastElement = ____array.getLastElement
|
|
33232
|
+
local ____dimensions = require("src.functions.dimensions")
|
|
33233
|
+
local getDimension = ____dimensions.getDimension
|
|
33234
|
+
local ____roomData = require("src.functions.roomData")
|
|
33235
|
+
local getRoomGridIndex = ____roomData.getRoomGridIndex
|
|
33236
|
+
local getRoomListIndex = ____roomData.getRoomListIndex
|
|
33237
|
+
local getRoomName = ____roomData.getRoomName
|
|
33238
|
+
local getRoomStageID = ____roomData.getRoomStageID
|
|
33239
|
+
local getRoomSubType = ____roomData.getRoomSubType
|
|
33240
|
+
local getRoomVariant = ____roomData.getRoomVariant
|
|
33241
|
+
local getRoomVisitedCount = ____roomData.getRoomVisitedCount
|
|
33242
|
+
local ____Feature = require("src.classes.private.Feature")
|
|
33243
|
+
local Feature = ____Feature.Feature
|
|
33244
|
+
____exports.RoomHistory = __TS__Class()
|
|
33245
|
+
local RoomHistory = ____exports.RoomHistory
|
|
33246
|
+
RoomHistory.name = "RoomHistory"
|
|
33247
|
+
__TS__ClassExtends(RoomHistory, Feature)
|
|
33248
|
+
function RoomHistory.prototype.____constructor(self)
|
|
33249
|
+
Feature.prototype.____constructor(self)
|
|
33250
|
+
self.v = {run = {roomHistory = {}}}
|
|
33251
|
+
self.postNewRoomEarly = function()
|
|
33252
|
+
local level = game:GetLevel()
|
|
33253
|
+
local stage = level:GetStage()
|
|
33254
|
+
local stageType = level:GetStageType()
|
|
33255
|
+
local room = game:GetRoom()
|
|
33256
|
+
local roomType = room:GetType()
|
|
33257
|
+
local stageID = getRoomStageID(nil)
|
|
33258
|
+
local dimension = getDimension(nil)
|
|
33259
|
+
local roomVariant = getRoomVariant(nil)
|
|
33260
|
+
local roomSubType = getRoomSubType(nil)
|
|
33261
|
+
local roomName = getRoomName(nil)
|
|
33262
|
+
local roomGridIndex = getRoomGridIndex(nil)
|
|
33263
|
+
local roomListIndex = getRoomListIndex(nil)
|
|
33264
|
+
local roomVisitedCount = getRoomVisitedCount(nil)
|
|
33265
|
+
local roomDescription = {
|
|
33266
|
+
stage = stage,
|
|
33267
|
+
stageType = stageType,
|
|
33268
|
+
stageID = stageID,
|
|
33269
|
+
dimension = dimension,
|
|
33270
|
+
roomType = roomType,
|
|
33271
|
+
roomVariant = roomVariant,
|
|
33272
|
+
roomSubType = roomSubType,
|
|
33273
|
+
roomName = roomName,
|
|
33274
|
+
roomGridIndex = roomGridIndex,
|
|
33275
|
+
roomListIndex = roomListIndex,
|
|
33276
|
+
roomVisitedCount = roomVisitedCount
|
|
33277
|
+
}
|
|
33278
|
+
local ____self_v_run_roomHistory_0 = self.v.run.roomHistory
|
|
33279
|
+
____self_v_run_roomHistory_0[#____self_v_run_roomHistory_0 + 1] = roomDescription
|
|
33280
|
+
end
|
|
33281
|
+
self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_EARLY, {self.postNewRoomEarly}}}
|
|
33282
|
+
end
|
|
33283
|
+
function RoomHistory.prototype.getRoomHistory(self)
|
|
33284
|
+
return self.v.run.roomHistory
|
|
33285
|
+
end
|
|
33286
|
+
function RoomHistory.prototype.getPreviousRoomDescription(self)
|
|
33287
|
+
local previousRoomDescription = self.v.run.roomHistory[#self.v.run.roomHistory - 2 + 1]
|
|
33288
|
+
if previousRoomDescription ~= nil then
|
|
33289
|
+
return previousRoomDescription
|
|
33290
|
+
end
|
|
33291
|
+
local startingRoomDescription = self.v.run.roomHistory[1]
|
|
33292
|
+
if startingRoomDescription ~= nil then
|
|
33293
|
+
return startingRoomDescription
|
|
33294
|
+
end
|
|
33295
|
+
error("Failed to find a room description for any rooms thus far on this run.")
|
|
33296
|
+
end
|
|
33297
|
+
function RoomHistory.prototype.getLatestRoomDescription(self)
|
|
33298
|
+
return getLastElement(nil, self.v.run.roomHistory)
|
|
33299
|
+
end
|
|
33300
|
+
function RoomHistory.prototype.isLeavingRoom(self)
|
|
33301
|
+
local level = game:GetLevel()
|
|
33302
|
+
local stage = level:GetStage()
|
|
33303
|
+
local stageType = level:GetStageType()
|
|
33304
|
+
local roomListIndex = getRoomListIndex(nil)
|
|
33305
|
+
local roomVisitedCount = getRoomVisitedCount(nil)
|
|
33306
|
+
local latestRoomDescription = self:getLatestRoomDescription()
|
|
33307
|
+
if latestRoomDescription == nil then
|
|
33308
|
+
return false
|
|
33309
|
+
end
|
|
33310
|
+
return stage ~= latestRoomDescription.stage or stageType ~= latestRoomDescription.stageType or roomListIndex ~= latestRoomDescription.roomListIndex or roomVisitedCount ~= latestRoomDescription.roomVisitedCount
|
|
33311
|
+
end
|
|
33312
|
+
__TS__Decorate({Exported}, RoomHistory.prototype, "getRoomHistory", true)
|
|
33313
|
+
__TS__Decorate({Exported}, RoomHistory.prototype, "getPreviousRoomDescription", true)
|
|
33314
|
+
__TS__Decorate({Exported}, RoomHistory.prototype, "getLatestRoomDescription", true)
|
|
33315
|
+
__TS__Decorate({Exported}, RoomHistory.prototype, "isLeavingRoom", true)
|
|
33316
|
+
return ____exports
|
|
33317
|
+
end,
|
|
33318
|
+
["src.classes.features.other.PickupIndexCreation"] = function(...)
|
|
33319
|
+
local ____lualib = require("lualib_bundle")
|
|
33320
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
33321
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
33322
|
+
local Map = ____lualib.Map
|
|
33323
|
+
local __TS__New = ____lualib.__TS__New
|
|
33324
|
+
local __TS__Decorate = ____lualib.__TS__Decorate
|
|
33325
|
+
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
33326
|
+
local ____exports = {}
|
|
33327
|
+
local getStoredPickupIndex
|
|
33328
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
33329
|
+
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
33330
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
33331
|
+
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
33332
|
+
local ____cachedClasses = require("src.core.cachedClasses")
|
|
33333
|
+
local game = ____cachedClasses.game
|
|
33334
|
+
local ____decorators = require("src.decorators")
|
|
33335
|
+
local Exported = ____decorators.Exported
|
|
33336
|
+
local ____ISCFeature = require("src.enums.ISCFeature")
|
|
33337
|
+
local ISCFeature = ____ISCFeature.ISCFeature
|
|
33338
|
+
local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
|
|
33339
|
+
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
33340
|
+
local ____entities = require("src.functions.entities")
|
|
33341
|
+
local getEntityID = ____entities.getEntityID
|
|
33342
|
+
local ____entitiesSpecific = require("src.functions.entitiesSpecific")
|
|
33343
|
+
local getPickups = ____entitiesSpecific.getPickups
|
|
33344
|
+
local ____roomData = require("src.functions.roomData")
|
|
33345
|
+
local getRoomListIndex = ____roomData.getRoomListIndex
|
|
33346
|
+
local ____stage = require("src.functions.stage")
|
|
33347
|
+
local onAscent = ____stage.onAscent
|
|
33348
|
+
local ____vector = require("src.functions.vector")
|
|
33349
|
+
local vectorEquals = ____vector.vectorEquals
|
|
33350
|
+
local ____DefaultMap = require("src.classes.DefaultMap")
|
|
33351
|
+
local DefaultMap = ____DefaultMap.DefaultMap
|
|
33352
|
+
local ____Feature = require("src.classes.private.Feature")
|
|
33353
|
+
local Feature = ____Feature.Feature
|
|
33354
|
+
function getStoredPickupIndex(self, pickup, pickupDescriptions)
|
|
33355
|
+
for ____, ____value in __TS__Iterator(pickupDescriptions:entries()) do
|
|
33356
|
+
local pickupIndex = ____value[1]
|
|
33357
|
+
local pickupDescription = ____value[2]
|
|
33358
|
+
if vectorEquals(nil, pickupDescription.position, pickup.Position) and pickupDescription.initSeed == pickup.InitSeed then
|
|
33359
|
+
return pickupIndex
|
|
33360
|
+
end
|
|
33361
|
+
end
|
|
33362
|
+
return nil
|
|
33363
|
+
end
|
|
33364
|
+
____exports.PickupIndexCreation = __TS__Class()
|
|
33365
|
+
local PickupIndexCreation = ____exports.PickupIndexCreation
|
|
33366
|
+
PickupIndexCreation.name = "PickupIndexCreation"
|
|
33367
|
+
__TS__ClassExtends(PickupIndexCreation, Feature)
|
|
33368
|
+
function PickupIndexCreation.prototype.____constructor(self, roomHistory)
|
|
33369
|
+
Feature.prototype.____constructor(self)
|
|
33370
|
+
self.v = {
|
|
33371
|
+
run = {
|
|
33372
|
+
pickupCounter = 0,
|
|
33373
|
+
pickupDataTreasureRooms = __TS__New(Map),
|
|
33374
|
+
pickupDataBossRooms = __TS__New(Map)
|
|
33375
|
+
},
|
|
33376
|
+
level = {pickupData = __TS__New(
|
|
33377
|
+
DefaultMap,
|
|
33378
|
+
function() return __TS__New(Map) end
|
|
33379
|
+
)},
|
|
33380
|
+
room = {pickupIndexes = __TS__New(Map)}
|
|
33381
|
+
}
|
|
33382
|
+
self.postPickupInit = function(____, pickup)
|
|
33383
|
+
local ptrHash = GetPtrHash(pickup)
|
|
33384
|
+
if self.v.room.pickupIndexes:has(ptrHash) then
|
|
33385
|
+
return
|
|
33386
|
+
end
|
|
33387
|
+
local room = game:GetRoom()
|
|
33388
|
+
local isFirstVisit = room:IsFirstVisit()
|
|
33389
|
+
local roomFrameCount = room:GetFrameCount()
|
|
33390
|
+
if not isFirstVisit and roomFrameCount <= 0 then
|
|
33391
|
+
return
|
|
33392
|
+
end
|
|
33393
|
+
local ____self_v_run_0, ____pickupCounter_1 = self.v.run, "pickupCounter"
|
|
33394
|
+
____self_v_run_0[____pickupCounter_1] = ____self_v_run_0[____pickupCounter_1] + 1
|
|
33395
|
+
self.v.room.pickupIndexes:set(ptrHash, self.v.run.pickupCounter)
|
|
33396
|
+
end
|
|
33397
|
+
self.postEntityRemovePickup = function(____, entity)
|
|
33398
|
+
self:checkDespawningFromPlayerLeavingRoom(entity)
|
|
33399
|
+
end
|
|
33400
|
+
self.postNewRoomReordered = function()
|
|
33401
|
+
local room = game:GetRoom()
|
|
33402
|
+
local isFirstVisit = room:IsFirstVisit()
|
|
33403
|
+
if isFirstVisit then
|
|
33404
|
+
return
|
|
33405
|
+
end
|
|
33406
|
+
local roomListIndex = getRoomListIndex(nil)
|
|
33407
|
+
local pickupDescriptions = self.v.level.pickupData:getAndSetDefault(roomListIndex)
|
|
33408
|
+
for ____, pickup in ipairs(getPickups(nil)) do
|
|
33409
|
+
local pickupIndex = getStoredPickupIndex(nil, pickup, pickupDescriptions)
|
|
33410
|
+
if pickupIndex == nil then
|
|
33411
|
+
pickupIndex = self:getPostAscentPickupIndex(pickup)
|
|
33412
|
+
end
|
|
33413
|
+
if pickupIndex == nil then
|
|
33414
|
+
local ____self_v_run_2, ____pickupCounter_3 = self.v.run, "pickupCounter"
|
|
33415
|
+
____self_v_run_2[____pickupCounter_3] = ____self_v_run_2[____pickupCounter_3] + 1
|
|
33416
|
+
pickupIndex = self.v.run.pickupCounter
|
|
33417
|
+
end
|
|
33418
|
+
local ptrHash = GetPtrHash(pickup)
|
|
33419
|
+
self.v.room.pickupIndexes:set(ptrHash, pickupIndex)
|
|
33420
|
+
end
|
|
33421
|
+
end
|
|
33422
|
+
self.featuresUsed = {ISCFeature.ROOM_HISTORY}
|
|
33423
|
+
self.callbacksUsed = {{ModCallback.POST_PICKUP_INIT, {self.postPickupInit}}, {ModCallback.POST_ENTITY_REMOVE, {self.postEntityRemovePickup, EntityType.PICKUP}}}
|
|
33424
|
+
self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, {self.postNewRoomReordered}}}
|
|
33425
|
+
self.roomHistory = roomHistory
|
|
33426
|
+
end
|
|
33427
|
+
function PickupIndexCreation.prototype.checkDespawningFromPlayerLeavingRoom(self, entity)
|
|
33428
|
+
local ptrHash = GetPtrHash(entity)
|
|
33429
|
+
local pickupIndex = self.v.room.pickupIndexes:get(ptrHash)
|
|
33430
|
+
if pickupIndex == nil then
|
|
33431
|
+
return
|
|
33432
|
+
end
|
|
33433
|
+
if not self.roomHistory:isLeavingRoom() then
|
|
33434
|
+
return
|
|
33435
|
+
end
|
|
33436
|
+
self:trackDespawningPickupMetadata(entity, pickupIndex)
|
|
33437
|
+
end
|
|
33438
|
+
function PickupIndexCreation.prototype.trackDespawningPickupMetadata(self, entity, pickupIndex)
|
|
33439
|
+
local previousRoomDescription = self.roomHistory:getLatestRoomDescription()
|
|
33440
|
+
if previousRoomDescription == nil then
|
|
33441
|
+
return
|
|
33442
|
+
end
|
|
33443
|
+
local previousRoomListIndex = previousRoomDescription.roomListIndex
|
|
33444
|
+
local pickupDescriptions = self.v.level.pickupData:getAndSetDefault(previousRoomListIndex)
|
|
33445
|
+
local pickupDescription = {position = entity.Position, initSeed = entity.InitSeed}
|
|
33446
|
+
pickupDescriptions:set(pickupIndex, pickupDescription)
|
|
33447
|
+
if onAscent(nil) then
|
|
33448
|
+
return
|
|
33449
|
+
end
|
|
33450
|
+
local room = game:GetRoom()
|
|
33451
|
+
local roomType = room:GetType()
|
|
33452
|
+
repeat
|
|
33453
|
+
local ____switch20 = roomType
|
|
33454
|
+
local ____cond20 = ____switch20 == RoomType.TREASURE
|
|
33455
|
+
if ____cond20 then
|
|
33456
|
+
do
|
|
33457
|
+
self.v.run.pickupDataTreasureRooms:set(pickupIndex, pickupDescription)
|
|
33458
|
+
break
|
|
33459
|
+
end
|
|
33460
|
+
end
|
|
33461
|
+
____cond20 = ____cond20 or ____switch20 == RoomType.BOSS
|
|
33462
|
+
if ____cond20 then
|
|
33463
|
+
do
|
|
33464
|
+
self.v.run.pickupDataBossRooms:set(pickupIndex, pickupDescription)
|
|
33465
|
+
break
|
|
33466
|
+
end
|
|
33467
|
+
end
|
|
33468
|
+
do
|
|
33469
|
+
do
|
|
33470
|
+
break
|
|
33471
|
+
end
|
|
33472
|
+
end
|
|
33473
|
+
until true
|
|
33474
|
+
end
|
|
33475
|
+
function PickupIndexCreation.prototype.getPostAscentPickupIndex(self, pickup)
|
|
33476
|
+
if not onAscent(nil) then
|
|
33477
|
+
return nil
|
|
33478
|
+
end
|
|
33479
|
+
local room = game:GetRoom()
|
|
33480
|
+
local roomType = room:GetType()
|
|
33481
|
+
repeat
|
|
33482
|
+
local ____switch26 = roomType
|
|
33483
|
+
local ____cond26 = ____switch26 == RoomType.TREASURE
|
|
33484
|
+
if ____cond26 then
|
|
33485
|
+
do
|
|
33486
|
+
return getStoredPickupIndex(nil, pickup, self.v.run.pickupDataTreasureRooms)
|
|
33487
|
+
end
|
|
33488
|
+
end
|
|
33489
|
+
____cond26 = ____cond26 or ____switch26 == RoomType.BOSS
|
|
33490
|
+
if ____cond26 then
|
|
33491
|
+
do
|
|
33492
|
+
return getStoredPickupIndex(nil, pickup, self.v.run.pickupDataBossRooms)
|
|
33493
|
+
end
|
|
33494
|
+
end
|
|
33495
|
+
do
|
|
33496
|
+
do
|
|
33497
|
+
return nil
|
|
33498
|
+
end
|
|
33499
|
+
end
|
|
33500
|
+
until true
|
|
33501
|
+
end
|
|
33502
|
+
function PickupIndexCreation.prototype.getPickupIndex(self, pickup)
|
|
33503
|
+
local ptrHash = GetPtrHash(pickup)
|
|
33504
|
+
local pickupIndex = self.v.room.pickupIndexes:get(ptrHash)
|
|
33505
|
+
if pickupIndex == nil then
|
|
33506
|
+
local entityID = getEntityID(nil, pickup)
|
|
33507
|
+
error((("Failed to get a pickup index for entity " .. entityID) .. " with hash: ") .. tostring(ptrHash))
|
|
33508
|
+
end
|
|
33509
|
+
return pickupIndex
|
|
33510
|
+
end
|
|
33511
|
+
__TS__Decorate({Exported}, PickupIndexCreation.prototype, "getPickupIndex", true)
|
|
33208
33512
|
return ____exports
|
|
33209
33513
|
end,
|
|
33210
33514
|
["src.classes.features.other.CollectibleItemPoolType"] = function(...)
|
|
@@ -33222,6 +33526,8 @@ local ____cachedClasses = require("src.core.cachedClasses")
|
|
|
33222
33526
|
local game = ____cachedClasses.game
|
|
33223
33527
|
local ____decorators = require("src.decorators")
|
|
33224
33528
|
local Exported = ____decorators.Exported
|
|
33529
|
+
local ____ISCFeature = require("src.enums.ISCFeature")
|
|
33530
|
+
local ISCFeature = ____ISCFeature.ISCFeature
|
|
33225
33531
|
local ____entities = require("src.functions.entities")
|
|
33226
33532
|
local getEntityID = ____entities.getEntityID
|
|
33227
33533
|
local ____pickupVariants = require("src.functions.pickupVariants")
|
|
@@ -33234,24 +33540,26 @@ ____exports.CollectibleItemPoolType = __TS__Class()
|
|
|
33234
33540
|
local CollectibleItemPoolType = ____exports.CollectibleItemPoolType
|
|
33235
33541
|
CollectibleItemPoolType.name = "CollectibleItemPoolType"
|
|
33236
33542
|
__TS__ClassExtends(CollectibleItemPoolType, Feature)
|
|
33237
|
-
function CollectibleItemPoolType.prototype.____constructor(self)
|
|
33543
|
+
function CollectibleItemPoolType.prototype.____constructor(self, pickupIndexCreation)
|
|
33238
33544
|
Feature.prototype.____constructor(self)
|
|
33239
33545
|
self.v = {run = {collectibleItemPoolTypeMap = __TS__New(Map)}}
|
|
33240
|
-
self.postPickupInitCollectible = function(____,
|
|
33546
|
+
self.postPickupInitCollectible = function(____, collectible)
|
|
33241
33547
|
local itemPool = game:GetItemPool()
|
|
33242
|
-
local
|
|
33548
|
+
local pickupIndex = self.pickupIndexCreation:getPickupIndex(collectible)
|
|
33243
33549
|
local lastItemPoolType = itemPool:GetLastPool()
|
|
33244
|
-
self.v.run.collectibleItemPoolTypeMap:set(
|
|
33550
|
+
self.v.run.collectibleItemPoolTypeMap:set(pickupIndex, lastItemPoolType)
|
|
33245
33551
|
end
|
|
33552
|
+
self.featuresUsed = {ISCFeature.PICKUP_INDEX_CREATION}
|
|
33246
33553
|
self.callbacksUsed = {{ModCallback.POST_PICKUP_INIT, {self.postPickupInitCollectible, PickupVariant.COLLECTIBLE}}}
|
|
33554
|
+
self.pickupIndexCreation = pickupIndexCreation
|
|
33247
33555
|
end
|
|
33248
33556
|
function CollectibleItemPoolType.prototype.getCollectibleItemPoolType(self, collectible)
|
|
33249
33557
|
if not isCollectible(nil, collectible) then
|
|
33250
33558
|
local entityID = getEntityID(nil, collectible)
|
|
33251
33559
|
error("The \"getCollectibleItemPoolType\" function was given a non-collectible: " .. entityID)
|
|
33252
33560
|
end
|
|
33253
|
-
local
|
|
33254
|
-
local itemPoolType = self.v.run.collectibleItemPoolTypeMap:get(
|
|
33561
|
+
local pickupIndex = self.pickupIndexCreation:getPickupIndex(collectible)
|
|
33562
|
+
local itemPoolType = self.v.run.collectibleItemPoolTypeMap:get(pickupIndex)
|
|
33255
33563
|
return itemPoolType == nil and getRoomItemPoolType(nil) or itemPoolType
|
|
33256
33564
|
end
|
|
33257
33565
|
__TS__Decorate({Exported}, CollectibleItemPoolType.prototype, "getCollectibleItemPoolType", true)
|
|
@@ -45668,110 +45976,6 @@ function NoSirenSteal.prototype.setFamiliarNoSirenSteal(self, familiarVariant, f
|
|
|
45668
45976
|
____self_v_run_familiarBlacklist_0[#____self_v_run_familiarBlacklist_0 + 1] = {familiarVariant, familiarSubType}
|
|
45669
45977
|
end
|
|
45670
45978
|
__TS__Decorate({Exported}, NoSirenSteal.prototype, "setFamiliarNoSirenSteal", true)
|
|
45671
|
-
return ____exports
|
|
45672
|
-
end,
|
|
45673
|
-
["src.interfaces.RoomDescription"] = function(...)
|
|
45674
|
-
local ____exports = {}
|
|
45675
|
-
return ____exports
|
|
45676
|
-
end,
|
|
45677
|
-
["src.classes.features.other.RoomHistory"] = function(...)
|
|
45678
|
-
local ____lualib = require("lualib_bundle")
|
|
45679
|
-
local __TS__Class = ____lualib.__TS__Class
|
|
45680
|
-
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
45681
|
-
local __TS__Decorate = ____lualib.__TS__Decorate
|
|
45682
|
-
local ____exports = {}
|
|
45683
|
-
local ____cachedClasses = require("src.core.cachedClasses")
|
|
45684
|
-
local game = ____cachedClasses.game
|
|
45685
|
-
local ____decorators = require("src.decorators")
|
|
45686
|
-
local Exported = ____decorators.Exported
|
|
45687
|
-
local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
|
|
45688
|
-
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
45689
|
-
local ____array = require("src.functions.array")
|
|
45690
|
-
local getLastElement = ____array.getLastElement
|
|
45691
|
-
local ____dimensions = require("src.functions.dimensions")
|
|
45692
|
-
local getDimension = ____dimensions.getDimension
|
|
45693
|
-
local ____roomData = require("src.functions.roomData")
|
|
45694
|
-
local getRoomGridIndex = ____roomData.getRoomGridIndex
|
|
45695
|
-
local getRoomListIndex = ____roomData.getRoomListIndex
|
|
45696
|
-
local getRoomName = ____roomData.getRoomName
|
|
45697
|
-
local getRoomStageID = ____roomData.getRoomStageID
|
|
45698
|
-
local getRoomSubType = ____roomData.getRoomSubType
|
|
45699
|
-
local getRoomVariant = ____roomData.getRoomVariant
|
|
45700
|
-
local getRoomVisitedCount = ____roomData.getRoomVisitedCount
|
|
45701
|
-
local ____Feature = require("src.classes.private.Feature")
|
|
45702
|
-
local Feature = ____Feature.Feature
|
|
45703
|
-
____exports.RoomHistory = __TS__Class()
|
|
45704
|
-
local RoomHistory = ____exports.RoomHistory
|
|
45705
|
-
RoomHistory.name = "RoomHistory"
|
|
45706
|
-
__TS__ClassExtends(RoomHistory, Feature)
|
|
45707
|
-
function RoomHistory.prototype.____constructor(self)
|
|
45708
|
-
Feature.prototype.____constructor(self)
|
|
45709
|
-
self.v = {run = {roomHistory = {}}}
|
|
45710
|
-
self.postNewRoomEarly = function()
|
|
45711
|
-
local level = game:GetLevel()
|
|
45712
|
-
local stage = level:GetStage()
|
|
45713
|
-
local stageType = level:GetStageType()
|
|
45714
|
-
local room = game:GetRoom()
|
|
45715
|
-
local roomType = room:GetType()
|
|
45716
|
-
local stageID = getRoomStageID(nil)
|
|
45717
|
-
local dimension = getDimension(nil)
|
|
45718
|
-
local roomVariant = getRoomVariant(nil)
|
|
45719
|
-
local roomSubType = getRoomSubType(nil)
|
|
45720
|
-
local roomName = getRoomName(nil)
|
|
45721
|
-
local roomGridIndex = getRoomGridIndex(nil)
|
|
45722
|
-
local roomListIndex = getRoomListIndex(nil)
|
|
45723
|
-
local roomVisitedCount = getRoomVisitedCount(nil)
|
|
45724
|
-
local roomDescription = {
|
|
45725
|
-
stage = stage,
|
|
45726
|
-
stageType = stageType,
|
|
45727
|
-
stageID = stageID,
|
|
45728
|
-
dimension = dimension,
|
|
45729
|
-
roomType = roomType,
|
|
45730
|
-
roomVariant = roomVariant,
|
|
45731
|
-
roomSubType = roomSubType,
|
|
45732
|
-
roomName = roomName,
|
|
45733
|
-
roomGridIndex = roomGridIndex,
|
|
45734
|
-
roomListIndex = roomListIndex,
|
|
45735
|
-
roomVisitedCount = roomVisitedCount
|
|
45736
|
-
}
|
|
45737
|
-
local ____self_v_run_roomHistory_0 = self.v.run.roomHistory
|
|
45738
|
-
____self_v_run_roomHistory_0[#____self_v_run_roomHistory_0 + 1] = roomDescription
|
|
45739
|
-
end
|
|
45740
|
-
self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_EARLY, {self.postNewRoomEarly}}}
|
|
45741
|
-
end
|
|
45742
|
-
function RoomHistory.prototype.getRoomHistory(self)
|
|
45743
|
-
return self.v.run.roomHistory
|
|
45744
|
-
end
|
|
45745
|
-
function RoomHistory.prototype.getPreviousRoomDescription(self)
|
|
45746
|
-
local previousRoomDescription = self.v.run.roomHistory[#self.v.run.roomHistory - 2 + 1]
|
|
45747
|
-
if previousRoomDescription ~= nil then
|
|
45748
|
-
return previousRoomDescription
|
|
45749
|
-
end
|
|
45750
|
-
local startingRoomDescription = self.v.run.roomHistory[1]
|
|
45751
|
-
if startingRoomDescription ~= nil then
|
|
45752
|
-
return startingRoomDescription
|
|
45753
|
-
end
|
|
45754
|
-
error("Failed to find a room description for any rooms thus far on this run.")
|
|
45755
|
-
end
|
|
45756
|
-
function RoomHistory.prototype.getLatestRoomDescription(self)
|
|
45757
|
-
return getLastElement(nil, self.v.run.roomHistory)
|
|
45758
|
-
end
|
|
45759
|
-
function RoomHistory.prototype.isLeavingRoom(self)
|
|
45760
|
-
local level = game:GetLevel()
|
|
45761
|
-
local stage = level:GetStage()
|
|
45762
|
-
local stageType = level:GetStageType()
|
|
45763
|
-
local roomListIndex = getRoomListIndex(nil)
|
|
45764
|
-
local roomVisitedCount = getRoomVisitedCount(nil)
|
|
45765
|
-
local latestRoomDescription = self:getLatestRoomDescription()
|
|
45766
|
-
if latestRoomDescription == nil then
|
|
45767
|
-
return false
|
|
45768
|
-
end
|
|
45769
|
-
return stage ~= latestRoomDescription.stage or stageType ~= latestRoomDescription.stageType or roomListIndex ~= latestRoomDescription.roomListIndex or roomVisitedCount ~= latestRoomDescription.roomVisitedCount
|
|
45770
|
-
end
|
|
45771
|
-
__TS__Decorate({Exported}, RoomHistory.prototype, "getRoomHistory", true)
|
|
45772
|
-
__TS__Decorate({Exported}, RoomHistory.prototype, "getPreviousRoomDescription", true)
|
|
45773
|
-
__TS__Decorate({Exported}, RoomHistory.prototype, "getLatestRoomDescription", true)
|
|
45774
|
-
__TS__Decorate({Exported}, RoomHistory.prototype, "isLeavingRoom", true)
|
|
45775
45979
|
return ____exports
|
|
45776
45980
|
end,
|
|
45777
45981
|
["src.classes.features.other.PersistentEntities"] = function(...)
|
|
@@ -45929,206 +46133,6 @@ function PersistentEntities.prototype.spawnPersistentEntity(self, entityType, va
|
|
|
45929
46133
|
end
|
|
45930
46134
|
__TS__Decorate({Exported}, PersistentEntities.prototype, "removePersistentEntity", true)
|
|
45931
46135
|
__TS__Decorate({Exported}, PersistentEntities.prototype, "spawnPersistentEntity", true)
|
|
45932
|
-
return ____exports
|
|
45933
|
-
end,
|
|
45934
|
-
["src.types.PickupIndex"] = function(...)
|
|
45935
|
-
local ____exports = {}
|
|
45936
|
-
return ____exports
|
|
45937
|
-
end,
|
|
45938
|
-
["src.classes.features.other.PickupIndexCreation"] = function(...)
|
|
45939
|
-
local ____lualib = require("lualib_bundle")
|
|
45940
|
-
local __TS__Class = ____lualib.__TS__Class
|
|
45941
|
-
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
45942
|
-
local Map = ____lualib.Map
|
|
45943
|
-
local __TS__New = ____lualib.__TS__New
|
|
45944
|
-
local __TS__Decorate = ____lualib.__TS__Decorate
|
|
45945
|
-
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
45946
|
-
local ____exports = {}
|
|
45947
|
-
local getStoredPickupIndex
|
|
45948
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
45949
|
-
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
45950
|
-
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
45951
|
-
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
45952
|
-
local ____cachedClasses = require("src.core.cachedClasses")
|
|
45953
|
-
local game = ____cachedClasses.game
|
|
45954
|
-
local ____decorators = require("src.decorators")
|
|
45955
|
-
local Exported = ____decorators.Exported
|
|
45956
|
-
local ____ISCFeature = require("src.enums.ISCFeature")
|
|
45957
|
-
local ISCFeature = ____ISCFeature.ISCFeature
|
|
45958
|
-
local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
|
|
45959
|
-
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
45960
|
-
local ____entities = require("src.functions.entities")
|
|
45961
|
-
local getEntityID = ____entities.getEntityID
|
|
45962
|
-
local ____entitiesSpecific = require("src.functions.entitiesSpecific")
|
|
45963
|
-
local getPickups = ____entitiesSpecific.getPickups
|
|
45964
|
-
local ____roomData = require("src.functions.roomData")
|
|
45965
|
-
local getRoomListIndex = ____roomData.getRoomListIndex
|
|
45966
|
-
local ____stage = require("src.functions.stage")
|
|
45967
|
-
local onAscent = ____stage.onAscent
|
|
45968
|
-
local ____vector = require("src.functions.vector")
|
|
45969
|
-
local vectorEquals = ____vector.vectorEquals
|
|
45970
|
-
local ____DefaultMap = require("src.classes.DefaultMap")
|
|
45971
|
-
local DefaultMap = ____DefaultMap.DefaultMap
|
|
45972
|
-
local ____Feature = require("src.classes.private.Feature")
|
|
45973
|
-
local Feature = ____Feature.Feature
|
|
45974
|
-
function getStoredPickupIndex(self, pickup, pickupDescriptions)
|
|
45975
|
-
for ____, ____value in __TS__Iterator(pickupDescriptions:entries()) do
|
|
45976
|
-
local pickupIndex = ____value[1]
|
|
45977
|
-
local pickupDescription = ____value[2]
|
|
45978
|
-
if vectorEquals(nil, pickupDescription.position, pickup.Position) and pickupDescription.initSeed == pickup.InitSeed then
|
|
45979
|
-
return pickupIndex
|
|
45980
|
-
end
|
|
45981
|
-
end
|
|
45982
|
-
return nil
|
|
45983
|
-
end
|
|
45984
|
-
____exports.PickupIndexCreation = __TS__Class()
|
|
45985
|
-
local PickupIndexCreation = ____exports.PickupIndexCreation
|
|
45986
|
-
PickupIndexCreation.name = "PickupIndexCreation"
|
|
45987
|
-
__TS__ClassExtends(PickupIndexCreation, Feature)
|
|
45988
|
-
function PickupIndexCreation.prototype.____constructor(self, roomHistory)
|
|
45989
|
-
Feature.prototype.____constructor(self)
|
|
45990
|
-
self.v = {
|
|
45991
|
-
run = {
|
|
45992
|
-
pickupCounter = 0,
|
|
45993
|
-
pickupDataTreasureRooms = __TS__New(Map),
|
|
45994
|
-
pickupDataBossRooms = __TS__New(Map)
|
|
45995
|
-
},
|
|
45996
|
-
level = {pickupData = __TS__New(
|
|
45997
|
-
DefaultMap,
|
|
45998
|
-
function() return __TS__New(Map) end
|
|
45999
|
-
)},
|
|
46000
|
-
room = {pickupIndexes = __TS__New(Map)}
|
|
46001
|
-
}
|
|
46002
|
-
self.postPickupInit = function(____, pickup)
|
|
46003
|
-
local ptrHash = GetPtrHash(pickup)
|
|
46004
|
-
if self.v.room.pickupIndexes:has(ptrHash) then
|
|
46005
|
-
return
|
|
46006
|
-
end
|
|
46007
|
-
local room = game:GetRoom()
|
|
46008
|
-
local isFirstVisit = room:IsFirstVisit()
|
|
46009
|
-
local roomFrameCount = room:GetFrameCount()
|
|
46010
|
-
if not isFirstVisit and roomFrameCount <= 0 then
|
|
46011
|
-
return
|
|
46012
|
-
end
|
|
46013
|
-
local ____self_v_run_0, ____pickupCounter_1 = self.v.run, "pickupCounter"
|
|
46014
|
-
____self_v_run_0[____pickupCounter_1] = ____self_v_run_0[____pickupCounter_1] + 1
|
|
46015
|
-
self.v.room.pickupIndexes:set(ptrHash, self.v.run.pickupCounter)
|
|
46016
|
-
end
|
|
46017
|
-
self.postEntityRemovePickup = function(____, entity)
|
|
46018
|
-
self:checkDespawningFromPlayerLeavingRoom(entity)
|
|
46019
|
-
end
|
|
46020
|
-
self.postNewRoomReordered = function()
|
|
46021
|
-
local room = game:GetRoom()
|
|
46022
|
-
local isFirstVisit = room:IsFirstVisit()
|
|
46023
|
-
if isFirstVisit then
|
|
46024
|
-
return
|
|
46025
|
-
end
|
|
46026
|
-
local roomListIndex = getRoomListIndex(nil)
|
|
46027
|
-
local pickupDescriptions = self.v.level.pickupData:getAndSetDefault(roomListIndex)
|
|
46028
|
-
for ____, pickup in ipairs(getPickups(nil)) do
|
|
46029
|
-
local pickupIndex = getStoredPickupIndex(nil, pickup, pickupDescriptions)
|
|
46030
|
-
if pickupIndex == nil then
|
|
46031
|
-
pickupIndex = self:getPostAscentPickupIndex(pickup)
|
|
46032
|
-
end
|
|
46033
|
-
if pickupIndex == nil then
|
|
46034
|
-
local ____self_v_run_2, ____pickupCounter_3 = self.v.run, "pickupCounter"
|
|
46035
|
-
____self_v_run_2[____pickupCounter_3] = ____self_v_run_2[____pickupCounter_3] + 1
|
|
46036
|
-
pickupIndex = self.v.run.pickupCounter
|
|
46037
|
-
end
|
|
46038
|
-
local ptrHash = GetPtrHash(pickup)
|
|
46039
|
-
self.v.room.pickupIndexes:set(ptrHash, pickupIndex)
|
|
46040
|
-
end
|
|
46041
|
-
end
|
|
46042
|
-
self.featuresUsed = {ISCFeature.ROOM_HISTORY}
|
|
46043
|
-
self.callbacksUsed = {{ModCallback.POST_PICKUP_INIT, {self.postPickupInit}}, {ModCallback.POST_ENTITY_REMOVE, {self.postEntityRemovePickup, EntityType.PICKUP}}}
|
|
46044
|
-
self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, {self.postNewRoomReordered}}}
|
|
46045
|
-
self.roomHistory = roomHistory
|
|
46046
|
-
end
|
|
46047
|
-
function PickupIndexCreation.prototype.checkDespawningFromPlayerLeavingRoom(self, entity)
|
|
46048
|
-
local ptrHash = GetPtrHash(entity)
|
|
46049
|
-
local pickupIndex = self.v.room.pickupIndexes:get(ptrHash)
|
|
46050
|
-
if pickupIndex == nil then
|
|
46051
|
-
return
|
|
46052
|
-
end
|
|
46053
|
-
if not self.roomHistory:isLeavingRoom() then
|
|
46054
|
-
return
|
|
46055
|
-
end
|
|
46056
|
-
self:trackDespawningPickupMetadata(entity, pickupIndex)
|
|
46057
|
-
end
|
|
46058
|
-
function PickupIndexCreation.prototype.trackDespawningPickupMetadata(self, entity, pickupIndex)
|
|
46059
|
-
local previousRoomDescription = self.roomHistory:getLatestRoomDescription()
|
|
46060
|
-
if previousRoomDescription == nil then
|
|
46061
|
-
return
|
|
46062
|
-
end
|
|
46063
|
-
local previousRoomListIndex = previousRoomDescription.roomListIndex
|
|
46064
|
-
local pickupDescriptions = self.v.level.pickupData:getAndSetDefault(previousRoomListIndex)
|
|
46065
|
-
local pickupDescription = {position = entity.Position, initSeed = entity.InitSeed}
|
|
46066
|
-
pickupDescriptions:set(pickupIndex, pickupDescription)
|
|
46067
|
-
if onAscent(nil) then
|
|
46068
|
-
return
|
|
46069
|
-
end
|
|
46070
|
-
local room = game:GetRoom()
|
|
46071
|
-
local roomType = room:GetType()
|
|
46072
|
-
repeat
|
|
46073
|
-
local ____switch20 = roomType
|
|
46074
|
-
local ____cond20 = ____switch20 == RoomType.TREASURE
|
|
46075
|
-
if ____cond20 then
|
|
46076
|
-
do
|
|
46077
|
-
self.v.run.pickupDataTreasureRooms:set(pickupIndex, pickupDescription)
|
|
46078
|
-
break
|
|
46079
|
-
end
|
|
46080
|
-
end
|
|
46081
|
-
____cond20 = ____cond20 or ____switch20 == RoomType.BOSS
|
|
46082
|
-
if ____cond20 then
|
|
46083
|
-
do
|
|
46084
|
-
self.v.run.pickupDataBossRooms:set(pickupIndex, pickupDescription)
|
|
46085
|
-
break
|
|
46086
|
-
end
|
|
46087
|
-
end
|
|
46088
|
-
do
|
|
46089
|
-
do
|
|
46090
|
-
break
|
|
46091
|
-
end
|
|
46092
|
-
end
|
|
46093
|
-
until true
|
|
46094
|
-
end
|
|
46095
|
-
function PickupIndexCreation.prototype.getPostAscentPickupIndex(self, pickup)
|
|
46096
|
-
if not onAscent(nil) then
|
|
46097
|
-
return nil
|
|
46098
|
-
end
|
|
46099
|
-
local room = game:GetRoom()
|
|
46100
|
-
local roomType = room:GetType()
|
|
46101
|
-
repeat
|
|
46102
|
-
local ____switch26 = roomType
|
|
46103
|
-
local ____cond26 = ____switch26 == RoomType.TREASURE
|
|
46104
|
-
if ____cond26 then
|
|
46105
|
-
do
|
|
46106
|
-
return getStoredPickupIndex(nil, pickup, self.v.run.pickupDataTreasureRooms)
|
|
46107
|
-
end
|
|
46108
|
-
end
|
|
46109
|
-
____cond26 = ____cond26 or ____switch26 == RoomType.BOSS
|
|
46110
|
-
if ____cond26 then
|
|
46111
|
-
do
|
|
46112
|
-
return getStoredPickupIndex(nil, pickup, self.v.run.pickupDataBossRooms)
|
|
46113
|
-
end
|
|
46114
|
-
end
|
|
46115
|
-
do
|
|
46116
|
-
do
|
|
46117
|
-
return nil
|
|
46118
|
-
end
|
|
46119
|
-
end
|
|
46120
|
-
until true
|
|
46121
|
-
end
|
|
46122
|
-
function PickupIndexCreation.prototype.getPickupIndex(self, pickup)
|
|
46123
|
-
local ptrHash = GetPtrHash(pickup)
|
|
46124
|
-
local pickupIndex = self.v.room.pickupIndexes:get(ptrHash)
|
|
46125
|
-
if pickupIndex == nil then
|
|
46126
|
-
local entityID = getEntityID(nil, pickup)
|
|
46127
|
-
error((("Failed to get a pickup index for entity " .. entityID) .. " with hash: ") .. tostring(ptrHash))
|
|
46128
|
-
end
|
|
46129
|
-
return pickupIndex
|
|
46130
|
-
end
|
|
46131
|
-
__TS__Decorate({Exported}, PickupIndexCreation.prototype, "getPickupIndex", true)
|
|
46132
46136
|
return ____exports
|
|
46133
46137
|
end,
|
|
46134
46138
|
["src.classes.features.other.PlayerInventory"] = function(...)
|
|
@@ -47934,6 +47938,7 @@ function ____exports.getFeatures(self, mod, callbacks)
|
|
|
47934
47938
|
local moddedElementSets = __TS__New(ModdedElementSets, moddedElementDetection)
|
|
47935
47939
|
local itemPoolDetection = __TS__New(ItemPoolDetection, moddedElementSets)
|
|
47936
47940
|
local pause = __TS__New(Pause, disableInputs)
|
|
47941
|
+
local pickupIndexCreation = __TS__New(PickupIndexCreation, roomHistory)
|
|
47937
47942
|
local preventGridEntityRespawn = __TS__New(PreventGridEntityRespawn, runInNFrames)
|
|
47938
47943
|
local spawnCollectible = __TS__New(SpawnCollectible, preventCollectibleRotation)
|
|
47939
47944
|
local customTrapdoors = __TS__New(
|
|
@@ -47983,7 +47988,7 @@ function ____exports.getFeatures(self, mod, callbacks)
|
|
|
47983
47988
|
[ISCFeature.SLOT_UPDATE_DETECTION] = __TS__New(SlotUpdateDetection, callbacks[ModCallbackCustom.POST_SLOT_INIT], callbacks[ModCallbackCustom.POST_SLOT_UPDATE]),
|
|
47984
47989
|
[ISCFeature.CHARACTER_HEALTH_CONVERSION] = __TS__New(CharacterHealthConversion),
|
|
47985
47990
|
[ISCFeature.CHARACTER_STATS] = __TS__New(CharacterStats),
|
|
47986
|
-
[ISCFeature.COLLECTIBLE_ITEM_POOL_TYPE] = __TS__New(CollectibleItemPoolType),
|
|
47991
|
+
[ISCFeature.COLLECTIBLE_ITEM_POOL_TYPE] = __TS__New(CollectibleItemPoolType, pickupIndexCreation),
|
|
47987
47992
|
[ISCFeature.CUSTOM_GRID_ENTITIES] = customGridEntities,
|
|
47988
47993
|
[ISCFeature.CUSTOM_ITEM_POOLS] = __TS__New(CustomItemPools),
|
|
47989
47994
|
[ISCFeature.CUSTOM_HOTKEYS] = __TS__New(CustomHotkeys),
|
|
@@ -48013,7 +48018,7 @@ function ____exports.getFeatures(self, mod, callbacks)
|
|
|
48013
48018
|
[ISCFeature.NO_SIREN_STEAL] = __TS__New(NoSirenSteal),
|
|
48014
48019
|
[ISCFeature.PAUSE] = pause,
|
|
48015
48020
|
[ISCFeature.PERSISTENT_ENTITIES] = __TS__New(PersistentEntities, roomHistory),
|
|
48016
|
-
[ISCFeature.PICKUP_INDEX_CREATION] =
|
|
48021
|
+
[ISCFeature.PICKUP_INDEX_CREATION] = pickupIndexCreation,
|
|
48017
48022
|
[ISCFeature.PLAYER_INVENTORY] = __TS__New(PlayerInventory),
|
|
48018
48023
|
[ISCFeature.PONY_DETECTION] = ponyDetection,
|
|
48019
48024
|
[ISCFeature.PREVENT_CHILD_ENTITIES] = __TS__New(PreventChildEntities),
|
|
@@ -48404,7 +48409,8 @@ function initDecoratedCallbacks(self, modFeature, constructor, tstlClassName, va
|
|
|
48404
48409
|
end
|
|
48405
48410
|
function addCallback(self, modFeature, modFeatureConstructor, mod, modCallback, callback, parameters, vanilla)
|
|
48406
48411
|
local function wrappedCallback(____, ...)
|
|
48407
|
-
|
|
48412
|
+
local castedCallback = callback
|
|
48413
|
+
castedCallback(modFeature, ...)
|
|
48408
48414
|
end
|
|
48409
48415
|
if vanilla then
|
|
48410
48416
|
local modCallbackVanilla = modCallback
|
|
@@ -36,7 +36,14 @@ export declare const ADD_CALLBACK_CUSTOM_ARGS_KEY = "__addCallbackCustomArgs";
|
|
|
36
36
|
*/
|
|
37
37
|
export declare class ModFeature {
|
|
38
38
|
private mod;
|
|
39
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Whether or not the feature has registered its callbacks yet (and submitted its variables to the
|
|
41
|
+
* save data manager, if any).
|
|
42
|
+
*
|
|
43
|
+
* This will almost always be equal to true unless you explicitly passed `false` to the second
|
|
44
|
+
* argument of the constructor.
|
|
45
|
+
*/
|
|
46
|
+
initialized: boolean;
|
|
40
47
|
constructor(mod: ModUpgradedBase, init?: boolean);
|
|
41
48
|
/**
|
|
42
49
|
* Runs the `Mod.AddCallback` and `ModUpgraded.AddCallbackCustom` methods for all of the decorated
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModFeature.d.ts","sourceRoot":"","sources":["../../../src/classes/ModFeature.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,eAAO,MAAM,qBAAqB,sBAAsB,CAAC;AACzD,eAAO,MAAM,4BAA4B,4BAA4B,CAAC;AAatE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,qBAAa,UAAU;IACrB,OAAO,CAAC,GAAG,CAAkB;
|
|
1
|
+
{"version":3,"file":"ModFeature.d.ts","sourceRoot":"","sources":["../../../src/classes/ModFeature.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,eAAO,MAAM,qBAAqB,sBAAsB,CAAC;AACzD,eAAO,MAAM,4BAA4B,4BAA4B,CAAC;AAatE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,qBAAa,UAAU;IACrB,OAAO,CAAC,GAAG,CAAkB;IAE7B;;;;;;OAMG;IACI,WAAW,UAAS;gBAEf,GAAG,EAAE,eAAe,EAAE,IAAI,UAAO;IAQ7C;;;;;OAKG;IACI,IAAI,CAAC,IAAI,UAAO,GAAG,IAAI;IAqB9B;;;;;;OAMG;IACI,MAAM,IAAI,IAAI;CAGtB"}
|
|
@@ -63,7 +63,8 @@ function initDecoratedCallbacks(self, modFeature, constructor, tstlClassName, va
|
|
|
63
63
|
end
|
|
64
64
|
function addCallback(self, modFeature, modFeatureConstructor, mod, modCallback, callback, parameters, vanilla)
|
|
65
65
|
local function wrappedCallback(____, ...)
|
|
66
|
-
|
|
66
|
+
local castedCallback = callback
|
|
67
|
+
castedCallback(modFeature, ...)
|
|
67
68
|
end
|
|
68
69
|
if vanilla then
|
|
69
70
|
local modCallbackVanilla = modCallback
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { ItemPoolType } from "isaac-typescript-definitions";
|
|
2
2
|
import { Feature } from "../../private/Feature";
|
|
3
|
-
/**
|
|
4
|
-
* The item pool type of a collectible is not stored on the collectible. Thus, we scan for incoming
|
|
5
|
-
* item pool types in the `PRE_GET_COLLECTIBLE` callback, and then assume that the next spawned
|
|
6
|
-
* collectible has this item pool type.
|
|
7
|
-
*/
|
|
8
3
|
export declare class CollectibleItemPoolType extends Feature {
|
|
4
|
+
private pickupIndexCreation;
|
|
9
5
|
private postPickupInitCollectible;
|
|
10
6
|
/**
|
|
11
7
|
* Helper function to get the item pool type that a given collectible came from. Since there is no
|
|
12
|
-
* native method in the API to get this, we listen in the `
|
|
13
|
-
*
|
|
8
|
+
* native method in the API to get this, we listen in the `POST_PICKUP_INIT` callback for
|
|
9
|
+
* collectibles, use the `ItemPool.GetLastPool` method, and then assume that the collectible
|
|
10
|
+
* matches.
|
|
14
11
|
*
|
|
15
12
|
* In order to use this function, you must upgrade your mod with
|
|
16
13
|
* `ISCFeature.COLLECTIBLE_ITEM_POOL_TYPE`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollectibleItemPoolType.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/CollectibleItemPoolType.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAGb,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"CollectibleItemPoolType.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/CollectibleItemPoolType.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAGb,MAAM,8BAA8B,CAAC;AAQtC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAGhD,qBAAa,uBAAwB,SAAQ,OAAO;IAQlD,OAAO,CAAC,mBAAmB,CAAsB;IAoBjD,OAAO,CAAC,yBAAyB,CAM/B;IAEF;;;;;;;;OAQG;IAEI,0BAA0B,CAAC,WAAW,EAAE,YAAY,GAAG,YAAY;CAY3E"}
|
|
@@ -12,6 +12,8 @@ local ____cachedClasses = require("src.core.cachedClasses")
|
|
|
12
12
|
local game = ____cachedClasses.game
|
|
13
13
|
local ____decorators = require("src.decorators")
|
|
14
14
|
local Exported = ____decorators.Exported
|
|
15
|
+
local ____ISCFeature = require("src.enums.ISCFeature")
|
|
16
|
+
local ISCFeature = ____ISCFeature.ISCFeature
|
|
15
17
|
local ____entities = require("src.functions.entities")
|
|
16
18
|
local getEntityID = ____entities.getEntityID
|
|
17
19
|
local ____pickupVariants = require("src.functions.pickupVariants")
|
|
@@ -20,31 +22,30 @@ local ____rooms = require("src.functions.rooms")
|
|
|
20
22
|
local getRoomItemPoolType = ____rooms.getRoomItemPoolType
|
|
21
23
|
local ____Feature = require("src.classes.private.Feature")
|
|
22
24
|
local Feature = ____Feature.Feature
|
|
23
|
-
--- The item pool type of a collectible is not stored on the collectible. Thus, we scan for incoming
|
|
24
|
-
-- item pool types in the `PRE_GET_COLLECTIBLE` callback, and then assume that the next spawned
|
|
25
|
-
-- collectible has this item pool type.
|
|
26
25
|
____exports.CollectibleItemPoolType = __TS__Class()
|
|
27
26
|
local CollectibleItemPoolType = ____exports.CollectibleItemPoolType
|
|
28
27
|
CollectibleItemPoolType.name = "CollectibleItemPoolType"
|
|
29
28
|
__TS__ClassExtends(CollectibleItemPoolType, Feature)
|
|
30
|
-
function CollectibleItemPoolType.prototype.____constructor(self)
|
|
29
|
+
function CollectibleItemPoolType.prototype.____constructor(self, pickupIndexCreation)
|
|
31
30
|
Feature.prototype.____constructor(self)
|
|
32
31
|
self.v = {run = {collectibleItemPoolTypeMap = __TS__New(Map)}}
|
|
33
|
-
self.postPickupInitCollectible = function(____,
|
|
32
|
+
self.postPickupInitCollectible = function(____, collectible)
|
|
34
33
|
local itemPool = game:GetItemPool()
|
|
35
|
-
local
|
|
34
|
+
local pickupIndex = self.pickupIndexCreation:getPickupIndex(collectible)
|
|
36
35
|
local lastItemPoolType = itemPool:GetLastPool()
|
|
37
|
-
self.v.run.collectibleItemPoolTypeMap:set(
|
|
36
|
+
self.v.run.collectibleItemPoolTypeMap:set(pickupIndex, lastItemPoolType)
|
|
38
37
|
end
|
|
38
|
+
self.featuresUsed = {ISCFeature.PICKUP_INDEX_CREATION}
|
|
39
39
|
self.callbacksUsed = {{ModCallback.POST_PICKUP_INIT, {self.postPickupInitCollectible, PickupVariant.COLLECTIBLE}}}
|
|
40
|
+
self.pickupIndexCreation = pickupIndexCreation
|
|
40
41
|
end
|
|
41
42
|
function CollectibleItemPoolType.prototype.getCollectibleItemPoolType(self, collectible)
|
|
42
43
|
if not isCollectible(nil, collectible) then
|
|
43
44
|
local entityID = getEntityID(nil, collectible)
|
|
44
45
|
error("The \"getCollectibleItemPoolType\" function was given a non-collectible: " .. entityID)
|
|
45
46
|
end
|
|
46
|
-
local
|
|
47
|
-
local itemPoolType = self.v.run.collectibleItemPoolTypeMap:get(
|
|
47
|
+
local pickupIndex = self.pickupIndexCreation:getPickupIndex(collectible)
|
|
48
|
+
local itemPoolType = self.v.run.collectibleItemPoolTypeMap:get(pickupIndex)
|
|
48
49
|
return itemPoolType == nil and getRoomItemPoolType(nil) or itemPoolType
|
|
49
50
|
end
|
|
50
51
|
__TS__Decorate({Exported}, CollectibleItemPoolType.prototype, "getCollectibleItemPoolType", true)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../src/features.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qDAAqD,CAAC;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,yDAAyD,CAAC;AACjG,OAAO,EAAE,4BAA4B,EAAE,MAAM,+DAA+D,CAAC;AAC7G,OAAO,EAAE,yBAAyB,EAAE,MAAM,4DAA4D,CAAC;AACvG,OAAO,EAAE,yBAAyB,EAAE,MAAM,4DAA4D,CAAC;AACvG,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,EAAE,0BAA0B,EAAE,MAAM,6DAA6D,CAAC;AACzG,OAAO,EAAE,wBAAwB,EAAE,MAAM,2DAA2D,CAAC;AACrG,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EA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135,6 +135,7 @@ function ____exports.getFeatures(self, mod, callbacks)
|
|
|
135
135
|
local moddedElementSets = __TS__New(ModdedElementSets, moddedElementDetection)
|
|
136
136
|
local itemPoolDetection = __TS__New(ItemPoolDetection, moddedElementSets)
|
|
137
137
|
local pause = __TS__New(Pause, disableInputs)
|
|
138
|
+
local pickupIndexCreation = __TS__New(PickupIndexCreation, roomHistory)
|
|
138
139
|
local preventGridEntityRespawn = __TS__New(PreventGridEntityRespawn, runInNFrames)
|
|
139
140
|
local spawnCollectible = __TS__New(SpawnCollectible, preventCollectibleRotation)
|
|
140
141
|
local customTrapdoors = __TS__New(
|
|
@@ -184,7 +185,7 @@ function ____exports.getFeatures(self, mod, callbacks)
|
|
|
184
185
|
[ISCFeature.SLOT_UPDATE_DETECTION] = __TS__New(SlotUpdateDetection, callbacks[ModCallbackCustom.POST_SLOT_INIT], callbacks[ModCallbackCustom.POST_SLOT_UPDATE]),
|
|
185
186
|
[ISCFeature.CHARACTER_HEALTH_CONVERSION] = __TS__New(CharacterHealthConversion),
|
|
186
187
|
[ISCFeature.CHARACTER_STATS] = __TS__New(CharacterStats),
|
|
187
|
-
[ISCFeature.COLLECTIBLE_ITEM_POOL_TYPE] = __TS__New(CollectibleItemPoolType),
|
|
188
|
+
[ISCFeature.COLLECTIBLE_ITEM_POOL_TYPE] = __TS__New(CollectibleItemPoolType, pickupIndexCreation),
|
|
188
189
|
[ISCFeature.CUSTOM_GRID_ENTITIES] = customGridEntities,
|
|
189
190
|
[ISCFeature.CUSTOM_ITEM_POOLS] = __TS__New(CustomItemPools),
|
|
190
191
|
[ISCFeature.CUSTOM_HOTKEYS] = __TS__New(CustomHotkeys),
|
|
@@ -214,7 +215,7 @@ function ____exports.getFeatures(self, mod, callbacks)
|
|
|
214
215
|
[ISCFeature.NO_SIREN_STEAL] = __TS__New(NoSirenSteal),
|
|
215
216
|
[ISCFeature.PAUSE] = pause,
|
|
216
217
|
[ISCFeature.PERSISTENT_ENTITIES] = __TS__New(PersistentEntities, roomHistory),
|
|
217
|
-
[ISCFeature.PICKUP_INDEX_CREATION] =
|
|
218
|
+
[ISCFeature.PICKUP_INDEX_CREATION] = pickupIndexCreation,
|
|
218
219
|
[ISCFeature.PLAYER_INVENTORY] = __TS__New(PlayerInventory),
|
|
219
220
|
[ISCFeature.PONY_DETECTION] = ponyDetection,
|
|
220
221
|
[ISCFeature.PREVENT_CHILD_ENTITIES] = __TS__New(PreventChildEntities),
|
package/package.json
CHANGED
|
@@ -61,7 +61,15 @@ type ModFeatureConstructor = TSTLClassMetatable["constructor"] & {
|
|
|
61
61
|
|
|
62
62
|
export class ModFeature {
|
|
63
63
|
private mod: ModUpgradedBase;
|
|
64
|
-
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Whether or not the feature has registered its callbacks yet (and submitted its variables to the
|
|
67
|
+
* save data manager, if any).
|
|
68
|
+
*
|
|
69
|
+
* This will almost always be equal to true unless you explicitly passed `false` to the second
|
|
70
|
+
* argument of the constructor.
|
|
71
|
+
*/
|
|
72
|
+
public initialized = false;
|
|
65
73
|
|
|
66
74
|
constructor(mod: ModUpgradedBase, init = true) {
|
|
67
75
|
this.mod = mod;
|
|
@@ -187,7 +195,11 @@ function addCallback(
|
|
|
187
195
|
// We need to wrap the callback in a new function so that we can explicitly pass the class as the
|
|
188
196
|
// first argument. (Otherwise, the method will not be able to properly access `this`.
|
|
189
197
|
const wrappedCallback = (...callbackArgs: unknown[]) => {
|
|
190
|
-
callback(
|
|
198
|
+
const castedCallback = callback as (
|
|
199
|
+
this: void,
|
|
200
|
+
...args: unknown[]
|
|
201
|
+
) => unknown;
|
|
202
|
+
castedCallback(modFeature, ...callbackArgs);
|
|
191
203
|
};
|
|
192
204
|
|
|
193
205
|
// We need to save the wrapped function for later (so we can unregister them).
|
|
@@ -5,50 +5,55 @@ import {
|
|
|
5
5
|
} from "isaac-typescript-definitions";
|
|
6
6
|
import { game } from "../../../core/cachedClasses";
|
|
7
7
|
import { Exported } from "../../../decorators";
|
|
8
|
+
import { ISCFeature } from "../../../enums/ISCFeature";
|
|
8
9
|
import { getEntityID } from "../../../functions/entities";
|
|
9
10
|
import { isCollectible } from "../../../functions/pickupVariants";
|
|
10
11
|
import { getRoomItemPoolType } from "../../../functions/rooms";
|
|
12
|
+
import { PickupIndex } from "../../../types/PickupIndex";
|
|
11
13
|
import { Feature } from "../../private/Feature";
|
|
14
|
+
import { PickupIndexCreation } from "./PickupIndexCreation";
|
|
12
15
|
|
|
13
|
-
/**
|
|
14
|
-
* The item pool type of a collectible is not stored on the collectible. Thus, we scan for incoming
|
|
15
|
-
* item pool types in the `PRE_GET_COLLECTIBLE` callback, and then assume that the next spawned
|
|
16
|
-
* collectible has this item pool type.
|
|
17
|
-
*/
|
|
18
16
|
export class CollectibleItemPoolType extends Feature {
|
|
19
17
|
/** @internal */
|
|
20
18
|
public override v = {
|
|
21
19
|
run: {
|
|
22
|
-
collectibleItemPoolTypeMap: new Map<
|
|
20
|
+
collectibleItemPoolTypeMap: new Map<PickupIndex, ItemPoolType>(),
|
|
23
21
|
},
|
|
24
22
|
};
|
|
25
23
|
|
|
24
|
+
private pickupIndexCreation: PickupIndexCreation;
|
|
25
|
+
|
|
26
26
|
/** @internal */
|
|
27
|
-
constructor() {
|
|
27
|
+
constructor(pickupIndexCreation: PickupIndexCreation) {
|
|
28
28
|
super();
|
|
29
29
|
|
|
30
|
+
this.featuresUsed = [ISCFeature.PICKUP_INDEX_CREATION];
|
|
31
|
+
|
|
30
32
|
this.callbacksUsed = [
|
|
31
33
|
[
|
|
32
34
|
ModCallback.POST_PICKUP_INIT,
|
|
33
35
|
[this.postPickupInitCollectible, PickupVariant.COLLECTIBLE],
|
|
34
36
|
], // 34
|
|
35
37
|
];
|
|
38
|
+
|
|
39
|
+
this.pickupIndexCreation = pickupIndexCreation;
|
|
36
40
|
}
|
|
37
41
|
|
|
38
42
|
// ModCallback.POST_PICKUP_INIT (34)
|
|
39
43
|
// PickupVariant.COLLECTIBLE (100)
|
|
40
|
-
private postPickupInitCollectible = (
|
|
44
|
+
private postPickupInitCollectible = (collectible: EntityPickup) => {
|
|
41
45
|
const itemPool = game.GetItemPool();
|
|
42
|
-
const
|
|
46
|
+
const pickupIndex = this.pickupIndexCreation.getPickupIndex(collectible);
|
|
43
47
|
const lastItemPoolType = itemPool.GetLastPool();
|
|
44
48
|
|
|
45
|
-
this.v.run.collectibleItemPoolTypeMap.set(
|
|
49
|
+
this.v.run.collectibleItemPoolTypeMap.set(pickupIndex, lastItemPoolType);
|
|
46
50
|
};
|
|
47
51
|
|
|
48
52
|
/**
|
|
49
53
|
* Helper function to get the item pool type that a given collectible came from. Since there is no
|
|
50
|
-
* native method in the API to get this, we listen in the `
|
|
51
|
-
*
|
|
54
|
+
* native method in the API to get this, we listen in the `POST_PICKUP_INIT` callback for
|
|
55
|
+
* collectibles, use the `ItemPool.GetLastPool` method, and then assume that the collectible
|
|
56
|
+
* matches.
|
|
52
57
|
*
|
|
53
58
|
* In order to use this function, you must upgrade your mod with
|
|
54
59
|
* `ISCFeature.COLLECTIBLE_ITEM_POOL_TYPE`.
|
|
@@ -62,8 +67,8 @@ export class CollectibleItemPoolType extends Feature {
|
|
|
62
67
|
);
|
|
63
68
|
}
|
|
64
69
|
|
|
65
|
-
const
|
|
66
|
-
const itemPoolType = this.v.run.collectibleItemPoolTypeMap.get(
|
|
70
|
+
const pickupIndex = this.pickupIndexCreation.getPickupIndex(collectible);
|
|
71
|
+
const itemPoolType = this.v.run.collectibleItemPoolTypeMap.get(pickupIndex);
|
|
67
72
|
return itemPoolType === undefined ? getRoomItemPoolType() : itemPoolType;
|
|
68
73
|
}
|
|
69
74
|
}
|
package/src/features.ts
CHANGED
|
@@ -147,6 +147,7 @@ export function getFeatures(
|
|
|
147
147
|
const moddedElementSets = new ModdedElementSets(moddedElementDetection);
|
|
148
148
|
const itemPoolDetection = new ItemPoolDetection(moddedElementSets);
|
|
149
149
|
const pause = new Pause(disableInputs);
|
|
150
|
+
const pickupIndexCreation = new PickupIndexCreation(roomHistory);
|
|
150
151
|
const preventGridEntityRespawn = new PreventGridEntityRespawn(runInNFrames);
|
|
151
152
|
const spawnCollectible = new SpawnCollectible(preventCollectibleRotation);
|
|
152
153
|
|
|
@@ -227,7 +228,9 @@ export function getFeatures(
|
|
|
227
228
|
// Extra features
|
|
228
229
|
[ISCFeature.CHARACTER_HEALTH_CONVERSION]: new CharacterHealthConversion(),
|
|
229
230
|
[ISCFeature.CHARACTER_STATS]: new CharacterStats(),
|
|
230
|
-
[ISCFeature.COLLECTIBLE_ITEM_POOL_TYPE]: new CollectibleItemPoolType(
|
|
231
|
+
[ISCFeature.COLLECTIBLE_ITEM_POOL_TYPE]: new CollectibleItemPoolType(
|
|
232
|
+
pickupIndexCreation,
|
|
233
|
+
),
|
|
231
234
|
[ISCFeature.CUSTOM_GRID_ENTITIES]: customGridEntities,
|
|
232
235
|
[ISCFeature.CUSTOM_ITEM_POOLS]: new CustomItemPools(),
|
|
233
236
|
[ISCFeature.CUSTOM_HOTKEYS]: new CustomHotkeys(),
|
|
@@ -259,7 +262,7 @@ export function getFeatures(
|
|
|
259
262
|
[ISCFeature.NO_SIREN_STEAL]: new NoSirenSteal(),
|
|
260
263
|
[ISCFeature.PAUSE]: pause,
|
|
261
264
|
[ISCFeature.PERSISTENT_ENTITIES]: new PersistentEntities(roomHistory),
|
|
262
|
-
[ISCFeature.PICKUP_INDEX_CREATION]:
|
|
265
|
+
[ISCFeature.PICKUP_INDEX_CREATION]: pickupIndexCreation,
|
|
263
266
|
[ISCFeature.PLAYER_INVENTORY]: new PlayerInventory(),
|
|
264
267
|
[ISCFeature.PONY_DETECTION]: ponyDetection,
|
|
265
268
|
[ISCFeature.PREVENT_CHILD_ENTITIES]: new PreventChildEntities(),
|