isaacscript-common 1.2.185 → 1.2.188
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/features/fadeInRemover.d.ts +14 -0
- package/dist/features/fadeInRemover.lua +44 -0
- package/dist/features/fastReset.d.ts +2 -2
- package/dist/features/fastReset.lua +3 -3
- package/dist/functions/cacheFlag.d.ts +7 -0
- package/dist/functions/cacheFlag.lua +9 -0
- package/dist/functions/run.d.ts +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.lua +15 -0
- package/dist/maps/defaultPlayerStatMap.d.ts +2 -0
- package/dist/maps/defaultPlayerStatMap.lua +14 -0
- package/dist/upgradeMod.lua +3 -0
- package/package.json +1 -1
|
@@ -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)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
/**
|
|
3
|
+
* Returns the starting stat that Isaac (the default character) starts with.
|
|
4
|
+
*
|
|
5
|
+
* For example, if you pass this function `CacheFlag.CACHE_DAMAGE`, it will return 3.5.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getDefaultPlayerStat(cacheFlag: CacheFlag): float | boolean | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local Map = ____lualib.Map
|
|
3
|
+
local ____exports = {}
|
|
4
|
+
local ____defaultPlayerStatMap = require("maps.defaultPlayerStatMap")
|
|
5
|
+
local DEFAULT_PLAYER_STAT_MAP = ____defaultPlayerStatMap.DEFAULT_PLAYER_STAT_MAP
|
|
6
|
+
function ____exports.getDefaultPlayerStat(self, cacheFlag)
|
|
7
|
+
return DEFAULT_PLAYER_STAT_MAP:get(cacheFlag)
|
|
8
|
+
end
|
|
9
|
+
return ____exports
|
package/dist/functions/run.d.ts
CHANGED
|
@@ -9,4 +9,4 @@ export declare function onSetSeed(): boolean;
|
|
|
9
9
|
* Helper function to restart the game using the console command of "restart". You can optionally
|
|
10
10
|
* specify a `PlayerType` to restart the game as that character.
|
|
11
11
|
*/
|
|
12
|
-
export declare function restart(character?: PlayerType): void;
|
|
12
|
+
export declare function restart(character?: PlayerType | int): void;
|
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";
|
|
@@ -28,6 +29,7 @@ export { hasSirenStolenFamiliar, setFamiliarNoSirenSteal, } from "./features/sir
|
|
|
28
29
|
export { getTaintedLazarusSubPlayer } from "./features/taintedLazarusPlayers";
|
|
29
30
|
export * from "./functions/array";
|
|
30
31
|
export * from "./functions/bitwise";
|
|
32
|
+
export * from "./functions/cacheFlag";
|
|
31
33
|
export * from "./functions/cards";
|
|
32
34
|
export * from "./functions/challenges";
|
|
33
35
|
export * from "./functions/charge";
|
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
|
|
@@ -234,6 +241,14 @@ do
|
|
|
234
241
|
end
|
|
235
242
|
end
|
|
236
243
|
end
|
|
244
|
+
do
|
|
245
|
+
local ____export = require("functions.cacheFlag")
|
|
246
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
247
|
+
if ____exportKey ~= "default" then
|
|
248
|
+
____exports[____exportKey] = ____exportValue
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
end
|
|
237
252
|
do
|
|
238
253
|
local ____export = require("functions.cards")
|
|
239
254
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local Map = ____lualib.Map
|
|
3
|
+
local __TS__New = ____lualib.__TS__New
|
|
4
|
+
local ____exports = {}
|
|
5
|
+
____exports.DEFAULT_PLAYER_STAT_MAP = __TS__New(Map, {
|
|
6
|
+
{CacheFlag.CACHE_DAMAGE, 3.5},
|
|
7
|
+
{CacheFlag.CACHE_FIREDELAY, 10},
|
|
8
|
+
{CacheFlag.CACHE_SHOTSPEED, 1},
|
|
9
|
+
{CacheFlag.CACHE_RANGE, 6.5},
|
|
10
|
+
{CacheFlag.CACHE_SPEED, 1},
|
|
11
|
+
{CacheFlag.CACHE_FLYING, false},
|
|
12
|
+
{CacheFlag.CACHE_LUCK, 0}
|
|
13
|
+
})
|
|
14
|
+
return ____exports
|
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
|