isaacscript-common 75.2.1 → 76.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/classes/features/other/DeployJSONRoom.d.ts +0 -1
- package/dist/classes/features/other/DeployJSONRoom.d.ts.map +1 -1
- package/dist/classes/features/other/DeployJSONRoom.lua +6 -4
- package/dist/classes/features/other/SpawnRockAltRewards.lua +14 -14
- package/dist/classes/features/other/extraConsoleCommands/commands.lua +3 -3
- package/dist/enums/ISCFeature.d.ts +12 -14
- package/dist/enums/ISCFeature.d.ts.map +1 -1
- package/dist/enums/ISCFeature.lua +12 -16
- package/dist/features.d.ts +12 -18
- package/dist/features.d.ts.map +1 -1
- package/dist/features.lua +1 -9
- package/dist/functions/collectibles.d.ts +8 -0
- package/dist/functions/collectibles.d.ts.map +1 -1
- package/dist/functions/collectibles.lua +19 -0
- package/dist/functions/spawnCollectible.d.ts +28 -6
- package/dist/functions/spawnCollectible.d.ts.map +1 -1
- package/dist/functions/spawnCollectible.lua +50 -7
- package/dist/index.rollup.d.ts +48 -104
- package/dist/isaacscript-common.lua +197 -329
- package/package.json +1 -1
- package/src/classes/features/other/DeployJSONRoom.ts +4 -12
- package/src/classes/features/other/SpawnRockAltRewards.ts +14 -14
- package/src/classes/features/other/extraConsoleCommands/commands.ts +3 -3
- package/src/enums/ISCFeature.ts +0 -2
- package/src/features.ts +1 -15
- package/src/functions/collectibles.ts +25 -0
- package/src/functions/spawnCollectible.ts +58 -8
- package/dist/classes/features/other/PreventCollectibleRotation.d.ts +0 -28
- package/dist/classes/features/other/PreventCollectibleRotation.d.ts.map +0 -1
- package/dist/classes/features/other/PreventCollectibleRotation.lua +0 -112
- package/dist/classes/features/other/SpawnCollectible.d.ts +0 -58
- package/dist/classes/features/other/SpawnCollectible.d.ts.map +0 -1
- package/dist/classes/features/other/SpawnCollectible.lua +0 -68
- package/src/classes/features/other/PreventCollectibleRotation.ts +0 -205
- package/src/classes/features/other/SpawnCollectible.ts +0 -124
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 75.2.
|
|
3
|
+
isaacscript-common 75.2.1
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -18854,33 +18854,29 @@ ____exports.ISCFeature.PRESS_INPUT = 42
|
|
|
18854
18854
|
____exports.ISCFeature[____exports.ISCFeature.PRESS_INPUT] = "PRESS_INPUT"
|
|
18855
18855
|
____exports.ISCFeature.PREVENT_CHILD_ENTITIES = 43
|
|
18856
18856
|
____exports.ISCFeature[____exports.ISCFeature.PREVENT_CHILD_ENTITIES] = "PREVENT_CHILD_ENTITIES"
|
|
18857
|
-
____exports.ISCFeature.
|
|
18858
|
-
____exports.ISCFeature[____exports.ISCFeature.PREVENT_COLLECTIBLE_ROTATION] = "PREVENT_COLLECTIBLE_ROTATION"
|
|
18859
|
-
____exports.ISCFeature.PREVENT_GRID_ENTITY_RESPAWN = 45
|
|
18857
|
+
____exports.ISCFeature.PREVENT_GRID_ENTITY_RESPAWN = 44
|
|
18860
18858
|
____exports.ISCFeature[____exports.ISCFeature.PREVENT_GRID_ENTITY_RESPAWN] = "PREVENT_GRID_ENTITY_RESPAWN"
|
|
18861
|
-
____exports.ISCFeature.ROOM_CLEAR_FRAME =
|
|
18859
|
+
____exports.ISCFeature.ROOM_CLEAR_FRAME = 45
|
|
18862
18860
|
____exports.ISCFeature[____exports.ISCFeature.ROOM_CLEAR_FRAME] = "ROOM_CLEAR_FRAME"
|
|
18863
|
-
____exports.ISCFeature.ROOM_HISTORY =
|
|
18861
|
+
____exports.ISCFeature.ROOM_HISTORY = 46
|
|
18864
18862
|
____exports.ISCFeature[____exports.ISCFeature.ROOM_HISTORY] = "ROOM_HISTORY"
|
|
18865
|
-
____exports.ISCFeature.RUN_IN_N_FRAMES =
|
|
18863
|
+
____exports.ISCFeature.RUN_IN_N_FRAMES = 47
|
|
18866
18864
|
____exports.ISCFeature[____exports.ISCFeature.RUN_IN_N_FRAMES] = "RUN_IN_N_FRAMES"
|
|
18867
|
-
____exports.ISCFeature.RUN_NEXT_ROOM =
|
|
18865
|
+
____exports.ISCFeature.RUN_NEXT_ROOM = 48
|
|
18868
18866
|
____exports.ISCFeature[____exports.ISCFeature.RUN_NEXT_ROOM] = "RUN_NEXT_ROOM"
|
|
18869
|
-
____exports.ISCFeature.RUN_NEXT_RUN =
|
|
18867
|
+
____exports.ISCFeature.RUN_NEXT_RUN = 49
|
|
18870
18868
|
____exports.ISCFeature[____exports.ISCFeature.RUN_NEXT_RUN] = "RUN_NEXT_RUN"
|
|
18871
|
-
____exports.ISCFeature.SAVE_DATA_MANAGER =
|
|
18869
|
+
____exports.ISCFeature.SAVE_DATA_MANAGER = 50
|
|
18872
18870
|
____exports.ISCFeature[____exports.ISCFeature.SAVE_DATA_MANAGER] = "SAVE_DATA_MANAGER"
|
|
18873
|
-
____exports.ISCFeature.SPAWN_ALT_ROCK_REWARDS =
|
|
18871
|
+
____exports.ISCFeature.SPAWN_ALT_ROCK_REWARDS = 51
|
|
18874
18872
|
____exports.ISCFeature[____exports.ISCFeature.SPAWN_ALT_ROCK_REWARDS] = "SPAWN_ALT_ROCK_REWARDS"
|
|
18875
|
-
____exports.ISCFeature.
|
|
18876
|
-
____exports.ISCFeature[____exports.ISCFeature.SPAWN_COLLECTIBLE] = "SPAWN_COLLECTIBLE"
|
|
18877
|
-
____exports.ISCFeature.STAGE_HISTORY = 54
|
|
18873
|
+
____exports.ISCFeature.STAGE_HISTORY = 52
|
|
18878
18874
|
____exports.ISCFeature[____exports.ISCFeature.STAGE_HISTORY] = "STAGE_HISTORY"
|
|
18879
|
-
____exports.ISCFeature.START_AMBUSH =
|
|
18875
|
+
____exports.ISCFeature.START_AMBUSH = 53
|
|
18880
18876
|
____exports.ISCFeature[____exports.ISCFeature.START_AMBUSH] = "START_AMBUSH"
|
|
18881
|
-
____exports.ISCFeature.TAINTED_LAZARUS_PLAYERS =
|
|
18877
|
+
____exports.ISCFeature.TAINTED_LAZARUS_PLAYERS = 54
|
|
18882
18878
|
____exports.ISCFeature[____exports.ISCFeature.TAINTED_LAZARUS_PLAYERS] = "TAINTED_LAZARUS_PLAYERS"
|
|
18883
|
-
____exports.ISCFeature.UNLOCK_ACHIEVEMENTS_DETECTION =
|
|
18879
|
+
____exports.ISCFeature.UNLOCK_ACHIEVEMENTS_DETECTION = 55
|
|
18884
18880
|
____exports.ISCFeature[____exports.ISCFeature.UNLOCK_ACHIEVEMENTS_DETECTION] = "UNLOCK_ACHIEVEMENTS_DETECTION"
|
|
18885
18881
|
return ____exports
|
|
18886
18882
|
end,
|
|
@@ -26915,6 +26911,25 @@ function ____exports.newCollectibleSprite(self, collectibleType)
|
|
|
26915
26911
|
sprite:Play(defaultAnimation, true)
|
|
26916
26912
|
return sprite
|
|
26917
26913
|
end
|
|
26914
|
+
--- Helper function to remove the rotation behavior from a collectible. This will happen by default
|
|
26915
|
+
-- when collectibles are spawned when playing as Tainted Isaac or when having Binge Eater.
|
|
26916
|
+
--
|
|
26917
|
+
-- Under the hood, this is accomplished by morphing the collectible with the `ignoreModifiers`
|
|
26918
|
+
-- argument set to true.
|
|
26919
|
+
function ____exports.preventCollectibleRotation(self, collectible)
|
|
26920
|
+
if not isCollectible(nil, collectible) then
|
|
26921
|
+
local entityID = getEntityID(nil, collectible)
|
|
26922
|
+
error("The \"preventCollectibleRotation\" function was given a non-collectible: " .. entityID)
|
|
26923
|
+
end
|
|
26924
|
+
collectible:Morph(
|
|
26925
|
+
collectible.Type,
|
|
26926
|
+
collectible.Variant,
|
|
26927
|
+
collectible.SubType,
|
|
26928
|
+
true,
|
|
26929
|
+
true,
|
|
26930
|
+
true
|
|
26931
|
+
)
|
|
26932
|
+
end
|
|
26918
26933
|
--- Helper function to remove all pickup delay on a collectible. By default, collectibles have a 20
|
|
26919
26934
|
-- frame delay before they can be picked up by a player.
|
|
26920
26935
|
function ____exports.removeCollectiblePickupDelay(self, collectible)
|
|
@@ -53249,133 +53264,6 @@ function ____exports.worldPositionToGridPositionFast(self, worldPos)
|
|
|
53249
53264
|
local y = worldPos.Y / 40 - 4
|
|
53250
53265
|
return Vector(x, y)
|
|
53251
53266
|
end
|
|
53252
|
-
return ____exports
|
|
53253
|
-
end,
|
|
53254
|
-
["classes.features.other.PreventGridEntityRespawn"] = function(...)
|
|
53255
|
-
local ____lualib = require("lualib_bundle")
|
|
53256
|
-
local __TS__New = ____lualib.__TS__New
|
|
53257
|
-
local __TS__Class = ____lualib.__TS__Class
|
|
53258
|
-
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
53259
|
-
local __TS__DecorateLegacy = ____lualib.__TS__DecorateLegacy
|
|
53260
|
-
local ____exports = {}
|
|
53261
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.index")
|
|
53262
|
-
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
53263
|
-
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
53264
|
-
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
53265
|
-
local ____cachedClasses = require("core.cachedClasses")
|
|
53266
|
-
local game = ____cachedClasses.game
|
|
53267
|
-
local ____decorators = require("decorators")
|
|
53268
|
-
local Exported = ____decorators.Exported
|
|
53269
|
-
local ____ISCFeature = require("enums.ISCFeature")
|
|
53270
|
-
local ISCFeature = ____ISCFeature.ISCFeature
|
|
53271
|
-
local ____ModCallbackCustom = require("enums.ModCallbackCustom")
|
|
53272
|
-
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
53273
|
-
local ____array = require("functions.array")
|
|
53274
|
-
local emptyArray = ____array.emptyArray
|
|
53275
|
-
local ____gridEntities = require("functions.gridEntities")
|
|
53276
|
-
local getAllGridIndexes = ____gridEntities.getAllGridIndexes
|
|
53277
|
-
local getGridEntities = ____gridEntities.getGridEntities
|
|
53278
|
-
local removeGridEntity = ____gridEntities.removeGridEntity
|
|
53279
|
-
local setGridEntityInvisible = ____gridEntities.setGridEntityInvisible
|
|
53280
|
-
local spawnGridEntity = ____gridEntities.spawnGridEntity
|
|
53281
|
-
local ____players = require("functions.players")
|
|
53282
|
-
local getPlayerFromPtr = ____players.getPlayerFromPtr
|
|
53283
|
-
local ____roomData = require("functions.roomData")
|
|
53284
|
-
local getRoomListIndex = ____roomData.getRoomListIndex
|
|
53285
|
-
local ____DefaultMap = require("classes.DefaultMap")
|
|
53286
|
-
local DefaultMap = ____DefaultMap.DefaultMap
|
|
53287
|
-
local ____Feature = require("classes.private.Feature")
|
|
53288
|
-
local Feature = ____Feature.Feature
|
|
53289
|
-
local v = {
|
|
53290
|
-
level = {roomListIndexToDecorationGridIndexes = __TS__New(
|
|
53291
|
-
DefaultMap,
|
|
53292
|
-
function() return {} end
|
|
53293
|
-
)},
|
|
53294
|
-
room = {manuallyUsingShovel = false}
|
|
53295
|
-
}
|
|
53296
|
-
____exports.PreventGridEntityRespawn = __TS__Class()
|
|
53297
|
-
local PreventGridEntityRespawn = ____exports.PreventGridEntityRespawn
|
|
53298
|
-
PreventGridEntityRespawn.name = "PreventGridEntityRespawn"
|
|
53299
|
-
__TS__ClassExtends(PreventGridEntityRespawn, Feature)
|
|
53300
|
-
function PreventGridEntityRespawn.prototype.____constructor(self, runInNFrames)
|
|
53301
|
-
Feature.prototype.____constructor(self)
|
|
53302
|
-
self.v = v
|
|
53303
|
-
self.preUseItemWeNeedToGoDeeper = function(____, _collectibleType, _rng, player, _useFlags, _activeSlot, _customVarData)
|
|
53304
|
-
if v.room.manuallyUsingShovel then
|
|
53305
|
-
return nil
|
|
53306
|
-
end
|
|
53307
|
-
local roomListIndex = getRoomListIndex(nil)
|
|
53308
|
-
if not v.level.roomListIndexToDecorationGridIndexes:has(roomListIndex) then
|
|
53309
|
-
return
|
|
53310
|
-
end
|
|
53311
|
-
local decorations = getGridEntities(nil, GridEntityType.DECORATION)
|
|
53312
|
-
for ____, decoration in ipairs(decorations) do
|
|
53313
|
-
removeGridEntity(nil, decoration, false)
|
|
53314
|
-
end
|
|
53315
|
-
local entityPtr = EntityPtr(player)
|
|
53316
|
-
self.runInNFrames:runNextGameFrame(function()
|
|
53317
|
-
local futurePlayer = getPlayerFromPtr(nil, entityPtr)
|
|
53318
|
-
if futurePlayer == nil then
|
|
53319
|
-
return
|
|
53320
|
-
end
|
|
53321
|
-
local futureRoomListIndex = getRoomListIndex(nil)
|
|
53322
|
-
if futureRoomListIndex ~= roomListIndex then
|
|
53323
|
-
return
|
|
53324
|
-
end
|
|
53325
|
-
v.room.manuallyUsingShovel = true
|
|
53326
|
-
futurePlayer:UseActiveItem(CollectibleType.WE_NEED_TO_GO_DEEPER)
|
|
53327
|
-
v.room.manuallyUsingShovel = false
|
|
53328
|
-
local decorationGridIndexes = v.level.roomListIndexToDecorationGridIndexes:getAndSetDefault(roomListIndex)
|
|
53329
|
-
emptyArray(nil, decorationGridIndexes)
|
|
53330
|
-
self:preventGridEntityRespawn()
|
|
53331
|
-
end)
|
|
53332
|
-
return true
|
|
53333
|
-
end
|
|
53334
|
-
self.postNewRoomReordered = function()
|
|
53335
|
-
self:setDecorationsInvisible()
|
|
53336
|
-
end
|
|
53337
|
-
self.featuresUsed = {ISCFeature.RUN_IN_N_FRAMES}
|
|
53338
|
-
self.callbacksUsed = {{ModCallback.PRE_USE_ITEM, self.preUseItemWeNeedToGoDeeper, {CollectibleType.WE_NEED_TO_GO_DEEPER}}}
|
|
53339
|
-
self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, self.postNewRoomReordered}}
|
|
53340
|
-
self.runInNFrames = runInNFrames
|
|
53341
|
-
end
|
|
53342
|
-
function PreventGridEntityRespawn.prototype.setDecorationsInvisible(self)
|
|
53343
|
-
local room = game:GetRoom()
|
|
53344
|
-
local roomListIndex = getRoomListIndex(nil)
|
|
53345
|
-
local decorationGridIndexes = v.level.roomListIndexToDecorationGridIndexes:get(roomListIndex)
|
|
53346
|
-
if decorationGridIndexes == nil then
|
|
53347
|
-
return
|
|
53348
|
-
end
|
|
53349
|
-
for ____, gridIndex in ipairs(decorationGridIndexes) do
|
|
53350
|
-
local gridEntity = room:GetGridEntity(gridIndex)
|
|
53351
|
-
if gridEntity ~= nil then
|
|
53352
|
-
local gridEntityType = gridEntity:GetType()
|
|
53353
|
-
if gridEntityType == GridEntityType.DECORATION then
|
|
53354
|
-
setGridEntityInvisible(nil, gridEntity)
|
|
53355
|
-
end
|
|
53356
|
-
end
|
|
53357
|
-
end
|
|
53358
|
-
end
|
|
53359
|
-
function PreventGridEntityRespawn.prototype.preventGridEntityRespawn(self)
|
|
53360
|
-
local room = game:GetRoom()
|
|
53361
|
-
local roomListIndex = getRoomListIndex(nil)
|
|
53362
|
-
local decorationGridIndexes = v.level.roomListIndexToDecorationGridIndexes:getAndSetDefault(roomListIndex)
|
|
53363
|
-
for ____, gridIndex in ipairs(getAllGridIndexes(nil)) do
|
|
53364
|
-
do
|
|
53365
|
-
local existingGridEntity = room:GetGridEntity(gridIndex)
|
|
53366
|
-
if existingGridEntity ~= nil then
|
|
53367
|
-
goto __continue20
|
|
53368
|
-
end
|
|
53369
|
-
local decoration = spawnGridEntity(nil, GridEntityType.DECORATION, gridIndex)
|
|
53370
|
-
if decoration ~= nil then
|
|
53371
|
-
setGridEntityInvisible(nil, decoration)
|
|
53372
|
-
end
|
|
53373
|
-
decorationGridIndexes[#decorationGridIndexes + 1] = gridIndex
|
|
53374
|
-
end
|
|
53375
|
-
::__continue20::
|
|
53376
|
-
end
|
|
53377
|
-
end
|
|
53378
|
-
__TS__DecorateLegacy({Exported}, PreventGridEntityRespawn.prototype, "preventGridEntityRespawn", true)
|
|
53379
53267
|
return ____exports
|
|
53380
53268
|
end,
|
|
53381
53269
|
["functions.spawnCollectible"] = function(...)
|
|
@@ -53384,11 +53272,14 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescri
|
|
|
53384
53272
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
53385
53273
|
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
53386
53274
|
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
53275
|
+
local ____cachedClasses = require("core.cachedClasses")
|
|
53276
|
+
local game = ____cachedClasses.game
|
|
53387
53277
|
local ____constants = require("core.constants")
|
|
53388
53278
|
local VectorZero = ____constants.VectorZero
|
|
53389
53279
|
local ____collectibleTag = require("functions.collectibleTag")
|
|
53390
53280
|
local isQuestCollectible = ____collectibleTag.isQuestCollectible
|
|
53391
53281
|
local ____collectibles = require("functions.collectibles")
|
|
53282
|
+
local preventCollectibleRotation = ____collectibles.preventCollectibleRotation
|
|
53392
53283
|
local setCollectibleEmpty = ____collectibles.setCollectibleEmpty
|
|
53393
53284
|
local ____entitiesSpecific = require("functions.entitiesSpecific")
|
|
53394
53285
|
local spawnPickupWithSeed = ____entitiesSpecific.spawnPickupWithSeed
|
|
@@ -53400,11 +53291,8 @@ local isRNG = ____rng.isRNG
|
|
|
53400
53291
|
--- Helper function to spawn a collectible.
|
|
53401
53292
|
--
|
|
53402
53293
|
-- Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
|
|
53403
|
-
-- collectibles costing coins
|
|
53404
|
-
--
|
|
53405
|
-
-- This function is unsafe because it will not correctly handle quest items being rotated by Tainted
|
|
53406
|
-
-- Isaac's rotation mechanic. To handle that, use the `spawnCollectible` helper function instead
|
|
53407
|
-
-- (which is provided by `ISCFeature.SPAWN_COLLECTIBLE`).
|
|
53294
|
+
-- collectibles costing coins and prevents quest items from being rotated by Tainted Isaac's
|
|
53295
|
+
-- rotation mechanic.
|
|
53408
53296
|
--
|
|
53409
53297
|
-- If you want to spawn an unseeded collectible, you must explicitly pass `undefined` to the
|
|
53410
53298
|
-- `seedOrRNG` parameter.
|
|
@@ -53419,7 +53307,7 @@ local isRNG = ____rng.isRNG
|
|
|
53419
53307
|
-- @param forceFreeItem Optional. Set to true to disable the logic that gives the item a price for
|
|
53420
53308
|
-- Tainted Keeper. Default is false.
|
|
53421
53309
|
-- @param spawner Optional.
|
|
53422
|
-
function ____exports.
|
|
53310
|
+
function ____exports.spawnCollectible(self, collectibleType, positionOrGridIndex, seedOrRNG, options, forceFreeItem, spawner)
|
|
53423
53311
|
if options == nil then
|
|
53424
53312
|
options = false
|
|
53425
53313
|
end
|
|
@@ -53439,6 +53327,9 @@ function ____exports.spawnCollectibleUnsafe(self, collectibleType, positionOrGri
|
|
|
53439
53327
|
VectorZero,
|
|
53440
53328
|
spawner
|
|
53441
53329
|
)
|
|
53330
|
+
if isQuestCollectible(nil, collectible) then
|
|
53331
|
+
preventCollectibleRotation(nil, collectible)
|
|
53332
|
+
end
|
|
53442
53333
|
if options then
|
|
53443
53334
|
collectible.OptionsPickupIndex = 1
|
|
53444
53335
|
end
|
|
@@ -53448,6 +53339,46 @@ function ____exports.spawnCollectibleUnsafe(self, collectibleType, positionOrGri
|
|
|
53448
53339
|
end
|
|
53449
53340
|
return collectible
|
|
53450
53341
|
end
|
|
53342
|
+
--- Helper function to spawn a collectible from a specific item pool.
|
|
53343
|
+
--
|
|
53344
|
+
-- Use this instead of the `Game.Spawn` method because it handles the cases of Tainted Keeper
|
|
53345
|
+
-- collectibles costing coins and prevents quest items from being rotated by Tainted Isaac's
|
|
53346
|
+
-- rotation mechanic.
|
|
53347
|
+
--
|
|
53348
|
+
-- If you want to spawn an unseeded collectible, you must explicitly pass `undefined` to the
|
|
53349
|
+
-- `seedOrRNG` parameter.
|
|
53350
|
+
--
|
|
53351
|
+
-- In order to use this function, you must upgrade your mod with `ISCFeature.SPAWN_COLLECTIBLE`.
|
|
53352
|
+
--
|
|
53353
|
+
-- @param itemPoolType The item pool to draw the collectible type from.
|
|
53354
|
+
-- @param positionOrGridIndex The position or grid index to spawn the collectible at.
|
|
53355
|
+
-- @param seedOrRNG The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
|
|
53356
|
+
-- `RNG.Next` method will be called. If `undefined` is provided, it will default to
|
|
53357
|
+
-- a random seed.
|
|
53358
|
+
-- @param options Optional. Set to true to make the collectible a "There's Options" style
|
|
53359
|
+
-- collectible. Default is false.
|
|
53360
|
+
-- @param forceFreeItem Optional. Set to true to disable the logic that gives the item a price for
|
|
53361
|
+
-- Tainted Keeper. Default is false.
|
|
53362
|
+
-- @param spawner Optional.
|
|
53363
|
+
function ____exports.spawnCollectibleFromPool(self, itemPoolType, positionOrGridIndex, seedOrRNG, options, forceFreeItem, spawner)
|
|
53364
|
+
if options == nil then
|
|
53365
|
+
options = false
|
|
53366
|
+
end
|
|
53367
|
+
if forceFreeItem == nil then
|
|
53368
|
+
forceFreeItem = false
|
|
53369
|
+
end
|
|
53370
|
+
local itemPool = game:GetItemPool()
|
|
53371
|
+
local collectibleType = itemPool:GetCollectible(itemPoolType)
|
|
53372
|
+
return ____exports.spawnCollectible(
|
|
53373
|
+
nil,
|
|
53374
|
+
collectibleType,
|
|
53375
|
+
positionOrGridIndex,
|
|
53376
|
+
seedOrRNG,
|
|
53377
|
+
options,
|
|
53378
|
+
forceFreeItem,
|
|
53379
|
+
spawner
|
|
53380
|
+
)
|
|
53381
|
+
end
|
|
53451
53382
|
--- Helper function to spawn an empty collectible. Doing this is tricky since spawning a collectible
|
|
53452
53383
|
-- with `CollectibleType.NULL` will result in spawning a collectible with a random type from the
|
|
53453
53384
|
-- current room's item pool.
|
|
@@ -53465,7 +53396,7 @@ end
|
|
|
53465
53396
|
-- `RNG.Next` method will be called. If `undefined` is provided, it will default to
|
|
53466
53397
|
-- a random seed.
|
|
53467
53398
|
function ____exports.spawnEmptyCollectible(self, positionOrGridIndex, seedOrRNG)
|
|
53468
|
-
local collectible = ____exports.
|
|
53399
|
+
local collectible = ____exports.spawnCollectible(
|
|
53469
53400
|
nil,
|
|
53470
53401
|
CollectibleType.BROKEN_SHOVEL_1,
|
|
53471
53402
|
positionOrGridIndex,
|
|
@@ -53478,20 +53409,17 @@ function ____exports.spawnEmptyCollectible(self, positionOrGridIndex, seedOrRNG)
|
|
|
53478
53409
|
end
|
|
53479
53410
|
return ____exports
|
|
53480
53411
|
end,
|
|
53481
|
-
["classes.features.other.
|
|
53412
|
+
["classes.features.other.PreventGridEntityRespawn"] = function(...)
|
|
53482
53413
|
local ____lualib = require("lualib_bundle")
|
|
53483
53414
|
local __TS__New = ____lualib.__TS__New
|
|
53484
|
-
local Map = ____lualib.Map
|
|
53485
53415
|
local __TS__Class = ____lualib.__TS__Class
|
|
53486
53416
|
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
53487
53417
|
local __TS__DecorateLegacy = ____lualib.__TS__DecorateLegacy
|
|
53488
53418
|
local ____exports = {}
|
|
53489
53419
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.index")
|
|
53490
|
-
local CardType = ____isaac_2Dtypescript_2Ddefinitions.CardType
|
|
53491
53420
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
53492
|
-
local
|
|
53421
|
+
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
53493
53422
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
53494
|
-
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
53495
53423
|
local ____cachedClasses = require("core.cachedClasses")
|
|
53496
53424
|
local game = ____cachedClasses.game
|
|
53497
53425
|
local ____decorators = require("decorators")
|
|
@@ -53500,166 +53428,112 @@ local ____ISCFeature = require("enums.ISCFeature")
|
|
|
53500
53428
|
local ISCFeature = ____ISCFeature.ISCFeature
|
|
53501
53429
|
local ____ModCallbackCustom = require("enums.ModCallbackCustom")
|
|
53502
53430
|
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
53503
|
-
local
|
|
53504
|
-
local
|
|
53505
|
-
local
|
|
53506
|
-
local
|
|
53507
|
-
local
|
|
53508
|
-
local
|
|
53509
|
-
local
|
|
53510
|
-
local
|
|
53511
|
-
local
|
|
53512
|
-
local
|
|
53513
|
-
local
|
|
53514
|
-
local
|
|
53515
|
-
local
|
|
53516
|
-
local
|
|
53431
|
+
local ____array = require("functions.array")
|
|
53432
|
+
local emptyArray = ____array.emptyArray
|
|
53433
|
+
local ____gridEntities = require("functions.gridEntities")
|
|
53434
|
+
local getAllGridIndexes = ____gridEntities.getAllGridIndexes
|
|
53435
|
+
local getGridEntities = ____gridEntities.getGridEntities
|
|
53436
|
+
local removeGridEntity = ____gridEntities.removeGridEntity
|
|
53437
|
+
local setGridEntityInvisible = ____gridEntities.setGridEntityInvisible
|
|
53438
|
+
local spawnGridEntity = ____gridEntities.spawnGridEntity
|
|
53439
|
+
local ____players = require("functions.players")
|
|
53440
|
+
local getPlayerFromPtr = ____players.getPlayerFromPtr
|
|
53441
|
+
local ____roomData = require("functions.roomData")
|
|
53442
|
+
local getRoomListIndex = ____roomData.getRoomListIndex
|
|
53443
|
+
local ____DefaultMap = require("classes.DefaultMap")
|
|
53444
|
+
local DefaultMap = ____DefaultMap.DefaultMap
|
|
53517
53445
|
local ____Feature = require("classes.private.Feature")
|
|
53518
53446
|
local Feature = ____Feature.Feature
|
|
53519
|
-
local
|
|
53520
|
-
|
|
53521
|
-
|
|
53522
|
-
|
|
53523
|
-
|
|
53524
|
-
}
|
|
53525
|
-
|
|
53526
|
-
|
|
53527
|
-
|
|
53528
|
-
|
|
53529
|
-
|
|
53447
|
+
local v = {
|
|
53448
|
+
level = {roomListIndexToDecorationGridIndexes = __TS__New(
|
|
53449
|
+
DefaultMap,
|
|
53450
|
+
function() return {} end
|
|
53451
|
+
)},
|
|
53452
|
+
room = {manuallyUsingShovel = false}
|
|
53453
|
+
}
|
|
53454
|
+
____exports.PreventGridEntityRespawn = __TS__Class()
|
|
53455
|
+
local PreventGridEntityRespawn = ____exports.PreventGridEntityRespawn
|
|
53456
|
+
PreventGridEntityRespawn.name = "PreventGridEntityRespawn"
|
|
53457
|
+
__TS__ClassExtends(PreventGridEntityRespawn, Feature)
|
|
53458
|
+
function PreventGridEntityRespawn.prototype.____constructor(self, runInNFrames)
|
|
53530
53459
|
Feature.prototype.____constructor(self)
|
|
53531
53460
|
self.v = v
|
|
53532
|
-
self.
|
|
53533
|
-
if
|
|
53534
|
-
|
|
53535
|
-
end
|
|
53536
|
-
return nil
|
|
53537
|
-
end
|
|
53538
|
-
self.postUseCardSoulOfIsaac = function()
|
|
53539
|
-
local collectibles = getCollectibles(nil)
|
|
53540
|
-
for ____, collectible in ipairs(collectibles) do
|
|
53541
|
-
local pickupIndex = self.pickupIndexCreation:getPickupIndex(collectible)
|
|
53542
|
-
v.run.trackedCollectibles:delete(pickupIndex)
|
|
53543
|
-
end
|
|
53544
|
-
end
|
|
53545
|
-
self.postDiceRoomActivated = function(____, _player, diceFloorSubType)
|
|
53546
|
-
if ROLL_FLOOR_DICE_FLOOR_SUB_TYPES:has(diceFloorSubType) then
|
|
53547
|
-
v.run.trackedCollectibles:clear()
|
|
53548
|
-
end
|
|
53549
|
-
end
|
|
53550
|
-
self.postPickupChanged = function(____, pickup, oldVariant, _oldSubType, newVariant, newSubType)
|
|
53551
|
-
if oldVariant ~= PickupVariant.COLLECTIBLE or newVariant ~= PickupVariant.COLLECTIBLE then
|
|
53552
|
-
return
|
|
53553
|
-
end
|
|
53554
|
-
if asCollectibleType(nil, newSubType) == CollectibleType.NULL then
|
|
53555
|
-
return
|
|
53556
|
-
end
|
|
53557
|
-
local pickupIndex = self.pickupIndexCreation:getPickupIndex(pickup)
|
|
53558
|
-
local trackedCollectibleType = v.run.trackedCollectibles:get(pickupIndex)
|
|
53559
|
-
if trackedCollectibleType == nil then
|
|
53560
|
-
return
|
|
53461
|
+
self.preUseItemWeNeedToGoDeeper = function(____, _collectibleType, _rng, player, _useFlags, _activeSlot, _customVarData)
|
|
53462
|
+
if v.room.manuallyUsingShovel then
|
|
53463
|
+
return nil
|
|
53561
53464
|
end
|
|
53562
|
-
|
|
53563
|
-
|
|
53465
|
+
local roomListIndex = getRoomListIndex(nil)
|
|
53466
|
+
if not v.level.roomListIndexToDecorationGridIndexes:has(roomListIndex) then
|
|
53564
53467
|
return
|
|
53565
53468
|
end
|
|
53566
|
-
|
|
53567
|
-
|
|
53469
|
+
local decorations = getGridEntities(nil, GridEntityType.DECORATION)
|
|
53470
|
+
for ____, decoration in ipairs(decorations) do
|
|
53471
|
+
removeGridEntity(nil, decoration, false)
|
|
53568
53472
|
end
|
|
53473
|
+
local entityPtr = EntityPtr(player)
|
|
53474
|
+
self.runInNFrames:runNextGameFrame(function()
|
|
53475
|
+
local futurePlayer = getPlayerFromPtr(nil, entityPtr)
|
|
53476
|
+
if futurePlayer == nil then
|
|
53477
|
+
return
|
|
53478
|
+
end
|
|
53479
|
+
local futureRoomListIndex = getRoomListIndex(nil)
|
|
53480
|
+
if futureRoomListIndex ~= roomListIndex then
|
|
53481
|
+
return
|
|
53482
|
+
end
|
|
53483
|
+
v.room.manuallyUsingShovel = true
|
|
53484
|
+
futurePlayer:UseActiveItem(CollectibleType.WE_NEED_TO_GO_DEEPER)
|
|
53485
|
+
v.room.manuallyUsingShovel = false
|
|
53486
|
+
local decorationGridIndexes = v.level.roomListIndexToDecorationGridIndexes:getAndSetDefault(roomListIndex)
|
|
53487
|
+
emptyArray(nil, decorationGridIndexes)
|
|
53488
|
+
self:preventGridEntityRespawn()
|
|
53489
|
+
end)
|
|
53490
|
+
return true
|
|
53569
53491
|
end
|
|
53570
|
-
self.
|
|
53571
|
-
|
|
53572
|
-
|
|
53573
|
-
self.
|
|
53492
|
+
self.postNewRoomReordered = function()
|
|
53493
|
+
self:setDecorationsInvisible()
|
|
53494
|
+
end
|
|
53495
|
+
self.featuresUsed = {ISCFeature.RUN_IN_N_FRAMES}
|
|
53496
|
+
self.callbacksUsed = {{ModCallback.PRE_USE_ITEM, self.preUseItemWeNeedToGoDeeper, {CollectibleType.WE_NEED_TO_GO_DEEPER}}}
|
|
53497
|
+
self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, self.postNewRoomReordered}}
|
|
53574
53498
|
self.runInNFrames = runInNFrames
|
|
53575
53499
|
end
|
|
53576
|
-
function
|
|
53577
|
-
|
|
53578
|
-
|
|
53579
|
-
|
|
53580
|
-
|
|
53581
|
-
|
|
53582
|
-
v.run.trackedCollectibles:set(pickupIndex, collectibleType)
|
|
53583
|
-
if collectible.SubType ~= collectibleType then
|
|
53584
|
-
setCollectibleSubType(nil, collectible, collectibleType)
|
|
53500
|
+
function PreventGridEntityRespawn.prototype.setDecorationsInvisible(self)
|
|
53501
|
+
local room = game:GetRoom()
|
|
53502
|
+
local roomListIndex = getRoomListIndex(nil)
|
|
53503
|
+
local decorationGridIndexes = v.level.roomListIndexToDecorationGridIndexes:get(roomListIndex)
|
|
53504
|
+
if decorationGridIndexes == nil then
|
|
53505
|
+
return
|
|
53585
53506
|
end
|
|
53586
|
-
|
|
53587
|
-
|
|
53588
|
-
|
|
53507
|
+
for ____, gridIndex in ipairs(decorationGridIndexes) do
|
|
53508
|
+
local gridEntity = room:GetGridEntity(gridIndex)
|
|
53509
|
+
if gridEntity ~= nil then
|
|
53510
|
+
local gridEntityType = gridEntity:GetType()
|
|
53511
|
+
if gridEntityType == GridEntityType.DECORATION then
|
|
53512
|
+
setGridEntityInvisible(nil, gridEntity)
|
|
53513
|
+
end
|
|
53589
53514
|
end
|
|
53590
|
-
end)
|
|
53591
|
-
end
|
|
53592
|
-
__TS__DecorateLegacy({Exported}, PreventCollectibleRotation.prototype, "preventCollectibleRotation", true)
|
|
53593
|
-
return ____exports
|
|
53594
|
-
end,
|
|
53595
|
-
["classes.features.other.SpawnCollectible"] = function(...)
|
|
53596
|
-
local ____lualib = require("lualib_bundle")
|
|
53597
|
-
local __TS__Class = ____lualib.__TS__Class
|
|
53598
|
-
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
53599
|
-
local __TS__DecorateLegacy = ____lualib.__TS__DecorateLegacy
|
|
53600
|
-
local ____exports = {}
|
|
53601
|
-
local ____cachedClasses = require("core.cachedClasses")
|
|
53602
|
-
local game = ____cachedClasses.game
|
|
53603
|
-
local ____decorators = require("decorators")
|
|
53604
|
-
local Exported = ____decorators.Exported
|
|
53605
|
-
local ____ISCFeature = require("enums.ISCFeature")
|
|
53606
|
-
local ISCFeature = ____ISCFeature.ISCFeature
|
|
53607
|
-
local ____collectibleTag = require("functions.collectibleTag")
|
|
53608
|
-
local isQuestCollectible = ____collectibleTag.isQuestCollectible
|
|
53609
|
-
local ____spawnCollectible = require("functions.spawnCollectible")
|
|
53610
|
-
local spawnCollectibleUnsafe = ____spawnCollectible.spawnCollectibleUnsafe
|
|
53611
|
-
local ____Feature = require("classes.private.Feature")
|
|
53612
|
-
local Feature = ____Feature.Feature
|
|
53613
|
-
____exports.SpawnCollectible = __TS__Class()
|
|
53614
|
-
local SpawnCollectible = ____exports.SpawnCollectible
|
|
53615
|
-
SpawnCollectible.name = "SpawnCollectible"
|
|
53616
|
-
__TS__ClassExtends(SpawnCollectible, Feature)
|
|
53617
|
-
function SpawnCollectible.prototype.____constructor(self, preventCollectibleRotation)
|
|
53618
|
-
Feature.prototype.____constructor(self)
|
|
53619
|
-
self.featuresUsed = {ISCFeature.PREVENT_COLLECTIBLE_ROTATION}
|
|
53620
|
-
self.preventCollectibleRotation = preventCollectibleRotation
|
|
53621
|
-
end
|
|
53622
|
-
function SpawnCollectible.prototype.spawnCollectible(self, collectibleType, positionOrGridIndex, seedOrRNG, options, forceFreeItem, spawner)
|
|
53623
|
-
if options == nil then
|
|
53624
|
-
options = false
|
|
53625
|
-
end
|
|
53626
|
-
if forceFreeItem == nil then
|
|
53627
|
-
forceFreeItem = false
|
|
53628
53515
|
end
|
|
53629
|
-
local collectible = spawnCollectibleUnsafe(
|
|
53630
|
-
nil,
|
|
53631
|
-
collectibleType,
|
|
53632
|
-
positionOrGridIndex,
|
|
53633
|
-
seedOrRNG,
|
|
53634
|
-
options,
|
|
53635
|
-
forceFreeItem,
|
|
53636
|
-
spawner
|
|
53637
|
-
)
|
|
53638
|
-
if isQuestCollectible(nil, collectibleType) then
|
|
53639
|
-
self.preventCollectibleRotation:preventCollectibleRotation(collectible, collectibleType)
|
|
53640
|
-
end
|
|
53641
|
-
return collectible
|
|
53642
53516
|
end
|
|
53643
|
-
|
|
53644
|
-
|
|
53645
|
-
|
|
53646
|
-
|
|
53647
|
-
|
|
53648
|
-
|
|
53649
|
-
|
|
53517
|
+
function PreventGridEntityRespawn.prototype.preventGridEntityRespawn(self)
|
|
53518
|
+
local room = game:GetRoom()
|
|
53519
|
+
local roomListIndex = getRoomListIndex(nil)
|
|
53520
|
+
local decorationGridIndexes = v.level.roomListIndexToDecorationGridIndexes:getAndSetDefault(roomListIndex)
|
|
53521
|
+
for ____, gridIndex in ipairs(getAllGridIndexes(nil)) do
|
|
53522
|
+
do
|
|
53523
|
+
local existingGridEntity = room:GetGridEntity(gridIndex)
|
|
53524
|
+
if existingGridEntity ~= nil then
|
|
53525
|
+
goto __continue20
|
|
53526
|
+
end
|
|
53527
|
+
local decoration = spawnGridEntity(nil, GridEntityType.DECORATION, gridIndex)
|
|
53528
|
+
if decoration ~= nil then
|
|
53529
|
+
setGridEntityInvisible(nil, decoration)
|
|
53530
|
+
end
|
|
53531
|
+
decorationGridIndexes[#decorationGridIndexes + 1] = gridIndex
|
|
53532
|
+
end
|
|
53533
|
+
::__continue20::
|
|
53650
53534
|
end
|
|
53651
|
-
local itemPool = game:GetItemPool()
|
|
53652
|
-
local collectibleType = itemPool:GetCollectible(itemPoolType)
|
|
53653
|
-
return self:spawnCollectible(
|
|
53654
|
-
collectibleType,
|
|
53655
|
-
positionOrGridIndex,
|
|
53656
|
-
seedOrRNG,
|
|
53657
|
-
options,
|
|
53658
|
-
forceFreeItem,
|
|
53659
|
-
spawner
|
|
53660
|
-
)
|
|
53661
53535
|
end
|
|
53662
|
-
__TS__DecorateLegacy({Exported},
|
|
53536
|
+
__TS__DecorateLegacy({Exported}, PreventGridEntityRespawn.prototype, "preventGridEntityRespawn", true)
|
|
53663
53537
|
return ____exports
|
|
53664
53538
|
end,
|
|
53665
53539
|
["classes.features.other.DeployJSONRoom"] = function(...)
|
|
@@ -53709,6 +53583,8 @@ local gridCoordinatesToWorldPosition = ____roomGrid.gridCoordinatesToWorldPositi
|
|
|
53709
53583
|
local ____rooms = require("functions.rooms")
|
|
53710
53584
|
local setRoomCleared = ____rooms.setRoomCleared
|
|
53711
53585
|
local setRoomUncleared = ____rooms.setRoomUncleared
|
|
53586
|
+
local ____spawnCollectible = require("functions.spawnCollectible")
|
|
53587
|
+
local spawnCollectible = ____spawnCollectible.spawnCollectible
|
|
53712
53588
|
local ____types = require("functions.types")
|
|
53713
53589
|
local asCollectibleType = ____types.asCollectibleType
|
|
53714
53590
|
local asNumber = ____types.asNumber
|
|
@@ -53853,11 +53729,10 @@ ____exports.DeployJSONRoom = __TS__Class()
|
|
|
53853
53729
|
local DeployJSONRoom = ____exports.DeployJSONRoom
|
|
53854
53730
|
DeployJSONRoom.name = "DeployJSONRoom"
|
|
53855
53731
|
__TS__ClassExtends(DeployJSONRoom, Feature)
|
|
53856
|
-
function DeployJSONRoom.prototype.____constructor(self, preventGridEntityRespawn
|
|
53732
|
+
function DeployJSONRoom.prototype.____constructor(self, preventGridEntityRespawn)
|
|
53857
53733
|
Feature.prototype.____constructor(self)
|
|
53858
|
-
self.featuresUsed = {ISCFeature.PREVENT_GRID_ENTITY_RESPAWN
|
|
53734
|
+
self.featuresUsed = {ISCFeature.PREVENT_GRID_ENTITY_RESPAWN}
|
|
53859
53735
|
self.preventGridEntityRespawn = preventGridEntityRespawn
|
|
53860
|
-
self.spawnCollectible = spawnCollectible
|
|
53861
53736
|
end
|
|
53862
53737
|
function DeployJSONRoom.prototype.spawnAllEntities(self, jsonRoom, rng, verbose)
|
|
53863
53738
|
if verbose == nil then
|
|
@@ -53939,7 +53814,8 @@ function DeployJSONRoom.prototype.spawnNormalEntityForJSONRoom(self, entityType,
|
|
|
53939
53814
|
local entity
|
|
53940
53815
|
if entityType == EntityType.PICKUP and variant == asNumber(nil, PickupVariant.COLLECTIBLE) then
|
|
53941
53816
|
local options = roomType == RoomType.ANGEL
|
|
53942
|
-
entity =
|
|
53817
|
+
entity = spawnCollectible(
|
|
53818
|
+
nil,
|
|
53943
53819
|
asCollectibleType(nil, subType),
|
|
53944
53820
|
position,
|
|
53945
53821
|
seed,
|
|
@@ -59202,7 +59078,7 @@ local onSetSeed = ____run.onSetSeed
|
|
|
59202
59078
|
local restart = ____run.restart
|
|
59203
59079
|
local setUnseeded = ____run.setUnseeded
|
|
59204
59080
|
local ____spawnCollectible = require("functions.spawnCollectible")
|
|
59205
|
-
local
|
|
59081
|
+
local spawnCollectibleFunc = ____spawnCollectible.spawnCollectible
|
|
59206
59082
|
local ____stage = require("functions.stage")
|
|
59207
59083
|
local onStage = ____stage.onStage
|
|
59208
59084
|
local setStage = ____stage.setStage
|
|
@@ -59361,7 +59237,7 @@ function ____exports.spawnCollectible(self, params)
|
|
|
59361
59237
|
end
|
|
59362
59238
|
local roomClass = game:GetRoom()
|
|
59363
59239
|
local centerPos = roomClass:GetCenterPos()
|
|
59364
|
-
|
|
59240
|
+
spawnCollectibleFunc(nil, collectibleType, centerPos, nil)
|
|
59365
59241
|
end
|
|
59366
59242
|
--- The same thing as the `spawnTrinket` command but spawns a golden version of the specified
|
|
59367
59243
|
-- trinket.
|
|
@@ -60412,7 +60288,7 @@ function ____exports.spawnCollectibleAt(self, params)
|
|
|
60412
60288
|
return
|
|
60413
60289
|
end
|
|
60414
60290
|
local collectibleType = asCollectibleType(nil, collectibleTypeNumber)
|
|
60415
|
-
|
|
60291
|
+
spawnCollectibleFunc(nil, collectibleType, gridIndex, nil)
|
|
60416
60292
|
end
|
|
60417
60293
|
--- Alias for the `spawnGoldenTrinket` command.
|
|
60418
60294
|
function ____exports.spawnGoldTrinket(self, params)
|
|
@@ -61605,7 +61481,7 @@ local ____rng = require("functions.rng")
|
|
|
61605
61481
|
local isRNG = ____rng.isRNG
|
|
61606
61482
|
local newRNG = ____rng.newRNG
|
|
61607
61483
|
local ____spawnCollectible = require("functions.spawnCollectible")
|
|
61608
|
-
local
|
|
61484
|
+
local spawnCollectible = ____spawnCollectible.spawnCollectible
|
|
61609
61485
|
local ____utils = require("functions.utils")
|
|
61610
61486
|
local ____repeat = ____utils["repeat"]
|
|
61611
61487
|
local ____vector = require("functions.vector")
|
|
@@ -61713,7 +61589,7 @@ function SpawnRockAltRewards.prototype.spawnRockAltRewardUrn(self, position, rng
|
|
|
61713
61589
|
if chance < totalChance then
|
|
61714
61590
|
local stillInPools = self.itemPoolDetection:isCollectibleInItemPool(CollectibleType.QUARTER, ItemPoolType.DEVIL)
|
|
61715
61591
|
if stillInPools then
|
|
61716
|
-
|
|
61592
|
+
spawnCollectible(nil, CollectibleType.QUARTER, position, rng)
|
|
61717
61593
|
return true
|
|
61718
61594
|
end
|
|
61719
61595
|
return false
|
|
@@ -61763,7 +61639,7 @@ function SpawnRockAltRewards.prototype.spawnRockAltRewardMushroom(self, position
|
|
|
61763
61639
|
if wavyCapChance < 0.0272 then
|
|
61764
61640
|
local stillInPools = self.itemPoolDetection:isCollectibleInItemPool(CollectibleType.WAVY_CAP, ItemPoolType.SECRET)
|
|
61765
61641
|
if stillInPools then
|
|
61766
|
-
|
|
61642
|
+
spawnCollectible(nil, CollectibleType.WAVY_CAP, position, rng)
|
|
61767
61643
|
return true
|
|
61768
61644
|
end
|
|
61769
61645
|
end
|
|
@@ -61773,15 +61649,15 @@ function SpawnRockAltRewards.prototype.spawnRockAltRewardMushroom(self, position
|
|
|
61773
61649
|
if magicMushroomStillInPools and miniMushStillInPools then
|
|
61774
61650
|
local collectibleChance = getRandom(nil, rng)
|
|
61775
61651
|
local collectibleType = collectibleChance < 0.5 and CollectibleType.MAGIC_MUSHROOM or CollectibleType.MINI_MUSH
|
|
61776
|
-
|
|
61652
|
+
spawnCollectible(nil, collectibleType, position, rng)
|
|
61777
61653
|
return true
|
|
61778
61654
|
end
|
|
61779
61655
|
if magicMushroomStillInPools then
|
|
61780
|
-
|
|
61656
|
+
spawnCollectible(nil, CollectibleType.MINI_MUSH, position, rng)
|
|
61781
61657
|
return true
|
|
61782
61658
|
end
|
|
61783
61659
|
if miniMushStillInPools then
|
|
61784
|
-
|
|
61660
|
+
spawnCollectible(nil, CollectibleType.MAGIC_MUSHROOM, position, rng)
|
|
61785
61661
|
return true
|
|
61786
61662
|
end
|
|
61787
61663
|
return false
|
|
@@ -61815,15 +61691,15 @@ function SpawnRockAltRewards.prototype.spawnRockAltRewardSkull(self, position, r
|
|
|
61815
61691
|
if ghostBabyStillInPools and dryBabyStillInPools then
|
|
61816
61692
|
local collectibleChance = getRandom(nil, rng)
|
|
61817
61693
|
local collectibleType = collectibleChance < 0.5 and CollectibleType.GHOST_BABY or CollectibleType.DRY_BABY
|
|
61818
|
-
|
|
61694
|
+
spawnCollectible(nil, collectibleType, position, rng)
|
|
61819
61695
|
return true
|
|
61820
61696
|
end
|
|
61821
61697
|
if ghostBabyStillInPools then
|
|
61822
|
-
|
|
61698
|
+
spawnCollectible(nil, CollectibleType.DRY_BABY, position, rng)
|
|
61823
61699
|
return true
|
|
61824
61700
|
end
|
|
61825
61701
|
if dryBabyStillInPools then
|
|
61826
|
-
|
|
61702
|
+
spawnCollectible(nil, CollectibleType.GHOST_BABY, position, rng)
|
|
61827
61703
|
return true
|
|
61828
61704
|
end
|
|
61829
61705
|
return false
|
|
@@ -61863,15 +61739,15 @@ function SpawnRockAltRewards.prototype.spawnRockAltRewardPolyp(self, position, r
|
|
|
61863
61739
|
if placentaStillInPools and bloodClotStillInPools then
|
|
61864
61740
|
local collectibleChance = getRandom(nil, rng)
|
|
61865
61741
|
local collectibleType = collectibleChance < 0.5 and CollectibleType.PLACENTA or CollectibleType.BLOOD_CLOT
|
|
61866
|
-
|
|
61742
|
+
spawnCollectible(nil, collectibleType, position, rng)
|
|
61867
61743
|
return true
|
|
61868
61744
|
end
|
|
61869
61745
|
if placentaStillInPools then
|
|
61870
|
-
|
|
61746
|
+
spawnCollectible(nil, CollectibleType.PLACENTA, position, rng)
|
|
61871
61747
|
return true
|
|
61872
61748
|
end
|
|
61873
61749
|
if bloodClotStillInPools then
|
|
61874
|
-
|
|
61750
|
+
spawnCollectible(nil, CollectibleType.BLOOD_CLOT, position, rng)
|
|
61875
61751
|
return true
|
|
61876
61752
|
end
|
|
61877
61753
|
return false
|
|
@@ -61931,7 +61807,7 @@ function SpawnRockAltRewards.prototype.spawnRockAltRewardBucketDownpour(self, po
|
|
|
61931
61807
|
if chance < totalChance then
|
|
61932
61808
|
local stillInPools = self.itemPoolDetection:isCollectibleInItemPool(CollectibleType.LEECH, ItemPoolType.TREASURE)
|
|
61933
61809
|
if stillInPools then
|
|
61934
|
-
|
|
61810
|
+
spawnCollectible(nil, CollectibleType.LEECH, position, rng)
|
|
61935
61811
|
return true
|
|
61936
61812
|
end
|
|
61937
61813
|
return false
|
|
@@ -61998,7 +61874,7 @@ function SpawnRockAltRewards.prototype.spawnRockAltRewardBucketDross(self, posit
|
|
|
61998
61874
|
if chance < totalChance then
|
|
61999
61875
|
local stillInPools = self.itemPoolDetection:isCollectibleInItemPool(CollectibleType.POOP, ItemPoolType.TREASURE)
|
|
62000
61876
|
if stillInPools then
|
|
62001
|
-
|
|
61877
|
+
spawnCollectible(nil, CollectibleType.POOP, position, rng)
|
|
62002
61878
|
return true
|
|
62003
61879
|
end
|
|
62004
61880
|
return false
|
|
@@ -62285,8 +62161,6 @@ local ____PressInput = require("classes.features.other.PressInput")
|
|
|
62285
62161
|
local PressInput = ____PressInput.PressInput
|
|
62286
62162
|
local ____PreventChildEntities = require("classes.features.other.PreventChildEntities")
|
|
62287
62163
|
local PreventChildEntities = ____PreventChildEntities.PreventChildEntities
|
|
62288
|
-
local ____PreventCollectibleRotation = require("classes.features.other.PreventCollectibleRotation")
|
|
62289
|
-
local PreventCollectibleRotation = ____PreventCollectibleRotation.PreventCollectibleRotation
|
|
62290
62164
|
local ____PreventGridEntityRespawn = require("classes.features.other.PreventGridEntityRespawn")
|
|
62291
62165
|
local PreventGridEntityRespawn = ____PreventGridEntityRespawn.PreventGridEntityRespawn
|
|
62292
62166
|
local ____RoomClearFrame = require("classes.features.other.RoomClearFrame")
|
|
@@ -62301,8 +62175,6 @@ local ____RunNextRun = require("classes.features.other.RunNextRun")
|
|
|
62301
62175
|
local RunNextRun = ____RunNextRun.RunNextRun
|
|
62302
62176
|
local ____SaveDataManager = require("classes.features.other.SaveDataManager")
|
|
62303
62177
|
local SaveDataManager = ____SaveDataManager.SaveDataManager
|
|
62304
|
-
local ____SpawnCollectible = require("classes.features.other.SpawnCollectible")
|
|
62305
|
-
local SpawnCollectible = ____SpawnCollectible.SpawnCollectible
|
|
62306
62178
|
local ____SpawnRockAltRewards = require("classes.features.other.SpawnRockAltRewards")
|
|
62307
62179
|
local SpawnRockAltRewards = ____SpawnRockAltRewards.SpawnRockAltRewards
|
|
62308
62180
|
local ____StageHistory = require("classes.features.other.StageHistory")
|
|
@@ -62340,13 +62212,11 @@ function ____exports.getFeatures(self, mod, callbacks)
|
|
|
62340
62212
|
local stageHistory = __TS__New(StageHistory)
|
|
62341
62213
|
local runInNFrames = __TS__New(RunInNFrames, roomHistory)
|
|
62342
62214
|
local pickupIndexCreation = __TS__New(PickupIndexCreation, roomHistory, saveDataManager)
|
|
62343
|
-
local preventCollectibleRotation = __TS__New(PreventCollectibleRotation, pickupIndexCreation, runInNFrames)
|
|
62344
62215
|
local customGridEntities = __TS__New(CustomGridEntities, runInNFrames)
|
|
62345
62216
|
local moddedElementSets = __TS__New(ModdedElementSets, moddedElementDetection)
|
|
62346
62217
|
local itemPoolDetection = __TS__New(ItemPoolDetection, moddedElementSets)
|
|
62347
62218
|
local pause = __TS__New(Pause, disableInputs)
|
|
62348
62219
|
local preventGridEntityRespawn = __TS__New(PreventGridEntityRespawn, runInNFrames)
|
|
62349
|
-
local spawnCollectible = __TS__New(SpawnCollectible, preventCollectibleRotation)
|
|
62350
62220
|
local customTrapdoors = __TS__New(
|
|
62351
62221
|
CustomTrapdoors,
|
|
62352
62222
|
customGridEntities,
|
|
@@ -62409,7 +62279,7 @@ function ____exports.getFeatures(self, mod, callbacks)
|
|
|
62409
62279
|
),
|
|
62410
62280
|
[ISCFeature.CUSTOM_TRAPDOORS] = customTrapdoors,
|
|
62411
62281
|
[ISCFeature.DEBUG_DISPLAY] = __TS__New(DebugDisplay, mod),
|
|
62412
|
-
[ISCFeature.DEPLOY_JSON_ROOM] = __TS__New(DeployJSONRoom, preventGridEntityRespawn
|
|
62282
|
+
[ISCFeature.DEPLOY_JSON_ROOM] = __TS__New(DeployJSONRoom, preventGridEntityRespawn),
|
|
62413
62283
|
[ISCFeature.DISABLE_ALL_SOUND] = disableAllSound,
|
|
62414
62284
|
[ISCFeature.DISABLE_INPUTS] = disableInputs,
|
|
62415
62285
|
[ISCFeature.EDEN_STARTING_STATS_HEALTH] = __TS__New(EdenStartingStatsHealth),
|
|
@@ -62429,7 +62299,6 @@ function ____exports.getFeatures(self, mod, callbacks)
|
|
|
62429
62299
|
[ISCFeature.PONY_DETECTION] = ponyDetection,
|
|
62430
62300
|
[ISCFeature.PRESS_INPUT] = pressInput,
|
|
62431
62301
|
[ISCFeature.PREVENT_CHILD_ENTITIES] = __TS__New(PreventChildEntities),
|
|
62432
|
-
[ISCFeature.PREVENT_COLLECTIBLE_ROTATION] = preventCollectibleRotation,
|
|
62433
62302
|
[ISCFeature.PREVENT_GRID_ENTITY_RESPAWN] = preventGridEntityRespawn,
|
|
62434
62303
|
[ISCFeature.ROOM_CLEAR_FRAME] = roomClearFrame,
|
|
62435
62304
|
[ISCFeature.ROOM_HISTORY] = roomHistory,
|
|
@@ -62438,7 +62307,6 @@ function ____exports.getFeatures(self, mod, callbacks)
|
|
|
62438
62307
|
[ISCFeature.RUN_NEXT_RUN] = __TS__New(RunNextRun),
|
|
62439
62308
|
[ISCFeature.SAVE_DATA_MANAGER] = saveDataManager,
|
|
62440
62309
|
[ISCFeature.SPAWN_ALT_ROCK_REWARDS] = __TS__New(SpawnRockAltRewards, itemPoolDetection),
|
|
62441
|
-
[ISCFeature.SPAWN_COLLECTIBLE] = spawnCollectible,
|
|
62442
62310
|
[ISCFeature.STAGE_HISTORY] = stageHistory,
|
|
62443
62311
|
[ISCFeature.START_AMBUSH] = __TS__New(StartAmbush, runInNFrames),
|
|
62444
62312
|
[ISCFeature.TAINTED_LAZARUS_PLAYERS] = __TS__New(TaintedLazarusPlayers),
|