isaacscript-common 4.5.0 → 4.6.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/constants.d.ts +0 -3
- package/constantsFirstLast.d.ts +0 -3
- package/features/characterHealthConversion.d.ts +6 -0
- package/features/characterHealthConversion.lua +4 -1
- package/features/characterStats.d.ts +5 -0
- package/features/characterStats.lua +1 -1
- package/features/collectibleItemPoolType.lua +2 -2
- package/features/debugDisplay/debugDisplay.d.ts +4 -0
- package/features/debugDisplay/debugDisplay.lua +2 -0
- package/features/deployJSONRoom.lua +4 -6
- package/features/{disableSound.d.ts → disableAllSound.d.ts} +0 -0
- package/features/{disableSound.lua → disableAllSound.lua} +3 -3
- package/features/disableInputs.lua +2 -2
- package/features/extraConsoleCommands/exports.d.ts +26 -0
- package/features/extraConsoleCommands/exports.lua +54 -0
- package/features/extraConsoleCommands/init.d.ts +1 -25
- package/features/extraConsoleCommands/init.lua +166 -195
- package/features/extraConsoleCommands/v.d.ts +8 -0
- package/features/extraConsoleCommands/v.lua +11 -0
- package/features/fadeInRemover.lua +2 -2
- package/features/fastReset.lua +1 -1
- package/features/forgottenSwitch.lua +2 -2
- package/features/persistentEntities.lua +6 -1
- package/features/playerInventory.lua +2 -2
- package/features/ponyDetection.lua +2 -2
- package/features/preventCollectibleRotation.lua +2 -2
- package/features/registerHotkey.d.ts +3 -0
- package/features/registerHotkey.lua +50 -0
- package/features/roomClearFrame.lua +2 -2
- package/features/runInNFrames.lua +2 -2
- package/features/saveDataManager/exports.lua +1 -0
- package/features/sirenHelpers.lua +2 -2
- package/features/stageHistory.lua +2 -2
- package/features/taintedLazarusPlayers.lua +2 -2
- package/featuresInitialized.lua +1 -1
- package/functions/gridEntity.d.ts +12 -0
- package/functions/gridEntity.lua +15 -2
- package/functions/rng.lua +6 -2
- package/functions/rooms.d.ts +1 -0
- package/functions/rooms.lua +1 -0
- package/functions/run.d.ts +5 -2
- package/functions/run.lua +5 -2
- package/functions/saveFile.lua +3 -0
- package/functions/stage.d.ts +6 -1
- package/functions/stage.lua +7 -0
- package/functions/utils.d.ts +5 -0
- package/functions/utils.lua +7 -0
- package/index.d.ts +4 -4
- package/index.lua +22 -24
- package/initFeatures.lua +6 -6
- package/lualib_bundle.lua +6 -3
- package/maps/roomTypeMap.lua +0 -1
- package/objects/roomTypeGotoPrefixes.d.ts +4 -0
- package/objects/roomTypeGotoPrefixes.lua +35 -0
- package/objects/roomTypeNames.lua +0 -1
- package/package.json +2 -2
- package/sets/consoleCommandsSet.d.ts +5 -0
- package/sets/consoleCommandsSet.lua +61 -0
- package/types/PickingUpItem.d.ts +3 -3
- package/types/PickingUpItem.lua +3 -3
- package/enums/StageTravelEntityState.d.ts +0 -4
- package/enums/StageTravelEntityState.lua +0 -7
- package/enums/StageTravelState.d.ts +0 -6
- package/enums/StageTravelState.lua +0 -11
- package/features/customTrapdoor/constants.d.ts +0 -5
- package/features/customTrapdoor/constants.lua +0 -7
- package/features/customTrapdoor/exports.d.ts +0 -37
- package/features/customTrapdoor/exports.lua +0 -120
- package/features/customTrapdoor/init.d.ts +0 -1
- package/features/customTrapdoor/init.lua +0 -11
- package/features/customTrapdoor/stageTravel.d.ts +0 -0
- package/features/customTrapdoor/stageTravel.lua +0 -0
- package/features/customTrapdoor/trapdoor.d.ts +0 -0
- package/features/customTrapdoor/trapdoor.lua +0 -0
- package/features/customTrapdoor/v.d.ts +0 -14
- package/features/customTrapdoor/v.lua +0 -16
- package/interfaces/StageTravelEntityDescription.d.ts +0 -5
- package/interfaces/StageTravelEntityDescription.lua +0 -2
|
@@ -147,6 +147,7 @@ end
|
|
|
147
147
|
-- This can make debugging easier, as you can access the variables from the game's debug console.
|
|
148
148
|
-- e.g. `l print(g.feature1.foo)`
|
|
149
149
|
function ____exports.saveDataManagerSetGlobal(self)
|
|
150
|
+
errorIfFeaturesNotInitialized(nil, SAVE_DATA_MANAGER_FEATURE_NAME)
|
|
150
151
|
g = saveDataMap
|
|
151
152
|
gd = saveDataDefaultsMap
|
|
152
153
|
end
|
|
@@ -48,12 +48,12 @@ function getSirenHelper(self, familiar)
|
|
|
48
48
|
function(____, sirenHelper) return sirenHelper.Target ~= nil and GetPtrHash(sirenHelper.Target) == familiarPtrHash end
|
|
49
49
|
)
|
|
50
50
|
end
|
|
51
|
-
local FEATURE_NAME = "
|
|
51
|
+
local FEATURE_NAME = "sirenHelpers"
|
|
52
52
|
v = {run = {familiarBlacklist = {}}}
|
|
53
53
|
---
|
|
54
54
|
-- @internal
|
|
55
55
|
function ____exports.sirenHelpersInit(self, mod)
|
|
56
|
-
saveDataManager(nil,
|
|
56
|
+
saveDataManager(nil, FEATURE_NAME, v)
|
|
57
57
|
mod:AddCallback(ModCallback.POST_NPC_INIT, postNPCInitSirenHelper, EntityType.SIREN_HELPER)
|
|
58
58
|
end
|
|
59
59
|
--- Blacklists a familiar from being stolen by The Siren boss. This should be called once at the
|
|
@@ -17,12 +17,12 @@ function postNewLevelReordered(self)
|
|
|
17
17
|
local ____v_run_stageHistory_0 = v.run.stageHistory
|
|
18
18
|
____v_run_stageHistory_0[#____v_run_stageHistory_0 + 1] = {stage, stageType}
|
|
19
19
|
end
|
|
20
|
-
local FEATURE_NAME = "
|
|
20
|
+
local FEATURE_NAME = "stageHistory"
|
|
21
21
|
v = {run = {stageHistory = {}}}
|
|
22
22
|
---
|
|
23
23
|
-- @internal
|
|
24
24
|
function ____exports.stageHistoryInit(self, mod)
|
|
25
|
-
saveDataManager(nil,
|
|
25
|
+
saveDataManager(nil, FEATURE_NAME, v)
|
|
26
26
|
mod:AddCallbackCustom(ModCallbackCustom.POST_NEW_LEVEL_REORDERED, postNewLevelReordered)
|
|
27
27
|
end
|
|
28
28
|
--- Helper function to get all of the stages that a player has visited thus far on this run.
|
|
@@ -43,7 +43,7 @@ function checkDequeue(self)
|
|
|
43
43
|
v.run.subPlayerMap:set(taintedLazarusPtrHash, deadTaintedLazarusPtr)
|
|
44
44
|
v.run.subPlayerMap:set(deadTaintedLazarusPtrHash, taintedLazarusPtr)
|
|
45
45
|
end
|
|
46
|
-
local FEATURE_NAME = "
|
|
46
|
+
local FEATURE_NAME = "taintedLazarusPlayers"
|
|
47
47
|
v = {run = {
|
|
48
48
|
queuedTaintedLazarus = {},
|
|
49
49
|
queuedDeadTaintedLazarus = {},
|
|
@@ -54,7 +54,7 @@ v = {run = {
|
|
|
54
54
|
function ____exports.taintedLazarusPlayersInit(self, mod)
|
|
55
55
|
saveDataManager(
|
|
56
56
|
nil,
|
|
57
|
-
|
|
57
|
+
FEATURE_NAME,
|
|
58
58
|
v,
|
|
59
59
|
function() return false end
|
|
60
60
|
)
|
package/featuresInitialized.lua
CHANGED
|
@@ -9,7 +9,7 @@ end
|
|
|
9
9
|
-- @internal
|
|
10
10
|
function ____exports.errorIfFeaturesNotInitialized(self, featureName)
|
|
11
11
|
if not ____exports.areFeaturesInitialized(nil) then
|
|
12
|
-
error(("The " .. featureName) .. " is not initialized. You must first upgrade your mod object by calling the \"upgradeMod\" function.")
|
|
12
|
+
error(("The \"" .. featureName) .. "\" feature is not initialized. You must first upgrade your mod object by calling the \"upgradeMod\" function.")
|
|
13
13
|
end
|
|
14
14
|
end
|
|
15
15
|
---
|
|
@@ -5,6 +5,12 @@ import { GridEntityType, GridEntityXMLType } from "isaac-typescript-definitions"
|
|
|
5
5
|
* 1000.0 in a room XML file, but `GridEntityType.ROCK` is equal to 2.
|
|
6
6
|
*/
|
|
7
7
|
export declare function convertXMLGridEntityType(gridEntityXMLType: GridEntityXMLType, gridEntityXMLVariant: int): [GridEntityType, int] | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Helper function to get every legal grid index for the current room.
|
|
10
|
+
*
|
|
11
|
+
* Under the hood, this uses the `Room.GetGridSize` method.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getAllGridIndexes(): int[];
|
|
8
14
|
/**
|
|
9
15
|
* Gets the entities that have a hitbox that overlaps with any part of the square that the grid
|
|
10
16
|
* entity is on.
|
|
@@ -79,6 +85,9 @@ export declare function isPostBossVoidPortal(gridEntity: GridEntity): boolean;
|
|
|
79
85
|
* Helper function to all grid entities in the room except for ones matching the grid entity types
|
|
80
86
|
* provided.
|
|
81
87
|
*
|
|
88
|
+
* Note that this function will automatically update the room. (This means that you can spawn new
|
|
89
|
+
* grid entities on the same tile on the same frame, if needed.)
|
|
90
|
+
*
|
|
82
91
|
* For example:
|
|
83
92
|
*
|
|
84
93
|
* ```ts
|
|
@@ -95,6 +104,9 @@ export declare function removeAllGridExcept(...gridEntityTypes: GridEntityType[]
|
|
|
95
104
|
* Helper function to remove all of the grid entities in the room that match the grid entity types
|
|
96
105
|
* provided.
|
|
97
106
|
*
|
|
107
|
+
* Note that this function will automatically update the room. (This means that you can spawn new
|
|
108
|
+
* grid entities on the same tile on the same frame, if needed.)
|
|
109
|
+
*
|
|
98
110
|
* For example:
|
|
99
111
|
*
|
|
100
112
|
* ```ts
|
package/functions/gridEntity.lua
CHANGED
|
@@ -32,11 +32,18 @@ local ____utils = require("functions.utils")
|
|
|
32
32
|
local erange = ____utils.erange
|
|
33
33
|
local ____vector = require("functions.vector")
|
|
34
34
|
local isVector = ____vector.isVector
|
|
35
|
-
function
|
|
35
|
+
--- Helper function to get every legal grid index for the current room.
|
|
36
|
+
--
|
|
37
|
+
-- Under the hood, this uses the `Room.GetGridSize` method.
|
|
38
|
+
function ____exports.getAllGridIndexes(self)
|
|
36
39
|
local room = game:GetRoom()
|
|
37
40
|
local gridSize = room:GetGridSize()
|
|
41
|
+
return erange(nil, gridSize)
|
|
42
|
+
end
|
|
43
|
+
function getAllGridEntities(self)
|
|
44
|
+
local room = game:GetRoom()
|
|
38
45
|
local gridEntities = {}
|
|
39
|
-
for ____, gridIndex in ipairs(
|
|
46
|
+
for ____, gridIndex in ipairs(____exports.getAllGridIndexes(nil)) do
|
|
40
47
|
local gridEntity = room:GetGridEntity(gridIndex)
|
|
41
48
|
if gridEntity ~= nil then
|
|
42
49
|
gridEntities[#gridEntities + 1] = gridEntity
|
|
@@ -277,6 +284,9 @@ end
|
|
|
277
284
|
--- Helper function to all grid entities in the room except for ones matching the grid entity types
|
|
278
285
|
-- provided.
|
|
279
286
|
--
|
|
287
|
+
-- Note that this function will automatically update the room. (This means that you can spawn new
|
|
288
|
+
-- grid entities on the same tile on the same frame, if needed.)
|
|
289
|
+
--
|
|
280
290
|
-- For example:
|
|
281
291
|
--
|
|
282
292
|
-- ```ts
|
|
@@ -307,6 +317,9 @@ end
|
|
|
307
317
|
--- Helper function to remove all of the grid entities in the room that match the grid entity types
|
|
308
318
|
-- provided.
|
|
309
319
|
--
|
|
320
|
+
-- Note that this function will automatically update the room. (This means that you can spawn new
|
|
321
|
+
-- grid entities on the same tile on the same frame, if needed.)
|
|
322
|
+
--
|
|
310
323
|
-- For example:
|
|
311
324
|
--
|
|
312
325
|
-- ```ts
|
package/functions/rng.lua
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
2
|
local __TS__TypeOf = ____lualib.__TS__TypeOf
|
|
3
|
-
local __TS__ObjectValues = ____lualib.__TS__ObjectValues
|
|
4
3
|
local ____exports = {}
|
|
5
4
|
local RECOMMENDED_SHIFT_IDX, OBJECT_NAME
|
|
6
5
|
local ____cachedClasses = require("cachedClasses")
|
|
@@ -123,11 +122,16 @@ function ____exports.setAllRNGToSeed(self, object, seed)
|
|
|
123
122
|
if not isTable(nil, object) then
|
|
124
123
|
error("Failed to iterate over the object containing RNG objects since the type of the provided object was: " .. __TS__TypeOf(object))
|
|
125
124
|
end
|
|
126
|
-
|
|
125
|
+
local setAtLeastOneSeed = false
|
|
126
|
+
for _key, value in pairs(object) do
|
|
127
127
|
if ____exports.isRNG(nil, value) then
|
|
128
128
|
____exports.setSeed(nil, value, seed)
|
|
129
|
+
setAtLeastOneSeed = true
|
|
129
130
|
end
|
|
130
131
|
end
|
|
132
|
+
if not setAtLeastOneSeed then
|
|
133
|
+
error(("Failed to set all RNG objects to seed " .. tostring(seed)) .. " because the parent object did not contain any RNG objects.")
|
|
134
|
+
end
|
|
131
135
|
end
|
|
132
136
|
--- Helper function to iterate over the provided object and set the seed for all of the values that
|
|
133
137
|
-- are RNG objects equal to the start seed for the current run.
|
package/functions/rooms.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export declare function changeRoom(roomGridIndex: int): void;
|
|
|
9
9
|
* Helper function to get an array with every valid `Dimension` (not including `Dimension.CURRENT`).
|
|
10
10
|
*/
|
|
11
11
|
export declare function getAllDimensions(): Dimension[];
|
|
12
|
+
/** Helper function to get the grid index for every room on the entire floor. */
|
|
12
13
|
export declare function getAllRoomGridIndexes(): int[];
|
|
13
14
|
/**
|
|
14
15
|
* Helper function to get the current dimension. Most of the time, this will be `Dimension.MAIN`,
|
package/functions/rooms.lua
CHANGED
|
@@ -123,6 +123,7 @@ end
|
|
|
123
123
|
function ____exports.getAllDimensions(self)
|
|
124
124
|
return erange(nil, NUM_DIMENSIONS)
|
|
125
125
|
end
|
|
126
|
+
--- Helper function to get the grid index for every room on the entire floor.
|
|
126
127
|
function ____exports.getAllRoomGridIndexes(self)
|
|
127
128
|
local rooms = ____exports.getRooms(nil)
|
|
128
129
|
return __TS__ArrayMap(
|
package/functions/run.d.ts
CHANGED
|
@@ -6,7 +6,10 @@ import { PlayerType } from "isaac-typescript-definitions";
|
|
|
6
6
|
*/
|
|
7
7
|
export declare function onSetSeed(): boolean;
|
|
8
8
|
/**
|
|
9
|
-
* Helper function to restart the
|
|
10
|
-
*
|
|
9
|
+
* Helper function to restart the run using the console command of "restart". If the player is
|
|
10
|
+
* playing a seeded run, then it will restart the game to the beginning of the seed. Otherwise, it
|
|
11
|
+
* will put the player on a run with an entirely new seed.
|
|
12
|
+
*
|
|
13
|
+
* You can optionally specify a `PlayerType` to restart the game as that character.
|
|
11
14
|
*/
|
|
12
15
|
export declare function restart(character?: PlayerType): void;
|
package/functions/run.lua
CHANGED
|
@@ -16,8 +16,11 @@ function ____exports.onSetSeed(self)
|
|
|
16
16
|
local challenge = Isaac.GetChallenge()
|
|
17
17
|
return challenge == Challenge.NULL and customRun
|
|
18
18
|
end
|
|
19
|
-
--- Helper function to restart the
|
|
20
|
-
--
|
|
19
|
+
--- Helper function to restart the run using the console command of "restart". If the player is
|
|
20
|
+
-- playing a seeded run, then it will restart the game to the beginning of the seed. Otherwise, it
|
|
21
|
+
-- will put the player on a run with an entirely new seed.
|
|
22
|
+
--
|
|
23
|
+
-- You can optionally specify a `PlayerType` to restart the game as that character.
|
|
21
24
|
function ____exports.restart(self, character)
|
|
22
25
|
if character == nil then
|
|
23
26
|
log("Restarting.")
|
package/functions/saveFile.lua
CHANGED
|
@@ -100,6 +100,9 @@ function ____exports.isCollectibleUnlocked(self, collectibleTypeToCheckFor, item
|
|
|
100
100
|
end
|
|
101
101
|
end
|
|
102
102
|
end
|
|
103
|
+
for ____, player in ipairs(taintedLosts) do
|
|
104
|
+
player:ChangePlayerType(PlayerType.THE_LOST_B)
|
|
105
|
+
end
|
|
103
106
|
return collectibleUnlocked
|
|
104
107
|
end
|
|
105
108
|
return ____exports
|
package/functions/stage.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LevelStage, StageType } from "isaac-typescript-definitions";
|
|
1
|
+
import { LevelStage, RoomType, StageType } from "isaac-typescript-definitions";
|
|
2
2
|
/**
|
|
3
3
|
* Helper function that calculates what the stage type should be for the provided stage. This
|
|
4
4
|
* emulates what the game's internal code does.
|
|
@@ -15,6 +15,11 @@ export declare function calculateStageTypeRepentance(stage: LevelStage): StageTy
|
|
|
15
15
|
* consider Downpour 2 to have a stage of 3.
|
|
16
16
|
*/
|
|
17
17
|
export declare function getEffectiveStage(): int;
|
|
18
|
+
/**
|
|
19
|
+
* Helper function to get the prefix to use with the "goto" console command that would correspond to
|
|
20
|
+
* the provided room type.
|
|
21
|
+
*/
|
|
22
|
+
export declare function getGotoCommandPrefix(roomType: RoomType): string;
|
|
18
23
|
/** Alias for the `Level.GetStage` method. */
|
|
19
24
|
export declare function getStage(): LevelStage;
|
|
20
25
|
/** Alias for the `Level.GetStageType` method. */
|
package/functions/stage.lua
CHANGED
|
@@ -4,6 +4,8 @@ local LevelStage = ____isaac_2Dtypescript_2Ddefinitions.LevelStage
|
|
|
4
4
|
local StageType = ____isaac_2Dtypescript_2Ddefinitions.StageType
|
|
5
5
|
local ____cachedClasses = require("cachedClasses")
|
|
6
6
|
local game = ____cachedClasses.game
|
|
7
|
+
local ____roomTypeGotoPrefixes = require("objects.roomTypeGotoPrefixes")
|
|
8
|
+
local ROOM_TYPE_GOTO_PREFIXES = ____roomTypeGotoPrefixes.ROOM_TYPE_GOTO_PREFIXES
|
|
7
9
|
local ____stageTypeSuffixes = require("objects.stageTypeSuffixes")
|
|
8
10
|
local STAGE_TYPE_SUFFIXES = ____stageTypeSuffixes.STAGE_TYPE_SUFFIXES
|
|
9
11
|
local ____stageTypeToLetter = require("objects.stageTypeToLetter")
|
|
@@ -62,6 +64,11 @@ function ____exports.getEffectiveStage(self)
|
|
|
62
64
|
end
|
|
63
65
|
return stage
|
|
64
66
|
end
|
|
67
|
+
--- Helper function to get the prefix to use with the "goto" console command that would correspond to
|
|
68
|
+
-- the provided room type.
|
|
69
|
+
function ____exports.getGotoCommandPrefix(self, roomType)
|
|
70
|
+
return ROOM_TYPE_GOTO_PREFIXES[roomType]
|
|
71
|
+
end
|
|
65
72
|
--- Alias for the `Level.GetStage` method.
|
|
66
73
|
function ____exports.getStage(self)
|
|
67
74
|
local level = game:GetLevel()
|
package/functions/utils.d.ts
CHANGED
|
@@ -34,6 +34,11 @@ export declare function irange(start: int, end?: int): int[];
|
|
|
34
34
|
* be a non-zero value in reflections.
|
|
35
35
|
*/
|
|
36
36
|
export declare function isReflectionRender(): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Helper function to see if a particular command is a vanilla console command. This is useful
|
|
39
|
+
* because the `EXECUTE_CMD` callback will not fire for any vanilla commands.
|
|
40
|
+
*/
|
|
41
|
+
export declare function isVanillaConsoleCommand(commandName: string): boolean;
|
|
37
42
|
/**
|
|
38
43
|
* Helper function to print something to the in-game console. Use this instead of invoking the
|
|
39
44
|
* `Isaac.ConsoleOutput` method directly because it will automatically insert a newline at the end
|
package/functions/utils.lua
CHANGED
|
@@ -6,6 +6,8 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
|
|
|
6
6
|
local RenderMode = ____isaac_2Dtypescript_2Ddefinitions.RenderMode
|
|
7
7
|
local ____cachedClasses = require("cachedClasses")
|
|
8
8
|
local game = ____cachedClasses.game
|
|
9
|
+
local ____consoleCommandsSet = require("sets.consoleCommandsSet")
|
|
10
|
+
local CONSOLE_COMMANDS_SET = ____consoleCommandsSet.CONSOLE_COMMANDS_SET
|
|
9
11
|
local HEX_STRING_LENGTH = 6
|
|
10
12
|
--- Helper function to return an array with the elements from start to end. It is inclusive at the
|
|
11
13
|
-- start and exclusive at the end. (The "e" stands for exclusive.)
|
|
@@ -91,6 +93,11 @@ function ____exports.isReflectionRender(self)
|
|
|
91
93
|
local renderMode = room:GetRenderMode()
|
|
92
94
|
return renderMode == RenderMode.WATER_REFLECT
|
|
93
95
|
end
|
|
96
|
+
--- Helper function to see if a particular command is a vanilla console command. This is useful
|
|
97
|
+
-- because the `EXECUTE_CMD` callback will not fire for any vanilla commands.
|
|
98
|
+
function ____exports.isVanillaConsoleCommand(self, commandName)
|
|
99
|
+
return CONSOLE_COMMANDS_SET:has(commandName)
|
|
100
|
+
end
|
|
94
101
|
--- Helper function to print something to the in-game console. Use this instead of invoking the
|
|
95
102
|
-- `Isaac.ConsoleOutput` method directly because it will automatically insert a newline at the end
|
|
96
103
|
-- of the message (which `Isaac.ConsoleOutput` does not do by default).
|
package/index.d.ts
CHANGED
|
@@ -12,19 +12,19 @@ export * from "./enums/SerializationType";
|
|
|
12
12
|
export { ConversionHeartSubType, registerCharacterHealthConversion, } from "./features/characterHealthConversion";
|
|
13
13
|
export { registerCharacterStats } from "./features/characterStats";
|
|
14
14
|
export { getCollectibleItemPoolType } from "./features/collectibleItemPoolType";
|
|
15
|
-
export * from "./features/customTrapdoor/exports";
|
|
16
15
|
export * from "./features/debugDisplay/exports";
|
|
17
16
|
export { deployJSONRoom, deployRandomJSONRoom, emptyRoom, } from "./features/deployJSONRoom";
|
|
17
|
+
export { disableAllSound, enableAllSound } from "./features/disableAllSound";
|
|
18
18
|
export { disableAllInputs, disableAllInputsExceptFor, disableMovementInputs, disableShootingInputs, enableAllInputs, enableAllInputsExceptFor, } from "./features/disableInputs";
|
|
19
|
-
export
|
|
20
|
-
export { addConsoleCommand, enableExtraConsoleCommands, removeConsoleCommand, } from "./features/extraConsoleCommands/init";
|
|
19
|
+
export * from "./features/extraConsoleCommands/exports";
|
|
21
20
|
export { removeFadeIn, restoreFadeIn } from "./features/fadeInRemover";
|
|
22
21
|
export { disableFastReset, enableFastReset } from "./features/fastReset";
|
|
23
22
|
export { forgottenSwitch } from "./features/forgottenSwitch";
|
|
24
23
|
export { removePersistentEntity, spawnPersistentEntity, } from "./features/persistentEntities";
|
|
25
24
|
export { getPlayerInventory } from "./features/playerInventory";
|
|
26
|
-
export { anyPlayerUsingPony, isPlayerUsingPony
|
|
25
|
+
export { anyPlayerUsingPony, isPlayerUsingPony, } from "./features/ponyDetection";
|
|
27
26
|
export { preventCollectibleRotation } from "./features/preventCollectibleRotation";
|
|
27
|
+
export { registerHotkey, unregisterHotkey } from "./features/registerHotkey";
|
|
28
28
|
export { getRoomClearGameFrame, getRoomClearRoomFrame, } from "./features/roomClearFrame";
|
|
29
29
|
export { runInNGameFrames, runInNRenderFrames, runNextGameFrame, runNextRenderFrame, } from "./features/runInNFrames";
|
|
30
30
|
export * from "./features/saveDataManager/exports";
|
package/index.lua
CHANGED
|
@@ -100,14 +100,6 @@ do
|
|
|
100
100
|
local getCollectibleItemPoolType = ____collectibleItemPoolType.getCollectibleItemPoolType
|
|
101
101
|
____exports.getCollectibleItemPoolType = getCollectibleItemPoolType
|
|
102
102
|
end
|
|
103
|
-
do
|
|
104
|
-
local ____export = require("features.customTrapdoor.exports")
|
|
105
|
-
for ____exportKey, ____exportValue in pairs(____export) do
|
|
106
|
-
if ____exportKey ~= "default" then
|
|
107
|
-
____exports[____exportKey] = ____exportValue
|
|
108
|
-
end
|
|
109
|
-
end
|
|
110
|
-
end
|
|
111
103
|
do
|
|
112
104
|
local ____export = require("features.debugDisplay.exports")
|
|
113
105
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -125,6 +117,13 @@ do
|
|
|
125
117
|
____exports.deployRandomJSONRoom = deployRandomJSONRoom
|
|
126
118
|
____exports.emptyRoom = emptyRoom
|
|
127
119
|
end
|
|
120
|
+
do
|
|
121
|
+
local ____disableAllSound = require("features.disableAllSound")
|
|
122
|
+
local disableAllSound = ____disableAllSound.disableAllSound
|
|
123
|
+
local enableAllSound = ____disableAllSound.enableAllSound
|
|
124
|
+
____exports.disableAllSound = disableAllSound
|
|
125
|
+
____exports.enableAllSound = enableAllSound
|
|
126
|
+
end
|
|
128
127
|
do
|
|
129
128
|
local ____disableInputs = require("features.disableInputs")
|
|
130
129
|
local disableAllInputs = ____disableInputs.disableAllInputs
|
|
@@ -141,20 +140,12 @@ do
|
|
|
141
140
|
____exports.enableAllInputsExceptFor = enableAllInputsExceptFor
|
|
142
141
|
end
|
|
143
142
|
do
|
|
144
|
-
local
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
end
|
|
150
|
-
do
|
|
151
|
-
local ____init = require("features.extraConsoleCommands.init")
|
|
152
|
-
local addConsoleCommand = ____init.addConsoleCommand
|
|
153
|
-
local enableExtraConsoleCommands = ____init.enableExtraConsoleCommands
|
|
154
|
-
local removeConsoleCommand = ____init.removeConsoleCommand
|
|
155
|
-
____exports.addConsoleCommand = addConsoleCommand
|
|
156
|
-
____exports.enableExtraConsoleCommands = enableExtraConsoleCommands
|
|
157
|
-
____exports.removeConsoleCommand = removeConsoleCommand
|
|
143
|
+
local ____export = require("features.extraConsoleCommands.exports")
|
|
144
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
145
|
+
if ____exportKey ~= "default" then
|
|
146
|
+
____exports[____exportKey] = ____exportValue
|
|
147
|
+
end
|
|
148
|
+
end
|
|
158
149
|
end
|
|
159
150
|
do
|
|
160
151
|
local ____fadeInRemover = require("features.fadeInRemover")
|
|
@@ -190,15 +181,22 @@ end
|
|
|
190
181
|
do
|
|
191
182
|
local ____ponyDetection = require("features.ponyDetection")
|
|
192
183
|
local anyPlayerUsingPony = ____ponyDetection.anyPlayerUsingPony
|
|
193
|
-
local
|
|
184
|
+
local isPlayerUsingPony = ____ponyDetection.isPlayerUsingPony
|
|
194
185
|
____exports.anyPlayerUsingPony = anyPlayerUsingPony
|
|
195
|
-
____exports.
|
|
186
|
+
____exports.isPlayerUsingPony = isPlayerUsingPony
|
|
196
187
|
end
|
|
197
188
|
do
|
|
198
189
|
local ____preventCollectibleRotation = require("features.preventCollectibleRotation")
|
|
199
190
|
local preventCollectibleRotation = ____preventCollectibleRotation.preventCollectibleRotation
|
|
200
191
|
____exports.preventCollectibleRotation = preventCollectibleRotation
|
|
201
192
|
end
|
|
193
|
+
do
|
|
194
|
+
local ____registerHotkey = require("features.registerHotkey")
|
|
195
|
+
local registerHotkey = ____registerHotkey.registerHotkey
|
|
196
|
+
local unregisterHotkey = ____registerHotkey.unregisterHotkey
|
|
197
|
+
____exports.registerHotkey = registerHotkey
|
|
198
|
+
____exports.unregisterHotkey = unregisterHotkey
|
|
199
|
+
end
|
|
202
200
|
do
|
|
203
201
|
local ____roomClearFrame = require("features.roomClearFrame")
|
|
204
202
|
local getRoomClearGameFrame = ____roomClearFrame.getRoomClearGameFrame
|
package/initFeatures.lua
CHANGED
|
@@ -5,14 +5,12 @@ local ____characterStats = require("features.characterStats")
|
|
|
5
5
|
local characterStatsInit = ____characterStats.characterStatsInit
|
|
6
6
|
local ____collectibleItemPoolType = require("features.collectibleItemPoolType")
|
|
7
7
|
local collectibleItemPoolTypeInit = ____collectibleItemPoolType.collectibleItemPoolTypeInit
|
|
8
|
-
local ____init = require("features.customTrapdoor.init")
|
|
9
|
-
local stageTravelInit = ____init.stageTravelInit
|
|
10
8
|
local ____deployJSONRoom = require("features.deployJSONRoom")
|
|
11
9
|
local deployJSONRoomInit = ____deployJSONRoom.deployJSONRoomInit
|
|
10
|
+
local ____disableAllSound = require("features.disableAllSound")
|
|
11
|
+
local disableAllSoundInit = ____disableAllSound.disableAllSoundInit
|
|
12
12
|
local ____disableInputs = require("features.disableInputs")
|
|
13
13
|
local disableInputsInit = ____disableInputs.disableInputsInit
|
|
14
|
-
local ____disableSound = require("features.disableSound")
|
|
15
|
-
local disableSoundsInit = ____disableSound.disableSoundsInit
|
|
16
14
|
local ____fadeInRemover = require("features.fadeInRemover")
|
|
17
15
|
local fadeInRemoverInit = ____fadeInRemover.fadeInRemoverInit
|
|
18
16
|
local ____fastReset = require("features.fastReset")
|
|
@@ -27,6 +25,8 @@ local ____ponyDetection = require("features.ponyDetection")
|
|
|
27
25
|
local ponyDetectionInit = ____ponyDetection.ponyDetectionInit
|
|
28
26
|
local ____preventCollectibleRotation = require("features.preventCollectibleRotation")
|
|
29
27
|
local preventCollectibleRotationInit = ____preventCollectibleRotation.preventCollectibleRotationInit
|
|
28
|
+
local ____registerHotkey = require("features.registerHotkey")
|
|
29
|
+
local registerHotkeyInit = ____registerHotkey.registerHotkeyInit
|
|
30
30
|
local ____roomClearFrame = require("features.roomClearFrame")
|
|
31
31
|
local roomClearFrameInit = ____roomClearFrame.roomClearFrameInit
|
|
32
32
|
local ____runInNFrames = require("features.runInNFrames")
|
|
@@ -44,8 +44,8 @@ function ____exports.initFeaturesMajor(self, mod)
|
|
|
44
44
|
characterHealthConversionInit(nil, mod)
|
|
45
45
|
end
|
|
46
46
|
function ____exports.initFeaturesMinor(self, mod)
|
|
47
|
+
disableAllSoundInit(nil, mod)
|
|
47
48
|
disableInputsInit(nil, mod)
|
|
48
|
-
disableSoundsInit(nil, mod)
|
|
49
49
|
fadeInRemoverInit(nil, mod)
|
|
50
50
|
fastResetInit(nil, mod)
|
|
51
51
|
forgottenSwitchInit(nil, mod)
|
|
@@ -54,10 +54,10 @@ function ____exports.initFeaturesMinor(self, mod)
|
|
|
54
54
|
playerInventoryInit(nil, mod)
|
|
55
55
|
ponyDetectionInit(nil, mod)
|
|
56
56
|
preventCollectibleRotationInit(nil, mod)
|
|
57
|
+
registerHotkeyInit(nil, mod)
|
|
57
58
|
roomClearFrameInit(nil, mod)
|
|
58
59
|
sirenHelpersInit(nil, mod)
|
|
59
60
|
stageHistoryInit(nil, mod)
|
|
60
|
-
stageTravelInit(nil)
|
|
61
61
|
taintedLazarusPlayersInit(nil, mod)
|
|
62
62
|
end
|
|
63
63
|
return ____exports
|
package/lualib_bundle.lua
CHANGED
|
@@ -651,7 +651,7 @@ do
|
|
|
651
651
|
end
|
|
652
652
|
else
|
|
653
653
|
local ____self_fulfilledCallbacks_2 = self.fulfilledCallbacks
|
|
654
|
-
____self_fulfilledCallbacks_2[#____self_fulfilledCallbacks_2 + 1] = function() return resolve(nil,
|
|
654
|
+
____self_fulfilledCallbacks_2[#____self_fulfilledCallbacks_2 + 1] = function(____, v) return resolve(nil, v) end
|
|
655
655
|
end
|
|
656
656
|
if onRejected then
|
|
657
657
|
local internalCallback = self:createPromiseResolvingCallback(onRejected, resolve, reject)
|
|
@@ -660,6 +660,9 @@ do
|
|
|
660
660
|
if isRejected then
|
|
661
661
|
internalCallback(nil, self.rejectionReason)
|
|
662
662
|
end
|
|
663
|
+
else
|
|
664
|
+
local ____self_rejectedCallbacks_4 = self.rejectedCallbacks
|
|
665
|
+
____self_rejectedCallbacks_4[#____self_rejectedCallbacks_4 + 1] = function(____, err) return reject(nil, err) end
|
|
663
666
|
end
|
|
664
667
|
if isFulfilled then
|
|
665
668
|
resolve(nil, self.value)
|
|
@@ -674,8 +677,8 @@ do
|
|
|
674
677
|
end
|
|
675
678
|
function __TS__Promise.prototype.finally(self, onFinally)
|
|
676
679
|
if onFinally then
|
|
677
|
-
local
|
|
678
|
-
|
|
680
|
+
local ____self_finallyCallbacks_5 = self.finallyCallbacks
|
|
681
|
+
____self_finallyCallbacks_5[#____self_finallyCallbacks_5 + 1] = onFinally
|
|
679
682
|
if self.state ~= 0 then
|
|
680
683
|
onFinally(nil)
|
|
681
684
|
end
|
package/maps/roomTypeMap.lua
CHANGED
|
@@ -6,7 +6,6 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
|
|
|
6
6
|
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
7
7
|
--- Maps room type names to room types.
|
|
8
8
|
____exports.ROOM_TYPE_MAP = __TS__New(Map, {
|
|
9
|
-
{"null", RoomType.NULL},
|
|
10
9
|
{"default", RoomType.DEFAULT},
|
|
11
10
|
{"shop", RoomType.SHOP},
|
|
12
11
|
{"error", RoomType.ERROR},
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
4
|
+
____exports.ROOM_TYPE_GOTO_PREFIXES = {
|
|
5
|
+
[RoomType.DEFAULT] = "d.",
|
|
6
|
+
[RoomType.SHOP] = "s.shop.",
|
|
7
|
+
[RoomType.ERROR] = "s.error.",
|
|
8
|
+
[RoomType.TREASURE] = "s.treasure.",
|
|
9
|
+
[RoomType.BOSS] = "s.boss.",
|
|
10
|
+
[RoomType.MINI_BOSS] = "s.miniboss.",
|
|
11
|
+
[RoomType.SECRET] = "s.secret.",
|
|
12
|
+
[RoomType.SUPER_SECRET] = "s.supersecret.",
|
|
13
|
+
[RoomType.ARCADE] = "s.arcade.",
|
|
14
|
+
[RoomType.CURSE] = "s.curse.",
|
|
15
|
+
[RoomType.CHALLENGE] = "s.challenge.",
|
|
16
|
+
[RoomType.LIBRARY] = "s.library.",
|
|
17
|
+
[RoomType.SACRIFICE] = "s.sacrifice.",
|
|
18
|
+
[RoomType.DEVIL] = "s.devil.",
|
|
19
|
+
[RoomType.ANGEL] = "s.angel.",
|
|
20
|
+
[RoomType.DUNGEON] = "s.itemdungeon.",
|
|
21
|
+
[RoomType.BOSS_RUSH] = "s.bossrush.",
|
|
22
|
+
[RoomType.CLEAN_BEDROOM] = "s.isaacs.",
|
|
23
|
+
[RoomType.DIRTY_BEDROOM] = "s.barren.",
|
|
24
|
+
[RoomType.CHEST] = "s.chest.",
|
|
25
|
+
[RoomType.DICE] = "s.dice.",
|
|
26
|
+
[RoomType.BLACK_MARKET] = "s.blackmarket.",
|
|
27
|
+
[RoomType.GREED_EXIT] = "s.greedexit.",
|
|
28
|
+
[RoomType.PLANETARIUM] = "s.planetarium.",
|
|
29
|
+
[RoomType.TELEPORTER] = "s.teleporter.",
|
|
30
|
+
[RoomType.TELEPORTER_EXIT] = "s.teleporterexit.",
|
|
31
|
+
[RoomType.SECRET_EXIT] = "s.secretexit.",
|
|
32
|
+
[RoomType.BLUE] = "s.blue.",
|
|
33
|
+
[RoomType.ULTRA_SECRET] = "s.ultrasecret."
|
|
34
|
+
}
|
|
35
|
+
return ____exports
|
|
@@ -3,7 +3,6 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
|
|
|
3
3
|
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
4
4
|
____exports.DEFAULT_ROOM_TYPE_NAME = "Unknown"
|
|
5
5
|
____exports.ROOM_TYPE_NAMES = {
|
|
6
|
-
[RoomType.NULL] = "null room",
|
|
7
6
|
[RoomType.DEFAULT] = "default room",
|
|
8
7
|
[RoomType.SHOP] = "shop",
|
|
9
8
|
[RoomType.ERROR] = "I AM ERROR Room",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript-common",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"description": "Helper functions and features for IsaacScript mods.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"isaac",
|
|
@@ -22,6 +22,6 @@
|
|
|
22
22
|
"main": "index",
|
|
23
23
|
"types": "index.d.ts",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"isaac-typescript-definitions": "^3.0.
|
|
25
|
+
"isaac-typescript-definitions": "^3.0.14"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local Set = ____lualib.Set
|
|
3
|
+
local __TS__New = ____lualib.__TS__New
|
|
4
|
+
local ____exports = {}
|
|
5
|
+
--- The set of vanilla console commands, as documented here:
|
|
6
|
+
-- https://bindingofisaacrebirth.fandom.com/wiki/Debug_Console
|
|
7
|
+
____exports.CONSOLE_COMMANDS_SET = __TS__New(Set, {
|
|
8
|
+
"achievement",
|
|
9
|
+
"challenge",
|
|
10
|
+
"clear",
|
|
11
|
+
"clearcache",
|
|
12
|
+
"clearseeds",
|
|
13
|
+
"combo",
|
|
14
|
+
"copy",
|
|
15
|
+
"costumetest",
|
|
16
|
+
"curse",
|
|
17
|
+
"cutscene",
|
|
18
|
+
"debug",
|
|
19
|
+
"delirious",
|
|
20
|
+
"eggs",
|
|
21
|
+
"giveitem",
|
|
22
|
+
"g",
|
|
23
|
+
"goto",
|
|
24
|
+
"gridspawn",
|
|
25
|
+
"listcollectibles",
|
|
26
|
+
"lua",
|
|
27
|
+
"l",
|
|
28
|
+
"luamem",
|
|
29
|
+
"luamod",
|
|
30
|
+
"luarun",
|
|
31
|
+
"macro",
|
|
32
|
+
"m",
|
|
33
|
+
"metro",
|
|
34
|
+
"playsfx",
|
|
35
|
+
"prof",
|
|
36
|
+
"profstop",
|
|
37
|
+
"remove",
|
|
38
|
+
"r",
|
|
39
|
+
"reloadfx",
|
|
40
|
+
"reloadshaders",
|
|
41
|
+
"repeat",
|
|
42
|
+
"reseed",
|
|
43
|
+
"restart",
|
|
44
|
+
"seed",
|
|
45
|
+
"spawn",
|
|
46
|
+
"stage",
|
|
47
|
+
"time",
|
|
48
|
+
"addplayer",
|
|
49
|
+
"forceroom",
|
|
50
|
+
"giveitem2",
|
|
51
|
+
"g2",
|
|
52
|
+
"netdelay",
|
|
53
|
+
"netstart",
|
|
54
|
+
"remove2",
|
|
55
|
+
"r2",
|
|
56
|
+
"reloadwisps",
|
|
57
|
+
"restock",
|
|
58
|
+
"rewind",
|
|
59
|
+
"testbosspool"
|
|
60
|
+
})
|
|
61
|
+
return ____exports
|
package/types/PickingUpItem.d.ts
CHANGED
|
@@ -27,8 +27,8 @@ export interface PickingUpItemTrinket {
|
|
|
27
27
|
subType: TrinketType;
|
|
28
28
|
}
|
|
29
29
|
/** Helper function to narrow the type of `PickingUpItem`. */
|
|
30
|
-
export declare function
|
|
30
|
+
export declare function isPickingUpItemNull(pickingUpItem: PickingUpItem): pickingUpItem is PickingUpItemTrinket;
|
|
31
31
|
/** Helper function to narrow the type of `PickingUpItem`. */
|
|
32
|
-
export declare function
|
|
32
|
+
export declare function isPickingUpItemCollectible(pickingUpItem: PickingUpItem): pickingUpItem is PickingUpItemCollectible;
|
|
33
33
|
/** Helper function to narrow the type of `PickingUpItem`. */
|
|
34
|
-
export declare function
|
|
34
|
+
export declare function isPickingUpItemTrinket(pickingUpItem: PickingUpItem): pickingUpItem is PickingUpItemTrinket;
|