isaacscript-common 21.4.1 → 21.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index.d.ts → index.rollup.d.ts} +78 -69
- package/dist/isaacscript-common.lua +1042 -974
- package/dist/src/classes/ModFeature.d.ts +2 -2
- package/dist/src/classes/ModFeature.d.ts.map +1 -1
- package/dist/src/classes/{ModUpgradedBase.d.ts → ModUpgraded.d.ts} +20 -32
- package/dist/src/classes/ModUpgraded.d.ts.map +1 -0
- package/dist/src/classes/{ModUpgradedBase.lua → ModUpgraded.lua} +30 -29
- package/dist/src/classes/features/other/DebugDisplay.lua +2 -2
- package/dist/src/classes/features/other/ExtraConsoleCommands.lua +2 -2
- package/dist/src/classes/features/other/extraConsoleCommands/commands.d.ts.map +1 -1
- package/dist/src/classes/features/other/extraConsoleCommands/commands.lua +2 -1
- package/dist/src/classes/private/CustomCallback.d.ts +3 -1
- package/dist/src/classes/private/CustomCallback.d.ts.map +1 -1
- package/dist/src/classes/private/CustomCallback.lua +12 -4
- package/dist/src/core/upgradeMod.d.ts +3 -11
- package/dist/src/core/upgradeMod.d.ts.map +1 -1
- package/dist/src/core/upgradeMod.lua +6 -22
- package/dist/src/features.lua +2 -2
- package/dist/src/functions/console.d.ts +8 -0
- package/dist/src/functions/console.d.ts.map +1 -0
- package/dist/src/functions/console.lua +14 -0
- package/dist/src/functions/deepCopy.d.ts.map +1 -1
- package/dist/src/functions/deepCopy.lua +3 -2
- package/dist/src/functions/enums.d.ts +28 -0
- package/dist/src/functions/enums.d.ts.map +1 -1
- package/dist/src/functions/enums.lua +27 -0
- package/dist/src/functions/globals.lua +3 -3
- package/dist/src/functions/log.d.ts +5 -0
- package/dist/src/functions/log.d.ts.map +1 -1
- package/dist/src/functions/log.lua +6 -0
- package/dist/src/functions/mergeTests.lua +2 -2
- package/dist/src/functions/modFeatures.d.ts +1 -1
- package/dist/src/functions/modFeatures.d.ts.map +1 -1
- package/dist/src/functions/sort.d.ts +38 -0
- package/dist/src/functions/sort.d.ts.map +1 -0
- package/dist/src/functions/sort.lua +95 -0
- package/dist/src/functions/utils.d.ts +0 -54
- package/dist/src/functions/utils.d.ts.map +1 -1
- package/dist/src/functions/utils.lua +0 -91
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.lua +17 -1
- package/dist/src/interfaces/private/AddCallbackParametersCustom.lua +2 -2
- package/dist/src/interfaces/private/ModUpgradedInterface.d.ts +4 -2
- package/dist/src/interfaces/private/ModUpgradedInterface.d.ts.map +1 -1
- package/dist/src/types/{ModUpgraded.d.ts → private/ModUpgradedWithFeatures.d.ts} +13 -9
- package/dist/src/types/private/ModUpgradedWithFeatures.d.ts.map +1 -0
- package/dist/src/types/{ModUpgraded.lua → private/ModUpgradedWithFeatures.lua} +0 -0
- package/package.json +2 -2
- package/src/classes/ModFeature.ts +5 -5
- package/src/classes/{ModUpgradedBase.ts → ModUpgraded.ts} +33 -37
- package/src/classes/features/other/DebugDisplay.ts +1 -1
- package/src/classes/features/other/ExtraConsoleCommands.ts +1 -1
- package/src/classes/features/other/extraConsoleCommands/commands.ts +2 -1
- package/src/classes/private/CustomCallback.ts +17 -7
- package/src/core/upgradeMod.ts +7 -29
- package/src/features.ts +1 -1
- package/src/functions/console.ts +15 -0
- package/src/functions/deepCopy.ts +3 -2
- package/src/functions/enums.ts +33 -0
- package/src/functions/globals.ts +2 -2
- package/src/functions/log.ts +9 -0
- package/src/functions/mergeTests.ts +1 -1
- package/src/functions/modFeatures.ts +1 -1
- package/src/functions/sort.ts +128 -0
- package/src/functions/utils.ts +0 -124
- package/src/index.ts +3 -1
- package/src/interfaces/private/AddCallbackParametersCustom.ts +1 -1
- package/src/interfaces/private/ModUpgradedInterface.ts +4 -2
- package/src/types/{ModUpgraded.ts → private/ModUpgradedWithFeatures.ts} +13 -12
- package/dist/src/classes/ModUpgradedBase.d.ts.map +0 -1
- package/dist/src/types/ModUpgraded.d.ts.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 21.
|
|
3
|
+
isaacscript-common 21.5.1
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -15462,216 +15462,113 @@ function ____exports.shouldFireTrinketType(self, fireArgs, optionalArgs)
|
|
|
15462
15462
|
end
|
|
15463
15463
|
return ____exports
|
|
15464
15464
|
end,
|
|
15465
|
-
["src.
|
|
15466
|
-
local ____exports = {}
|
|
15467
|
-
____exports.game = Game()
|
|
15468
|
-
____exports.itemConfig = Isaac.GetItemConfig()
|
|
15469
|
-
____exports.musicManager = MusicManager()
|
|
15470
|
-
____exports.sfxManager = SFXManager()
|
|
15471
|
-
____exports.fonts = {
|
|
15472
|
-
droid = Font(),
|
|
15473
|
-
pfTempestaSevenCondensed = Font(),
|
|
15474
|
-
teamMeatFont10 = Font(),
|
|
15475
|
-
teamMeatFont12 = Font(),
|
|
15476
|
-
teamMeatFont16Bold = Font(),
|
|
15477
|
-
terminus = Font(),
|
|
15478
|
-
upheaval = Font()
|
|
15479
|
-
}
|
|
15480
|
-
____exports.fonts.droid:Load("font/droid.fnt")
|
|
15481
|
-
____exports.fonts.pfTempestaSevenCondensed:Load("font/pftempestasevencondensed.fnt")
|
|
15482
|
-
____exports.fonts.teamMeatFont10:Load("font/teammeatfont10.fnt")
|
|
15483
|
-
____exports.fonts.teamMeatFont12:Load("font/teammeatfont12.fnt")
|
|
15484
|
-
____exports.fonts.teamMeatFont16Bold:Load("font/teammeatfont16bold.fnt")
|
|
15485
|
-
____exports.fonts.terminus:Load("font/terminus.fnt")
|
|
15486
|
-
____exports.fonts.upheaval:Load("font/upheaval.fnt")
|
|
15487
|
-
return ____exports
|
|
15488
|
-
end,
|
|
15489
|
-
["src.sets.consoleCommandsSet"] = function(...)
|
|
15490
|
-
local ____lualib = require("lualib_bundle")
|
|
15491
|
-
local __TS__New = ____lualib.__TS__New
|
|
15492
|
-
local ____exports = {}
|
|
15493
|
-
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
15494
|
-
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
15495
|
-
____exports.CONSOLE_COMMANDS_SET = __TS__New(ReadonlySet, {
|
|
15496
|
-
"achievement",
|
|
15497
|
-
"challenge",
|
|
15498
|
-
"clear",
|
|
15499
|
-
"clearcache",
|
|
15500
|
-
"clearseeds",
|
|
15501
|
-
"combo",
|
|
15502
|
-
"copy",
|
|
15503
|
-
"costumetest",
|
|
15504
|
-
"curse",
|
|
15505
|
-
"cutscene",
|
|
15506
|
-
"debug",
|
|
15507
|
-
"delirious",
|
|
15508
|
-
"eggs",
|
|
15509
|
-
"giveitem",
|
|
15510
|
-
"g",
|
|
15511
|
-
"goto",
|
|
15512
|
-
"gridspawn",
|
|
15513
|
-
"listcollectibles",
|
|
15514
|
-
"lua",
|
|
15515
|
-
"l",
|
|
15516
|
-
"luamem",
|
|
15517
|
-
"luamod",
|
|
15518
|
-
"luarun",
|
|
15519
|
-
"macro",
|
|
15520
|
-
"m",
|
|
15521
|
-
"metro",
|
|
15522
|
-
"playsfx",
|
|
15523
|
-
"prof",
|
|
15524
|
-
"profstop",
|
|
15525
|
-
"remove",
|
|
15526
|
-
"r",
|
|
15527
|
-
"reloadfx",
|
|
15528
|
-
"reloadshaders",
|
|
15529
|
-
"repeat",
|
|
15530
|
-
"reseed",
|
|
15531
|
-
"restart",
|
|
15532
|
-
"seed",
|
|
15533
|
-
"spawn",
|
|
15534
|
-
"stage",
|
|
15535
|
-
"time",
|
|
15536
|
-
"addplayer",
|
|
15537
|
-
"forceroom",
|
|
15538
|
-
"giveitem2",
|
|
15539
|
-
"g2",
|
|
15540
|
-
"netdelay",
|
|
15541
|
-
"netstart",
|
|
15542
|
-
"remove2",
|
|
15543
|
-
"r2",
|
|
15544
|
-
"reloadwisps",
|
|
15545
|
-
"restock",
|
|
15546
|
-
"rewind",
|
|
15547
|
-
"testbosspool"
|
|
15548
|
-
})
|
|
15549
|
-
return ____exports
|
|
15550
|
-
end,
|
|
15551
|
-
["src.functions.log"] = function(...)
|
|
15465
|
+
["src.functions.types"] = function(...)
|
|
15552
15466
|
local ____exports = {}
|
|
15553
|
-
function ____exports.
|
|
15554
|
-
|
|
15555
|
-
levels = 3
|
|
15556
|
-
end
|
|
15557
|
-
if debug ~= nil then
|
|
15558
|
-
local debugTable = debug.getinfo(levels)
|
|
15559
|
-
if debugTable ~= nil then
|
|
15560
|
-
return (tostring(debugTable.name) .. ":") .. tostring(debugTable.linedefined)
|
|
15561
|
-
end
|
|
15562
|
-
end
|
|
15563
|
-
if SandboxGetParentFunctionDescription ~= nil then
|
|
15564
|
-
return SandboxGetParentFunctionDescription(levels)
|
|
15565
|
-
end
|
|
15566
|
-
return nil
|
|
15467
|
+
function ____exports.asCardType(self, num)
|
|
15468
|
+
return num
|
|
15567
15469
|
end
|
|
15568
|
-
function ____exports.
|
|
15569
|
-
|
|
15570
|
-
includeParentFunction = true
|
|
15571
|
-
end
|
|
15572
|
-
local ____includeParentFunction_0
|
|
15573
|
-
if includeParentFunction then
|
|
15574
|
-
____includeParentFunction_0 = ____exports.getParentFunctionDescription()
|
|
15575
|
-
else
|
|
15576
|
-
____includeParentFunction_0 = nil
|
|
15577
|
-
end
|
|
15578
|
-
local parentFunctionDescription = ____includeParentFunction_0
|
|
15579
|
-
local debugMsg = parentFunctionDescription == nil and msg or (parentFunctionDescription .. " - ") .. msg
|
|
15580
|
-
Isaac.DebugString(debugMsg)
|
|
15470
|
+
function ____exports.asCollectibleType(self, num)
|
|
15471
|
+
return num
|
|
15581
15472
|
end
|
|
15582
|
-
|
|
15583
|
-
|
|
15584
|
-
["src.functions.utils"] = function(...)
|
|
15585
|
-
local ____exports = {}
|
|
15586
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
15587
|
-
local RenderMode = ____isaac_2Dtypescript_2Ddefinitions.RenderMode
|
|
15588
|
-
local ____cachedClasses = require("src.core.cachedClasses")
|
|
15589
|
-
local game = ____cachedClasses.game
|
|
15590
|
-
local ____consoleCommandsSet = require("src.sets.consoleCommandsSet")
|
|
15591
|
-
local CONSOLE_COMMANDS_SET = ____consoleCommandsSet.CONSOLE_COMMANDS_SET
|
|
15592
|
-
local ____log = require("src.functions.log")
|
|
15593
|
-
local log = ____log.log
|
|
15594
|
-
function ____exports.eRange(self, start, ____end, increment)
|
|
15595
|
-
if increment == nil then
|
|
15596
|
-
increment = 1
|
|
15597
|
-
end
|
|
15598
|
-
if ____end == nil then
|
|
15599
|
-
return ____exports.eRange(nil, 0, start)
|
|
15600
|
-
end
|
|
15601
|
-
local array = {}
|
|
15602
|
-
do
|
|
15603
|
-
local i = start
|
|
15604
|
-
while i < ____end do
|
|
15605
|
-
array[#array + 1] = i
|
|
15606
|
-
i = i + increment
|
|
15607
|
-
end
|
|
15608
|
-
end
|
|
15609
|
-
return array
|
|
15473
|
+
function ____exports.asLevelStage(self, num)
|
|
15474
|
+
return num
|
|
15610
15475
|
end
|
|
15611
|
-
function ____exports.
|
|
15612
|
-
|
|
15613
|
-
traversalDescription = traversalDescription .. " --> "
|
|
15614
|
-
end
|
|
15615
|
-
traversalDescription = traversalDescription .. tostring(key)
|
|
15616
|
-
return traversalDescription
|
|
15476
|
+
function ____exports.asNpcState(self, num)
|
|
15477
|
+
return num
|
|
15617
15478
|
end
|
|
15618
|
-
function ____exports.
|
|
15619
|
-
|
|
15620
|
-
increment = 1
|
|
15621
|
-
end
|
|
15622
|
-
if ____end == nil then
|
|
15623
|
-
return ____exports.iRange(nil, 0, start)
|
|
15624
|
-
end
|
|
15625
|
-
local exclusiveEnd = ____end + 1
|
|
15626
|
-
return ____exports.eRange(nil, start, exclusiveEnd, increment)
|
|
15479
|
+
function ____exports.asNumber(self, num)
|
|
15480
|
+
return num
|
|
15627
15481
|
end
|
|
15628
|
-
function ____exports.
|
|
15629
|
-
return num
|
|
15482
|
+
function ____exports.asPillColor(self, num)
|
|
15483
|
+
return num
|
|
15630
15484
|
end
|
|
15631
|
-
function ____exports.
|
|
15632
|
-
|
|
15633
|
-
local renderMode = room:GetRenderMode()
|
|
15634
|
-
return renderMode == RenderMode.WATER_REFLECT
|
|
15485
|
+
function ____exports.asPillEffect(self, num)
|
|
15486
|
+
return num
|
|
15635
15487
|
end
|
|
15636
|
-
function ____exports.
|
|
15637
|
-
return
|
|
15488
|
+
function ____exports.asPlayerType(self, num)
|
|
15489
|
+
return num
|
|
15638
15490
|
end
|
|
15639
|
-
function ____exports.
|
|
15640
|
-
|
|
15641
|
-
print(msg)
|
|
15491
|
+
function ____exports.asString(self, str)
|
|
15492
|
+
return str
|
|
15642
15493
|
end
|
|
15643
|
-
function ____exports.
|
|
15644
|
-
|
|
15645
|
-
print(((enabledText .. " ") .. description) .. ".")
|
|
15494
|
+
function ____exports.asTrinketType(self, num)
|
|
15495
|
+
return num
|
|
15646
15496
|
end
|
|
15647
|
-
____exports
|
|
15648
|
-
|
|
15649
|
-
local i = 0
|
|
15650
|
-
while i < n do
|
|
15651
|
-
func(nil, i)
|
|
15652
|
-
i = i + 1
|
|
15653
|
-
end
|
|
15654
|
-
end
|
|
15497
|
+
function ____exports.isBoolean(self, variable)
|
|
15498
|
+
return type(variable) == "boolean"
|
|
15655
15499
|
end
|
|
15656
|
-
function ____exports.
|
|
15500
|
+
function ____exports.isFunction(self, variable)
|
|
15501
|
+
return type(variable) == "function"
|
|
15502
|
+
end
|
|
15503
|
+
function ____exports.isNumber(self, variable)
|
|
15504
|
+
return type(variable) == "number"
|
|
15657
15505
|
end
|
|
15658
|
-
function ____exports.
|
|
15659
|
-
local
|
|
15660
|
-
|
|
15661
|
-
|
|
15662
|
-
|
|
15506
|
+
function ____exports.isPrimitive(self, variable)
|
|
15507
|
+
local variableType = type(variable)
|
|
15508
|
+
return variableType == "boolean" or variableType == "number" or variableType == "string"
|
|
15509
|
+
end
|
|
15510
|
+
function ____exports.isString(self, variable)
|
|
15511
|
+
return type(variable) == "string"
|
|
15512
|
+
end
|
|
15513
|
+
function ____exports.isTable(self, variable)
|
|
15514
|
+
return type(variable) == "table"
|
|
15515
|
+
end
|
|
15516
|
+
function ____exports.isUserdata(self, variable)
|
|
15517
|
+
return type(variable) == "userdata"
|
|
15518
|
+
end
|
|
15519
|
+
return ____exports
|
|
15520
|
+
end,
|
|
15521
|
+
["src.functions.sort"] = function(...)
|
|
15522
|
+
local ____exports = {}
|
|
15523
|
+
local ____types = require("src.functions.types")
|
|
15524
|
+
local isNumber = ____types.isNumber
|
|
15525
|
+
local isString = ____types.isString
|
|
15526
|
+
local isTable = ____types.isTable
|
|
15527
|
+
local function sortNormal(self, a, b)
|
|
15528
|
+
if not isNumber(nil, a) and not isString(nil, a) then
|
|
15529
|
+
error("Failed to sort since the first value was not a number or string.")
|
|
15663
15530
|
end
|
|
15664
|
-
if
|
|
15665
|
-
|
|
15666
|
-
|
|
15531
|
+
if not isNumber(nil, b) and not isString(nil, b) then
|
|
15532
|
+
error("Failed to sort since the second value was not a number or string.")
|
|
15533
|
+
end
|
|
15534
|
+
if a < b then
|
|
15535
|
+
return -1
|
|
15536
|
+
end
|
|
15537
|
+
if a > b then
|
|
15538
|
+
return 1
|
|
15539
|
+
end
|
|
15540
|
+
return 0
|
|
15541
|
+
end
|
|
15542
|
+
function ____exports.sortObjectArrayByKey(self, key)
|
|
15543
|
+
return function(____, a, b)
|
|
15544
|
+
if not isTable(nil, a) then
|
|
15545
|
+
error(("Failed to sort an object by the key of \"" .. key) .. "\" since the first element was not a table.")
|
|
15667
15546
|
end
|
|
15668
|
-
|
|
15547
|
+
if not isTable(nil, b) then
|
|
15548
|
+
error(("Failed to sort an object by the key of \"" .. key) .. "\" since the second element was not a table.")
|
|
15549
|
+
end
|
|
15550
|
+
local aValue = a[key]
|
|
15551
|
+
local bValue = b[key]
|
|
15552
|
+
return sortNormal(nil, aValue, bValue)
|
|
15553
|
+
end
|
|
15554
|
+
end
|
|
15555
|
+
function ____exports.sortTwoDimensionalArray(self, a, b)
|
|
15556
|
+
local aType = type(a)
|
|
15557
|
+
local bType = type(b)
|
|
15558
|
+
if aType ~= bType then
|
|
15559
|
+
error(((((((("Failed to two-dimensional sort since the two elements were disparate types: " .. tostring(a)) .. " & ") .. tostring(b)) .. " (") .. aType) .. " & ") .. bType) .. ")")
|
|
15560
|
+
end
|
|
15561
|
+
if aType == "string" or aType == "number" then
|
|
15562
|
+
return sortNormal(nil, a, b)
|
|
15669
15563
|
end
|
|
15670
|
-
if
|
|
15671
|
-
error("Failed to two-dimensional sort since the
|
|
15564
|
+
if aType ~= "table" then
|
|
15565
|
+
error("Failed to two-dimensional sort since the first element was not a string, number, or table.")
|
|
15672
15566
|
end
|
|
15673
|
-
|
|
15674
|
-
|
|
15567
|
+
if bType ~= "table" then
|
|
15568
|
+
error("Failed to two-dimensional sort since the second element was not a string, number, or table.")
|
|
15569
|
+
end
|
|
15570
|
+
local firstElement1 = a[1]
|
|
15571
|
+
local firstElement2 = b[1]
|
|
15675
15572
|
if firstElement1 == nil or firstElement1 == nil then
|
|
15676
15573
|
error("Failed to two-dimensional sort since the first element of the first array was undefined.")
|
|
15677
15574
|
end
|
|
@@ -15683,149 +15580,32 @@ function ____exports.twoDimensionalSort(self, array1, array2)
|
|
|
15683
15580
|
if elementType1 ~= elementType2 then
|
|
15684
15581
|
error(((((((("Failed to two-dimensional sort since the first element of each array were disparate types: " .. tostring(firstElement1)) .. " & ") .. tostring(firstElement2)) .. " (") .. elementType1) .. " & ") .. elementType2) .. ")")
|
|
15685
15582
|
end
|
|
15686
|
-
|
|
15687
|
-
return 0
|
|
15688
|
-
end
|
|
15689
|
-
return firstElement1 < firstElement2 and -1 or 1
|
|
15690
|
-
end
|
|
15691
|
-
function ____exports.validateInterfaceMatchesEnum(self)
|
|
15583
|
+
return sortNormal(nil, firstElement1, firstElement2)
|
|
15692
15584
|
end
|
|
15693
15585
|
return ____exports
|
|
15694
15586
|
end,
|
|
15695
|
-
["src.
|
|
15696
|
-
local ____exports = {}
|
|
15697
|
-
local ____StatType = require("src.enums.StatType")
|
|
15698
|
-
local StatType = ____StatType.StatType
|
|
15699
|
-
return ____exports
|
|
15700
|
-
end,
|
|
15701
|
-
["src.interfaces.private.AddCallbackParametersCustom"] = function(...)
|
|
15702
|
-
local ____exports = {}
|
|
15703
|
-
local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
|
|
15704
|
-
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
15705
|
-
local ____utils = require("src.functions.utils")
|
|
15706
|
-
local validateInterfaceMatchesEnum = ____utils.validateInterfaceMatchesEnum
|
|
15707
|
-
validateInterfaceMatchesEnum(nil)
|
|
15708
|
-
return ____exports
|
|
15709
|
-
end,
|
|
15710
|
-
["src.types.AllButFirst"] = function(...)
|
|
15711
|
-
local ____exports = {}
|
|
15712
|
-
return ____exports
|
|
15713
|
-
end,
|
|
15714
|
-
["src.types.AnyFunction"] = function(...)
|
|
15715
|
-
local ____exports = {}
|
|
15716
|
-
return ____exports
|
|
15717
|
-
end,
|
|
15718
|
-
["src.enums.ISCFeature"] = function(...)
|
|
15587
|
+
["src.core.cachedClasses"] = function(...)
|
|
15719
15588
|
local ____exports = {}
|
|
15720
|
-
____exports.
|
|
15721
|
-
____exports.
|
|
15722
|
-
____exports.
|
|
15723
|
-
____exports.
|
|
15724
|
-
____exports.
|
|
15725
|
-
|
|
15726
|
-
|
|
15727
|
-
|
|
15728
|
-
|
|
15729
|
-
|
|
15730
|
-
|
|
15731
|
-
|
|
15732
|
-
|
|
15733
|
-
____exports.
|
|
15734
|
-
____exports.
|
|
15735
|
-
____exports.
|
|
15736
|
-
____exports.
|
|
15737
|
-
____exports.
|
|
15738
|
-
____exports.
|
|
15739
|
-
____exports.
|
|
15740
|
-
____exports.ISCFeature[____exports.ISCFeature.PLAYER_REORDERED_CALLBACKS] = "PLAYER_REORDERED_CALLBACKS"
|
|
15741
|
-
____exports.ISCFeature.SLOT_DESTROYED_DETECTION = 10
|
|
15742
|
-
____exports.ISCFeature[____exports.ISCFeature.SLOT_DESTROYED_DETECTION] = "SLOT_DESTROYED_DETECTION"
|
|
15743
|
-
____exports.ISCFeature.SLOT_RENDER_DETECTION = 11
|
|
15744
|
-
____exports.ISCFeature[____exports.ISCFeature.SLOT_RENDER_DETECTION] = "SLOT_RENDER_DETECTION"
|
|
15745
|
-
____exports.ISCFeature.SLOT_UPDATE_DETECTION = 12
|
|
15746
|
-
____exports.ISCFeature[____exports.ISCFeature.SLOT_UPDATE_DETECTION] = "SLOT_UPDATE_DETECTION"
|
|
15747
|
-
____exports.ISCFeature.CHARACTER_HEALTH_CONVERSION = 13
|
|
15748
|
-
____exports.ISCFeature[____exports.ISCFeature.CHARACTER_HEALTH_CONVERSION] = "CHARACTER_HEALTH_CONVERSION"
|
|
15749
|
-
____exports.ISCFeature.CHARACTER_STATS = 14
|
|
15750
|
-
____exports.ISCFeature[____exports.ISCFeature.CHARACTER_STATS] = "CHARACTER_STATS"
|
|
15751
|
-
____exports.ISCFeature.COLLECTIBLE_ITEM_POOL_TYPE = 15
|
|
15752
|
-
____exports.ISCFeature[____exports.ISCFeature.COLLECTIBLE_ITEM_POOL_TYPE] = "COLLECTIBLE_ITEM_POOL_TYPE"
|
|
15753
|
-
____exports.ISCFeature.CUSTOM_GRID_ENTITIES = 16
|
|
15754
|
-
____exports.ISCFeature[____exports.ISCFeature.CUSTOM_GRID_ENTITIES] = "CUSTOM_GRID_ENTITIES"
|
|
15755
|
-
____exports.ISCFeature.CUSTOM_ITEM_POOLS = 17
|
|
15756
|
-
____exports.ISCFeature[____exports.ISCFeature.CUSTOM_ITEM_POOLS] = "CUSTOM_ITEM_POOLS"
|
|
15757
|
-
____exports.ISCFeature.CUSTOM_HOTKEYS = 18
|
|
15758
|
-
____exports.ISCFeature[____exports.ISCFeature.CUSTOM_HOTKEYS] = "CUSTOM_HOTKEYS"
|
|
15759
|
-
____exports.ISCFeature.CUSTOM_PICKUPS = 19
|
|
15760
|
-
____exports.ISCFeature[____exports.ISCFeature.CUSTOM_PICKUPS] = "CUSTOM_PICKUPS"
|
|
15761
|
-
____exports.ISCFeature.CUSTOM_STAGES = 20
|
|
15762
|
-
____exports.ISCFeature[____exports.ISCFeature.CUSTOM_STAGES] = "CUSTOM_STAGES"
|
|
15763
|
-
____exports.ISCFeature.CUSTOM_TRAPDOORS = 21
|
|
15764
|
-
____exports.ISCFeature[____exports.ISCFeature.CUSTOM_TRAPDOORS] = "CUSTOM_TRAPDOORS"
|
|
15765
|
-
____exports.ISCFeature.DEBUG_DISPLAY = 22
|
|
15766
|
-
____exports.ISCFeature[____exports.ISCFeature.DEBUG_DISPLAY] = "DEBUG_DISPLAY"
|
|
15767
|
-
____exports.ISCFeature.DEPLOY_JSON_ROOM = 23
|
|
15768
|
-
____exports.ISCFeature[____exports.ISCFeature.DEPLOY_JSON_ROOM] = "DEPLOY_JSON_ROOM"
|
|
15769
|
-
____exports.ISCFeature.DISABLE_ALL_SOUND = 24
|
|
15770
|
-
____exports.ISCFeature[____exports.ISCFeature.DISABLE_ALL_SOUND] = "DISABLE_ALL_SOUND"
|
|
15771
|
-
____exports.ISCFeature.DISABLE_INPUTS = 25
|
|
15772
|
-
____exports.ISCFeature[____exports.ISCFeature.DISABLE_INPUTS] = "DISABLE_INPUTS"
|
|
15773
|
-
____exports.ISCFeature.FADE_IN_REMOVER = 26
|
|
15774
|
-
____exports.ISCFeature[____exports.ISCFeature.FADE_IN_REMOVER] = "FADE_IN_REMOVER"
|
|
15775
|
-
____exports.ISCFeature.FAST_RESET = 27
|
|
15776
|
-
____exports.ISCFeature[____exports.ISCFeature.FAST_RESET] = "FAST_RESET"
|
|
15777
|
-
____exports.ISCFeature.FLYING_DETECTION = 28
|
|
15778
|
-
____exports.ISCFeature[____exports.ISCFeature.FLYING_DETECTION] = "FLYING_DETECTION"
|
|
15779
|
-
____exports.ISCFeature.FORGOTTEN_SWITCH = 29
|
|
15780
|
-
____exports.ISCFeature[____exports.ISCFeature.FORGOTTEN_SWITCH] = "FORGOTTEN_SWITCH"
|
|
15781
|
-
____exports.ISCFeature.EXTRA_CONSOLE_COMMANDS = 30
|
|
15782
|
-
____exports.ISCFeature[____exports.ISCFeature.EXTRA_CONSOLE_COMMANDS] = "EXTRA_CONSOLE_COMMANDS"
|
|
15783
|
-
____exports.ISCFeature.ITEM_POOL_DETECTION = 31
|
|
15784
|
-
____exports.ISCFeature[____exports.ISCFeature.ITEM_POOL_DETECTION] = "ITEM_POOL_DETECTION"
|
|
15785
|
-
____exports.ISCFeature.MODDED_ELEMENT_DETECTION = 32
|
|
15786
|
-
____exports.ISCFeature[____exports.ISCFeature.MODDED_ELEMENT_DETECTION] = "MODDED_ELEMENT_DETECTION"
|
|
15787
|
-
____exports.ISCFeature.MODDED_ELEMENT_SETS = 33
|
|
15788
|
-
____exports.ISCFeature[____exports.ISCFeature.MODDED_ELEMENT_SETS] = "MODDED_ELEMENT_SETS"
|
|
15789
|
-
____exports.ISCFeature.NO_SIREN_STEAL = 34
|
|
15790
|
-
____exports.ISCFeature[____exports.ISCFeature.NO_SIREN_STEAL] = "NO_SIREN_STEAL"
|
|
15791
|
-
____exports.ISCFeature.PAUSE = 35
|
|
15792
|
-
____exports.ISCFeature[____exports.ISCFeature.PAUSE] = "PAUSE"
|
|
15793
|
-
____exports.ISCFeature.PERSISTENT_ENTITIES = 36
|
|
15794
|
-
____exports.ISCFeature[____exports.ISCFeature.PERSISTENT_ENTITIES] = "PERSISTENT_ENTITIES"
|
|
15795
|
-
____exports.ISCFeature.PICKUP_INDEX_CREATION = 37
|
|
15796
|
-
____exports.ISCFeature[____exports.ISCFeature.PICKUP_INDEX_CREATION] = "PICKUP_INDEX_CREATION"
|
|
15797
|
-
____exports.ISCFeature.PLAYER_INVENTORY = 38
|
|
15798
|
-
____exports.ISCFeature[____exports.ISCFeature.PLAYER_INVENTORY] = "PLAYER_INVENTORY"
|
|
15799
|
-
____exports.ISCFeature.PONY_DETECTION = 39
|
|
15800
|
-
____exports.ISCFeature[____exports.ISCFeature.PONY_DETECTION] = "PONY_DETECTION"
|
|
15801
|
-
____exports.ISCFeature.PRESS_INPUT = 40
|
|
15802
|
-
____exports.ISCFeature[____exports.ISCFeature.PRESS_INPUT] = "PRESS_INPUT"
|
|
15803
|
-
____exports.ISCFeature.PREVENT_CHILD_ENTITIES = 41
|
|
15804
|
-
____exports.ISCFeature[____exports.ISCFeature.PREVENT_CHILD_ENTITIES] = "PREVENT_CHILD_ENTITIES"
|
|
15805
|
-
____exports.ISCFeature.PREVENT_COLLECTIBLE_ROTATION = 42
|
|
15806
|
-
____exports.ISCFeature[____exports.ISCFeature.PREVENT_COLLECTIBLE_ROTATION] = "PREVENT_COLLECTIBLE_ROTATION"
|
|
15807
|
-
____exports.ISCFeature.PREVENT_GRID_ENTITY_RESPAWN = 43
|
|
15808
|
-
____exports.ISCFeature[____exports.ISCFeature.PREVENT_GRID_ENTITY_RESPAWN] = "PREVENT_GRID_ENTITY_RESPAWN"
|
|
15809
|
-
____exports.ISCFeature.ROOM_CLEAR_FRAME = 44
|
|
15810
|
-
____exports.ISCFeature[____exports.ISCFeature.ROOM_CLEAR_FRAME] = "ROOM_CLEAR_FRAME"
|
|
15811
|
-
____exports.ISCFeature.ROOM_HISTORY = 45
|
|
15812
|
-
____exports.ISCFeature[____exports.ISCFeature.ROOM_HISTORY] = "ROOM_HISTORY"
|
|
15813
|
-
____exports.ISCFeature.RUN_IN_N_FRAMES = 46
|
|
15814
|
-
____exports.ISCFeature[____exports.ISCFeature.RUN_IN_N_FRAMES] = "RUN_IN_N_FRAMES"
|
|
15815
|
-
____exports.ISCFeature.RUN_NEXT_ROOM = 47
|
|
15816
|
-
____exports.ISCFeature[____exports.ISCFeature.RUN_NEXT_ROOM] = "RUN_NEXT_ROOM"
|
|
15817
|
-
____exports.ISCFeature.SAVE_DATA_MANAGER = 48
|
|
15818
|
-
____exports.ISCFeature[____exports.ISCFeature.SAVE_DATA_MANAGER] = "SAVE_DATA_MANAGER"
|
|
15819
|
-
____exports.ISCFeature.SPAWN_ALT_ROCK_REWARDS = 49
|
|
15820
|
-
____exports.ISCFeature[____exports.ISCFeature.SPAWN_ALT_ROCK_REWARDS] = "SPAWN_ALT_ROCK_REWARDS"
|
|
15821
|
-
____exports.ISCFeature.SPAWN_COLLECTIBLE = 50
|
|
15822
|
-
____exports.ISCFeature[____exports.ISCFeature.SPAWN_COLLECTIBLE] = "SPAWN_COLLECTIBLE"
|
|
15823
|
-
____exports.ISCFeature.STAGE_HISTORY = 51
|
|
15824
|
-
____exports.ISCFeature[____exports.ISCFeature.STAGE_HISTORY] = "STAGE_HISTORY"
|
|
15825
|
-
____exports.ISCFeature.START_AMBUSH = 52
|
|
15826
|
-
____exports.ISCFeature[____exports.ISCFeature.START_AMBUSH] = "START_AMBUSH"
|
|
15827
|
-
____exports.ISCFeature.TAINTED_LAZARUS_PLAYERS = 53
|
|
15828
|
-
____exports.ISCFeature[____exports.ISCFeature.TAINTED_LAZARUS_PLAYERS] = "TAINTED_LAZARUS_PLAYERS"
|
|
15589
|
+
____exports.game = Game()
|
|
15590
|
+
____exports.itemConfig = Isaac.GetItemConfig()
|
|
15591
|
+
____exports.musicManager = MusicManager()
|
|
15592
|
+
____exports.sfxManager = SFXManager()
|
|
15593
|
+
____exports.fonts = {
|
|
15594
|
+
droid = Font(),
|
|
15595
|
+
pfTempestaSevenCondensed = Font(),
|
|
15596
|
+
teamMeatFont10 = Font(),
|
|
15597
|
+
teamMeatFont12 = Font(),
|
|
15598
|
+
teamMeatFont16Bold = Font(),
|
|
15599
|
+
terminus = Font(),
|
|
15600
|
+
upheaval = Font()
|
|
15601
|
+
}
|
|
15602
|
+
____exports.fonts.droid:Load("font/droid.fnt")
|
|
15603
|
+
____exports.fonts.pfTempestaSevenCondensed:Load("font/pftempestasevencondensed.fnt")
|
|
15604
|
+
____exports.fonts.teamMeatFont10:Load("font/teammeatfont10.fnt")
|
|
15605
|
+
____exports.fonts.teamMeatFont12:Load("font/teammeatfont12.fnt")
|
|
15606
|
+
____exports.fonts.teamMeatFont16Bold:Load("font/teammeatfont16bold.fnt")
|
|
15607
|
+
____exports.fonts.terminus:Load("font/terminus.fnt")
|
|
15608
|
+
____exports.fonts.upheaval:Load("font/upheaval.fnt")
|
|
15829
15609
|
return ____exports
|
|
15830
15610
|
end,
|
|
15831
15611
|
["src.enums.SerializationBrand"] = function(...)
|
|
@@ -15904,62 +15684,6 @@ function ____exports.trimSuffix(self, ____string, prefix)
|
|
|
15904
15684
|
local endCharacter = #____string - #prefix
|
|
15905
15685
|
return __TS__StringSlice(____string, 0, endCharacter)
|
|
15906
15686
|
end
|
|
15907
|
-
return ____exports
|
|
15908
|
-
end,
|
|
15909
|
-
["src.functions.types"] = function(...)
|
|
15910
|
-
local ____exports = {}
|
|
15911
|
-
function ____exports.asCardType(self, num)
|
|
15912
|
-
return num
|
|
15913
|
-
end
|
|
15914
|
-
function ____exports.asCollectibleType(self, num)
|
|
15915
|
-
return num
|
|
15916
|
-
end
|
|
15917
|
-
function ____exports.asLevelStage(self, num)
|
|
15918
|
-
return num
|
|
15919
|
-
end
|
|
15920
|
-
function ____exports.asNpcState(self, num)
|
|
15921
|
-
return num
|
|
15922
|
-
end
|
|
15923
|
-
function ____exports.asNumber(self, num)
|
|
15924
|
-
return num
|
|
15925
|
-
end
|
|
15926
|
-
function ____exports.asPillColor(self, num)
|
|
15927
|
-
return num
|
|
15928
|
-
end
|
|
15929
|
-
function ____exports.asPillEffect(self, num)
|
|
15930
|
-
return num
|
|
15931
|
-
end
|
|
15932
|
-
function ____exports.asPlayerType(self, num)
|
|
15933
|
-
return num
|
|
15934
|
-
end
|
|
15935
|
-
function ____exports.asString(self, str)
|
|
15936
|
-
return str
|
|
15937
|
-
end
|
|
15938
|
-
function ____exports.asTrinketType(self, num)
|
|
15939
|
-
return num
|
|
15940
|
-
end
|
|
15941
|
-
function ____exports.isBoolean(self, variable)
|
|
15942
|
-
return type(variable) == "boolean"
|
|
15943
|
-
end
|
|
15944
|
-
function ____exports.isFunction(self, variable)
|
|
15945
|
-
return type(variable) == "function"
|
|
15946
|
-
end
|
|
15947
|
-
function ____exports.isNumber(self, variable)
|
|
15948
|
-
return type(variable) == "number"
|
|
15949
|
-
end
|
|
15950
|
-
function ____exports.isPrimitive(self, variable)
|
|
15951
|
-
local variableType = type(variable)
|
|
15952
|
-
return variableType == "boolean" or variableType == "number" or variableType == "string"
|
|
15953
|
-
end
|
|
15954
|
-
function ____exports.isString(self, variable)
|
|
15955
|
-
return type(variable) == "string"
|
|
15956
|
-
end
|
|
15957
|
-
function ____exports.isTable(self, variable)
|
|
15958
|
-
return type(variable) == "table"
|
|
15959
|
-
end
|
|
15960
|
-
function ____exports.isUserdata(self, variable)
|
|
15961
|
-
return type(variable) == "userdata"
|
|
15962
|
-
end
|
|
15963
15687
|
return ____exports
|
|
15964
15688
|
end,
|
|
15965
15689
|
["src.functions.isaacAPIClass"] = function(...)
|
|
@@ -16191,132 +15915,67 @@ function ____exports.tableHasKeys(self, luaMap, ...)
|
|
|
16191
15915
|
end
|
|
16192
15916
|
return ____exports
|
|
16193
15917
|
end,
|
|
16194
|
-
["src.functions.
|
|
15918
|
+
["src.functions.rng"] = function(...)
|
|
15919
|
+
local ____lualib = require("lualib_bundle")
|
|
15920
|
+
local __TS__TypeOf = ____lualib.__TS__TypeOf
|
|
16195
15921
|
local ____exports = {}
|
|
16196
|
-
local OBJECT_NAME
|
|
15922
|
+
local RECOMMENDED_SHIFT_IDX, OBJECT_NAME
|
|
15923
|
+
local ____cachedClasses = require("src.core.cachedClasses")
|
|
15924
|
+
local game = ____cachedClasses.game
|
|
16197
15925
|
local ____SerializationBrand = require("src.enums.SerializationBrand")
|
|
16198
15926
|
local SerializationBrand = ____SerializationBrand.SerializationBrand
|
|
16199
15927
|
local ____isaacAPIClass = require("src.functions.isaacAPIClass")
|
|
15928
|
+
local isaacAPIClassEquals = ____isaacAPIClass.isaacAPIClassEquals
|
|
16200
15929
|
local isIsaacAPIClassOfType = ____isaacAPIClass.isIsaacAPIClassOfType
|
|
16201
15930
|
local ____table = require("src.functions.table")
|
|
16202
|
-
local copyUserdataValuesToTable = ____table.copyUserdataValuesToTable
|
|
16203
15931
|
local getNumbersFromTable = ____table.getNumbersFromTable
|
|
16204
15932
|
local tableHasKeys = ____table.tableHasKeys
|
|
16205
15933
|
local ____types = require("src.functions.types")
|
|
16206
15934
|
local isTable = ____types.isTable
|
|
16207
|
-
function ____exports.
|
|
15935
|
+
function ____exports.getRandomSeed(self)
|
|
15936
|
+
local randomNumber = Random()
|
|
15937
|
+
local safeRandomNumber = randomNumber == 0 and 1 or randomNumber
|
|
15938
|
+
return safeRandomNumber
|
|
15939
|
+
end
|
|
15940
|
+
function ____exports.isRNG(self, object)
|
|
16208
15941
|
return isIsaacAPIClassOfType(nil, object, OBJECT_NAME)
|
|
16209
15942
|
end
|
|
16210
|
-
|
|
16211
|
-
|
|
16212
|
-
|
|
16213
|
-
|
|
15943
|
+
function ____exports.newRNG(self, seed)
|
|
15944
|
+
if seed == nil then
|
|
15945
|
+
seed = ____exports.getRandomSeed(nil)
|
|
15946
|
+
end
|
|
15947
|
+
local rng = RNG()
|
|
15948
|
+
____exports.setSeed(nil, rng, seed)
|
|
15949
|
+
return rng
|
|
15950
|
+
end
|
|
15951
|
+
function ____exports.setSeed(self, rng, seed)
|
|
15952
|
+
if seed == 0 then
|
|
15953
|
+
error("You cannot set an RNG object to a seed of 0, or the game will crash.")
|
|
15954
|
+
end
|
|
15955
|
+
rng:SetSeed(seed, RECOMMENDED_SHIFT_IDX)
|
|
15956
|
+
end
|
|
15957
|
+
RECOMMENDED_SHIFT_IDX = 35
|
|
15958
|
+
OBJECT_NAME = "RNG"
|
|
15959
|
+
local KEYS = {"seed"}
|
|
15960
|
+
function ____exports.copyRNG(self, rng)
|
|
15961
|
+
if not ____exports.isRNG(nil, rng) then
|
|
16214
15962
|
error(((("Failed to copy a " .. OBJECT_NAME) .. " object since the provided object was not a userdata ") .. OBJECT_NAME) .. " class.")
|
|
16215
15963
|
end
|
|
16216
|
-
local
|
|
16217
|
-
|
|
16218
|
-
return BitSet128(lowBits, highBits)
|
|
15964
|
+
local seed = rng:GetSeed()
|
|
15965
|
+
return ____exports.newRNG(nil, seed)
|
|
16219
15966
|
end
|
|
16220
|
-
function ____exports.
|
|
16221
|
-
if not isTable(nil,
|
|
15967
|
+
function ____exports.deserializeRNG(self, rng)
|
|
15968
|
+
if not isTable(nil, rng) then
|
|
16222
15969
|
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object was not a Lua table.")
|
|
16223
15970
|
end
|
|
16224
|
-
local
|
|
15971
|
+
local seed = table.unpack(getNumbersFromTable(
|
|
16225
15972
|
nil,
|
|
16226
|
-
|
|
15973
|
+
rng,
|
|
16227
15974
|
OBJECT_NAME,
|
|
16228
15975
|
table.unpack(KEYS)
|
|
16229
15976
|
))
|
|
16230
|
-
if
|
|
16231
|
-
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for:
|
|
16232
|
-
end
|
|
16233
|
-
if h == nil then
|
|
16234
|
-
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: h")
|
|
16235
|
-
end
|
|
16236
|
-
return BitSet128(l, h)
|
|
16237
|
-
end
|
|
16238
|
-
function ____exports.isSerializedBitSet128(self, object)
|
|
16239
|
-
if not isTable(nil, object) then
|
|
16240
|
-
return false
|
|
16241
|
-
end
|
|
16242
|
-
return tableHasKeys(
|
|
16243
|
-
nil,
|
|
16244
|
-
object,
|
|
16245
|
-
table.unpack(KEYS)
|
|
16246
|
-
) and object[SerializationBrand.BIT_SET_128] ~= nil
|
|
16247
|
-
end
|
|
16248
|
-
function ____exports.serializeBitSet128(self, bitSet128)
|
|
16249
|
-
if not ____exports.isBitSet128(nil, bitSet128) then
|
|
16250
|
-
error(((("Failed to serialize a " .. OBJECT_NAME) .. " object since the provided object was not a userdata ") .. OBJECT_NAME) .. " class.")
|
|
16251
|
-
end
|
|
16252
|
-
local bitSet128Table = {}
|
|
16253
|
-
copyUserdataValuesToTable(nil, bitSet128, KEYS, bitSet128Table)
|
|
16254
|
-
bitSet128Table[SerializationBrand.BIT_SET_128] = ""
|
|
16255
|
-
return bitSet128Table
|
|
16256
|
-
end
|
|
16257
|
-
return ____exports
|
|
16258
|
-
end,
|
|
16259
|
-
["src.functions.rng"] = function(...)
|
|
16260
|
-
local ____lualib = require("lualib_bundle")
|
|
16261
|
-
local __TS__TypeOf = ____lualib.__TS__TypeOf
|
|
16262
|
-
local ____exports = {}
|
|
16263
|
-
local RECOMMENDED_SHIFT_IDX, OBJECT_NAME
|
|
16264
|
-
local ____cachedClasses = require("src.core.cachedClasses")
|
|
16265
|
-
local game = ____cachedClasses.game
|
|
16266
|
-
local ____SerializationBrand = require("src.enums.SerializationBrand")
|
|
16267
|
-
local SerializationBrand = ____SerializationBrand.SerializationBrand
|
|
16268
|
-
local ____isaacAPIClass = require("src.functions.isaacAPIClass")
|
|
16269
|
-
local isaacAPIClassEquals = ____isaacAPIClass.isaacAPIClassEquals
|
|
16270
|
-
local isIsaacAPIClassOfType = ____isaacAPIClass.isIsaacAPIClassOfType
|
|
16271
|
-
local ____table = require("src.functions.table")
|
|
16272
|
-
local getNumbersFromTable = ____table.getNumbersFromTable
|
|
16273
|
-
local tableHasKeys = ____table.tableHasKeys
|
|
16274
|
-
local ____types = require("src.functions.types")
|
|
16275
|
-
local isTable = ____types.isTable
|
|
16276
|
-
function ____exports.getRandomSeed(self)
|
|
16277
|
-
local randomNumber = Random()
|
|
16278
|
-
local safeRandomNumber = randomNumber == 0 and 1 or randomNumber
|
|
16279
|
-
return safeRandomNumber
|
|
16280
|
-
end
|
|
16281
|
-
function ____exports.isRNG(self, object)
|
|
16282
|
-
return isIsaacAPIClassOfType(nil, object, OBJECT_NAME)
|
|
16283
|
-
end
|
|
16284
|
-
function ____exports.newRNG(self, seed)
|
|
16285
|
-
if seed == nil then
|
|
16286
|
-
seed = ____exports.getRandomSeed(nil)
|
|
16287
|
-
end
|
|
16288
|
-
local rng = RNG()
|
|
16289
|
-
____exports.setSeed(nil, rng, seed)
|
|
16290
|
-
return rng
|
|
16291
|
-
end
|
|
16292
|
-
function ____exports.setSeed(self, rng, seed)
|
|
16293
|
-
if seed == 0 then
|
|
16294
|
-
error("You cannot set an RNG object to a seed of 0, or the game will crash.")
|
|
16295
|
-
end
|
|
16296
|
-
rng:SetSeed(seed, RECOMMENDED_SHIFT_IDX)
|
|
16297
|
-
end
|
|
16298
|
-
RECOMMENDED_SHIFT_IDX = 35
|
|
16299
|
-
OBJECT_NAME = "RNG"
|
|
16300
|
-
local KEYS = {"seed"}
|
|
16301
|
-
function ____exports.copyRNG(self, rng)
|
|
16302
|
-
if not ____exports.isRNG(nil, rng) then
|
|
16303
|
-
error(((("Failed to copy a " .. OBJECT_NAME) .. " object since the provided object was not a userdata ") .. OBJECT_NAME) .. " class.")
|
|
16304
|
-
end
|
|
16305
|
-
local seed = rng:GetSeed()
|
|
16306
|
-
return ____exports.newRNG(nil, seed)
|
|
16307
|
-
end
|
|
16308
|
-
function ____exports.deserializeRNG(self, rng)
|
|
16309
|
-
if not isTable(nil, rng) then
|
|
16310
|
-
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object was not a Lua table.")
|
|
16311
|
-
end
|
|
16312
|
-
local seed = table.unpack(getNumbersFromTable(
|
|
16313
|
-
nil,
|
|
16314
|
-
rng,
|
|
16315
|
-
OBJECT_NAME,
|
|
16316
|
-
table.unpack(KEYS)
|
|
16317
|
-
))
|
|
16318
|
-
if seed == nil then
|
|
16319
|
-
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: seed")
|
|
15977
|
+
if seed == nil then
|
|
15978
|
+
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: seed")
|
|
16320
15979
|
end
|
|
16321
15980
|
return ____exports.newRNG(nil, seed)
|
|
16322
15981
|
end
|
|
@@ -16420,263 +16079,65 @@ function ____exports.getRandomInt(self, min, max, seedOrRNG, exceptions)
|
|
|
16420
16079
|
end
|
|
16421
16080
|
return ____exports
|
|
16422
16081
|
end,
|
|
16423
|
-
["src.functions.
|
|
16082
|
+
["src.functions.utils"] = function(...)
|
|
16424
16083
|
local ____exports = {}
|
|
16425
|
-
local
|
|
16426
|
-
local
|
|
16427
|
-
local
|
|
16428
|
-
local
|
|
16429
|
-
|
|
16430
|
-
|
|
16431
|
-
|
|
16432
|
-
local getRandom = ____random.getRandom
|
|
16433
|
-
local ____rng = require("src.functions.rng")
|
|
16434
|
-
local getRandomSeed = ____rng.getRandomSeed
|
|
16435
|
-
local isRNG = ____rng.isRNG
|
|
16436
|
-
local newRNG = ____rng.newRNG
|
|
16437
|
-
local ____table = require("src.functions.table")
|
|
16438
|
-
local copyUserdataValuesToTable = ____table.copyUserdataValuesToTable
|
|
16439
|
-
local getNumbersFromTable = ____table.getNumbersFromTable
|
|
16440
|
-
local tableHasKeys = ____table.tableHasKeys
|
|
16441
|
-
local ____types = require("src.functions.types")
|
|
16442
|
-
local isTable = ____types.isTable
|
|
16443
|
-
function ____exports.isColor(self, object)
|
|
16444
|
-
return isIsaacAPIClassOfType(nil, object, OBJECT_NAME)
|
|
16445
|
-
end
|
|
16446
|
-
OBJECT_NAME = "Color"
|
|
16447
|
-
local KEYS = {
|
|
16448
|
-
"R",
|
|
16449
|
-
"G",
|
|
16450
|
-
"B",
|
|
16451
|
-
"A",
|
|
16452
|
-
"RO",
|
|
16453
|
-
"GO",
|
|
16454
|
-
"BO"
|
|
16455
|
-
}
|
|
16456
|
-
function ____exports.colorEquals(self, color1, color2)
|
|
16457
|
-
return isaacAPIClassEquals(nil, color1, color2, KEYS)
|
|
16458
|
-
end
|
|
16459
|
-
function ____exports.copyColor(self, color)
|
|
16460
|
-
if not ____exports.isColor(nil, color) then
|
|
16461
|
-
error(((("Failed to copy a " .. OBJECT_NAME) .. " object since the provided object was not a userdata ") .. OBJECT_NAME) .. " class.")
|
|
16462
|
-
end
|
|
16463
|
-
return Color(
|
|
16464
|
-
color.R,
|
|
16465
|
-
color.G,
|
|
16466
|
-
color.B,
|
|
16467
|
-
color.A,
|
|
16468
|
-
color.RO,
|
|
16469
|
-
color.GO,
|
|
16470
|
-
color.BO
|
|
16471
|
-
)
|
|
16472
|
-
end
|
|
16473
|
-
function ____exports.deserializeColor(self, color)
|
|
16474
|
-
if not isTable(nil, color) then
|
|
16475
|
-
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object was not a Lua table.")
|
|
16476
|
-
end
|
|
16477
|
-
local r, g, b, a, ro, go, bo = table.unpack(getNumbersFromTable(
|
|
16478
|
-
nil,
|
|
16479
|
-
color,
|
|
16480
|
-
OBJECT_NAME,
|
|
16481
|
-
table.unpack(KEYS)
|
|
16482
|
-
))
|
|
16483
|
-
if r == nil then
|
|
16484
|
-
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: R")
|
|
16485
|
-
end
|
|
16486
|
-
if g == nil then
|
|
16487
|
-
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: G")
|
|
16488
|
-
end
|
|
16489
|
-
if b == nil then
|
|
16490
|
-
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: B")
|
|
16084
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
16085
|
+
local RenderMode = ____isaac_2Dtypescript_2Ddefinitions.RenderMode
|
|
16086
|
+
local ____cachedClasses = require("src.core.cachedClasses")
|
|
16087
|
+
local game = ____cachedClasses.game
|
|
16088
|
+
function ____exports.eRange(self, start, ____end, increment)
|
|
16089
|
+
if increment == nil then
|
|
16090
|
+
increment = 1
|
|
16491
16091
|
end
|
|
16492
|
-
|
|
16493
|
-
|
|
16494
|
-
g,
|
|
16495
|
-
b,
|
|
16496
|
-
a,
|
|
16497
|
-
ro,
|
|
16498
|
-
go,
|
|
16499
|
-
bo
|
|
16500
|
-
)
|
|
16501
|
-
end
|
|
16502
|
-
function ____exports.getRandomColor(self, seedOrRNG, alpha)
|
|
16503
|
-
if seedOrRNG == nil then
|
|
16504
|
-
seedOrRNG = getRandomSeed(nil)
|
|
16092
|
+
if ____end == nil then
|
|
16093
|
+
return ____exports.eRange(nil, 0, start)
|
|
16505
16094
|
end
|
|
16506
|
-
|
|
16507
|
-
|
|
16095
|
+
local array = {}
|
|
16096
|
+
do
|
|
16097
|
+
local i = start
|
|
16098
|
+
while i < ____end do
|
|
16099
|
+
array[#array + 1] = i
|
|
16100
|
+
i = i + increment
|
|
16101
|
+
end
|
|
16508
16102
|
end
|
|
16509
|
-
|
|
16510
|
-
local r = getRandom(nil, rng)
|
|
16511
|
-
local g = getRandom(nil, rng)
|
|
16512
|
-
local b = getRandom(nil, rng)
|
|
16513
|
-
return Color(r, g, b, alpha)
|
|
16103
|
+
return array
|
|
16514
16104
|
end
|
|
16515
|
-
function ____exports.
|
|
16516
|
-
if
|
|
16517
|
-
|
|
16105
|
+
function ____exports.getTraversalDescription(self, key, traversalDescription)
|
|
16106
|
+
if traversalDescription ~= "" then
|
|
16107
|
+
traversalDescription = traversalDescription .. " --> "
|
|
16518
16108
|
end
|
|
16519
|
-
|
|
16520
|
-
|
|
16521
|
-
object,
|
|
16522
|
-
table.unpack(KEYS)
|
|
16523
|
-
) and object[SerializationBrand.COLOR] ~= nil
|
|
16109
|
+
traversalDescription = traversalDescription .. tostring(key)
|
|
16110
|
+
return traversalDescription
|
|
16524
16111
|
end
|
|
16525
|
-
function ____exports.
|
|
16526
|
-
if
|
|
16527
|
-
|
|
16112
|
+
function ____exports.iRange(self, start, ____end, increment)
|
|
16113
|
+
if increment == nil then
|
|
16114
|
+
increment = 1
|
|
16528
16115
|
end
|
|
16529
|
-
|
|
16530
|
-
|
|
16531
|
-
colorTable[SerializationBrand.COLOR] = ""
|
|
16532
|
-
return colorTable
|
|
16533
|
-
end
|
|
16534
|
-
return ____exports
|
|
16535
|
-
end,
|
|
16536
|
-
["src.functions.kColor"] = function(...)
|
|
16537
|
-
local ____exports = {}
|
|
16538
|
-
local OBJECT_NAME
|
|
16539
|
-
local ____SerializationBrand = require("src.enums.SerializationBrand")
|
|
16540
|
-
local SerializationBrand = ____SerializationBrand.SerializationBrand
|
|
16541
|
-
local ____isaacAPIClass = require("src.functions.isaacAPIClass")
|
|
16542
|
-
local isaacAPIClassEquals = ____isaacAPIClass.isaacAPIClassEquals
|
|
16543
|
-
local isIsaacAPIClassOfType = ____isaacAPIClass.isIsaacAPIClassOfType
|
|
16544
|
-
local ____random = require("src.functions.random")
|
|
16545
|
-
local getRandom = ____random.getRandom
|
|
16546
|
-
local ____rng = require("src.functions.rng")
|
|
16547
|
-
local getRandomSeed = ____rng.getRandomSeed
|
|
16548
|
-
local isRNG = ____rng.isRNG
|
|
16549
|
-
local newRNG = ____rng.newRNG
|
|
16550
|
-
local ____table = require("src.functions.table")
|
|
16551
|
-
local copyUserdataValuesToTable = ____table.copyUserdataValuesToTable
|
|
16552
|
-
local getNumbersFromTable = ____table.getNumbersFromTable
|
|
16553
|
-
local tableHasKeys = ____table.tableHasKeys
|
|
16554
|
-
local ____types = require("src.functions.types")
|
|
16555
|
-
local isTable = ____types.isTable
|
|
16556
|
-
function ____exports.isKColor(self, object)
|
|
16557
|
-
return isIsaacAPIClassOfType(nil, object, OBJECT_NAME)
|
|
16558
|
-
end
|
|
16559
|
-
OBJECT_NAME = "KColor"
|
|
16560
|
-
local KEYS = {"Red", "Green", "Blue", "Alpha"}
|
|
16561
|
-
function ____exports.copyKColor(self, kColor)
|
|
16562
|
-
if not ____exports.isKColor(nil, kColor) then
|
|
16563
|
-
error(((("Failed to copy a " .. OBJECT_NAME) .. " object since the provided object was not a userdata ") .. OBJECT_NAME) .. " class.")
|
|
16116
|
+
if ____end == nil then
|
|
16117
|
+
return ____exports.iRange(nil, 0, start)
|
|
16564
16118
|
end
|
|
16565
|
-
|
|
16119
|
+
local exclusiveEnd = ____end + 1
|
|
16120
|
+
return ____exports.eRange(nil, start, exclusiveEnd, increment)
|
|
16566
16121
|
end
|
|
16567
|
-
function ____exports.
|
|
16568
|
-
|
|
16569
|
-
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object was not a Lua table.")
|
|
16570
|
-
end
|
|
16571
|
-
local r, g, b, a = table.unpack(getNumbersFromTable(
|
|
16572
|
-
nil,
|
|
16573
|
-
kColor,
|
|
16574
|
-
OBJECT_NAME,
|
|
16575
|
-
table.unpack(KEYS)
|
|
16576
|
-
))
|
|
16577
|
-
if r == nil then
|
|
16578
|
-
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: Red")
|
|
16579
|
-
end
|
|
16580
|
-
if g == nil then
|
|
16581
|
-
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: Green")
|
|
16582
|
-
end
|
|
16583
|
-
if b == nil then
|
|
16584
|
-
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: Blue")
|
|
16585
|
-
end
|
|
16586
|
-
if a == nil then
|
|
16587
|
-
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: Alpha")
|
|
16588
|
-
end
|
|
16589
|
-
return KColor(r, g, b, a)
|
|
16122
|
+
function ____exports.inRange(self, num, start, ____end)
|
|
16123
|
+
return num >= start and num <= ____end
|
|
16590
16124
|
end
|
|
16591
|
-
function ____exports.
|
|
16592
|
-
|
|
16593
|
-
|
|
16594
|
-
|
|
16595
|
-
if alpha == nil then
|
|
16596
|
-
alpha = 1
|
|
16597
|
-
end
|
|
16598
|
-
local rng = isRNG(nil, seedOrRNG) and seedOrRNG or newRNG(nil, seedOrRNG)
|
|
16599
|
-
local r = getRandom(nil, rng)
|
|
16600
|
-
local g = getRandom(nil, rng)
|
|
16601
|
-
local b = getRandom(nil, rng)
|
|
16602
|
-
return KColor(r, g, b, alpha)
|
|
16125
|
+
function ____exports.isReflectionRender(self)
|
|
16126
|
+
local room = game:GetRoom()
|
|
16127
|
+
local renderMode = room:GetRenderMode()
|
|
16128
|
+
return renderMode == RenderMode.WATER_REFLECT
|
|
16603
16129
|
end
|
|
16604
|
-
function
|
|
16605
|
-
|
|
16606
|
-
|
|
16130
|
+
____exports["repeat"] = function(self, n, func)
|
|
16131
|
+
do
|
|
16132
|
+
local i = 0
|
|
16133
|
+
while i < n do
|
|
16134
|
+
func(nil, i)
|
|
16135
|
+
i = i + 1
|
|
16136
|
+
end
|
|
16607
16137
|
end
|
|
16608
|
-
return tableHasKeys(
|
|
16609
|
-
nil,
|
|
16610
|
-
object,
|
|
16611
|
-
table.unpack(KEYS)
|
|
16612
|
-
) and object[SerializationBrand.K_COLOR] ~= nil
|
|
16613
|
-
end
|
|
16614
|
-
function ____exports.kColorEquals(self, kColor1, kColor2)
|
|
16615
|
-
return isaacAPIClassEquals(nil, kColor1, kColor2, KEYS)
|
|
16616
16138
|
end
|
|
16617
|
-
function ____exports.
|
|
16618
|
-
if not ____exports.isKColor(nil, kColor) then
|
|
16619
|
-
error(((("Failed to serialize a " .. OBJECT_NAME) .. " object since the provided object was not a userdata ") .. OBJECT_NAME) .. " class.")
|
|
16620
|
-
end
|
|
16621
|
-
local kColorTable = {}
|
|
16622
|
-
copyUserdataValuesToTable(nil, kColor, KEYS, kColorTable)
|
|
16623
|
-
kColorTable[SerializationBrand.K_COLOR] = ""
|
|
16624
|
-
return kColorTable
|
|
16139
|
+
function ____exports.todo(self, ...)
|
|
16625
16140
|
end
|
|
16626
|
-
return ____exports
|
|
16627
|
-
end,
|
|
16628
|
-
["src.objects.directionNames"] = function(...)
|
|
16629
|
-
local ____exports = {}
|
|
16630
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
16631
|
-
local Direction = ____isaac_2Dtypescript_2Ddefinitions.Direction
|
|
16632
|
-
____exports.DIRECTION_NAMES = {
|
|
16633
|
-
[Direction.NO_DIRECTION] = nil,
|
|
16634
|
-
[Direction.LEFT] = "left",
|
|
16635
|
-
[Direction.UP] = "up",
|
|
16636
|
-
[Direction.RIGHT] = "right",
|
|
16637
|
-
[Direction.DOWN] = "down"
|
|
16638
|
-
}
|
|
16639
|
-
return ____exports
|
|
16640
|
-
end,
|
|
16641
|
-
["src.objects.directionToDegrees"] = function(...)
|
|
16642
|
-
local ____exports = {}
|
|
16643
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
16644
|
-
local Direction = ____isaac_2Dtypescript_2Ddefinitions.Direction
|
|
16645
|
-
____exports.DIRECTION_TO_DEGREES = {
|
|
16646
|
-
[Direction.NO_DIRECTION] = 0,
|
|
16647
|
-
[Direction.LEFT] = 180,
|
|
16648
|
-
[Direction.UP] = 270,
|
|
16649
|
-
[Direction.RIGHT] = 0,
|
|
16650
|
-
[Direction.DOWN] = 90
|
|
16651
|
-
}
|
|
16652
|
-
return ____exports
|
|
16653
|
-
end,
|
|
16654
|
-
["src.objects.directionToMoveAction"] = function(...)
|
|
16655
|
-
local ____exports = {}
|
|
16656
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
16657
|
-
local ButtonAction = ____isaac_2Dtypescript_2Ddefinitions.ButtonAction
|
|
16658
|
-
local Direction = ____isaac_2Dtypescript_2Ddefinitions.Direction
|
|
16659
|
-
____exports.DIRECTION_TO_MOVE_ACTION = {
|
|
16660
|
-
[Direction.NO_DIRECTION] = nil,
|
|
16661
|
-
[Direction.LEFT] = ButtonAction.LEFT,
|
|
16662
|
-
[Direction.UP] = ButtonAction.UP,
|
|
16663
|
-
[Direction.RIGHT] = ButtonAction.RIGHT,
|
|
16664
|
-
[Direction.DOWN] = ButtonAction.DOWN
|
|
16665
|
-
}
|
|
16666
|
-
return ____exports
|
|
16667
|
-
end,
|
|
16668
|
-
["src.objects.directionToShootAction"] = function(...)
|
|
16669
|
-
local ____exports = {}
|
|
16670
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
16671
|
-
local ButtonAction = ____isaac_2Dtypescript_2Ddefinitions.ButtonAction
|
|
16672
|
-
local Direction = ____isaac_2Dtypescript_2Ddefinitions.Direction
|
|
16673
|
-
____exports.DIRECTION_TO_SHOOT_ACTION = {
|
|
16674
|
-
[Direction.NO_DIRECTION] = nil,
|
|
16675
|
-
[Direction.LEFT] = ButtonAction.SHOOT_LEFT,
|
|
16676
|
-
[Direction.UP] = ButtonAction.SHOOT_UP,
|
|
16677
|
-
[Direction.RIGHT] = ButtonAction.SHOOT_RIGHT,
|
|
16678
|
-
[Direction.DOWN] = ButtonAction.SHOOT_DOWN
|
|
16679
|
-
}
|
|
16680
16141
|
return ____exports
|
|
16681
16142
|
end,
|
|
16682
16143
|
["src.functions.array"] = function(...)
|
|
@@ -16927,216 +16388,678 @@ end
|
|
|
16927
16388
|
function ____exports.getLastElement(self, array)
|
|
16928
16389
|
return array[#array]
|
|
16929
16390
|
end
|
|
16930
|
-
function ____exports.getRandomArrayElement(self, array, seedOrRNG, exceptions)
|
|
16931
|
-
if seedOrRNG == nil then
|
|
16932
|
-
seedOrRNG = getRandomSeed(nil)
|
|
16391
|
+
function ____exports.getRandomArrayElement(self, array, seedOrRNG, exceptions)
|
|
16392
|
+
if seedOrRNG == nil then
|
|
16393
|
+
seedOrRNG = getRandomSeed(nil)
|
|
16394
|
+
end
|
|
16395
|
+
if exceptions == nil then
|
|
16396
|
+
exceptions = {}
|
|
16397
|
+
end
|
|
16398
|
+
if #array == 0 then
|
|
16399
|
+
error("Failed to get a random array element since the provided array is empty.")
|
|
16400
|
+
end
|
|
16401
|
+
local arrayWithoutExceptions = ____exports.arrayRemove(
|
|
16402
|
+
nil,
|
|
16403
|
+
array,
|
|
16404
|
+
table.unpack(exceptions)
|
|
16405
|
+
)
|
|
16406
|
+
local randomIndex = ____exports.getRandomArrayIndex(nil, arrayWithoutExceptions, seedOrRNG)
|
|
16407
|
+
local randomElement = arrayWithoutExceptions[randomIndex + 1]
|
|
16408
|
+
if randomElement == nil then
|
|
16409
|
+
error(("Failed to get a random array element since the random index of " .. tostring(randomIndex)) .. " was not valid.")
|
|
16410
|
+
end
|
|
16411
|
+
return randomElement
|
|
16412
|
+
end
|
|
16413
|
+
function ____exports.getRandomArrayElementAndRemove(self, array, seedOrRNG, exceptions)
|
|
16414
|
+
if seedOrRNG == nil then
|
|
16415
|
+
seedOrRNG = getRandomSeed(nil)
|
|
16416
|
+
end
|
|
16417
|
+
if exceptions == nil then
|
|
16418
|
+
exceptions = {}
|
|
16419
|
+
end
|
|
16420
|
+
local randomArrayElement = ____exports.getRandomArrayElement(nil, array, seedOrRNG, exceptions)
|
|
16421
|
+
____exports.arrayRemoveInPlace(nil, array, randomArrayElement)
|
|
16422
|
+
return randomArrayElement
|
|
16423
|
+
end
|
|
16424
|
+
function ____exports.isArray(self, object, ensureContiguousValues)
|
|
16425
|
+
if ensureContiguousValues == nil then
|
|
16426
|
+
ensureContiguousValues = true
|
|
16427
|
+
end
|
|
16428
|
+
if not isTable(nil, object) then
|
|
16429
|
+
return false
|
|
16430
|
+
end
|
|
16431
|
+
local metatable = getmetatable(object)
|
|
16432
|
+
if metatable ~= nil then
|
|
16433
|
+
return false
|
|
16434
|
+
end
|
|
16435
|
+
local keys = __TS__ObjectKeys(object)
|
|
16436
|
+
if #keys == 0 then
|
|
16437
|
+
return true
|
|
16438
|
+
end
|
|
16439
|
+
local hasAllNumberKeys = __TS__ArrayEvery(
|
|
16440
|
+
keys,
|
|
16441
|
+
function(____, key) return isNumber(nil, key) end
|
|
16442
|
+
)
|
|
16443
|
+
if not hasAllNumberKeys then
|
|
16444
|
+
return false
|
|
16445
|
+
end
|
|
16446
|
+
if ensureContiguousValues then
|
|
16447
|
+
do
|
|
16448
|
+
local i = 1
|
|
16449
|
+
while i <= #keys do
|
|
16450
|
+
local element = object[i]
|
|
16451
|
+
if element == nil then
|
|
16452
|
+
return false
|
|
16453
|
+
end
|
|
16454
|
+
i = i + 1
|
|
16455
|
+
end
|
|
16456
|
+
end
|
|
16457
|
+
end
|
|
16458
|
+
return true
|
|
16459
|
+
end
|
|
16460
|
+
function ____exports.isArrayContiguous(self, array)
|
|
16461
|
+
local lastValue
|
|
16462
|
+
for ____, element in ipairs(array) do
|
|
16463
|
+
if lastValue == nil then
|
|
16464
|
+
lastValue = element - 1
|
|
16465
|
+
end
|
|
16466
|
+
if element ~= lastValue - 1 then
|
|
16467
|
+
return false
|
|
16468
|
+
end
|
|
16469
|
+
end
|
|
16470
|
+
return true
|
|
16471
|
+
end
|
|
16472
|
+
function ____exports.isArrayInArray(self, arrayToMatch, parentArray)
|
|
16473
|
+
return __TS__ArraySome(
|
|
16474
|
+
parentArray,
|
|
16475
|
+
function(____, element) return ____exports.arrayEquals(nil, element, arrayToMatch) end
|
|
16476
|
+
)
|
|
16477
|
+
end
|
|
16478
|
+
function ____exports.shuffleArray(self, originalArray, seedOrRNG)
|
|
16479
|
+
if seedOrRNG == nil then
|
|
16480
|
+
seedOrRNG = getRandomSeed(nil)
|
|
16481
|
+
end
|
|
16482
|
+
local array = ____exports.copyArray(nil, originalArray)
|
|
16483
|
+
____exports.shuffleArrayInPlace(nil, array, seedOrRNG)
|
|
16484
|
+
return array
|
|
16485
|
+
end
|
|
16486
|
+
function ____exports.sumArray(self, array)
|
|
16487
|
+
return __TS__ArrayReduce(
|
|
16488
|
+
array,
|
|
16489
|
+
function(____, accumulator, element) return accumulator + element end
|
|
16490
|
+
)
|
|
16491
|
+
end
|
|
16492
|
+
return ____exports
|
|
16493
|
+
end,
|
|
16494
|
+
["src.functions.enums"] = function(...)
|
|
16495
|
+
local ____lualib = require("lualib_bundle")
|
|
16496
|
+
local __TS__ArraySort = ____lualib.__TS__ArraySort
|
|
16497
|
+
local __TS__ArrayMap = ____lualib.__TS__ArrayMap
|
|
16498
|
+
local Set = ____lualib.Set
|
|
16499
|
+
local __TS__New = ____lualib.__TS__New
|
|
16500
|
+
local ____exports = {}
|
|
16501
|
+
local ____array = require("src.functions.array")
|
|
16502
|
+
local getRandomArrayElement = ____array.getRandomArrayElement
|
|
16503
|
+
local ____rng = require("src.functions.rng")
|
|
16504
|
+
local getRandomSeed = ____rng.getRandomSeed
|
|
16505
|
+
local ____types = require("src.functions.types")
|
|
16506
|
+
local isString = ____types.isString
|
|
16507
|
+
local ____utils = require("src.functions.utils")
|
|
16508
|
+
local iRange = ____utils.iRange
|
|
16509
|
+
function ____exports.getEnumEntries(self, transpiledEnum)
|
|
16510
|
+
local enumEntries = {}
|
|
16511
|
+
for key, value in pairs(transpiledEnum) do
|
|
16512
|
+
if isString(nil, key) then
|
|
16513
|
+
enumEntries[#enumEntries + 1] = {key, value}
|
|
16514
|
+
end
|
|
16515
|
+
end
|
|
16516
|
+
__TS__ArraySort(
|
|
16517
|
+
enumEntries,
|
|
16518
|
+
function(____, ____bindingPattern0, ____bindingPattern1)
|
|
16519
|
+
local value1
|
|
16520
|
+
local _key1 = ____bindingPattern0[1]
|
|
16521
|
+
value1 = ____bindingPattern0[2]
|
|
16522
|
+
local value2
|
|
16523
|
+
local _key2 = ____bindingPattern1[1]
|
|
16524
|
+
value2 = ____bindingPattern1[2]
|
|
16525
|
+
return value1 < value2 and -1 or (value1 > value2 and 1 or 0)
|
|
16526
|
+
end
|
|
16527
|
+
)
|
|
16528
|
+
return enumEntries
|
|
16529
|
+
end
|
|
16530
|
+
function ____exports.getEnumKeys(self, transpiledEnum)
|
|
16531
|
+
local enumEntries = ____exports.getEnumEntries(nil, transpiledEnum)
|
|
16532
|
+
return __TS__ArrayMap(
|
|
16533
|
+
enumEntries,
|
|
16534
|
+
function(____, ____bindingPattern0)
|
|
16535
|
+
local key
|
|
16536
|
+
key = ____bindingPattern0[1]
|
|
16537
|
+
local _value = ____bindingPattern0[2]
|
|
16538
|
+
return key
|
|
16539
|
+
end
|
|
16540
|
+
)
|
|
16541
|
+
end
|
|
16542
|
+
function ____exports.getEnumLength(self, transpiledEnum)
|
|
16543
|
+
local enumEntries = ____exports.getEnumEntries(nil, transpiledEnum)
|
|
16544
|
+
return #enumEntries
|
|
16545
|
+
end
|
|
16546
|
+
function ____exports.getEnumValues(self, transpiledEnum)
|
|
16547
|
+
local enumEntries = ____exports.getEnumEntries(nil, transpiledEnum)
|
|
16548
|
+
return __TS__ArrayMap(
|
|
16549
|
+
enumEntries,
|
|
16550
|
+
function(____, ____bindingPattern0)
|
|
16551
|
+
local value
|
|
16552
|
+
local _key = ____bindingPattern0[1]
|
|
16553
|
+
value = ____bindingPattern0[2]
|
|
16554
|
+
return value
|
|
16555
|
+
end
|
|
16556
|
+
)
|
|
16557
|
+
end
|
|
16558
|
+
function ____exports.getLastEnumValue(self, transpiledEnum)
|
|
16559
|
+
local enumValues = ____exports.getEnumValues(nil, transpiledEnum)
|
|
16560
|
+
local lastElement = enumValues[#enumValues]
|
|
16561
|
+
if lastElement == nil then
|
|
16562
|
+
error("Failed to get the last value from an enum since the enum was empty.")
|
|
16563
|
+
end
|
|
16564
|
+
return lastElement
|
|
16565
|
+
end
|
|
16566
|
+
function ____exports.getRandomEnumValue(self, transpiledEnum, seedOrRNG, exceptions)
|
|
16567
|
+
if seedOrRNG == nil then
|
|
16568
|
+
seedOrRNG = getRandomSeed(nil)
|
|
16569
|
+
end
|
|
16570
|
+
if exceptions == nil then
|
|
16571
|
+
exceptions = {}
|
|
16572
|
+
end
|
|
16573
|
+
local enumValues = ____exports.getEnumValues(nil, transpiledEnum)
|
|
16574
|
+
return getRandomArrayElement(nil, enumValues, seedOrRNG, exceptions)
|
|
16575
|
+
end
|
|
16576
|
+
function ____exports.validateCustomEnum(self, transpiledEnumName, transpiledEnum)
|
|
16577
|
+
for ____, ____value in ipairs(____exports.getEnumEntries(nil, transpiledEnum)) do
|
|
16578
|
+
local key = ____value[1]
|
|
16579
|
+
local value = ____value[2]
|
|
16580
|
+
if value == -1 then
|
|
16581
|
+
error((("Failed to find the custom enum value: " .. transpiledEnumName) .. ".") .. key)
|
|
16582
|
+
end
|
|
16583
|
+
end
|
|
16584
|
+
end
|
|
16585
|
+
function ____exports.validateEnumContiguous(self, transpiledEnumName, transpiledEnum)
|
|
16586
|
+
local values = ____exports.getEnumValues(nil, transpiledEnum)
|
|
16587
|
+
local lastValue = values[#values]
|
|
16588
|
+
if lastValue == nil then
|
|
16589
|
+
error("Failed to validate that an enum was contiguous, since the last value was undefined.")
|
|
16590
|
+
end
|
|
16591
|
+
if type(lastValue) ~= "number" then
|
|
16592
|
+
error("Failed to validate that an enum was contiguous, since the last value was not a number.")
|
|
16593
|
+
end
|
|
16594
|
+
local valuesSet = __TS__New(Set, values)
|
|
16595
|
+
for ____, value in ipairs(iRange(nil, lastValue)) do
|
|
16596
|
+
if not valuesSet:has(value) then
|
|
16597
|
+
error((("Failed to find a custom enum value of " .. tostring(value)) .. " for: ") .. transpiledEnumName)
|
|
16598
|
+
end
|
|
16599
|
+
end
|
|
16600
|
+
end
|
|
16601
|
+
function ____exports.validateInterfaceMatchesEnum(self)
|
|
16602
|
+
end
|
|
16603
|
+
return ____exports
|
|
16604
|
+
end,
|
|
16605
|
+
["src.interfaces.StatTypeType"] = function(...)
|
|
16606
|
+
local ____exports = {}
|
|
16607
|
+
local ____StatType = require("src.enums.StatType")
|
|
16608
|
+
local StatType = ____StatType.StatType
|
|
16609
|
+
return ____exports
|
|
16610
|
+
end,
|
|
16611
|
+
["src.interfaces.private.AddCallbackParametersCustom"] = function(...)
|
|
16612
|
+
local ____exports = {}
|
|
16613
|
+
local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
|
|
16614
|
+
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
16615
|
+
local ____enums = require("src.functions.enums")
|
|
16616
|
+
local validateInterfaceMatchesEnum = ____enums.validateInterfaceMatchesEnum
|
|
16617
|
+
validateInterfaceMatchesEnum(nil)
|
|
16618
|
+
return ____exports
|
|
16619
|
+
end,
|
|
16620
|
+
["src.types.AllButFirst"] = function(...)
|
|
16621
|
+
local ____exports = {}
|
|
16622
|
+
return ____exports
|
|
16623
|
+
end,
|
|
16624
|
+
["src.types.AnyFunction"] = function(...)
|
|
16625
|
+
local ____exports = {}
|
|
16626
|
+
return ____exports
|
|
16627
|
+
end,
|
|
16628
|
+
["src.enums.ISCFeature"] = function(...)
|
|
16629
|
+
local ____exports = {}
|
|
16630
|
+
____exports.ISCFeature = {}
|
|
16631
|
+
____exports.ISCFeature.CUSTOM_REVIVE = 0
|
|
16632
|
+
____exports.ISCFeature[____exports.ISCFeature.CUSTOM_REVIVE] = "CUSTOM_REVIVE"
|
|
16633
|
+
____exports.ISCFeature.ESAU_JR_DETECTION = 1
|
|
16634
|
+
____exports.ISCFeature[____exports.ISCFeature.ESAU_JR_DETECTION] = "ESAU_JR_DETECTION"
|
|
16635
|
+
____exports.ISCFeature.FLIP_DETECTION = 2
|
|
16636
|
+
____exports.ISCFeature[____exports.ISCFeature.FLIP_DETECTION] = "FLIP_DETECTION"
|
|
16637
|
+
____exports.ISCFeature.GRID_ENTITY_COLLISION_DETECTION = 3
|
|
16638
|
+
____exports.ISCFeature[____exports.ISCFeature.GRID_ENTITY_COLLISION_DETECTION] = "GRID_ENTITY_COLLISION_DETECTION"
|
|
16639
|
+
____exports.ISCFeature.GRID_ENTITY_RENDER_DETECTION = 4
|
|
16640
|
+
____exports.ISCFeature[____exports.ISCFeature.GRID_ENTITY_RENDER_DETECTION] = "GRID_ENTITY_RENDER_DETECTION"
|
|
16641
|
+
____exports.ISCFeature.GRID_ENTITY_UPDATE_DETECTION = 5
|
|
16642
|
+
____exports.ISCFeature[____exports.ISCFeature.GRID_ENTITY_UPDATE_DETECTION] = "GRID_ENTITY_UPDATE_DETECTION"
|
|
16643
|
+
____exports.ISCFeature.GAME_REORDERED_CALLBACKS = 6
|
|
16644
|
+
____exports.ISCFeature[____exports.ISCFeature.GAME_REORDERED_CALLBACKS] = "GAME_REORDERED_CALLBACKS"
|
|
16645
|
+
____exports.ISCFeature.ITEM_PICKUP_DETECTION = 7
|
|
16646
|
+
____exports.ISCFeature[____exports.ISCFeature.ITEM_PICKUP_DETECTION] = "ITEM_PICKUP_DETECTION"
|
|
16647
|
+
____exports.ISCFeature.PLAYER_COLLECTIBLE_DETECTION = 8
|
|
16648
|
+
____exports.ISCFeature[____exports.ISCFeature.PLAYER_COLLECTIBLE_DETECTION] = "PLAYER_COLLECTIBLE_DETECTION"
|
|
16649
|
+
____exports.ISCFeature.PLAYER_REORDERED_CALLBACKS = 9
|
|
16650
|
+
____exports.ISCFeature[____exports.ISCFeature.PLAYER_REORDERED_CALLBACKS] = "PLAYER_REORDERED_CALLBACKS"
|
|
16651
|
+
____exports.ISCFeature.SLOT_DESTROYED_DETECTION = 10
|
|
16652
|
+
____exports.ISCFeature[____exports.ISCFeature.SLOT_DESTROYED_DETECTION] = "SLOT_DESTROYED_DETECTION"
|
|
16653
|
+
____exports.ISCFeature.SLOT_RENDER_DETECTION = 11
|
|
16654
|
+
____exports.ISCFeature[____exports.ISCFeature.SLOT_RENDER_DETECTION] = "SLOT_RENDER_DETECTION"
|
|
16655
|
+
____exports.ISCFeature.SLOT_UPDATE_DETECTION = 12
|
|
16656
|
+
____exports.ISCFeature[____exports.ISCFeature.SLOT_UPDATE_DETECTION] = "SLOT_UPDATE_DETECTION"
|
|
16657
|
+
____exports.ISCFeature.CHARACTER_HEALTH_CONVERSION = 13
|
|
16658
|
+
____exports.ISCFeature[____exports.ISCFeature.CHARACTER_HEALTH_CONVERSION] = "CHARACTER_HEALTH_CONVERSION"
|
|
16659
|
+
____exports.ISCFeature.CHARACTER_STATS = 14
|
|
16660
|
+
____exports.ISCFeature[____exports.ISCFeature.CHARACTER_STATS] = "CHARACTER_STATS"
|
|
16661
|
+
____exports.ISCFeature.COLLECTIBLE_ITEM_POOL_TYPE = 15
|
|
16662
|
+
____exports.ISCFeature[____exports.ISCFeature.COLLECTIBLE_ITEM_POOL_TYPE] = "COLLECTIBLE_ITEM_POOL_TYPE"
|
|
16663
|
+
____exports.ISCFeature.CUSTOM_GRID_ENTITIES = 16
|
|
16664
|
+
____exports.ISCFeature[____exports.ISCFeature.CUSTOM_GRID_ENTITIES] = "CUSTOM_GRID_ENTITIES"
|
|
16665
|
+
____exports.ISCFeature.CUSTOM_ITEM_POOLS = 17
|
|
16666
|
+
____exports.ISCFeature[____exports.ISCFeature.CUSTOM_ITEM_POOLS] = "CUSTOM_ITEM_POOLS"
|
|
16667
|
+
____exports.ISCFeature.CUSTOM_HOTKEYS = 18
|
|
16668
|
+
____exports.ISCFeature[____exports.ISCFeature.CUSTOM_HOTKEYS] = "CUSTOM_HOTKEYS"
|
|
16669
|
+
____exports.ISCFeature.CUSTOM_PICKUPS = 19
|
|
16670
|
+
____exports.ISCFeature[____exports.ISCFeature.CUSTOM_PICKUPS] = "CUSTOM_PICKUPS"
|
|
16671
|
+
____exports.ISCFeature.CUSTOM_STAGES = 20
|
|
16672
|
+
____exports.ISCFeature[____exports.ISCFeature.CUSTOM_STAGES] = "CUSTOM_STAGES"
|
|
16673
|
+
____exports.ISCFeature.CUSTOM_TRAPDOORS = 21
|
|
16674
|
+
____exports.ISCFeature[____exports.ISCFeature.CUSTOM_TRAPDOORS] = "CUSTOM_TRAPDOORS"
|
|
16675
|
+
____exports.ISCFeature.DEBUG_DISPLAY = 22
|
|
16676
|
+
____exports.ISCFeature[____exports.ISCFeature.DEBUG_DISPLAY] = "DEBUG_DISPLAY"
|
|
16677
|
+
____exports.ISCFeature.DEPLOY_JSON_ROOM = 23
|
|
16678
|
+
____exports.ISCFeature[____exports.ISCFeature.DEPLOY_JSON_ROOM] = "DEPLOY_JSON_ROOM"
|
|
16679
|
+
____exports.ISCFeature.DISABLE_ALL_SOUND = 24
|
|
16680
|
+
____exports.ISCFeature[____exports.ISCFeature.DISABLE_ALL_SOUND] = "DISABLE_ALL_SOUND"
|
|
16681
|
+
____exports.ISCFeature.DISABLE_INPUTS = 25
|
|
16682
|
+
____exports.ISCFeature[____exports.ISCFeature.DISABLE_INPUTS] = "DISABLE_INPUTS"
|
|
16683
|
+
____exports.ISCFeature.FADE_IN_REMOVER = 26
|
|
16684
|
+
____exports.ISCFeature[____exports.ISCFeature.FADE_IN_REMOVER] = "FADE_IN_REMOVER"
|
|
16685
|
+
____exports.ISCFeature.FAST_RESET = 27
|
|
16686
|
+
____exports.ISCFeature[____exports.ISCFeature.FAST_RESET] = "FAST_RESET"
|
|
16687
|
+
____exports.ISCFeature.FLYING_DETECTION = 28
|
|
16688
|
+
____exports.ISCFeature[____exports.ISCFeature.FLYING_DETECTION] = "FLYING_DETECTION"
|
|
16689
|
+
____exports.ISCFeature.FORGOTTEN_SWITCH = 29
|
|
16690
|
+
____exports.ISCFeature[____exports.ISCFeature.FORGOTTEN_SWITCH] = "FORGOTTEN_SWITCH"
|
|
16691
|
+
____exports.ISCFeature.EXTRA_CONSOLE_COMMANDS = 30
|
|
16692
|
+
____exports.ISCFeature[____exports.ISCFeature.EXTRA_CONSOLE_COMMANDS] = "EXTRA_CONSOLE_COMMANDS"
|
|
16693
|
+
____exports.ISCFeature.ITEM_POOL_DETECTION = 31
|
|
16694
|
+
____exports.ISCFeature[____exports.ISCFeature.ITEM_POOL_DETECTION] = "ITEM_POOL_DETECTION"
|
|
16695
|
+
____exports.ISCFeature.MODDED_ELEMENT_DETECTION = 32
|
|
16696
|
+
____exports.ISCFeature[____exports.ISCFeature.MODDED_ELEMENT_DETECTION] = "MODDED_ELEMENT_DETECTION"
|
|
16697
|
+
____exports.ISCFeature.MODDED_ELEMENT_SETS = 33
|
|
16698
|
+
____exports.ISCFeature[____exports.ISCFeature.MODDED_ELEMENT_SETS] = "MODDED_ELEMENT_SETS"
|
|
16699
|
+
____exports.ISCFeature.NO_SIREN_STEAL = 34
|
|
16700
|
+
____exports.ISCFeature[____exports.ISCFeature.NO_SIREN_STEAL] = "NO_SIREN_STEAL"
|
|
16701
|
+
____exports.ISCFeature.PAUSE = 35
|
|
16702
|
+
____exports.ISCFeature[____exports.ISCFeature.PAUSE] = "PAUSE"
|
|
16703
|
+
____exports.ISCFeature.PERSISTENT_ENTITIES = 36
|
|
16704
|
+
____exports.ISCFeature[____exports.ISCFeature.PERSISTENT_ENTITIES] = "PERSISTENT_ENTITIES"
|
|
16705
|
+
____exports.ISCFeature.PICKUP_INDEX_CREATION = 37
|
|
16706
|
+
____exports.ISCFeature[____exports.ISCFeature.PICKUP_INDEX_CREATION] = "PICKUP_INDEX_CREATION"
|
|
16707
|
+
____exports.ISCFeature.PLAYER_INVENTORY = 38
|
|
16708
|
+
____exports.ISCFeature[____exports.ISCFeature.PLAYER_INVENTORY] = "PLAYER_INVENTORY"
|
|
16709
|
+
____exports.ISCFeature.PONY_DETECTION = 39
|
|
16710
|
+
____exports.ISCFeature[____exports.ISCFeature.PONY_DETECTION] = "PONY_DETECTION"
|
|
16711
|
+
____exports.ISCFeature.PRESS_INPUT = 40
|
|
16712
|
+
____exports.ISCFeature[____exports.ISCFeature.PRESS_INPUT] = "PRESS_INPUT"
|
|
16713
|
+
____exports.ISCFeature.PREVENT_CHILD_ENTITIES = 41
|
|
16714
|
+
____exports.ISCFeature[____exports.ISCFeature.PREVENT_CHILD_ENTITIES] = "PREVENT_CHILD_ENTITIES"
|
|
16715
|
+
____exports.ISCFeature.PREVENT_COLLECTIBLE_ROTATION = 42
|
|
16716
|
+
____exports.ISCFeature[____exports.ISCFeature.PREVENT_COLLECTIBLE_ROTATION] = "PREVENT_COLLECTIBLE_ROTATION"
|
|
16717
|
+
____exports.ISCFeature.PREVENT_GRID_ENTITY_RESPAWN = 43
|
|
16718
|
+
____exports.ISCFeature[____exports.ISCFeature.PREVENT_GRID_ENTITY_RESPAWN] = "PREVENT_GRID_ENTITY_RESPAWN"
|
|
16719
|
+
____exports.ISCFeature.ROOM_CLEAR_FRAME = 44
|
|
16720
|
+
____exports.ISCFeature[____exports.ISCFeature.ROOM_CLEAR_FRAME] = "ROOM_CLEAR_FRAME"
|
|
16721
|
+
____exports.ISCFeature.ROOM_HISTORY = 45
|
|
16722
|
+
____exports.ISCFeature[____exports.ISCFeature.ROOM_HISTORY] = "ROOM_HISTORY"
|
|
16723
|
+
____exports.ISCFeature.RUN_IN_N_FRAMES = 46
|
|
16724
|
+
____exports.ISCFeature[____exports.ISCFeature.RUN_IN_N_FRAMES] = "RUN_IN_N_FRAMES"
|
|
16725
|
+
____exports.ISCFeature.RUN_NEXT_ROOM = 47
|
|
16726
|
+
____exports.ISCFeature[____exports.ISCFeature.RUN_NEXT_ROOM] = "RUN_NEXT_ROOM"
|
|
16727
|
+
____exports.ISCFeature.SAVE_DATA_MANAGER = 48
|
|
16728
|
+
____exports.ISCFeature[____exports.ISCFeature.SAVE_DATA_MANAGER] = "SAVE_DATA_MANAGER"
|
|
16729
|
+
____exports.ISCFeature.SPAWN_ALT_ROCK_REWARDS = 49
|
|
16730
|
+
____exports.ISCFeature[____exports.ISCFeature.SPAWN_ALT_ROCK_REWARDS] = "SPAWN_ALT_ROCK_REWARDS"
|
|
16731
|
+
____exports.ISCFeature.SPAWN_COLLECTIBLE = 50
|
|
16732
|
+
____exports.ISCFeature[____exports.ISCFeature.SPAWN_COLLECTIBLE] = "SPAWN_COLLECTIBLE"
|
|
16733
|
+
____exports.ISCFeature.STAGE_HISTORY = 51
|
|
16734
|
+
____exports.ISCFeature[____exports.ISCFeature.STAGE_HISTORY] = "STAGE_HISTORY"
|
|
16735
|
+
____exports.ISCFeature.START_AMBUSH = 52
|
|
16736
|
+
____exports.ISCFeature[____exports.ISCFeature.START_AMBUSH] = "START_AMBUSH"
|
|
16737
|
+
____exports.ISCFeature.TAINTED_LAZARUS_PLAYERS = 53
|
|
16738
|
+
____exports.ISCFeature[____exports.ISCFeature.TAINTED_LAZARUS_PLAYERS] = "TAINTED_LAZARUS_PLAYERS"
|
|
16739
|
+
return ____exports
|
|
16740
|
+
end,
|
|
16741
|
+
["src.functions.bitSet128"] = function(...)
|
|
16742
|
+
local ____exports = {}
|
|
16743
|
+
local OBJECT_NAME
|
|
16744
|
+
local ____SerializationBrand = require("src.enums.SerializationBrand")
|
|
16745
|
+
local SerializationBrand = ____SerializationBrand.SerializationBrand
|
|
16746
|
+
local ____isaacAPIClass = require("src.functions.isaacAPIClass")
|
|
16747
|
+
local isIsaacAPIClassOfType = ____isaacAPIClass.isIsaacAPIClassOfType
|
|
16748
|
+
local ____table = require("src.functions.table")
|
|
16749
|
+
local copyUserdataValuesToTable = ____table.copyUserdataValuesToTable
|
|
16750
|
+
local getNumbersFromTable = ____table.getNumbersFromTable
|
|
16751
|
+
local tableHasKeys = ____table.tableHasKeys
|
|
16752
|
+
local ____types = require("src.functions.types")
|
|
16753
|
+
local isTable = ____types.isTable
|
|
16754
|
+
function ____exports.isBitSet128(self, object)
|
|
16755
|
+
return isIsaacAPIClassOfType(nil, object, OBJECT_NAME)
|
|
16756
|
+
end
|
|
16757
|
+
OBJECT_NAME = "BitSet128"
|
|
16758
|
+
local KEYS = {"l", "h"}
|
|
16759
|
+
function ____exports.copyBitSet128(self, bitSet128)
|
|
16760
|
+
if not ____exports.isBitSet128(nil, bitSet128) then
|
|
16761
|
+
error(((("Failed to copy a " .. OBJECT_NAME) .. " object since the provided object was not a userdata ") .. OBJECT_NAME) .. " class.")
|
|
16762
|
+
end
|
|
16763
|
+
local lowBits = bitSet128.l
|
|
16764
|
+
local highBits = bitSet128.h
|
|
16765
|
+
return BitSet128(lowBits, highBits)
|
|
16766
|
+
end
|
|
16767
|
+
function ____exports.deserializeBitSet128(self, bitSet128)
|
|
16768
|
+
if not isTable(nil, bitSet128) then
|
|
16769
|
+
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object was not a Lua table.")
|
|
16770
|
+
end
|
|
16771
|
+
local l, h = table.unpack(getNumbersFromTable(
|
|
16772
|
+
nil,
|
|
16773
|
+
bitSet128,
|
|
16774
|
+
OBJECT_NAME,
|
|
16775
|
+
table.unpack(KEYS)
|
|
16776
|
+
))
|
|
16777
|
+
if l == nil then
|
|
16778
|
+
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: l")
|
|
16779
|
+
end
|
|
16780
|
+
if h == nil then
|
|
16781
|
+
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: h")
|
|
16782
|
+
end
|
|
16783
|
+
return BitSet128(l, h)
|
|
16784
|
+
end
|
|
16785
|
+
function ____exports.isSerializedBitSet128(self, object)
|
|
16786
|
+
if not isTable(nil, object) then
|
|
16787
|
+
return false
|
|
16788
|
+
end
|
|
16789
|
+
return tableHasKeys(
|
|
16790
|
+
nil,
|
|
16791
|
+
object,
|
|
16792
|
+
table.unpack(KEYS)
|
|
16793
|
+
) and object[SerializationBrand.BIT_SET_128] ~= nil
|
|
16794
|
+
end
|
|
16795
|
+
function ____exports.serializeBitSet128(self, bitSet128)
|
|
16796
|
+
if not ____exports.isBitSet128(nil, bitSet128) then
|
|
16797
|
+
error(((("Failed to serialize a " .. OBJECT_NAME) .. " object since the provided object was not a userdata ") .. OBJECT_NAME) .. " class.")
|
|
16798
|
+
end
|
|
16799
|
+
local bitSet128Table = {}
|
|
16800
|
+
copyUserdataValuesToTable(nil, bitSet128, KEYS, bitSet128Table)
|
|
16801
|
+
bitSet128Table[SerializationBrand.BIT_SET_128] = ""
|
|
16802
|
+
return bitSet128Table
|
|
16803
|
+
end
|
|
16804
|
+
return ____exports
|
|
16805
|
+
end,
|
|
16806
|
+
["src.functions.color"] = function(...)
|
|
16807
|
+
local ____exports = {}
|
|
16808
|
+
local OBJECT_NAME
|
|
16809
|
+
local ____SerializationBrand = require("src.enums.SerializationBrand")
|
|
16810
|
+
local SerializationBrand = ____SerializationBrand.SerializationBrand
|
|
16811
|
+
local ____isaacAPIClass = require("src.functions.isaacAPIClass")
|
|
16812
|
+
local isaacAPIClassEquals = ____isaacAPIClass.isaacAPIClassEquals
|
|
16813
|
+
local isIsaacAPIClassOfType = ____isaacAPIClass.isIsaacAPIClassOfType
|
|
16814
|
+
local ____random = require("src.functions.random")
|
|
16815
|
+
local getRandom = ____random.getRandom
|
|
16816
|
+
local ____rng = require("src.functions.rng")
|
|
16817
|
+
local getRandomSeed = ____rng.getRandomSeed
|
|
16818
|
+
local isRNG = ____rng.isRNG
|
|
16819
|
+
local newRNG = ____rng.newRNG
|
|
16820
|
+
local ____table = require("src.functions.table")
|
|
16821
|
+
local copyUserdataValuesToTable = ____table.copyUserdataValuesToTable
|
|
16822
|
+
local getNumbersFromTable = ____table.getNumbersFromTable
|
|
16823
|
+
local tableHasKeys = ____table.tableHasKeys
|
|
16824
|
+
local ____types = require("src.functions.types")
|
|
16825
|
+
local isTable = ____types.isTable
|
|
16826
|
+
function ____exports.isColor(self, object)
|
|
16827
|
+
return isIsaacAPIClassOfType(nil, object, OBJECT_NAME)
|
|
16828
|
+
end
|
|
16829
|
+
OBJECT_NAME = "Color"
|
|
16830
|
+
local KEYS = {
|
|
16831
|
+
"R",
|
|
16832
|
+
"G",
|
|
16833
|
+
"B",
|
|
16834
|
+
"A",
|
|
16835
|
+
"RO",
|
|
16836
|
+
"GO",
|
|
16837
|
+
"BO"
|
|
16838
|
+
}
|
|
16839
|
+
function ____exports.colorEquals(self, color1, color2)
|
|
16840
|
+
return isaacAPIClassEquals(nil, color1, color2, KEYS)
|
|
16841
|
+
end
|
|
16842
|
+
function ____exports.copyColor(self, color)
|
|
16843
|
+
if not ____exports.isColor(nil, color) then
|
|
16844
|
+
error(((("Failed to copy a " .. OBJECT_NAME) .. " object since the provided object was not a userdata ") .. OBJECT_NAME) .. " class.")
|
|
16845
|
+
end
|
|
16846
|
+
return Color(
|
|
16847
|
+
color.R,
|
|
16848
|
+
color.G,
|
|
16849
|
+
color.B,
|
|
16850
|
+
color.A,
|
|
16851
|
+
color.RO,
|
|
16852
|
+
color.GO,
|
|
16853
|
+
color.BO
|
|
16854
|
+
)
|
|
16855
|
+
end
|
|
16856
|
+
function ____exports.deserializeColor(self, color)
|
|
16857
|
+
if not isTable(nil, color) then
|
|
16858
|
+
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object was not a Lua table.")
|
|
16933
16859
|
end
|
|
16934
|
-
|
|
16935
|
-
|
|
16860
|
+
local r, g, b, a, ro, go, bo = table.unpack(getNumbersFromTable(
|
|
16861
|
+
nil,
|
|
16862
|
+
color,
|
|
16863
|
+
OBJECT_NAME,
|
|
16864
|
+
table.unpack(KEYS)
|
|
16865
|
+
))
|
|
16866
|
+
if r == nil then
|
|
16867
|
+
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: R")
|
|
16936
16868
|
end
|
|
16937
|
-
if
|
|
16938
|
-
error("Failed to
|
|
16869
|
+
if g == nil then
|
|
16870
|
+
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: G")
|
|
16939
16871
|
end
|
|
16940
|
-
|
|
16941
|
-
|
|
16942
|
-
array,
|
|
16943
|
-
table.unpack(exceptions)
|
|
16944
|
-
)
|
|
16945
|
-
local randomIndex = ____exports.getRandomArrayIndex(nil, arrayWithoutExceptions, seedOrRNG)
|
|
16946
|
-
local randomElement = arrayWithoutExceptions[randomIndex + 1]
|
|
16947
|
-
if randomElement == nil then
|
|
16948
|
-
error(("Failed to get a random array element since the random index of " .. tostring(randomIndex)) .. " was not valid.")
|
|
16872
|
+
if b == nil then
|
|
16873
|
+
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: B")
|
|
16949
16874
|
end
|
|
16950
|
-
return
|
|
16875
|
+
return Color(
|
|
16876
|
+
r,
|
|
16877
|
+
g,
|
|
16878
|
+
b,
|
|
16879
|
+
a,
|
|
16880
|
+
ro,
|
|
16881
|
+
go,
|
|
16882
|
+
bo
|
|
16883
|
+
)
|
|
16951
16884
|
end
|
|
16952
|
-
function ____exports.
|
|
16885
|
+
function ____exports.getRandomColor(self, seedOrRNG, alpha)
|
|
16953
16886
|
if seedOrRNG == nil then
|
|
16954
16887
|
seedOrRNG = getRandomSeed(nil)
|
|
16955
16888
|
end
|
|
16956
|
-
if
|
|
16957
|
-
|
|
16889
|
+
if alpha == nil then
|
|
16890
|
+
alpha = 1
|
|
16958
16891
|
end
|
|
16959
|
-
local
|
|
16960
|
-
|
|
16961
|
-
|
|
16892
|
+
local rng = isRNG(nil, seedOrRNG) and seedOrRNG or newRNG(nil, seedOrRNG)
|
|
16893
|
+
local r = getRandom(nil, rng)
|
|
16894
|
+
local g = getRandom(nil, rng)
|
|
16895
|
+
local b = getRandom(nil, rng)
|
|
16896
|
+
return Color(r, g, b, alpha)
|
|
16962
16897
|
end
|
|
16963
|
-
function ____exports.
|
|
16964
|
-
if ensureContiguousValues == nil then
|
|
16965
|
-
ensureContiguousValues = true
|
|
16966
|
-
end
|
|
16898
|
+
function ____exports.isSerializedColor(self, object)
|
|
16967
16899
|
if not isTable(nil, object) then
|
|
16968
16900
|
return false
|
|
16969
16901
|
end
|
|
16970
|
-
|
|
16971
|
-
|
|
16972
|
-
|
|
16973
|
-
|
|
16974
|
-
|
|
16975
|
-
if #keys == 0 then
|
|
16976
|
-
return true
|
|
16977
|
-
end
|
|
16978
|
-
local hasAllNumberKeys = __TS__ArrayEvery(
|
|
16979
|
-
keys,
|
|
16980
|
-
function(____, key) return isNumber(nil, key) end
|
|
16981
|
-
)
|
|
16982
|
-
if not hasAllNumberKeys then
|
|
16983
|
-
return false
|
|
16984
|
-
end
|
|
16985
|
-
if ensureContiguousValues then
|
|
16986
|
-
do
|
|
16987
|
-
local i = 1
|
|
16988
|
-
while i <= #keys do
|
|
16989
|
-
local element = object[i]
|
|
16990
|
-
if element == nil then
|
|
16991
|
-
return false
|
|
16992
|
-
end
|
|
16993
|
-
i = i + 1
|
|
16994
|
-
end
|
|
16995
|
-
end
|
|
16996
|
-
end
|
|
16997
|
-
return true
|
|
16998
|
-
end
|
|
16999
|
-
function ____exports.isArrayContiguous(self, array)
|
|
17000
|
-
local lastValue
|
|
17001
|
-
for ____, element in ipairs(array) do
|
|
17002
|
-
if lastValue == nil then
|
|
17003
|
-
lastValue = element - 1
|
|
17004
|
-
end
|
|
17005
|
-
if element ~= lastValue - 1 then
|
|
17006
|
-
return false
|
|
17007
|
-
end
|
|
17008
|
-
end
|
|
17009
|
-
return true
|
|
17010
|
-
end
|
|
17011
|
-
function ____exports.isArrayInArray(self, arrayToMatch, parentArray)
|
|
17012
|
-
return __TS__ArraySome(
|
|
17013
|
-
parentArray,
|
|
17014
|
-
function(____, element) return ____exports.arrayEquals(nil, element, arrayToMatch) end
|
|
17015
|
-
)
|
|
16902
|
+
return tableHasKeys(
|
|
16903
|
+
nil,
|
|
16904
|
+
object,
|
|
16905
|
+
table.unpack(KEYS)
|
|
16906
|
+
) and object[SerializationBrand.COLOR] ~= nil
|
|
17016
16907
|
end
|
|
17017
|
-
function ____exports.
|
|
17018
|
-
if
|
|
17019
|
-
|
|
16908
|
+
function ____exports.serializeColor(self, color)
|
|
16909
|
+
if not ____exports.isColor(nil, color) then
|
|
16910
|
+
error(((("Failed to serialize a " .. OBJECT_NAME) .. " object since the provided object was not a userdata ") .. OBJECT_NAME) .. " class.")
|
|
17020
16911
|
end
|
|
17021
|
-
local
|
|
17022
|
-
|
|
17023
|
-
|
|
17024
|
-
|
|
17025
|
-
function ____exports.sumArray(self, array)
|
|
17026
|
-
return __TS__ArrayReduce(
|
|
17027
|
-
array,
|
|
17028
|
-
function(____, accumulator, element) return accumulator + element end
|
|
17029
|
-
)
|
|
16912
|
+
local colorTable = {}
|
|
16913
|
+
copyUserdataValuesToTable(nil, color, KEYS, colorTable)
|
|
16914
|
+
colorTable[SerializationBrand.COLOR] = ""
|
|
16915
|
+
return colorTable
|
|
17030
16916
|
end
|
|
17031
16917
|
return ____exports
|
|
17032
16918
|
end,
|
|
17033
|
-
["src.functions.
|
|
17034
|
-
local ____lualib = require("lualib_bundle")
|
|
17035
|
-
local __TS__ArraySort = ____lualib.__TS__ArraySort
|
|
17036
|
-
local __TS__ArrayMap = ____lualib.__TS__ArrayMap
|
|
17037
|
-
local Set = ____lualib.Set
|
|
17038
|
-
local __TS__New = ____lualib.__TS__New
|
|
16919
|
+
["src.functions.kColor"] = function(...)
|
|
17039
16920
|
local ____exports = {}
|
|
17040
|
-
local
|
|
17041
|
-
local
|
|
16921
|
+
local OBJECT_NAME
|
|
16922
|
+
local ____SerializationBrand = require("src.enums.SerializationBrand")
|
|
16923
|
+
local SerializationBrand = ____SerializationBrand.SerializationBrand
|
|
16924
|
+
local ____isaacAPIClass = require("src.functions.isaacAPIClass")
|
|
16925
|
+
local isaacAPIClassEquals = ____isaacAPIClass.isaacAPIClassEquals
|
|
16926
|
+
local isIsaacAPIClassOfType = ____isaacAPIClass.isIsaacAPIClassOfType
|
|
16927
|
+
local ____random = require("src.functions.random")
|
|
16928
|
+
local getRandom = ____random.getRandom
|
|
17042
16929
|
local ____rng = require("src.functions.rng")
|
|
17043
16930
|
local getRandomSeed = ____rng.getRandomSeed
|
|
16931
|
+
local isRNG = ____rng.isRNG
|
|
16932
|
+
local newRNG = ____rng.newRNG
|
|
16933
|
+
local ____table = require("src.functions.table")
|
|
16934
|
+
local copyUserdataValuesToTable = ____table.copyUserdataValuesToTable
|
|
16935
|
+
local getNumbersFromTable = ____table.getNumbersFromTable
|
|
16936
|
+
local tableHasKeys = ____table.tableHasKeys
|
|
17044
16937
|
local ____types = require("src.functions.types")
|
|
17045
|
-
local
|
|
17046
|
-
|
|
17047
|
-
|
|
17048
|
-
function ____exports.getEnumEntries(self, transpiledEnum)
|
|
17049
|
-
local enumEntries = {}
|
|
17050
|
-
for key, value in pairs(transpiledEnum) do
|
|
17051
|
-
if isString(nil, key) then
|
|
17052
|
-
enumEntries[#enumEntries + 1] = {key, value}
|
|
17053
|
-
end
|
|
17054
|
-
end
|
|
17055
|
-
__TS__ArraySort(
|
|
17056
|
-
enumEntries,
|
|
17057
|
-
function(____, ____bindingPattern0, ____bindingPattern1)
|
|
17058
|
-
local value1
|
|
17059
|
-
local _key1 = ____bindingPattern0[1]
|
|
17060
|
-
value1 = ____bindingPattern0[2]
|
|
17061
|
-
local value2
|
|
17062
|
-
local _key2 = ____bindingPattern1[1]
|
|
17063
|
-
value2 = ____bindingPattern1[2]
|
|
17064
|
-
return value1 < value2 and -1 or (value1 > value2 and 1 or 0)
|
|
17065
|
-
end
|
|
17066
|
-
)
|
|
17067
|
-
return enumEntries
|
|
17068
|
-
end
|
|
17069
|
-
function ____exports.getEnumKeys(self, transpiledEnum)
|
|
17070
|
-
local enumEntries = ____exports.getEnumEntries(nil, transpiledEnum)
|
|
17071
|
-
return __TS__ArrayMap(
|
|
17072
|
-
enumEntries,
|
|
17073
|
-
function(____, ____bindingPattern0)
|
|
17074
|
-
local key
|
|
17075
|
-
key = ____bindingPattern0[1]
|
|
17076
|
-
local _value = ____bindingPattern0[2]
|
|
17077
|
-
return key
|
|
17078
|
-
end
|
|
17079
|
-
)
|
|
17080
|
-
end
|
|
17081
|
-
function ____exports.getEnumLength(self, transpiledEnum)
|
|
17082
|
-
local enumEntries = ____exports.getEnumEntries(nil, transpiledEnum)
|
|
17083
|
-
return #enumEntries
|
|
16938
|
+
local isTable = ____types.isTable
|
|
16939
|
+
function ____exports.isKColor(self, object)
|
|
16940
|
+
return isIsaacAPIClassOfType(nil, object, OBJECT_NAME)
|
|
17084
16941
|
end
|
|
17085
|
-
|
|
17086
|
-
|
|
17087
|
-
|
|
17088
|
-
|
|
17089
|
-
|
|
17090
|
-
|
|
17091
|
-
|
|
17092
|
-
value = ____bindingPattern0[2]
|
|
17093
|
-
return value
|
|
17094
|
-
end
|
|
17095
|
-
)
|
|
16942
|
+
OBJECT_NAME = "KColor"
|
|
16943
|
+
local KEYS = {"Red", "Green", "Blue", "Alpha"}
|
|
16944
|
+
function ____exports.copyKColor(self, kColor)
|
|
16945
|
+
if not ____exports.isKColor(nil, kColor) then
|
|
16946
|
+
error(((("Failed to copy a " .. OBJECT_NAME) .. " object since the provided object was not a userdata ") .. OBJECT_NAME) .. " class.")
|
|
16947
|
+
end
|
|
16948
|
+
return KColor(kColor.Red, kColor.Green, kColor.Blue, kColor.Alpha)
|
|
17096
16949
|
end
|
|
17097
|
-
function ____exports.
|
|
17098
|
-
|
|
17099
|
-
|
|
17100
|
-
if lastElement == nil then
|
|
17101
|
-
error("Failed to get the last value from an enum since the enum was empty.")
|
|
16950
|
+
function ____exports.deserializeKColor(self, kColor)
|
|
16951
|
+
if not isTable(nil, kColor) then
|
|
16952
|
+
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object was not a Lua table.")
|
|
17102
16953
|
end
|
|
17103
|
-
|
|
16954
|
+
local r, g, b, a = table.unpack(getNumbersFromTable(
|
|
16955
|
+
nil,
|
|
16956
|
+
kColor,
|
|
16957
|
+
OBJECT_NAME,
|
|
16958
|
+
table.unpack(KEYS)
|
|
16959
|
+
))
|
|
16960
|
+
if r == nil then
|
|
16961
|
+
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: Red")
|
|
16962
|
+
end
|
|
16963
|
+
if g == nil then
|
|
16964
|
+
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: Green")
|
|
16965
|
+
end
|
|
16966
|
+
if b == nil then
|
|
16967
|
+
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: Blue")
|
|
16968
|
+
end
|
|
16969
|
+
if a == nil then
|
|
16970
|
+
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: Alpha")
|
|
16971
|
+
end
|
|
16972
|
+
return KColor(r, g, b, a)
|
|
17104
16973
|
end
|
|
17105
|
-
function ____exports.
|
|
16974
|
+
function ____exports.getRandomKColor(self, seedOrRNG, alpha)
|
|
17106
16975
|
if seedOrRNG == nil then
|
|
17107
16976
|
seedOrRNG = getRandomSeed(nil)
|
|
17108
16977
|
end
|
|
17109
|
-
if
|
|
17110
|
-
|
|
16978
|
+
if alpha == nil then
|
|
16979
|
+
alpha = 1
|
|
17111
16980
|
end
|
|
17112
|
-
local
|
|
17113
|
-
|
|
16981
|
+
local rng = isRNG(nil, seedOrRNG) and seedOrRNG or newRNG(nil, seedOrRNG)
|
|
16982
|
+
local r = getRandom(nil, rng)
|
|
16983
|
+
local g = getRandom(nil, rng)
|
|
16984
|
+
local b = getRandom(nil, rng)
|
|
16985
|
+
return KColor(r, g, b, alpha)
|
|
17114
16986
|
end
|
|
17115
|
-
function ____exports.
|
|
17116
|
-
|
|
17117
|
-
|
|
17118
|
-
local value = ____value[2]
|
|
17119
|
-
if value == -1 then
|
|
17120
|
-
error((("Failed to find the custom enum value: " .. transpiledEnumName) .. ".") .. key)
|
|
17121
|
-
end
|
|
16987
|
+
function ____exports.isSerializedKColor(self, object)
|
|
16988
|
+
if not isTable(nil, object) then
|
|
16989
|
+
return false
|
|
17122
16990
|
end
|
|
16991
|
+
return tableHasKeys(
|
|
16992
|
+
nil,
|
|
16993
|
+
object,
|
|
16994
|
+
table.unpack(KEYS)
|
|
16995
|
+
) and object[SerializationBrand.K_COLOR] ~= nil
|
|
17123
16996
|
end
|
|
17124
|
-
function ____exports.
|
|
17125
|
-
|
|
17126
|
-
|
|
17127
|
-
|
|
17128
|
-
|
|
17129
|
-
|
|
17130
|
-
if type(lastValue) ~= "number" then
|
|
17131
|
-
error("Failed to validate that an enum was contiguous, since the last value was not a number.")
|
|
17132
|
-
end
|
|
17133
|
-
local valuesSet = __TS__New(Set, values)
|
|
17134
|
-
for ____, value in ipairs(iRange(nil, lastValue)) do
|
|
17135
|
-
if not valuesSet:has(value) then
|
|
17136
|
-
error((("Failed to find a custom enum value of " .. tostring(value)) .. " for: ") .. transpiledEnumName)
|
|
17137
|
-
end
|
|
16997
|
+
function ____exports.kColorEquals(self, kColor1, kColor2)
|
|
16998
|
+
return isaacAPIClassEquals(nil, kColor1, kColor2, KEYS)
|
|
16999
|
+
end
|
|
17000
|
+
function ____exports.serializeKColor(self, kColor)
|
|
17001
|
+
if not ____exports.isKColor(nil, kColor) then
|
|
17002
|
+
error(((("Failed to serialize a " .. OBJECT_NAME) .. " object since the provided object was not a userdata ") .. OBJECT_NAME) .. " class.")
|
|
17138
17003
|
end
|
|
17004
|
+
local kColorTable = {}
|
|
17005
|
+
copyUserdataValuesToTable(nil, kColor, KEYS, kColorTable)
|
|
17006
|
+
kColorTable[SerializationBrand.K_COLOR] = ""
|
|
17007
|
+
return kColorTable
|
|
17139
17008
|
end
|
|
17009
|
+
return ____exports
|
|
17010
|
+
end,
|
|
17011
|
+
["src.objects.directionNames"] = function(...)
|
|
17012
|
+
local ____exports = {}
|
|
17013
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
17014
|
+
local Direction = ____isaac_2Dtypescript_2Ddefinitions.Direction
|
|
17015
|
+
____exports.DIRECTION_NAMES = {
|
|
17016
|
+
[Direction.NO_DIRECTION] = nil,
|
|
17017
|
+
[Direction.LEFT] = "left",
|
|
17018
|
+
[Direction.UP] = "up",
|
|
17019
|
+
[Direction.RIGHT] = "right",
|
|
17020
|
+
[Direction.DOWN] = "down"
|
|
17021
|
+
}
|
|
17022
|
+
return ____exports
|
|
17023
|
+
end,
|
|
17024
|
+
["src.objects.directionToDegrees"] = function(...)
|
|
17025
|
+
local ____exports = {}
|
|
17026
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
17027
|
+
local Direction = ____isaac_2Dtypescript_2Ddefinitions.Direction
|
|
17028
|
+
____exports.DIRECTION_TO_DEGREES = {
|
|
17029
|
+
[Direction.NO_DIRECTION] = 0,
|
|
17030
|
+
[Direction.LEFT] = 180,
|
|
17031
|
+
[Direction.UP] = 270,
|
|
17032
|
+
[Direction.RIGHT] = 0,
|
|
17033
|
+
[Direction.DOWN] = 90
|
|
17034
|
+
}
|
|
17035
|
+
return ____exports
|
|
17036
|
+
end,
|
|
17037
|
+
["src.objects.directionToMoveAction"] = function(...)
|
|
17038
|
+
local ____exports = {}
|
|
17039
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
17040
|
+
local ButtonAction = ____isaac_2Dtypescript_2Ddefinitions.ButtonAction
|
|
17041
|
+
local Direction = ____isaac_2Dtypescript_2Ddefinitions.Direction
|
|
17042
|
+
____exports.DIRECTION_TO_MOVE_ACTION = {
|
|
17043
|
+
[Direction.NO_DIRECTION] = nil,
|
|
17044
|
+
[Direction.LEFT] = ButtonAction.LEFT,
|
|
17045
|
+
[Direction.UP] = ButtonAction.UP,
|
|
17046
|
+
[Direction.RIGHT] = ButtonAction.RIGHT,
|
|
17047
|
+
[Direction.DOWN] = ButtonAction.DOWN
|
|
17048
|
+
}
|
|
17049
|
+
return ____exports
|
|
17050
|
+
end,
|
|
17051
|
+
["src.objects.directionToShootAction"] = function(...)
|
|
17052
|
+
local ____exports = {}
|
|
17053
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
17054
|
+
local ButtonAction = ____isaac_2Dtypescript_2Ddefinitions.ButtonAction
|
|
17055
|
+
local Direction = ____isaac_2Dtypescript_2Ddefinitions.Direction
|
|
17056
|
+
____exports.DIRECTION_TO_SHOOT_ACTION = {
|
|
17057
|
+
[Direction.NO_DIRECTION] = nil,
|
|
17058
|
+
[Direction.LEFT] = ButtonAction.SHOOT_LEFT,
|
|
17059
|
+
[Direction.UP] = ButtonAction.SHOOT_UP,
|
|
17060
|
+
[Direction.RIGHT] = ButtonAction.SHOOT_RIGHT,
|
|
17061
|
+
[Direction.DOWN] = ButtonAction.SHOOT_DOWN
|
|
17062
|
+
}
|
|
17140
17063
|
return ____exports
|
|
17141
17064
|
end,
|
|
17142
17065
|
["src.functions.flag"] = function(...)
|
|
@@ -17654,9 +17577,12 @@ local ____lualib = require("lualib_bundle")
|
|
|
17654
17577
|
local __TS__Class = ____lualib.__TS__Class
|
|
17655
17578
|
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
17656
17579
|
local __TS__Spread = ____lualib.__TS__Spread
|
|
17580
|
+
local __TS__ArraySort = ____lualib.__TS__ArraySort
|
|
17657
17581
|
local __TS__ArrayFindIndex = ____lualib.__TS__ArrayFindIndex
|
|
17658
17582
|
local __TS__ArraySplice = ____lualib.__TS__ArraySplice
|
|
17659
17583
|
local ____exports = {}
|
|
17584
|
+
local ____sort = require("src.functions.sort")
|
|
17585
|
+
local sortObjectArrayByKey = ____sort.sortObjectArrayByKey
|
|
17660
17586
|
local ____Feature = require("src.classes.private.Feature")
|
|
17661
17587
|
local Feature = ____Feature.Feature
|
|
17662
17588
|
____exports.CustomCallback = __TS__Class()
|
|
@@ -17669,7 +17595,8 @@ function CustomCallback.prototype.____constructor(self, ...)
|
|
|
17669
17595
|
self.fire = function(____, ...)
|
|
17670
17596
|
local fireArgs = {...}
|
|
17671
17597
|
for ____, subscription in ipairs(self.subscriptions) do
|
|
17672
|
-
local callbackFunc
|
|
17598
|
+
local callbackFunc = subscription.callbackFunc
|
|
17599
|
+
local optionalArgs = subscription.optionalArgs
|
|
17673
17600
|
if self:shouldFire(fireArgs, optionalArgs) then
|
|
17674
17601
|
local value = callbackFunc(
|
|
17675
17602
|
nil,
|
|
@@ -17684,17 +17611,21 @@ function CustomCallback.prototype.____constructor(self, ...)
|
|
|
17684
17611
|
end
|
|
17685
17612
|
self.shouldFire = function() return true end
|
|
17686
17613
|
end
|
|
17687
|
-
function CustomCallback.prototype.addSubscriber(self, callbackFunc, ...)
|
|
17614
|
+
function CustomCallback.prototype.addSubscriber(self, priority, callbackFunc, ...)
|
|
17688
17615
|
local optionalArgs = {...}
|
|
17689
|
-
local subscription = {callbackFunc, optionalArgs}
|
|
17616
|
+
local subscription = {priority = priority, callbackFunc = callbackFunc, optionalArgs = optionalArgs}
|
|
17690
17617
|
local ____self_subscriptions_0 = self.subscriptions
|
|
17691
17618
|
____self_subscriptions_0[#____self_subscriptions_0 + 1] = subscription
|
|
17619
|
+
__TS__ArraySort(
|
|
17620
|
+
self.subscriptions,
|
|
17621
|
+
sortObjectArrayByKey(nil, "priority")
|
|
17622
|
+
)
|
|
17692
17623
|
end
|
|
17693
17624
|
function CustomCallback.prototype.removeSubscriber(self, callback)
|
|
17694
17625
|
local subscriptionIndexMatchingCallback = __TS__ArrayFindIndex(
|
|
17695
17626
|
self.subscriptions,
|
|
17696
17627
|
function(____, subscription)
|
|
17697
|
-
local subscriptionCallback = subscription
|
|
17628
|
+
local subscriptionCallback = subscription.callbackFunc
|
|
17698
17629
|
return callback == subscriptionCallback
|
|
17699
17630
|
end
|
|
17700
17631
|
)
|
|
@@ -23871,6 +23802,43 @@ function ____exports.spawnTearWithSeed(self, tearVariant, subType, positionOrGri
|
|
|
23871
23802
|
seedOrRNG
|
|
23872
23803
|
)
|
|
23873
23804
|
end
|
|
23805
|
+
return ____exports
|
|
23806
|
+
end,
|
|
23807
|
+
["src.functions.log"] = function(...)
|
|
23808
|
+
local ____exports = {}
|
|
23809
|
+
function ____exports.getParentFunctionDescription(levels)
|
|
23810
|
+
if levels == nil then
|
|
23811
|
+
levels = 3
|
|
23812
|
+
end
|
|
23813
|
+
if debug ~= nil then
|
|
23814
|
+
local debugTable = debug.getinfo(levels)
|
|
23815
|
+
if debugTable ~= nil then
|
|
23816
|
+
return (tostring(debugTable.name) .. ":") .. tostring(debugTable.linedefined)
|
|
23817
|
+
end
|
|
23818
|
+
end
|
|
23819
|
+
if SandboxGetParentFunctionDescription ~= nil then
|
|
23820
|
+
return SandboxGetParentFunctionDescription(levels)
|
|
23821
|
+
end
|
|
23822
|
+
return nil
|
|
23823
|
+
end
|
|
23824
|
+
function ____exports.log(msg, includeParentFunction)
|
|
23825
|
+
if includeParentFunction == nil then
|
|
23826
|
+
includeParentFunction = true
|
|
23827
|
+
end
|
|
23828
|
+
local ____includeParentFunction_0
|
|
23829
|
+
if includeParentFunction then
|
|
23830
|
+
____includeParentFunction_0 = ____exports.getParentFunctionDescription()
|
|
23831
|
+
else
|
|
23832
|
+
____includeParentFunction_0 = nil
|
|
23833
|
+
end
|
|
23834
|
+
local parentFunctionDescription = ____includeParentFunction_0
|
|
23835
|
+
local debugMsg = parentFunctionDescription == nil and msg or (parentFunctionDescription .. " - ") .. msg
|
|
23836
|
+
Isaac.DebugString(debugMsg)
|
|
23837
|
+
end
|
|
23838
|
+
function ____exports.logAndPrint(self, msg)
|
|
23839
|
+
____exports.log(msg)
|
|
23840
|
+
print(msg)
|
|
23841
|
+
end
|
|
23874
23842
|
return ____exports
|
|
23875
23843
|
end,
|
|
23876
23844
|
["src.functions.run"] = function(...)
|
|
@@ -35870,6 +35838,8 @@ local isCopyableIsaacAPIClass = ____serialization.isCopyableIsaacAPIClass
|
|
|
35870
35838
|
local isSerializationBrand = ____serialization.isSerializationBrand
|
|
35871
35839
|
local isSerializedIsaacAPIClass = ____serialization.isSerializedIsaacAPIClass
|
|
35872
35840
|
local serializeIsaacAPIClass = ____serialization.serializeIsaacAPIClass
|
|
35841
|
+
local ____sort = require("src.functions.sort")
|
|
35842
|
+
local sortTwoDimensionalArray = ____sort.sortTwoDimensionalArray
|
|
35873
35843
|
local ____tstlClass = require("src.functions.tstlClass")
|
|
35874
35844
|
local getTSTLClassName = ____tstlClass.getTSTLClassName
|
|
35875
35845
|
local isDefaultMap = ____tstlClass.isDefaultMap
|
|
@@ -35882,7 +35852,6 @@ local isNumber = ____types.isNumber
|
|
|
35882
35852
|
local isPrimitive = ____types.isPrimitive
|
|
35883
35853
|
local ____utils = require("src.functions.utils")
|
|
35884
35854
|
local getTraversalDescription = ____utils.getTraversalDescription
|
|
35885
|
-
local twoDimensionalSort = ____utils.twoDimensionalSort
|
|
35886
35855
|
function ____exports.deepCopy(self, value, serializationType, traversalDescription, classConstructors, insideMap)
|
|
35887
35856
|
if serializationType == nil then
|
|
35888
35857
|
serializationType = SerializationType.NONE
|
|
@@ -36312,7 +36281,7 @@ function getCopiedEntries(self, object, serializationType, traversalDescription,
|
|
|
36312
36281
|
end
|
|
36313
36282
|
end
|
|
36314
36283
|
if SAVE_DATA_MANAGER_DEBUG then
|
|
36315
|
-
__TS__ArraySort(entries,
|
|
36284
|
+
__TS__ArraySort(entries, sortTwoDimensionalArray)
|
|
36316
36285
|
end
|
|
36317
36286
|
local convertStringKeysToNumbers = serializationType == SerializationType.DESERIALIZE and __TS__ArraySome(
|
|
36318
36287
|
entries,
|
|
@@ -42807,6 +42776,81 @@ function CustomStages.prototype.disableCustomStage(self)
|
|
|
42807
42776
|
end
|
|
42808
42777
|
__TS__Decorate({Exported}, CustomStages.prototype, "setCustomStage", true)
|
|
42809
42778
|
__TS__Decorate({Exported}, CustomStages.prototype, "disableCustomStage", true)
|
|
42779
|
+
return ____exports
|
|
42780
|
+
end,
|
|
42781
|
+
["src.sets.consoleCommandsSet"] = function(...)
|
|
42782
|
+
local ____lualib = require("lualib_bundle")
|
|
42783
|
+
local __TS__New = ____lualib.__TS__New
|
|
42784
|
+
local ____exports = {}
|
|
42785
|
+
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
42786
|
+
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
42787
|
+
____exports.CONSOLE_COMMANDS_SET = __TS__New(ReadonlySet, {
|
|
42788
|
+
"achievement",
|
|
42789
|
+
"challenge",
|
|
42790
|
+
"clear",
|
|
42791
|
+
"clearcache",
|
|
42792
|
+
"clearseeds",
|
|
42793
|
+
"combo",
|
|
42794
|
+
"copy",
|
|
42795
|
+
"costumetest",
|
|
42796
|
+
"curse",
|
|
42797
|
+
"cutscene",
|
|
42798
|
+
"debug",
|
|
42799
|
+
"delirious",
|
|
42800
|
+
"eggs",
|
|
42801
|
+
"giveitem",
|
|
42802
|
+
"g",
|
|
42803
|
+
"goto",
|
|
42804
|
+
"gridspawn",
|
|
42805
|
+
"listcollectibles",
|
|
42806
|
+
"lua",
|
|
42807
|
+
"l",
|
|
42808
|
+
"luamem",
|
|
42809
|
+
"luamod",
|
|
42810
|
+
"luarun",
|
|
42811
|
+
"macro",
|
|
42812
|
+
"m",
|
|
42813
|
+
"metro",
|
|
42814
|
+
"playsfx",
|
|
42815
|
+
"prof",
|
|
42816
|
+
"profstop",
|
|
42817
|
+
"remove",
|
|
42818
|
+
"r",
|
|
42819
|
+
"reloadfx",
|
|
42820
|
+
"reloadshaders",
|
|
42821
|
+
"repeat",
|
|
42822
|
+
"reseed",
|
|
42823
|
+
"restart",
|
|
42824
|
+
"seed",
|
|
42825
|
+
"spawn",
|
|
42826
|
+
"stage",
|
|
42827
|
+
"time",
|
|
42828
|
+
"addplayer",
|
|
42829
|
+
"forceroom",
|
|
42830
|
+
"giveitem2",
|
|
42831
|
+
"g2",
|
|
42832
|
+
"netdelay",
|
|
42833
|
+
"netstart",
|
|
42834
|
+
"remove2",
|
|
42835
|
+
"r2",
|
|
42836
|
+
"reloadwisps",
|
|
42837
|
+
"restock",
|
|
42838
|
+
"rewind",
|
|
42839
|
+
"testbosspool"
|
|
42840
|
+
})
|
|
42841
|
+
return ____exports
|
|
42842
|
+
end,
|
|
42843
|
+
["src.functions.console"] = function(...)
|
|
42844
|
+
local ____exports = {}
|
|
42845
|
+
local ____consoleCommandsSet = require("src.sets.consoleCommandsSet")
|
|
42846
|
+
local CONSOLE_COMMANDS_SET = ____consoleCommandsSet.CONSOLE_COMMANDS_SET
|
|
42847
|
+
function ____exports.isVanillaConsoleCommand(self, commandName)
|
|
42848
|
+
return CONSOLE_COMMANDS_SET:has(commandName)
|
|
42849
|
+
end
|
|
42850
|
+
function ____exports.printEnabled(self, enabled, description)
|
|
42851
|
+
local enabledText = enabled and "Enabled" or "Disabled"
|
|
42852
|
+
print(((enabledText .. " ") .. description) .. ".")
|
|
42853
|
+
end
|
|
42810
42854
|
return ____exports
|
|
42811
42855
|
end,
|
|
42812
42856
|
["src.interfaces.private.ModUpgradedInterface"] = function(...)
|
|
@@ -43339,8 +43383,8 @@ local __TS__Decorate = ____lualib.__TS__Decorate
|
|
|
43339
43383
|
local ____exports = {}
|
|
43340
43384
|
local ____decorators = require("src.decorators")
|
|
43341
43385
|
local Exported = ____decorators.Exported
|
|
43342
|
-
local
|
|
43343
|
-
local printEnabled =
|
|
43386
|
+
local ____console = require("src.functions.console")
|
|
43387
|
+
local printEnabled = ____console.printEnabled
|
|
43344
43388
|
local ____Feature = require("src.classes.private.Feature")
|
|
43345
43389
|
local Feature = ____Feature.Feature
|
|
43346
43390
|
local ____DebugDisplayBomb = require("src.classes.features.other.debugDisplay.DebugDisplayBomb")
|
|
@@ -45534,6 +45578,8 @@ local ____SerializationType = require("src.enums.SerializationType")
|
|
|
45534
45578
|
local SerializationType = ____SerializationType.SerializationType
|
|
45535
45579
|
local ____deepCopy = require("src.functions.deepCopy")
|
|
45536
45580
|
local deepCopy = ____deepCopy.deepCopy
|
|
45581
|
+
local ____log = require("src.functions.log")
|
|
45582
|
+
local logAndPrint = ____log.logAndPrint
|
|
45537
45583
|
local ____merge = require("src.functions.merge")
|
|
45538
45584
|
local merge = ____merge.merge
|
|
45539
45585
|
local ____rng = require("src.functions.rng")
|
|
@@ -45541,8 +45587,6 @@ local isRNG = ____rng.isRNG
|
|
|
45541
45587
|
local newRNG = ____rng.newRNG
|
|
45542
45588
|
local ____serialization = require("src.functions.serialization")
|
|
45543
45589
|
local isSerializedIsaacAPIClass = ____serialization.isSerializedIsaacAPIClass
|
|
45544
|
-
local ____utils = require("src.functions.utils")
|
|
45545
|
-
local logAndPrint = ____utils.logAndPrint
|
|
45546
45590
|
local ____vector = require("src.functions.vector")
|
|
45547
45591
|
local isVector = ____vector.isVector
|
|
45548
45592
|
local serializeVector = ____vector.serializeVector
|
|
@@ -47088,6 +47132,8 @@ local addCharge = ____charge.addCharge
|
|
|
47088
47132
|
local getTotalCharge = ____charge.getTotalCharge
|
|
47089
47133
|
local ____collectibles = require("src.functions.collectibles")
|
|
47090
47134
|
local isValidCollectibleType = ____collectibles.isValidCollectibleType
|
|
47135
|
+
local ____console = require("src.functions.console")
|
|
47136
|
+
local printEnabled = ____console.printEnabled
|
|
47091
47137
|
local ____deepCopyTests = require("src.functions.deepCopyTests")
|
|
47092
47138
|
local runDeepCopyTests = ____deepCopyTests.runDeepCopyTests
|
|
47093
47139
|
local ____entitiesSpecific = require("src.functions.entitiesSpecific")
|
|
@@ -47143,7 +47189,6 @@ local asCollectibleType = ____types.asCollectibleType
|
|
|
47143
47189
|
local asTrinketType = ____types.asTrinketType
|
|
47144
47190
|
local ____utils = require("src.functions.utils")
|
|
47145
47191
|
local iRange = ____utils.iRange
|
|
47146
|
-
local printEnabled = ____utils.printEnabled
|
|
47147
47192
|
local ____cardNameToTypeMap = require("src.maps.cardNameToTypeMap")
|
|
47148
47193
|
local CARD_NAME_TO_TYPE_MAP = ____cardNameToTypeMap.CARD_NAME_TO_TYPE_MAP
|
|
47149
47194
|
local ____characterNameToTypeMap = require("src.maps.characterNameToTypeMap")
|
|
@@ -48125,13 +48170,13 @@ local ____decorators = require("src.decorators")
|
|
|
48125
48170
|
local Exported = ____decorators.Exported
|
|
48126
48171
|
local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
|
|
48127
48172
|
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
48173
|
+
local ____console = require("src.functions.console")
|
|
48174
|
+
local isVanillaConsoleCommand = ____console.isVanillaConsoleCommand
|
|
48128
48175
|
local ____flag = require("src.functions.flag")
|
|
48129
48176
|
local addFlag = ____flag.addFlag
|
|
48130
48177
|
local bitFlags = ____flag.bitFlags
|
|
48131
48178
|
local ____map = require("src.functions.map")
|
|
48132
48179
|
local getMapPartialMatch = ____map.getMapPartialMatch
|
|
48133
|
-
local ____utils = require("src.functions.utils")
|
|
48134
|
-
local isVanillaConsoleCommand = ____utils.isVanillaConsoleCommand
|
|
48135
48180
|
local ____Feature = require("src.classes.private.Feature")
|
|
48136
48181
|
local Feature = ____Feature.Feature
|
|
48137
48182
|
local commands = require("src.classes.features.other.extraConsoleCommands.commands")
|
|
@@ -49723,8 +49768,8 @@ local ____ISCFeature = require("src.enums.ISCFeature")
|
|
|
49723
49768
|
local ISCFeature = ____ISCFeature.ISCFeature
|
|
49724
49769
|
local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
|
|
49725
49770
|
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
49726
|
-
local
|
|
49727
|
-
local validateInterfaceMatchesEnum =
|
|
49771
|
+
local ____enums = require("src.functions.enums")
|
|
49772
|
+
local validateInterfaceMatchesEnum = ____enums.validateInterfaceMatchesEnum
|
|
49728
49773
|
validateInterfaceMatchesEnum(nil)
|
|
49729
49774
|
function ____exports.getFeatures(self, mod, callbacks)
|
|
49730
49775
|
local gameReorderedCallbacks = __TS__New(
|
|
@@ -49894,7 +49939,7 @@ return ____exports
|
|
|
49894
49939
|
local ____exports = {}
|
|
49895
49940
|
return ____exports
|
|
49896
49941
|
end,
|
|
49897
|
-
["src.classes.
|
|
49942
|
+
["src.classes.ModUpgraded"] = function(...)
|
|
49898
49943
|
local ____lualib = require("lualib_bundle")
|
|
49899
49944
|
local __TS__Class = ____lualib.__TS__Class
|
|
49900
49945
|
local __TS__Spread = ____lualib.__TS__Spread
|
|
@@ -49946,10 +49991,10 @@ function getExportedMethodsFromFeature(self, featureClass)
|
|
|
49946
49991
|
end
|
|
49947
49992
|
)
|
|
49948
49993
|
end
|
|
49949
|
-
____exports.
|
|
49950
|
-
local
|
|
49951
|
-
|
|
49952
|
-
function
|
|
49994
|
+
____exports.ModUpgraded = __TS__Class()
|
|
49995
|
+
local ModUpgraded = ____exports.ModUpgraded
|
|
49996
|
+
ModUpgraded.name = "ModUpgraded"
|
|
49997
|
+
function ModUpgraded.prototype.____constructor(self, mod, ____debug, timeThreshold)
|
|
49953
49998
|
self.Name = mod.Name
|
|
49954
49999
|
self.mod = mod
|
|
49955
50000
|
self.debug = ____debug
|
|
@@ -49957,10 +50002,10 @@ function ModUpgradedBase.prototype.____constructor(self, mod, ____debug, timeThr
|
|
|
49957
50002
|
self.callbacks = getCallbacks(nil)
|
|
49958
50003
|
self.features = getFeatures(nil, self, self.callbacks)
|
|
49959
50004
|
end
|
|
49960
|
-
function
|
|
50005
|
+
function ModUpgraded.prototype.AddCallback(self, modCallback, ...)
|
|
49961
50006
|
self:AddPriorityCallback(modCallback, CallbackPriority.DEFAULT, ...)
|
|
49962
50007
|
end
|
|
49963
|
-
function
|
|
50008
|
+
function ModUpgraded.prototype.AddPriorityCallback(self, modCallback, priority, ...)
|
|
49964
50009
|
local args = {...}
|
|
49965
50010
|
if self.debug then
|
|
49966
50011
|
local callback = args[1]
|
|
@@ -49996,38 +50041,41 @@ function ModUpgradedBase.prototype.AddPriorityCallback(self, modCallback, priori
|
|
|
49996
50041
|
)
|
|
49997
50042
|
end
|
|
49998
50043
|
end
|
|
49999
|
-
function
|
|
50044
|
+
function ModUpgraded.prototype.HasData(self)
|
|
50000
50045
|
return self.mod:HasData()
|
|
50001
50046
|
end
|
|
50002
|
-
function
|
|
50047
|
+
function ModUpgraded.prototype.LoadData(self)
|
|
50003
50048
|
return self.mod:LoadData()
|
|
50004
50049
|
end
|
|
50005
|
-
function
|
|
50050
|
+
function ModUpgraded.prototype.RemoveCallback(self, modCallback, callback)
|
|
50006
50051
|
self.mod:RemoveCallback(modCallback, callback)
|
|
50007
50052
|
end
|
|
50008
|
-
function
|
|
50053
|
+
function ModUpgraded.prototype.RemoveData(self)
|
|
50009
50054
|
self.mod:RemoveData()
|
|
50010
50055
|
end
|
|
50011
|
-
function
|
|
50056
|
+
function ModUpgraded.prototype.SaveData(self, data)
|
|
50012
50057
|
self.mod:SaveData(data)
|
|
50013
50058
|
end
|
|
50014
|
-
function
|
|
50059
|
+
function ModUpgraded.prototype.AddCallbackCustom(self, modCallbackCustom, ...)
|
|
50060
|
+
self:AddPriorityCallbackCustom(modCallbackCustom, CallbackPriority.DEFAULT, ...)
|
|
50061
|
+
end
|
|
50062
|
+
function ModUpgraded.prototype.AddPriorityCallbackCustom(self, modCallbackCustom, priority, ...)
|
|
50015
50063
|
local callbackClass = self.callbacks[modCallbackCustom]
|
|
50016
|
-
callbackClass:addSubscriber(...)
|
|
50064
|
+
callbackClass:addSubscriber(priority, ...)
|
|
50017
50065
|
self:initFeature(callbackClass)
|
|
50018
50066
|
end
|
|
50019
|
-
function
|
|
50067
|
+
function ModUpgraded.prototype.RemoveCallbackCustom(self, modCallbackCustom, callback)
|
|
50020
50068
|
local callbackClass = self.callbacks[modCallbackCustom]
|
|
50021
50069
|
callbackClass:removeSubscriber(callback)
|
|
50022
50070
|
self:uninitFeature(callbackClass)
|
|
50023
50071
|
end
|
|
50024
|
-
function
|
|
50072
|
+
function ModUpgraded.prototype.logUsedFeatures(self)
|
|
50025
50073
|
for ____, ____value in ipairs(__TS__ObjectEntries(self.callbacks)) do
|
|
50026
50074
|
local modCallbackCustomString = ____value[1]
|
|
50027
50075
|
local callbackClass = ____value[2]
|
|
50028
50076
|
do
|
|
50029
50077
|
if callbackClass.numConsumers == 0 then
|
|
50030
|
-
goto
|
|
50078
|
+
goto __continue19
|
|
50031
50079
|
end
|
|
50032
50080
|
local modCallbackCustom = tonumber(modCallbackCustomString)
|
|
50033
50081
|
if modCallbackCustom == nil then
|
|
@@ -50035,14 +50083,14 @@ function ModUpgradedBase.prototype.logUsedFeatures(self)
|
|
|
50035
50083
|
end
|
|
50036
50084
|
log(((("- ModCallbackCustom." .. tostring(ModCallbackCustom[modCallbackCustom])) .. " (") .. tostring(modCallbackCustom)) .. ")")
|
|
50037
50085
|
end
|
|
50038
|
-
::
|
|
50086
|
+
::__continue19::
|
|
50039
50087
|
end
|
|
50040
50088
|
for ____, ____value in ipairs(__TS__ObjectEntries(self.features)) do
|
|
50041
50089
|
local iscFeatureString = ____value[1]
|
|
50042
50090
|
local featureClass = ____value[2]
|
|
50043
50091
|
do
|
|
50044
50092
|
if featureClass.numConsumers == 0 then
|
|
50045
|
-
goto
|
|
50093
|
+
goto __continue23
|
|
50046
50094
|
end
|
|
50047
50095
|
local iscFeature = tonumber(iscFeatureString)
|
|
50048
50096
|
if iscFeature == nil then
|
|
@@ -50050,10 +50098,10 @@ function ModUpgradedBase.prototype.logUsedFeatures(self)
|
|
|
50050
50098
|
end
|
|
50051
50099
|
log(((("- ISCFeature." .. tostring(ISCFeature[iscFeature])) .. " (") .. tostring(iscFeature)) .. ")")
|
|
50052
50100
|
end
|
|
50053
|
-
::
|
|
50101
|
+
::__continue23::
|
|
50054
50102
|
end
|
|
50055
50103
|
end
|
|
50056
|
-
function
|
|
50104
|
+
function ModUpgraded.prototype.initFeature(self, feature)
|
|
50057
50105
|
feature.numConsumers = feature.numConsumers + 1
|
|
50058
50106
|
if feature.initialized then
|
|
50059
50107
|
return
|
|
@@ -50076,8 +50124,9 @@ function ModUpgradedBase.prototype.initFeature(self, feature)
|
|
|
50076
50124
|
if feature.callbacksUsed ~= nil then
|
|
50077
50125
|
for ____, callbackTuple in ipairs(feature.callbacksUsed) do
|
|
50078
50126
|
local modCallback, callbackFunc, optionalArgs = table.unpack(callbackTuple)
|
|
50079
|
-
self:
|
|
50127
|
+
self:AddPriorityCallback(
|
|
50080
50128
|
modCallback,
|
|
50129
|
+
CallbackPriority.IMPORTANT,
|
|
50081
50130
|
callbackFunc,
|
|
50082
50131
|
table.unpack(optionalArgs or ({}))
|
|
50083
50132
|
)
|
|
@@ -50102,7 +50151,7 @@ function ModUpgradedBase.prototype.initFeature(self, feature)
|
|
|
50102
50151
|
saveDataManagerClass:saveDataManager(className, feature.v, feature.vConditionalFunc)
|
|
50103
50152
|
end
|
|
50104
50153
|
end
|
|
50105
|
-
function
|
|
50154
|
+
function ModUpgraded.prototype.uninitFeature(self, feature)
|
|
50106
50155
|
if feature.numConsumers <= 0 then
|
|
50107
50156
|
local className = getTSTLClassName(nil, feature) or "unknown"
|
|
50108
50157
|
error(((("Failed to uninit feature \"" .. className) .. "\" since it has ") .. tostring(feature.numConsumers)) .. " consumers, which should never happen.")
|
|
@@ -50143,15 +50192,11 @@ function ModUpgradedBase.prototype.uninitFeature(self, feature)
|
|
|
50143
50192
|
saveDataManagerClass:saveDataManagerRemove(className)
|
|
50144
50193
|
end
|
|
50145
50194
|
end
|
|
50146
|
-
function
|
|
50195
|
+
function ModUpgraded.prototype.initOptionalFeature(self, feature)
|
|
50147
50196
|
local featureClass = self.features[feature]
|
|
50148
50197
|
self:initFeature(featureClass)
|
|
50149
50198
|
return getExportedMethodsFromFeature(nil, featureClass)
|
|
50150
50199
|
end
|
|
50151
|
-
function ModUpgradedBase.prototype.initCustomCallbackEarly(self, modCallbackCustom)
|
|
50152
|
-
local callbackClass = self.callbacks[modCallbackCustom]
|
|
50153
|
-
self:initFeature(callbackClass)
|
|
50154
|
-
end
|
|
50155
50200
|
return ____exports
|
|
50156
50201
|
end,
|
|
50157
50202
|
["lua_modules.isaac-typescript-definitions.dist.src.enums.CallbackPriority"] = function(...)
|
|
@@ -50456,7 +50501,7 @@ return ____exports
|
|
|
50456
50501
|
local ____exports = {}
|
|
50457
50502
|
return ____exports
|
|
50458
50503
|
end,
|
|
50459
|
-
["src.types.
|
|
50504
|
+
["src.types.private.ModUpgradedWithFeatures"] = function(...)
|
|
50460
50505
|
local ____exports = {}
|
|
50461
50506
|
return ____exports
|
|
50462
50507
|
end,
|
|
@@ -50465,9 +50510,9 @@ local ____lualib = require("lualib_bundle")
|
|
|
50465
50510
|
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
50466
50511
|
local __TS__New = ____lualib.__TS__New
|
|
50467
50512
|
local ____exports = {}
|
|
50468
|
-
local initOptionalFeatures
|
|
50469
|
-
local
|
|
50470
|
-
local
|
|
50513
|
+
local initOptionalFeatures
|
|
50514
|
+
local ____ModUpgraded = require("src.classes.ModUpgraded")
|
|
50515
|
+
local ModUpgraded = ____ModUpgraded.ModUpgraded
|
|
50471
50516
|
local ____patchErrorFunctions = require("src.patchErrorFunctions")
|
|
50472
50517
|
local patchErrorFunction = ____patchErrorFunctions.patchErrorFunction
|
|
50473
50518
|
local ____shaderCrashFix = require("src.shaderCrashFix")
|
|
@@ -50483,18 +50528,10 @@ function initOptionalFeatures(self, mod, features)
|
|
|
50483
50528
|
end
|
|
50484
50529
|
end
|
|
50485
50530
|
end
|
|
50486
|
-
function
|
|
50487
|
-
for ____, modCallbackCustom in ipairs(callbacks) do
|
|
50488
|
-
mod.initCustomCallbackEarly(mod, modCallbackCustom)
|
|
50489
|
-
end
|
|
50490
|
-
end
|
|
50491
|
-
function ____exports.upgradeMod(self, modVanilla, features, customCallbacksUsed, ____debug, timeThreshold)
|
|
50531
|
+
function ____exports.upgradeMod(self, modVanilla, features, ____debug, timeThreshold)
|
|
50492
50532
|
if features == nil then
|
|
50493
50533
|
features = {}
|
|
50494
50534
|
end
|
|
50495
|
-
if customCallbacksUsed == nil then
|
|
50496
|
-
customCallbacksUsed = {}
|
|
50497
|
-
end
|
|
50498
50535
|
if ____debug == nil then
|
|
50499
50536
|
____debug = false
|
|
50500
50537
|
end
|
|
@@ -50505,10 +50542,9 @@ function ____exports.upgradeMod(self, modVanilla, features, customCallbacksUsed,
|
|
|
50505
50542
|
end
|
|
50506
50543
|
end
|
|
50507
50544
|
patchErrorFunction(nil)
|
|
50508
|
-
local mod = __TS__New(
|
|
50545
|
+
local mod = __TS__New(ModUpgraded, modVanilla, ____debug, timeThreshold)
|
|
50509
50546
|
applyShaderCrashFix(nil, mod)
|
|
50510
50547
|
initOptionalFeatures(nil, mod, features)
|
|
50511
|
-
initCallbacksEarly(nil, mod, customCallbacksUsed)
|
|
50512
50548
|
return mod
|
|
50513
50549
|
end
|
|
50514
50550
|
return ____exports
|
|
@@ -50815,8 +50851,8 @@ local logMiscExports = require("src.functions.logMisc")
|
|
|
50815
50851
|
local ____set = require("src.functions.set")
|
|
50816
50852
|
local addSetsToSet = ____set.addSetsToSet
|
|
50817
50853
|
local copySet = ____set.copySet
|
|
50818
|
-
local
|
|
50819
|
-
local
|
|
50854
|
+
local ____sort = require("src.functions.sort")
|
|
50855
|
+
local sortTwoDimensionalArray = ____sort.sortTwoDimensionalArray
|
|
50820
50856
|
function isRacingPlusSandboxEnabled(self)
|
|
50821
50857
|
return SandboxGetParentFunctionDescription ~= nil
|
|
50822
50858
|
end
|
|
@@ -51012,7 +51048,7 @@ function ____exports.getNewGlobals(self)
|
|
|
51012
51048
|
newGlobals[#newGlobals + 1] = keyValueTuple
|
|
51013
51049
|
end
|
|
51014
51050
|
end
|
|
51015
|
-
__TS__ArraySort(newGlobals,
|
|
51051
|
+
__TS__ArraySort(newGlobals, sortTwoDimensionalArray)
|
|
51016
51052
|
return newGlobals
|
|
51017
51053
|
end
|
|
51018
51054
|
function ____exports.logNewGlobals(self)
|
|
@@ -51659,7 +51695,7 @@ do
|
|
|
51659
51695
|
end
|
|
51660
51696
|
end
|
|
51661
51697
|
do
|
|
51662
|
-
local ____export = require("src.classes.
|
|
51698
|
+
local ____export = require("src.classes.ModUpgraded")
|
|
51663
51699
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
51664
51700
|
if ____exportKey ~= "default" then
|
|
51665
51701
|
____exports[____exportKey] = ____exportValue
|
|
@@ -51938,6 +51974,14 @@ do
|
|
|
51938
51974
|
end
|
|
51939
51975
|
end
|
|
51940
51976
|
end
|
|
51977
|
+
do
|
|
51978
|
+
local ____export = require("src.functions.console")
|
|
51979
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
51980
|
+
if ____exportKey ~= "default" then
|
|
51981
|
+
____exports[____exportKey] = ____exportValue
|
|
51982
|
+
end
|
|
51983
|
+
end
|
|
51984
|
+
end
|
|
51941
51985
|
do
|
|
51942
51986
|
local ____export = require("src.functions.curses")
|
|
51943
51987
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -52506,6 +52550,14 @@ do
|
|
|
52506
52550
|
end
|
|
52507
52551
|
end
|
|
52508
52552
|
end
|
|
52553
|
+
do
|
|
52554
|
+
local ____export = require("src.functions.sort")
|
|
52555
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
52556
|
+
if ____exportKey ~= "default" then
|
|
52557
|
+
____exports[____exportKey] = ____exportValue
|
|
52558
|
+
end
|
|
52559
|
+
end
|
|
52560
|
+
end
|
|
52509
52561
|
do
|
|
52510
52562
|
local ____export = require("src.functions.sound")
|
|
52511
52563
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -52743,7 +52795,7 @@ do
|
|
|
52743
52795
|
end
|
|
52744
52796
|
end
|
|
52745
52797
|
do
|
|
52746
|
-
local ____export = require("src.classes.
|
|
52798
|
+
local ____export = require("src.classes.ModUpgraded")
|
|
52747
52799
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
52748
52800
|
if ____exportKey ~= "default" then
|
|
52749
52801
|
____exports[____exportKey] = ____exportValue
|
|
@@ -53022,6 +53074,14 @@ do
|
|
|
53022
53074
|
end
|
|
53023
53075
|
end
|
|
53024
53076
|
end
|
|
53077
|
+
do
|
|
53078
|
+
local ____export = require("src.functions.console")
|
|
53079
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
53080
|
+
if ____exportKey ~= "default" then
|
|
53081
|
+
____exports[____exportKey] = ____exportValue
|
|
53082
|
+
end
|
|
53083
|
+
end
|
|
53084
|
+
end
|
|
53025
53085
|
do
|
|
53026
53086
|
local ____export = require("src.functions.curses")
|
|
53027
53087
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -53590,6 +53650,14 @@ do
|
|
|
53590
53650
|
end
|
|
53591
53651
|
end
|
|
53592
53652
|
end
|
|
53653
|
+
do
|
|
53654
|
+
local ____export = require("src.functions.sort")
|
|
53655
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
53656
|
+
if ____exportKey ~= "default" then
|
|
53657
|
+
____exports[____exportKey] = ____exportValue
|
|
53658
|
+
end
|
|
53659
|
+
end
|
|
53660
|
+
end
|
|
53593
53661
|
do
|
|
53594
53662
|
local ____export = require("src.functions.sound")
|
|
53595
53663
|
for ____exportKey, ____exportValue in pairs(____export) do
|