isaacscript-common 15.6.1 → 16.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +32 -13
- package/dist/isaacscript-common.lua +143 -134
- package/dist/lualib_bundle.lua +20 -21
- package/dist/src/callbacks.d.ts +1 -1
- package/dist/src/callbacks.d.ts.map +1 -1
- package/dist/src/classes/DefaultMap.d.ts +1 -1
- package/dist/src/classes/DefaultMap.d.ts.map +1 -1
- package/dist/src/classes/ModUpgradedBase.d.ts +5 -0
- package/dist/src/classes/ModUpgradedBase.d.ts.map +1 -1
- package/dist/src/classes/ModUpgradedBase.lua +5 -1
- package/dist/src/classes/callbacks/PostCollectibleEmpty.d.ts +1 -1
- package/dist/src/classes/callbacks/PostCollectibleEmpty.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostCustomRevive.d.ts +1 -1
- package/dist/src/classes/callbacks/PostCustomRevive.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostDiceRoomActivated.d.ts +1 -1
- package/dist/src/classes/callbacks/PostDiceRoomActivated.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostGridEntityCollision.d.ts +1 -1
- package/dist/src/classes/callbacks/PostGridEntityCollision.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostGridEntityCustomCollision.d.ts +1 -1
- package/dist/src/classes/callbacks/PostGridEntityCustomCollision.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostGridEntityCustomRemove.d.ts +1 -1
- package/dist/src/classes/callbacks/PostGridEntityCustomRemove.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostGridEntityRemove.d.ts +1 -1
- package/dist/src/classes/callbacks/PostGridEntityRemove.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostItemDischarge.d.ts +3 -3
- package/dist/src/classes/callbacks/PostItemDischarge.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostPurchase.d.ts +1 -1
- package/dist/src/classes/callbacks/PostPurchase.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostRoomClearChanged.d.ts +1 -1
- package/dist/src/classes/callbacks/PostRoomClearChanged.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostTransformation.d.ts +1 -1
- package/dist/src/classes/callbacks/PostTransformation.d.ts.map +1 -1
- package/dist/src/classes/features/callbackLogic/CustomGridEntities.d.ts +1 -1
- package/dist/src/classes/features/callbackLogic/CustomGridEntities.d.ts.map +1 -1
- package/dist/src/classes/features/callbackLogic/CustomGridEntities.lua +30 -27
- package/dist/src/classes/features/callbackLogic/CustomRevive.d.ts +1 -1
- package/dist/src/classes/features/callbackLogic/CustomRevive.d.ts.map +1 -1
- package/dist/src/classes/features/callbackLogic/CustomRevive.lua +4 -4
- package/dist/src/classes/features/callbackLogic/GridEntityUpdateDetection.d.ts +2 -2
- package/dist/src/classes/features/callbackLogic/GridEntityUpdateDetection.d.ts.map +1 -1
- package/dist/src/classes/features/callbackLogic/GridEntityUpdateDetection.lua +5 -2
- package/dist/src/classes/features/other/CustomHotkeys.lua +2 -2
- package/dist/src/classes/features/other/CustomStages.lua +4 -4
- package/dist/src/classes/features/other/PickupIndexCreation.d.ts +2 -2
- package/dist/src/classes/features/other/PickupIndexCreation.d.ts.map +1 -1
- package/dist/src/classes/features/other/PickupIndexCreation.lua +33 -48
- package/dist/src/classes/features/other/RoomHistory.d.ts +2 -2
- package/dist/src/classes/features/other/extraConsoleCommands/commands.d.ts.map +1 -1
- package/dist/src/classes/features/other/extraConsoleCommands/commands.lua +1 -1
- package/dist/src/classes/private/CustomCallback.d.ts +2 -2
- package/dist/src/classes/private/CustomCallback.d.ts.map +1 -1
- package/dist/src/core/upgradeMod.d.ts +11 -2
- package/dist/src/core/upgradeMod.d.ts.map +1 -1
- package/dist/src/core/upgradeMod.lua +19 -2
- package/dist/src/functions/bitSet128.d.ts +1 -1
- package/dist/src/functions/bitSet128.d.ts.map +1 -1
- package/dist/src/functions/color.d.ts +1 -1
- package/dist/src/functions/color.d.ts.map +1 -1
- package/dist/src/functions/flag.lua +5 -1
- package/dist/src/functions/gridIndex.lua +1 -1
- package/dist/src/functions/input.d.ts +1 -1
- package/dist/src/functions/input.d.ts.map +1 -1
- package/dist/src/functions/input.lua +0 -3
- package/dist/src/functions/kColor.d.ts +1 -1
- package/dist/src/functions/kColor.d.ts.map +1 -1
- package/dist/src/functions/logEntities.lua +9 -9
- package/dist/src/functions/logMisc.lua +1 -4
- package/dist/src/functions/pills.d.ts +3 -3
- package/dist/src/functions/pills.lua +3 -3
- package/dist/src/functions/rng.d.ts +1 -1
- package/dist/src/functions/rng.d.ts.map +1 -1
- package/dist/src/functions/roomShapeWalls.lua +2 -2
- package/dist/src/functions/run.lua +1 -1
- package/dist/src/functions/ui.d.ts +1 -1
- package/dist/src/functions/ui.lua +1 -1
- package/dist/src/functions/vector.d.ts +7 -1
- package/dist/src/functions/vector.d.ts.map +1 -1
- package/dist/src/functions/vector.lua +4 -0
- package/dist/src/interfaces/CustomStageTSConfig.d.ts +1 -1
- package/dist/src/interfaces/CustomStageTSConfig.d.ts.map +1 -1
- package/dist/src/interfaces/PlayerHealth.d.ts +1 -1
- package/dist/src/interfaces/PlayerHealth.d.ts.map +1 -1
- package/dist/src/interfaces/SaveData.d.ts +12 -12
- package/dist/src/interfaces/SaveData.d.ts.map +1 -1
- package/dist/src/interfaces/private/CustomStage.d.ts +3 -3
- package/dist/src/interfaces/private/CustomStage.d.ts.map +1 -1
- package/dist/src/objects/isaacAPIClassTypeToFunctions.d.ts +2 -2
- package/dist/src/objects/isaacAPIClassTypeToFunctions.d.ts.map +1 -1
- package/dist/src/types/AllButFirst.d.ts +1 -1
- package/dist/src/types/AllButFirst.d.ts.map +1 -1
- package/dist/src/types/AllButLast.d.ts +1 -1
- package/dist/src/types/AllButLast.d.ts.map +1 -1
- package/dist/src/types/AnyClass.d.ts +1 -1
- package/dist/src/types/AnyClass.d.ts.map +1 -1
- package/dist/src/types/AnyEntity.d.ts +1 -1
- package/dist/src/types/AnyEntity.d.ts.map +1 -1
- package/dist/src/types/AnyFunction.d.ts +1 -1
- package/dist/src/types/AnyFunction.d.ts.map +1 -1
- package/dist/src/types/AnyGridEntity.d.ts +1 -1
- package/dist/src/types/AnyGridEntity.d.ts.map +1 -1
- package/dist/src/types/CollectibleIndex.d.ts +1 -1
- package/dist/src/types/CollectibleIndex.d.ts.map +1 -1
- package/dist/src/types/ConversionHeartSubType.d.ts +1 -1
- package/dist/src/types/ConversionHeartSubType.d.ts.map +1 -1
- package/dist/src/types/EntityID.d.ts +1 -1
- package/dist/src/types/EntityID.d.ts.map +1 -1
- package/dist/src/types/FunctionTuple.d.ts +1 -1
- package/dist/src/types/FunctionTuple.d.ts.map +1 -1
- package/dist/src/types/GridEntityID.d.ts +1 -1
- package/dist/src/types/GridEntityID.d.ts.map +1 -1
- package/dist/src/types/HasAllEnumKeys.d.ts +1 -1
- package/dist/src/types/HasAllEnumKeys.d.ts.map +1 -1
- package/dist/src/types/HasFunction.d.ts +1 -1
- package/dist/src/types/HasFunction.d.ts.map +1 -1
- package/dist/src/types/Immutable.d.ts +6 -6
- package/dist/src/types/Immutable.d.ts.map +1 -1
- package/dist/src/types/LowercaseKeys.d.ts +1 -1
- package/dist/src/types/LowercaseKeys.d.ts.map +1 -1
- package/dist/src/types/ModUpgraded.d.ts +3 -3
- package/dist/src/types/ModUpgraded.d.ts.map +1 -1
- package/dist/src/types/PickingUpItem.d.ts +1 -1
- package/dist/src/types/PickingUpItem.d.ts.map +1 -1
- package/dist/src/types/PickupIndex.d.ts +1 -1
- package/dist/src/types/PickupIndex.d.ts.map +1 -1
- package/dist/src/types/PlayerIndex.d.ts +1 -1
- package/dist/src/types/PlayerIndex.d.ts.map +1 -1
- package/dist/src/types/PossibleStatType.d.ts +1 -1
- package/dist/src/types/PossibleStatType.d.ts.map +1 -1
- package/dist/src/types/PublicInterface.d.ts +1 -1
- package/dist/src/types/PublicInterface.d.ts.map +1 -1
- package/dist/src/types/StartsWithLowercase.d.ts +1 -1
- package/dist/src/types/StartsWithLowercase.d.ts.map +1 -1
- package/dist/src/types/StartsWithUppercase.d.ts +1 -1
- package/dist/src/types/StartsWithUppercase.d.ts.map +1 -1
- package/dist/src/types/TSTLClass.d.ts +1 -1
- package/dist/src/types/TSTLClass.d.ts.map +1 -1
- package/dist/src/types/TupleToIntersection.d.ts +1 -1
- package/dist/src/types/TupleToIntersection.d.ts.map +1 -1
- package/dist/src/types/TupleToUnion.d.ts +1 -1
- package/dist/src/types/TupleToUnion.d.ts.map +1 -1
- package/dist/src/types/UnionToIntersection.d.ts +1 -1
- package/dist/src/types/UnionToIntersection.d.ts.map +1 -1
- package/dist/src/types/UppercaseKeys.d.ts +1 -1
- package/dist/src/types/UppercaseKeys.d.ts.map +1 -1
- package/dist/src/types/WeightedArray.d.ts +1 -1
- package/dist/src/types/WeightedArray.d.ts.map +1 -1
- package/dist/src/types/Writable.d.ts +1 -1
- package/dist/src/types/Writable.d.ts.map +1 -1
- package/dist/src/types/private/AllButFirst.d.ts +1 -1
- package/dist/src/types/private/AllButFirst.d.ts.map +1 -1
- package/dist/src/types/private/CallbackTuple.d.ts +2 -2
- package/dist/src/types/private/CallbackTuple.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/classes/ModUpgradedBase.ts +9 -0
- package/src/classes/features/callbackLogic/CustomGridEntities.ts +36 -32
- package/src/classes/features/callbackLogic/CustomRevive.ts +3 -3
- package/src/classes/features/callbackLogic/GridEntityUpdateDetection.ts +7 -3
- package/src/classes/features/other/PickupIndexCreation.ts +43 -53
- package/src/classes/features/other/RoomHistory.ts +2 -2
- package/src/classes/features/other/extraConsoleCommands/commands.ts +2 -0
- package/src/core/upgradeMod.ts +23 -0
- package/src/functions/flag.ts +1 -1
- package/src/functions/input.ts +1 -5
- package/src/functions/pills.ts +3 -3
- package/src/functions/ui.ts +1 -1
- package/src/functions/vector.ts +6 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common
|
|
3
|
+
isaacscript-common 16.0.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -25,7 +25,15 @@ information about using TypeScript, see the website: https://isaacscript.github.
|
|
|
25
25
|
|
|
26
26
|
--]]
|
|
27
27
|
|
|
28
|
+
---@diagnostic disable: assign-type-mismatch
|
|
28
29
|
---@diagnostic disable: deprecated
|
|
30
|
+
---@diagnostic disable: lowercase-global
|
|
31
|
+
---@diagnostic disable: need-check-nil
|
|
32
|
+
---@diagnostic disable: redefined-local
|
|
33
|
+
---@diagnostic disable: redundant-parameter
|
|
34
|
+
---@diagnostic disable: unused-function
|
|
35
|
+
---@diagnostic disable: unused-local
|
|
36
|
+
---@diagnostic disable: unused-vararg
|
|
29
37
|
|
|
30
38
|
|
|
31
39
|
local ____modules = {}
|
|
@@ -1023,8 +1031,7 @@ do
|
|
|
1023
1031
|
if not rawget(metatable, "_descriptors") then
|
|
1024
1032
|
metatable._descriptors = {}
|
|
1025
1033
|
end
|
|
1026
|
-
|
|
1027
|
-
metatable._descriptors[key] = descriptor
|
|
1034
|
+
metatable._descriptors[key] = __TS__CloneDescriptor(desc)
|
|
1028
1035
|
metatable.__index = descriptorIndex
|
|
1029
1036
|
metatable.__newindex = descriptorNewIndex
|
|
1030
1037
|
end
|
|
@@ -1660,22 +1667,6 @@ local function __TS__ParseFloat(numberString)
|
|
|
1660
1667
|
return ____number_1
|
|
1661
1668
|
end
|
|
1662
1669
|
|
|
1663
|
-
local function __TS__StringSubstr(self, from, length)
|
|
1664
|
-
if from ~= from then
|
|
1665
|
-
from = 0
|
|
1666
|
-
end
|
|
1667
|
-
if length ~= nil then
|
|
1668
|
-
if length ~= length or length <= 0 then
|
|
1669
|
-
return ""
|
|
1670
|
-
end
|
|
1671
|
-
length = length + from
|
|
1672
|
-
end
|
|
1673
|
-
if from >= 0 then
|
|
1674
|
-
from = from + 1
|
|
1675
|
-
end
|
|
1676
|
-
return string.sub(self, from, length)
|
|
1677
|
-
end
|
|
1678
|
-
|
|
1679
1670
|
local function __TS__StringSubstring(self, start, ____end)
|
|
1680
1671
|
if ____end ~= ____end then
|
|
1681
1672
|
____end = 0
|
|
@@ -1705,9 +1696,9 @@ do
|
|
|
1705
1696
|
base = 16
|
|
1706
1697
|
local ____TS__Match_result__0_0
|
|
1707
1698
|
if __TS__Match(hexMatch, "-") then
|
|
1708
|
-
____TS__Match_result__0_0 = "-" ..
|
|
1699
|
+
____TS__Match_result__0_0 = "-" .. __TS__StringSubstring(numberString, #hexMatch)
|
|
1709
1700
|
else
|
|
1710
|
-
____TS__Match_result__0_0 =
|
|
1701
|
+
____TS__Match_result__0_0 = __TS__StringSubstring(numberString, #hexMatch)
|
|
1711
1702
|
end
|
|
1712
1703
|
numberString = ____TS__Match_result__0_0
|
|
1713
1704
|
end
|
|
@@ -1719,7 +1710,7 @@ do
|
|
|
1719
1710
|
if base <= 10 then
|
|
1720
1711
|
____temp_1 = __TS__StringSubstring(parseIntBasePattern, 0, base)
|
|
1721
1712
|
else
|
|
1722
|
-
____temp_1 =
|
|
1713
|
+
____temp_1 = __TS__StringSubstring(parseIntBasePattern, 0, 10 + 2 * (base - 10))
|
|
1723
1714
|
end
|
|
1724
1715
|
local allowedDigits = ____temp_1
|
|
1725
1716
|
local pattern = ("^%s*(-?[" .. allowedDigits) .. "]*)"
|
|
@@ -2429,6 +2420,22 @@ local function __TS__StringStartsWith(self, searchString, position)
|
|
|
2429
2420
|
return string.sub(self, position + 1, #searchString + position) == searchString
|
|
2430
2421
|
end
|
|
2431
2422
|
|
|
2423
|
+
local function __TS__StringSubstr(self, from, length)
|
|
2424
|
+
if from ~= from then
|
|
2425
|
+
from = 0
|
|
2426
|
+
end
|
|
2427
|
+
if length ~= nil then
|
|
2428
|
+
if length ~= length or length <= 0 then
|
|
2429
|
+
return ""
|
|
2430
|
+
end
|
|
2431
|
+
length = length + from
|
|
2432
|
+
end
|
|
2433
|
+
if from >= 0 then
|
|
2434
|
+
from = from + 1
|
|
2435
|
+
end
|
|
2436
|
+
return string.sub(self, from, length)
|
|
2437
|
+
end
|
|
2438
|
+
|
|
2432
2439
|
local function __TS__StringTrim(self)
|
|
2433
2440
|
local result = string.gsub(self, "^[%s ]*(.-)[%s ]*$", "%1")
|
|
2434
2441
|
return result
|
|
@@ -16788,6 +16795,8 @@ end
|
|
|
16788
16795
|
return ____exports
|
|
16789
16796
|
end,
|
|
16790
16797
|
["src.functions.flag"] = function(...)
|
|
16798
|
+
local ____lualib = require("lualib_bundle")
|
|
16799
|
+
local __TS__ObjectEntries = ____lualib.__TS__ObjectEntries
|
|
16791
16800
|
local ____exports = {}
|
|
16792
16801
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
16793
16802
|
local DamageFlag = ____isaac_2Dtypescript_2Ddefinitions.DamageFlag
|
|
@@ -16803,7 +16812,9 @@ function ____exports.bitFlags(self, flag)
|
|
|
16803
16812
|
return flag
|
|
16804
16813
|
end
|
|
16805
16814
|
function ____exports.getFlagName(self, flag, flagEnum)
|
|
16806
|
-
for
|
|
16815
|
+
for ____, ____value in ipairs(__TS__ObjectEntries(flagEnum)) do
|
|
16816
|
+
local key = ____value[1]
|
|
16817
|
+
local value = ____value[2]
|
|
16807
16818
|
if value == flag then
|
|
16808
16819
|
return key
|
|
16809
16820
|
end
|
|
@@ -23256,7 +23267,7 @@ function ____exports.restart(self, character)
|
|
|
23256
23267
|
local command = "restart " .. tostring(character)
|
|
23257
23268
|
log(
|
|
23258
23269
|
nil,
|
|
23259
|
-
(((("Restarting the run as PlayerType." ..
|
|
23270
|
+
(((("Restarting the run as PlayerType." .. PlayerType[character]) .. " (") .. tostring(character)) .. ") with a console command of: ") .. command
|
|
23260
23271
|
)
|
|
23261
23272
|
Isaac.ExecuteCommand(command)
|
|
23262
23273
|
end
|
|
@@ -27382,10 +27393,7 @@ function ____exports.logPlayerHealth(self, player)
|
|
|
27382
27393
|
)
|
|
27383
27394
|
log(nil, " Soul heart types: [")
|
|
27384
27395
|
for ____, soulHeartType in ipairs(playerHealth.soulHeartTypes) do
|
|
27385
|
-
log(
|
|
27386
|
-
nil,
|
|
27387
|
-
" HeartSubType." .. tostring(HeartSubType[soulHeartType])
|
|
27388
|
-
)
|
|
27396
|
+
log(nil, " HeartSubType." .. HeartSubType[soulHeartType])
|
|
27389
27397
|
end
|
|
27390
27398
|
log(nil, " ]")
|
|
27391
27399
|
end
|
|
@@ -30999,6 +31007,8 @@ local ____decorators = require("src.decorators")
|
|
|
30999
31007
|
local Exported = ____decorators.Exported
|
|
31000
31008
|
local ____ISCFeature = require("src.enums.ISCFeature")
|
|
31001
31009
|
local ISCFeature = ____ISCFeature.ISCFeature
|
|
31010
|
+
local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
|
|
31011
|
+
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
31002
31012
|
local ____gridEntities = require("src.functions.gridEntities")
|
|
31003
31013
|
local removeGridEntity = ____gridEntities.removeGridEntity
|
|
31004
31014
|
local spawnGridEntityWithVariant = ____gridEntities.spawnGridEntityWithVariant
|
|
@@ -31030,32 +31040,6 @@ function CustomGridEntities.prototype.____constructor(self, runInNFrames)
|
|
|
31030
31040
|
manuallyUsingShovel = false
|
|
31031
31041
|
}
|
|
31032
31042
|
}
|
|
31033
|
-
self.postNewRoom = function()
|
|
31034
|
-
local roomListIndex = getRoomListIndex(nil)
|
|
31035
|
-
local roomCustomGridEntities = self.v.level.customGridEntities:get(roomListIndex)
|
|
31036
|
-
if roomCustomGridEntities == nil then
|
|
31037
|
-
return
|
|
31038
|
-
end
|
|
31039
|
-
local room = game:GetRoom()
|
|
31040
|
-
for ____, ____value in __TS__Iterator(roomCustomGridEntities:entries()) do
|
|
31041
|
-
local gridIndex = ____value[1]
|
|
31042
|
-
local data = ____value[2]
|
|
31043
|
-
do
|
|
31044
|
-
local decoration = room:GetGridEntity(gridIndex)
|
|
31045
|
-
if decoration == nil then
|
|
31046
|
-
roomCustomGridEntities:delete(gridIndex)
|
|
31047
|
-
goto __continue6
|
|
31048
|
-
end
|
|
31049
|
-
if data.anm2Path ~= nil then
|
|
31050
|
-
local sprite = decoration:GetSprite()
|
|
31051
|
-
sprite:Load(data.anm2Path, true)
|
|
31052
|
-
local animationToPlay = data.defaultAnimation == nil and sprite:GetDefaultAnimation() or data.defaultAnimation
|
|
31053
|
-
sprite:Play(animationToPlay, true)
|
|
31054
|
-
end
|
|
31055
|
-
end
|
|
31056
|
-
::__continue6::
|
|
31057
|
-
end
|
|
31058
|
-
end
|
|
31059
31043
|
self.preUseItemWeNeedToGoDeeper = function(____, _collectibleType, _rng, player, _useFlags, _activeSlot, _customVarData)
|
|
31060
31044
|
local room = game:GetRoom()
|
|
31061
31045
|
local roomListIndex = getRoomListIndex(nil)
|
|
@@ -31084,8 +31068,35 @@ function CustomGridEntities.prototype.____constructor(self, runInNFrames)
|
|
|
31084
31068
|
end)
|
|
31085
31069
|
return true
|
|
31086
31070
|
end
|
|
31071
|
+
self.postNewRoomReordered = function()
|
|
31072
|
+
local roomListIndex = getRoomListIndex(nil)
|
|
31073
|
+
local roomCustomGridEntities = self.v.level.customGridEntities:get(roomListIndex)
|
|
31074
|
+
if roomCustomGridEntities == nil then
|
|
31075
|
+
return
|
|
31076
|
+
end
|
|
31077
|
+
local room = game:GetRoom()
|
|
31078
|
+
for ____, ____value in __TS__Iterator(roomCustomGridEntities:entries()) do
|
|
31079
|
+
local gridIndex = ____value[1]
|
|
31080
|
+
local data = ____value[2]
|
|
31081
|
+
do
|
|
31082
|
+
local decoration = room:GetGridEntity(gridIndex)
|
|
31083
|
+
if decoration == nil then
|
|
31084
|
+
roomCustomGridEntities:delete(gridIndex)
|
|
31085
|
+
goto __continue12
|
|
31086
|
+
end
|
|
31087
|
+
if data.anm2Path ~= nil then
|
|
31088
|
+
local sprite = decoration:GetSprite()
|
|
31089
|
+
sprite:Load(data.anm2Path, true)
|
|
31090
|
+
local animationToPlay = data.defaultAnimation == nil and sprite:GetDefaultAnimation() or data.defaultAnimation
|
|
31091
|
+
sprite:Play(animationToPlay, true)
|
|
31092
|
+
end
|
|
31093
|
+
end
|
|
31094
|
+
::__continue12::
|
|
31095
|
+
end
|
|
31096
|
+
end
|
|
31087
31097
|
self.featuresUsed = {ISCFeature.RUN_IN_N_FRAMES}
|
|
31088
|
-
self.callbacksUsed = {{ModCallback.
|
|
31098
|
+
self.callbacksUsed = {{ModCallback.PRE_USE_ITEM, {self.preUseItemWeNeedToGoDeeper, CollectibleType.WE_NEED_TO_GO_DEEPER}}}
|
|
31099
|
+
self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, {self.postNewRoomReordered}}}
|
|
31089
31100
|
self.runInNFrames = runInNFrames
|
|
31090
31101
|
end
|
|
31091
31102
|
function CustomGridEntities.prototype.spawnCustomGridEntity(self, gridEntityTypeCustom, gridIndexOrPosition, gridCollisionClass, anm2Path, defaultAnimation, baseGridEntityType, baseGridEntityVariant)
|
|
@@ -31261,7 +31272,7 @@ function CustomRevive.prototype.____constructor(self, preCustomRevive, postCusto
|
|
|
31261
31272
|
self.postPEffectUpdate = function(____, player)
|
|
31262
31273
|
self:checkWaitingForItemAnimation(player)
|
|
31263
31274
|
end
|
|
31264
|
-
self.
|
|
31275
|
+
self.postNewRoomReordered = function()
|
|
31265
31276
|
if self.v.run.state ~= CustomReviveState.WAITING_FOR_ROOM_TRANSITION then
|
|
31266
31277
|
return
|
|
31267
31278
|
end
|
|
@@ -31276,8 +31287,8 @@ function CustomRevive.prototype.____constructor(self, preCustomRevive, postCusto
|
|
|
31276
31287
|
self:playerIsAboutToDie(player)
|
|
31277
31288
|
end
|
|
31278
31289
|
self.featuresUsed = {ISCFeature.RUN_IN_N_FRAMES}
|
|
31279
|
-
self.callbacksUsed = {{ModCallback.POST_RENDER, {self.postRender}}, {ModCallback.POST_PEFFECT_UPDATE, {self.postPEffectUpdate}}
|
|
31280
|
-
self.customCallbacksUsed = {{ModCallbackCustom.POST_PLAYER_FATAL_DAMAGE, {self.postPlayerFatalDamage}}, {ModCallbackCustom.PRE_BERSERK_DEATH, {self.preBerserkDeath}}}
|
|
31290
|
+
self.callbacksUsed = {{ModCallback.POST_RENDER, {self.postRender}}, {ModCallback.POST_PEFFECT_UPDATE, {self.postPEffectUpdate}}}
|
|
31291
|
+
self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, {self.postNewRoomReordered}}, {ModCallbackCustom.POST_PLAYER_FATAL_DAMAGE, {self.postPlayerFatalDamage}}, {ModCallbackCustom.PRE_BERSERK_DEATH, {self.preBerserkDeath}}}
|
|
31281
31292
|
self.preCustomRevive = preCustomRevive
|
|
31282
31293
|
self.postCustomRevive = postCustomRevive
|
|
31283
31294
|
self.runInNFrames = runInNFrames
|
|
@@ -31340,7 +31351,7 @@ function CustomRevive.prototype.logStateChanged(self)
|
|
|
31340
31351
|
if DEBUG then
|
|
31341
31352
|
log(
|
|
31342
31353
|
nil,
|
|
31343
|
-
((("Custom revive state changed: " ..
|
|
31354
|
+
((("Custom revive state changed: " .. CustomReviveState[self.v.run.state]) .. " (") .. tostring(self.v.run.state)) .. ")"
|
|
31344
31355
|
)
|
|
31345
31356
|
end
|
|
31346
31357
|
end
|
|
@@ -31673,6 +31684,8 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescri
|
|
|
31673
31684
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
31674
31685
|
local ____ISCFeature = require("src.enums.ISCFeature")
|
|
31675
31686
|
local ISCFeature = ____ISCFeature.ISCFeature
|
|
31687
|
+
local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
|
|
31688
|
+
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
31676
31689
|
local ____gridEntities = require("src.functions.gridEntities")
|
|
31677
31690
|
local getGridEntitiesMap = ____gridEntities.getGridEntitiesMap
|
|
31678
31691
|
local isGridEntityBroken = ____gridEntities.isGridEntityBroken
|
|
@@ -31701,7 +31714,7 @@ function GridEntityUpdateDetection.prototype.____constructor(self, postGridEntit
|
|
|
31701
31714
|
end
|
|
31702
31715
|
end
|
|
31703
31716
|
end
|
|
31704
|
-
self.
|
|
31717
|
+
self.postNewRoomReordered = function()
|
|
31705
31718
|
local gridEntitiesMap = getGridEntitiesMap(nil)
|
|
31706
31719
|
for ____, ____value in __TS__Iterator(gridEntitiesMap:entries()) do
|
|
31707
31720
|
local gridIndex = ____value[1]
|
|
@@ -31710,7 +31723,8 @@ function GridEntityUpdateDetection.prototype.____constructor(self, postGridEntit
|
|
|
31710
31723
|
end
|
|
31711
31724
|
end
|
|
31712
31725
|
self.featuresUsed = {ISCFeature.RUN_IN_N_FRAMES}
|
|
31713
|
-
self.callbacksUsed = {{ModCallback.POST_UPDATE, {self.postUpdate}}
|
|
31726
|
+
self.callbacksUsed = {{ModCallback.POST_UPDATE, {self.postUpdate}}}
|
|
31727
|
+
self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, {self.postNewRoomReordered}}}
|
|
31714
31728
|
self.postGridEntityInit = postGridEntityInit
|
|
31715
31729
|
self.postGridEntityCustomInit = postGridEntityCustomInit
|
|
31716
31730
|
self.postGridEntityUpdate = postGridEntityUpdate
|
|
@@ -33886,12 +33900,8 @@ local ____decorators = require("src.decorators")
|
|
|
33886
33900
|
local Exported = ____decorators.Exported
|
|
33887
33901
|
local ____ISCFeature = require("src.enums.ISCFeature")
|
|
33888
33902
|
local ISCFeature = ____ISCFeature.ISCFeature
|
|
33889
|
-
local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
|
|
33890
|
-
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
33891
33903
|
local ____entities = require("src.functions.entities")
|
|
33892
33904
|
local getEntityID = ____entities.getEntityID
|
|
33893
|
-
local ____entitiesSpecific = require("src.functions.entitiesSpecific")
|
|
33894
|
-
local getPickups = ____entitiesSpecific.getPickups
|
|
33895
33905
|
local ____roomData = require("src.functions.roomData")
|
|
33896
33906
|
local getRoomListIndex = ____roomData.getRoomListIndex
|
|
33897
33907
|
local ____stage = require("src.functions.stage")
|
|
@@ -33931,53 +33941,41 @@ function PickupIndexCreation.prototype.____constructor(self, roomHistory)
|
|
|
33931
33941
|
room = {pickupIndexes = __TS__New(Map)}
|
|
33932
33942
|
}
|
|
33933
33943
|
self.postPickupInit = function(____, pickup)
|
|
33934
|
-
self:
|
|
33944
|
+
self:setPickupIndex(pickup)
|
|
33935
33945
|
end
|
|
33936
33946
|
self.postEntityRemovePickup = function(____, entity)
|
|
33937
33947
|
self:checkDespawningFromPlayerLeavingRoom(entity)
|
|
33938
33948
|
end
|
|
33939
|
-
self.postNewRoomReordered = function()
|
|
33940
|
-
local room = game:GetRoom()
|
|
33941
|
-
local isFirstVisit = room:IsFirstVisit()
|
|
33942
|
-
if isFirstVisit then
|
|
33943
|
-
return
|
|
33944
|
-
end
|
|
33945
|
-
local roomListIndex = getRoomListIndex(nil)
|
|
33946
|
-
local pickupDescriptions = self.v.level.pickupData:getAndSetDefault(roomListIndex)
|
|
33947
|
-
for ____, pickup in ipairs(getPickups(nil)) do
|
|
33948
|
-
local pickupIndex = getStoredPickupIndex(nil, pickup, pickupDescriptions)
|
|
33949
|
-
if pickupIndex == nil then
|
|
33950
|
-
pickupIndex = self:getPostAscentPickupIndex(pickup)
|
|
33951
|
-
end
|
|
33952
|
-
if pickupIndex == nil then
|
|
33953
|
-
local ____self_v_run_0, ____pickupCounter_1 = self.v.run, "pickupCounter"
|
|
33954
|
-
____self_v_run_0[____pickupCounter_1] = ____self_v_run_0[____pickupCounter_1] + 1
|
|
33955
|
-
pickupIndex = self.v.run.pickupCounter
|
|
33956
|
-
end
|
|
33957
|
-
local ptrHash = GetPtrHash(pickup)
|
|
33958
|
-
self.v.room.pickupIndexes:set(ptrHash, pickupIndex)
|
|
33959
|
-
end
|
|
33960
|
-
end
|
|
33961
33949
|
self.featuresUsed = {ISCFeature.ROOM_HISTORY}
|
|
33962
33950
|
self.callbacksUsed = {{ModCallback.POST_PICKUP_INIT, {self.postPickupInit}}, {ModCallback.POST_ENTITY_REMOVE, {self.postEntityRemovePickup, EntityType.PICKUP}}}
|
|
33963
|
-
self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, {self.postNewRoomReordered}}}
|
|
33964
33951
|
self.roomHistory = roomHistory
|
|
33965
33952
|
end
|
|
33966
|
-
function PickupIndexCreation.prototype.
|
|
33953
|
+
function PickupIndexCreation.prototype.setPickupIndex(self, pickup)
|
|
33967
33954
|
local ptrHash = GetPtrHash(pickup)
|
|
33968
33955
|
if self.v.room.pickupIndexes:has(ptrHash) then
|
|
33969
33956
|
return
|
|
33970
33957
|
end
|
|
33958
|
+
local pickupIndexFromLevelData = self:getPickupIndexFromPreviousData(pickup)
|
|
33971
33959
|
local room = game:GetRoom()
|
|
33972
33960
|
local isFirstVisit = room:IsFirstVisit()
|
|
33973
33961
|
local roomFrameCount = room:GetFrameCount()
|
|
33974
|
-
if not isFirstVisit and roomFrameCount <= 0 then
|
|
33962
|
+
if pickupIndexFromLevelData ~= nil and not isFirstVisit and roomFrameCount <= 0 then
|
|
33963
|
+
self.v.room.pickupIndexes:set(ptrHash, pickupIndexFromLevelData)
|
|
33975
33964
|
return
|
|
33976
33965
|
end
|
|
33977
|
-
local
|
|
33978
|
-
|
|
33966
|
+
local ____self_v_run_0, ____pickupCounter_1 = self.v.run, "pickupCounter"
|
|
33967
|
+
____self_v_run_0[____pickupCounter_1] = ____self_v_run_0[____pickupCounter_1] + 1
|
|
33979
33968
|
self.v.room.pickupIndexes:set(ptrHash, self.v.run.pickupCounter)
|
|
33980
33969
|
end
|
|
33970
|
+
function PickupIndexCreation.prototype.getPickupIndexFromPreviousData(self, pickup)
|
|
33971
|
+
local roomListIndex = getRoomListIndex(nil)
|
|
33972
|
+
local pickupDescriptions = self.v.level.pickupData:getAndSetDefault(roomListIndex)
|
|
33973
|
+
local pickupIndex = getStoredPickupIndex(nil, pickup, pickupDescriptions)
|
|
33974
|
+
if pickupIndex == nil then
|
|
33975
|
+
pickupIndex = self:getPostAscentPickupIndex(pickup)
|
|
33976
|
+
end
|
|
33977
|
+
return pickupIndex
|
|
33978
|
+
end
|
|
33981
33979
|
function PickupIndexCreation.prototype.checkDespawningFromPlayerLeavingRoom(self, entity)
|
|
33982
33980
|
local ptrHash = GetPtrHash(entity)
|
|
33983
33981
|
local pickupIndex = self.v.room.pickupIndexes:get(ptrHash)
|
|
@@ -34004,16 +34002,16 @@ function PickupIndexCreation.prototype.trackDespawningPickupMetadata(self, entit
|
|
|
34004
34002
|
local room = game:GetRoom()
|
|
34005
34003
|
local roomType = room:GetType()
|
|
34006
34004
|
repeat
|
|
34007
|
-
local
|
|
34008
|
-
local
|
|
34009
|
-
if
|
|
34005
|
+
local ____switch17 = roomType
|
|
34006
|
+
local ____cond17 = ____switch17 == RoomType.TREASURE
|
|
34007
|
+
if ____cond17 then
|
|
34010
34008
|
do
|
|
34011
34009
|
self.v.run.pickupDataTreasureRooms:set(pickupIndex, pickupDescription)
|
|
34012
34010
|
break
|
|
34013
34011
|
end
|
|
34014
34012
|
end
|
|
34015
|
-
|
|
34016
|
-
if
|
|
34013
|
+
____cond17 = ____cond17 or ____switch17 == RoomType.BOSS
|
|
34014
|
+
if ____cond17 then
|
|
34017
34015
|
do
|
|
34018
34016
|
self.v.run.pickupDataBossRooms:set(pickupIndex, pickupDescription)
|
|
34019
34017
|
break
|
|
@@ -34033,15 +34031,15 @@ function PickupIndexCreation.prototype.getPostAscentPickupIndex(self, pickup)
|
|
|
34033
34031
|
local room = game:GetRoom()
|
|
34034
34032
|
local roomType = room:GetType()
|
|
34035
34033
|
repeat
|
|
34036
|
-
local
|
|
34037
|
-
local
|
|
34038
|
-
if
|
|
34034
|
+
local ____switch23 = roomType
|
|
34035
|
+
local ____cond23 = ____switch23 == RoomType.TREASURE
|
|
34036
|
+
if ____cond23 then
|
|
34039
34037
|
do
|
|
34040
34038
|
return getStoredPickupIndex(nil, pickup, self.v.run.pickupDataTreasureRooms)
|
|
34041
34039
|
end
|
|
34042
34040
|
end
|
|
34043
|
-
|
|
34044
|
-
if
|
|
34041
|
+
____cond23 = ____cond23 or ____switch23 == RoomType.BOSS
|
|
34042
|
+
if ____cond23 then
|
|
34045
34043
|
do
|
|
34046
34044
|
return getStoredPickupIndex(nil, pickup, self.v.run.pickupDataBossRooms)
|
|
34047
34045
|
end
|
|
@@ -34056,15 +34054,16 @@ end
|
|
|
34056
34054
|
function PickupIndexCreation.prototype.getPickupIndex(self, pickup)
|
|
34057
34055
|
local ptrHash = GetPtrHash(pickup)
|
|
34058
34056
|
local pickupIndexInitial = self.v.room.pickupIndexes:get(ptrHash)
|
|
34059
|
-
if pickupIndexInitial
|
|
34060
|
-
|
|
34057
|
+
if pickupIndexInitial ~= nil then
|
|
34058
|
+
return pickupIndexInitial
|
|
34061
34059
|
end
|
|
34060
|
+
self:setPickupIndex(pickup)
|
|
34062
34061
|
local pickupIndex = self.v.room.pickupIndexes:get(ptrHash)
|
|
34063
|
-
if pickupIndex
|
|
34064
|
-
|
|
34065
|
-
error("Failed to generate a new pickup index for pickup: " .. entityID)
|
|
34062
|
+
if pickupIndex ~= nil then
|
|
34063
|
+
return pickupIndex
|
|
34066
34064
|
end
|
|
34067
|
-
|
|
34065
|
+
local entityID = getEntityID(nil, pickup)
|
|
34066
|
+
error("Failed to generate a new pickup index for pickup: " .. entityID)
|
|
34068
34067
|
end
|
|
34069
34068
|
__TS__Decorate({Exported}, PickupIndexCreation.prototype, "getPickupIndex", true)
|
|
34070
34069
|
return ____exports
|
|
@@ -34230,9 +34229,6 @@ local SHOOTING_ACTIONS = {ButtonAction.SHOOT_LEFT, ButtonAction.SHOOT_RIGHT, But
|
|
|
34230
34229
|
____exports.SHOOTING_ACTIONS_SET = __TS__New(Set, SHOOTING_ACTIONS)
|
|
34231
34230
|
function ____exports.controllerToString(self, controller)
|
|
34232
34231
|
local key = Controller[controller]
|
|
34233
|
-
if key == nil then
|
|
34234
|
-
return nil
|
|
34235
|
-
end
|
|
34236
34232
|
return trimPrefix(nil, key, "BUTTON_")
|
|
34237
34233
|
end
|
|
34238
34234
|
function ____exports.getMoveActions(self)
|
|
@@ -34370,7 +34366,7 @@ function CustomHotkeys.prototype.setConditionalHotkey(self, getKeyFunc, triggerF
|
|
|
34370
34366
|
end
|
|
34371
34367
|
function CustomHotkeys.prototype.setHotkey(self, keyboard, triggerFunc)
|
|
34372
34368
|
if self.staticHotkeyFunctionMap:has(keyboard) then
|
|
34373
|
-
error(((("Failed to register a hotkey due to a hotkey already being defined for: Keyboard." ..
|
|
34369
|
+
error(((("Failed to register a hotkey due to a hotkey already being defined for: Keyboard." .. Keyboard[keyboard]) .. " (") .. tostring(keyboard)) .. ")")
|
|
34374
34370
|
end
|
|
34375
34371
|
self.staticHotkeyFunctionMap:set(keyboard, triggerFunc)
|
|
34376
34372
|
end
|
|
@@ -34382,7 +34378,7 @@ function CustomHotkeys.prototype.unsetConditionalHotkey(self, getKeyFunc)
|
|
|
34382
34378
|
end
|
|
34383
34379
|
function CustomHotkeys.prototype.unsetHotkey(self, keyboard)
|
|
34384
34380
|
if not self.staticHotkeyFunctionMap:has(keyboard) then
|
|
34385
|
-
error(((("Failed to unregister a hotkey since there is no existing hotkey defined for: Keyboard." ..
|
|
34381
|
+
error(((("Failed to unregister a hotkey since there is no existing hotkey defined for: Keyboard." .. Keyboard[keyboard]) .. " (") .. tostring(keyboard)) .. ")")
|
|
34386
34382
|
end
|
|
34387
34383
|
self.staticHotkeyFunctionMap:delete(keyboard)
|
|
34388
34384
|
end
|
|
@@ -39128,7 +39124,7 @@ function CustomStages.prototype.setStageRoomsData(self, customStage, rng, verbos
|
|
|
39128
39124
|
if roomType == RoomType.DEFAULT then
|
|
39129
39125
|
logError(
|
|
39130
39126
|
nil,
|
|
39131
|
-
(((("Failed to find any custom rooms for RoomType." ..
|
|
39127
|
+
(((("Failed to find any custom rooms for RoomType." .. RoomType[roomType]) .. " (") .. tostring(roomType)) .. ") for custom stage: ") .. customStage.name
|
|
39132
39128
|
)
|
|
39133
39129
|
end
|
|
39134
39130
|
goto __continue26
|
|
@@ -39138,7 +39134,7 @@ function CustomStages.prototype.setStageRoomsData(self, customStage, rng, verbos
|
|
|
39138
39134
|
if roomDoorSlotFlagMap == nil then
|
|
39139
39135
|
logError(
|
|
39140
39136
|
nil,
|
|
39141
|
-
(((((((("Failed to find any custom rooms for RoomType." ..
|
|
39137
|
+
(((((((("Failed to find any custom rooms for RoomType." .. RoomType[roomType]) .. " (") .. tostring(roomType)) .. ") + RoomShape.") .. RoomShape[roomShape]) .. " (") .. tostring(roomShape)) .. ") for custom stage: ") .. customStage.name
|
|
39142
39138
|
)
|
|
39143
39139
|
goto __continue26
|
|
39144
39140
|
end
|
|
@@ -39147,13 +39143,13 @@ function CustomStages.prototype.setStageRoomsData(self, customStage, rng, verbos
|
|
|
39147
39143
|
if roomsMetadata == nil then
|
|
39148
39144
|
logError(
|
|
39149
39145
|
nil,
|
|
39150
|
-
(((((((((("Failed to find any custom rooms for RoomType." ..
|
|
39146
|
+
(((((((((("Failed to find any custom rooms for RoomType." .. RoomType[roomType]) .. " (") .. tostring(roomType)) .. ") + RoomShape.") .. RoomShape[roomShape]) .. " (") .. tostring(roomShape)) .. ") + DoorSlotFlags ") .. tostring(doorSlotFlags)) .. " for custom stage: ") .. customStage.name
|
|
39151
39147
|
)
|
|
39152
39148
|
local header = ("For reference, a DoorSlotFlags of " .. tostring(doorSlotFlags)) .. " is equal to the following doors being enabled:\n"
|
|
39153
39149
|
local doorSlots = doorSlotFlagsToDoorSlots(nil, doorSlotFlags)
|
|
39154
39150
|
local doorSlotLines = __TS__ArrayMap(
|
|
39155
39151
|
doorSlots,
|
|
39156
|
-
function(____, doorSlot) return ((("- DoorSlot." ..
|
|
39152
|
+
function(____, doorSlot) return ((("- DoorSlot." .. DoorSlot[doorSlot]) .. " (") .. tostring(doorSlot)) .. ")" end
|
|
39157
39153
|
)
|
|
39158
39154
|
local explanation = header .. table.concat(doorSlotLines, "\n")
|
|
39159
39155
|
logError(nil, explanation)
|
|
@@ -40015,7 +40011,7 @@ function ____exports.getGridIndexesBetween(self, gridIndex1, gridIndex2, roomSha
|
|
|
40015
40011
|
if isOnVerticalLine then
|
|
40016
40012
|
return iRange(nil, gridIndex1, gridIndex2, gridWidth)
|
|
40017
40013
|
end
|
|
40018
|
-
error(((((((("Failed to get the grid indexes between " .. tostring(gridIndex1)) .. " and ") .. tostring(gridIndex2)) .. " for RoomShape.") ..
|
|
40014
|
+
error(((((((("Failed to get the grid indexes between " .. tostring(gridIndex1)) .. " and ") .. tostring(gridIndex2)) .. " for RoomShape.") .. RoomShape[roomShape]) .. " (") .. tostring(roomShape)) .. ") since they are not on the same horizontal or vertical line.")
|
|
40019
40015
|
end
|
|
40020
40016
|
return ____exports
|
|
40021
40017
|
end,
|
|
@@ -40058,7 +40054,7 @@ function getVanillaWallGridIndexSetForRoomShape(self, roomShape)
|
|
|
40058
40054
|
local corners = getRoomShapeCorners(nil, roomShape)
|
|
40059
40055
|
local lRoom = isLRoom(nil, roomShape)
|
|
40060
40056
|
if lRoom and #corners ~= 6 then
|
|
40061
|
-
error(((("Failed to get the correct amount of corners for: RoomShape." ..
|
|
40057
|
+
error(((("Failed to get the correct amount of corners for: RoomShape." .. RoomShape[roomShape]) .. " (") .. tostring(roomShape)) .. ")")
|
|
40062
40058
|
end
|
|
40063
40059
|
repeat
|
|
40064
40060
|
local ____switch7 = roomShape
|
|
@@ -40280,7 +40276,7 @@ function ____exports.isVanillaWallGridIndex(self, gridIndex)
|
|
|
40280
40276
|
wallGridIndexSet = ROOM_SHAPE_TO_WALL_GRID_INDEX_SET:get(roomShape)
|
|
40281
40277
|
end
|
|
40282
40278
|
if wallGridIndexSet == nil then
|
|
40283
|
-
error(((("Failed to find the wall grid index set for: RoomShape." ..
|
|
40279
|
+
error(((("Failed to find the wall grid index set for: RoomShape." .. RoomShape[roomShape]) .. " (") .. tostring(roomShape)) .. ")")
|
|
40284
40280
|
end
|
|
40285
40281
|
return wallGridIndexSet:has(gridIndex)
|
|
40286
40282
|
end
|
|
@@ -44462,23 +44458,23 @@ function getEntityLogLine(self, entity, num)
|
|
|
44462
44458
|
msg = msg .. getEntityID(nil, entity)
|
|
44463
44459
|
local bomb = entity:ToBomb()
|
|
44464
44460
|
if bomb ~= nil then
|
|
44465
|
-
msg = msg .. (" (bomb - BombVariant." ..
|
|
44461
|
+
msg = msg .. (" (bomb - BombVariant." .. BombVariant[bomb.Variant]) .. ")"
|
|
44466
44462
|
end
|
|
44467
44463
|
local effect = entity:ToEffect()
|
|
44468
44464
|
if effect ~= nil then
|
|
44469
|
-
msg = msg .. (((" (effect - EffectVariant." ..
|
|
44465
|
+
msg = msg .. (((" (effect - EffectVariant." .. EffectVariant[effect.Variant]) .. ") (State: ") .. tostring(effect.State)) .. ")"
|
|
44470
44466
|
end
|
|
44471
44467
|
local familiar = entity:ToFamiliar()
|
|
44472
44468
|
if familiar ~= nil then
|
|
44473
|
-
msg = msg .. (((" (familiar - FamiliarVariant." ..
|
|
44469
|
+
msg = msg .. (((" (familiar - FamiliarVariant." .. FamiliarVariant[familiar.Variant]) .. ") (State: ") .. tostring(familiar.State)) .. ")"
|
|
44474
44470
|
end
|
|
44475
44471
|
local knife = entity:ToKnife()
|
|
44476
44472
|
if knife ~= nil then
|
|
44477
|
-
msg = msg .. (" (knife - KnifeVariant." ..
|
|
44473
|
+
msg = msg .. (" (knife - KnifeVariant." .. KnifeVariant[knife.Variant]) .. ")"
|
|
44478
44474
|
end
|
|
44479
44475
|
local laser = entity:ToLaser()
|
|
44480
44476
|
if laser ~= nil then
|
|
44481
|
-
msg = msg .. (" (laser - LaserVariant." ..
|
|
44477
|
+
msg = msg .. (" (laser - LaserVariant." .. LaserVariant[laser.Variant]) .. ")"
|
|
44482
44478
|
end
|
|
44483
44479
|
local npc = entity:ToNPC()
|
|
44484
44480
|
if npc ~= nil then
|
|
@@ -44486,19 +44482,19 @@ function getEntityLogLine(self, entity, num)
|
|
|
44486
44482
|
end
|
|
44487
44483
|
local pickup = entity:ToPickup()
|
|
44488
44484
|
if pickup ~= nil then
|
|
44489
|
-
msg = msg .. (((" (pickup - PickupVariant." ..
|
|
44485
|
+
msg = msg .. (((" (pickup - PickupVariant." .. PickupVariant[pickup.Variant]) .. ") (State: ") .. tostring(pickup.State)) .. ")"
|
|
44490
44486
|
end
|
|
44491
44487
|
local player = entity:ToPlayer()
|
|
44492
44488
|
if player ~= nil then
|
|
44493
|
-
msg = msg .. (" (player - PlayerVariant." ..
|
|
44489
|
+
msg = msg .. (" (player - PlayerVariant." .. PlayerVariant[player.Variant]) .. ")"
|
|
44494
44490
|
end
|
|
44495
44491
|
local projectile = entity:ToProjectile()
|
|
44496
44492
|
if projectile ~= nil then
|
|
44497
|
-
msg = msg .. (" (projectile - ProjectileVariant." ..
|
|
44493
|
+
msg = msg .. (" (projectile - ProjectileVariant." .. ProjectileVariant[projectile.Variant]) .. "))"
|
|
44498
44494
|
end
|
|
44499
44495
|
local tear = entity:ToTear()
|
|
44500
44496
|
if tear ~= nil then
|
|
44501
|
-
msg = msg .. (" (tear - TearVariant." ..
|
|
44497
|
+
msg = msg .. (" (tear - TearVariant." .. TearVariant[tear.Variant]) .. "))"
|
|
44502
44498
|
end
|
|
44503
44499
|
msg = msg .. "\n"
|
|
44504
44500
|
msg = msg .. (" - Index: " .. tostring(entity.Index)) .. "\n"
|
|
@@ -45410,7 +45406,7 @@ function ____exports.getCharge(self, params)
|
|
|
45410
45406
|
local totalCharge = getTotalCharge(nil, player, activeSlot)
|
|
45411
45407
|
printConsole(
|
|
45412
45408
|
nil,
|
|
45413
|
-
(((("Total charge for ActiveSlot." ..
|
|
45409
|
+
(((("Total charge for ActiveSlot." .. ActiveSlot[activeSlot]) .. " (") .. tostring(activeSlot)) .. ") is: ") .. tostring(totalCharge)
|
|
45414
45410
|
)
|
|
45415
45411
|
end
|
|
45416
45412
|
function ____exports.getPosition(self)
|
|
@@ -48766,7 +48762,7 @@ function ModUpgradedBase.prototype.AddCallback(self, modCallback, ...)
|
|
|
48766
48762
|
local callback = args[1]
|
|
48767
48763
|
local optionalArg = args[2]
|
|
48768
48764
|
local parentFunctionDescription = getParentFunctionDescription(nil)
|
|
48769
|
-
local callbackName = "ModCallback." ..
|
|
48765
|
+
local callbackName = "ModCallback." .. ModCallback[modCallback]
|
|
48770
48766
|
local signature = parentFunctionDescription == nil and callbackName or (parentFunctionDescription .. " - ") .. callbackName
|
|
48771
48767
|
local function callbackWithLogger(____, ...)
|
|
48772
48768
|
local startTime = getTime(nil)
|
|
@@ -48951,6 +48947,10 @@ function ModUpgradedBase.prototype.initOptionalFeature(self, feature)
|
|
|
48951
48947
|
self:initFeature(featureClass)
|
|
48952
48948
|
return getExportedMethodsFromFeature(nil, featureClass)
|
|
48953
48949
|
end
|
|
48950
|
+
function ModUpgradedBase.prototype.initCustomCallbackEarly(self, modCallbackCustom)
|
|
48951
|
+
local callbackClass = self.callbacks[modCallbackCustom]
|
|
48952
|
+
self:initFeature(callbackClass)
|
|
48953
|
+
end
|
|
48954
48954
|
return ____exports
|
|
48955
48955
|
end,
|
|
48956
48956
|
["src.classes.ModFeature"] = function(...)
|
|
@@ -49241,7 +49241,7 @@ return ____exports
|
|
|
49241
49241
|
local ____lualib = require("lualib_bundle")
|
|
49242
49242
|
local __TS__New = ____lualib.__TS__New
|
|
49243
49243
|
local ____exports = {}
|
|
49244
|
-
local initOptionalFeatures
|
|
49244
|
+
local initOptionalFeatures, initCallbacksEarly
|
|
49245
49245
|
local ____ModUpgradedBase = require("src.classes.ModUpgradedBase")
|
|
49246
49246
|
local ModUpgradedBase = ____ModUpgradedBase.ModUpgradedBase
|
|
49247
49247
|
local ____patchErrorFunctions = require("src.patchErrorFunctions")
|
|
@@ -49259,10 +49259,18 @@ function initOptionalFeatures(self, mod, features)
|
|
|
49259
49259
|
end
|
|
49260
49260
|
end
|
|
49261
49261
|
end
|
|
49262
|
-
function
|
|
49262
|
+
function initCallbacksEarly(self, mod, callbacks)
|
|
49263
|
+
for ____, modCallbackCustom in ipairs(callbacks) do
|
|
49264
|
+
mod.initCustomCallbackEarly(mod, modCallbackCustom)
|
|
49265
|
+
end
|
|
49266
|
+
end
|
|
49267
|
+
function ____exports.upgradeMod(self, modVanilla, features, customCallbacksUsed, ____debug, timeThreshold)
|
|
49263
49268
|
if features == nil then
|
|
49264
49269
|
features = {}
|
|
49265
49270
|
end
|
|
49271
|
+
if customCallbacksUsed == nil then
|
|
49272
|
+
customCallbacksUsed = {}
|
|
49273
|
+
end
|
|
49266
49274
|
if ____debug == nil then
|
|
49267
49275
|
____debug = false
|
|
49268
49276
|
end
|
|
@@ -49270,6 +49278,7 @@ function ____exports.upgradeMod(self, modVanilla, features, ____debug, timeThres
|
|
|
49270
49278
|
local mod = __TS__New(ModUpgradedBase, modVanilla, ____debug, timeThreshold)
|
|
49271
49279
|
applyShaderCrashFix(nil, mod)
|
|
49272
49280
|
initOptionalFeatures(nil, mod, features)
|
|
49281
|
+
initCallbacksEarly(nil, mod, customCallbacksUsed)
|
|
49273
49282
|
return mod
|
|
49274
49283
|
end
|
|
49275
49284
|
return ____exports
|