isaacscript-common 20.12.2 → 20.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +79 -40
- package/dist/isaacscript-common.lua +315 -419
- package/dist/src/classes/ModFeature.lua +0 -4
- package/dist/src/classes/ModUpgradedBase.lua +3 -9
- package/dist/src/classes/callbacks/PostNewRoomEarly.lua +2 -2
- package/dist/src/classes/features/callbackLogic/CustomRevive.lua +2 -5
- package/dist/src/classes/features/other/CustomStages.lua +4 -16
- package/dist/src/classes/features/other/CustomTrapdoors.lua +1 -4
- package/dist/src/classes/features/other/DeployJSONRoom.lua +8 -14
- package/dist/src/classes/features/other/Pause.lua +2 -2
- package/dist/src/classes/features/other/TaintedLazarusPlayers.lua +1 -1
- package/dist/src/classes/features/other/customStages/utils.lua +4 -16
- package/dist/src/classes/features/other/extraConsoleCommands/commands.lua +4 -4
- package/dist/src/classes/features/other/extraConsoleCommands/subroutines.lua +2 -2
- package/dist/src/classes/features/other/saveDataManager/loadFromDisk.lua +4 -7
- package/dist/src/classes/features/other/saveDataManager/restoreDefaults.lua +2 -2
- package/dist/src/classes/features/other/saveDataManager/saveToDisk.lua +1 -1
- package/dist/src/enums/MysteriousPaperEffect.d.ts +13 -0
- package/dist/src/enums/MysteriousPaperEffect.d.ts.map +1 -0
- package/dist/src/enums/MysteriousPaperEffect.lua +15 -0
- package/dist/src/functions/benchmark.lua +2 -8
- package/dist/src/functions/debugFunctions.d.ts +2 -2
- package/dist/src/functions/debugFunctions.d.ts.map +1 -1
- package/dist/src/functions/debugFunctions.lua +4 -4
- package/dist/src/functions/deepCopy.lua +7 -7
- package/dist/src/functions/deepCopyTests.lua +1 -1
- package/dist/src/functions/globals.lua +3 -6
- package/dist/src/functions/hex.lua +4 -7
- package/dist/src/functions/jsonHelpers.lua +1 -1
- package/dist/src/functions/jsonRoom.lua +4 -16
- package/dist/src/functions/log.d.ts +8 -4
- package/dist/src/functions/log.d.ts.map +1 -1
- package/dist/src/functions/log.lua +18 -5
- package/dist/src/functions/logEntities.d.ts +8 -8
- package/dist/src/functions/logEntities.d.ts.map +1 -1
- package/dist/src/functions/logEntities.lua +24 -27
- package/dist/src/functions/logMisc.d.ts +26 -26
- package/dist/src/functions/logMisc.d.ts.map +1 -1
- package/dist/src/functions/logMisc.lua +114 -226
- package/dist/src/functions/merge.lua +6 -6
- package/dist/src/functions/revive.d.ts.map +1 -1
- package/dist/src/functions/revive.lua +10 -3
- package/dist/src/functions/run.lua +2 -5
- package/dist/src/functions/trinkets.d.ts +22 -0
- package/dist/src/functions/trinkets.d.ts.map +1 -1
- package/dist/src/functions/trinkets.lua +32 -0
- package/dist/src/functions/utils.d.ts.map +1 -1
- package/dist/src/functions/utils.lua +20 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.lua +8 -0
- package/dist/src/lib/jsonLua.lua +16 -7
- package/dist/src/patchErrorFunctions.lua +1 -1
- package/package.json +1 -1
- package/src/classes/ModFeature.ts +0 -6
- package/src/classes/features/other/saveDataManager/saveToDisk.ts +3 -4
- package/src/enums/MysteriousPaperEffect.ts +12 -0
- package/src/functions/debugFunctions.ts +2 -2
- package/src/functions/deepCopy.ts +2 -0
- package/src/functions/log.ts +15 -4
- package/src/functions/logEntities.ts +14 -8
- package/src/functions/logMisc.ts +56 -39
- package/src/functions/revive.ts +12 -4
- package/src/functions/trinkets.ts +39 -0
- package/src/functions/utils.ts +30 -0
- package/src/index.ts +1 -0
- package/src/lib/jsonLua.lua +16 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 20.
|
|
3
|
+
isaacscript-common 20.13.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -15561,7 +15561,7 @@ return ____exports
|
|
|
15561
15561
|
end,
|
|
15562
15562
|
["src.functions.log"] = function(...)
|
|
15563
15563
|
local ____exports = {}
|
|
15564
|
-
function ____exports.getParentFunctionDescription(
|
|
15564
|
+
function ____exports.getParentFunctionDescription(levels)
|
|
15565
15565
|
if levels == nil then
|
|
15566
15566
|
levels = 3
|
|
15567
15567
|
end
|
|
@@ -15576,8 +15576,17 @@ function ____exports.getParentFunctionDescription(self, levels)
|
|
|
15576
15576
|
end
|
|
15577
15577
|
return nil
|
|
15578
15578
|
end
|
|
15579
|
-
function ____exports.log(
|
|
15580
|
-
|
|
15579
|
+
function ____exports.log(msg, includeParentFunction)
|
|
15580
|
+
if includeParentFunction == nil then
|
|
15581
|
+
includeParentFunction = true
|
|
15582
|
+
end
|
|
15583
|
+
local ____includeParentFunction_0
|
|
15584
|
+
if includeParentFunction then
|
|
15585
|
+
____includeParentFunction_0 = ____exports.getParentFunctionDescription()
|
|
15586
|
+
else
|
|
15587
|
+
____includeParentFunction_0 = nil
|
|
15588
|
+
end
|
|
15589
|
+
local parentFunctionDescription = ____includeParentFunction_0
|
|
15581
15590
|
local debugMsg = parentFunctionDescription == nil and msg or (parentFunctionDescription .. " - ") .. msg
|
|
15582
15591
|
Isaac.DebugString(debugMsg)
|
|
15583
15592
|
end
|
|
@@ -15639,7 +15648,7 @@ function ____exports.isVanillaConsoleCommand(self, commandName)
|
|
|
15639
15648
|
return CONSOLE_COMMANDS_SET:has(commandName)
|
|
15640
15649
|
end
|
|
15641
15650
|
function ____exports.logAndPrint(self, msg)
|
|
15642
|
-
log(
|
|
15651
|
+
log(msg)
|
|
15643
15652
|
print(msg)
|
|
15644
15653
|
end
|
|
15645
15654
|
function ____exports.printEnabled(self, enabled, description)
|
|
@@ -15658,6 +15667,20 @@ end
|
|
|
15658
15667
|
function ____exports.todo(self, ...)
|
|
15659
15668
|
end
|
|
15660
15669
|
function ____exports.twoDimensionalSort(self, array1, array2)
|
|
15670
|
+
local type1 = type(array1)
|
|
15671
|
+
local type2 = type(array2)
|
|
15672
|
+
if type1 ~= type2 then
|
|
15673
|
+
error(((((((("Failed to two-dimensional sort since the two elements were disparate types: " .. tostring(array1)) .. " & ") .. tostring(array2)) .. " (") .. type1) .. " & ") .. type2) .. ")")
|
|
15674
|
+
end
|
|
15675
|
+
if type1 == "string" or type1 == "number" then
|
|
15676
|
+
if array1 == array2 then
|
|
15677
|
+
return 0
|
|
15678
|
+
end
|
|
15679
|
+
return array1 < array2 and -1 or 1
|
|
15680
|
+
end
|
|
15681
|
+
if type1 ~= "table" then
|
|
15682
|
+
error("Failed to two-dimensional sort since the elements were not a string, number, or table.")
|
|
15683
|
+
end
|
|
15661
15684
|
local firstElement1 = array1[1]
|
|
15662
15685
|
local firstElement2 = array2[1]
|
|
15663
15686
|
if firstElement1 == nil or firstElement1 == nil then
|
|
@@ -15666,6 +15689,11 @@ function ____exports.twoDimensionalSort(self, array1, array2)
|
|
|
15666
15689
|
if firstElement2 == nil or firstElement2 == nil then
|
|
15667
15690
|
error("Failed to two-dimensional sort since the first element of the second array was undefined.")
|
|
15668
15691
|
end
|
|
15692
|
+
local elementType1 = type(firstElement1)
|
|
15693
|
+
local elementType2 = type(firstElement2)
|
|
15694
|
+
if elementType1 ~= elementType2 then
|
|
15695
|
+
error(((((((("Failed to two-dimensional sort since the first element of each array were disparate types: " .. tostring(firstElement1)) .. " & ") .. tostring(firstElement2)) .. " (") .. elementType1) .. " & ") .. elementType2) .. ")")
|
|
15696
|
+
end
|
|
15669
15697
|
if firstElement1 == firstElement2 then
|
|
15670
15698
|
return 0
|
|
15671
15699
|
end
|
|
@@ -23729,7 +23757,7 @@ end
|
|
|
23729
23757
|
function ____exports.restart(self, character)
|
|
23730
23758
|
if character == nil then
|
|
23731
23759
|
local command = "restart"
|
|
23732
|
-
log(
|
|
23760
|
+
log("Restarting the run with a console command of: " .. command)
|
|
23733
23761
|
Isaac.ExecuteCommand(command)
|
|
23734
23762
|
return
|
|
23735
23763
|
end
|
|
@@ -23737,10 +23765,7 @@ function ____exports.restart(self, character)
|
|
|
23737
23765
|
error(("Restarting as a character of " .. tostring(character)) .. " would crash the game.")
|
|
23738
23766
|
end
|
|
23739
23767
|
local command = "restart " .. tostring(character)
|
|
23740
|
-
log(
|
|
23741
|
-
nil,
|
|
23742
|
-
(((("Restarting the run as PlayerType." .. PlayerType[character]) .. " (") .. tostring(character)) .. ") with a console command of: ") .. command
|
|
23743
|
-
)
|
|
23768
|
+
log((((("Restarting the run as PlayerType." .. PlayerType[character]) .. " (") .. tostring(character)) .. ") with a console command of: ") .. command)
|
|
23744
23769
|
Isaac.ExecuteCommand(command)
|
|
23745
23770
|
end
|
|
23746
23771
|
function ____exports.setUnseeded(self)
|
|
@@ -27185,6 +27210,19 @@ function ____exports.sumSet(self, set)
|
|
|
27185
27210
|
local values = {__TS__Spread(set:values())}
|
|
27186
27211
|
return sumArray(nil, values)
|
|
27187
27212
|
end
|
|
27213
|
+
return ____exports
|
|
27214
|
+
end,
|
|
27215
|
+
["src.enums.MysteriousPaperEffect"] = function(...)
|
|
27216
|
+
local ____exports = {}
|
|
27217
|
+
____exports.MysteriousPaperEffect = {}
|
|
27218
|
+
____exports.MysteriousPaperEffect.POLAROID = 0
|
|
27219
|
+
____exports.MysteriousPaperEffect[____exports.MysteriousPaperEffect.POLAROID] = "POLAROID"
|
|
27220
|
+
____exports.MysteriousPaperEffect.NEGATIVE = 1
|
|
27221
|
+
____exports.MysteriousPaperEffect[____exports.MysteriousPaperEffect.NEGATIVE] = "NEGATIVE"
|
|
27222
|
+
____exports.MysteriousPaperEffect.MISSING_PAGE = 2
|
|
27223
|
+
____exports.MysteriousPaperEffect[____exports.MysteriousPaperEffect.MISSING_PAGE] = "MISSING_PAGE"
|
|
27224
|
+
____exports.MysteriousPaperEffect.MISSING_POSTER = 3
|
|
27225
|
+
____exports.MysteriousPaperEffect[____exports.MysteriousPaperEffect.MISSING_POSTER] = "MISSING_POSTER"
|
|
27188
27226
|
return ____exports
|
|
27189
27227
|
end,
|
|
27190
27228
|
["src.maps.trinketDescriptionMap"] = function(...)
|
|
@@ -27596,6 +27634,8 @@ local BLIND_ITEM_PNG_PATH = ____constants.BLIND_ITEM_PNG_PATH
|
|
|
27596
27634
|
local ____constantsFirstLast = require("src.core.constantsFirstLast")
|
|
27597
27635
|
local FIRST_TRINKET_TYPE = ____constantsFirstLast.FIRST_TRINKET_TYPE
|
|
27598
27636
|
local LAST_VANILLA_TRINKET_TYPE = ____constantsFirstLast.LAST_VANILLA_TRINKET_TYPE
|
|
27637
|
+
local ____MysteriousPaperEffect = require("src.enums.MysteriousPaperEffect")
|
|
27638
|
+
local MysteriousPaperEffect = ____MysteriousPaperEffect.MysteriousPaperEffect
|
|
27599
27639
|
local ____trinketDescriptionMap = require("src.maps.trinketDescriptionMap")
|
|
27600
27640
|
local DEFAULT_TRINKET_DESCRIPTION = ____trinketDescriptionMap.DEFAULT_TRINKET_DESCRIPTION
|
|
27601
27641
|
local TRINKET_DESCRIPTION_MAP = ____trinketDescriptionMap.TRINKET_DESCRIPTION_MAP
|
|
@@ -27604,6 +27644,8 @@ local DEFAULT_TRINKET_NAME = ____trinketTypeToNameMap.DEFAULT_TRINKET_NAME
|
|
|
27604
27644
|
local TRINKET_TYPE_TO_NAME_MAP = ____trinketTypeToNameMap.TRINKET_TYPE_TO_NAME_MAP
|
|
27605
27645
|
local ____entities = require("src.functions.entities")
|
|
27606
27646
|
local getEntityID = ____entities.getEntityID
|
|
27647
|
+
local ____enums = require("src.functions.enums")
|
|
27648
|
+
local getEnumLength = ____enums.getEnumLength
|
|
27607
27649
|
local ____flag = require("src.functions.flag")
|
|
27608
27650
|
local hasFlag = ____flag.hasFlag
|
|
27609
27651
|
local ____pickupVariants = require("src.functions.pickupVariants")
|
|
@@ -27620,11 +27662,21 @@ function ____exports.isVanillaTrinketType(self, trinketType)
|
|
|
27620
27662
|
return trinketType <= LAST_VANILLA_TRINKET_TYPE
|
|
27621
27663
|
end
|
|
27622
27664
|
local GOLDEN_TRINKET_ADJUSTMENT = 32768
|
|
27665
|
+
local NUM_MYSTERIOUS_PAPER_EFFECTS = getEnumLength(nil, MysteriousPaperEffect)
|
|
27623
27666
|
local TRINKET_ANM2_PATH = "gfx/005.350_trinket.anm2"
|
|
27624
27667
|
local TRINKET_SPRITE_LAYER = 0
|
|
27625
27668
|
function ____exports.getGoldenTrinketType(self, trinketType)
|
|
27626
27669
|
return asNumber(nil, trinketType) + GOLDEN_TRINKET_ADJUSTMENT
|
|
27627
27670
|
end
|
|
27671
|
+
function ____exports.getMysteriousPaperEffectForFrame(self, player, frameCount)
|
|
27672
|
+
if frameCount == nil then
|
|
27673
|
+
frameCount = player.FrameCount
|
|
27674
|
+
end
|
|
27675
|
+
if not player:HasTrinket(TrinketType.MYSTERIOUS_PAPER) then
|
|
27676
|
+
return nil
|
|
27677
|
+
end
|
|
27678
|
+
return frameCount % NUM_MYSTERIOUS_PAPER_EFFECTS
|
|
27679
|
+
end
|
|
27628
27680
|
function ____exports.getOpenTrinketSlot(self, player)
|
|
27629
27681
|
local maxTrinkets = player:GetMaxTrinkets()
|
|
27630
27682
|
local trinketType1 = player:GetTrinket(TrinketSlot.SLOT_1)
|
|
@@ -27783,76 +27835,64 @@ local isTable = ____types.isTable
|
|
|
27783
27835
|
local isUserdata = ____types.isUserdata
|
|
27784
27836
|
local ____vector = require("src.functions.vector")
|
|
27785
27837
|
local vectorToString = ____vector.vectorToString
|
|
27786
|
-
function ____exports.logFlags(
|
|
27838
|
+
function ____exports.logFlags(flags, flagEnum, description)
|
|
27787
27839
|
if description == nil then
|
|
27788
27840
|
description = ""
|
|
27789
27841
|
end
|
|
27790
27842
|
if description ~= "" then
|
|
27791
27843
|
description = "flag"
|
|
27792
27844
|
end
|
|
27793
|
-
log(
|
|
27794
|
-
nil,
|
|
27795
|
-
(("Logging " .. description) .. " values for: ") .. tostring(flags)
|
|
27796
|
-
)
|
|
27845
|
+
log((("Logging " .. description) .. " values for: ") .. tostring(flags))
|
|
27797
27846
|
local hasNoFlags = true
|
|
27798
27847
|
for ____, ____value in ipairs(getEnumEntries(nil, flagEnum)) do
|
|
27799
27848
|
local key = ____value[1]
|
|
27800
27849
|
local value = ____value[2]
|
|
27801
27850
|
if hasFlag(nil, flags, value) then
|
|
27802
|
-
log(
|
|
27803
|
-
nil,
|
|
27804
|
-
(((" Has flag: " .. key) .. " (") .. tostring(value)) .. ")"
|
|
27805
|
-
)
|
|
27851
|
+
log((((" Has flag: " .. key) .. " (") .. tostring(value)) .. ")")
|
|
27806
27852
|
hasNoFlags = false
|
|
27807
27853
|
end
|
|
27808
27854
|
end
|
|
27809
27855
|
if hasNoFlags then
|
|
27810
|
-
log(
|
|
27856
|
+
log(" n/a (no flags)")
|
|
27811
27857
|
end
|
|
27812
27858
|
end
|
|
27813
|
-
function ____exports.logArray(
|
|
27859
|
+
function ____exports.logArray(array)
|
|
27814
27860
|
if not isArray(nil, array, false) then
|
|
27815
|
-
log(
|
|
27861
|
+
log("Tried to log an array, but the given object was not an array.")
|
|
27816
27862
|
return
|
|
27817
27863
|
end
|
|
27818
27864
|
local arrayString = arrayToString(nil, array)
|
|
27819
|
-
log(
|
|
27865
|
+
log("Array: " .. arrayString)
|
|
27820
27866
|
end
|
|
27821
|
-
function ____exports.logCollectibleTypes(
|
|
27822
|
-
log(
|
|
27867
|
+
function ____exports.logCollectibleTypes(collectibleTypes)
|
|
27868
|
+
log("Collectibles:")
|
|
27823
27869
|
local i = 1
|
|
27824
27870
|
for ____, collectibleType in ipairs(collectibleTypes) do
|
|
27825
27871
|
local collectibleName = getCollectibleName(nil, collectibleType)
|
|
27826
|
-
log(
|
|
27827
|
-
nil,
|
|
27828
|
-
((((tostring(i) .. ") ") .. collectibleName) .. " (") .. tostring(collectibleType)) .. ")"
|
|
27829
|
-
)
|
|
27872
|
+
log(((((tostring(i) .. ") ") .. collectibleName) .. " (") .. tostring(collectibleType)) .. ")")
|
|
27830
27873
|
i = i + 1
|
|
27831
27874
|
end
|
|
27832
27875
|
end
|
|
27833
|
-
function ____exports.logColor(
|
|
27834
|
-
log(
|
|
27835
|
-
nil,
|
|
27836
|
-
(((((((((((("Color: R" .. tostring(color.R)) .. ", G") .. tostring(color.G)) .. ", B") .. tostring(color.B)) .. ", A") .. tostring(color.A)) .. ", RO") .. tostring(color.RO)) .. ", BO") .. tostring(color.BO)) .. ", GO") .. tostring(color.GO)
|
|
27837
|
-
)
|
|
27876
|
+
function ____exports.logColor(color)
|
|
27877
|
+
log((((((((((((("Color: R" .. tostring(color.R)) .. ", G") .. tostring(color.G)) .. ", B") .. tostring(color.B)) .. ", A") .. tostring(color.A)) .. ", RO") .. tostring(color.RO)) .. ", BO") .. tostring(color.BO)) .. ", GO") .. tostring(color.GO))
|
|
27838
27878
|
end
|
|
27839
|
-
function ____exports.logDamageFlags(
|
|
27840
|
-
____exports.logFlags(
|
|
27879
|
+
function ____exports.logDamageFlags(flags)
|
|
27880
|
+
____exports.logFlags(flags, DamageFlag, "damage")
|
|
27841
27881
|
end
|
|
27842
|
-
function ____exports.logEntityFlags(
|
|
27843
|
-
____exports.logFlags(
|
|
27882
|
+
function ____exports.logEntityFlags(flags)
|
|
27883
|
+
____exports.logFlags(flags, EntityFlag, "entity")
|
|
27844
27884
|
end
|
|
27845
|
-
function ____exports.logEntityID(
|
|
27885
|
+
function ____exports.logEntityID(entity)
|
|
27846
27886
|
local entityID = getEntityID(nil, entity)
|
|
27847
|
-
log(
|
|
27887
|
+
log("Entity: " .. entityID)
|
|
27848
27888
|
end
|
|
27849
|
-
function ____exports.logError(
|
|
27889
|
+
function ____exports.logError(msg)
|
|
27850
27890
|
local errorMsg = "Error: " .. msg
|
|
27851
|
-
log(
|
|
27891
|
+
log(errorMsg)
|
|
27852
27892
|
print(errorMsg)
|
|
27853
27893
|
end
|
|
27854
|
-
function ____exports.logGameStateFlags(
|
|
27855
|
-
log(
|
|
27894
|
+
function ____exports.logGameStateFlags()
|
|
27895
|
+
log("Logging game state flags:")
|
|
27856
27896
|
local gameStateFlagEntries = getEnumEntries(nil, GameStateFlag)
|
|
27857
27897
|
local hasNoFlags = true
|
|
27858
27898
|
for ____, ____value in ipairs(gameStateFlagEntries) do
|
|
@@ -27860,69 +27900,54 @@ function ____exports.logGameStateFlags(self)
|
|
|
27860
27900
|
local gameStateFlag = ____value[2]
|
|
27861
27901
|
local flagValue = game:GetStateFlag(gameStateFlag)
|
|
27862
27902
|
if flagValue then
|
|
27863
|
-
log(
|
|
27864
|
-
nil,
|
|
27865
|
-
(((" Has flag: " .. key) .. " (") .. tostring(gameStateFlag)) .. ")"
|
|
27866
|
-
)
|
|
27903
|
+
log((((" Has flag: " .. key) .. " (") .. tostring(gameStateFlag)) .. ")")
|
|
27867
27904
|
hasNoFlags = false
|
|
27868
27905
|
end
|
|
27869
27906
|
end
|
|
27870
27907
|
if hasNoFlags then
|
|
27871
|
-
log(
|
|
27908
|
+
log(" n/a (no flags)")
|
|
27872
27909
|
end
|
|
27873
27910
|
end
|
|
27874
|
-
function ____exports.logKColor(
|
|
27875
|
-
log(
|
|
27876
|
-
nil,
|
|
27877
|
-
(((((("Color: R" .. tostring(kColor.Red)) .. ", G") .. tostring(kColor.Green)) .. ", B") .. tostring(kColor.Blue)) .. ", A") .. tostring(kColor.Alpha)
|
|
27878
|
-
)
|
|
27911
|
+
function ____exports.logKColor(kColor)
|
|
27912
|
+
log((((((("Color: R" .. tostring(kColor.Red)) .. ", G") .. tostring(kColor.Green)) .. ", B") .. tostring(kColor.Blue)) .. ", A") .. tostring(kColor.Alpha))
|
|
27879
27913
|
end
|
|
27880
|
-
function ____exports.logLevelStateFlags(
|
|
27914
|
+
function ____exports.logLevelStateFlags()
|
|
27881
27915
|
local level = game:GetLevel()
|
|
27882
27916
|
local levelStateFlagEntries = getEnumEntries(nil, LevelStateFlag)
|
|
27883
|
-
log(
|
|
27917
|
+
log("Logging level state flags:")
|
|
27884
27918
|
local hasNoFlags = true
|
|
27885
27919
|
for ____, ____value in ipairs(levelStateFlagEntries) do
|
|
27886
27920
|
local key = ____value[1]
|
|
27887
27921
|
local levelStateFlag = ____value[2]
|
|
27888
27922
|
local flagValue = level:GetStateFlag(levelStateFlag)
|
|
27889
27923
|
if flagValue then
|
|
27890
|
-
log(
|
|
27891
|
-
nil,
|
|
27892
|
-
(((" Has flag: " .. key) .. " (") .. tostring(levelStateFlag)) .. ")"
|
|
27893
|
-
)
|
|
27924
|
+
log((((" Has flag: " .. key) .. " (") .. tostring(levelStateFlag)) .. ")")
|
|
27894
27925
|
hasNoFlags = false
|
|
27895
27926
|
end
|
|
27896
27927
|
end
|
|
27897
27928
|
if hasNoFlags then
|
|
27898
|
-
log(
|
|
27929
|
+
log(" n/a (no flags)")
|
|
27899
27930
|
end
|
|
27900
27931
|
end
|
|
27901
|
-
function ____exports.logMap(
|
|
27932
|
+
function ____exports.logMap(map)
|
|
27902
27933
|
if not isTSTLMap(nil, map) and not isDefaultMap(nil, map) then
|
|
27903
|
-
log(
|
|
27934
|
+
log("Tried to log a TSTL map, but the given object was not a TSTL map.")
|
|
27904
27935
|
return
|
|
27905
27936
|
end
|
|
27906
|
-
log(
|
|
27937
|
+
log("Printing out a TSTL map:")
|
|
27907
27938
|
local mapKeys = {__TS__Spread(map:keys())}
|
|
27908
27939
|
__TS__ArraySort(mapKeys)
|
|
27909
27940
|
for ____, key in ipairs(mapKeys) do
|
|
27910
27941
|
local value = map:get(key)
|
|
27911
|
-
log(
|
|
27912
|
-
nil,
|
|
27913
|
-
((" " .. tostring(key)) .. " --> ") .. tostring(value)
|
|
27914
|
-
)
|
|
27942
|
+
log(((" " .. tostring(key)) .. " --> ") .. tostring(value))
|
|
27915
27943
|
end
|
|
27916
|
-
log(
|
|
27917
|
-
nil,
|
|
27918
|
-
" The size of the map was: " .. tostring(map.size)
|
|
27919
|
-
)
|
|
27944
|
+
log(" The size of the map was: " .. tostring(map.size))
|
|
27920
27945
|
end
|
|
27921
|
-
function ____exports.logPlayerEffects(
|
|
27946
|
+
function ____exports.logPlayerEffects(player)
|
|
27922
27947
|
local effects = getEffectsList(nil, player)
|
|
27923
|
-
log(
|
|
27948
|
+
log("Logging player effects:")
|
|
27924
27949
|
if #effects == 0 then
|
|
27925
|
-
log(
|
|
27950
|
+
log(" n/a (no effects)")
|
|
27926
27951
|
return
|
|
27927
27952
|
end
|
|
27928
27953
|
__TS__ArrayForEach(
|
|
@@ -27940,164 +27965,101 @@ function ____exports.logPlayerEffects(self, player)
|
|
|
27940
27965
|
else
|
|
27941
27966
|
effectDescription = "Unknown type of effect: " .. tostring(effect.Item.ID)
|
|
27942
27967
|
end
|
|
27943
|
-
log(
|
|
27944
|
-
nil,
|
|
27945
|
-
(((((" " .. tostring(i + 1)) .. ") ") .. effectDescription) .. " (x") .. tostring(effect.Count)) .. ")"
|
|
27946
|
-
)
|
|
27968
|
+
log((((((" " .. tostring(i + 1)) .. ") ") .. effectDescription) .. " (x") .. tostring(effect.Count)) .. ")")
|
|
27947
27969
|
end
|
|
27948
27970
|
)
|
|
27949
27971
|
end
|
|
27950
|
-
function ____exports.logPlayerHealth(
|
|
27972
|
+
function ____exports.logPlayerHealth(player)
|
|
27951
27973
|
local playerName = getPlayerName(nil, player)
|
|
27952
27974
|
local playerHealth = getPlayerHealth(nil, player)
|
|
27953
|
-
log(
|
|
27954
|
-
log(
|
|
27955
|
-
|
|
27956
|
-
|
|
27957
|
-
)
|
|
27958
|
-
log(
|
|
27959
|
-
|
|
27960
|
-
|
|
27961
|
-
)
|
|
27962
|
-
log(
|
|
27963
|
-
|
|
27964
|
-
|
|
27965
|
-
)
|
|
27966
|
-
log(
|
|
27967
|
-
nil,
|
|
27968
|
-
" Soul hearts: " .. tostring(playerHealth.soulHearts)
|
|
27969
|
-
)
|
|
27970
|
-
log(
|
|
27971
|
-
nil,
|
|
27972
|
-
" Bone hearts: " .. tostring(playerHealth.boneHearts)
|
|
27973
|
-
)
|
|
27974
|
-
log(
|
|
27975
|
-
nil,
|
|
27976
|
-
" Golden hearts: " .. tostring(playerHealth.goldenHearts)
|
|
27977
|
-
)
|
|
27978
|
-
log(
|
|
27979
|
-
nil,
|
|
27980
|
-
" Rotten hearts: " .. tostring(playerHealth.rottenHearts)
|
|
27981
|
-
)
|
|
27982
|
-
log(
|
|
27983
|
-
nil,
|
|
27984
|
-
" Broken hearts: " .. tostring(playerHealth.brokenHearts)
|
|
27985
|
-
)
|
|
27986
|
-
log(
|
|
27987
|
-
nil,
|
|
27988
|
-
" Soul charges: " .. tostring(playerHealth.soulCharges)
|
|
27989
|
-
)
|
|
27990
|
-
log(
|
|
27991
|
-
nil,
|
|
27992
|
-
" Blood charges: " .. tostring(playerHealth.bloodCharges)
|
|
27993
|
-
)
|
|
27994
|
-
log(nil, " Soul heart types: [")
|
|
27975
|
+
log(("Player health for " .. playerName) .. ":")
|
|
27976
|
+
log(" Max hearts: " .. tostring(playerHealth.maxHearts))
|
|
27977
|
+
log(" Hearts: " .. tostring(playerHealth.hearts))
|
|
27978
|
+
log(" Eternal hearts: " .. tostring(playerHealth.eternalHearts))
|
|
27979
|
+
log(" Soul hearts: " .. tostring(playerHealth.soulHearts))
|
|
27980
|
+
log(" Bone hearts: " .. tostring(playerHealth.boneHearts))
|
|
27981
|
+
log(" Golden hearts: " .. tostring(playerHealth.goldenHearts))
|
|
27982
|
+
log(" Rotten hearts: " .. tostring(playerHealth.rottenHearts))
|
|
27983
|
+
log(" Broken hearts: " .. tostring(playerHealth.brokenHearts))
|
|
27984
|
+
log(" Soul charges: " .. tostring(playerHealth.soulCharges))
|
|
27985
|
+
log(" Blood charges: " .. tostring(playerHealth.bloodCharges))
|
|
27986
|
+
log(" Soul heart types: [")
|
|
27995
27987
|
for ____, soulHeartType in ipairs(playerHealth.soulHeartTypes) do
|
|
27996
|
-
log(
|
|
27988
|
+
log(" HeartSubType." .. HeartSubType[soulHeartType])
|
|
27997
27989
|
end
|
|
27998
|
-
log(
|
|
27990
|
+
log(" ]")
|
|
27999
27991
|
end
|
|
28000
|
-
function ____exports.logProjectileFlags(
|
|
28001
|
-
____exports.logFlags(
|
|
27992
|
+
function ____exports.logProjectileFlags(flags)
|
|
27993
|
+
____exports.logFlags(flags, ProjectileFlag, "projectile")
|
|
28002
27994
|
end
|
|
28003
|
-
function ____exports.logRoom(
|
|
27995
|
+
function ____exports.logRoom()
|
|
28004
27996
|
local room = game:GetRoom()
|
|
28005
27997
|
local bossID = room:GetBossID()
|
|
28006
27998
|
local roomGridIndex = getRoomGridIndex(nil)
|
|
28007
27999
|
local roomListIndex = getRoomListIndex(nil)
|
|
28008
28000
|
local roomData = getRoomData(nil)
|
|
28009
|
-
log(
|
|
28001
|
+
log("Current room information:")
|
|
28010
28002
|
if roomData == nil then
|
|
28011
|
-
log(
|
|
28003
|
+
log("- Room data is undefined.")
|
|
28012
28004
|
else
|
|
28013
|
-
log(
|
|
28014
|
-
|
|
28015
|
-
|
|
28016
|
-
)
|
|
28017
|
-
log(
|
|
28018
|
-
nil,
|
|
28019
|
-
(((("- Type/variant/sub-type: " .. tostring(roomData.Type)) .. ".") .. tostring(roomData.Variant)) .. ".") .. tostring(roomData.Subtype)
|
|
28020
|
-
)
|
|
28021
|
-
log(nil, "- Name: " .. roomData.Name)
|
|
28005
|
+
log("- Room stage ID: " .. tostring(roomData.StageID))
|
|
28006
|
+
log((((("- Type/variant/sub-type: " .. tostring(roomData.Type)) .. ".") .. tostring(roomData.Variant)) .. ".") .. tostring(roomData.Subtype))
|
|
28007
|
+
log("- Name: " .. roomData.Name)
|
|
28022
28008
|
end
|
|
28023
28009
|
local roomGridIndexName = GridRoom[roomGridIndex]
|
|
28024
28010
|
if roomGridIndexName == nil then
|
|
28025
|
-
log(
|
|
28026
|
-
nil,
|
|
28027
|
-
"- Grid index: " .. tostring(roomGridIndex)
|
|
28028
|
-
)
|
|
28011
|
+
log("- Grid index: " .. tostring(roomGridIndex))
|
|
28029
28012
|
else
|
|
28030
|
-
log(
|
|
28031
|
-
nil,
|
|
28032
|
-
((("- Grid index: GridRoom." .. roomGridIndexName) .. " (") .. tostring(roomGridIndex)) .. ")"
|
|
28033
|
-
)
|
|
28013
|
+
log(((("- Grid index: GridRoom." .. roomGridIndexName) .. " (") .. tostring(roomGridIndex)) .. ")")
|
|
28034
28014
|
end
|
|
28035
|
-
log(
|
|
28036
|
-
|
|
28037
|
-
"- List index: " .. tostring(roomListIndex)
|
|
28038
|
-
)
|
|
28039
|
-
log(
|
|
28040
|
-
nil,
|
|
28041
|
-
"- Boss ID: " .. tostring(bossID)
|
|
28042
|
-
)
|
|
28015
|
+
log("- List index: " .. tostring(roomListIndex))
|
|
28016
|
+
log("- Boss ID: " .. tostring(bossID))
|
|
28043
28017
|
end
|
|
28044
|
-
function ____exports.logSeedEffects(
|
|
28018
|
+
function ____exports.logSeedEffects()
|
|
28045
28019
|
local seeds = game:GetSeeds()
|
|
28046
28020
|
local seedEffectEntries = getEnumEntries(nil, SeedEffect)
|
|
28047
|
-
log(
|
|
28021
|
+
log("Logging seed effects:")
|
|
28048
28022
|
local hasNoSeedEffects = true
|
|
28049
28023
|
for ____, ____value in ipairs(seedEffectEntries) do
|
|
28050
28024
|
local key = ____value[1]
|
|
28051
28025
|
local seedEffect = ____value[2]
|
|
28052
28026
|
if seeds:HasSeedEffect(seedEffect) then
|
|
28053
|
-
log(
|
|
28054
|
-
nil,
|
|
28055
|
-
(((" " .. key) .. " (") .. tostring(seedEffect)) .. ")"
|
|
28056
|
-
)
|
|
28027
|
+
log((((" " .. key) .. " (") .. tostring(seedEffect)) .. ")")
|
|
28057
28028
|
hasNoSeedEffects = false
|
|
28058
28029
|
end
|
|
28059
28030
|
end
|
|
28060
28031
|
if hasNoSeedEffects then
|
|
28061
|
-
log(
|
|
28032
|
+
log(" n/a (no seed effects)")
|
|
28062
28033
|
end
|
|
28063
28034
|
end
|
|
28064
|
-
function ____exports.logSet(
|
|
28035
|
+
function ____exports.logSet(set)
|
|
28065
28036
|
if not isTSTLSet(nil, set) then
|
|
28066
|
-
log(
|
|
28037
|
+
log("Tried to log a TSTL set, but the given object was not a TSTL set.")
|
|
28067
28038
|
return
|
|
28068
28039
|
end
|
|
28069
|
-
log(
|
|
28040
|
+
log("Printing out a TSTL set:")
|
|
28070
28041
|
local setValues = getSortedSetValues(nil, set)
|
|
28071
28042
|
for ____, value in ipairs(setValues) do
|
|
28072
|
-
log(
|
|
28073
|
-
nil,
|
|
28074
|
-
" Value: " .. tostring(value)
|
|
28075
|
-
)
|
|
28043
|
+
log(" Value: " .. tostring(value))
|
|
28076
28044
|
end
|
|
28077
|
-
log(
|
|
28078
|
-
nil,
|
|
28079
|
-
" The size of the set was: " .. tostring(set.size)
|
|
28080
|
-
)
|
|
28045
|
+
log(" The size of the set was: " .. tostring(set.size))
|
|
28081
28046
|
end
|
|
28082
|
-
function ____exports.logSounds(
|
|
28047
|
+
function ____exports.logSounds()
|
|
28083
28048
|
local soundEffects = getEnumEntries(nil, SoundEffect)
|
|
28084
28049
|
for ____, ____value in ipairs(soundEffects) do
|
|
28085
28050
|
local key = ____value[1]
|
|
28086
28051
|
local soundEffect = ____value[2]
|
|
28087
28052
|
if sfxManager:IsPlaying(soundEffect) then
|
|
28088
|
-
log(
|
|
28089
|
-
nil,
|
|
28090
|
-
((("Currently playing sound effect: " .. key) .. " (") .. tostring(soundEffect)) .. ")"
|
|
28091
|
-
)
|
|
28053
|
+
log(((("Currently playing sound effect: " .. key) .. " (") .. tostring(soundEffect)) .. ")")
|
|
28092
28054
|
end
|
|
28093
28055
|
end
|
|
28094
28056
|
end
|
|
28095
|
-
function ____exports.logTable(
|
|
28057
|
+
function ____exports.logTable(luaTable, parentTables)
|
|
28096
28058
|
if parentTables == nil then
|
|
28097
28059
|
parentTables = 0
|
|
28098
28060
|
end
|
|
28099
28061
|
if parentTables == 0 then
|
|
28100
|
-
log(
|
|
28062
|
+
log("Printing out a Lua table:", false)
|
|
28101
28063
|
elseif parentTables > 10 then
|
|
28102
28064
|
return
|
|
28103
28065
|
end
|
|
@@ -28107,12 +28069,10 @@ function ____exports.logTable(self, luaTable, parentTables)
|
|
|
28107
28069
|
math.floor(numSpaces)
|
|
28108
28070
|
)
|
|
28109
28071
|
if not isTable(nil, luaTable) then
|
|
28110
|
-
(
|
|
28111
|
-
|
|
28112
|
-
|
|
28113
|
-
|
|
28114
|
-
)
|
|
28115
|
-
end)(nil)
|
|
28072
|
+
log(
|
|
28073
|
+
((indentation .. "n/a (encountered a variable of type \"") .. __TS__TypeOf(luaTable)) .. "\" instead of a table)",
|
|
28074
|
+
false
|
|
28075
|
+
)
|
|
28116
28076
|
return
|
|
28117
28077
|
end
|
|
28118
28078
|
local numElements = 0
|
|
@@ -28121,28 +28081,26 @@ function ____exports.logTable(self, luaTable, parentTables)
|
|
|
28121
28081
|
luaTable,
|
|
28122
28082
|
function(____, key, value)
|
|
28123
28083
|
log(
|
|
28124
|
-
|
|
28125
|
-
|
|
28084
|
+
((indentation .. tostring(key)) .. " --> ") .. tostring(value),
|
|
28085
|
+
false
|
|
28126
28086
|
)
|
|
28127
28087
|
if isTable(nil, value) then
|
|
28128
28088
|
if key == "__class" then
|
|
28129
|
-
log(
|
|
28089
|
+
log(indentation .. " (skipping enumerating this key to avoid infinite recursion)", false)
|
|
28130
28090
|
else
|
|
28131
|
-
____exports.logTable(
|
|
28091
|
+
____exports.logTable(value, parentTables + 1)
|
|
28132
28092
|
end
|
|
28133
28093
|
end
|
|
28134
28094
|
numElements = numElements + 1
|
|
28135
28095
|
end
|
|
28136
|
-
)
|
|
28137
|
-
(
|
|
28138
|
-
|
|
28139
|
-
|
|
28140
|
-
|
|
28141
|
-
)
|
|
28142
|
-
end)(nil)
|
|
28096
|
+
)
|
|
28097
|
+
log(
|
|
28098
|
+
(indentation .. "The size of the table was: ") .. tostring(numElements),
|
|
28099
|
+
false
|
|
28100
|
+
)
|
|
28143
28101
|
end
|
|
28144
|
-
function ____exports.logTableDifferences(
|
|
28145
|
-
log(
|
|
28102
|
+
function ____exports.logTableDifferences(table1, table2)
|
|
28103
|
+
log("Comparing two Lua tables:")
|
|
28146
28104
|
local table1Keys = __TS__ObjectKeys(table1)
|
|
28147
28105
|
local table1KeysSet = __TS__New(Set, table1Keys)
|
|
28148
28106
|
local table2Keys = __TS__ObjectKeys(table2)
|
|
@@ -28152,34 +28110,22 @@ function ____exports.logTableDifferences(self, table1, table2)
|
|
|
28152
28110
|
__TS__ArraySort(keys)
|
|
28153
28111
|
for ____, key in ipairs(keys) do
|
|
28154
28112
|
if not table1KeysSet:has(key) then
|
|
28155
|
-
log(
|
|
28156
|
-
nil,
|
|
28157
|
-
" Table 1 is missing key: " .. tostring(key)
|
|
28158
|
-
)
|
|
28113
|
+
log(" Table 1 is missing key: " .. tostring(key))
|
|
28159
28114
|
elseif not table2KeysSet:has(key) then
|
|
28160
|
-
log(
|
|
28161
|
-
nil,
|
|
28162
|
-
" Table 2 is missing key: " .. tostring(key)
|
|
28163
|
-
)
|
|
28115
|
+
log(" Table 2 is missing key: " .. tostring(key))
|
|
28164
28116
|
else
|
|
28165
28117
|
local value1 = table1[key]
|
|
28166
28118
|
local value2 = table2[key]
|
|
28167
28119
|
if value1 ~= value2 then
|
|
28168
|
-
log(
|
|
28169
|
-
nil,
|
|
28170
|
-
(((((" " .. tostring(key)) .. " --> \"") .. tostring(value1)) .. "\" versus \"") .. tostring(value2)) .. "\""
|
|
28171
|
-
)
|
|
28120
|
+
log((((((" " .. tostring(key)) .. " --> \"") .. tostring(value1)) .. "\" versus \"") .. tostring(value2)) .. "\"")
|
|
28172
28121
|
end
|
|
28173
28122
|
end
|
|
28174
28123
|
end
|
|
28175
28124
|
end
|
|
28176
|
-
function ____exports.logTableKeys(
|
|
28177
|
-
log(
|
|
28125
|
+
function ____exports.logTableKeys(luaTable)
|
|
28126
|
+
log("Printing out the keys of a Lua table:")
|
|
28178
28127
|
if not isTable(nil, luaTable) then
|
|
28179
|
-
log(
|
|
28180
|
-
nil,
|
|
28181
|
-
(" n/a (encountered a variable of type \"" .. __TS__TypeOf(luaTable)) .. "\" instead of a table)"
|
|
28182
|
-
)
|
|
28128
|
+
log((" n/a (encountered a variable of type \"" .. __TS__TypeOf(luaTable)) .. "\" instead of a table)")
|
|
28183
28129
|
return
|
|
28184
28130
|
end
|
|
28185
28131
|
local numElements = 0
|
|
@@ -28187,48 +28133,42 @@ function ____exports.logTableKeys(self, luaTable)
|
|
|
28187
28133
|
nil,
|
|
28188
28134
|
luaTable,
|
|
28189
28135
|
function(____, key)
|
|
28190
|
-
log(
|
|
28191
|
-
nil,
|
|
28192
|
-
tostring(key)
|
|
28193
|
-
)
|
|
28136
|
+
log(tostring(key))
|
|
28194
28137
|
numElements = numElements + 1
|
|
28195
28138
|
end
|
|
28196
28139
|
)
|
|
28197
|
-
log(
|
|
28198
|
-
nil,
|
|
28199
|
-
" The size of the table was: " .. tostring(numElements)
|
|
28200
|
-
)
|
|
28140
|
+
log(" The size of the table was: " .. tostring(numElements))
|
|
28201
28141
|
end
|
|
28202
|
-
function ____exports.logTearFlags(
|
|
28203
|
-
____exports.logFlags(
|
|
28142
|
+
function ____exports.logTearFlags(flags)
|
|
28143
|
+
____exports.logFlags(flags, TearFlag, "tear")
|
|
28204
28144
|
end
|
|
28205
|
-
function ____exports.logUseFlags(
|
|
28206
|
-
____exports.logFlags(
|
|
28145
|
+
function ____exports.logUseFlags(flags)
|
|
28146
|
+
____exports.logFlags(flags, UseFlag, "use")
|
|
28207
28147
|
end
|
|
28208
|
-
function ____exports.logUserdata(
|
|
28148
|
+
function ____exports.logUserdata(userdata)
|
|
28209
28149
|
if not isUserdata(nil, userdata) then
|
|
28210
|
-
log(
|
|
28150
|
+
log("Userdata: [not userdata]")
|
|
28211
28151
|
return
|
|
28212
28152
|
end
|
|
28213
28153
|
local metatable = getmetatable(userdata)
|
|
28214
28154
|
if metatable == nil then
|
|
28215
|
-
log(
|
|
28155
|
+
log("Userdata: [no metatable]")
|
|
28216
28156
|
return
|
|
28217
28157
|
end
|
|
28218
28158
|
local classType = getIsaacAPIClassName(nil, userdata)
|
|
28219
28159
|
if classType == nil then
|
|
28220
|
-
log(
|
|
28160
|
+
log("Userdata: [no class type]")
|
|
28221
28161
|
else
|
|
28222
|
-
log(
|
|
28162
|
+
log("Userdata: " .. classType)
|
|
28223
28163
|
end
|
|
28224
|
-
____exports.logTable(
|
|
28164
|
+
____exports.logTable(metatable)
|
|
28225
28165
|
end
|
|
28226
|
-
function ____exports.logVector(
|
|
28166
|
+
function ____exports.logVector(vector, round)
|
|
28227
28167
|
if round == nil then
|
|
28228
28168
|
round = false
|
|
28229
28169
|
end
|
|
28230
28170
|
local vectorString = vectorToString(nil, vector, round)
|
|
28231
|
-
log(
|
|
28171
|
+
log("Vector: " .. vectorString)
|
|
28232
28172
|
end
|
|
28233
28173
|
return ____exports
|
|
28234
28174
|
end,
|
|
@@ -28280,14 +28220,14 @@ function PostNewRoomEarly.prototype.isNewRoom(self)
|
|
|
28280
28220
|
if topLeftWall == nil then
|
|
28281
28221
|
topLeftWall = spawnGridEntity(nil, GridEntityType.WALL, topLeftWallGridIndex)
|
|
28282
28222
|
if topLeftWall == nil then
|
|
28283
|
-
logError(
|
|
28223
|
+
logError("Failed to spawn a new wall (1) for the POST_NEW_ROOM_EARLY callback.")
|
|
28284
28224
|
return false
|
|
28285
28225
|
end
|
|
28286
28226
|
end
|
|
28287
28227
|
if topLeftWall2 == nil then
|
|
28288
28228
|
topLeftWall2 = spawnGridEntity(nil, GridEntityType.WALL, rightOfTopWallGridIndex)
|
|
28289
28229
|
if topLeftWall2 == nil then
|
|
28290
|
-
logError(
|
|
28230
|
+
logError("Failed to spawn a new wall (2) for the POST_NEW_ROOM_EARLY callback.")
|
|
28291
28231
|
return false
|
|
28292
28232
|
end
|
|
28293
28233
|
end
|
|
@@ -29539,6 +29479,8 @@ local game = ____cachedClasses.game
|
|
|
29539
29479
|
local ____constants = require("src.core.constants")
|
|
29540
29480
|
local MAX_TAINTED_SAMSON_BERSERK_CHARGE = ____constants.MAX_TAINTED_SAMSON_BERSERK_CHARGE
|
|
29541
29481
|
local TAINTED_SAMSON_BERSERK_CHARGE_FROM_TAKING_DAMAGE = ____constants.TAINTED_SAMSON_BERSERK_CHARGE_FROM_TAKING_DAMAGE
|
|
29482
|
+
local ____MysteriousPaperEffect = require("src.enums.MysteriousPaperEffect")
|
|
29483
|
+
local MysteriousPaperEffect = ____MysteriousPaperEffect.MysteriousPaperEffect
|
|
29542
29484
|
local ____characters = require("src.functions.characters")
|
|
29543
29485
|
local getCharacterDeathAnimationName = ____characters.getCharacterDeathAnimationName
|
|
29544
29486
|
local ____playerHealth = require("src.functions.playerHealth")
|
|
@@ -29552,6 +29494,8 @@ local getLastFrameOfAnimation = ____sprites.getLastFrameOfAnimation
|
|
|
29552
29494
|
local ____trinketGive = require("src.functions.trinketGive")
|
|
29553
29495
|
local giveTrinketsBack = ____trinketGive.giveTrinketsBack
|
|
29554
29496
|
local temporarilyRemoveTrinket = ____trinketGive.temporarilyRemoveTrinket
|
|
29497
|
+
local ____trinkets = require("src.functions.trinkets")
|
|
29498
|
+
local getMysteriousPaperEffectForFrame = ____trinkets.getMysteriousPaperEffectForFrame
|
|
29555
29499
|
function ____exports.willReviveFromHeartbreak(self, player)
|
|
29556
29500
|
if not player:HasCollectible(CollectibleType.HEARTBREAK) then
|
|
29557
29501
|
return false
|
|
@@ -29615,13 +29559,16 @@ function ____exports.isDamageToPlayerFatal(self, player, amount, source, lastDam
|
|
|
29615
29559
|
return true
|
|
29616
29560
|
end
|
|
29617
29561
|
function ____exports.willMysteriousPaperRevive(self, player)
|
|
29618
|
-
local gameFrameCount = game:GetFrameCount()
|
|
29619
29562
|
local sprite = player:GetSprite()
|
|
29620
29563
|
local character = player:GetPlayerType()
|
|
29621
29564
|
local animation = getCharacterDeathAnimationName(nil, character)
|
|
29622
29565
|
local deathAnimationFrames = getLastFrameOfAnimation(nil, sprite, animation)
|
|
29623
|
-
local frameOfDeath =
|
|
29624
|
-
|
|
29566
|
+
local frameOfDeath = player.FrameCount + deathAnimationFrames
|
|
29567
|
+
local mysteriousPaperEffect = getMysteriousPaperEffectForFrame(nil, player, frameOfDeath)
|
|
29568
|
+
if mysteriousPaperEffect == nil then
|
|
29569
|
+
return false
|
|
29570
|
+
end
|
|
29571
|
+
return mysteriousPaperEffect == MysteriousPaperEffect.MISSING_POSTER
|
|
29625
29572
|
end
|
|
29626
29573
|
function ____exports.willPlayerRevive(self, player)
|
|
29627
29574
|
local trinketSituation = temporarilyRemoveTrinket(nil, player, TrinketType.MYSTERIOUS_PAPER)
|
|
@@ -32273,16 +32220,13 @@ function CustomRevive.prototype.playerIsAboutToDie(self, player)
|
|
|
32273
32220
|
if futurePlayer:IsDead() then
|
|
32274
32221
|
return
|
|
32275
32222
|
end
|
|
32276
|
-
logError(
|
|
32223
|
+
logError("The player is still alive after initializing a custom revive. Explicitly killing the player.")
|
|
32277
32224
|
futurePlayer:Kill()
|
|
32278
32225
|
end)
|
|
32279
32226
|
end
|
|
32280
32227
|
function CustomRevive.prototype.logStateChanged(self)
|
|
32281
32228
|
if DEBUG then
|
|
32282
|
-
log(
|
|
32283
|
-
nil,
|
|
32284
|
-
((("Custom revive state changed: " .. CustomReviveState[self.v.run.state]) .. " (") .. tostring(self.v.run.state)) .. ")"
|
|
32285
|
-
)
|
|
32229
|
+
log(((("Custom revive state changed: " .. CustomReviveState[self.v.run.state]) .. " (") .. tostring(self.v.run.state)) .. ")")
|
|
32286
32230
|
end
|
|
32287
32231
|
end
|
|
32288
32232
|
return ____exports
|
|
@@ -35477,7 +35421,7 @@ function ____exports.deepCopy(self, value, serializationType, traversalDescripti
|
|
|
35477
35421
|
logString = logString .. " (deserializing)"
|
|
35478
35422
|
end
|
|
35479
35423
|
logString = logString .. ": " .. tostring(value)
|
|
35480
|
-
log(
|
|
35424
|
+
log(logString)
|
|
35481
35425
|
end
|
|
35482
35426
|
local valueType = type(value)
|
|
35483
35427
|
repeat
|
|
@@ -35595,7 +35539,7 @@ function deepCopyTable(self, luaMap, serializationType, traversalDescription, cl
|
|
|
35595
35539
|
end
|
|
35596
35540
|
function deepCopyDefaultMap(self, defaultMap, serializationType, traversalDescription, classConstructors, insideMap)
|
|
35597
35541
|
if SAVE_DATA_MANAGER_DEBUG then
|
|
35598
|
-
log(
|
|
35542
|
+
log("deepCopy is copying a DefaultMap.")
|
|
35599
35543
|
end
|
|
35600
35544
|
local ____isDefaultMap_result_0
|
|
35601
35545
|
if isDefaultMap(nil, defaultMap) then
|
|
@@ -35690,7 +35634,7 @@ function getNewDefaultMap(self, defaultMap, serializationType, traversalDescript
|
|
|
35690
35634
|
end
|
|
35691
35635
|
function deepCopyMap(self, map, serializationType, traversalDescription, classConstructors, insideMap)
|
|
35692
35636
|
if SAVE_DATA_MANAGER_DEBUG then
|
|
35693
|
-
log(
|
|
35637
|
+
log("deepCopy is copying a Map.")
|
|
35694
35638
|
end
|
|
35695
35639
|
local newMap
|
|
35696
35640
|
if serializationType == SerializationType.SERIALIZE then
|
|
@@ -35731,7 +35675,7 @@ function deepCopyMap(self, map, serializationType, traversalDescription, classCo
|
|
|
35731
35675
|
end
|
|
35732
35676
|
function deepCopySet(self, set, serializationType, traversalDescription, classConstructors, insideMap)
|
|
35733
35677
|
if SAVE_DATA_MANAGER_DEBUG then
|
|
35734
|
-
log(
|
|
35678
|
+
log("deepCopy is copying a Set.")
|
|
35735
35679
|
end
|
|
35736
35680
|
local newSet
|
|
35737
35681
|
if serializationType == SerializationType.SERIALIZE then
|
|
@@ -35769,7 +35713,7 @@ function deepCopySet(self, set, serializationType, traversalDescription, classCo
|
|
|
35769
35713
|
end
|
|
35770
35714
|
function deepCopyTSTLClass(self, tstlClass, serializationType, traversalDescription, classConstructors, insideMap)
|
|
35771
35715
|
if SAVE_DATA_MANAGER_DEBUG then
|
|
35772
|
-
log(
|
|
35716
|
+
log("deepCopy is copying a TSTL class.")
|
|
35773
35717
|
end
|
|
35774
35718
|
local newClass
|
|
35775
35719
|
repeat
|
|
@@ -35830,7 +35774,7 @@ function deepCopyTSTLClass(self, tstlClass, serializationType, traversalDescript
|
|
|
35830
35774
|
end
|
|
35831
35775
|
function deepCopyArray(self, array, serializationType, traversalDescription, classConstructors, insideMap)
|
|
35832
35776
|
if SAVE_DATA_MANAGER_DEBUG then
|
|
35833
|
-
log(
|
|
35777
|
+
log("deepCopy is copying an array.")
|
|
35834
35778
|
end
|
|
35835
35779
|
local newArray = {}
|
|
35836
35780
|
for ____, value in ipairs(array) do
|
|
@@ -35848,7 +35792,7 @@ function deepCopyArray(self, array, serializationType, traversalDescription, cla
|
|
|
35848
35792
|
end
|
|
35849
35793
|
function deepCopyNormalLuaTable(self, luaMap, serializationType, traversalDescription, classConstructors, insideMap)
|
|
35850
35794
|
if SAVE_DATA_MANAGER_DEBUG then
|
|
35851
|
-
log(
|
|
35795
|
+
log("deepCopy is copying a normal Lua table.")
|
|
35852
35796
|
end
|
|
35853
35797
|
local newTable = {}
|
|
35854
35798
|
local ____getCopiedEntries_result_5 = getCopiedEntries(
|
|
@@ -36016,7 +35960,7 @@ function ____exports.merge(self, oldObject, newTable, traversalDescription, clas
|
|
|
36016
35960
|
classConstructors = {}
|
|
36017
35961
|
end
|
|
36018
35962
|
if SAVE_DATA_MANAGER_DEBUG then
|
|
36019
|
-
log(
|
|
35963
|
+
log("merge is traversing: " .. traversalDescription)
|
|
36020
35964
|
end
|
|
36021
35965
|
if not isTable(nil, oldObject) then
|
|
36022
35966
|
error("The first argument given to the merge function is not a table.")
|
|
@@ -36054,7 +35998,7 @@ function ____exports.merge(self, oldObject, newTable, traversalDescription, clas
|
|
|
36054
35998
|
end
|
|
36055
35999
|
function mergeSerializedArray(self, oldArray, newArray, traversalDescription, classConstructors)
|
|
36056
36000
|
if SAVE_DATA_MANAGER_DEBUG then
|
|
36057
|
-
log(
|
|
36001
|
+
log("merge encountered an array: " .. traversalDescription)
|
|
36058
36002
|
end
|
|
36059
36003
|
clearTable(nil, oldArray)
|
|
36060
36004
|
iterateTableInOrder(
|
|
@@ -36075,7 +36019,7 @@ function mergeSerializedArray(self, oldArray, newArray, traversalDescription, cl
|
|
|
36075
36019
|
end
|
|
36076
36020
|
function mergeSerializedTSTLObject(self, oldObject, newTable, traversalDescription, classConstructors)
|
|
36077
36021
|
if SAVE_DATA_MANAGER_DEBUG then
|
|
36078
|
-
log(
|
|
36022
|
+
log("merge encountered a TSTL object: " .. traversalDescription)
|
|
36079
36023
|
end
|
|
36080
36024
|
oldObject:clear()
|
|
36081
36025
|
local convertStringKeysToNumbers = newTable[SerializationBrand.OBJECT_WITH_NUMBER_KEYS] ~= nil
|
|
@@ -36112,7 +36056,7 @@ function mergeSerializedTSTLObject(self, oldObject, newTable, traversalDescripti
|
|
|
36112
36056
|
end
|
|
36113
36057
|
function mergeSerializedTable(self, oldTable, newTable, traversalDescription, classConstructors)
|
|
36114
36058
|
if SAVE_DATA_MANAGER_DEBUG then
|
|
36115
|
-
log(
|
|
36059
|
+
log("merge encountered a Lua table: " .. traversalDescription)
|
|
36116
36060
|
end
|
|
36117
36061
|
iterateTableInOrder(
|
|
36118
36062
|
nil,
|
|
@@ -36120,14 +36064,14 @@ function mergeSerializedTable(self, oldTable, newTable, traversalDescription, cl
|
|
|
36120
36064
|
function(____, key, value)
|
|
36121
36065
|
if SAVE_DATA_MANAGER_DEBUG then
|
|
36122
36066
|
local valueToPrint = value == "" and "(empty string)" or tostring(value)
|
|
36123
|
-
log(
|
|
36067
|
+
log((("merge is merging: " .. traversalDescription) .. " --> ") .. valueToPrint)
|
|
36124
36068
|
end
|
|
36125
36069
|
if isSerializationBrand(nil, key) then
|
|
36126
36070
|
return
|
|
36127
36071
|
end
|
|
36128
36072
|
if isSerializedIsaacAPIClass(nil, value) then
|
|
36129
36073
|
if SAVE_DATA_MANAGER_DEBUG then
|
|
36130
|
-
log(
|
|
36074
|
+
log("merge found a serialized Isaac API class.")
|
|
36131
36075
|
end
|
|
36132
36076
|
local deserializedObject = deserializeIsaacAPIClass(nil, value)
|
|
36133
36077
|
oldTable[key] = deserializedObject
|
|
@@ -36268,7 +36212,7 @@ end
|
|
|
36268
36212
|
function ____exports.jsonDecode(self, jsonString)
|
|
36269
36213
|
local ok, luaTableOrErrMsg = pcall(tryDecode, jsonString)
|
|
36270
36214
|
if not ok then
|
|
36271
|
-
logError(
|
|
36215
|
+
logError("Failed to convert the JSON string to a Lua table: " .. jsonString)
|
|
36272
36216
|
return {}
|
|
36273
36217
|
end
|
|
36274
36218
|
return luaTableOrErrMsg
|
|
@@ -36309,6 +36253,9 @@ return ____exports
|
|
|
36309
36253
|
-- SOFTWARE.
|
|
36310
36254
|
--
|
|
36311
36255
|
|
|
36256
|
+
-- The IsaacScript version of this file contains modifications for better error messages, which
|
|
36257
|
+
-- assist when debugging.
|
|
36258
|
+
|
|
36312
36259
|
local json = { _version = "0.1.2" }
|
|
36313
36260
|
|
|
36314
36261
|
-------------------------------------------------------------------------------
|
|
@@ -36343,9 +36290,10 @@ local function encode_nil(val)
|
|
|
36343
36290
|
end
|
|
36344
36291
|
|
|
36345
36292
|
|
|
36346
|
-
local function encode_table(val, stack)
|
|
36293
|
+
local function encode_table(val, stack, traversalDescription)
|
|
36347
36294
|
local res = {}
|
|
36348
36295
|
stack = stack or {}
|
|
36296
|
+
traversalDescription = traversalDescription or ""
|
|
36349
36297
|
|
|
36350
36298
|
-- Circular reference?
|
|
36351
36299
|
if stack[val] then error("circular reference") end
|
|
@@ -36357,7 +36305,7 @@ local function encode_table(val, stack)
|
|
|
36357
36305
|
local n = 0
|
|
36358
36306
|
for k in pairs(val) do
|
|
36359
36307
|
if type(k) ~= "number" then
|
|
36360
|
-
error("invalid table: mixed or invalid key types")
|
|
36308
|
+
error("invalid table: mixed or invalid key types for array, excepted number, got: " .. tostring(type(k)))
|
|
36361
36309
|
end
|
|
36362
36310
|
n = n + 1
|
|
36363
36311
|
end
|
|
@@ -36366,7 +36314,8 @@ local function encode_table(val, stack)
|
|
|
36366
36314
|
end
|
|
36367
36315
|
-- Encode
|
|
36368
36316
|
for i, v in ipairs(val) do
|
|
36369
|
-
|
|
36317
|
+
local newTraversalDescription = traversalDescription .. tostring(i) .. " - "
|
|
36318
|
+
table.insert(res, encode(v, stack, newTraversalDescription))
|
|
36370
36319
|
end
|
|
36371
36320
|
stack[val] = nil
|
|
36372
36321
|
return "[" .. table.concat(res, ",") .. "]"
|
|
@@ -36374,10 +36323,14 @@ local function encode_table(val, stack)
|
|
|
36374
36323
|
else
|
|
36375
36324
|
-- Treat as an object
|
|
36376
36325
|
for k, v in pairs(val) do
|
|
36326
|
+
local newTraversalDescription = traversalDescription .. tostring(k) .. " - "
|
|
36377
36327
|
if type(k) ~= "string" then
|
|
36378
|
-
error(
|
|
36328
|
+
error(
|
|
36329
|
+
"invalid table: mixed or invalid key types for object \"" .. newTraversalDescription .. "\", "
|
|
36330
|
+
.. "excepted string, got: " .. tostring(type(k))
|
|
36331
|
+
)
|
|
36379
36332
|
end
|
|
36380
|
-
table.insert(res, encode(k, stack) .. ":" .. encode(v, stack))
|
|
36333
|
+
table.insert(res, encode(k, stack, newTraversalDescription) .. ":" .. encode(v, stack, newTraversalDescription))
|
|
36381
36334
|
end
|
|
36382
36335
|
stack[val] = nil
|
|
36383
36336
|
return "{" .. table.concat(res, ",") .. "}"
|
|
@@ -36408,11 +36361,11 @@ local type_func_map = {
|
|
|
36408
36361
|
}
|
|
36409
36362
|
|
|
36410
36363
|
|
|
36411
|
-
encode = function(val, stack)
|
|
36364
|
+
encode = function(val, stack, traversalDescription)
|
|
36412
36365
|
local t = type(val)
|
|
36413
36366
|
local f = type_func_map[t]
|
|
36414
36367
|
if f then
|
|
36415
|
-
return f(val, stack)
|
|
36368
|
+
return f(val, stack, traversalDescription)
|
|
36416
36369
|
end
|
|
36417
36370
|
error("unexpected type '" .. t .. "'")
|
|
36418
36371
|
end
|
|
@@ -36698,10 +36651,7 @@ function readSaveDatFile(self, mod)
|
|
|
36698
36651
|
local renderFrameCount = Isaac.GetFrameCount()
|
|
36699
36652
|
local ok, jsonStringOrErrMsg = pcall(tryLoadModData, mod)
|
|
36700
36653
|
if not ok then
|
|
36701
|
-
logError(
|
|
36702
|
-
nil,
|
|
36703
|
-
(("Failed to read from the \"save#.dat\" file on render frame " .. tostring(renderFrameCount)) .. ": ") .. jsonStringOrErrMsg
|
|
36704
|
-
)
|
|
36654
|
+
logError((("Failed to read from the \"save#.dat\" file on render frame " .. tostring(renderFrameCount)) .. ": ") .. jsonStringOrErrMsg)
|
|
36705
36655
|
return DEFAULT_MOD_DATA
|
|
36706
36656
|
end
|
|
36707
36657
|
if jsonStringOrErrMsg == nil then
|
|
@@ -36724,7 +36674,7 @@ function ____exports.loadFromDisk(self, mod, oldSaveData, classConstructors)
|
|
|
36724
36674
|
local jsonString = readSaveDatFile(nil, mod)
|
|
36725
36675
|
local newSaveData = jsonDecode(nil, jsonString)
|
|
36726
36676
|
if SAVE_DATA_MANAGER_DEBUG then
|
|
36727
|
-
log(
|
|
36677
|
+
log("Converted data from the \"save#.dat\" to a Lua table.")
|
|
36728
36678
|
end
|
|
36729
36679
|
iterateTableInOrder(
|
|
36730
36680
|
nil,
|
|
@@ -36741,7 +36691,7 @@ function ____exports.loadFromDisk(self, mod, oldSaveData, classConstructors)
|
|
|
36741
36691
|
return
|
|
36742
36692
|
end
|
|
36743
36693
|
if SAVE_DATA_MANAGER_DEBUG then
|
|
36744
|
-
log(
|
|
36694
|
+
log("Merging in stored data for feature: " .. subscriberName)
|
|
36745
36695
|
end
|
|
36746
36696
|
merge(
|
|
36747
36697
|
nil,
|
|
@@ -36753,7 +36703,7 @@ function ____exports.loadFromDisk(self, mod, oldSaveData, classConstructors)
|
|
|
36753
36703
|
end,
|
|
36754
36704
|
SAVE_DATA_MANAGER_DEBUG
|
|
36755
36705
|
)
|
|
36756
|
-
log(
|
|
36706
|
+
log("The save data manager loaded data from the \"save#.dat\" file.")
|
|
36757
36707
|
end
|
|
36758
36708
|
return ____exports
|
|
36759
36709
|
end,
|
|
@@ -36803,12 +36753,12 @@ function ____exports.restoreDefaultForFeatureKey(self, saveDataDefaultsMap, subs
|
|
|
36803
36753
|
end
|
|
36804
36754
|
local saveDataDefaults = saveDataDefaultsMap[subscriberName]
|
|
36805
36755
|
if saveDataDefaults == nil then
|
|
36806
|
-
logError(
|
|
36756
|
+
logError("Failed to find the default copy of the save data for subscriber: " .. subscriberName)
|
|
36807
36757
|
return
|
|
36808
36758
|
end
|
|
36809
36759
|
local childTableDefaults = saveDataDefaults[saveDataKey]
|
|
36810
36760
|
if childTableDefaults == nil then
|
|
36811
|
-
logError(
|
|
36761
|
+
logError(((("Failed to find the default copy of the child table \"" .. saveDataKey) .. "\" for subscriber \"") .. subscriberName) .. "\". This error usually means that your save data is out of date. You can try purging all of your save data by deleting the following directory: C:\\Program Files (x86)\\Steam\\steamapps\\common\\The Binding of Isaac Rebirth\\data")
|
|
36812
36762
|
return
|
|
36813
36763
|
end
|
|
36814
36764
|
local childTableDefaultsCopy = deepCopy(nil, childTableDefaults, SerializationType.NONE, (subscriberName .. " --> ") .. saveDataKey)
|
|
@@ -36872,7 +36822,7 @@ function ____exports.saveToDisk(self, mod, saveDataMap, saveDataConditionalFuncM
|
|
|
36872
36822
|
local allSaveData = getAllSaveDataToWriteToDisk(nil, saveDataMap, saveDataConditionalFuncMap)
|
|
36873
36823
|
local jsonString = jsonEncode(nil, allSaveData)
|
|
36874
36824
|
mod:SaveData(jsonString)
|
|
36875
|
-
log(
|
|
36825
|
+
log("The save data manager wrote data to the \"save#.dat\" file.")
|
|
36876
36826
|
end
|
|
36877
36827
|
return ____exports
|
|
36878
36828
|
end,
|
|
@@ -39598,10 +39548,7 @@ function CustomTrapdoors.prototype.shouldTrapdoorSpawnOpen(self, gridEntity, fir
|
|
|
39598
39548
|
end
|
|
39599
39549
|
function CustomTrapdoors.prototype.logStateChanged(self)
|
|
39600
39550
|
if DEBUG then
|
|
39601
|
-
log(
|
|
39602
|
-
nil,
|
|
39603
|
-
((("Custom trapdoors state changed: " .. StageTravelState[self.v.run.state]) .. " (") .. tostring(self.v.run.state)) .. ")"
|
|
39604
|
-
)
|
|
39551
|
+
log(((("Custom trapdoors state changed: " .. StageTravelState[self.v.run.state]) .. " (") .. tostring(self.v.run.state)) .. ")")
|
|
39605
39552
|
end
|
|
39606
39553
|
end
|
|
39607
39554
|
function CustomTrapdoors.prototype.registerCustomTrapdoorDestination(self, destinationName, destinationFunc)
|
|
@@ -40345,17 +40292,11 @@ function ____exports.getRandomCustomStageRoom(self, roomsMetadata, seedOrRNG, ve
|
|
|
40345
40292
|
end
|
|
40346
40293
|
local totalWeight = getTotalWeightOfCustomStageRooms(nil, roomsMetadata)
|
|
40347
40294
|
if verbose then
|
|
40348
|
-
log(
|
|
40349
|
-
nil,
|
|
40350
|
-
"Total weight of the custom stage rooms provided: " .. tostring(totalWeight)
|
|
40351
|
-
)
|
|
40295
|
+
log("Total weight of the custom stage rooms provided: " .. tostring(totalWeight))
|
|
40352
40296
|
end
|
|
40353
40297
|
local chosenWeight = getRandomFloat(nil, 0, totalWeight, seedOrRNG)
|
|
40354
40298
|
if verbose then
|
|
40355
|
-
log(
|
|
40356
|
-
nil,
|
|
40357
|
-
"Randomly chose weight for custom stage room: " .. tostring(chosenWeight)
|
|
40358
|
-
)
|
|
40299
|
+
log("Randomly chose weight for custom stage room: " .. tostring(chosenWeight))
|
|
40359
40300
|
end
|
|
40360
40301
|
return getCustomStageRoomWithChosenWeight(nil, roomsMetadata, chosenWeight)
|
|
40361
40302
|
end
|
|
@@ -40368,17 +40309,11 @@ function ____exports.getRandomBossRoomFromPool(self, roomsMetadata, bossPool, se
|
|
|
40368
40309
|
end
|
|
40369
40310
|
local totalWeight = getTotalWeightOfBossPool(nil, bossPool)
|
|
40370
40311
|
if verbose then
|
|
40371
|
-
log(
|
|
40372
|
-
nil,
|
|
40373
|
-
"Total weight of the custom stage boss pool provided: " .. tostring(totalWeight)
|
|
40374
|
-
)
|
|
40312
|
+
log("Total weight of the custom stage boss pool provided: " .. tostring(totalWeight))
|
|
40375
40313
|
end
|
|
40376
40314
|
local chosenWeight = getRandomFloat(nil, 0, totalWeight, seedOrRNG)
|
|
40377
40315
|
if verbose then
|
|
40378
|
-
log(
|
|
40379
|
-
nil,
|
|
40380
|
-
"Randomly chose weight for custom stage boss pool: " .. tostring(chosenWeight)
|
|
40381
|
-
)
|
|
40316
|
+
log("Randomly chose weight for custom stage boss pool: " .. tostring(chosenWeight))
|
|
40382
40317
|
end
|
|
40383
40318
|
local bossEntry = getBossEntryWithChosenWeight(nil, bossPool, chosenWeight)
|
|
40384
40319
|
local roomsMetadataForBoss = __TS__ArrayFilter(
|
|
@@ -41847,7 +41782,7 @@ function Pause.prototype.isPaused(self)
|
|
|
41847
41782
|
end
|
|
41848
41783
|
function Pause.prototype.pause(self)
|
|
41849
41784
|
if self.v.run.isPseudoPaused then
|
|
41850
|
-
logError(
|
|
41785
|
+
logError("Failed to pseudo-pause the game, since it was already pseudo-paused.")
|
|
41851
41786
|
return
|
|
41852
41787
|
end
|
|
41853
41788
|
self.v.run.isPseudoPaused = true
|
|
@@ -41886,7 +41821,7 @@ function Pause.prototype.pause(self)
|
|
|
41886
41821
|
end
|
|
41887
41822
|
function Pause.prototype.unpause(self)
|
|
41888
41823
|
if not self.v.run.isPseudoPaused then
|
|
41889
|
-
logError(
|
|
41824
|
+
logError("Failed to pseudo-unpause the game, since it was not already pseudo-paused.")
|
|
41890
41825
|
return
|
|
41891
41826
|
end
|
|
41892
41827
|
self.v.run.isPseudoPaused = false
|
|
@@ -42417,20 +42352,14 @@ function CustomStages.prototype.setStageRoomsData(self, customStage, rng, verbos
|
|
|
42417
42352
|
local roomShapeMap = customStage.roomTypeMap:get(roomType)
|
|
42418
42353
|
if roomShapeMap == nil then
|
|
42419
42354
|
if roomType == RoomType.DEFAULT then
|
|
42420
|
-
logError(
|
|
42421
|
-
nil,
|
|
42422
|
-
(((("Failed to find any custom rooms for RoomType." .. RoomType[roomType]) .. " (") .. tostring(roomType)) .. ") for custom stage: ") .. customStage.name
|
|
42423
|
-
)
|
|
42355
|
+
logError((((("Failed to find any custom rooms for RoomType." .. RoomType[roomType]) .. " (") .. tostring(roomType)) .. ") for custom stage: ") .. customStage.name)
|
|
42424
42356
|
end
|
|
42425
42357
|
goto __continue27
|
|
42426
42358
|
end
|
|
42427
42359
|
local roomShape = room.Data.Shape
|
|
42428
42360
|
local roomDoorSlotFlagMap = roomShapeMap:get(roomShape)
|
|
42429
42361
|
if roomDoorSlotFlagMap == nil then
|
|
42430
|
-
logError(
|
|
42431
|
-
nil,
|
|
42432
|
-
(((((((("Failed to find any custom rooms for RoomType." .. RoomType[roomType]) .. " (") .. tostring(roomType)) .. ") + RoomShape.") .. RoomShape[roomShape]) .. " (") .. tostring(roomShape)) .. ") for custom stage: ") .. customStage.name
|
|
42433
|
-
)
|
|
42362
|
+
logError((((((((("Failed to find any custom rooms for RoomType." .. RoomType[roomType]) .. " (") .. tostring(roomType)) .. ") + RoomShape.") .. RoomShape[roomShape]) .. " (") .. tostring(roomShape)) .. ") for custom stage: ") .. customStage.name)
|
|
42434
42363
|
goto __continue27
|
|
42435
42364
|
end
|
|
42436
42365
|
local doorSlotFlags = room.Data.Doors
|
|
@@ -42440,10 +42369,7 @@ function CustomStages.prototype.setStageRoomsData(self, customStage, rng, verbos
|
|
|
42440
42369
|
local allDoorSlotFlags = doorSlotsToDoorSlotFlags(nil, allDoorSlots)
|
|
42441
42370
|
roomsMetadata = roomDoorSlotFlagMap:get(allDoorSlotFlags)
|
|
42442
42371
|
if roomsMetadata == nil then
|
|
42443
|
-
logError(
|
|
42444
|
-
nil,
|
|
42445
|
-
(((((((("Failed to find any custom rooms for RoomType." .. RoomType[roomType]) .. " (") .. tostring(roomType)) .. ") + RoomShape.") .. RoomShape[roomShape]) .. " (") .. tostring(roomShape)) .. ") + all doors enabled for custom stage: ") .. customStage.name
|
|
42446
|
-
)
|
|
42372
|
+
logError((((((((("Failed to find any custom rooms for RoomType." .. RoomType[roomType]) .. " (") .. tostring(roomType)) .. ") + RoomShape.") .. RoomShape[roomShape]) .. " (") .. tostring(roomShape)) .. ") + all doors enabled for custom stage: ") .. customStage.name)
|
|
42447
42373
|
goto __continue27
|
|
42448
42374
|
end
|
|
42449
42375
|
end
|
|
@@ -42466,10 +42392,7 @@ function CustomStages.prototype.setStageRoomsData(self, customStage, rng, verbos
|
|
|
42466
42392
|
if newRoomData == nil then
|
|
42467
42393
|
newRoomData = getRoomDataForTypeVariant(nil, roomType, randomRoom.variant, false)
|
|
42468
42394
|
if newRoomData == nil then
|
|
42469
|
-
logError(
|
|
42470
|
-
nil,
|
|
42471
|
-
(("Failed to get the room data for room variant " .. tostring(randomRoom.variant)) .. " for custom stage: ") .. customStage.name
|
|
42472
|
-
)
|
|
42395
|
+
logError((("Failed to get the room data for room variant " .. tostring(randomRoom.variant)) .. " for custom stage: ") .. customStage.name)
|
|
42473
42396
|
goto __continue27
|
|
42474
42397
|
end
|
|
42475
42398
|
self.customStageCachedRoomData:set(randomRoom.variant, newRoomData)
|
|
@@ -43779,17 +43702,11 @@ function ____exports.getRandomJSONEntity(self, jsonEntities, seedOrRNG, verbose)
|
|
|
43779
43702
|
end
|
|
43780
43703
|
local totalWeight = getTotalWeightOfJSONObject(nil, jsonEntities)
|
|
43781
43704
|
if verbose then
|
|
43782
|
-
log(
|
|
43783
|
-
nil,
|
|
43784
|
-
"Total weight of the JSON entities provided: " .. tostring(totalWeight)
|
|
43785
|
-
)
|
|
43705
|
+
log("Total weight of the JSON entities provided: " .. tostring(totalWeight))
|
|
43786
43706
|
end
|
|
43787
43707
|
local chosenWeight = getRandomFloat(nil, 0, totalWeight, seedOrRNG)
|
|
43788
43708
|
if verbose then
|
|
43789
|
-
log(
|
|
43790
|
-
nil,
|
|
43791
|
-
"Randomly chose weight for JSON entity: " .. tostring(chosenWeight)
|
|
43792
|
-
)
|
|
43709
|
+
log("Randomly chose weight for JSON entity: " .. tostring(chosenWeight))
|
|
43793
43710
|
end
|
|
43794
43711
|
local randomJSONEntity = getJSONObjectWithChosenWeight(nil, jsonEntities, chosenWeight)
|
|
43795
43712
|
if randomJSONEntity == nil then
|
|
@@ -43806,17 +43723,11 @@ function ____exports.getRandomJSONRoom(self, jsonRooms, seedOrRNG, verbose)
|
|
|
43806
43723
|
end
|
|
43807
43724
|
local totalWeight = getTotalWeightOfJSONObject(nil, jsonRooms)
|
|
43808
43725
|
if verbose then
|
|
43809
|
-
log(
|
|
43810
|
-
nil,
|
|
43811
|
-
"Total weight of the JSON rooms provided: " .. tostring(totalWeight)
|
|
43812
|
-
)
|
|
43726
|
+
log("Total weight of the JSON rooms provided: " .. tostring(totalWeight))
|
|
43813
43727
|
end
|
|
43814
43728
|
local chosenWeight = getRandomFloat(nil, 0, totalWeight, seedOrRNG)
|
|
43815
43729
|
if verbose then
|
|
43816
|
-
log(
|
|
43817
|
-
nil,
|
|
43818
|
-
"Randomly chose weight for JSON room: " .. tostring(chosenWeight)
|
|
43819
|
-
)
|
|
43730
|
+
log("Randomly chose weight for JSON room: " .. tostring(chosenWeight))
|
|
43820
43731
|
end
|
|
43821
43732
|
local randomJSONRoom = getJSONObjectWithChosenWeight(nil, jsonRooms, chosenWeight)
|
|
43822
43733
|
if randomJSONRoom == nil then
|
|
@@ -44493,10 +44404,7 @@ function DeployJSONRoom.prototype.spawnAllEntities(self, jsonRoom, rng, verbose)
|
|
|
44493
44404
|
if isGridEntity then
|
|
44494
44405
|
local gridEntityXMLType = entityTypeNumber
|
|
44495
44406
|
if verbose then
|
|
44496
|
-
log(
|
|
44497
|
-
nil,
|
|
44498
|
-
((((((("Spawning grid entity " .. tostring(gridEntityXMLType)) .. ".") .. tostring(variant)) .. " at: (") .. tostring(x)) .. ", ") .. tostring(y)) .. ")"
|
|
44499
|
-
)
|
|
44407
|
+
log(((((((("Spawning grid entity " .. tostring(gridEntityXMLType)) .. ".") .. tostring(variant)) .. " at: (") .. tostring(x)) .. ", ") .. tostring(y)) .. ")")
|
|
44500
44408
|
end
|
|
44501
44409
|
spawnGridEntityForJSONRoom(
|
|
44502
44410
|
nil,
|
|
@@ -44509,10 +44417,7 @@ function DeployJSONRoom.prototype.spawnAllEntities(self, jsonRoom, rng, verbose)
|
|
|
44509
44417
|
local entityType = entityTypeNumber
|
|
44510
44418
|
if verbose then
|
|
44511
44419
|
local entityID = getEntityIDFromConstituents(nil, entityType, variant, subType)
|
|
44512
|
-
log(
|
|
44513
|
-
nil,
|
|
44514
|
-
((((("Spawning normal entity " .. entityID) .. " at: (") .. tostring(x)) .. ", ") .. tostring(y)) .. ")"
|
|
44515
|
-
)
|
|
44420
|
+
log(((((("Spawning normal entity " .. entityID) .. " at: (") .. tostring(x)) .. ", ") .. tostring(y)) .. ")")
|
|
44516
44421
|
end
|
|
44517
44422
|
local entity = self:spawnNormalEntityForJSONRoom(
|
|
44518
44423
|
entityType,
|
|
@@ -44530,11 +44435,11 @@ function DeployJSONRoom.prototype.spawnAllEntities(self, jsonRoom, rng, verbose)
|
|
|
44530
44435
|
end
|
|
44531
44436
|
if shouldUnclearRoom then
|
|
44532
44437
|
if verbose then
|
|
44533
|
-
log(
|
|
44438
|
+
log("Setting the room to be uncleared since there were one or more battle NPCs spawned.")
|
|
44534
44439
|
end
|
|
44535
44440
|
setRoomUncleared(nil)
|
|
44536
44441
|
elseif verbose then
|
|
44537
|
-
log(
|
|
44442
|
+
log("Leaving the room cleared since there were no battle NPCs spawned.")
|
|
44538
44443
|
end
|
|
44539
44444
|
end
|
|
44540
44445
|
function DeployJSONRoom.prototype.spawnNormalEntityForJSONRoom(self, entityType, variant, subType, x, y, rng)
|
|
@@ -44576,19 +44481,19 @@ function DeployJSONRoom.prototype.deployJSONRoom(self, jsonRoom, seedOrRNG, verb
|
|
|
44576
44481
|
end
|
|
44577
44482
|
local rng = isRNG(nil, seedOrRNG) and seedOrRNG or newRNG(nil, seedOrRNG)
|
|
44578
44483
|
if verbose then
|
|
44579
|
-
log(
|
|
44484
|
+
log("Starting to empty the room of entities and grid entities.")
|
|
44580
44485
|
end
|
|
44581
44486
|
emptyRoom(nil)
|
|
44582
44487
|
if verbose then
|
|
44583
|
-
log(
|
|
44488
|
+
log("Finished emptying the room of entities and grid entities.")
|
|
44584
44489
|
end
|
|
44585
44490
|
setRoomCleared(nil)
|
|
44586
44491
|
if verbose then
|
|
44587
|
-
log(
|
|
44492
|
+
log("Starting to spawn all of the new entities and grid entities.")
|
|
44588
44493
|
end
|
|
44589
44494
|
self:spawnAllEntities(jsonRoom, rng, verbose)
|
|
44590
44495
|
if verbose then
|
|
44591
|
-
log(
|
|
44496
|
+
log("Finished spawning all of the new entities and grid entities.")
|
|
44592
44497
|
end
|
|
44593
44498
|
fixPitGraphics(nil)
|
|
44594
44499
|
self.preventGridEntityRespawn:preventGridEntityRespawn()
|
|
@@ -44954,7 +44859,7 @@ function ____exports.runDeepCopyTests(self)
|
|
|
44954
44859
|
copiedSerializedDefaultMapHasStringKey(nil)
|
|
44955
44860
|
copiedSerializedDefaultMapHasNumberKey(nil)
|
|
44956
44861
|
local successText = "All deep copy tests passed!"
|
|
44957
|
-
log(
|
|
44862
|
+
log(successText)
|
|
44958
44863
|
print(successText)
|
|
44959
44864
|
end
|
|
44960
44865
|
return ____exports
|
|
@@ -46364,11 +46269,11 @@ local getGridEntities = ____gridEntities.getGridEntities
|
|
|
46364
46269
|
local getGridEntityID = ____gridEntities.getGridEntityID
|
|
46365
46270
|
local ____log = require("src.functions.log")
|
|
46366
46271
|
local log = ____log.log
|
|
46367
|
-
function ____exports.logEntity(
|
|
46368
|
-
local msg = getEntityLogLine(
|
|
46369
|
-
log(
|
|
46272
|
+
function ____exports.logEntity(entity)
|
|
46273
|
+
local msg = getEntityLogLine(entity)
|
|
46274
|
+
log(msg)
|
|
46370
46275
|
end
|
|
46371
|
-
function getEntityLogLine(
|
|
46276
|
+
function getEntityLogLine(entity, num)
|
|
46372
46277
|
local msg = num == nil and "" or tostring(num) .. ") "
|
|
46373
46278
|
msg = msg .. getEntityID(nil, entity)
|
|
46374
46279
|
local bomb = entity:ToBomb()
|
|
@@ -46427,11 +46332,11 @@ function getEntityLogLine(self, entity, num)
|
|
|
46427
46332
|
end
|
|
46428
46333
|
return msg
|
|
46429
46334
|
end
|
|
46430
|
-
function ____exports.logGridEntity(
|
|
46431
|
-
local msg = getGridEntityLogLine(
|
|
46432
|
-
log(
|
|
46335
|
+
function ____exports.logGridEntity(gridEntity)
|
|
46336
|
+
local msg = getGridEntityLogLine(gridEntity)
|
|
46337
|
+
log(msg)
|
|
46433
46338
|
end
|
|
46434
|
-
function getGridEntityLogLine(
|
|
46339
|
+
function getGridEntityLogLine(gridEntity, num)
|
|
46435
46340
|
local gridEntityDesc = gridEntity:GetSaveState()
|
|
46436
46341
|
local msg = num == nil and "" or tostring(num) .. ") "
|
|
46437
46342
|
msg = msg .. getGridEntityID(nil, gridEntity)
|
|
@@ -46487,7 +46392,7 @@ local IGNORE_EFFECT_VARIANTS = __TS__New(Set, {
|
|
|
46487
46392
|
EffectVariant.LIGHT,
|
|
46488
46393
|
EffectVariant.TADPOLE
|
|
46489
46394
|
})
|
|
46490
|
-
function ____exports.logAllEntities(
|
|
46395
|
+
function ____exports.logAllEntities(includeBackgroundEffects, entityTypeFilter)
|
|
46491
46396
|
local msg = "Entities in the room"
|
|
46492
46397
|
if entityTypeFilter ~= nil then
|
|
46493
46398
|
msg = msg .. (" (filtered to entity type " .. tostring(entityTypeFilter)) .. ")"
|
|
@@ -46507,7 +46412,7 @@ function ____exports.logAllEntities(self, includeBackgroundEffects, entityTypeFi
|
|
|
46507
46412
|
if not includeBackgroundEffects and effect ~= nil and IGNORE_EFFECT_VARIANTS:has(effect.Variant) then
|
|
46508
46413
|
return
|
|
46509
46414
|
end
|
|
46510
|
-
msg = msg .. getEntityLogLine(
|
|
46415
|
+
msg = msg .. getEntityLogLine(entity, i + 1)
|
|
46511
46416
|
numMatchedEntities = numMatchedEntities + 1
|
|
46512
46417
|
end
|
|
46513
46418
|
)
|
|
@@ -46520,10 +46425,10 @@ function ____exports.logAllEntities(self, includeBackgroundEffects, entityTypeFi
|
|
|
46520
46425
|
__TS__StringTrim(msg),
|
|
46521
46426
|
"\n"
|
|
46522
46427
|
)) do
|
|
46523
|
-
log(
|
|
46428
|
+
log(line)
|
|
46524
46429
|
end
|
|
46525
46430
|
end
|
|
46526
|
-
function ____exports.logAllGridEntities(
|
|
46431
|
+
function ____exports.logAllGridEntities(includeWalls, gridEntityTypeFilter)
|
|
46527
46432
|
if includeWalls == nil then
|
|
46528
46433
|
includeWalls = false
|
|
46529
46434
|
end
|
|
@@ -46547,7 +46452,7 @@ function ____exports.logAllGridEntities(self, includeWalls, gridEntityTypeFilter
|
|
|
46547
46452
|
if not includeWalls and gridEntityType == GridEntityType.WALL and gridEntityTypeFilter ~= GridEntityType.WALL then
|
|
46548
46453
|
return
|
|
46549
46454
|
end
|
|
46550
|
-
msg = msg .. getGridEntityLogLine(
|
|
46455
|
+
msg = msg .. getGridEntityLogLine(gridEntity, gridEntityIndex)
|
|
46551
46456
|
numMatchedEntities = numMatchedEntities + 1
|
|
46552
46457
|
end
|
|
46553
46458
|
)
|
|
@@ -46560,34 +46465,31 @@ function ____exports.logAllGridEntities(self, includeWalls, gridEntityTypeFilter
|
|
|
46560
46465
|
__TS__StringTrim(msg),
|
|
46561
46466
|
"\n"
|
|
46562
46467
|
)) do
|
|
46563
|
-
log(
|
|
46468
|
+
log(line)
|
|
46564
46469
|
end
|
|
46565
46470
|
end
|
|
46566
|
-
function ____exports.logEntities(
|
|
46471
|
+
function ____exports.logEntities(entities)
|
|
46567
46472
|
for ____, entity in ipairs(entities) do
|
|
46568
|
-
____exports.logEntity(
|
|
46473
|
+
____exports.logEntity(entity)
|
|
46569
46474
|
end
|
|
46570
46475
|
end
|
|
46571
|
-
function ____exports.logGridEntities(
|
|
46476
|
+
function ____exports.logGridEntities(gridEntities)
|
|
46572
46477
|
for ____, gridEntity in ipairs(gridEntities) do
|
|
46573
|
-
____exports.logGridEntity(
|
|
46478
|
+
____exports.logGridEntity(gridEntity)
|
|
46574
46479
|
end
|
|
46575
46480
|
end
|
|
46576
|
-
function ____exports.logPtrHash(
|
|
46577
|
-
log(
|
|
46578
|
-
nil,
|
|
46579
|
-
"PtrHash: " .. tostring(ptrHash)
|
|
46580
|
-
)
|
|
46481
|
+
function ____exports.logPtrHash(ptrHash)
|
|
46482
|
+
log("PtrHash: " .. tostring(ptrHash))
|
|
46581
46483
|
local entity = getEntityFromPtrHash(nil, ptrHash)
|
|
46582
46484
|
if entity == nil then
|
|
46583
|
-
log(
|
|
46485
|
+
log("No corresponding entity found.")
|
|
46584
46486
|
else
|
|
46585
|
-
____exports.logEntity(
|
|
46487
|
+
____exports.logEntity(entity)
|
|
46586
46488
|
end
|
|
46587
46489
|
end
|
|
46588
|
-
function ____exports.logPtrHashes(
|
|
46490
|
+
function ____exports.logPtrHashes(ptrHashes)
|
|
46589
46491
|
for ____, ptrHash in ipairs(ptrHashes) do
|
|
46590
|
-
____exports.logPtrHash(
|
|
46492
|
+
____exports.logPtrHash(ptrHash)
|
|
46591
46493
|
end
|
|
46592
46494
|
end
|
|
46593
46495
|
return ____exports
|
|
@@ -46664,7 +46566,7 @@ function ____exports.listEntities(self, params, includeBackgroundEffects)
|
|
|
46664
46566
|
return
|
|
46665
46567
|
end
|
|
46666
46568
|
end
|
|
46667
|
-
logAllEntities(
|
|
46569
|
+
logAllEntities(includeBackgroundEffects, entityTypeFilter)
|
|
46668
46570
|
print("Logged the entities in the room to the \"log.txt\" file.")
|
|
46669
46571
|
end
|
|
46670
46572
|
function ____exports.listGridEntities(self, params, includeWalls)
|
|
@@ -46676,7 +46578,7 @@ function ____exports.listGridEntities(self, params, includeWalls)
|
|
|
46676
46578
|
return
|
|
46677
46579
|
end
|
|
46678
46580
|
end
|
|
46679
|
-
logAllGridEntities(
|
|
46581
|
+
logAllGridEntities(includeWalls, gridEntityTypeFilter)
|
|
46680
46582
|
print("Logged the grid entities in the room to the \"log.txt\" file.")
|
|
46681
46583
|
end
|
|
46682
46584
|
function ____exports.movePlayer(self, params, direction)
|
|
@@ -47239,7 +47141,7 @@ function ____exports.dungeon(self)
|
|
|
47239
47141
|
end
|
|
47240
47142
|
function ____exports.effects(self)
|
|
47241
47143
|
local player = Isaac.GetPlayer()
|
|
47242
|
-
logPlayerEffects(
|
|
47144
|
+
logPlayerEffects(player)
|
|
47243
47145
|
print("Logged the player's effects to the \"log.txt\" file.")
|
|
47244
47146
|
end
|
|
47245
47147
|
function ____exports.errorRoom(self)
|
|
@@ -47525,7 +47427,7 @@ function ____exports.right(self, params)
|
|
|
47525
47427
|
movePlayer(nil, params, Direction.RIGHT)
|
|
47526
47428
|
end
|
|
47527
47429
|
function ____exports.room(self)
|
|
47528
|
-
logRoom(
|
|
47430
|
+
logRoom()
|
|
47529
47431
|
print("Logged room information to the \"log.txt\" file.")
|
|
47530
47432
|
end
|
|
47531
47433
|
function ____exports.rottenHearts(self, params)
|
|
@@ -47576,7 +47478,7 @@ function ____exports.seedStick(self)
|
|
|
47576
47478
|
Isaac.ExecuteCommand("seed " .. startSeedString)
|
|
47577
47479
|
end
|
|
47578
47480
|
function ____exports.seeds(self)
|
|
47579
|
-
logSeedEffects(
|
|
47481
|
+
logSeedEffects()
|
|
47580
47482
|
print("Logged the seed effects to the \"log.txt\" file.")
|
|
47581
47483
|
end
|
|
47582
47484
|
function ____exports.setCharges(self, params)
|
|
@@ -47665,7 +47567,7 @@ function ____exports.soulHearts(self, params)
|
|
|
47665
47567
|
addHeart(nil, params, HealthType.SOUL)
|
|
47666
47568
|
end
|
|
47667
47569
|
function ____exports.sounds(self)
|
|
47668
|
-
logSounds(
|
|
47570
|
+
logSounds()
|
|
47669
47571
|
print("Logged the currently playing sound effects to the \"log.txt\" file.")
|
|
47670
47572
|
end
|
|
47671
47573
|
function ____exports.spam(self)
|
|
@@ -49315,7 +49217,7 @@ function TaintedLazarusPlayers.prototype.checkDequeue(self)
|
|
|
49315
49217
|
local taintedLazarusPtrHash = GetPtrHash(taintedLazarus)
|
|
49316
49218
|
local deadTaintedLazarusPtrHash = GetPtrHash(deadTaintedLazarus)
|
|
49317
49219
|
if taintedLazarusPtrHash == deadTaintedLazarusPtrHash then
|
|
49318
|
-
logError(
|
|
49220
|
+
logError("Failed to cache the Tainted Lazarus player objects, since the hash for Tainted Lazarus and Dead Tainted Lazarus were the same.")
|
|
49319
49221
|
return
|
|
49320
49222
|
end
|
|
49321
49223
|
self.v.run.subPlayerMap:set(taintedLazarusPtrHash, deadTaintedLazarus)
|
|
@@ -49596,7 +49498,7 @@ function ____exports.getTime(self, useSocketIfAvailable)
|
|
|
49596
49498
|
end
|
|
49597
49499
|
return Isaac.GetTime()
|
|
49598
49500
|
end
|
|
49599
|
-
function ____exports.getTraceback(
|
|
49501
|
+
function ____exports.getTraceback()
|
|
49600
49502
|
if SandboxGetTraceback ~= nil then
|
|
49601
49503
|
return SandboxGetTraceback()
|
|
49602
49504
|
end
|
|
@@ -49605,9 +49507,9 @@ function ____exports.getTraceback(self)
|
|
|
49605
49507
|
end
|
|
49606
49508
|
return "stack traceback:\n(the \"--luadebug\" flag is not enabled)"
|
|
49607
49509
|
end
|
|
49608
|
-
function ____exports.traceback(
|
|
49609
|
-
local tracebackOutput = ____exports.getTraceback(
|
|
49610
|
-
log(
|
|
49510
|
+
function ____exports.traceback()
|
|
49511
|
+
local tracebackOutput = ____exports.getTraceback()
|
|
49512
|
+
log(tracebackOutput)
|
|
49611
49513
|
end
|
|
49612
49514
|
return ____exports
|
|
49613
49515
|
end,
|
|
@@ -49686,7 +49588,7 @@ function ModUpgradedBase.prototype.AddPriorityCallback(self, modCallback, priori
|
|
|
49686
49588
|
if self.debug then
|
|
49687
49589
|
local callback = args[1]
|
|
49688
49590
|
local optionalArg = args[2]
|
|
49689
|
-
local parentFunctionDescription = getParentFunctionDescription(
|
|
49591
|
+
local parentFunctionDescription = getParentFunctionDescription()
|
|
49690
49592
|
local customCallback = type(modCallback) == "string"
|
|
49691
49593
|
local callbackName = customCallback and tostring(modCallback) .. " (custom callback)" or "ModCallback." .. ModCallback[modCallback]
|
|
49692
49594
|
local signature = parentFunctionDescription == nil and callbackName or (parentFunctionDescription .. " - ") .. callbackName
|
|
@@ -49754,10 +49656,7 @@ function ModUpgradedBase.prototype.logUsedFeatures(self)
|
|
|
49754
49656
|
if modCallbackCustom == nil then
|
|
49755
49657
|
error("Failed to convert an index on the callbacks object to a number.")
|
|
49756
49658
|
end
|
|
49757
|
-
log(
|
|
49758
|
-
nil,
|
|
49759
|
-
((("- ModCallbackCustom." .. tostring(ModCallbackCustom[modCallbackCustom])) .. " (") .. tostring(modCallbackCustom)) .. ")"
|
|
49760
|
-
)
|
|
49659
|
+
log(((("- ModCallbackCustom." .. tostring(ModCallbackCustom[modCallbackCustom])) .. " (") .. tostring(modCallbackCustom)) .. ")")
|
|
49761
49660
|
end
|
|
49762
49661
|
::__continue18::
|
|
49763
49662
|
end
|
|
@@ -49772,10 +49671,7 @@ function ModUpgradedBase.prototype.logUsedFeatures(self)
|
|
|
49772
49671
|
if iscFeature == nil then
|
|
49773
49672
|
error("Failed to convert an index on the features object to a number.")
|
|
49774
49673
|
end
|
|
49775
|
-
log(
|
|
49776
|
-
nil,
|
|
49777
|
-
((("- ISCFeature." .. tostring(ISCFeature[iscFeature])) .. " (") .. tostring(iscFeature)) .. ")"
|
|
49778
|
-
)
|
|
49674
|
+
log(((("- ISCFeature." .. tostring(ISCFeature[iscFeature])) .. " (") .. tostring(iscFeature)) .. ")")
|
|
49779
49675
|
end
|
|
49780
49676
|
::__continue22::
|
|
49781
49677
|
end
|
|
@@ -50022,15 +49918,11 @@ function removeCallback(self, modFeatureConstructor, mod, modCallback, vanilla)
|
|
|
50022
49918
|
end
|
|
50023
49919
|
end
|
|
50024
49920
|
function initSaveDataManager(self, modFeature, tstlClassName, init)
|
|
50025
|
-
if tstlClassName == "AtePoopBaby" then
|
|
50026
|
-
Isaac.DebugString("GETTING HERE 1")
|
|
50027
|
-
end
|
|
50028
49921
|
local ____modFeature_0 = modFeature
|
|
50029
49922
|
local v = ____modFeature_0.v
|
|
50030
49923
|
if v == nil then
|
|
50031
49924
|
return
|
|
50032
49925
|
end
|
|
50033
|
-
Isaac.DebugString("GETTING HERE 2")
|
|
50034
49926
|
if not isTable(nil, v) then
|
|
50035
49927
|
error("Failed to initialize a mod feature class due to having a \"v\" property that is not an object. (The \"v\" property is supposed to be an object that holds the variables for the class, managed by the save data manager.)")
|
|
50036
49928
|
end
|
|
@@ -50123,7 +50015,7 @@ function errorWithTraceback(message, level)
|
|
|
50123
50015
|
if level == nil then
|
|
50124
50016
|
level = 1
|
|
50125
50017
|
end
|
|
50126
|
-
local tracebackOutput = getTraceback(
|
|
50018
|
+
local tracebackOutput = getTraceback()
|
|
50127
50019
|
local slimmedTracebackOutput = slimTracebackOutput(nil, tracebackOutput)
|
|
50128
50020
|
message = message .. "\n"
|
|
50129
50021
|
message = message .. slimmedTracebackOutput
|
|
@@ -50306,10 +50198,7 @@ local ____log = require("src.functions.log")
|
|
|
50306
50198
|
local log = ____log.log
|
|
50307
50199
|
function ____exports.benchmark(self, numTrials, ...)
|
|
50308
50200
|
local functions = {...}
|
|
50309
|
-
log(
|
|
50310
|
-
nil,
|
|
50311
|
-
((("Benchmarking " .. tostring(#functions)) .. " function(s) with ") .. tostring(numTrials)) .. " trials."
|
|
50312
|
-
)
|
|
50201
|
+
log(((("Benchmarking " .. tostring(#functions)) .. " function(s) with ") .. tostring(numTrials)) .. " trials.")
|
|
50313
50202
|
local averages = {}
|
|
50314
50203
|
__TS__ArrayForEach(
|
|
50315
50204
|
functions,
|
|
@@ -50327,10 +50216,7 @@ function ____exports.benchmark(self, numTrials, ...)
|
|
|
50327
50216
|
end
|
|
50328
50217
|
end
|
|
50329
50218
|
local averageTimeMilliseconds = totalTimeMilliseconds / numTrials
|
|
50330
|
-
log(
|
|
50331
|
-
nil,
|
|
50332
|
-
((("The average time of the function at index " .. tostring(i)) .. " is: ") .. tostring(averageTimeMilliseconds)) .. " milliseconds"
|
|
50333
|
-
)
|
|
50219
|
+
log(((("The average time of the function at index " .. tostring(i)) .. " is: ") .. tostring(averageTimeMilliseconds)) .. " milliseconds")
|
|
50334
50220
|
averages[#averages + 1] = averageTimeMilliseconds
|
|
50335
50221
|
end
|
|
50336
50222
|
)
|
|
@@ -50752,9 +50638,9 @@ function ____exports.getNewGlobals(self)
|
|
|
50752
50638
|
end
|
|
50753
50639
|
function ____exports.logNewGlobals(self)
|
|
50754
50640
|
local newGlobals = ____exports.getNewGlobals(nil)
|
|
50755
|
-
log(
|
|
50641
|
+
log("List of added global variables in the Isaac environment:")
|
|
50756
50642
|
if #newGlobals == 0 then
|
|
50757
|
-
log(
|
|
50643
|
+
log("- n/a (no extra global variables found)")
|
|
50758
50644
|
end
|
|
50759
50645
|
__TS__ArrayForEach(
|
|
50760
50646
|
newGlobals,
|
|
@@ -50763,10 +50649,7 @@ function ____exports.logNewGlobals(self)
|
|
|
50763
50649
|
local key
|
|
50764
50650
|
key = ____bindingPattern0[1]
|
|
50765
50651
|
value = ____bindingPattern0[2]
|
|
50766
|
-
log(
|
|
50767
|
-
nil,
|
|
50768
|
-
(((tostring(i + 1) .. ") ") .. tostring(key)) .. " - ") .. tostring(value)
|
|
50769
|
-
)
|
|
50652
|
+
log((((tostring(i + 1) .. ") ") .. tostring(key)) .. " - ") .. tostring(value))
|
|
50770
50653
|
end
|
|
50771
50654
|
)
|
|
50772
50655
|
end
|
|
@@ -50798,28 +50681,25 @@ local logError = ____logMisc.logError
|
|
|
50798
50681
|
function hexToRGB(self, hexString)
|
|
50799
50682
|
hexString = __TS__StringReplace(hexString, "#", "")
|
|
50800
50683
|
if #hexString ~= HEX_STRING_LENGTH then
|
|
50801
|
-
logError(
|
|
50802
|
-
nil,
|
|
50803
|
-
"Hex strings must be of length: " .. tostring(HEX_STRING_LENGTH)
|
|
50804
|
-
)
|
|
50684
|
+
logError("Hex strings must be of length: " .. tostring(HEX_STRING_LENGTH))
|
|
50805
50685
|
return {0, 0, 0}
|
|
50806
50686
|
end
|
|
50807
50687
|
local rString = __TS__StringSubstring(hexString, 0, 2)
|
|
50808
50688
|
local r = tonumber("0x" .. rString)
|
|
50809
50689
|
if r == nil then
|
|
50810
|
-
logError(
|
|
50690
|
+
logError(("Failed to convert `0x" .. rString) .. "` to a number.")
|
|
50811
50691
|
return {0, 0, 0}
|
|
50812
50692
|
end
|
|
50813
50693
|
local gString = __TS__StringSubstring(hexString, 2, 4)
|
|
50814
50694
|
local g = tonumber("0x" .. gString)
|
|
50815
50695
|
if g == nil then
|
|
50816
|
-
logError(
|
|
50696
|
+
logError(("Failed to convert `0x" .. gString) .. "` to a number.")
|
|
50817
50697
|
return {0, 0, 0}
|
|
50818
50698
|
end
|
|
50819
50699
|
local bString = __TS__StringSubstring(hexString, 4, 6)
|
|
50820
50700
|
local b = tonumber("0x" .. bString)
|
|
50821
50701
|
if b == nil then
|
|
50822
|
-
logError(
|
|
50702
|
+
logError(("Failed to convert `0x" .. bString) .. "` to a number.")
|
|
50823
50703
|
return {0, 0, 0}
|
|
50824
50704
|
end
|
|
50825
50705
|
return {r, g, b}
|
|
@@ -51488,6 +51368,14 @@ do
|
|
|
51488
51368
|
end
|
|
51489
51369
|
end
|
|
51490
51370
|
end
|
|
51371
|
+
do
|
|
51372
|
+
local ____export = require("src.enums.MysteriousPaperEffect")
|
|
51373
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
51374
|
+
if ____exportKey ~= "default" then
|
|
51375
|
+
____exports[____exportKey] = ____exportValue
|
|
51376
|
+
end
|
|
51377
|
+
end
|
|
51378
|
+
end
|
|
51491
51379
|
do
|
|
51492
51380
|
local ____export = require("src.enums.PocketItemType")
|
|
51493
51381
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -52548,6 +52436,14 @@ do
|
|
|
52548
52436
|
end
|
|
52549
52437
|
end
|
|
52550
52438
|
end
|
|
52439
|
+
do
|
|
52440
|
+
local ____export = require("src.enums.MysteriousPaperEffect")
|
|
52441
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
52442
|
+
if ____exportKey ~= "default" then
|
|
52443
|
+
____exports[____exportKey] = ____exportValue
|
|
52444
|
+
end
|
|
52445
|
+
end
|
|
52446
|
+
end
|
|
52551
52447
|
do
|
|
52552
52448
|
local ____export = require("src.enums.PocketItemType")
|
|
52553
52449
|
for ____exportKey, ____exportValue in pairs(____export) do
|