isaacscript-common 1.2.115 → 1.2.116
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
2
|
local ____exports = {}
|
|
3
|
-
local hasSubscriptions, postRender,
|
|
3
|
+
local hasSubscriptions, postRender, postPEffectUpdateReordered, checkWaitingForItemAnimation, postPlayerFatalDamage, preBerserkDeath, playerIsAboutToDie, CustomReviveState, v
|
|
4
4
|
local ____exports = require("features.saveDataManager.exports")
|
|
5
5
|
local saveDataManager = ____exports.saveDataManager
|
|
6
6
|
local ____collectibles = require("functions.collectibles")
|
|
@@ -27,15 +27,6 @@ function postRender(self)
|
|
|
27
27
|
local sfx = SFXManager()
|
|
28
28
|
sfx:Stop(SoundEffect.SOUND_1UP)
|
|
29
29
|
end
|
|
30
|
-
function postNewRoom(self)
|
|
31
|
-
if v.run.state == CustomReviveState.CHANGING_ROOMS then
|
|
32
|
-
v.run.state = CustomReviveState.WAITING_FOR_ITEM_ANIMATION
|
|
33
|
-
elseif v.run.state == CustomReviveState.WAITING_FOR_ITEM_ANIMATION then
|
|
34
|
-
v.run.state = CustomReviveState.DISABLED
|
|
35
|
-
v.run.revivalType = nil
|
|
36
|
-
v.run.dyingPlayerIndex = nil
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
30
|
function postPEffectUpdateReordered(self, player)
|
|
40
31
|
checkWaitingForItemAnimation(nil, player)
|
|
41
32
|
end
|
|
@@ -85,7 +76,7 @@ function playerIsAboutToDie(self, player)
|
|
|
85
76
|
if revivalType == nil then
|
|
86
77
|
return
|
|
87
78
|
end
|
|
88
|
-
v.run.state = CustomReviveState.
|
|
79
|
+
v.run.state = CustomReviveState.WAITING_FOR_ITEM_ANIMATION
|
|
89
80
|
v.run.revivalType = revivalType
|
|
90
81
|
v.run.dyingPlayerIndex = getPlayerIndex(nil, player)
|
|
91
82
|
player:AddCollectible(CollectibleType.COLLECTIBLE_1UP, 0, false)
|
|
@@ -95,15 +86,12 @@ end
|
|
|
95
86
|
CustomReviveState = CustomReviveState or ({})
|
|
96
87
|
CustomReviveState.DISABLED = 0
|
|
97
88
|
CustomReviveState[CustomReviveState.DISABLED] = "DISABLED"
|
|
98
|
-
CustomReviveState.
|
|
99
|
-
CustomReviveState[CustomReviveState.CHANGING_ROOMS] = "CHANGING_ROOMS"
|
|
100
|
-
CustomReviveState.WAITING_FOR_ITEM_ANIMATION = 2
|
|
89
|
+
CustomReviveState.WAITING_FOR_ITEM_ANIMATION = 1
|
|
101
90
|
CustomReviveState[CustomReviveState.WAITING_FOR_ITEM_ANIMATION] = "WAITING_FOR_ITEM_ANIMATION"
|
|
102
91
|
v = {run = {state = CustomReviveState.DISABLED, revivalType = nil, dyingPlayerIndex = nil}}
|
|
103
92
|
function ____exports.customReviveCallbacksInit(self, mod)
|
|
104
93
|
saveDataManager(nil, "customRevive", v, hasSubscriptions)
|
|
105
94
|
mod:AddCallback(ModCallbacks.MC_POST_RENDER, postRender)
|
|
106
|
-
mod:AddCallback(ModCallbacks.MC_POST_NEW_ROOM, postNewRoom)
|
|
107
95
|
mod:AddCallbackCustom(ModCallbacksCustom.MC_POST_PEFFECT_UPDATE_REORDERED, postPEffectUpdateReordered)
|
|
108
96
|
mod:AddCallbackCustom(ModCallbacksCustom.MC_POST_PLAYER_FATAL_DAMAGE, postPlayerFatalDamage)
|
|
109
97
|
mod:AddCallbackCustom(ModCallbacksCustom.MC_PRE_BERSERK_DEATH, preBerserkDeath)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript-common",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.116",
|
|
4
4
|
"description": "Helper functions for IsaacScript mods",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"isaac",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@zamiell/typescript-to-lua": "^1.4.2",
|
|
29
|
-
"isaac-typescript-definitions": "^1.0.
|
|
29
|
+
"isaac-typescript-definitions": "^1.0.359",
|
|
30
30
|
"isaacscript-lint": "^1.0.84",
|
|
31
31
|
"isaacscript-tsconfig": "^1.1.8",
|
|
32
32
|
"typedoc": "^0.22.13",
|