isaacscript-common 1.0.498 → 1.0.502
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/customRevive.lua +9 -5
- package/dist/callbacks/itemPickup.lua +9 -5
- package/dist/callbacks/postBombInitLate.lua +8 -20
- package/dist/callbacks/postCursedTeleport.lua +5 -3
- package/dist/callbacks/postEffectInitLate.lua +8 -20
- package/dist/callbacks/postEsauJr.lua +9 -5
- package/dist/callbacks/postFamiliarInitLate.lua +6 -18
- package/dist/callbacks/postFlip.lua +9 -5
- package/dist/callbacks/postGridEntity.lua +13 -7
- package/dist/callbacks/postKnifeInitLate.lua +8 -20
- package/dist/callbacks/postLaserInitLate.lua +8 -20
- package/dist/callbacks/postNPCInitLate.lua +8 -20
- package/dist/callbacks/postNewRoomEarly.d.ts +2 -0
- package/dist/callbacks/postNewRoomEarly.lua +43 -0
- package/dist/callbacks/postPickupCollect.lua +5 -3
- package/dist/callbacks/postPickupInitLate.lua +8 -20
- package/dist/callbacks/postPlayerChangeHealth.lua +5 -3
- package/dist/callbacks/postPlayerChangeType.lua +5 -3
- package/dist/callbacks/postPlayerFatalDamage.lua +5 -3
- package/dist/callbacks/postPlayerInitLate.lua +5 -3
- package/dist/callbacks/postPlayerReordered.lua +16 -10
- package/dist/callbacks/postProjectileInitLate.lua +8 -20
- package/dist/callbacks/postPurchase.lua +11 -3
- package/dist/callbacks/postSacrifice.lua +5 -3
- package/dist/callbacks/postSlotInitUpdate.lua +9 -5
- package/dist/callbacks/postSlotRenderBroken.lua +9 -5
- package/dist/callbacks/postTearInitLate.lua +8 -20
- package/dist/callbacks/postTransformation.lua +5 -3
- package/dist/callbacks/reorderedCallbacks.lua +18 -12
- package/dist/callbacks/subscriptions/postBombInitLate.d.ts +3 -3
- package/dist/callbacks/subscriptions/postBombInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postCursedTeleport.d.ts +3 -3
- package/dist/callbacks/subscriptions/postCursedTeleport.lua +3 -3
- package/dist/callbacks/subscriptions/postCustomRevive.d.ts +3 -3
- package/dist/callbacks/subscriptions/postCustomRevive.lua +3 -3
- package/dist/callbacks/subscriptions/postEffectInitLate.d.ts +3 -3
- package/dist/callbacks/subscriptions/postEffectInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postEsauJr.d.ts +3 -3
- package/dist/callbacks/subscriptions/postEsauJr.lua +3 -3
- package/dist/callbacks/subscriptions/postFamiliarInitLate.d.ts +3 -3
- package/dist/callbacks/subscriptions/postFamiliarInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postFirstEsauJr.d.ts +3 -3
- package/dist/callbacks/subscriptions/postFirstEsauJr.lua +3 -3
- package/dist/callbacks/subscriptions/postFirstFlip.d.ts +3 -3
- package/dist/callbacks/subscriptions/postFirstFlip.lua +3 -3
- package/dist/callbacks/subscriptions/postFlip.d.ts +3 -3
- package/dist/callbacks/subscriptions/postFlip.lua +3 -3
- package/dist/callbacks/subscriptions/postGameStartedReordered.d.ts +3 -3
- package/dist/callbacks/subscriptions/postGameStartedReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postGridEntityInit.d.ts +3 -3
- package/dist/callbacks/subscriptions/postGridEntityInit.lua +3 -3
- package/dist/callbacks/subscriptions/postGridEntityRemove.d.ts +3 -3
- package/dist/callbacks/subscriptions/postGridEntityRemove.lua +3 -3
- package/dist/callbacks/subscriptions/postGridEntityUpdate.d.ts +3 -3
- package/dist/callbacks/subscriptions/postGridEntityUpdate.lua +3 -3
- package/dist/callbacks/subscriptions/postItemPickup.d.ts +3 -3
- package/dist/callbacks/subscriptions/postItemPickup.lua +3 -3
- package/dist/callbacks/subscriptions/postKnifeInitLate.d.ts +3 -3
- package/dist/callbacks/subscriptions/postKnifeInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postLaserInitLate.d.ts +3 -3
- package/dist/callbacks/subscriptions/postLaserInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postNPCInitLate.d.ts +3 -3
- package/dist/callbacks/subscriptions/postNPCInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postNewLevelReordered.d.ts +3 -3
- package/dist/callbacks/subscriptions/postNewLevelReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postNewRoomEarly.d.ts +4 -0
- package/dist/callbacks/subscriptions/postNewRoomEarly.lua +18 -0
- package/dist/callbacks/subscriptions/postNewRoomReordered.d.ts +3 -3
- package/dist/callbacks/subscriptions/postNewRoomReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postPickupCollect.d.ts +3 -3
- package/dist/callbacks/subscriptions/postPickupCollect.lua +3 -3
- package/dist/callbacks/subscriptions/postPickupInitLate.d.ts +3 -3
- package/dist/callbacks/subscriptions/postPickupInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerChangeHealth.d.ts +3 -3
- package/dist/callbacks/subscriptions/postPlayerChangeHealth.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerChangeType.d.ts +3 -3
- package/dist/callbacks/subscriptions/postPlayerChangeType.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerFatalDamage.d.ts +3 -3
- package/dist/callbacks/subscriptions/postPlayerFatalDamage.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerInitLate.d.ts +3 -3
- package/dist/callbacks/subscriptions/postPlayerInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerInitReordered.d.ts +3 -3
- package/dist/callbacks/subscriptions/postPlayerInitReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerRenderReordered.d.ts +3 -3
- package/dist/callbacks/subscriptions/postPlayerRenderReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerUpdateReordered.d.ts +3 -3
- package/dist/callbacks/subscriptions/postPlayerUpdateReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postProjectileInitLate.d.ts +3 -3
- package/dist/callbacks/subscriptions/postProjectileInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postPurchase.d.ts +3 -3
- package/dist/callbacks/subscriptions/postPurchase.lua +3 -3
- package/dist/callbacks/subscriptions/postSacrifice.d.ts +3 -3
- package/dist/callbacks/subscriptions/postSacrifice.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotDestroyed.d.ts +3 -3
- package/dist/callbacks/subscriptions/postSlotDestroyed.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotInit.d.ts +3 -3
- package/dist/callbacks/subscriptions/postSlotInit.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotRender.d.ts +3 -3
- package/dist/callbacks/subscriptions/postSlotRender.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotUpdate.d.ts +3 -3
- package/dist/callbacks/subscriptions/postSlotUpdate.lua +3 -3
- package/dist/callbacks/subscriptions/postTearInitLate.d.ts +3 -3
- package/dist/callbacks/subscriptions/postTearInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postTransformation.d.ts +3 -3
- package/dist/callbacks/subscriptions/postTransformation.lua +3 -3
- package/dist/callbacks/subscriptions/preCustomRevive.d.ts +3 -3
- package/dist/callbacks/subscriptions/preCustomRevive.lua +3 -3
- package/dist/callbacks/subscriptions/preItemPickup.d.ts +3 -3
- package/dist/callbacks/subscriptions/preItemPickup.lua +3 -3
- package/dist/constants.d.ts +18 -8
- package/dist/constants.lua +10 -8
- package/dist/features/deployJSONRoom.lua +16 -16
- package/dist/features/getCollectibleItemPoolType.lua +6 -28
- package/dist/features/saveDataManager/main.lua +5 -3
- package/dist/functions/collectibles.d.ts +23 -4
- package/dist/functions/collectibles.lua +22 -4
- package/dist/functions/flag.d.ts +1 -1
- package/dist/functions/gridEntity.d.ts +10 -5
- package/dist/functions/gridEntity.lua +19 -1
- package/dist/functions/input.d.ts +3 -5
- package/dist/functions/player.d.ts +5 -5
- package/dist/functions/revive.d.ts +2 -2
- package/dist/functions/rooms.d.ts +40 -20
- package/dist/functions/rooms.lua +63 -52
- package/dist/functions/sprite.d.ts +11 -0
- package/dist/functions/sprite.lua +9 -0
- package/dist/functions/util.d.ts +2 -2
- package/dist/functions/util.lua +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.lua +1 -1
- package/dist/maps/roomShapeToTopLeftWallGridIndexMap.d.ts +3 -0
- package/dist/maps/roomShapeToTopLeftWallGridIndexMap.lua +12 -0
- package/dist/types/CallbackParametersCustom.d.ts +4 -0
- package/dist/types/ModCallbacksCustom.d.ts +34 -33
- package/dist/types/ModCallbacksCustom.lua +35 -33
- package/dist/types/ModUpgraded.lua +256 -243
- package/dist/upgradeMod.d.ts +2 -2
- package/dist/upgradeMod.lua +9 -6
- package/package.json +2 -2
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
local subscriptions = {}
|
|
5
|
-
function ____exports.
|
|
5
|
+
function ____exports.postProjectileInitLateHasSubscriptions(self)
|
|
6
6
|
return #subscriptions > 0
|
|
7
7
|
end
|
|
8
|
-
function ____exports.
|
|
8
|
+
function ____exports.postProjectileInitLateRegister(self, callback, projectileVariant)
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, projectileVariant})
|
|
10
10
|
end
|
|
11
|
-
function ____exports.
|
|
11
|
+
function ____exports.postProjectileInitLateFire(self, projectile)
|
|
12
12
|
local projectileVariant
|
|
13
13
|
local callback
|
|
14
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
2
|
export declare type PostPurchaseCallbackType = (player: EntityPlayer, pickupVariant: PickupVariant | int, pickupSubType: int, pickupPrice: int) => void;
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
3
|
+
export declare function postPurchaseHasSubscriptions(): boolean;
|
|
4
|
+
export declare function postPurchaseRegister(callback: PostPurchaseCallbackType, pickupVariant?: PickupVariant | int, pickupSubType?: int): void;
|
|
5
|
+
export declare function postPurchaseFire(player: EntityPlayer, pickupVariant: PickupVariant | int, pickupSubType: int, pickupPrice: int): void;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
local subscriptions = {}
|
|
5
|
-
function ____exports.
|
|
5
|
+
function ____exports.postPurchaseHasSubscriptions(self)
|
|
6
6
|
return #subscriptions > 0
|
|
7
7
|
end
|
|
8
|
-
function ____exports.
|
|
8
|
+
function ____exports.postPurchaseRegister(self, callback, pickupVariant, pickupSubType)
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, pickupVariant, pickupSubType})
|
|
10
10
|
end
|
|
11
|
-
function ____exports.
|
|
11
|
+
function ____exports.postPurchaseFire(self, player, pickupVariant, pickupSubType, pickupPrice)
|
|
12
12
|
local callback
|
|
13
13
|
for ____, ____value in ipairs(subscriptions) do
|
|
14
14
|
callback = ____value[1]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
2
|
export declare type PostSacrificeCallbackType = (player: EntityPlayer, numSacrifices: int) => void;
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
3
|
+
export declare function postSacrificeHasSubscriptions(): boolean;
|
|
4
|
+
export declare function postSacrificeRegister(callback: PostSacrificeCallbackType): void;
|
|
5
|
+
export declare function postSacrificeFire(player: EntityPlayer, numSacrifices: int): void;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
local subscriptions = {}
|
|
5
|
-
function ____exports.
|
|
5
|
+
function ____exports.postSacrificeHasSubscriptions(self)
|
|
6
6
|
return #subscriptions > 0
|
|
7
7
|
end
|
|
8
|
-
function ____exports.
|
|
8
|
+
function ____exports.postSacrificeRegister(self, callback)
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback})
|
|
10
10
|
end
|
|
11
|
-
function ____exports.
|
|
11
|
+
function ____exports.postSacrificeFire(self, player, numSacrifices)
|
|
12
12
|
local callback
|
|
13
13
|
for ____, ____value in ipairs(subscriptions) do
|
|
14
14
|
callback = ____value[1]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
2
|
export declare type PostSlotDestroyedCallbackType = (slot: Entity) => void;
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
3
|
+
export declare function postSlotDestroyedHasSubscriptions(): boolean;
|
|
4
|
+
export declare function postSlotDestroyedRegister(callback: PostSlotDestroyedCallbackType, slotVariant?: SlotVariant): void;
|
|
5
|
+
export declare function postSlotDestroyedFire(slot: Entity): void;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
local subscriptions = {}
|
|
5
|
-
function ____exports.
|
|
5
|
+
function ____exports.postSlotDestroyedHasSubscriptions(self)
|
|
6
6
|
return #subscriptions > 0
|
|
7
7
|
end
|
|
8
|
-
function ____exports.
|
|
8
|
+
function ____exports.postSlotDestroyedRegister(self, callback, slotVariant)
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, slotVariant})
|
|
10
10
|
end
|
|
11
|
-
function ____exports.
|
|
11
|
+
function ____exports.postSlotDestroyedFire(self, slot)
|
|
12
12
|
local slotVariant
|
|
13
13
|
local callback
|
|
14
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
2
|
export declare type PostSlotInitCallbackType = (slot: Entity) => void;
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
3
|
+
export declare function postSlotInitHasSubscriptions(): boolean;
|
|
4
|
+
export declare function postSlotInitRegister(callback: PostSlotInitCallbackType, slotVariant?: SlotVariant): void;
|
|
5
|
+
export declare function postSlotInitFire(slot: Entity): void;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
local subscriptions = {}
|
|
5
|
-
function ____exports.
|
|
5
|
+
function ____exports.postSlotInitHasSubscriptions(self)
|
|
6
6
|
return #subscriptions > 0
|
|
7
7
|
end
|
|
8
|
-
function ____exports.
|
|
8
|
+
function ____exports.postSlotInitRegister(self, callback, slotVariant)
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, slotVariant})
|
|
10
10
|
end
|
|
11
|
-
function ____exports.
|
|
11
|
+
function ____exports.postSlotInitFire(self, slot)
|
|
12
12
|
local slotVariant
|
|
13
13
|
local callback
|
|
14
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
2
|
export declare type PostSlotRenderCallbackType = (slot: Entity) => void;
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
3
|
+
export declare function postSlotRenderHasSubscriptions(): boolean;
|
|
4
|
+
export declare function postSlotRenderRegister(callback: PostSlotRenderCallbackType, slotVariant?: SlotVariant): void;
|
|
5
|
+
export declare function postSlotRenderFire(slot: Entity): void;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
local subscriptions = {}
|
|
5
|
-
function ____exports.
|
|
5
|
+
function ____exports.postSlotRenderHasSubscriptions(self)
|
|
6
6
|
return #subscriptions > 0
|
|
7
7
|
end
|
|
8
|
-
function ____exports.
|
|
8
|
+
function ____exports.postSlotRenderRegister(self, callback, slotVariant)
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, slotVariant})
|
|
10
10
|
end
|
|
11
|
-
function ____exports.
|
|
11
|
+
function ____exports.postSlotRenderFire(self, slot)
|
|
12
12
|
local slotVariant
|
|
13
13
|
local callback
|
|
14
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
2
|
export declare type PostSlotUpdateCallbackType = (slot: Entity) => void;
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
3
|
+
export declare function postSlotUpdateHasSubscriptions(): boolean;
|
|
4
|
+
export declare function postSlotUpdateRegister(callback: PostSlotUpdateCallbackType, slotVariant?: SlotVariant): void;
|
|
5
|
+
export declare function postSlotUpdateFire(slot: Entity): void;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
local subscriptions = {}
|
|
5
|
-
function ____exports.
|
|
5
|
+
function ____exports.postSlotUpdateHasSubscriptions(self)
|
|
6
6
|
return #subscriptions > 0
|
|
7
7
|
end
|
|
8
|
-
function ____exports.
|
|
8
|
+
function ____exports.postSlotUpdateRegister(self, callback, slotVariant)
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, slotVariant})
|
|
10
10
|
end
|
|
11
|
-
function ____exports.
|
|
11
|
+
function ____exports.postSlotUpdateFire(self, slot)
|
|
12
12
|
local slotVariant
|
|
13
13
|
local callback
|
|
14
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
2
|
export declare type PostTearInitLateCallbackType = (tear: EntityTear) => void;
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
3
|
+
export declare function postTearInitLateHasSubscriptions(): boolean;
|
|
4
|
+
export declare function postTearInitLateRegister(callback: PostTearInitLateCallbackType, tearVariant?: TearVariant | int): void;
|
|
5
|
+
export declare function postTearInitLateFire(tear: EntityTear): void;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
local subscriptions = {}
|
|
5
|
-
function ____exports.
|
|
5
|
+
function ____exports.postTearInitLateHasSubscriptions(self)
|
|
6
6
|
return #subscriptions > 0
|
|
7
7
|
end
|
|
8
|
-
function ____exports.
|
|
8
|
+
function ____exports.postTearInitLateRegister(self, callback, tearVariant)
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, tearVariant})
|
|
10
10
|
end
|
|
11
|
-
function ____exports.
|
|
11
|
+
function ____exports.postTearInitLateFire(self, tear)
|
|
12
12
|
local tearVariant
|
|
13
13
|
local callback
|
|
14
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
2
|
export declare type PostTransformationCallbackType = (player: EntityPlayer, playerForm: PlayerForm, hasForm: boolean) => void;
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
3
|
+
export declare function postTransformationHasSubscriptions(): boolean;
|
|
4
|
+
export declare function postTransformationRegister(callback: PostTransformationCallbackType, playerForm?: PlayerForm): void;
|
|
5
|
+
export declare function postTransformationFire(player: EntityPlayer, playerForm: PlayerForm, hasForm: boolean): void;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
local subscriptions = {}
|
|
5
|
-
function ____exports.
|
|
5
|
+
function ____exports.postTransformationHasSubscriptions(self)
|
|
6
6
|
return #subscriptions > 0
|
|
7
7
|
end
|
|
8
|
-
function ____exports.
|
|
8
|
+
function ____exports.postTransformationRegister(self, callback, playerForm)
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, playerForm})
|
|
10
10
|
end
|
|
11
|
-
function ____exports.
|
|
11
|
+
function ____exports.postTransformationFire(self, player, playerForm, hasForm)
|
|
12
12
|
local callbackPlayerForm
|
|
13
13
|
local callback
|
|
14
14
|
for ____, ____value in ipairs(subscriptions) do
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
2
|
export declare type PreCustomReviveCallbackType = (player: EntityPlayer) => int | void;
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
3
|
+
export declare function preCustomReviveHasSubscriptions(): boolean;
|
|
4
|
+
export declare function preCustomReviveRegister(callback: PreCustomReviveCallbackType): void;
|
|
5
|
+
export declare function preCustomReviveFire(player: EntityPlayer): int | void;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
local subscriptions = {}
|
|
5
|
-
function ____exports.
|
|
5
|
+
function ____exports.preCustomReviveHasSubscriptions(self)
|
|
6
6
|
return #subscriptions > 0
|
|
7
7
|
end
|
|
8
|
-
function ____exports.
|
|
8
|
+
function ____exports.preCustomReviveRegister(self, callback)
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback})
|
|
10
10
|
end
|
|
11
|
-
function ____exports.
|
|
11
|
+
function ____exports.preCustomReviveFire(self, player)
|
|
12
12
|
local callback
|
|
13
13
|
for ____, ____value in ipairs(subscriptions) do
|
|
14
14
|
callback = ____value[1]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
2
|
import { PickingUpItem } from "../../types/PickingUpItem";
|
|
3
3
|
export declare type PreItemPickupCallbackType = (player: EntityPlayer, pickingUpItem: PickingUpItem) => void;
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
4
|
+
export declare function preItemPickupHasSubscriptions(): boolean;
|
|
5
|
+
export declare function preItemPickupRegister(callback: PreItemPickupCallbackType, itemType?: ItemType, itemID?: int): void;
|
|
6
|
+
export declare function preItemPickupFire(player: EntityPlayer, pickingUpItem: PickingUpItem): void;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
local subscriptions = {}
|
|
5
|
-
function ____exports.
|
|
5
|
+
function ____exports.preItemPickupHasSubscriptions(self)
|
|
6
6
|
return #subscriptions > 0
|
|
7
7
|
end
|
|
8
|
-
function ____exports.
|
|
8
|
+
function ____exports.preItemPickupRegister(self, callback, itemType, itemID)
|
|
9
9
|
__TS__ArrayPush(subscriptions, {callback, itemType, itemID})
|
|
10
10
|
end
|
|
11
|
-
function ____exports.
|
|
11
|
+
function ____exports.preItemPickupFire(self, player, pickingUpItem)
|
|
12
12
|
local itemID
|
|
13
13
|
local itemType
|
|
14
14
|
local callback
|
package/dist/constants.d.ts
CHANGED
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
* For more info, see the documentation for the `getAzazelBrimstoneDistance()` function.
|
|
5
5
|
*/
|
|
6
6
|
export declare const AZAZEL_DEFAULT_BRIMSTONE_DISTANCE = 75.125;
|
|
7
|
+
/**
|
|
8
|
+
* The path to the png file for collectible items during Curse of the Blind, making them appear with
|
|
9
|
+
* a red question mark.
|
|
10
|
+
*/
|
|
11
|
+
export declare const BLIND_ITEM_PNG_PATH = "gfx/items/collectibles/questionmark.png";
|
|
7
12
|
/** Bombs explode when their frame count is equal to this value. */
|
|
8
13
|
export declare const BOMB_EXPLODE_FRAME = 45;
|
|
9
14
|
export declare const CHARACTERS_WITH_AN_ACTIVE_ITEM: Set<PlayerType>;
|
|
@@ -22,14 +27,14 @@ export declare const CHARACTERS_WITH_NO_SOUL_HEARTS: Set<PlayerType>;
|
|
|
22
27
|
* colors, you should copy them first with the `copyColor` function.
|
|
23
28
|
*/
|
|
24
29
|
export declare const COLORS: {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
Black: Color;
|
|
31
|
+
Red: Color;
|
|
32
|
+
Green: Color;
|
|
33
|
+
Blue: Color;
|
|
34
|
+
Yellow: Color;
|
|
35
|
+
Pink: Color;
|
|
36
|
+
Cyan: Color;
|
|
37
|
+
White: Color;
|
|
33
38
|
};
|
|
34
39
|
export declare const DEFAULT_ITEM_POOL_TYPE = ItemPoolType.POOL_TREASURE;
|
|
35
40
|
/** This is also the distance that a player spawns from the door that they enter a room from. */
|
|
@@ -41,6 +46,11 @@ export declare const DOOR_HITBOX_DISTANCE = 11;
|
|
|
41
46
|
* value.
|
|
42
47
|
*/
|
|
43
48
|
export declare const EGGY_STATE_FRAME_OF_FINAL_SPIDER = 45;
|
|
49
|
+
/**
|
|
50
|
+
* A non-existent or completely transparent PNG file for use in clearing sprites. For more
|
|
51
|
+
* information, see the documentation for the `clearSprite()` helper function.
|
|
52
|
+
*/
|
|
53
|
+
export declare const EMPTY_PNG_PATH = "gfx/none.png";
|
|
44
54
|
/** As of Repentance, the final stage is floor 13 (which is the Home floor). */
|
|
45
55
|
export declare const FINAL_STAGE: number;
|
|
46
56
|
/**
|
package/dist/constants.lua
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
____exports.AZAZEL_DEFAULT_BRIMSTONE_DISTANCE = 75.125
|
|
5
|
+
____exports.BLIND_ITEM_PNG_PATH = "gfx/items/collectibles/questionmark.png"
|
|
5
6
|
____exports.BOMB_EXPLODE_FRAME = 45
|
|
6
7
|
____exports.CHARACTERS_WITH_AN_ACTIVE_ITEM = __TS__New(Set, {
|
|
7
8
|
PlayerType.PLAYER_ISAAC,
|
|
@@ -34,19 +35,20 @@ ____exports.CHARACTERS_WITH_NO_SOUL_HEARTS = __TS__New(Set, {
|
|
|
34
35
|
PlayerType.PLAYER_KEEPER_B
|
|
35
36
|
})
|
|
36
37
|
____exports.COLORS = {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
Black = Color(1, 1, 1),
|
|
39
|
+
Red = Color(1, 0, 0),
|
|
40
|
+
Green = Color(0, 1, 0),
|
|
41
|
+
Blue = Color(0, 0, 1),
|
|
42
|
+
Yellow = Color(1, 1, 0),
|
|
43
|
+
Pink = Color(1, 0, 1),
|
|
44
|
+
Cyan = Color(0, 1, 1),
|
|
45
|
+
White = Color(1, 1, 1)
|
|
45
46
|
}
|
|
46
47
|
____exports.DEFAULT_ITEM_POOL_TYPE = ItemPoolType.POOL_TREASURE
|
|
47
48
|
____exports.DISTANCE_OF_GRID_TILE = 40
|
|
48
49
|
____exports.DOOR_HITBOX_DISTANCE = 11
|
|
49
50
|
____exports.EGGY_STATE_FRAME_OF_FINAL_SPIDER = 45
|
|
51
|
+
____exports.EMPTY_PNG_PATH = "gfx/none.png"
|
|
50
52
|
____exports.FINAL_STAGE = LevelStage.NUM_STAGES - 1
|
|
51
53
|
____exports.FIRST_GLITCHED_COLLECTIBLE_TYPE = (1 << 32) - 1
|
|
52
54
|
____exports.GENESIS_ROOM_VARIANT = 1000
|
|
@@ -22,7 +22,7 @@ local getNPCs = ____npc.getNPCs
|
|
|
22
22
|
local ____random = require("functions.random")
|
|
23
23
|
local nextSeed = ____random.nextSeed
|
|
24
24
|
local ____rooms = require("functions.rooms")
|
|
25
|
-
local
|
|
25
|
+
local getRoomListIndex = ____rooms.getRoomListIndex
|
|
26
26
|
local gridToPos = ____rooms.gridToPos
|
|
27
27
|
local setRoomCleared = ____rooms.setRoomCleared
|
|
28
28
|
local setRoomUncleared = ____rooms.setRoomUncleared
|
|
@@ -31,8 +31,8 @@ local spawnCollectible = ____spawnCollectible.spawnCollectible
|
|
|
31
31
|
local ____exports = require("features.saveDataManager.exports")
|
|
32
32
|
local saveDataManager = ____exports.saveDataManager
|
|
33
33
|
function postNewRoom(self)
|
|
34
|
-
local
|
|
35
|
-
if not v.level.
|
|
34
|
+
local roomListIndex = getRoomListIndex(nil)
|
|
35
|
+
if not v.level.deployedRoomListIndexes:has(roomListIndex) then
|
|
36
36
|
return
|
|
37
37
|
end
|
|
38
38
|
setDecorationsInvisible(nil)
|
|
@@ -41,8 +41,8 @@ end
|
|
|
41
41
|
function setDecorationsInvisible(self)
|
|
42
42
|
local game = Game()
|
|
43
43
|
local room = game:GetRoom()
|
|
44
|
-
local
|
|
45
|
-
local decorationGridIndexes = v.level.decorationGridIndexes:get(
|
|
44
|
+
local roomListIndex = getRoomListIndex(nil)
|
|
45
|
+
local decorationGridIndexes = v.level.decorationGridIndexes:get(roomListIndex)
|
|
46
46
|
if decorationGridIndexes == nil then
|
|
47
47
|
return
|
|
48
48
|
end
|
|
@@ -56,8 +56,8 @@ end
|
|
|
56
56
|
function respawnPersistentEntities(self)
|
|
57
57
|
local game = Game()
|
|
58
58
|
local room = game:GetRoom()
|
|
59
|
-
local
|
|
60
|
-
local persistentEntities = v.level.persistentEntities:get(
|
|
59
|
+
local roomListIndex = getRoomListIndex(nil)
|
|
60
|
+
local persistentEntities = v.level.persistentEntities:get(roomListIndex)
|
|
61
61
|
if persistentEntities == nil then
|
|
62
62
|
return
|
|
63
63
|
end
|
|
@@ -78,8 +78,8 @@ function ____exports.emptyRoom(self, fillWithDecorations)
|
|
|
78
78
|
local msg = getUpgradeErrorMsg(nil, FEATURE_NAME)
|
|
79
79
|
error(msg)
|
|
80
80
|
end
|
|
81
|
-
local
|
|
82
|
-
v.level.
|
|
81
|
+
local roomListIndex = getRoomListIndex(nil)
|
|
82
|
+
v.level.deployedRoomListIndexes:add(roomListIndex)
|
|
83
83
|
removeAllBombs(nil)
|
|
84
84
|
removeAllPickups(nil)
|
|
85
85
|
removeAllMatchingEntities(nil, EntityType.ENTITY_SLOT)
|
|
@@ -117,11 +117,11 @@ function fillRoomWithDecorations(self)
|
|
|
117
117
|
local game = Game()
|
|
118
118
|
local room = game:GetRoom()
|
|
119
119
|
local gridSize = room:GetGridSize()
|
|
120
|
-
local
|
|
121
|
-
local decorationGridIndexes = v.level.decorationGridIndexes:get(
|
|
120
|
+
local roomListIndex = getRoomListIndex(nil)
|
|
121
|
+
local decorationGridIndexes = v.level.decorationGridIndexes:get(roomListIndex)
|
|
122
122
|
if decorationGridIndexes == nil then
|
|
123
123
|
decorationGridIndexes = {}
|
|
124
|
-
v.level.decorationGridIndexes:set(
|
|
124
|
+
v.level.decorationGridIndexes:set(roomListIndex, decorationGridIndexes)
|
|
125
125
|
end
|
|
126
126
|
do
|
|
127
127
|
local gridIndex = 0
|
|
@@ -278,12 +278,12 @@ function storePersistentEntity(self, entity)
|
|
|
278
278
|
local game = Game()
|
|
279
279
|
local room = game:GetRoom()
|
|
280
280
|
local gridIndex = room:GetGridIndex(entity.Position)
|
|
281
|
-
local
|
|
281
|
+
local roomListIndex = getRoomListIndex(nil)
|
|
282
282
|
local persistentEntity = {gridIndex = gridIndex, type = entity.Type, variant = entity.Variant, subType = entity.SubType}
|
|
283
|
-
local persistentEntities = v.level.persistentEntities:get(
|
|
283
|
+
local persistentEntities = v.level.persistentEntities:get(roomListIndex)
|
|
284
284
|
if persistentEntities == nil then
|
|
285
285
|
persistentEntities = {}
|
|
286
|
-
v.level.persistentEntities:set(
|
|
286
|
+
v.level.persistentEntities:set(roomListIndex, persistentEntities)
|
|
287
287
|
end
|
|
288
288
|
__TS__ArrayPush(persistentEntities, persistentEntity)
|
|
289
289
|
end
|
|
@@ -405,7 +405,7 @@ NPC_TYPES_TO_NOT_REMOVE = __TS__New(Set, {EntityType.ENTITY_DARK_ESAU})
|
|
|
405
405
|
PERSISTENT_ENTITY_TYPES = __TS__New(Set, {EntityType.ENTITY_WALL_HUGGER})
|
|
406
406
|
initialized = false
|
|
407
407
|
v = {level = {
|
|
408
|
-
|
|
408
|
+
deployedRoomListIndexes = __TS__New(Set),
|
|
409
409
|
persistentEntities = __TS__New(Map),
|
|
410
410
|
decorationGridIndexes = __TS__New(Map)
|
|
411
411
|
}}
|
|
@@ -1,49 +1,27 @@
|
|
|
1
1
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
|
-
local postPickupInitCollectible,
|
|
4
|
+
local postPickupInitCollectible, v
|
|
5
5
|
local ____errors = require("errors")
|
|
6
6
|
local getUpgradeErrorMsg = ____errors.getUpgradeErrorMsg
|
|
7
|
-
local ____array = require("functions.array")
|
|
8
|
-
local arrayEmpty = ____array.arrayEmpty
|
|
9
7
|
local ____rooms = require("functions.rooms")
|
|
10
|
-
local getRoomIndex = ____rooms.getRoomIndex
|
|
11
8
|
local getRoomItemPoolType = ____rooms.getRoomItemPoolType
|
|
12
|
-
local getRoomVisitedCount = ____rooms.getRoomVisitedCount
|
|
13
9
|
local ____exports = require("features.saveDataManager.exports")
|
|
14
10
|
local saveDataManager = ____exports.saveDataManager
|
|
15
11
|
function postPickupInitCollectible(self, pickup)
|
|
16
|
-
local
|
|
17
|
-
|
|
18
|
-
return
|
|
19
|
-
end
|
|
12
|
+
local game = Game()
|
|
13
|
+
local itemPool = game:GetItemPool()
|
|
20
14
|
local ptrHash = GetPtrHash(pickup)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
function preGetCollectible(self, itemPoolType, _decrease, _seed)
|
|
24
|
-
local roomIndex = getRoomIndex(nil)
|
|
25
|
-
local roomVisitedCount = getRoomVisitedCount(nil)
|
|
26
|
-
if roomIndex ~= v.run.currentRoomIndex or roomVisitedCount ~= v.run.currentRoomVisitedCount then
|
|
27
|
-
v.run.currentRoomIndex = roomIndex
|
|
28
|
-
v.run.currentRoomVisitedCount = roomVisitedCount
|
|
29
|
-
arrayEmpty(nil, v.run.collectibleQueue)
|
|
30
|
-
v.run.collectibleItemPoolTypeMap:clear()
|
|
31
|
-
end
|
|
32
|
-
__TS__ArrayPush(v.run.collectibleQueue, itemPoolType)
|
|
15
|
+
local lastItemPoolType = itemPool:GetLastPool()
|
|
16
|
+
v.run.collectibleItemPoolTypeMap:set(ptrHash, lastItemPoolType)
|
|
33
17
|
end
|
|
34
18
|
local FEATURE_NAME = "get collectible item pool type"
|
|
35
19
|
local initialized = false
|
|
36
|
-
v = {run = {
|
|
37
|
-
collectibleQueue = {},
|
|
38
|
-
collectibleItemPoolTypeMap = __TS__New(Map),
|
|
39
|
-
currentRoomIndex = nil,
|
|
40
|
-
currentRoomVisitedCount = nil
|
|
41
|
-
}}
|
|
20
|
+
v = {run = {collectibleItemPoolTypeMap = __TS__New(Map)}}
|
|
42
21
|
function ____exports.getCollectibleItemPoolTypeInit(self, mod)
|
|
43
22
|
initialized = true
|
|
44
23
|
saveDataManager(nil, "getCollectibleItemPoolType", v)
|
|
45
24
|
mod:AddCallback(ModCallbacks.MC_POST_PICKUP_INIT, postPickupInitCollectible, PickupVariant.PICKUP_COLLECTIBLE)
|
|
46
|
-
mod:AddCallback(ModCallbacks.MC_PRE_GET_COLLECTIBLE, preGetCollectible)
|
|
47
25
|
end
|
|
48
26
|
function ____exports.getCollectibleItemPoolType(self, collectible)
|
|
49
27
|
if not initialized then
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
2
|
local ____exports = {}
|
|
3
|
-
local postPlayerInit, preGameExit, postNewLevel,
|
|
3
|
+
local postPlayerInit, preGameExit, postNewLevel, postNewRoomEarly, restoreDefaultsAll, restoreDefaults, clearAndCopyAllElements, mod, loadedDataOnThisRun
|
|
4
4
|
local ____errors = require("errors")
|
|
5
5
|
local getUpgradeErrorMsg = ____errors.getUpgradeErrorMsg
|
|
6
6
|
local ____deepCopy = require("functions.deepCopy")
|
|
@@ -8,6 +8,8 @@ local deepCopy = ____deepCopy.deepCopy
|
|
|
8
8
|
local SerializationType = ____deepCopy.SerializationType
|
|
9
9
|
local ____util = require("functions.util")
|
|
10
10
|
local tableClear = ____util.tableClear
|
|
11
|
+
local ____ModCallbacksCustom = require("types.ModCallbacksCustom")
|
|
12
|
+
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
11
13
|
local ____SaveData = require("types.SaveData")
|
|
12
14
|
local SaveDataKeys = ____SaveData.SaveDataKeys
|
|
13
15
|
local ____load = require("features.saveDataManager.load")
|
|
@@ -47,7 +49,7 @@ end
|
|
|
47
49
|
function postNewLevel(self)
|
|
48
50
|
restoreDefaults(nil, SaveDataKeys.Level)
|
|
49
51
|
end
|
|
50
|
-
function
|
|
52
|
+
function postNewRoomEarly(self)
|
|
51
53
|
restoreDefaults(nil, SaveDataKeys.Room)
|
|
52
54
|
end
|
|
53
55
|
function restoreDefaultsAll(self)
|
|
@@ -94,7 +96,7 @@ function ____exports.saveDataManagerInit(self, incomingMod)
|
|
|
94
96
|
mod:AddCallback(ModCallbacks.MC_POST_PLAYER_INIT, postPlayerInit)
|
|
95
97
|
mod:AddCallback(ModCallbacks.MC_PRE_GAME_EXIT, preGameExit)
|
|
96
98
|
mod:AddCallback(ModCallbacks.MC_POST_NEW_LEVEL, postNewLevel)
|
|
97
|
-
mod:
|
|
99
|
+
mod:AddCallbackCustom(ModCallbacksCustom.MC_POST_NEW_ROOM_EARLY, postNewRoomEarly)
|
|
98
100
|
end
|
|
99
101
|
function ____exports.isSaveDataManagerInitialized(self)
|
|
100
102
|
return mod ~= nil
|
|
@@ -57,9 +57,9 @@ export declare function isGlitchedCollectible(entity: Entity): boolean;
|
|
|
57
57
|
export declare function isPassiveCollectible(collectibleType: CollectibleType | int): boolean;
|
|
58
58
|
export declare function isQuestCollectible(collectibleType: CollectibleType | int): boolean;
|
|
59
59
|
/**
|
|
60
|
-
* Helper function to
|
|
61
|
-
* upon use. Note that this will not work will modded items, as there is no way to
|
|
62
|
-
* if a modded item will disappear.
|
|
60
|
+
* Helper function to determine if a particular collectible will disappear from the player's
|
|
61
|
+
* inventory upon use. Note that this will not work will modded items, as there is no way to
|
|
62
|
+
* dynamically know if a modded item will disappear.
|
|
63
63
|
*/
|
|
64
64
|
export declare function isSingleUseCollectible(collectibleType: CollectibleType | int): boolean;
|
|
65
65
|
/**
|
|
@@ -84,7 +84,26 @@ export declare function removeCollectiblePickupDelay(collectible: EntityPickup):
|
|
|
84
84
|
*/
|
|
85
85
|
export declare function removeCollectibleFromItemTracker(collectibleType: CollectibleType | int): void;
|
|
86
86
|
export declare function setCollectibleBlind(collectible: EntityPickup): void;
|
|
87
|
-
|
|
87
|
+
/**
|
|
88
|
+
* Helper function to remove the collectible from a collectible pedestal and make it appear as if a
|
|
89
|
+
* player has already taken the item. This is accomplished by setting its sprite to an empty/missing
|
|
90
|
+
* PNG file.
|
|
91
|
+
*
|
|
92
|
+
* For more information, see the documentation for the "emptySprite" helper function.
|
|
93
|
+
*/
|
|
94
|
+
export declare function setCollectibleEmpty(collectible: EntityPickup): void;
|
|
95
|
+
/**
|
|
96
|
+
* Helper function to change the sprite of a collectible pedestal entity.
|
|
97
|
+
*
|
|
98
|
+
* For more information about removing the collectible sprite, see the documentation for the
|
|
99
|
+
* "emptySprite" helper function.
|
|
100
|
+
*
|
|
101
|
+
* @param collectible The collectible whose sprite you want to modify.
|
|
102
|
+
* @param pngPath Optional. Equal to the spritesheet path to load (e.g.
|
|
103
|
+
* "gfx/items/collectibles/collectibles_001_thesadonion.png"). If not specified, will remove the
|
|
104
|
+
* sprite, making it appear like the collectible has already been taken by the player.
|
|
105
|
+
*/
|
|
106
|
+
export declare function setCollectibleSprite(collectible: EntityPickup, pngPath?: string): void;
|
|
88
107
|
/**
|
|
89
108
|
* Helper function to change the collectible on a pedestal. Simply updating the SubType property is
|
|
90
109
|
* not sufficient because the sprite will not change.
|