isaacscript-common 11.0.1 → 11.2.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 +15 -1
- package/dist/isaacscript-common.lua +337 -193
- package/dist/package.lua +2 -2
- package/dist/src/features/extraConsoleCommands/init.d.ts.map +1 -1
- package/dist/src/features/extraConsoleCommands/init.lua +14 -21
- package/dist/src/features/extraConsoleCommands/listCommands.d.ts +26 -7
- package/dist/src/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
- package/dist/src/features/extraConsoleCommands/listCommands.lua +114 -23
- package/dist/src/features/extraConsoleCommands/v.d.ts +7 -6
- package/dist/src/features/extraConsoleCommands/v.d.ts.map +1 -1
- package/dist/src/features/extraConsoleCommands/v.lua +9 -7
- package/dist/src/features/saveDataManager/main.d.ts.map +1 -1
- package/dist/src/features/saveDataManager/main.lua +6 -1
- package/dist/src/functions/collectibles.d.ts +4 -0
- package/dist/src/functions/collectibles.d.ts.map +1 -1
- package/dist/src/functions/collectibles.lua +4 -0
- package/dist/src/functions/map.d.ts +1 -1
- package/dist/src/functions/map.lua +1 -1
- package/dist/src/functions/tears.d.ts +6 -0
- package/dist/src/functions/tears.d.ts.map +1 -1
- package/dist/src/functions/tears.lua +6 -0
- package/dist/src/functions/trinkets.d.ts +4 -0
- package/dist/src/functions/trinkets.d.ts.map +1 -1
- package/dist/src/functions/trinkets.lua +4 -0
- package/dist/src/maps/transformationNameToPlayerForm.d.ts +4 -0
- package/dist/src/maps/transformationNameToPlayerForm.d.ts.map +1 -0
- package/dist/src/maps/transformationNameToPlayerForm.lua +37 -0
- package/package.json +2 -2
- package/src/features/extraConsoleCommands/init.ts +20 -26
- package/src/features/extraConsoleCommands/listCommands.ts +128 -24
- package/src/features/extraConsoleCommands/v.ts +11 -7
- package/src/features/saveDataManager/main.ts +12 -1
- package/src/functions/collectibles.ts +4 -0
- package/src/functions/map.ts +1 -1
- package/src/functions/tears.ts +6 -0
- package/src/functions/trinkets.ts +4 -0
- package/src/maps/transformationNameToPlayerForm.ts +35 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 11.0
|
|
3
|
+
isaacscript-common 11.2.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -4861,7 +4861,7 @@ return ____exports
|
|
|
4861
4861
|
["lua_modules.isaac-typescript-definitions.dist.package"] = function(...)
|
|
4862
4862
|
return {
|
|
4863
4863
|
name = "isaac-typescript-definitions",
|
|
4864
|
-
version = "7.2.
|
|
4864
|
+
version = "7.2.3",
|
|
4865
4865
|
description = "TypeScript definitions for The Binding of Isaac: Repentance.",
|
|
4866
4866
|
keywords = {"isaac", "rebirth", "afterbirth", "repentance"},
|
|
4867
4867
|
homepage = "https://isaacscript.github.io/",
|
|
@@ -25272,6 +25272,8 @@ function ____exports.getCollectibleChargeType(self, collectibleType)
|
|
|
25272
25272
|
end
|
|
25273
25273
|
--- Helper function to get the in-game description for a collectible. Returns "Unknown" if the
|
|
25274
25274
|
-- provided collectible type was not valid.
|
|
25275
|
+
--
|
|
25276
|
+
-- This function works for both vanilla and modded collectibles.
|
|
25275
25277
|
function ____exports.getCollectibleDescription(self, collectibleType)
|
|
25276
25278
|
local collectibleDescription = COLLECTIBLE_DESCRIPTION_MAP:get(collectibleType)
|
|
25277
25279
|
if collectibleDescription ~= nil then
|
|
@@ -25423,6 +25425,8 @@ end
|
|
|
25423
25425
|
-- type is not valid.
|
|
25424
25426
|
--
|
|
25425
25427
|
-- For example, `getCollectibleName(CollectibleType.SAD_ONION)` would return "Sad Onion".
|
|
25428
|
+
--
|
|
25429
|
+
-- This function works for both vanilla and modded collectibles.
|
|
25426
25430
|
function ____exports.getCollectibleName(self, collectibleType)
|
|
25427
25431
|
local collectibleName = COLLECTIBLE_TYPE_TO_NAME_MAP:get(collectibleType)
|
|
25428
25432
|
if collectibleName ~= nil then
|
|
@@ -29016,6 +29020,8 @@ function ____exports.getOpenTrinketSlot(self, player)
|
|
|
29016
29020
|
end
|
|
29017
29021
|
--- Helper function to get the in-game description for a trinket. Returns "Unknown" if the provided
|
|
29018
29022
|
-- trinket type was not valid.
|
|
29023
|
+
--
|
|
29024
|
+
-- This function works for both vanilla and modded trinkets.
|
|
29019
29025
|
function ____exports.getTrinketDescription(self, trinketType)
|
|
29020
29026
|
local trinketDescription = TRINKET_DESCRIPTION_MAP:get(trinketType)
|
|
29021
29027
|
if trinketDescription ~= nil then
|
|
@@ -29044,6 +29050,8 @@ end
|
|
|
29044
29050
|
-- not valid.
|
|
29045
29051
|
--
|
|
29046
29052
|
-- For example, `getTrinketName(TrinketType.SWALLOWED_PENNY)` would return "Swallowed Penny".
|
|
29053
|
+
--
|
|
29054
|
+
-- This function works for both vanilla and modded trinkets.
|
|
29047
29055
|
function ____exports.getTrinketName(self, trinketType)
|
|
29048
29056
|
local trinketName = TRINKET_TYPE_TO_NAME_MAP:get(trinketType)
|
|
29049
29057
|
if trinketName ~= nil then
|
|
@@ -31625,8 +31633,9 @@ local ____lualib = require("lualib_bundle")
|
|
|
31625
31633
|
local Set = ____lualib.Set
|
|
31626
31634
|
local __TS__New = ____lualib.__TS__New
|
|
31627
31635
|
local ____exports = {}
|
|
31628
|
-
local postPlayerInit, preGameExit, postNewLevel, postNewRoomEarly, restoreDefaultsAll, restoreDefaults, clearAndCopyAllElements, RESETTABLE_SAVE_DATA_KEYS, mod, loadedDataOnThisRun
|
|
31636
|
+
local postUseItemGlowingHourGlass, postPlayerInit, preGameExit, postNewLevel, postNewRoomEarly, restoreDefaultsAll, restoreDefaults, clearAndCopyAllElements, RESETTABLE_SAVE_DATA_KEYS, mod, loadedDataOnThisRun
|
|
31629
31637
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
31638
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
31630
31639
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
31631
31640
|
local ____cachedClasses = require("src.core.cachedClasses")
|
|
31632
31641
|
local game = ____cachedClasses.game
|
|
@@ -31656,6 +31665,9 @@ local saveToDisk = ____save.saveToDisk
|
|
|
31656
31665
|
local ____saveDataManagerConstants = require("src.features.saveDataManager.saveDataManagerConstants")
|
|
31657
31666
|
local SAVE_DATA_MANAGER_DEBUG = ____saveDataManagerConstants.SAVE_DATA_MANAGER_DEBUG
|
|
31658
31667
|
local SAVE_DATA_MANAGER_FEATURE_NAME = ____saveDataManagerConstants.SAVE_DATA_MANAGER_FEATURE_NAME
|
|
31668
|
+
function postUseItemGlowingHourGlass(self)
|
|
31669
|
+
return nil
|
|
31670
|
+
end
|
|
31659
31671
|
function postPlayerInit(self)
|
|
31660
31672
|
if mod == nil then
|
|
31661
31673
|
error(("The mod for the " .. SAVE_DATA_MANAGER_FEATURE_NAME) .. " was not initialized.")
|
|
@@ -31738,6 +31750,7 @@ mod = nil
|
|
|
31738
31750
|
loadedDataOnThisRun = false
|
|
31739
31751
|
function ____exports.saveDataManagerInit(self, incomingMod)
|
|
31740
31752
|
mod = incomingMod
|
|
31753
|
+
mod:AddCallback(ModCallback.POST_USE_ITEM, postUseItemGlowingHourGlass, CollectibleType.GLOWING_HOUR_GLASS)
|
|
31741
31754
|
mod:AddCallback(ModCallback.POST_PLAYER_INIT, postPlayerInit)
|
|
31742
31755
|
mod:AddCallback(ModCallback.PRE_GAME_EXIT, preGameExit)
|
|
31743
31756
|
mod:AddCallback(ModCallback.POST_NEW_LEVEL, postNewLevel)
|
|
@@ -39258,6 +39271,9 @@ end
|
|
|
39258
39271
|
-- only use this function in the `POST_TEAR_INIT_VERY_LATE` callback or on frame 1+.
|
|
39259
39272
|
--
|
|
39260
39273
|
-- If this function is called on frame 0, it will throw a run-time error.
|
|
39274
|
+
--
|
|
39275
|
+
-- Note that this function does not work properly when the tear is from a Lead Pencil barrage. In
|
|
39276
|
+
-- this case, it will always appear as if the tear is coming from a player.
|
|
39261
39277
|
function ____exports.isTearFromFamiliar(self, tear)
|
|
39262
39278
|
if tear.FrameCount == 0 then
|
|
39263
39279
|
error("Failed to check if the given tear was from a player since the tear's frame count was equal to 0. (The \"isTearFromFamiliar\" function must only be used in the \"POST_TEAR_INIT_VERY_LATE\" callback or on frame 1 and onwards.)")
|
|
@@ -39277,6 +39293,9 @@ end
|
|
|
39277
39293
|
-- only use this function in the `POST_TEAR_INIT_VERY_LATE` callback or on frame 1+.
|
|
39278
39294
|
--
|
|
39279
39295
|
-- If this function is called on frame 0, it will throw a run-time error.
|
|
39296
|
+
--
|
|
39297
|
+
-- Note that this function does not work properly when the tear is from a Lead Pencil barrage. In
|
|
39298
|
+
-- this case, it will always appear as if the tear is coming from a player.
|
|
39280
39299
|
function ____exports.isTearFromPlayer(self, tear)
|
|
39281
39300
|
if tear.FrameCount == 0 then
|
|
39282
39301
|
error("Failed to check if the given tear was from a player since the tear's frame count was equal to 0. (The \"isTearFromPlayer\" function must only be used in the \"POST_TEAR_INIT_VERY_LATE\" callback or on frame 1 and onwards.)")
|
|
@@ -46950,7 +46969,7 @@ return ____exports
|
|
|
46950
46969
|
["package"] = function(...)
|
|
46951
46970
|
return {
|
|
46952
46971
|
name = "isaacscript-common",
|
|
46953
|
-
version = "11.0
|
|
46972
|
+
version = "11.2.0",
|
|
46954
46973
|
description = "Helper functions and features for IsaacScript mods.",
|
|
46955
46974
|
keywords = {"isaac", "rebirth", "afterbirth", "repentance"},
|
|
46956
46975
|
homepage = "https://isaacscript.github.io/",
|
|
@@ -46961,7 +46980,7 @@ return {
|
|
|
46961
46980
|
type = "commonjs",
|
|
46962
46981
|
main = "dist/src/index",
|
|
46963
46982
|
types = "dist/src/index.d.ts",
|
|
46964
|
-
dependencies = {["isaac-typescript-definitions"] = "^7.2.
|
|
46983
|
+
dependencies = {["isaac-typescript-definitions"] = "^7.2.3"}
|
|
46965
46984
|
}
|
|
46966
46985
|
end,
|
|
46967
46986
|
["src.functions.map"] = function(...)
|
|
@@ -46997,7 +47016,7 @@ end
|
|
|
46997
47016
|
-- ["bar", 456],
|
|
46998
47017
|
-- ]);
|
|
46999
47018
|
-- const searchText = "f";
|
|
47000
|
-
-- const match = getMapPartialMatch(map, searchText); // match is now equal to 123
|
|
47019
|
+
-- const match = getMapPartialMatch(map, searchText); // match is now equal to ["foo", 123]
|
|
47001
47020
|
--
|
|
47002
47021
|
-- @returns If a match was found, returns a tuple of the map key and value. If a match was not
|
|
47003
47022
|
-- found, returns undefined.
|
|
@@ -49818,6 +49837,142 @@ end
|
|
|
49818
49837
|
function ____exports.isModdedPillEffect(self, pillEffect)
|
|
49819
49838
|
return not ____exports.isVanillaPillEffect(nil, pillEffect)
|
|
49820
49839
|
end
|
|
49840
|
+
return ____exports
|
|
49841
|
+
end,
|
|
49842
|
+
["src.objects.transformationNames"] = function(...)
|
|
49843
|
+
local ____exports = {}
|
|
49844
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
49845
|
+
local PlayerForm = ____isaac_2Dtypescript_2Ddefinitions.PlayerForm
|
|
49846
|
+
____exports.TRANSFORMATION_NAMES = {
|
|
49847
|
+
[PlayerForm.GUPPY] = "Guppy",
|
|
49848
|
+
[PlayerForm.BEELZEBUB] = "Beelzebub",
|
|
49849
|
+
[PlayerForm.FUN_GUY] = "Fun Guy",
|
|
49850
|
+
[PlayerForm.SERAPHIM] = "Seraphim",
|
|
49851
|
+
[PlayerForm.BOB] = "Bob",
|
|
49852
|
+
[PlayerForm.SPUN] = "Spun",
|
|
49853
|
+
[PlayerForm.YES_MOTHER] = "Yes Mother?",
|
|
49854
|
+
[PlayerForm.CONJOINED] = "Conjoined",
|
|
49855
|
+
[PlayerForm.LEVIATHAN] = "Leviathan",
|
|
49856
|
+
[PlayerForm.OH_CRAP] = "Oh Crap",
|
|
49857
|
+
[PlayerForm.BOOKWORM] = "Bookworm",
|
|
49858
|
+
[PlayerForm.ADULT] = "Adult",
|
|
49859
|
+
[PlayerForm.SPIDER_BABY] = "Spider Baby",
|
|
49860
|
+
[PlayerForm.STOMPY] = "Stompy"
|
|
49861
|
+
}
|
|
49862
|
+
return ____exports
|
|
49863
|
+
end,
|
|
49864
|
+
["src.functions.transformations"] = function(...)
|
|
49865
|
+
local ____lualib = require("lualib_bundle")
|
|
49866
|
+
local Map = ____lualib.Map
|
|
49867
|
+
local __TS__New = ____lualib.__TS__New
|
|
49868
|
+
local Set = ____lualib.Set
|
|
49869
|
+
local __TS__Spread = ____lualib.__TS__Spread
|
|
49870
|
+
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
49871
|
+
local ____exports = {}
|
|
49872
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
49873
|
+
local ItemConfigTag = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigTag
|
|
49874
|
+
local PlayerForm = ____isaac_2Dtypescript_2Ddefinitions.PlayerForm
|
|
49875
|
+
local ____transformationNames = require("src.objects.transformationNames")
|
|
49876
|
+
local TRANSFORMATION_NAMES = ____transformationNames.TRANSFORMATION_NAMES
|
|
49877
|
+
local ____collectibles = require("src.functions.collectibles")
|
|
49878
|
+
local getCollectibleTags = ____collectibles.getCollectibleTags
|
|
49879
|
+
local ____collectibleTag = require("src.functions.collectibleTag")
|
|
49880
|
+
local getCollectibleTypesWithTag = ____collectibleTag.getCollectibleTypesWithTag
|
|
49881
|
+
local ____enums = require("src.functions.enums")
|
|
49882
|
+
local getEnumValues = ____enums.getEnumValues
|
|
49883
|
+
local ____flag = require("src.functions.flag")
|
|
49884
|
+
local hasFlag = ____flag.hasFlag
|
|
49885
|
+
local ____players = require("src.functions.players")
|
|
49886
|
+
local getPlayerCollectibleCount = ____players.getPlayerCollectibleCount
|
|
49887
|
+
local TRANSFORMATION_TO_TAG_MAP = __TS__New(Map, {
|
|
49888
|
+
{PlayerForm.GUPPY, ItemConfigTag.GUPPY},
|
|
49889
|
+
{PlayerForm.BEELZEBUB, ItemConfigTag.FLY},
|
|
49890
|
+
{PlayerForm.FUN_GUY, ItemConfigTag.MUSHROOM},
|
|
49891
|
+
{PlayerForm.SERAPHIM, ItemConfigTag.ANGEL},
|
|
49892
|
+
{PlayerForm.BOB, ItemConfigTag.BOB},
|
|
49893
|
+
{PlayerForm.SPUN, ItemConfigTag.SYRINGE},
|
|
49894
|
+
{PlayerForm.YES_MOTHER, ItemConfigTag.MOM},
|
|
49895
|
+
{PlayerForm.CONJOINED, ItemConfigTag.BABY},
|
|
49896
|
+
{PlayerForm.LEVIATHAN, ItemConfigTag.DEVIL},
|
|
49897
|
+
{PlayerForm.OH_CRAP, ItemConfigTag.POOP},
|
|
49898
|
+
{PlayerForm.BOOKWORM, ItemConfigTag.BOOK},
|
|
49899
|
+
{PlayerForm.SPIDER_BABY, ItemConfigTag.SPIDER}
|
|
49900
|
+
})
|
|
49901
|
+
local TRANSFORMATIONS_THAT_GRANT_FLYING = __TS__New(Set, {PlayerForm.GUPPY, PlayerForm.BEELZEBUB, PlayerForm.SERAPHIM, PlayerForm.LEVIATHAN})
|
|
49902
|
+
--- Helper function to get all of the collectible types in the game that count towards a particular
|
|
49903
|
+
-- transformation.
|
|
49904
|
+
--
|
|
49905
|
+
-- For example, to get all of the collectible types that count towards Guppy:
|
|
49906
|
+
--
|
|
49907
|
+
-- ```ts
|
|
49908
|
+
-- const guppyCollectibleTypes = getCollectibleTypesForTransformation(PlayerForm.GUPPY);
|
|
49909
|
+
-- ```
|
|
49910
|
+
function ____exports.getCollectibleTypesForTransformation(self, playerForm)
|
|
49911
|
+
local itemConfigTag = TRANSFORMATION_TO_TAG_MAP:get(playerForm)
|
|
49912
|
+
if itemConfigTag == nil then
|
|
49913
|
+
error(("Failed to get the collectible types for the transformation of " .. tostring(playerForm)) .. " because that transformation is not based on collectibles.")
|
|
49914
|
+
end
|
|
49915
|
+
return getCollectibleTypesWithTag(nil, itemConfigTag)
|
|
49916
|
+
end
|
|
49917
|
+
--- Returns the number of items that a player has towards a particular transformation.
|
|
49918
|
+
function ____exports.getPlayerNumCollectiblesForTransformation(self, player, playerForm)
|
|
49919
|
+
local collectibleTypes = ____exports.getCollectibleTypesForTransformation(nil, playerForm)
|
|
49920
|
+
return getPlayerCollectibleCount(
|
|
49921
|
+
nil,
|
|
49922
|
+
player,
|
|
49923
|
+
__TS__Spread(collectibleTypes:values())
|
|
49924
|
+
)
|
|
49925
|
+
end
|
|
49926
|
+
--- Returns a set of the player's current transformations.
|
|
49927
|
+
function ____exports.getPlayerTransformations(self, player)
|
|
49928
|
+
local transformations = __TS__New(Set)
|
|
49929
|
+
for ____, playerForm in ipairs(getEnumValues(nil, PlayerForm)) do
|
|
49930
|
+
if player:HasPlayerForm(playerForm) then
|
|
49931
|
+
transformations:add(playerForm)
|
|
49932
|
+
end
|
|
49933
|
+
end
|
|
49934
|
+
return transformations
|
|
49935
|
+
end
|
|
49936
|
+
--- Helper function to get a transformation name from a PlayerForm enum.
|
|
49937
|
+
--
|
|
49938
|
+
-- For example:
|
|
49939
|
+
--
|
|
49940
|
+
-- ```ts
|
|
49941
|
+
-- const transformationName = getTransformationName(PlayerForm.LORD_OF_THE_FLIES);
|
|
49942
|
+
-- // transformationName is "Beelzebub"
|
|
49943
|
+
-- ```
|
|
49944
|
+
function ____exports.getTransformationName(self, playerForm)
|
|
49945
|
+
return TRANSFORMATION_NAMES[playerForm]
|
|
49946
|
+
end
|
|
49947
|
+
function ____exports.getTransformationsForCollectibleType(self, collectibleType)
|
|
49948
|
+
local itemConfigTags = getCollectibleTags(nil, collectibleType)
|
|
49949
|
+
local playerForms = getEnumValues(nil, PlayerForm)
|
|
49950
|
+
local transformationSet = __TS__New(Set)
|
|
49951
|
+
for ____, playerForm in ipairs(playerForms) do
|
|
49952
|
+
do
|
|
49953
|
+
local itemConfigTag = TRANSFORMATION_TO_TAG_MAP:get(playerForm)
|
|
49954
|
+
if itemConfigTag == nil then
|
|
49955
|
+
goto __continue11
|
|
49956
|
+
end
|
|
49957
|
+
if hasFlag(nil, itemConfigTags, itemConfigTag) then
|
|
49958
|
+
transformationSet:add(playerForm)
|
|
49959
|
+
end
|
|
49960
|
+
end
|
|
49961
|
+
::__continue11::
|
|
49962
|
+
end
|
|
49963
|
+
return transformationSet
|
|
49964
|
+
end
|
|
49965
|
+
function ____exports.hasFlyingTransformation(self, player)
|
|
49966
|
+
for ____, playerForm in __TS__Iterator(TRANSFORMATIONS_THAT_GRANT_FLYING:values()) do
|
|
49967
|
+
if player:HasPlayerForm(playerForm) then
|
|
49968
|
+
return true
|
|
49969
|
+
end
|
|
49970
|
+
end
|
|
49971
|
+
return false
|
|
49972
|
+
end
|
|
49973
|
+
function ____exports.isTransformationFlying(self, playerForm)
|
|
49974
|
+
return TRANSFORMATIONS_THAT_GRANT_FLYING:has(playerForm)
|
|
49975
|
+
end
|
|
49821
49976
|
return ____exports
|
|
49822
49977
|
end,
|
|
49823
49978
|
["src.maps.cardNameToTypeMap"] = function(...)
|
|
@@ -50287,6 +50442,45 @@ ____exports.ROOM_NAME_TO_TYPE_MAP = __TS__New(Map, {
|
|
|
50287
50442
|
{"blue", RoomType.BLUE},
|
|
50288
50443
|
{"ultraSecret", RoomType.ULTRA_SECRET}
|
|
50289
50444
|
})
|
|
50445
|
+
return ____exports
|
|
50446
|
+
end,
|
|
50447
|
+
["src.maps.transformationNameToPlayerForm"] = function(...)
|
|
50448
|
+
local ____lualib = require("lualib_bundle")
|
|
50449
|
+
local Map = ____lualib.Map
|
|
50450
|
+
local __TS__New = ____lualib.__TS__New
|
|
50451
|
+
local ____exports = {}
|
|
50452
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
50453
|
+
local PlayerForm = ____isaac_2Dtypescript_2Ddefinitions.PlayerForm
|
|
50454
|
+
--- Maps transformation names to the values of the `PlayerForm` enum.
|
|
50455
|
+
____exports.TRANSFORMATION_NAME_TO_PLAYER_FORM_MAP = __TS__New(Map, {
|
|
50456
|
+
{"guppy", PlayerForm.GUPPY},
|
|
50457
|
+
{"cat", PlayerForm.GUPPY},
|
|
50458
|
+
{"beelzebub", PlayerForm.BEELZEBUB},
|
|
50459
|
+
{"fly", PlayerForm.BEELZEBUB},
|
|
50460
|
+
{"funGuy", PlayerForm.FUN_GUY},
|
|
50461
|
+
{"mushroom", PlayerForm.FUN_GUY},
|
|
50462
|
+
{"seraphim", PlayerForm.SERAPHIM},
|
|
50463
|
+
{"angel", PlayerForm.SERAPHIM},
|
|
50464
|
+
{"bob", PlayerForm.BOB},
|
|
50465
|
+
{"poison", PlayerForm.BOB},
|
|
50466
|
+
{"spun", PlayerForm.SPUN},
|
|
50467
|
+
{"drugs", PlayerForm.SPUN},
|
|
50468
|
+
{"needles", PlayerForm.SPUN},
|
|
50469
|
+
{"yesMother", PlayerForm.YES_MOTHER},
|
|
50470
|
+
{"mother", PlayerForm.YES_MOTHER},
|
|
50471
|
+
{"mom", PlayerForm.YES_MOTHER},
|
|
50472
|
+
{"conjoined", PlayerForm.CONJOINED},
|
|
50473
|
+
{"triple", PlayerForm.CONJOINED},
|
|
50474
|
+
{"leviathan", PlayerForm.LEVIATHAN},
|
|
50475
|
+
{"devil", PlayerForm.LEVIATHAN},
|
|
50476
|
+
{"ohCrap", PlayerForm.OH_CRAP},
|
|
50477
|
+
{"crap", PlayerForm.OH_CRAP},
|
|
50478
|
+
{"poop", PlayerForm.OH_CRAP},
|
|
50479
|
+
{"bookWorm", PlayerForm.BOOKWORM},
|
|
50480
|
+
{"adult", PlayerForm.ADULT},
|
|
50481
|
+
{"spiderBaby", PlayerForm.SPIDER_BABY},
|
|
50482
|
+
{"stompy", PlayerForm.STOMPY}
|
|
50483
|
+
})
|
|
50290
50484
|
return ____exports
|
|
50291
50485
|
end,
|
|
50292
50486
|
["src.maps.trinketNameToTypeMap"] = function(...)
|
|
@@ -50726,14 +50920,16 @@ local v = {persistent = {
|
|
|
50726
50920
|
maze = false,
|
|
50727
50921
|
blind = false,
|
|
50728
50922
|
giant = false,
|
|
50729
|
-
disableCurses = false
|
|
50730
|
-
|
|
50923
|
+
disableCurses = false,
|
|
50924
|
+
damage = false,
|
|
50925
|
+
damageAmount = 500,
|
|
50926
|
+
speed = false,
|
|
50927
|
+
speedAmount = 2,
|
|
50928
|
+
tears = false,
|
|
50929
|
+
tearsAmount = 1,
|
|
50930
|
+
flight = false,
|
|
50731
50931
|
chaosCardTears = false,
|
|
50732
|
-
spamBloodRights = false
|
|
50733
|
-
maxDamage = false,
|
|
50734
|
-
maxSpeed = false,
|
|
50735
|
-
maxTears = false,
|
|
50736
|
-
flight = false
|
|
50932
|
+
spamBloodRights = false
|
|
50737
50933
|
}}
|
|
50738
50934
|
____exports.default = v
|
|
50739
50935
|
--- The contents of the map are initialized in the "init.ts" file.
|
|
@@ -50766,6 +50962,7 @@ local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
|
50766
50962
|
local GridRoom = ____isaac_2Dtypescript_2Ddefinitions.GridRoom
|
|
50767
50963
|
local LevelStage = ____isaac_2Dtypescript_2Ddefinitions.LevelStage
|
|
50768
50964
|
local PillColor = ____isaac_2Dtypescript_2Ddefinitions.PillColor
|
|
50965
|
+
local PlayerForm = ____isaac_2Dtypescript_2Ddefinitions.PlayerForm
|
|
50769
50966
|
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
50770
50967
|
local StageType = ____isaac_2Dtypescript_2Ddefinitions.StageType
|
|
50771
50968
|
local ____cachedClasses = require("src.core.cachedClasses")
|
|
@@ -50798,6 +50995,7 @@ local ____entitiesSpecific = require("src.functions.entitiesSpecific")
|
|
|
50798
50995
|
local getNPCs = ____entitiesSpecific.getNPCs
|
|
50799
50996
|
local ____enums = require("src.functions.enums")
|
|
50800
50997
|
local getEnumValues = ____enums.getEnumValues
|
|
50998
|
+
local getLastEnumValue = ____enums.getLastEnumValue
|
|
50801
50999
|
local ____flag = require("src.functions.flag")
|
|
50802
51000
|
local addFlag = ____flag.addFlag
|
|
50803
51001
|
local ____gridEntities = require("src.functions.gridEntities")
|
|
@@ -50836,10 +51034,15 @@ local ____run = require("src.functions.run")
|
|
|
50836
51034
|
local onSetSeed = ____run.onSetSeed
|
|
50837
51035
|
local restart = ____run.restart
|
|
50838
51036
|
local setUnseeded = ____run.setUnseeded
|
|
51037
|
+
local ____set = require("src.functions.set")
|
|
51038
|
+
local getSortedSetValues = ____set.getSortedSetValues
|
|
50839
51039
|
local ____spawnCollectible = require("src.functions.spawnCollectible")
|
|
50840
51040
|
local spawnCollectibleFunction = ____spawnCollectible.spawnCollectible
|
|
50841
51041
|
local ____stage = require("src.functions.stage")
|
|
50842
51042
|
local setStage = ____stage.setStage
|
|
51043
|
+
local ____transformations = require("src.functions.transformations")
|
|
51044
|
+
local getCollectibleTypesForTransformation = ____transformations.getCollectibleTypesForTransformation
|
|
51045
|
+
local getTransformationName = ____transformations.getTransformationName
|
|
50843
51046
|
local ____trinkets = require("src.functions.trinkets")
|
|
50844
51047
|
local getGoldenTrinketType = ____trinkets.getGoldenTrinketType
|
|
50845
51048
|
local ____types = require("src.functions.types")
|
|
@@ -50860,6 +51063,8 @@ local ____pillNameToEffectMap = require("src.maps.pillNameToEffectMap")
|
|
|
50860
51063
|
local PILL_NAME_TO_EFFECT_MAP = ____pillNameToEffectMap.PILL_NAME_TO_EFFECT_MAP
|
|
50861
51064
|
local ____roomNameToTypeMap = require("src.maps.roomNameToTypeMap")
|
|
50862
51065
|
local ROOM_NAME_TO_TYPE_MAP = ____roomNameToTypeMap.ROOM_NAME_TO_TYPE_MAP
|
|
51066
|
+
local ____transformationNameToPlayerForm = require("src.maps.transformationNameToPlayerForm")
|
|
51067
|
+
local TRANSFORMATION_NAME_TO_PLAYER_FORM_MAP = ____transformationNameToPlayerForm.TRANSFORMATION_NAME_TO_PLAYER_FORM_MAP
|
|
50863
51068
|
local ____trinketNameToTypeMap = require("src.maps.trinketNameToTypeMap")
|
|
50864
51069
|
local TRINKET_NAME_TO_TYPE_MAP = ____trinketNameToTypeMap.TRINKET_NAME_TO_TYPE_MAP
|
|
50865
51070
|
local ____firstLast = require("src.features.firstLast")
|
|
@@ -50883,8 +51088,8 @@ end
|
|
|
50883
51088
|
--- Toggles Chaos Card tears for the player. Useful for killing enemies very fast without using
|
|
50884
51089
|
-- "debug 10".
|
|
50885
51090
|
function ____exports.chaosCardTears(self)
|
|
50886
|
-
v.
|
|
50887
|
-
printEnabled(nil, v.
|
|
51091
|
+
v.persistent.chaosCardTears = not v.persistent.chaosCardTears
|
|
51092
|
+
printEnabled(nil, v.persistent.chaosCardTears, "Chaos Card tears")
|
|
50888
51093
|
end
|
|
50889
51094
|
--- Warps to the Devil Room for the floor. If the Angel Room has already been visited or initialized,
|
|
50890
51095
|
-- this will uninitialize it and make an Devil Room instead.
|
|
@@ -50954,6 +51159,56 @@ function ____exports.startingRoom(self)
|
|
|
50954
51159
|
local startingRoomIndex = level:GetStartingRoomIndex()
|
|
50955
51160
|
changeRoom(nil, startingRoomIndex)
|
|
50956
51161
|
end
|
|
51162
|
+
--- Gives the specified transformation. Accepts either the transformation number or the partial name
|
|
51163
|
+
-- of the transformation.
|
|
51164
|
+
--
|
|
51165
|
+
-- For example:
|
|
51166
|
+
-- - transformation 1 - Gives the Beelzebub transformation.
|
|
51167
|
+
-- - transformation gup - Gives the Guppy transformation.
|
|
51168
|
+
function ____exports.transformation(self, params)
|
|
51169
|
+
if params == "" then
|
|
51170
|
+
printConsole(nil, "You must specify a transformation name or number.")
|
|
51171
|
+
return
|
|
51172
|
+
end
|
|
51173
|
+
local targetPlayerForm
|
|
51174
|
+
local num = tonumber(params)
|
|
51175
|
+
if num == nil then
|
|
51176
|
+
local match = getMapPartialMatch(nil, params, TRANSFORMATION_NAME_TO_PLAYER_FORM_MAP)
|
|
51177
|
+
if match == nil then
|
|
51178
|
+
printConsole(nil, "Unknown transformation: " .. params)
|
|
51179
|
+
return
|
|
51180
|
+
end
|
|
51181
|
+
targetPlayerForm = match[2]
|
|
51182
|
+
else
|
|
51183
|
+
local lastPlayerForm = getLastEnumValue(nil, PlayerForm)
|
|
51184
|
+
if num < PlayerForm.GUPPY or num > lastPlayerForm then
|
|
51185
|
+
printConsole(
|
|
51186
|
+
nil,
|
|
51187
|
+
"Invalid transformation number: " .. tostring(num)
|
|
51188
|
+
)
|
|
51189
|
+
return
|
|
51190
|
+
end
|
|
51191
|
+
targetPlayerForm = num
|
|
51192
|
+
end
|
|
51193
|
+
local transformationName = getTransformationName(nil, targetPlayerForm)
|
|
51194
|
+
local player = Isaac.GetPlayer()
|
|
51195
|
+
local collectibleTypesSet = getCollectibleTypesForTransformation(nil, targetPlayerForm)
|
|
51196
|
+
local collectiblesTypes = getSortedSetValues(nil, collectibleTypesSet)
|
|
51197
|
+
do
|
|
51198
|
+
local i = 0
|
|
51199
|
+
while i < 3 do
|
|
51200
|
+
local collectibleType = collectiblesTypes[i + 1]
|
|
51201
|
+
if collectibleType ~= nil then
|
|
51202
|
+
player:AddCollectible(collectibleType)
|
|
51203
|
+
end
|
|
51204
|
+
i = i + 1
|
|
51205
|
+
end
|
|
51206
|
+
end
|
|
51207
|
+
printConsole(
|
|
51208
|
+
nil,
|
|
51209
|
+
((("Gave transformation: " .. transformationName) .. " (") .. tostring(targetPlayerForm)) .. ")"
|
|
51210
|
+
)
|
|
51211
|
+
end
|
|
50957
51212
|
--- Adds a single charge to the player's specified active item. You must provide the active slot
|
|
50958
51213
|
-- number. Provide a second number to give a custom amount of charges. (You can use negative numbers
|
|
50959
51214
|
-- to remove charge.)
|
|
@@ -51273,10 +51528,19 @@ function ____exports.dadsNote(self)
|
|
|
51273
51528
|
setStage(nil, LevelStage.DEPTHS_2, StageType.REPENTANCE)
|
|
51274
51529
|
____exports.bossRoom(nil)
|
|
51275
51530
|
end
|
|
51276
|
-
--- Toggles
|
|
51277
|
-
|
|
51278
|
-
|
|
51279
|
-
|
|
51531
|
+
--- Toggles a set damage stat for the player. You can provide an optional argument to this command in
|
|
51532
|
+
-- order to set the damage to a specific amount. Default is 500.
|
|
51533
|
+
function ____exports.damage(self, params)
|
|
51534
|
+
if params ~= "" then
|
|
51535
|
+
local num = tonumber(params)
|
|
51536
|
+
if num == nil then
|
|
51537
|
+
printConsole(nil, "The provided damage amount is invalid: " .. params)
|
|
51538
|
+
return
|
|
51539
|
+
end
|
|
51540
|
+
v.persistent.damageAmount = num
|
|
51541
|
+
end
|
|
51542
|
+
v.persistent.damage = not v.persistent.damage
|
|
51543
|
+
printEnabled(nil, v.persistent.damage, "debug damage")
|
|
51280
51544
|
end
|
|
51281
51545
|
--- Toggles permanent Curse of Darkness.
|
|
51282
51546
|
function ____exports.darkness(self)
|
|
@@ -51322,21 +51586,21 @@ end
|
|
|
51322
51586
|
--- Toggles flight for the player.
|
|
51323
51587
|
function ____exports.flight(self, params)
|
|
51324
51588
|
local player = Isaac.GetPlayer()
|
|
51325
|
-
v.
|
|
51589
|
+
v.persistent.flight = not v.persistent.flight
|
|
51326
51590
|
if params == "true" then
|
|
51327
|
-
v.
|
|
51591
|
+
v.persistent.flight = true
|
|
51328
51592
|
elseif params == "false" then
|
|
51329
|
-
v.
|
|
51593
|
+
v.persistent.flight = false
|
|
51330
51594
|
end
|
|
51331
51595
|
player:AddCacheFlags(CacheFlag.FLYING)
|
|
51332
51596
|
player:EvaluateItems()
|
|
51333
51597
|
local collectibleUsedToShowFlight = CollectibleType.FATE
|
|
51334
|
-
if v.
|
|
51598
|
+
if v.persistent.flight then
|
|
51335
51599
|
addCollectibleCostume(nil, player, collectibleUsedToShowFlight)
|
|
51336
51600
|
else
|
|
51337
51601
|
removeCollectibleCostume(nil, player, collectibleUsedToShowFlight)
|
|
51338
51602
|
end
|
|
51339
|
-
printEnabled(nil, v.
|
|
51603
|
+
printEnabled(nil, v.persistent.speed, "max speed")
|
|
51340
51604
|
end
|
|
51341
51605
|
--- Alias for the "startingRoom" command.
|
|
51342
51606
|
function ____exports.fool(self)
|
|
@@ -51626,6 +51890,10 @@ end
|
|
|
51626
51890
|
function ____exports.playSound(self, params)
|
|
51627
51891
|
____exports.sound(nil, params)
|
|
51628
51892
|
end
|
|
51893
|
+
--- Alias for the "transformation" command.
|
|
51894
|
+
function ____exports.playerForm(self, params)
|
|
51895
|
+
____exports.transformation(nil, params)
|
|
51896
|
+
end
|
|
51629
51897
|
--- Sets the player's pocket item to the specified collectible type.
|
|
51630
51898
|
function ____exports.pocket(self, params)
|
|
51631
51899
|
if params == "" then
|
|
@@ -51858,8 +52126,8 @@ end
|
|
|
51858
52126
|
--- Toggles spamming Blood Rights on every frame. Useful for killing enemies very fast without using
|
|
51859
52127
|
-- "debug 10".
|
|
51860
52128
|
function ____exports.spam(self)
|
|
51861
|
-
v.
|
|
51862
|
-
printEnabled(nil, v.
|
|
52129
|
+
v.persistent.spamBloodRights = not v.persistent.spamBloodRights
|
|
52130
|
+
printEnabled(nil, v.persistent.spamBloodRights, "spamming Blood Rights")
|
|
51863
52131
|
end
|
|
51864
52132
|
function ____exports.spawnCollectible(self, params)
|
|
51865
52133
|
if params == "" then
|
|
@@ -51926,15 +52194,25 @@ function ____exports.spawnTrinket(self, params)
|
|
|
51926
52194
|
local centerPos = roomClass:GetCenterPos()
|
|
51927
52195
|
spawnTrinketFunction(nil, trinketType, centerPos)
|
|
51928
52196
|
end
|
|
51929
|
-
--- Toggles
|
|
51930
|
-
|
|
52197
|
+
--- Toggles a set movement speed and flight for the player. You can provide an optional argument to
|
|
52198
|
+
-- this command in order to set the speed to a specific amount. Default is 2.0 (which is the maximum
|
|
52199
|
+
-- that the stat can be set to).
|
|
52200
|
+
function ____exports.speed(self, params)
|
|
51931
52201
|
local player = Isaac.GetPlayer()
|
|
51932
|
-
|
|
52202
|
+
if params ~= "" then
|
|
52203
|
+
local num = tonumber(params)
|
|
52204
|
+
if num == nil then
|
|
52205
|
+
printConsole(nil, "The provided speed amount is invalid: " .. params)
|
|
52206
|
+
return
|
|
52207
|
+
end
|
|
52208
|
+
v.persistent.damageAmount = num
|
|
52209
|
+
end
|
|
52210
|
+
v.persistent.speed = not v.persistent.speed
|
|
51933
52211
|
player:AddCacheFlags(CacheFlag.SPEED)
|
|
51934
52212
|
player:EvaluateItems()
|
|
51935
|
-
local value = tostring(v.
|
|
52213
|
+
local value = tostring(v.persistent.speed)
|
|
51936
52214
|
____exports.flight(nil, value)
|
|
51937
|
-
printEnabled(nil, v.
|
|
52215
|
+
printEnabled(nil, v.persistent.speed, "max speed and flight")
|
|
51938
52216
|
end
|
|
51939
52217
|
--- Alias for the "startingRoom" command.
|
|
51940
52218
|
function ____exports.startRoom(self)
|
|
@@ -51944,14 +52222,23 @@ end
|
|
|
51944
52222
|
function ____exports.superSecretRoom(self)
|
|
51945
52223
|
warpToRoomType(nil, RoomType.SUPER_SECRET)
|
|
51946
52224
|
end
|
|
51947
|
-
--- Toggles
|
|
51948
|
-
--
|
|
51949
|
-
|
|
51950
|
-
|
|
52225
|
+
--- Toggles a set tear delay (e.g. fire rate) for the player. You can provide an optional argument to
|
|
52226
|
+
-- this command in order to set the tear delay to a specific amount. Default is 1 (which is
|
|
52227
|
+
-- equivalent to the Soy Milk tear rate).
|
|
52228
|
+
function ____exports.tears(self, params)
|
|
52229
|
+
if params ~= "" then
|
|
52230
|
+
local num = tonumber(params)
|
|
52231
|
+
if num == nil then
|
|
52232
|
+
printConsole(nil, "The provided tear delay amount is invalid: " .. params)
|
|
52233
|
+
return
|
|
52234
|
+
end
|
|
52235
|
+
v.persistent.tearsAmount = num
|
|
52236
|
+
end
|
|
52237
|
+
v.persistent.tears = not v.persistent.tears
|
|
51951
52238
|
local player = Isaac.GetPlayer()
|
|
51952
52239
|
player:AddCacheFlags(CacheFlag.FIRE_DELAY)
|
|
51953
52240
|
player:EvaluateItems()
|
|
51954
|
-
printEnabled(nil, v.
|
|
52241
|
+
printEnabled(nil, v.persistent.damage, "debug tear-rate")
|
|
51955
52242
|
end
|
|
51956
52243
|
--- Alias for the "runTests" command.
|
|
51957
52244
|
function ____exports.tests(self)
|
|
@@ -52026,16 +52313,13 @@ local ____lualib = require("lualib_bundle")
|
|
|
52026
52313
|
local Map = ____lualib.Map
|
|
52027
52314
|
local __TS__ObjectEntries = ____lualib.__TS__ObjectEntries
|
|
52028
52315
|
local ____exports = {}
|
|
52029
|
-
local initCommandMap, initCallbacks, postUpdate, evaluateCacheFireDelay, evaluateCacheSpeed, evaluateCacheFlying, entityTakeDmgPlayer, postCurseEval, executeCmd
|
|
52316
|
+
local initCommandMap, initCallbacks, postUpdate, evaluateCacheDamage, evaluateCacheFireDelay, evaluateCacheSpeed, evaluateCacheFlying, entityTakeDmgPlayer, postCurseEval, executeCmd
|
|
52030
52317
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
52031
52318
|
local CacheFlag = ____isaac_2Dtypescript_2Ddefinitions.CacheFlag
|
|
52032
52319
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
52033
52320
|
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
52034
52321
|
local LevelCurse = ____isaac_2Dtypescript_2Ddefinitions.LevelCurse
|
|
52035
52322
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
52036
|
-
local TearVariant = ____isaac_2Dtypescript_2Ddefinitions.TearVariant
|
|
52037
|
-
local ____constants = require("src.core.constants")
|
|
52038
|
-
local MAX_SPEED_STAT = ____constants.MAX_SPEED_STAT
|
|
52039
52323
|
local ____flag = require("src.functions.flag")
|
|
52040
52324
|
local addFlag = ____flag.addFlag
|
|
52041
52325
|
local bitFlags = ____flag.bitFlags
|
|
@@ -52066,37 +52350,42 @@ function initCommandMap(self)
|
|
|
52066
52350
|
end
|
|
52067
52351
|
function initCallbacks(self, mod)
|
|
52068
52352
|
mod:AddCallback(ModCallback.POST_UPDATE, postUpdate)
|
|
52353
|
+
mod:AddCallback(ModCallback.EVALUATE_CACHE, evaluateCacheDamage, CacheFlag.DAMAGE)
|
|
52069
52354
|
mod:AddCallback(ModCallback.EVALUATE_CACHE, evaluateCacheFireDelay, CacheFlag.FIRE_DELAY)
|
|
52070
52355
|
mod:AddCallback(ModCallback.EVALUATE_CACHE, evaluateCacheSpeed, CacheFlag.SPEED)
|
|
52071
52356
|
mod:AddCallback(ModCallback.EVALUATE_CACHE, evaluateCacheFlying, CacheFlag.FLYING)
|
|
52072
52357
|
mod:AddCallback(ModCallback.ENTITY_TAKE_DMG, entityTakeDmgPlayer, EntityType.PLAYER)
|
|
52073
52358
|
mod:AddCallback(ModCallback.POST_CURSE_EVAL, postCurseEval)
|
|
52074
52359
|
mod:AddCallback(ModCallback.EXECUTE_CMD, executeCmd)
|
|
52075
|
-
mod:AddCallback(ModCallback.POST_FIRE_TEAR, postFireTear)
|
|
52076
52360
|
end
|
|
52077
52361
|
function postUpdate(self)
|
|
52078
|
-
if v.
|
|
52362
|
+
if v.persistent.spamBloodRights then
|
|
52079
52363
|
local player = Isaac.GetPlayer()
|
|
52080
52364
|
player:UseActiveItem(CollectibleType.BLOOD_RIGHTS)
|
|
52081
52365
|
end
|
|
52082
52366
|
end
|
|
52367
|
+
function evaluateCacheDamage(self, player)
|
|
52368
|
+
if v.persistent.damage then
|
|
52369
|
+
player.Damage = v.persistent.damageAmount
|
|
52370
|
+
end
|
|
52371
|
+
end
|
|
52083
52372
|
function evaluateCacheFireDelay(self, player)
|
|
52084
|
-
if v.
|
|
52085
|
-
player.FireDelay =
|
|
52373
|
+
if v.persistent.tears then
|
|
52374
|
+
player.FireDelay = v.persistent.tearsAmount
|
|
52086
52375
|
end
|
|
52087
52376
|
end
|
|
52088
52377
|
function evaluateCacheSpeed(self, player)
|
|
52089
|
-
if v.
|
|
52090
|
-
player.MoveSpeed =
|
|
52378
|
+
if v.persistent.speed then
|
|
52379
|
+
player.MoveSpeed = v.persistent.speedAmount
|
|
52091
52380
|
end
|
|
52092
52381
|
end
|
|
52093
52382
|
function evaluateCacheFlying(self, player)
|
|
52094
|
-
if v.
|
|
52383
|
+
if v.persistent.flight then
|
|
52095
52384
|
player.CanFly = true
|
|
52096
52385
|
end
|
|
52097
52386
|
end
|
|
52098
52387
|
function entityTakeDmgPlayer(self, _entity, _damageAmount, _damageFlags, _damageSource, _damageCountdownFrames)
|
|
52099
|
-
if v.
|
|
52388
|
+
if v.persistent.spamBloodRights then
|
|
52100
52389
|
return false
|
|
52101
52390
|
end
|
|
52102
52391
|
return nil
|
|
@@ -52148,15 +52437,6 @@ function executeCmd(self, command, params)
|
|
|
52148
52437
|
printConsole(nil, "Command: " .. commandName)
|
|
52149
52438
|
commandFunction(nil, params)
|
|
52150
52439
|
end
|
|
52151
|
-
function postFireTear(self, tear)
|
|
52152
|
-
if v.run.chaosCardTears then
|
|
52153
|
-
tear:ChangeVariant(TearVariant.CHAOS_CARD)
|
|
52154
|
-
end
|
|
52155
|
-
if v.run.maxDamage then
|
|
52156
|
-
tear.CollisionDamage = tear.CollisionDamage * 1000
|
|
52157
|
-
tear:ChangeVariant(TearVariant.TOOTH)
|
|
52158
|
-
end
|
|
52159
|
-
end
|
|
52160
52440
|
function ____exports.extraConsoleCommandsInit(self, mod)
|
|
52161
52441
|
saveDataManager(nil, "extraConsoleCommands", v, false)
|
|
52162
52442
|
initCommandMap(nil)
|
|
@@ -54605,142 +54885,6 @@ function ____exports.nextSeed(self, seed)
|
|
|
54605
54885
|
rng:Next()
|
|
54606
54886
|
return rng:GetSeed()
|
|
54607
54887
|
end
|
|
54608
|
-
return ____exports
|
|
54609
|
-
end,
|
|
54610
|
-
["src.objects.transformationNames"] = function(...)
|
|
54611
|
-
local ____exports = {}
|
|
54612
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
54613
|
-
local PlayerForm = ____isaac_2Dtypescript_2Ddefinitions.PlayerForm
|
|
54614
|
-
____exports.TRANSFORMATION_NAMES = {
|
|
54615
|
-
[PlayerForm.GUPPY] = "Guppy",
|
|
54616
|
-
[PlayerForm.BEELZEBUB] = "Beelzebub",
|
|
54617
|
-
[PlayerForm.FUN_GUY] = "Fun Guy",
|
|
54618
|
-
[PlayerForm.SERAPHIM] = "Seraphim",
|
|
54619
|
-
[PlayerForm.BOB] = "Bob",
|
|
54620
|
-
[PlayerForm.SPUN] = "Spun",
|
|
54621
|
-
[PlayerForm.YES_MOTHER] = "Yes Mother?",
|
|
54622
|
-
[PlayerForm.CONJOINED] = "Conjoined",
|
|
54623
|
-
[PlayerForm.LEVIATHAN] = "Leviathan",
|
|
54624
|
-
[PlayerForm.OH_CRAP] = "Oh Crap",
|
|
54625
|
-
[PlayerForm.BOOKWORM] = "Bookworm",
|
|
54626
|
-
[PlayerForm.ADULT] = "Adult",
|
|
54627
|
-
[PlayerForm.SPIDER_BABY] = "Spider Baby",
|
|
54628
|
-
[PlayerForm.STOMPY] = "Stompy"
|
|
54629
|
-
}
|
|
54630
|
-
return ____exports
|
|
54631
|
-
end,
|
|
54632
|
-
["src.functions.transformations"] = function(...)
|
|
54633
|
-
local ____lualib = require("lualib_bundle")
|
|
54634
|
-
local Map = ____lualib.Map
|
|
54635
|
-
local __TS__New = ____lualib.__TS__New
|
|
54636
|
-
local Set = ____lualib.Set
|
|
54637
|
-
local __TS__Spread = ____lualib.__TS__Spread
|
|
54638
|
-
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
54639
|
-
local ____exports = {}
|
|
54640
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
54641
|
-
local ItemConfigTag = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigTag
|
|
54642
|
-
local PlayerForm = ____isaac_2Dtypescript_2Ddefinitions.PlayerForm
|
|
54643
|
-
local ____transformationNames = require("src.objects.transformationNames")
|
|
54644
|
-
local TRANSFORMATION_NAMES = ____transformationNames.TRANSFORMATION_NAMES
|
|
54645
|
-
local ____collectibles = require("src.functions.collectibles")
|
|
54646
|
-
local getCollectibleTags = ____collectibles.getCollectibleTags
|
|
54647
|
-
local ____collectibleTag = require("src.functions.collectibleTag")
|
|
54648
|
-
local getCollectibleTypesWithTag = ____collectibleTag.getCollectibleTypesWithTag
|
|
54649
|
-
local ____enums = require("src.functions.enums")
|
|
54650
|
-
local getEnumValues = ____enums.getEnumValues
|
|
54651
|
-
local ____flag = require("src.functions.flag")
|
|
54652
|
-
local hasFlag = ____flag.hasFlag
|
|
54653
|
-
local ____players = require("src.functions.players")
|
|
54654
|
-
local getPlayerCollectibleCount = ____players.getPlayerCollectibleCount
|
|
54655
|
-
local TRANSFORMATION_TO_TAG_MAP = __TS__New(Map, {
|
|
54656
|
-
{PlayerForm.GUPPY, ItemConfigTag.GUPPY},
|
|
54657
|
-
{PlayerForm.BEELZEBUB, ItemConfigTag.FLY},
|
|
54658
|
-
{PlayerForm.FUN_GUY, ItemConfigTag.MUSHROOM},
|
|
54659
|
-
{PlayerForm.SERAPHIM, ItemConfigTag.ANGEL},
|
|
54660
|
-
{PlayerForm.BOB, ItemConfigTag.BOB},
|
|
54661
|
-
{PlayerForm.SPUN, ItemConfigTag.SYRINGE},
|
|
54662
|
-
{PlayerForm.YES_MOTHER, ItemConfigTag.MOM},
|
|
54663
|
-
{PlayerForm.CONJOINED, ItemConfigTag.BABY},
|
|
54664
|
-
{PlayerForm.LEVIATHAN, ItemConfigTag.DEVIL},
|
|
54665
|
-
{PlayerForm.OH_CRAP, ItemConfigTag.POOP},
|
|
54666
|
-
{PlayerForm.BOOKWORM, ItemConfigTag.BOOK},
|
|
54667
|
-
{PlayerForm.SPIDER_BABY, ItemConfigTag.SPIDER}
|
|
54668
|
-
})
|
|
54669
|
-
local TRANSFORMATIONS_THAT_GRANT_FLYING = __TS__New(Set, {PlayerForm.GUPPY, PlayerForm.BEELZEBUB, PlayerForm.SERAPHIM, PlayerForm.LEVIATHAN})
|
|
54670
|
-
--- Helper function to get all of the collectible types in the game that count towards a particular
|
|
54671
|
-
-- transformation.
|
|
54672
|
-
--
|
|
54673
|
-
-- For example, to get all of the collectible types that count towards Guppy:
|
|
54674
|
-
--
|
|
54675
|
-
-- ```ts
|
|
54676
|
-
-- const guppyCollectibleTypes = getCollectibleTypesForTransformation(PlayerForm.GUPPY);
|
|
54677
|
-
-- ```
|
|
54678
|
-
function ____exports.getCollectibleTypesForTransformation(self, playerForm)
|
|
54679
|
-
local itemConfigTag = TRANSFORMATION_TO_TAG_MAP:get(playerForm)
|
|
54680
|
-
if itemConfigTag == nil then
|
|
54681
|
-
error(("Failed to get the collectible types for the transformation of " .. tostring(playerForm)) .. " because that transformation is not based on collectibles.")
|
|
54682
|
-
end
|
|
54683
|
-
return getCollectibleTypesWithTag(nil, itemConfigTag)
|
|
54684
|
-
end
|
|
54685
|
-
--- Returns the number of items that a player has towards a particular transformation.
|
|
54686
|
-
function ____exports.getPlayerNumCollectiblesForTransformation(self, player, playerForm)
|
|
54687
|
-
local collectibleTypes = ____exports.getCollectibleTypesForTransformation(nil, playerForm)
|
|
54688
|
-
return getPlayerCollectibleCount(
|
|
54689
|
-
nil,
|
|
54690
|
-
player,
|
|
54691
|
-
__TS__Spread(collectibleTypes:values())
|
|
54692
|
-
)
|
|
54693
|
-
end
|
|
54694
|
-
--- Returns a set of the player's current transformations.
|
|
54695
|
-
function ____exports.getPlayerTransformations(self, player)
|
|
54696
|
-
local transformations = __TS__New(Set)
|
|
54697
|
-
for ____, playerForm in ipairs(getEnumValues(nil, PlayerForm)) do
|
|
54698
|
-
if player:HasPlayerForm(playerForm) then
|
|
54699
|
-
transformations:add(playerForm)
|
|
54700
|
-
end
|
|
54701
|
-
end
|
|
54702
|
-
return transformations
|
|
54703
|
-
end
|
|
54704
|
-
--- Helper function to get a transformation name from a PlayerForm enum.
|
|
54705
|
-
--
|
|
54706
|
-
-- For example:
|
|
54707
|
-
--
|
|
54708
|
-
-- ```ts
|
|
54709
|
-
-- const transformationName = getTransformationName(PlayerForm.LORD_OF_THE_FLIES);
|
|
54710
|
-
-- // transformationName is "Beelzebub"
|
|
54711
|
-
-- ```
|
|
54712
|
-
function ____exports.getTransformationName(self, playerForm)
|
|
54713
|
-
return TRANSFORMATION_NAMES[playerForm]
|
|
54714
|
-
end
|
|
54715
|
-
function ____exports.getTransformationsForCollectibleType(self, collectibleType)
|
|
54716
|
-
local itemConfigTags = getCollectibleTags(nil, collectibleType)
|
|
54717
|
-
local playerForms = getEnumValues(nil, PlayerForm)
|
|
54718
|
-
local transformationSet = __TS__New(Set)
|
|
54719
|
-
for ____, playerForm in ipairs(playerForms) do
|
|
54720
|
-
do
|
|
54721
|
-
local itemConfigTag = TRANSFORMATION_TO_TAG_MAP:get(playerForm)
|
|
54722
|
-
if itemConfigTag == nil then
|
|
54723
|
-
goto __continue11
|
|
54724
|
-
end
|
|
54725
|
-
if hasFlag(nil, itemConfigTags, itemConfigTag) then
|
|
54726
|
-
transformationSet:add(playerForm)
|
|
54727
|
-
end
|
|
54728
|
-
end
|
|
54729
|
-
::__continue11::
|
|
54730
|
-
end
|
|
54731
|
-
return transformationSet
|
|
54732
|
-
end
|
|
54733
|
-
function ____exports.hasFlyingTransformation(self, player)
|
|
54734
|
-
for ____, playerForm in __TS__Iterator(TRANSFORMATIONS_THAT_GRANT_FLYING:values()) do
|
|
54735
|
-
if player:HasPlayerForm(playerForm) then
|
|
54736
|
-
return true
|
|
54737
|
-
end
|
|
54738
|
-
end
|
|
54739
|
-
return false
|
|
54740
|
-
end
|
|
54741
|
-
function ____exports.isTransformationFlying(self, playerForm)
|
|
54742
|
-
return TRANSFORMATIONS_THAT_GRANT_FLYING:has(playerForm)
|
|
54743
|
-
end
|
|
54744
54888
|
return ____exports
|
|
54745
54889
|
end,
|
|
54746
54890
|
["src.functions.trinketCacheFlag"] = function(...)
|