isaacscript-common 6.6.4 → 6.7.1
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 +4 -4
- package/dist/callbacks/postCursedTeleport.lua +2 -2
- package/dist/callbacks/postCustomDoorEnter.d.ts +1 -1
- package/dist/callbacks/postCustomDoorEnter.lua +6 -6
- package/dist/callbacks/postDiceRoomActivated.lua +2 -2
- package/dist/callbacks/postFlip.lua +3 -3
- package/dist/callbacks/postGridEntity.lua +3 -3
- package/dist/callbacks/postGridEntityCollision.lua +3 -3
- package/dist/callbacks/postGridEntityRender.lua +2 -2
- package/dist/callbacks/postNewRoomEarly.lua +5 -5
- package/dist/callbacks/postPickupCollect.lua +2 -2
- package/dist/callbacks/postPitRender.lua +2 -2
- package/dist/callbacks/postPitUpdate.lua +2 -2
- package/dist/callbacks/postPlayerCollectible.lua +2 -2
- package/dist/callbacks/postPoopRender.lua +2 -2
- package/dist/callbacks/postPoopUpdate.lua +2 -2
- package/dist/callbacks/postPressurePlateRender.lua +2 -2
- package/dist/callbacks/postPressurePlateUpdate.lua +2 -2
- package/dist/callbacks/postPurchase.lua +2 -2
- package/dist/callbacks/postRockRender.lua +2 -2
- package/dist/callbacks/postRockUpdate.lua +2 -2
- package/dist/callbacks/postSlotInitUpdate.lua +2 -2
- package/dist/callbacks/postSlotRender.lua +2 -2
- package/dist/callbacks/postSpikesRender.lua +2 -2
- package/dist/callbacks/postSpikesUpdate.lua +2 -2
- package/dist/callbacks/postTNTRender.lua +2 -2
- package/dist/callbacks/postTNTUpdate.lua +2 -2
- package/dist/callbacks/preBerserkDeath.lua +2 -2
- package/dist/callbacks/preNewLevel.lua +2 -2
- package/dist/callbacks/subscriptions/postDoorRender.d.ts +2 -3
- package/dist/callbacks/subscriptions/postDoorRender.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postDoorRender.lua +3 -3
- package/dist/callbacks/subscriptions/postDoorUpdate.d.ts +2 -3
- package/dist/callbacks/subscriptions/postDoorUpdate.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postDoorUpdate.lua +3 -3
- package/dist/callbacks/subscriptions/postPitRender.d.ts +2 -3
- package/dist/callbacks/subscriptions/postPitRender.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postPitRender.lua +3 -3
- package/dist/callbacks/subscriptions/postPitUpdate.d.ts +2 -3
- package/dist/callbacks/subscriptions/postPitUpdate.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postPitUpdate.lua +3 -3
- package/dist/callbacks/subscriptions/postPoopRender.d.ts +2 -3
- package/dist/callbacks/subscriptions/postPoopRender.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postPoopRender.lua +3 -3
- package/dist/callbacks/subscriptions/postPoopUpdate.d.ts +2 -3
- package/dist/callbacks/subscriptions/postPoopUpdate.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postPoopUpdate.lua +3 -3
- package/dist/callbacks/subscriptions/postPressurePlateRender.d.ts +2 -3
- package/dist/callbacks/subscriptions/postPressurePlateRender.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postPressurePlateRender.lua +3 -3
- package/dist/callbacks/subscriptions/postPressurePlateUpdate.d.ts +2 -3
- package/dist/callbacks/subscriptions/postPressurePlateUpdate.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postPressurePlateUpdate.lua +3 -3
- package/dist/enums/private/SerializationBrand.d.ts +0 -4
- package/dist/enums/private/SerializationBrand.d.ts.map +1 -1
- package/dist/features/characterStats.lua +2 -2
- package/dist/features/collectibleItemPoolType.lua +2 -2
- package/dist/features/customGridEntity.d.ts.map +1 -1
- package/dist/features/customGridEntity.lua +5 -5
- package/dist/features/customStage/backdrop.lua +2 -2
- package/dist/features/customStage/{gridEntities.d.ts → customStageGridEntities.d.ts} +1 -1
- package/dist/features/customStage/customStageGridEntities.d.ts.map +1 -0
- package/dist/features/customStage/{gridEntities.lua → customStageGridEntities.lua} +8 -8
- package/dist/features/customStage/{util.d.ts → customStageUtils.d.ts} +1 -1
- package/dist/features/customStage/customStageUtils.d.ts.map +1 -0
- package/dist/features/customStage/{util.lua → customStageUtils.lua} +0 -0
- package/dist/features/customStage/exports.lua +4 -4
- package/dist/features/customStage/init.lua +6 -6
- package/dist/features/customStage/shadows.lua +2 -2
- package/dist/features/customStage/versusScreen.lua +4 -4
- package/dist/features/debugDisplay/v.lua +4 -4
- package/dist/features/deployJSONRoom.lua +20 -20
- package/dist/features/extraConsoleCommands/commandsSubroutines.lua +3 -3
- package/dist/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
- package/dist/features/extraConsoleCommands/listCommands.lua +14 -14
- package/dist/features/pause.lua +2 -2
- package/dist/features/persistentEntities.lua +2 -2
- package/dist/features/preventCollectibleRotation.lua +2 -2
- package/dist/features/saveDataManager/exports.d.ts.map +1 -1
- package/dist/features/sirenHelpers.lua +2 -2
- package/dist/functions/ambush.lua +5 -5
- package/dist/functions/{boss.d.ts → bosses.d.ts} +22 -4
- package/dist/functions/bosses.d.ts.map +1 -0
- package/dist/functions/{boss.lua → bosses.lua} +38 -13
- package/dist/functions/collectibleTag.lua +2 -2
- package/dist/functions/collectibles.lua +5 -5
- package/dist/functions/deepCopy.d.ts +8 -5
- package/dist/functions/deepCopy.d.ts.map +1 -1
- package/dist/functions/deepCopy.lua +142 -38
- package/dist/functions/{entity.d.ts → entities.d.ts} +21 -19
- package/dist/functions/entities.d.ts.map +1 -0
- package/dist/functions/{entity.lua → entities.lua} +25 -20
- package/dist/functions/{entitySpecific.d.ts → entitiesSpecific.d.ts} +145 -68
- package/dist/functions/entitiesSpecific.d.ts.map +1 -0
- package/dist/functions/{entitySpecific.lua → entitiesSpecific.lua} +203 -65
- package/dist/functions/familiars.lua +2 -2
- package/dist/functions/{gridEntity.d.ts → gridEntities.d.ts} +48 -17
- package/dist/functions/gridEntities.d.ts.map +1 -0
- package/dist/functions/{gridEntity.lua → gridEntities.lua} +140 -90
- package/dist/functions/gridEntitiesSpecific.d.ts +141 -0
- package/dist/functions/gridEntitiesSpecific.d.ts.map +1 -0
- package/dist/functions/gridEntitiesSpecific.lua +366 -0
- package/dist/functions/log.d.ts +1 -1
- package/dist/functions/log.lua +9 -9
- package/dist/functions/{npc.d.ts → npcs.d.ts} +24 -2
- package/dist/functions/npcs.d.ts.map +1 -0
- package/dist/functions/{npc.lua → npcs.lua} +44 -9
- package/dist/functions/pickups.d.ts +4 -119
- package/dist/functions/pickups.d.ts.map +1 -1
- package/dist/functions/pickups.lua +10 -439
- package/dist/functions/pickupsSpecific.d.ts +229 -0
- package/dist/functions/pickupsSpecific.d.ts.map +1 -0
- package/dist/functions/pickupsSpecific.lua +560 -0
- package/dist/functions/playerHealth.lua +6 -6
- package/dist/functions/{player.d.ts → players.d.ts} +1 -1
- package/dist/functions/players.d.ts.map +1 -0
- package/dist/functions/{player.lua → players.lua} +0 -0
- package/dist/functions/pocketItems.lua +2 -2
- package/dist/functions/positionVelocity.lua +6 -6
- package/dist/functions/pressurePlate.d.ts +10 -0
- package/dist/functions/pressurePlate.d.ts.map +1 -0
- package/dist/functions/pressurePlate.lua +29 -0
- package/dist/functions/revive.lua +7 -7
- package/dist/functions/rooms.lua +2 -2
- package/dist/functions/saveFile.lua +3 -3
- package/dist/functions/spawnCollectible.lua +4 -4
- package/dist/functions/{sprite.d.ts → sprites.d.ts} +1 -1
- package/dist/functions/sprites.d.ts.map +1 -0
- package/dist/functions/{sprite.lua → sprites.lua} +0 -0
- package/dist/functions/table.d.ts +1 -1
- package/dist/functions/table.lua +1 -1
- package/dist/functions/transformations.lua +2 -2
- package/dist/functions/trinketGive.lua +2 -2
- package/dist/functions/trinkets.lua +6 -6
- package/dist/functions/utils.d.ts +7 -0
- package/dist/functions/utils.d.ts.map +1 -1
- package/dist/functions/utils.lua +35 -22
- package/dist/index.d.ts +10 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.lua +26 -10
- package/dist/types/AnyGridEntity.d.ts +10 -0
- package/dist/types/AnyGridEntity.d.ts.map +1 -0
- package/dist/types/AnyGridEntity.lua +2 -0
- package/package.json +2 -2
- package/src/callbacks/customRevive.ts +2 -2
- package/src/callbacks/postCursedTeleport.ts +2 -2
- package/src/callbacks/postCustomDoorEnter.ts +3 -3
- package/src/callbacks/postDiceRoomActivated.ts +1 -1
- package/src/callbacks/postFlip.ts +1 -1
- package/src/callbacks/postGridEntity.ts +1 -1
- package/src/callbacks/postGridEntityCollision.ts +1 -1
- package/src/callbacks/postGridEntityRender.ts +1 -1
- package/src/callbacks/postNewRoomEarly.ts +9 -3
- package/src/callbacks/postPickupCollect.ts +1 -1
- package/src/callbacks/postPitRender.ts +1 -1
- package/src/callbacks/postPitUpdate.ts +1 -1
- package/src/callbacks/postPlayerCollectible.ts +2 -2
- package/src/callbacks/postPoopRender.ts +1 -1
- package/src/callbacks/postPoopUpdate.ts +1 -1
- package/src/callbacks/postPressurePlateRender.ts +1 -1
- package/src/callbacks/postPressurePlateUpdate.ts +1 -1
- package/src/callbacks/postPurchase.ts +1 -1
- package/src/callbacks/postRockRender.ts +1 -1
- package/src/callbacks/postRockUpdate.ts +1 -1
- package/src/callbacks/postSacrifice.ts +1 -1
- package/src/callbacks/postSlotInitUpdate.ts +1 -1
- package/src/callbacks/postSlotRender.ts +1 -1
- package/src/callbacks/postSpikesRender.ts +1 -1
- package/src/callbacks/postSpikesUpdate.ts +1 -1
- package/src/callbacks/postTNTRender.ts +1 -1
- package/src/callbacks/postTNTUpdate.ts +1 -1
- package/src/callbacks/preBerserkDeath.ts +1 -1
- package/src/callbacks/preNewLevel.ts +1 -1
- package/src/callbacks/subscriptions/postDoorRender.ts +7 -5
- package/src/callbacks/subscriptions/postDoorUpdate.ts +7 -5
- package/src/callbacks/subscriptions/postPitRender.ts +6 -7
- package/src/callbacks/subscriptions/postPitUpdate.ts +6 -7
- package/src/callbacks/subscriptions/postPoopRender.ts +7 -5
- package/src/callbacks/subscriptions/postPoopUpdate.ts +7 -5
- package/src/callbacks/subscriptions/postPressurePlateRender.ts +7 -5
- package/src/callbacks/subscriptions/postPressurePlateUpdate.ts +7 -5
- package/src/enums/private/SerializationBrand.ts +0 -4
- package/src/features/characterStats.ts +1 -1
- package/src/features/collectibleItemPoolType.ts +1 -1
- package/src/features/customGridEntity.ts +6 -3
- package/src/features/customStage/backdrop.ts +1 -1
- package/src/features/customStage/{gridEntities.ts → customStageGridEntities.ts} +3 -3
- package/src/features/customStage/{util.ts → customStageUtils.ts} +0 -0
- package/src/features/customStage/exports.ts +2 -2
- package/src/features/customStage/init.ts +1 -1
- package/src/features/customStage/shadows.ts +1 -1
- package/src/features/customStage/versusScreen.ts +2 -2
- package/src/features/debugDisplay/v.ts +2 -2
- package/src/features/deployJSONRoom.ts +11 -7
- package/src/features/extraConsoleCommands/commandsSubroutines.ts +2 -2
- package/src/features/extraConsoleCommands/listCommands.ts +13 -9
- package/src/features/pause.ts +1 -1
- package/src/features/persistentEntities.ts +2 -2
- package/src/features/preventCollectibleRotation.ts +1 -1
- package/src/features/saveDataManager/exports.ts +7 -4
- package/src/features/sirenHelpers.ts +1 -1
- package/src/functions/ambush.ts +2 -2
- package/src/functions/array.ts +1 -1
- package/src/functions/bitwise.ts +2 -2
- package/src/functions/{boss.ts → bosses.ts} +29 -21
- package/src/functions/collectibleTag.ts +1 -1
- package/src/functions/collectibles.ts +2 -2
- package/src/functions/deepCopy.ts +98 -19
- package/src/functions/deepCopyTests.ts +6 -4
- package/src/functions/{entity.ts → entities.ts} +23 -21
- package/src/functions/{entitySpecific.ts → entitiesSpecific.ts} +170 -99
- package/src/functions/familiars.ts +1 -1
- package/src/functions/{gridEntity.ts → gridEntities.ts} +110 -34
- package/src/functions/gridEntitiesSpecific.ts +490 -0
- package/src/functions/log.ts +6 -6
- package/src/functions/{npc.ts → npcs.ts} +42 -11
- package/src/functions/pickups.ts +8 -475
- package/src/functions/pickupsSpecific.ts +613 -0
- package/src/functions/playerHealth.ts +1 -1
- package/src/functions/{player.ts → players.ts} +0 -0
- package/src/functions/pocketItems.ts +1 -1
- package/src/functions/positionVelocity.ts +3 -3
- package/src/functions/pressurePlate.ts +29 -0
- package/src/functions/revive.ts +2 -2
- package/src/functions/rooms.ts +1 -1
- package/src/functions/saveFile.ts +1 -1
- package/src/functions/spawnCollectible.ts +2 -2
- package/src/functions/{sprite.ts → sprites.ts} +0 -0
- package/src/functions/table.ts +1 -1
- package/src/functions/transformations.ts +1 -1
- package/src/functions/trinketGive.ts +4 -4
- package/src/functions/trinkets.ts +3 -3
- package/src/functions/tstlClass.ts +1 -1
- package/src/functions/ui.ts +3 -3
- package/src/functions/utils.ts +32 -13
- package/src/index.ts +10 -8
- package/src/types/AnyGridEntity.ts +9 -0
- package/dist/features/customStage/gridEntities.d.ts.map +0 -1
- package/dist/features/customStage/util.d.ts.map +0 -1
- package/dist/functions/boss.d.ts.map +0 -1
- package/dist/functions/entity.d.ts.map +0 -1
- package/dist/functions/entitySpecific.d.ts.map +0 -1
- package/dist/functions/gridEntity.d.ts.map +0 -1
- package/dist/functions/gridEntitySpecific.d.ts +0 -29
- package/dist/functions/gridEntitySpecific.d.ts.map +0 -1
- package/dist/functions/gridEntitySpecific.lua +0 -114
- package/dist/functions/npc.d.ts.map +0 -1
- package/dist/functions/player.d.ts.map +0 -1
- package/dist/functions/sprite.d.ts.map +0 -1
- package/src/functions/gridEntitySpecific.ts +0 -143
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { ModCallback } from "isaac-typescript-definitions";
|
|
5
5
|
import { saveDataManager } from "../features/saveDataManager/exports";
|
|
6
|
-
import { getClosestPlayer } from "../functions/
|
|
6
|
+
import { getClosestPlayer } from "../functions/players";
|
|
7
7
|
import {
|
|
8
8
|
postPickupCollectFire,
|
|
9
9
|
postPickupCollectHasSubscriptions,
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
import { CollectibleType, ModCallback } from "isaac-typescript-definitions";
|
|
6
6
|
import { DefaultMap } from "../classes/DefaultMap";
|
|
7
7
|
import { saveDataManager } from "../features/saveDataManager/exports";
|
|
8
|
-
import { getPlayerCollectibleMap } from "../functions/player";
|
|
9
8
|
import {
|
|
10
9
|
defaultMapGetPlayer,
|
|
11
10
|
mapGetPlayer,
|
|
12
11
|
mapSetPlayer,
|
|
13
12
|
} from "../functions/playerDataStructures";
|
|
13
|
+
import { getPlayerCollectibleMap } from "../functions/players";
|
|
14
14
|
import { repeat } from "../functions/utils";
|
|
15
15
|
import { PlayerIndex } from "../types/PlayerIndex";
|
|
16
16
|
import {
|
|
@@ -102,7 +102,7 @@ function collectibleCountChanged(
|
|
|
102
102
|
} else {
|
|
103
103
|
postPlayerCollectibleRemovedFire(player, collectibleType);
|
|
104
104
|
}
|
|
105
|
-
numFired
|
|
105
|
+
numFired++;
|
|
106
106
|
});
|
|
107
107
|
|
|
108
108
|
if (numFired === numCollectiblesChanged) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModCallback } from "isaac-typescript-definitions";
|
|
2
|
-
import { getPressurePlates } from "../functions/
|
|
2
|
+
import { getPressurePlates } from "../functions/gridEntitiesSpecific";
|
|
3
3
|
import {
|
|
4
4
|
postPressurePlateRenderFire,
|
|
5
5
|
postPressurePlateRenderHasSubscriptions,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModCallback } from "isaac-typescript-definitions";
|
|
2
|
-
import { getPressurePlates } from "../functions/
|
|
2
|
+
import { getPressurePlates } from "../functions/gridEntitiesSpecific";
|
|
3
3
|
import {
|
|
4
4
|
postPressurePlateUpdateFire,
|
|
5
5
|
postPressurePlateUpdateHasSubscriptions,
|
|
@@ -2,7 +2,7 @@ import { DefaultMap } from "../classes/DefaultMap";
|
|
|
2
2
|
import { ModUpgraded } from "../classes/ModUpgraded";
|
|
3
3
|
import { ModCallbackCustom } from "../enums/ModCallbackCustom";
|
|
4
4
|
import { saveDataManager } from "../features/saveDataManager/exports";
|
|
5
|
-
import { getPickups } from "../functions/
|
|
5
|
+
import { getPickups } from "../functions/entitiesSpecific";
|
|
6
6
|
import {
|
|
7
7
|
defaultMapGetPlayer,
|
|
8
8
|
mapSetPlayer,
|
|
@@ -56,7 +56,7 @@ function entityTakeDmgPlayer(
|
|
|
56
56
|
const isSpikeDamage = hasFlag(damageFlags, DamageFlag.SPIKES);
|
|
57
57
|
|
|
58
58
|
if (roomType === RoomType.SACRIFICE && isSpikeDamage) {
|
|
59
|
-
v.level.numSacrifices
|
|
59
|
+
v.level.numSacrifices++;
|
|
60
60
|
postSacrificeFire(player, v.level.numSacrifices);
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -5,7 +5,7 @@ import { ModCallback } from "isaac-typescript-definitions";
|
|
|
5
5
|
import { ModUpgraded } from "../classes/ModUpgraded";
|
|
6
6
|
import { ModCallbackCustom } from "../enums/ModCallbackCustom";
|
|
7
7
|
import { saveDataManager } from "../features/saveDataManager/exports";
|
|
8
|
-
import { getSlots } from "../functions/
|
|
8
|
+
import { getSlots } from "../functions/entitiesSpecific";
|
|
9
9
|
import {
|
|
10
10
|
postSlotInitFire,
|
|
11
11
|
postSlotInitHasSubscriptions,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { ModCallback } from "isaac-typescript-definitions";
|
|
6
6
|
import { DefaultMap } from "../classes/DefaultMap";
|
|
7
7
|
import { saveDataManager } from "../features/saveDataManager/exports";
|
|
8
|
-
import { getSlots } from "../functions/
|
|
8
|
+
import { getSlots } from "../functions/entitiesSpecific";
|
|
9
9
|
import {
|
|
10
10
|
postSlotAnimationChangedFire,
|
|
11
11
|
postSlotAnimationChangedHasSubscriptions,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CollectibleType } from "isaac-typescript-definitions";
|
|
2
2
|
import { ModUpgraded } from "../classes/ModUpgraded";
|
|
3
3
|
import { ModCallbackCustom } from "../enums/ModCallbackCustom";
|
|
4
|
-
import { getPlayerNumHitsRemaining } from "../functions/player";
|
|
5
4
|
import { isChildPlayer } from "../functions/playerIndex";
|
|
5
|
+
import { getPlayerNumHitsRemaining } from "../functions/players";
|
|
6
6
|
import { willPlayerRevive } from "../functions/revive";
|
|
7
7
|
import {
|
|
8
8
|
preBerserkDeathFire,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModCallback } from "isaac-typescript-definitions";
|
|
2
|
-
import { getLastFrameOfAnimation } from "../functions/
|
|
2
|
+
import { getLastFrameOfAnimation } from "../functions/sprites";
|
|
3
3
|
import { getEffectiveStage } from "../functions/stage";
|
|
4
4
|
import {
|
|
5
5
|
preNewLevelFire,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { DoorVariant } from "isaac-typescript-definitions";
|
|
2
|
+
|
|
1
3
|
export type PostDoorRenderRegisterParameters = [
|
|
2
4
|
callback: (door: GridEntityDoor) => void,
|
|
3
|
-
|
|
5
|
+
doorVariant?: DoorVariant,
|
|
4
6
|
];
|
|
5
7
|
|
|
6
8
|
const subscriptions: PostDoorRenderRegisterParameters[] = [];
|
|
@@ -19,13 +21,13 @@ export function postDoorRenderRegister(
|
|
|
19
21
|
|
|
20
22
|
/** @internal */
|
|
21
23
|
export function postDoorRenderFire(door: GridEntityDoor): void {
|
|
22
|
-
const
|
|
24
|
+
const doorVariant = door.GetVariant();
|
|
23
25
|
|
|
24
|
-
for (const [callback,
|
|
26
|
+
for (const [callback, callbackDoorVariant] of subscriptions) {
|
|
25
27
|
// Handle the optional 2nd callback argument.
|
|
26
28
|
if (
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
callbackDoorVariant !== undefined &&
|
|
30
|
+
callbackDoorVariant !== doorVariant
|
|
29
31
|
) {
|
|
30
32
|
continue;
|
|
31
33
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { DoorVariant } from "isaac-typescript-definitions";
|
|
2
|
+
|
|
1
3
|
export type PostDoorUpdateRegisterParameters = [
|
|
2
4
|
callback: (door: GridEntityDoor) => void,
|
|
3
|
-
|
|
5
|
+
doorVariant?: DoorVariant,
|
|
4
6
|
];
|
|
5
7
|
|
|
6
8
|
const subscriptions: PostDoorUpdateRegisterParameters[] = [];
|
|
@@ -19,13 +21,13 @@ export function postDoorUpdateRegister(
|
|
|
19
21
|
|
|
20
22
|
/** @internal */
|
|
21
23
|
export function postDoorUpdateFire(door: GridEntityDoor): void {
|
|
22
|
-
const
|
|
24
|
+
const doorVariant = door.GetVariant();
|
|
23
25
|
|
|
24
|
-
for (const [callback,
|
|
26
|
+
for (const [callback, callbackDoorVariant] of subscriptions) {
|
|
25
27
|
// Handle the optional 2nd callback argument.
|
|
26
28
|
if (
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
callbackDoorVariant !== undefined &&
|
|
30
|
+
callbackDoorVariant !== doorVariant
|
|
29
31
|
) {
|
|
30
32
|
continue;
|
|
31
33
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { PitVariant } from "isaac-typescript-definitions";
|
|
2
|
+
|
|
1
3
|
export type PostPitRenderRegisterParameters = [
|
|
2
4
|
callback: (pit: GridEntityPit) => void,
|
|
3
|
-
|
|
5
|
+
pitVariant?: PitVariant,
|
|
4
6
|
];
|
|
5
7
|
|
|
6
8
|
const subscriptions: PostPitRenderRegisterParameters[] = [];
|
|
@@ -19,14 +21,11 @@ export function postPitRenderRegister(
|
|
|
19
21
|
|
|
20
22
|
/** @internal */
|
|
21
23
|
export function postPitRenderFire(pit: GridEntityPit): void {
|
|
22
|
-
const
|
|
24
|
+
const pitVariant = pit.GetVariant();
|
|
23
25
|
|
|
24
|
-
for (const [callback,
|
|
26
|
+
for (const [callback, callbackPitVariant] of subscriptions) {
|
|
25
27
|
// Handle the optional 2nd callback argument.
|
|
26
|
-
if (
|
|
27
|
-
callbackGridEntityVariant !== undefined &&
|
|
28
|
-
callbackGridEntityVariant !== gridEntityVariant
|
|
29
|
-
) {
|
|
28
|
+
if (callbackPitVariant !== undefined && callbackPitVariant !== pitVariant) {
|
|
30
29
|
continue;
|
|
31
30
|
}
|
|
32
31
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { PitVariant } from "isaac-typescript-definitions";
|
|
2
|
+
|
|
1
3
|
export type PostPitUpdateRegisterParameters = [
|
|
2
4
|
callback: (pit: GridEntityPit) => void,
|
|
3
|
-
|
|
5
|
+
pitVariant?: PitVariant,
|
|
4
6
|
];
|
|
5
7
|
|
|
6
8
|
const subscriptions: PostPitUpdateRegisterParameters[] = [];
|
|
@@ -19,14 +21,11 @@ export function postPitUpdateRegister(
|
|
|
19
21
|
|
|
20
22
|
/** @internal */
|
|
21
23
|
export function postPitUpdateFire(pit: GridEntityPit): void {
|
|
22
|
-
const
|
|
24
|
+
const pitVariant = pit.GetVariant();
|
|
23
25
|
|
|
24
|
-
for (const [callback,
|
|
26
|
+
for (const [callback, callbackPitVariant] of subscriptions) {
|
|
25
27
|
// Handle the optional 2nd callback argument.
|
|
26
|
-
if (
|
|
27
|
-
callbackGridEntityVariant !== undefined &&
|
|
28
|
-
callbackGridEntityVariant !== gridEntityVariant
|
|
29
|
-
) {
|
|
28
|
+
if (callbackPitVariant !== undefined && callbackPitVariant !== pitVariant) {
|
|
30
29
|
continue;
|
|
31
30
|
}
|
|
32
31
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { PoopGridEntityVariant } from "isaac-typescript-definitions";
|
|
2
|
+
|
|
1
3
|
export type PostPoopRenderRegisterParameters = [
|
|
2
4
|
callback: (poop: GridEntityPoop) => void,
|
|
3
|
-
|
|
5
|
+
poopVariant?: PoopGridEntityVariant,
|
|
4
6
|
];
|
|
5
7
|
|
|
6
8
|
const subscriptions: PostPoopRenderRegisterParameters[] = [];
|
|
@@ -19,13 +21,13 @@ export function postPoopRenderRegister(
|
|
|
19
21
|
|
|
20
22
|
/** @internal */
|
|
21
23
|
export function postPoopRenderFire(poop: GridEntityPoop): void {
|
|
22
|
-
const
|
|
24
|
+
const poopVariant = poop.GetVariant();
|
|
23
25
|
|
|
24
|
-
for (const [callback,
|
|
26
|
+
for (const [callback, callbackPoopVariant] of subscriptions) {
|
|
25
27
|
// Handle the optional 2nd callback argument.
|
|
26
28
|
if (
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
callbackPoopVariant !== undefined &&
|
|
30
|
+
callbackPoopVariant !== poopVariant
|
|
29
31
|
) {
|
|
30
32
|
continue;
|
|
31
33
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { PoopGridEntityVariant } from "isaac-typescript-definitions";
|
|
2
|
+
|
|
1
3
|
export type PostPoopUpdateRegisterParameters = [
|
|
2
4
|
callback: (poop: GridEntityPoop) => void,
|
|
3
|
-
|
|
5
|
+
poopVariant?: PoopGridEntityVariant,
|
|
4
6
|
];
|
|
5
7
|
|
|
6
8
|
const subscriptions: PostPoopUpdateRegisterParameters[] = [];
|
|
@@ -19,13 +21,13 @@ export function postPoopUpdateRegister(
|
|
|
19
21
|
|
|
20
22
|
/** @internal */
|
|
21
23
|
export function postPoopUpdateFire(poop: GridEntityPoop): void {
|
|
22
|
-
const
|
|
24
|
+
const poopVariant = poop.GetVariant();
|
|
23
25
|
|
|
24
|
-
for (const [callback,
|
|
26
|
+
for (const [callback, callbackPoopVariant] of subscriptions) {
|
|
25
27
|
// Handle the optional 2nd callback argument.
|
|
26
28
|
if (
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
callbackPoopVariant !== undefined &&
|
|
30
|
+
callbackPoopVariant !== poopVariant
|
|
29
31
|
) {
|
|
30
32
|
continue;
|
|
31
33
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { PressurePlateVariant } from "isaac-typescript-definitions";
|
|
2
|
+
|
|
1
3
|
export type PostPressurePlateRenderRegisterParameters = [
|
|
2
4
|
callback: (pressurePlate: GridEntityPressurePlate) => void,
|
|
3
|
-
|
|
5
|
+
pressurePlateVariant?: PressurePlateVariant,
|
|
4
6
|
];
|
|
5
7
|
|
|
6
8
|
const subscriptions: PostPressurePlateRenderRegisterParameters[] = [];
|
|
@@ -21,13 +23,13 @@ export function postPressurePlateRenderRegister(
|
|
|
21
23
|
export function postPressurePlateRenderFire(
|
|
22
24
|
pressurePlate: GridEntityPressurePlate,
|
|
23
25
|
): void {
|
|
24
|
-
const
|
|
26
|
+
const pressurePlateVariant = pressurePlate.GetVariant();
|
|
25
27
|
|
|
26
|
-
for (const [callback,
|
|
28
|
+
for (const [callback, callbackPressurePlateVariant] of subscriptions) {
|
|
27
29
|
// Handle the optional 2nd callback argument.
|
|
28
30
|
if (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
callbackPressurePlateVariant !== undefined &&
|
|
32
|
+
callbackPressurePlateVariant !== pressurePlateVariant
|
|
31
33
|
) {
|
|
32
34
|
continue;
|
|
33
35
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { PressurePlateVariant } from "isaac-typescript-definitions";
|
|
2
|
+
|
|
1
3
|
export type PostPressurePlateUpdateRegisterParameters = [
|
|
2
4
|
callback: (pressurePlate: GridEntityPressurePlate) => void,
|
|
3
|
-
|
|
5
|
+
pressurePlateVariant?: PressurePlateVariant,
|
|
4
6
|
];
|
|
5
7
|
|
|
6
8
|
const subscriptions: PostPressurePlateUpdateRegisterParameters[] = [];
|
|
@@ -21,13 +23,13 @@ export function postPressurePlateUpdateRegister(
|
|
|
21
23
|
export function postPressurePlateUpdateFire(
|
|
22
24
|
pressurePlate: GridEntityPressurePlate,
|
|
23
25
|
): void {
|
|
24
|
-
const
|
|
26
|
+
const pressurePlateVariant = pressurePlate.GetVariant();
|
|
25
27
|
|
|
26
|
-
for (const [callback,
|
|
28
|
+
for (const [callback, callbackPressurePlateVariant] of subscriptions) {
|
|
27
29
|
// Handle the optional 2nd callback argument.
|
|
28
30
|
if (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
callbackPressurePlateVariant !== undefined &&
|
|
32
|
+
callbackPressurePlateVariant !== pressurePlateVariant
|
|
31
33
|
) {
|
|
32
34
|
continue;
|
|
33
35
|
}
|
|
@@ -20,10 +20,6 @@ export enum SerializationBrand {
|
|
|
20
20
|
/**
|
|
21
21
|
* This is set to the value that represents the default value (instead of an empty string like the
|
|
22
22
|
* other brands are).
|
|
23
|
-
*
|
|
24
|
-
* Default maps that use a factory function are unserializable, but do not throw runtime errors
|
|
25
|
-
* because the merge function can derive the factory function from the already-instantiated
|
|
26
|
-
* object.
|
|
27
23
|
*/
|
|
28
24
|
DEFAULT_MAP_VALUE = "__TSTL_DEFAULT_MAP_VALUE",
|
|
29
25
|
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "isaac-typescript-definitions";
|
|
12
12
|
import { errorIfFeaturesNotInitialized } from "../featuresInitialized";
|
|
13
13
|
import { getDefaultPlayerStat } from "../functions/cacheFlag";
|
|
14
|
-
import { addStat } from "../functions/
|
|
14
|
+
import { addStat } from "../functions/players";
|
|
15
15
|
|
|
16
16
|
const FEATURE_NAME = "characterStats";
|
|
17
17
|
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "isaac-typescript-definitions";
|
|
10
10
|
import { game } from "../cachedClasses";
|
|
11
11
|
import { errorIfFeaturesNotInitialized } from "../featuresInitialized";
|
|
12
|
-
import { getEntityID } from "../functions/
|
|
12
|
+
import { getEntityID } from "../functions/entities";
|
|
13
13
|
import { isCollectible } from "../functions/pickupVariants";
|
|
14
14
|
import { getRoomItemPoolType } from "../functions/rooms";
|
|
15
15
|
import { saveDataManager } from "./saveDataManager/exports";
|
|
@@ -8,7 +8,10 @@ import { ModUpgraded } from "../classes/ModUpgraded";
|
|
|
8
8
|
import { DecorationVariant } from "../enums/DecorationVariant";
|
|
9
9
|
import { ModCallbackCustom } from "../enums/ModCallbackCustom";
|
|
10
10
|
import { errorIfFeaturesNotInitialized } from "../featuresInitialized";
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
removeGridEntity,
|
|
13
|
+
spawnGridEntityWithVariant,
|
|
14
|
+
} from "../functions/gridEntities";
|
|
12
15
|
import { getRoomListIndex } from "../functions/roomData";
|
|
13
16
|
import { isVector } from "../functions/vector";
|
|
14
17
|
import { CustomGridEntityData } from "../interfaces/CustomGridEntityData";
|
|
@@ -105,7 +108,7 @@ export function spawnCustomGrid(
|
|
|
105
108
|
(DecorationVariant.CUSTOM_GRID_ENTITY as int);
|
|
106
109
|
const decoration = isExistingDecoration
|
|
107
110
|
? existingGridEntity
|
|
108
|
-
:
|
|
111
|
+
: spawnGridEntityWithVariant(
|
|
109
112
|
GridEntityType.DECORATION,
|
|
110
113
|
DecorationVariant.CUSTOM_GRID_ENTITY,
|
|
111
114
|
gridIndexOrPosition,
|
|
@@ -186,7 +189,7 @@ export function removeCustomGrid(
|
|
|
186
189
|
}
|
|
187
190
|
|
|
188
191
|
roomCustomGridEntities.delete(gridIndex);
|
|
189
|
-
|
|
192
|
+
removeGridEntity(decoration, updateRoom);
|
|
190
193
|
|
|
191
194
|
return decoration;
|
|
192
195
|
}
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import { game } from "../../cachedClasses";
|
|
12
12
|
import { VectorZero } from "../../constants";
|
|
13
13
|
import { getRandomArrayElement } from "../../functions/array";
|
|
14
|
-
import { spawnEffectWithSeed } from "../../functions/
|
|
14
|
+
import { spawnEffectWithSeed } from "../../functions/entitiesSpecific";
|
|
15
15
|
import { newRNG } from "../../functions/rng";
|
|
16
16
|
import { isLRoom, isNarrowRoom } from "../../functions/roomShape";
|
|
17
17
|
import { trimPrefix } from "../../functions/string";
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
TrinketType,
|
|
5
5
|
} from "isaac-typescript-definitions";
|
|
6
6
|
import { DecorationVariant } from "../../enums/DecorationVariant";
|
|
7
|
-
import { removeEntities } from "../../functions/
|
|
8
|
-
import { getNPCs } from "../../functions/
|
|
7
|
+
import { removeEntities } from "../../functions/entities";
|
|
8
|
+
import { getNPCs } from "../../functions/entitiesSpecific";
|
|
9
9
|
import {
|
|
10
10
|
getCoins,
|
|
11
11
|
getCollectibles,
|
|
12
12
|
getTrinkets,
|
|
13
|
-
} from "../../functions/
|
|
13
|
+
} from "../../functions/pickupsSpecific";
|
|
14
14
|
import { vectorEquals } from "../../functions/vector";
|
|
15
15
|
import { CustomStage } from "../../interfaces/CustomStage";
|
|
16
16
|
|
|
File without changes
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "isaac-typescript-definitions";
|
|
11
11
|
import { game } from "../../cachedClasses";
|
|
12
12
|
import { reorderedCallbacksSetStage } from "../../callbacks/reorderedCallbacks";
|
|
13
|
-
import { getEntityIDFromConstituents } from "../../functions/
|
|
13
|
+
import { getEntityIDFromConstituents } from "../../functions/entities";
|
|
14
14
|
import { log, logError } from "../../functions/log";
|
|
15
15
|
import { movePlayersToCenter } from "../../functions/playerCenter";
|
|
16
16
|
import { newRNG } from "../../functions/rng";
|
|
@@ -18,7 +18,7 @@ import { getRoomData } from "../../functions/roomData";
|
|
|
18
18
|
import { getRooms } from "../../functions/rooms";
|
|
19
19
|
import { getGotoCommand, setStage } from "../../functions/stage";
|
|
20
20
|
import { runNextRoom } from "../runNextRoom";
|
|
21
|
-
import { getRandomCustomStageRoom } from "./
|
|
21
|
+
import { getRandomCustomStageRoom } from "./customStageUtils";
|
|
22
22
|
import v, {
|
|
23
23
|
customBossPNGPaths,
|
|
24
24
|
customStageCachedRoomData,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
setCustomDoorGraphics,
|
|
22
22
|
setCustomPitGraphics,
|
|
23
23
|
setCustomRockGraphics,
|
|
24
|
-
} from "./
|
|
24
|
+
} from "./customStageGridEntities";
|
|
25
25
|
import * as metadataJSON from "./metadata.json"; // This will correspond to "metadata.lua" at run-time.
|
|
26
26
|
import { setShadows } from "./shadows";
|
|
27
27
|
import { streakTextGetShaderParams, streakTextPostRender } from "./streakText";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EffectVariant, RoomShape } from "isaac-typescript-definitions";
|
|
2
2
|
import { game } from "../../cachedClasses";
|
|
3
3
|
import { getRandomArrayElement } from "../../functions/array";
|
|
4
|
-
import { spawnEffectWithSeed } from "../../functions/
|
|
4
|
+
import { spawnEffectWithSeed } from "../../functions/entitiesSpecific";
|
|
5
5
|
import { CustomStage } from "../../interfaces/CustomStage";
|
|
6
6
|
import { ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH } from "./customStageConstants";
|
|
7
7
|
import v from "./v";
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
} from "isaac-typescript-definitions";
|
|
8
8
|
import { game, sfxManager } from "../../cachedClasses";
|
|
9
9
|
import { arrayRemove } from "../../functions/array";
|
|
10
|
-
import { getBosses } from "../../functions/
|
|
11
|
-
import { getEntityID } from "../../functions/
|
|
10
|
+
import { getBosses } from "../../functions/bosses";
|
|
11
|
+
import { getEntityID } from "../../functions/entities";
|
|
12
12
|
import { erange } from "../../functions/utils";
|
|
13
13
|
import { CustomStage } from "../../interfaces/CustomStage";
|
|
14
14
|
import { BOSS_NAME_PNG_FILE_NAMES } from "../../objects/bossNamePNGFileNames";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getEntityID } from "../../functions/
|
|
2
|
-
import { getGridEntityID } from "../../functions/
|
|
1
|
+
import { getEntityID } from "../../functions/entities";
|
|
2
|
+
import { getGridEntityID } from "../../functions/gridEntities";
|
|
3
3
|
|
|
4
4
|
let debugDisplayEnabled = false;
|
|
5
5
|
|
|
@@ -28,22 +28,22 @@ import {
|
|
|
28
28
|
removeAllMatchingEntities,
|
|
29
29
|
spawn,
|
|
30
30
|
spawnWithSeed,
|
|
31
|
-
} from "../functions/
|
|
31
|
+
} from "../functions/entities";
|
|
32
32
|
import {
|
|
33
33
|
getNPCs,
|
|
34
34
|
removeAllBombs,
|
|
35
35
|
removeAllPickups,
|
|
36
|
-
} from "../functions/
|
|
36
|
+
} from "../functions/entitiesSpecific";
|
|
37
37
|
import {
|
|
38
38
|
convertXMLGridEntityType,
|
|
39
39
|
getAllGridIndexes,
|
|
40
40
|
getGridEntities,
|
|
41
41
|
getGridEntityIDFromConstituents,
|
|
42
42
|
removeAllGridExcept,
|
|
43
|
-
|
|
43
|
+
removeGridEntity,
|
|
44
44
|
setGridEntityInvisible,
|
|
45
|
-
|
|
46
|
-
} from "../functions/
|
|
45
|
+
spawnGridEntityWithVariant,
|
|
46
|
+
} from "../functions/gridEntities";
|
|
47
47
|
import { getRandomJSONRoom } from "../functions/jsonRoom";
|
|
48
48
|
import { log } from "../functions/log";
|
|
49
49
|
import { getRandomSeed, isRNG, newRNG } from "../functions/rng";
|
|
@@ -131,7 +131,7 @@ function preUseItemWeNeedToGoDeeper(
|
|
|
131
131
|
// of the shovel to happen.)
|
|
132
132
|
const decorations = getGridEntities(GridEntityType.DECORATION);
|
|
133
133
|
for (const decoration of decorations) {
|
|
134
|
-
|
|
134
|
+
removeGridEntity(decoration, false);
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
const playerPtr = EntityPtr(player);
|
|
@@ -549,7 +549,11 @@ function spawnGridEntityForJSONRoom(
|
|
|
549
549
|
const position = gridCoordinatesToWorldPosition(x, y);
|
|
550
550
|
const gridIndex = room.GetGridIndex(position);
|
|
551
551
|
|
|
552
|
-
const gridEntity =
|
|
552
|
+
const gridEntity = spawnGridEntityWithVariant(
|
|
553
|
+
gridEntityType,
|
|
554
|
+
variant,
|
|
555
|
+
gridIndex,
|
|
556
|
+
);
|
|
553
557
|
if (gridEntity === undefined) {
|
|
554
558
|
return gridEntity;
|
|
555
559
|
}
|