isaacscript-common 1.2.185 → 1.2.186
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.
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Removes the fade-in that occurs at the beginning of a run. If this behavior is desired, call this
|
|
3
|
+
* function once at the beginning of your mod.
|
|
4
|
+
*
|
|
5
|
+
* This is useful for debugging, when you are resetting the game often.
|
|
6
|
+
*
|
|
7
|
+
* You can restore the vanilla behavior with the `restoreFadeIn` function.
|
|
8
|
+
*/
|
|
9
|
+
export declare function removeFadeIn(): void;
|
|
10
|
+
/**
|
|
11
|
+
* Disables the fade-in remover. Only useful if you have previously called the `removeFadeIn`
|
|
12
|
+
* function.
|
|
13
|
+
*/
|
|
14
|
+
export declare function restoreFadeIn(): void;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
local ____exports = {}
|
|
3
|
+
local postRender, shouldRemoveFadeIn, FADE_IN_SPEED, enabled, v
|
|
4
|
+
local ____cachedClasses = require("cachedClasses")
|
|
5
|
+
local game = ____cachedClasses.game
|
|
6
|
+
local ____featuresInitialized = require("featuresInitialized")
|
|
7
|
+
local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNotInitialized
|
|
8
|
+
local ____exports = require("features.saveDataManager.exports")
|
|
9
|
+
local saveDataManager = ____exports.saveDataManager
|
|
10
|
+
function postRender(self)
|
|
11
|
+
if not enabled then
|
|
12
|
+
return
|
|
13
|
+
end
|
|
14
|
+
if shouldRemoveFadeIn(nil) then
|
|
15
|
+
v.run.removedFadeIn = true
|
|
16
|
+
game:Fadein(FADE_IN_SPEED)
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
function shouldRemoveFadeIn(self)
|
|
20
|
+
local gameFrameCount = game:GetFrameCount()
|
|
21
|
+
return not v.run.removedFadeIn and gameFrameCount == 0
|
|
22
|
+
end
|
|
23
|
+
local FEATURE_NAME = "fade-in remover"
|
|
24
|
+
FADE_IN_SPEED = 1
|
|
25
|
+
enabled = false
|
|
26
|
+
v = {run = {removedFadeIn = false}}
|
|
27
|
+
function ____exports.fadeInRemoverInit(self, mod)
|
|
28
|
+
saveDataManager(
|
|
29
|
+
nil,
|
|
30
|
+
"fadeInRemover",
|
|
31
|
+
v,
|
|
32
|
+
function() return false end
|
|
33
|
+
)
|
|
34
|
+
mod:AddCallback(ModCallbacks.MC_POST_RENDER, postRender)
|
|
35
|
+
end
|
|
36
|
+
function ____exports.removeFadeIn(self)
|
|
37
|
+
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
38
|
+
enabled = true
|
|
39
|
+
end
|
|
40
|
+
function ____exports.restoreFadeIn(self)
|
|
41
|
+
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
42
|
+
enabled = false
|
|
43
|
+
end
|
|
44
|
+
return ____exports
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare function postRender(): void;
|
|
2
1
|
/**
|
|
3
|
-
* Enables the fast-reset feature, which allows you to restart the game instantaneously.
|
|
2
|
+
* Enables the fast-reset feature, which allows you to restart the game instantaneously. If this
|
|
3
|
+
* behavior is desired, call this function once at the beginning of your mod.
|
|
4
4
|
*
|
|
5
5
|
* This is useful for debugging, when you are resetting the game often.
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
2
|
local ____exports = {}
|
|
3
|
-
local checkResetInput, enabled
|
|
3
|
+
local postRender, checkResetInput, enabled
|
|
4
4
|
local ____cachedClasses = require("cachedClasses")
|
|
5
5
|
local game = ____cachedClasses.game
|
|
6
6
|
local ____featuresInitialized = require("featuresInitialized")
|
|
@@ -10,7 +10,7 @@ local isActionTriggeredOnAnyInput = ____input.isActionTriggeredOnAnyInput
|
|
|
10
10
|
local isKeyboardPressed = ____input.isKeyboardPressed
|
|
11
11
|
local ____run = require("functions.run")
|
|
12
12
|
local restart = ____run.restart
|
|
13
|
-
function
|
|
13
|
+
function postRender(self)
|
|
14
14
|
if not enabled then
|
|
15
15
|
return
|
|
16
16
|
end
|
|
@@ -34,7 +34,7 @@ end
|
|
|
34
34
|
local FEATURE_NAME = "fast reset"
|
|
35
35
|
enabled = false
|
|
36
36
|
function ____exports.fastResetInit(self, mod)
|
|
37
|
-
mod:AddCallback(ModCallbacks.MC_POST_RENDER,
|
|
37
|
+
mod:AddCallback(ModCallbacks.MC_POST_RENDER, postRender)
|
|
38
38
|
end
|
|
39
39
|
function ____exports.enableFastReset(self)
|
|
40
40
|
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export { deployJSONRoom, deployRandomJSONRoom, emptyRoom, } from "./features/dep
|
|
|
16
16
|
export { disableAllInputs, disableAllInputsExceptFor, disableMovementInputs, disableShootingInputs, enableAllInputs, enableAllInputsExceptFor, } from "./features/disableInputs";
|
|
17
17
|
export { disableAllSound, enableAllSound } from "./features/disableSound";
|
|
18
18
|
export { addConsoleCommand, enableExtraConsoleCommands, removeConsoleCommand, } from "./features/extraConsoleCommands/init";
|
|
19
|
+
export { removeFadeIn, restoreFadeIn } from "./features/fadeInRemover";
|
|
19
20
|
export { disableFastReset, enableFastReset } from "./features/fastReset";
|
|
20
21
|
export { forgottenSwitch } from "./features/forgottenSwitch";
|
|
21
22
|
export { getCollectibleItemPoolType } from "./features/getCollectibleItemPoolType";
|
package/dist/index.lua
CHANGED
|
@@ -150,6 +150,13 @@ do
|
|
|
150
150
|
____exports.enableExtraConsoleCommands = enableExtraConsoleCommands
|
|
151
151
|
____exports.removeConsoleCommand = removeConsoleCommand
|
|
152
152
|
end
|
|
153
|
+
do
|
|
154
|
+
local ____fadeInRemover = require("features.fadeInRemover")
|
|
155
|
+
local removeFadeIn = ____fadeInRemover.removeFadeIn
|
|
156
|
+
local restoreFadeIn = ____fadeInRemover.restoreFadeIn
|
|
157
|
+
____exports.removeFadeIn = removeFadeIn
|
|
158
|
+
____exports.restoreFadeIn = restoreFadeIn
|
|
159
|
+
end
|
|
153
160
|
do
|
|
154
161
|
local ____fastReset = require("features.fastReset")
|
|
155
162
|
local disableFastReset = ____fastReset.disableFastReset
|
package/dist/upgradeMod.lua
CHANGED
|
@@ -84,6 +84,8 @@ local ____disableInputs = require("features.disableInputs")
|
|
|
84
84
|
local disableInputsInit = ____disableInputs.disableInputsInit
|
|
85
85
|
local ____disableSound = require("features.disableSound")
|
|
86
86
|
local disableSoundsInit = ____disableSound.disableSoundsInit
|
|
87
|
+
local ____fadeInRemover = require("features.fadeInRemover")
|
|
88
|
+
local fadeInRemoverInit = ____fadeInRemover.fadeInRemoverInit
|
|
87
89
|
local ____fastReset = require("features.fastReset")
|
|
88
90
|
local fastResetInit = ____fastReset.fastResetInit
|
|
89
91
|
local ____forgottenSwitch = require("features.forgottenSwitch")
|
|
@@ -160,6 +162,7 @@ function initFeatures(self, mod)
|
|
|
160
162
|
playerInventoryInit(nil, mod)
|
|
161
163
|
taintedLazarusPlayersInit(nil, mod)
|
|
162
164
|
fastResetInit(nil, mod)
|
|
165
|
+
fadeInRemoverInit(nil, mod)
|
|
163
166
|
end
|
|
164
167
|
function ____exports.upgradeMod(self, modVanilla, verbose)
|
|
165
168
|
if verbose == nil then
|