isaacscript-common 2.0.17 → 2.0.18
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/callbacks/postCustomDoorEnter.d.ts +5 -3
- package/dist/callbacks/postDoorRender.d.ts +1 -0
- package/dist/callbacks/postDoorRender.lua +24 -0
- package/dist/callbacks/postDoorUpdate.d.ts +1 -0
- package/dist/callbacks/postDoorUpdate.lua +24 -0
- package/dist/callbacks/postEffectStateChanged.lua +1 -1
- package/dist/callbacks/postFamiliarStateChanged.lua +1 -1
- package/dist/callbacks/postGridEntity.lua +5 -4
- package/dist/callbacks/postGridEntityRender.d.ts +1 -0
- package/dist/callbacks/postGridEntityRender.lua +24 -0
- package/dist/callbacks/postItemDischarged.lua +5 -5
- package/dist/callbacks/postNPCStateChanged.lua +1 -1
- package/dist/callbacks/postPickupStateChanged.lua +1 -1
- package/dist/callbacks/postPitRender.d.ts +1 -0
- package/dist/callbacks/postPitRender.lua +24 -0
- package/dist/callbacks/postPitUpdate.d.ts +1 -0
- package/dist/callbacks/postPitUpdate.lua +24 -0
- package/dist/callbacks/postPlayerChangeType.lua +1 -1
- package/dist/callbacks/postPoopRender.d.ts +1 -0
- package/dist/callbacks/postPoopRender.lua +24 -0
- package/dist/callbacks/postPoopUpdate.d.ts +1 -0
- package/dist/callbacks/postPoopUpdate.lua +24 -0
- package/dist/callbacks/postPressurePlateRender.d.ts +1 -0
- package/dist/callbacks/postPressurePlateRender.lua +24 -0
- package/dist/callbacks/postPressurePlateUpdate.d.ts +1 -0
- package/dist/callbacks/postPressurePlateUpdate.lua +24 -0
- package/dist/callbacks/postRockRender.d.ts +1 -0
- package/dist/callbacks/postRockRender.lua +24 -0
- package/dist/callbacks/postRockUpdate.d.ts +1 -0
- package/dist/callbacks/postRockUpdate.lua +24 -0
- package/dist/callbacks/postSlotRender.lua +1 -1
- package/dist/callbacks/postSpikesRender.d.ts +1 -0
- package/dist/callbacks/postSpikesRender.lua +24 -0
- package/dist/callbacks/postSpikesUpdate.d.ts +1 -0
- package/dist/callbacks/postSpikesUpdate.lua +24 -0
- package/dist/callbacks/postTNTRender.d.ts +1 -0
- package/dist/callbacks/postTNTRender.lua +24 -0
- package/dist/callbacks/postTNTUpdate.d.ts +1 -0
- package/dist/callbacks/postTNTUpdate.lua +24 -0
- package/dist/callbacks/subscriptions/postDoorRender.d.ts +5 -0
- package/dist/callbacks/subscriptions/postDoorRender.lua +24 -0
- package/dist/callbacks/subscriptions/postDoorUpdate.d.ts +5 -0
- package/dist/callbacks/subscriptions/postDoorUpdate.lua +24 -0
- package/dist/callbacks/subscriptions/postGridEntityBroken.d.ts +2 -1
- package/dist/callbacks/subscriptions/postGridEntityBroken.lua +8 -2
- package/dist/callbacks/subscriptions/postGridEntityCollision.d.ts +2 -1
- package/dist/callbacks/subscriptions/postGridEntityCollision.lua +5 -0
- package/dist/callbacks/subscriptions/postGridEntityInit.d.ts +2 -1
- package/dist/callbacks/subscriptions/postGridEntityInit.lua +8 -2
- package/dist/callbacks/subscriptions/postGridEntityRemove.d.ts +2 -1
- package/dist/callbacks/subscriptions/postGridEntityRemove.lua +5 -1
- package/dist/callbacks/subscriptions/postGridEntityRender.d.ts +6 -0
- package/dist/callbacks/subscriptions/postGridEntityRender.lua +29 -0
- package/dist/callbacks/subscriptions/postGridEntityStateChanged.d.ts +2 -1
- package/dist/callbacks/subscriptions/postGridEntityStateChanged.lua +8 -2
- package/dist/callbacks/subscriptions/postGridEntityUpdate.d.ts +2 -1
- package/dist/callbacks/subscriptions/postGridEntityUpdate.lua +8 -2
- package/dist/callbacks/subscriptions/postPitRender.d.ts +5 -0
- package/dist/callbacks/subscriptions/postPitRender.lua +24 -0
- package/dist/callbacks/subscriptions/postPitUpdate.d.ts +5 -0
- package/dist/callbacks/subscriptions/postPitUpdate.lua +24 -0
- package/dist/callbacks/subscriptions/postPlayerChangeHealth.d.ts +3 -2
- package/dist/callbacks/subscriptions/postPlayerChangeHealth.lua +5 -0
- package/dist/callbacks/subscriptions/postPlayerChangeType.d.ts +3 -2
- package/dist/callbacks/subscriptions/postPlayerChangeType.lua +8 -1
- package/dist/callbacks/subscriptions/postPlayerFatalDamage.d.ts +3 -2
- package/dist/callbacks/subscriptions/postPlayerFatalDamage.lua +5 -0
- package/dist/callbacks/subscriptions/postPlayerInitLate.d.ts +3 -2
- package/dist/callbacks/subscriptions/postPlayerInitLate.lua +5 -0
- package/dist/callbacks/subscriptions/postPlayerInitReordered.d.ts +3 -2
- package/dist/callbacks/subscriptions/postPlayerInitReordered.lua +5 -0
- package/dist/callbacks/subscriptions/postPlayerRenderReordered.d.ts +3 -2
- package/dist/callbacks/subscriptions/postPlayerRenderReordered.lua +5 -0
- package/dist/callbacks/subscriptions/postPlayerUpdateReordered.d.ts +3 -2
- package/dist/callbacks/subscriptions/postPlayerUpdateReordered.lua +5 -0
- package/dist/callbacks/subscriptions/postPoopRender.d.ts +5 -0
- package/dist/callbacks/subscriptions/postPoopRender.lua +24 -0
- package/dist/callbacks/subscriptions/postPoopUpdate.d.ts +5 -0
- package/dist/callbacks/subscriptions/postPoopUpdate.lua +24 -0
- package/dist/callbacks/subscriptions/postPressurePlateRender.d.ts +5 -0
- package/dist/callbacks/subscriptions/postPressurePlateRender.lua +24 -0
- package/dist/callbacks/subscriptions/postPressurePlateUpdate.d.ts +5 -0
- package/dist/callbacks/subscriptions/postPressurePlateUpdate.lua +24 -0
- package/dist/callbacks/subscriptions/postRockRender.d.ts +5 -0
- package/dist/callbacks/subscriptions/postRockRender.lua +24 -0
- package/dist/callbacks/subscriptions/postRockUpdate.d.ts +5 -0
- package/dist/callbacks/subscriptions/postRockUpdate.lua +24 -0
- package/dist/callbacks/subscriptions/postSacrifice.d.ts +4 -2
- package/dist/callbacks/subscriptions/postSacrifice.lua +13 -1
- package/dist/callbacks/subscriptions/postSlotAnimationChanged.d.ts +1 -1
- package/dist/callbacks/subscriptions/postSlotDestroyed.d.ts +1 -1
- package/dist/callbacks/subscriptions/postSlotInit.d.ts +1 -1
- package/dist/callbacks/subscriptions/postSlotRender.d.ts +1 -1
- package/dist/callbacks/subscriptions/postSlotUpdate.d.ts +1 -1
- package/dist/callbacks/subscriptions/postSpikesRender.d.ts +5 -0
- package/dist/callbacks/subscriptions/postSpikesRender.lua +24 -0
- package/dist/callbacks/subscriptions/postSpikesUpdate.d.ts +5 -0
- package/dist/callbacks/subscriptions/postSpikesUpdate.lua +24 -0
- package/dist/callbacks/subscriptions/postTNTRender.d.ts +5 -0
- package/dist/callbacks/subscriptions/postTNTRender.lua +24 -0
- package/dist/callbacks/subscriptions/postTNTUpdate.d.ts +5 -0
- package/dist/callbacks/subscriptions/postTNTUpdate.lua +24 -0
- package/dist/callbacks/subscriptions/preBerserkDeath.d.ts +3 -2
- package/dist/callbacks/subscriptions/preBerserkDeath.lua +5 -0
- package/dist/callbacks/subscriptions/preCustomRevive.d.ts +4 -2
- package/dist/callbacks/subscriptions/preCustomRevive.lua +15 -3
- package/dist/classes/DefaultMap.d.ts +8 -8
- package/dist/classes/DefaultMap.lua +3 -3
- package/dist/constants.d.ts +3 -2
- package/dist/constants.lua +2 -2
- package/dist/constantsMax.d.ts +15 -9
- package/dist/constantsMax.lua +7 -1
- package/dist/enums/ModCallbackCustom.d.ts +69 -54
- package/dist/enums/ModCallbackCustom.lua +84 -54
- package/dist/features/debugDisplay.d.ts +7 -0
- package/dist/features/debugDisplay.lua +117 -14
- package/dist/features/deployJSONRoom.lua +2 -2
- package/dist/features/extraConsoleCommands/commands.lua +32 -27
- package/dist/features/extraConsoleCommands/commandsDisplay.d.ts +63 -0
- package/dist/features/extraConsoleCommands/commandsDisplay.lua +49 -0
- package/dist/features/extraConsoleCommands/init.d.ts +2 -2
- package/dist/features/extraConsoleCommands/init.lua +12 -1
- package/dist/features/getCollectibleItemPoolType.lua +3 -2
- package/dist/features/playerInventory.lua +1 -1
- package/dist/features/preventCollectibleRotate.lua +7 -2
- package/dist/functions/array.lua +1 -1
- package/dist/functions/boss.d.ts +2 -3
- package/dist/functions/cards.lua +3 -1
- package/dist/functions/character.lua +2 -2
- package/dist/functions/charge.d.ts +6 -6
- package/dist/functions/collectibleCacheFlag.lua +3 -1
- package/dist/functions/collectibleSet.lua +3 -1
- package/dist/functions/collectibleTag.lua +3 -1
- package/dist/functions/collectibles.d.ts +1 -0
- package/dist/functions/collectibles.lua +32 -16
- package/dist/functions/entity.d.ts +1 -1
- package/dist/functions/entitySpecific.d.ts +4 -5
- package/dist/functions/entityTypes.d.ts +5 -0
- package/dist/functions/entityTypes.lua +10 -0
- package/dist/functions/familiars.d.ts +3 -3
- package/dist/functions/gridEntity.d.ts +0 -5
- package/dist/functions/gridEntity.lua +0 -14
- package/dist/functions/gridEntitySpecific.d.ts +18 -0
- package/dist/functions/gridEntitySpecific.lua +88 -0
- package/dist/functions/log.lua +2 -3
- package/dist/functions/npc.lua +3 -1
- package/dist/functions/npcTypes.d.ts +3 -0
- package/dist/functions/npcTypes.lua +7 -0
- package/dist/functions/pickupVariants.d.ts +13 -0
- package/dist/functions/pickupVariants.lua +22 -0
- package/dist/functions/pickups.lua +3 -1
- package/dist/functions/playerIndex.d.ts +2 -2
- package/dist/functions/rooms.d.ts +2 -3
- package/dist/functions/rooms.lua +5 -3
- package/dist/functions/run.lua +3 -1
- package/dist/functions/stage.d.ts +1 -1
- package/dist/functions/stage.lua +6 -5
- package/dist/functions/trinketCacheFlag.lua +3 -1
- package/dist/functions/trinketSet.lua +3 -1
- package/dist/functions/trinkets.lua +7 -3
- package/dist/index.d.ts +3 -0
- package/dist/index.lua +24 -0
- package/dist/initCustomCallbacks.lua +42 -0
- package/dist/initFeatures.lua +0 -3
- package/dist/maps/cardMap.lua +204 -202
- package/dist/maps/pillEffectMap.lua +82 -80
- package/dist/objects/callbackRegisterFunctions.lua +45 -0
- package/dist/objects/cardDescriptions.lua +1 -1
- package/dist/objects/cardNames.lua +1 -1
- package/dist/objects/cardTypes.lua +1 -1
- package/dist/types/AddCallbackParameterCustom.d.ts +30 -0
- package/dist/types/private/TSTLClassMetatable.d.ts +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local subscriptions = {}
|
|
3
|
+
function ____exports.postRockRenderHasSubscriptions(self)
|
|
4
|
+
return #subscriptions > 0
|
|
5
|
+
end
|
|
6
|
+
function ____exports.postRockRenderRegister(self, ...)
|
|
7
|
+
local args = {...}
|
|
8
|
+
subscriptions[#subscriptions + 1] = args
|
|
9
|
+
end
|
|
10
|
+
function ____exports.postRockRenderFire(self, rock)
|
|
11
|
+
local gridEntityVariant = rock:GetVariant()
|
|
12
|
+
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
+
local callback = ____value[1]
|
|
14
|
+
local callbackGridEntityVariant = ____value[2]
|
|
15
|
+
do
|
|
16
|
+
if callbackGridEntityVariant ~= nil and callbackGridEntityVariant ~= gridEntityVariant then
|
|
17
|
+
goto __continue5
|
|
18
|
+
end
|
|
19
|
+
callback(nil, rock)
|
|
20
|
+
end
|
|
21
|
+
::__continue5::
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
return ____exports
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local subscriptions = {}
|
|
3
|
+
function ____exports.postRockUpdateHasSubscriptions(self)
|
|
4
|
+
return #subscriptions > 0
|
|
5
|
+
end
|
|
6
|
+
function ____exports.postRockUpdateRegister(self, ...)
|
|
7
|
+
local args = {...}
|
|
8
|
+
subscriptions[#subscriptions + 1] = args
|
|
9
|
+
end
|
|
10
|
+
function ____exports.postRockUpdateFire(self, rock)
|
|
11
|
+
local gridEntityVariant = rock:GetVariant()
|
|
12
|
+
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
+
local callback = ____value[1]
|
|
14
|
+
local callbackGridEntityVariant = ____value[2]
|
|
15
|
+
do
|
|
16
|
+
if callbackGridEntityVariant ~= nil and callbackGridEntityVariant ~= gridEntityVariant then
|
|
17
|
+
goto __continue5
|
|
18
|
+
end
|
|
19
|
+
callback(nil, rock)
|
|
20
|
+
end
|
|
21
|
+
::__continue5::
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
return ____exports
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { PlayerType, PlayerVariant } from "isaac-typescript-definitions";
|
|
2
2
|
export declare type PostSacrificeRegisterParameters = [
|
|
3
|
-
callback: (player: EntityPlayer, numSacrifices: int) => void
|
|
3
|
+
callback: (player: EntityPlayer, numSacrifices: int) => void,
|
|
4
|
+
playerVariant?: PlayerVariant,
|
|
5
|
+
character?: PlayerType
|
|
4
6
|
];
|
|
@@ -8,9 +8,21 @@ function ____exports.postSacrificeRegister(self, ...)
|
|
|
8
8
|
subscriptions[#subscriptions + 1] = args
|
|
9
9
|
end
|
|
10
10
|
function ____exports.postSacrificeFire(self, player, numSacrifices)
|
|
11
|
+
local character = player:GetPlayerType()
|
|
11
12
|
for ____, ____value in ipairs(subscriptions) do
|
|
12
13
|
local callback = ____value[1]
|
|
13
|
-
|
|
14
|
+
local playerVariant = ____value[2]
|
|
15
|
+
local callbackCharacter = ____value[3]
|
|
16
|
+
do
|
|
17
|
+
if playerVariant ~= nil and playerVariant ~= player.Variant then
|
|
18
|
+
goto __continue5
|
|
19
|
+
end
|
|
20
|
+
if callbackCharacter ~= nil and callbackCharacter ~= character then
|
|
21
|
+
goto __continue5
|
|
22
|
+
end
|
|
23
|
+
callback(nil, player, numSacrifices)
|
|
24
|
+
end
|
|
25
|
+
::__continue5::
|
|
14
26
|
end
|
|
15
27
|
end
|
|
16
28
|
return ____exports
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SlotVariant } from "isaac-typescript-definitions";
|
|
2
2
|
export declare type PostSlotAnimationChangedRegisterParameters = [
|
|
3
|
-
callback: (slot:
|
|
3
|
+
callback: (slot: EntitySlot, previousAnimation: string, currentAnimation: string) => void,
|
|
4
4
|
slotVariant?: SlotVariant
|
|
5
5
|
];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local subscriptions = {}
|
|
3
|
+
function ____exports.postSpikesRenderHasSubscriptions(self)
|
|
4
|
+
return #subscriptions > 0
|
|
5
|
+
end
|
|
6
|
+
function ____exports.postSpikesRenderRegister(self, ...)
|
|
7
|
+
local args = {...}
|
|
8
|
+
subscriptions[#subscriptions + 1] = args
|
|
9
|
+
end
|
|
10
|
+
function ____exports.postSpikesRenderFire(self, spikes)
|
|
11
|
+
local gridEntityVariant = spikes:GetVariant()
|
|
12
|
+
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
+
local callback = ____value[1]
|
|
14
|
+
local callbackGridEntityVariant = ____value[2]
|
|
15
|
+
do
|
|
16
|
+
if callbackGridEntityVariant ~= nil and callbackGridEntityVariant ~= gridEntityVariant then
|
|
17
|
+
goto __continue5
|
|
18
|
+
end
|
|
19
|
+
callback(nil, spikes)
|
|
20
|
+
end
|
|
21
|
+
::__continue5::
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
return ____exports
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local subscriptions = {}
|
|
3
|
+
function ____exports.postSpikesUpdateHasSubscriptions(self)
|
|
4
|
+
return #subscriptions > 0
|
|
5
|
+
end
|
|
6
|
+
function ____exports.postSpikesUpdateRegister(self, ...)
|
|
7
|
+
local args = {...}
|
|
8
|
+
subscriptions[#subscriptions + 1] = args
|
|
9
|
+
end
|
|
10
|
+
function ____exports.postSpikesUpdateFire(self, spikes)
|
|
11
|
+
local gridEntityVariant = spikes:GetVariant()
|
|
12
|
+
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
+
local callback = ____value[1]
|
|
14
|
+
local callbackGridEntityVariant = ____value[2]
|
|
15
|
+
do
|
|
16
|
+
if callbackGridEntityVariant ~= nil and callbackGridEntityVariant ~= gridEntityVariant then
|
|
17
|
+
goto __continue5
|
|
18
|
+
end
|
|
19
|
+
callback(nil, spikes)
|
|
20
|
+
end
|
|
21
|
+
::__continue5::
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
return ____exports
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local subscriptions = {}
|
|
3
|
+
function ____exports.postTNTRenderHasSubscriptions(self)
|
|
4
|
+
return #subscriptions > 0
|
|
5
|
+
end
|
|
6
|
+
function ____exports.postTNTRenderRegister(self, ...)
|
|
7
|
+
local args = {...}
|
|
8
|
+
subscriptions[#subscriptions + 1] = args
|
|
9
|
+
end
|
|
10
|
+
function ____exports.postTNTRenderFire(self, tnt)
|
|
11
|
+
local gridEntityVariant = tnt:GetVariant()
|
|
12
|
+
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
+
local callback = ____value[1]
|
|
14
|
+
local callbackGridEntityVariant = ____value[2]
|
|
15
|
+
do
|
|
16
|
+
if callbackGridEntityVariant ~= nil and callbackGridEntityVariant ~= gridEntityVariant then
|
|
17
|
+
goto __continue5
|
|
18
|
+
end
|
|
19
|
+
callback(nil, tnt)
|
|
20
|
+
end
|
|
21
|
+
::__continue5::
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
return ____exports
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local subscriptions = {}
|
|
3
|
+
function ____exports.postTNTUpdateHasSubscriptions(self)
|
|
4
|
+
return #subscriptions > 0
|
|
5
|
+
end
|
|
6
|
+
function ____exports.postTNTUpdateRegister(self, ...)
|
|
7
|
+
local args = {...}
|
|
8
|
+
subscriptions[#subscriptions + 1] = args
|
|
9
|
+
end
|
|
10
|
+
function ____exports.postTNTUpdateFire(self, tnt)
|
|
11
|
+
local gridEntityVariant = tnt:GetVariant()
|
|
12
|
+
for ____, ____value in ipairs(subscriptions) do
|
|
13
|
+
local callback = ____value[1]
|
|
14
|
+
local callbackGridEntityVariant = ____value[2]
|
|
15
|
+
do
|
|
16
|
+
if callbackGridEntityVariant ~= nil and callbackGridEntityVariant ~= gridEntityVariant then
|
|
17
|
+
goto __continue5
|
|
18
|
+
end
|
|
19
|
+
callback(nil, tnt)
|
|
20
|
+
end
|
|
21
|
+
::__continue5::
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
return ____exports
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { PlayerVariant } from "isaac-typescript-definitions";
|
|
1
|
+
import { PlayerType, PlayerVariant } from "isaac-typescript-definitions";
|
|
2
2
|
export declare type PreBerserkDeathRegisterParameters = [
|
|
3
3
|
callback: (player: EntityPlayer) => boolean | void,
|
|
4
|
-
playerVariant?: PlayerVariant
|
|
4
|
+
playerVariant?: PlayerVariant,
|
|
5
|
+
character?: PlayerType
|
|
5
6
|
];
|
|
@@ -8,13 +8,18 @@ function ____exports.preBerserkDeathRegister(self, ...)
|
|
|
8
8
|
subscriptions[#subscriptions + 1] = args
|
|
9
9
|
end
|
|
10
10
|
function ____exports.preBerserkDeathFire(self, player)
|
|
11
|
+
local character = player:GetPlayerType()
|
|
11
12
|
for ____, ____value in ipairs(subscriptions) do
|
|
12
13
|
local callback = ____value[1]
|
|
13
14
|
local playerVariant = ____value[2]
|
|
15
|
+
local callbackCharacter = ____value[3]
|
|
14
16
|
do
|
|
15
17
|
if playerVariant ~= nil and playerVariant ~= player.Variant then
|
|
16
18
|
goto __continue5
|
|
17
19
|
end
|
|
20
|
+
if callbackCharacter ~= nil and callbackCharacter ~= character then
|
|
21
|
+
goto __continue5
|
|
22
|
+
end
|
|
18
23
|
callback(nil, player)
|
|
19
24
|
end
|
|
20
25
|
::__continue5::
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { PlayerType, PlayerVariant } from "isaac-typescript-definitions";
|
|
2
2
|
export declare type PreCustomReviveRegisterParameters = [
|
|
3
|
-
callback: (player: EntityPlayer) => int | void
|
|
3
|
+
callback: (player: EntityPlayer) => int | void,
|
|
4
|
+
playerVariant?: PlayerVariant,
|
|
5
|
+
character?: PlayerType
|
|
4
6
|
];
|
|
@@ -8,12 +8,24 @@ function ____exports.preCustomReviveRegister(self, ...)
|
|
|
8
8
|
subscriptions[#subscriptions + 1] = args
|
|
9
9
|
end
|
|
10
10
|
function ____exports.preCustomReviveFire(self, player)
|
|
11
|
+
local character = player:GetPlayerType()
|
|
11
12
|
for ____, ____value in ipairs(subscriptions) do
|
|
12
13
|
local callback = ____value[1]
|
|
13
|
-
local
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
local playerVariant = ____value[2]
|
|
15
|
+
local callbackCharacter = ____value[3]
|
|
16
|
+
do
|
|
17
|
+
if playerVariant ~= nil and playerVariant ~= player.Variant then
|
|
18
|
+
goto __continue5
|
|
19
|
+
end
|
|
20
|
+
if callbackCharacter ~= nil and callbackCharacter ~= character then
|
|
21
|
+
goto __continue5
|
|
22
|
+
end
|
|
23
|
+
local revivalType = callback(nil, player)
|
|
24
|
+
if revivalType ~= nil then
|
|
25
|
+
return revivalType
|
|
26
|
+
end
|
|
16
27
|
end
|
|
28
|
+
::__continue5::
|
|
17
29
|
end
|
|
18
30
|
return nil
|
|
19
31
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare type FactoryFunction<
|
|
2
|
-
declare type FirstArg<K, V, A extends unknown[]> = Iterable<[K, V]> | V | FactoryFunction<
|
|
3
|
-
declare type SecondArg<
|
|
1
|
+
declare type FactoryFunction<V, A extends unknown[]> = (...extraArgs: A) => V;
|
|
2
|
+
declare type FirstArg<K, V, A extends unknown[]> = Iterable<[K, V]> | V | FactoryFunction<V, A>;
|
|
3
|
+
declare type SecondArg<V, A extends unknown[]> = V | FactoryFunction<V, A>;
|
|
4
4
|
/**
|
|
5
5
|
* An extended Map with some new methods:
|
|
6
6
|
*
|
|
@@ -44,8 +44,8 @@ declare type SecondArg<K, V, A extends unknown[]> = V | FactoryFunction<K, V, A>
|
|
|
44
44
|
* first:
|
|
45
45
|
*
|
|
46
46
|
* ```ts
|
|
47
|
-
* const factoryFunction = (
|
|
48
|
-
* const defaultMapWithExtraArgs = new DefaultMap<string, string, [
|
|
47
|
+
* const factoryFunction = (arg: boolean) => arg ? 0 : 1;
|
|
48
|
+
* const defaultMapWithExtraArgs = new DefaultMap<string, string, [arg: boolean]>(factoryFunction);
|
|
49
49
|
* ```
|
|
50
50
|
*/
|
|
51
51
|
export declare class DefaultMap<K, V, A extends unknown[] = []> extends Map<K, V> {
|
|
@@ -55,7 +55,7 @@ export declare class DefaultMap<K, V, A extends unknown[] = []> extends Map<K, V
|
|
|
55
55
|
* See the DefaultMap documentation:
|
|
56
56
|
* https://isaacscript.github.io/isaacscript-common/classes/types_DefaultMap.DefaultMap.html
|
|
57
57
|
*/
|
|
58
|
-
constructor(iterableOrDefaultValueOrDefaultValueFactory: FirstArg<K, V, A>, defaultValueOrDefaultValueFactory?: SecondArg<
|
|
58
|
+
constructor(iterableOrDefaultValueOrDefaultValueFactory: FirstArg<K, V, A>, defaultValueOrDefaultValueFactory?: SecondArg<V, A>);
|
|
59
59
|
/**
|
|
60
60
|
* If the key exists, this will return the same thing as the `get` method. Otherwise, it will set
|
|
61
61
|
* a default value to the key, and then return the default value.
|
|
@@ -65,11 +65,11 @@ export declare class DefaultMap<K, V, A extends unknown[] = []> extends Map<K, V
|
|
|
65
65
|
* Returns the default value to be used for a new key. (If a factory function was provided during
|
|
66
66
|
* instantiation, this will execute the factory function.)
|
|
67
67
|
*/
|
|
68
|
-
getDefaultValue(
|
|
68
|
+
getDefaultValue(...extraArgs: A): V;
|
|
69
69
|
/**
|
|
70
70
|
* Helper method for cloning the map. Returns either the default value or a reference to the
|
|
71
71
|
* factory function.
|
|
72
72
|
*/
|
|
73
|
-
getConstructorArg(): V | FactoryFunction<
|
|
73
|
+
getConstructorArg(): V | FactoryFunction<V, A>;
|
|
74
74
|
}
|
|
75
75
|
export {};
|
|
@@ -59,16 +59,16 @@ function DefaultMap.prototype.getAndSetDefault(self, key, ...)
|
|
|
59
59
|
if value ~= nil then
|
|
60
60
|
return value
|
|
61
61
|
end
|
|
62
|
-
local defaultValue = self:getDefaultValue(
|
|
62
|
+
local defaultValue = self:getDefaultValue(...)
|
|
63
63
|
self:set(key, defaultValue)
|
|
64
64
|
return defaultValue
|
|
65
65
|
end
|
|
66
|
-
function DefaultMap.prototype.getDefaultValue(self,
|
|
66
|
+
function DefaultMap.prototype.getDefaultValue(self, ...)
|
|
67
67
|
if self.defaultValue ~= nil then
|
|
68
68
|
return self.defaultValue
|
|
69
69
|
end
|
|
70
70
|
if self.defaultValueFactory ~= nil then
|
|
71
|
-
return self:defaultValueFactory(
|
|
71
|
+
return self:defaultValueFactory(...)
|
|
72
72
|
end
|
|
73
73
|
return error("A DefaultMap was incorrectly instantiated.")
|
|
74
74
|
end
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ItemPoolType, LevelStage,
|
|
1
|
+
import { ItemPoolType, LevelStage, RoomType } from "isaac-typescript-definitions";
|
|
2
2
|
/**
|
|
3
3
|
* The distance of the laser when Azazel does not have any range up items yet. For more info, see
|
|
4
4
|
* the documentation for the `getAzazelBrimstoneDistance` function.
|
|
@@ -70,16 +70,17 @@ export declare const MAX_PLAYER_HEART_CONTAINERS = 18;
|
|
|
70
70
|
*/
|
|
71
71
|
export declare const MAX_PLAYER_SPEED_IN_UNITS = 9.8;
|
|
72
72
|
export declare const MAX_PLAYER_TRINKET_SLOTS: number;
|
|
73
|
+
export declare const FIRST_ROOM_TYPE = RoomType.DEFAULT;
|
|
73
74
|
export declare const MAX_ROOM_TYPE: RoomType;
|
|
74
75
|
/**
|
|
75
76
|
* The maximum speed stat that a player can have. Any additional speed beyond this will not take
|
|
76
77
|
* effect.
|
|
77
78
|
*/
|
|
78
79
|
export declare const MAX_SPEED_STAT = 2;
|
|
80
|
+
export declare const FIRST_STAGE = LevelStage.BASEMENT_1;
|
|
79
81
|
export declare const MAX_STAGE: LevelStage;
|
|
80
82
|
/** Corresponds to the maximum value for `EntityPlayer.SamsonBerserkCharge`. */
|
|
81
83
|
export declare const MAX_TAINTED_SAMSON_BERSERK_CHARGE = 100000;
|
|
82
|
-
export declare const MAX_VANILLA_CHARACTER: PlayerType;
|
|
83
84
|
export declare const NUM_DIMENSIONS: number;
|
|
84
85
|
export declare const SECOND_IN_MILLISECONDS = 1000;
|
|
85
86
|
export declare const MINUTE_IN_MILLISECONDS: number;
|
package/dist/constants.lua
CHANGED
|
@@ -3,7 +3,6 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
|
|
|
3
3
|
local Dimension = ____isaac_2Dtypescript_2Ddefinitions.Dimension
|
|
4
4
|
local ItemPoolType = ____isaac_2Dtypescript_2Ddefinitions.ItemPoolType
|
|
5
5
|
local LevelStage = ____isaac_2Dtypescript_2Ddefinitions.LevelStage
|
|
6
|
-
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
7
6
|
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
8
7
|
local TrinketSlot = ____isaac_2Dtypescript_2Ddefinitions.TrinketSlot
|
|
9
8
|
local ____enums = require("functions.enums")
|
|
@@ -29,11 +28,12 @@ ____exports.MAX_NUM_INPUTS = 4
|
|
|
29
28
|
____exports.MAX_PLAYER_HEART_CONTAINERS = 18
|
|
30
29
|
____exports.MAX_PLAYER_SPEED_IN_UNITS = 9.8
|
|
31
30
|
____exports.MAX_PLAYER_TRINKET_SLOTS = getEnumLength(nil, TrinketSlot)
|
|
31
|
+
____exports.FIRST_ROOM_TYPE = RoomType.DEFAULT
|
|
32
32
|
____exports.MAX_ROOM_TYPE = getLastEnumValue(nil, RoomType)
|
|
33
33
|
____exports.MAX_SPEED_STAT = 2
|
|
34
|
+
____exports.FIRST_STAGE = LevelStage.BASEMENT_1
|
|
34
35
|
____exports.MAX_STAGE = getLastEnumValue(nil, LevelStage)
|
|
35
36
|
____exports.MAX_TAINTED_SAMSON_BERSERK_CHARGE = 100000
|
|
36
|
-
____exports.MAX_VANILLA_CHARACTER = getLastEnumValue(nil, PlayerType)
|
|
37
37
|
____exports.NUM_DIMENSIONS = getEnumLength(nil, Dimension) - 1
|
|
38
38
|
____exports.SECOND_IN_MILLISECONDS = 1000
|
|
39
39
|
____exports.MINUTE_IN_MILLISECONDS = 60 * ____exports.SECOND_IN_MILLISECONDS
|
package/dist/constantsMax.d.ts
CHANGED
|
@@ -1,19 +1,25 @@
|
|
|
1
|
-
import { CollectibleType, PillColor, PlayerType } from "isaac-typescript-definitions";
|
|
1
|
+
import { Card, CollectibleType, PillColor, PillEffect, PlayerType, TrinketType } from "isaac-typescript-definitions";
|
|
2
|
+
export declare const FIRST_CARD = Card.FOOL;
|
|
2
3
|
export declare const NUM_CARDS: number;
|
|
3
|
-
export declare const MAX_CARD:
|
|
4
|
+
export declare const MAX_CARD: Card;
|
|
4
5
|
export declare const NUM_VANILLA_CARDS: number;
|
|
5
|
-
export declare const MAX_VANILLA_CARD:
|
|
6
|
+
export declare const MAX_VANILLA_CARD: Card;
|
|
7
|
+
export declare const FIRST_COLLECTIBLE_TYPE = CollectibleType.SAD_ONION;
|
|
6
8
|
export declare const NUM_COLLECTIBLE_TYPES: number;
|
|
7
|
-
export declare const MAX_COLLECTIBLE_TYPE:
|
|
9
|
+
export declare const MAX_COLLECTIBLE_TYPE: CollectibleType;
|
|
8
10
|
export declare const NUM_VANILLA_COLLECTIBLE_TYPES: CollectibleType;
|
|
9
11
|
export declare const MAX_VANILLA_COLLECTIBLE_TYPE: CollectibleType;
|
|
12
|
+
export declare const FIRST_PILL_EFFECT = PillEffect.BAD_GAS;
|
|
10
13
|
export declare const NUM_PILL_EFFECTS: number;
|
|
11
|
-
export declare const MAX_PILL_EFFECT:
|
|
14
|
+
export declare const MAX_PILL_EFFECT: PillEffect;
|
|
12
15
|
export declare const NUM_VANILLA_PILL_EFFECTS: number;
|
|
13
|
-
export declare const MAX_VANILLA_PILL_EFFECT:
|
|
16
|
+
export declare const MAX_VANILLA_PILL_EFFECT: PillEffect;
|
|
17
|
+
export declare const FIRST_TRINKET_TYPE = TrinketType.SWALLOWED_PENNY;
|
|
14
18
|
export declare const NUM_TRINKET_TYPES: number;
|
|
15
|
-
export declare const MAX_TRINKET_TYPE:
|
|
19
|
+
export declare const MAX_TRINKET_TYPE: TrinketType;
|
|
16
20
|
export declare const NUM_VANILLA_TRINKET_TYPES: number;
|
|
17
|
-
export declare const MAX_VANILLA_TRINKET_TYPE:
|
|
18
|
-
export declare const
|
|
21
|
+
export declare const MAX_VANILLA_TRINKET_TYPE: TrinketType;
|
|
22
|
+
export declare const FIRST_CHARACTER = PlayerType.ISAAC;
|
|
23
|
+
export declare const MAX_VANILLA_CHARACTER: PlayerType;
|
|
24
|
+
export declare const FIRST_PILL_COLOR = PillColor.BLUE_BLUE;
|
|
19
25
|
export declare const MAX_NORMAL_PILL_COLOR = PillColor.WHITE_YELLOW;
|
package/dist/constantsMax.lua
CHANGED
|
@@ -11,22 +11,28 @@ local itemConfig = ____cachedClasses.itemConfig
|
|
|
11
11
|
local ____enums = require("functions.enums")
|
|
12
12
|
local getEnumLength = ____enums.getEnumLength
|
|
13
13
|
local getLastEnumValue = ____enums.getLastEnumValue
|
|
14
|
+
____exports.FIRST_CARD = Card.FOOL
|
|
14
15
|
____exports.NUM_CARDS = itemConfig:GetCards().Size - 1
|
|
15
16
|
____exports.MAX_CARD = ____exports.NUM_CARDS
|
|
16
17
|
____exports.NUM_VANILLA_CARDS = getEnumLength(nil, Card) - 1
|
|
17
18
|
____exports.MAX_VANILLA_CARD = ____exports.NUM_VANILLA_CARDS
|
|
19
|
+
____exports.FIRST_COLLECTIBLE_TYPE = CollectibleType.SAD_ONION
|
|
18
20
|
____exports.NUM_COLLECTIBLE_TYPES = itemConfig:GetCollectibles().Size - 1
|
|
19
21
|
____exports.MAX_COLLECTIBLE_TYPE = ____exports.NUM_COLLECTIBLE_TYPES
|
|
20
22
|
____exports.NUM_VANILLA_COLLECTIBLE_TYPES = getLastEnumValue(nil, CollectibleType)
|
|
21
23
|
____exports.MAX_VANILLA_COLLECTIBLE_TYPE = ____exports.NUM_VANILLA_COLLECTIBLE_TYPES
|
|
24
|
+
____exports.FIRST_PILL_EFFECT = PillEffect.BAD_GAS
|
|
22
25
|
____exports.NUM_PILL_EFFECTS = itemConfig:GetPillEffects().Size - 1
|
|
23
26
|
____exports.MAX_PILL_EFFECT = ____exports.NUM_PILL_EFFECTS
|
|
24
27
|
____exports.NUM_VANILLA_PILL_EFFECTS = getEnumLength(nil, PillEffect)
|
|
25
28
|
____exports.MAX_VANILLA_PILL_EFFECT = ____exports.NUM_VANILLA_PILL_EFFECTS
|
|
29
|
+
____exports.FIRST_TRINKET_TYPE = TrinketType.SWALLOWED_PENNY
|
|
26
30
|
____exports.NUM_TRINKET_TYPES = itemConfig:GetTrinkets().Size - 1
|
|
27
31
|
____exports.MAX_TRINKET_TYPE = ____exports.NUM_TRINKET_TYPES
|
|
28
32
|
____exports.NUM_VANILLA_TRINKET_TYPES = getEnumLength(nil, TrinketType) - 1
|
|
29
33
|
____exports.MAX_VANILLA_TRINKET_TYPE = ____exports.NUM_VANILLA_TRINKET_TYPES
|
|
30
|
-
____exports.
|
|
34
|
+
____exports.FIRST_CHARACTER = PlayerType.ISAAC
|
|
35
|
+
____exports.MAX_VANILLA_CHARACTER = getLastEnumValue(nil, PlayerType)
|
|
36
|
+
____exports.FIRST_PILL_COLOR = PillColor.BLUE_BLUE
|
|
31
37
|
____exports.MAX_NORMAL_PILL_COLOR = PillColor.WHITE_YELLOW
|
|
32
38
|
return ____exports
|