isaacscript-common 6.11.2 → 6.12.0
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/postGridEntityCustomRender.d.ts +2 -0
- package/dist/callbacks/postGridEntityCustomRender.d.ts.map +1 -0
- package/dist/callbacks/postGridEntityCustomRender.lua +36 -0
- package/dist/callbacks/postGridEntityCustomUpdate.d.ts +2 -0
- package/dist/callbacks/postGridEntityCustomUpdate.d.ts.map +1 -0
- package/dist/callbacks/postGridEntityCustomUpdate.lua +36 -0
- package/dist/callbacks/postNewRoomEarly.lua +2 -2
- package/dist/callbacks/postPickupInitFirst.lua +1 -20
- package/dist/callbacks/reorderedCallbacks.d.ts +5 -5
- package/dist/callbacks/reorderedCallbacks.d.ts.map +1 -1
- package/dist/callbacks/reorderedCallbacks.lua +5 -5
- package/dist/callbacks/subscriptions/postGridEntityCustomRender.d.ts +6 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomRender.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomRender.lua +29 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomUpdate.d.ts +6 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomUpdate.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomUpdate.lua +29 -0
- package/dist/constants.d.ts +1 -5
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.lua +0 -7
- package/dist/constantsFirstLast.d.ts +5 -1
- package/dist/constantsFirstLast.d.ts.map +1 -1
- package/dist/constantsFirstLast.lua +6 -0
- package/dist/enums/ModCallbackCustom.d.ts +89 -66
- package/dist/enums/ModCallbackCustom.d.ts.map +1 -1
- package/dist/enums/ModCallbackCustom.lua +62 -58
- package/dist/features/customGridEntity.d.ts +9 -0
- package/dist/features/customGridEntity.d.ts.map +1 -1
- package/dist/features/customGridEntity.lua +20 -0
- package/dist/features/customTrapdoor/customTrapdoorConstants.d.ts +2 -2
- package/dist/features/customTrapdoor/customTrapdoorConstants.d.ts.map +1 -1
- package/dist/features/customTrapdoor/customTrapdoorConstants.lua +2 -2
- package/dist/features/customTrapdoor/init.d.ts.map +1 -1
- package/dist/features/customTrapdoor/init.lua +4 -3
- package/dist/features/customTrapdoor/touched.d.ts.map +1 -1
- package/dist/features/customTrapdoor/touched.lua +51 -33
- package/dist/features/deployJSONRoom.d.ts +2 -2
- package/dist/features/deployJSONRoom.lua +2 -2
- package/dist/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
- package/dist/features/extraConsoleCommands/listCommands.lua +4 -4
- package/dist/features/pause.d.ts +1 -1
- package/dist/features/pause.d.ts.map +1 -1
- package/dist/features/pause.lua +87 -8
- package/dist/features/persistentEntities.d.ts.map +1 -1
- package/dist/features/persistentEntities.lua +7 -7
- package/dist/features/pickupIndex.d.ts +19 -0
- package/dist/features/pickupIndex.d.ts.map +1 -0
- package/dist/features/pickupIndex.lua +197 -0
- package/dist/features/roomHistory.d.ts +24 -0
- package/dist/features/roomHistory.d.ts.map +1 -0
- package/dist/features/roomHistory.lua +89 -0
- package/dist/functions/collectibles.d.ts +26 -13
- package/dist/functions/collectibles.d.ts.map +1 -1
- package/dist/functions/collectibles.lua +26 -13
- package/dist/functions/entities.d.ts +3 -3
- package/dist/functions/entities.d.ts.map +1 -1
- package/dist/functions/entities.lua +8 -3
- package/dist/functions/gridEntities.d.ts +2 -2
- package/dist/functions/gridEntities.lua +2 -2
- package/dist/functions/isaacAPIClass.d.ts +64 -0
- package/dist/functions/isaacAPIClass.d.ts.map +1 -1
- package/dist/functions/isaacAPIClass.lua +84 -1
- package/dist/functions/pickupVariants.d.ts +2 -2
- package/dist/functions/pickupVariants.d.ts.map +1 -1
- package/dist/functions/pickupVariants.lua +2 -2
- package/dist/functions/playerCenter.lua +2 -2
- package/dist/functions/playerIndex.d.ts +0 -3
- package/dist/functions/playerIndex.d.ts.map +1 -1
- package/dist/functions/playerIndex.lua +4 -23
- package/dist/functions/roomData.d.ts +3 -2
- package/dist/functions/roomData.d.ts.map +1 -1
- package/dist/functions/roomData.lua +3 -2
- package/dist/functions/rooms.d.ts +6 -6
- package/dist/functions/rooms.lua +6 -6
- package/dist/functions/stage.d.ts +1 -0
- package/dist/functions/stage.d.ts.map +1 -1
- package/dist/functions/stage.lua +4 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.lua +23 -0
- package/dist/initCustomCallbacks.d.ts.map +1 -1
- package/dist/initCustomCallbacks.lua +6 -0
- package/dist/initFeatures.d.ts.map +1 -1
- package/dist/initFeatures.lua +6 -0
- package/dist/interfaces/AddCallbackParameterCustom.d.ts +4 -0
- package/dist/interfaces/AddCallbackParameterCustom.d.ts.map +1 -1
- package/dist/interfaces/RoomDescription.d.ts +14 -0
- package/dist/interfaces/RoomDescription.d.ts.map +1 -0
- package/dist/interfaces/RoomDescription.lua +2 -0
- package/dist/objects/callbackRegisterFunctions.d.ts.map +1 -1
- package/dist/objects/callbackRegisterFunctions.lua +6 -0
- package/dist/types/CollectibleIndex.d.ts +1 -1
- package/dist/types/PickupIndex.d.ts +17 -0
- package/dist/types/PickupIndex.d.ts.map +1 -0
- package/dist/types/PickupIndex.lua +2 -0
- package/dist/types/PlayerIndex.d.ts +1 -1
- package/dist/upgradeMod.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/callbacks/postGridEntityCustomRender.ts +44 -0
- package/src/callbacks/postGridEntityCustomUpdate.ts +44 -0
- package/src/callbacks/postNewRoomEarly.ts +2 -2
- package/src/callbacks/postPickupInitFirst.ts +1 -32
- package/src/callbacks/postPlayerReorderedCallbacks.ts +3 -3
- package/src/callbacks/reorderedCallbacks.ts +9 -8
- package/src/callbacks/subscriptions/postGridEntityCustomRender.ts +41 -0
- package/src/callbacks/subscriptions/postGridEntityCustomUpdate.ts +41 -0
- package/src/constants.ts +1 -9
- package/src/constantsFirstLast.ts +16 -0
- package/src/enums/ModCallbackCustom.ts +33 -8
- package/src/features/customGridEntity.ts +25 -0
- package/src/features/customTrapdoor/customTrapdoorConstants.ts +2 -2
- package/src/features/customTrapdoor/init.ts +7 -5
- package/src/features/customTrapdoor/touched.ts +59 -39
- package/src/features/deployJSONRoom.ts +4 -4
- package/src/features/extraConsoleCommands/listCommands.ts +5 -7
- package/src/features/pause.ts +97 -7
- package/src/features/persistentEntities.ts +9 -8
- package/src/features/pickupIndex.ts +257 -0
- package/src/features/playerInventory.ts +2 -2
- package/src/features/roomHistory.ts +113 -0
- package/src/features/saveDataManager/main.ts +2 -2
- package/src/features/taintedLazarusPlayers.ts +5 -5
- package/src/functions/collectibles.ts +26 -13
- package/src/functions/entities.ts +6 -3
- package/src/functions/gridEntities.ts +2 -2
- package/src/functions/isaacAPIClass.ts +106 -1
- package/src/functions/pickupVariants.ts +2 -2
- package/src/functions/playerCenter.ts +2 -2
- package/src/functions/playerIndex.ts +8 -21
- package/src/functions/roomData.ts +3 -2
- package/src/functions/rooms.ts +6 -6
- package/src/functions/stage.ts +10 -1
- package/src/index.ts +3 -0
- package/src/initCustomCallbacks.ts +4 -0
- package/src/initFeatures.ts +4 -0
- package/src/interfaces/AddCallbackParameterCustom.ts +4 -0
- package/src/interfaces/RoomDescription.ts +19 -0
- package/src/objects/callbackRegisterFunctions.ts +6 -0
- package/src/types/CollectibleIndex.ts +1 -1
- package/src/types/PickupIndex.ts +15 -0
- package/src/types/PlayerIndex.ts +1 -1
- package/src/upgradeMod.ts +2 -1
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "../constants";
|
|
7
7
|
import { getPlayerFamiliars } from "./familiars";
|
|
8
8
|
import { getCircleDiscretizedPoints } from "./math";
|
|
9
|
-
import {
|
|
9
|
+
import { getAllPlayers } from "./playerIndex";
|
|
10
10
|
|
|
11
11
|
const CIRCLE_RADIUS_BETWEEN_PLAYERS = 50;
|
|
12
12
|
|
|
@@ -25,7 +25,7 @@ export function movePlayersToCenter(): void {
|
|
|
25
25
|
? NEW_FLOOR_STARTING_POSITION_GREED_MODE
|
|
26
26
|
: NEW_FLOOR_STARTING_POSITION_NORMAL_MODE;
|
|
27
27
|
|
|
28
|
-
const players =
|
|
28
|
+
const players = getAllPlayers();
|
|
29
29
|
const firstPlayer = players[0];
|
|
30
30
|
if (firstPlayer === undefined) {
|
|
31
31
|
return;
|
|
@@ -72,9 +72,6 @@ export function getPlayerFromIndex(
|
|
|
72
72
|
* Instead, we use the `EntityPlayer.GetCollectibleRNG` method with an arbitrary value of Sad Onion
|
|
73
73
|
* (1). This works even if the player does not have any Sad Onions.
|
|
74
74
|
*
|
|
75
|
-
* Since the RNG value is the same for both Tainted Lazarus and Dead Tainted Lazarus, we revert to
|
|
76
|
-
* using the RNG of The Inner Eye (2) for Dead Tainted Lazarus.
|
|
77
|
-
*
|
|
78
75
|
* Note that by default, this returns the same index for both The Forgotten and The Soul. (Even
|
|
79
76
|
* though they are technically different characters, they share the same inventory and InitSeed.) If
|
|
80
77
|
* this is not desired, pass true for the `differentiateForgottenAndSoul` argument, and the RNG of
|
|
@@ -94,13 +91,13 @@ export function getPlayerIndex(
|
|
|
94
91
|
// We can safely ignore the player's character because regardless of whether the main player ends
|
|
95
92
|
// up being The Forgotten or The Soul, the collectible RNG values will be the same. The
|
|
96
93
|
// `EntityPlayer.IsSubPlayer` method can return true for Dead Tainted Lazarus during the
|
|
97
|
-
//
|
|
94
|
+
// `POST_PLAYER_INIT` callback, but since we fall back to the player in the case of
|
|
98
95
|
// "getSubPlayerParent" returning undefined, we do not need to explicitly check for this case.
|
|
99
96
|
let playerToUse = player;
|
|
100
97
|
const isSubPlayer = player.IsSubPlayer();
|
|
101
98
|
if (isSubPlayer) {
|
|
102
99
|
// The "getSubPlayerParent" function will return undefined in the situation where we are on Dead
|
|
103
|
-
// Tainted Lazarus in the
|
|
100
|
+
// Tainted Lazarus in the `POST_PLAYER_INIT` callback.
|
|
104
101
|
const playerParent = getSubPlayerParent(player as EntitySubPlayer);
|
|
105
102
|
if (playerParent !== undefined) {
|
|
106
103
|
playerToUse = playerParent;
|
|
@@ -123,23 +120,13 @@ function getPlayerIndexCollectibleType(
|
|
|
123
120
|
) {
|
|
124
121
|
const character = player.GetPlayerType();
|
|
125
122
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
? CollectibleType.SPOON_BENDER
|
|
131
|
-
: DEFAULT_COLLECTIBLE_TYPE;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// 38
|
|
135
|
-
case PlayerType.LAZARUS_2_B: {
|
|
136
|
-
return CollectibleType.INNER_EYE;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
default: {
|
|
140
|
-
return DEFAULT_COLLECTIBLE_TYPE;
|
|
141
|
-
}
|
|
123
|
+
if (character === PlayerType.THE_SOUL) {
|
|
124
|
+
return differentiateForgottenAndSoul
|
|
125
|
+
? CollectibleType.INNER_EYE
|
|
126
|
+
: DEFAULT_COLLECTIBLE_TYPE;
|
|
142
127
|
}
|
|
128
|
+
|
|
129
|
+
return DEFAULT_COLLECTIBLE_TYPE;
|
|
143
130
|
}
|
|
144
131
|
|
|
145
132
|
/**
|
|
@@ -187,9 +187,10 @@ export function getRoomVariant(roomGridIndex?: int): int {
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
/**
|
|
190
|
-
* Note that the room visited count will be inaccurate during the period before the
|
|
190
|
+
* Note that the room visited count will be inaccurate during the period before the `POST_NEW_ROOM`
|
|
191
191
|
* callback has fired (i.e. when entities are initializing and performing their first update). This
|
|
192
|
-
* is because the variable is only incremented immediately before the
|
|
192
|
+
* is because the variable is only incremented immediately before the `POST_NEW_ROOM` callback
|
|
193
|
+
* fires.
|
|
193
194
|
*
|
|
194
195
|
* @param roomGridIndex Optional. Default is the current room index.
|
|
195
196
|
*/
|
package/src/functions/rooms.ts
CHANGED
|
@@ -566,9 +566,9 @@ export function roomGridIndexToXY(roomGridIndex: int): [x: int, y: int] {
|
|
|
566
566
|
}
|
|
567
567
|
|
|
568
568
|
/**
|
|
569
|
-
* If the `Room.Update` method is called in a
|
|
570
|
-
* around (such as the player). Since those entity velocities are already at zero, setting
|
|
571
|
-
* zero will have no effect. Thus, a generic solution is to record all of the entity
|
|
569
|
+
* If the `Room.Update` method is called in a `POST_NEW_ROOM` callback, then some entities will
|
|
570
|
+
* slide around (such as the player). Since those entity velocities are already at zero, setting
|
|
571
|
+
* them to zero will have no effect. Thus, a generic solution is to record all of the entity
|
|
572
572
|
* positions/velocities before updating the room, and then restore those positions/velocities.
|
|
573
573
|
*/
|
|
574
574
|
export function roomUpdateSafe(): void {
|
|
@@ -585,9 +585,9 @@ export function roomUpdateSafe(): void {
|
|
|
585
585
|
}
|
|
586
586
|
|
|
587
587
|
/**
|
|
588
|
-
* Helper function to convert an uncleared room to a cleared room in the
|
|
589
|
-
* is useful because if enemies are removed in this callback, a room drop will be awarded and
|
|
590
|
-
* doors will start closed and then open.
|
|
588
|
+
* Helper function to convert an uncleared room to a cleared room in the `POST_NEW_ROOM` callback.
|
|
589
|
+
* This is useful because if enemies are removed in this callback, a room drop will be awarded and
|
|
590
|
+
* the doors will start closed and then open.
|
|
591
591
|
*/
|
|
592
592
|
export function setRoomCleared(): void {
|
|
593
593
|
const room = game.GetRoom();
|
package/src/functions/stage.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
GameStateFlag,
|
|
3
|
+
LevelStage,
|
|
4
|
+
RoomType,
|
|
5
|
+
StageType,
|
|
6
|
+
} from "isaac-typescript-definitions";
|
|
2
7
|
import { game } from "../cachedClasses";
|
|
3
8
|
import { ROOM_TYPE_GOTO_PREFIXES } from "../objects/roomTypeGotoPrefixes";
|
|
4
9
|
import { STAGE_TYPE_SUFFIXES } from "../objects/stageTypeSuffixes";
|
|
@@ -116,6 +121,10 @@ export function isRepentanceStage(stageType: StageType): boolean {
|
|
|
116
121
|
);
|
|
117
122
|
}
|
|
118
123
|
|
|
124
|
+
export function onAscent(): boolean {
|
|
125
|
+
return game.GetStateFlag(GameStateFlag.BACKWARDS_PATH);
|
|
126
|
+
}
|
|
127
|
+
|
|
119
128
|
export function onCathedral(): boolean {
|
|
120
129
|
const level = game.GetLevel();
|
|
121
130
|
const stage = level.GetStage();
|
package/src/index.ts
CHANGED
|
@@ -47,10 +47,12 @@ export * from "./features/extraConsoleCommands/exports";
|
|
|
47
47
|
export { removeFadeIn, restoreFadeIn } from "./features/fadeInRemover";
|
|
48
48
|
export { disableFastReset, enableFastReset } from "./features/fastReset";
|
|
49
49
|
export { forgottenSwitch } from "./features/forgottenSwitch";
|
|
50
|
+
export { pause, unpause } from "./features/pause";
|
|
50
51
|
export {
|
|
51
52
|
removePersistentEntity,
|
|
52
53
|
spawnPersistentEntity,
|
|
53
54
|
} from "./features/persistentEntities";
|
|
55
|
+
export * from "./features/pickupIndex";
|
|
54
56
|
export { getPlayerInventory } from "./features/playerInventory";
|
|
55
57
|
export {
|
|
56
58
|
anyPlayerUsingPony,
|
|
@@ -62,6 +64,7 @@ export {
|
|
|
62
64
|
getRoomClearGameFrame,
|
|
63
65
|
getRoomClearRoomFrame,
|
|
64
66
|
} from "./features/roomClearFrame";
|
|
67
|
+
export * from "./features/roomHistory";
|
|
65
68
|
export {
|
|
66
69
|
runInNGameFrames,
|
|
67
70
|
runInNRenderFrames,
|
|
@@ -20,6 +20,8 @@ import { postFlipCallbacksInit } from "./callbacks/postFlip";
|
|
|
20
20
|
import { postGreedModeWaveInit } from "./callbacks/postGreedModeWave";
|
|
21
21
|
import { postGridEntityCallbacksInit } from "./callbacks/postGridEntity";
|
|
22
22
|
import { postGridEntityCollisionInit } from "./callbacks/postGridEntityCollision";
|
|
23
|
+
import { postGridEntityCustomRenderInit } from "./callbacks/postGridEntityCustomRender";
|
|
24
|
+
import { postGridEntityCustomUpdateInit } from "./callbacks/postGridEntityCustomUpdate";
|
|
23
25
|
import { postGridEntityRenderInit } from "./callbacks/postGridEntityRender";
|
|
24
26
|
import { postHolyMantleRemovedInit } from "./callbacks/postHolyMantleRemoved";
|
|
25
27
|
import { postItemDischargeInit } from "./callbacks/postItemDischarged";
|
|
@@ -89,6 +91,8 @@ export function initCustomCallbacks(mod: ModUpgraded): void {
|
|
|
89
91
|
postGreedModeWaveInit(mod);
|
|
90
92
|
postGridEntityCallbacksInit(mod);
|
|
91
93
|
postGridEntityCollisionInit(mod);
|
|
94
|
+
postGridEntityCustomRenderInit(mod);
|
|
95
|
+
postGridEntityCustomUpdateInit(mod);
|
|
92
96
|
postGridEntityRenderInit(mod);
|
|
93
97
|
postHolyMantleRemovedInit(mod);
|
|
94
98
|
postItemDischargeInit(mod);
|
package/src/initFeatures.ts
CHANGED
|
@@ -13,11 +13,13 @@ import { fastResetInit } from "./features/fastReset";
|
|
|
13
13
|
import { forgottenSwitchInit } from "./features/forgottenSwitch";
|
|
14
14
|
import { pauseInit } from "./features/pause";
|
|
15
15
|
import { persistentEntitiesInit } from "./features/persistentEntities";
|
|
16
|
+
import { pickupIndexInit } from "./features/pickupIndex";
|
|
16
17
|
import { playerInventoryInit } from "./features/playerInventory";
|
|
17
18
|
import { ponyDetectionInit } from "./features/ponyDetection";
|
|
18
19
|
import { preventCollectibleRotationInit } from "./features/preventCollectibleRotation";
|
|
19
20
|
import { registerHotkeyInit } from "./features/registerHotkey";
|
|
20
21
|
import { roomClearFrameInit } from "./features/roomClearFrame";
|
|
22
|
+
import { roomHistoryInit } from "./features/roomHistory";
|
|
21
23
|
import { runInNFramesInit } from "./features/runInNFrames";
|
|
22
24
|
import { runNextRoomInit } from "./features/runNextRoom";
|
|
23
25
|
import { sirenHelpersInit } from "./features/sirenHelpers";
|
|
@@ -48,11 +50,13 @@ function initFeaturesMinor(mod: ModUpgraded) {
|
|
|
48
50
|
collectibleItemPoolTypeInit(mod);
|
|
49
51
|
pauseInit(mod);
|
|
50
52
|
persistentEntitiesInit(mod);
|
|
53
|
+
pickupIndexInit(mod);
|
|
51
54
|
playerInventoryInit(mod);
|
|
52
55
|
ponyDetectionInit(mod);
|
|
53
56
|
preventCollectibleRotationInit(mod);
|
|
54
57
|
registerHotkeyInit(mod);
|
|
55
58
|
roomClearFrameInit(mod);
|
|
59
|
+
roomHistoryInit(mod);
|
|
56
60
|
runNextRoomInit(mod);
|
|
57
61
|
sirenHelpersInit(mod);
|
|
58
62
|
stageHistoryInit(mod);
|
|
@@ -23,6 +23,8 @@ import { PostGameStartedReorderedRegisterParameters } from "../callbacks/subscri
|
|
|
23
23
|
import { PostGreedModeWaveRegisterParameters } from "../callbacks/subscriptions/postGreedModeWave";
|
|
24
24
|
import { PostGridEntityBrokenRegisterParameters } from "../callbacks/subscriptions/postGridEntityBroken";
|
|
25
25
|
import { PostGridEntityCollisionRegisterParameters } from "../callbacks/subscriptions/postGridEntityCollision";
|
|
26
|
+
import { PostGridEntityCustomRenderRegisterParameters } from "../callbacks/subscriptions/postGridEntityCustomRender";
|
|
27
|
+
import { PostGridEntityCustomUpdateRegisterParameters } from "../callbacks/subscriptions/postGridEntityCustomUpdate";
|
|
26
28
|
import { PostGridEntityInitRegisterParameters } from "../callbacks/subscriptions/postGridEntityInit";
|
|
27
29
|
import { PostGridEntityRemoveRegisterParameters } from "../callbacks/subscriptions/postGridEntityRemove";
|
|
28
30
|
import { PostGridEntityRenderRegisterParameters } from "../callbacks/subscriptions/postGridEntityRender";
|
|
@@ -109,6 +111,8 @@ export interface AddCallbackParameterCustom {
|
|
|
109
111
|
[ModCallbackCustom.POST_GREED_MODE_WAVE]: PostGreedModeWaveRegisterParameters;
|
|
110
112
|
[ModCallbackCustom.POST_GRID_ENTITY_BROKEN]: PostGridEntityBrokenRegisterParameters;
|
|
111
113
|
[ModCallbackCustom.POST_GRID_ENTITY_COLLISION]: PostGridEntityCollisionRegisterParameters;
|
|
114
|
+
[ModCallbackCustom.POST_GRID_ENTITY_CUSTOM_RENDER]: PostGridEntityCustomRenderRegisterParameters;
|
|
115
|
+
[ModCallbackCustom.POST_GRID_ENTITY_CUSTOM_UPDATE]: PostGridEntityCustomUpdateRegisterParameters;
|
|
112
116
|
[ModCallbackCustom.POST_GRID_ENTITY_INIT]: PostGridEntityInitRegisterParameters;
|
|
113
117
|
[ModCallbackCustom.POST_GRID_ENTITY_REMOVE]: PostGridEntityRemoveRegisterParameters;
|
|
114
118
|
[ModCallbackCustom.POST_GRID_ENTITY_RENDER]: PostGridEntityRenderRegisterParameters;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
LevelStage,
|
|
3
|
+
RoomType,
|
|
4
|
+
StageID,
|
|
5
|
+
StageType,
|
|
6
|
+
} from "isaac-typescript-definitions";
|
|
7
|
+
|
|
8
|
+
/** Used by the room history feature. */
|
|
9
|
+
export interface RoomDescription {
|
|
10
|
+
stage: LevelStage;
|
|
11
|
+
stageType: StageType;
|
|
12
|
+
stageID: StageID;
|
|
13
|
+
roomType: RoomType;
|
|
14
|
+
roomVariant: int;
|
|
15
|
+
roomSubType: int;
|
|
16
|
+
roomName: string;
|
|
17
|
+
roomGridIndex: int;
|
|
18
|
+
roomListIndex: int;
|
|
19
|
+
}
|
|
@@ -23,6 +23,8 @@ import { postGameStartedReorderedRegister } from "../callbacks/subscriptions/pos
|
|
|
23
23
|
import { postGreedModeWaveRegister } from "../callbacks/subscriptions/postGreedModeWave";
|
|
24
24
|
import { postGridEntityBrokenRegister } from "../callbacks/subscriptions/postGridEntityBroken";
|
|
25
25
|
import { postGridEntityCollisionRegister } from "../callbacks/subscriptions/postGridEntityCollision";
|
|
26
|
+
import { postGridEntityCustomRenderRegister } from "../callbacks/subscriptions/postGridEntityCustomRender";
|
|
27
|
+
import { postGridEntityCustomUpdateRegister } from "../callbacks/subscriptions/postGridEntityCustomUpdate";
|
|
26
28
|
import { postGridEntityInitRegister } from "../callbacks/subscriptions/postGridEntityInit";
|
|
27
29
|
import { postGridEntityRemoveRegister } from "../callbacks/subscriptions/postGridEntityRemove";
|
|
28
30
|
import { postGridEntityRenderRegister } from "../callbacks/subscriptions/postGridEntityRender";
|
|
@@ -118,6 +120,10 @@ export const CALLBACK_REGISTER_FUNCTIONS: {
|
|
|
118
120
|
[ModCallbackCustom.POST_GRID_ENTITY_BROKEN]: postGridEntityBrokenRegister,
|
|
119
121
|
[ModCallbackCustom.POST_GRID_ENTITY_COLLISION]:
|
|
120
122
|
postGridEntityCollisionRegister,
|
|
123
|
+
[ModCallbackCustom.POST_GRID_ENTITY_CUSTOM_RENDER]:
|
|
124
|
+
postGridEntityCustomRenderRegister,
|
|
125
|
+
[ModCallbackCustom.POST_GRID_ENTITY_CUSTOM_UPDATE]:
|
|
126
|
+
postGridEntityCustomUpdateRegister,
|
|
121
127
|
[ModCallbackCustom.POST_GRID_ENTITY_INIT]: postGridEntityInitRegister,
|
|
122
128
|
[ModCallbackCustom.POST_GRID_ENTITY_REMOVE]: postGridEntityRemoveRegister,
|
|
123
129
|
[ModCallbackCustom.POST_GRID_ENTITY_RENDER]: postGridEntityRenderRegister,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* CollectibleIndex is a specific type of string; see the documentation for the
|
|
2
|
+
* `CollectibleIndex` is a specific type of string; see the documentation for the
|
|
3
3
|
* `getCollectibleIndex` function. Mods can signify that data structures handle collectibles by
|
|
4
4
|
* using this type.
|
|
5
5
|
*
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `PickupIndex` is a specific type of string; see the documentation for the `getPickupIndex`
|
|
3
|
+
* function. Mods can signify that data structures handle collectibles by using this type.
|
|
4
|
+
*
|
|
5
|
+
* For example:
|
|
6
|
+
*
|
|
7
|
+
* ```ts
|
|
8
|
+
* const pickupNameMap = new Map<PickupIndex, string>();
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* This type is branded for extra type safety.
|
|
12
|
+
*/
|
|
13
|
+
export type PickupIndex = int & {
|
|
14
|
+
readonly __pickupIndexBrand: symbol;
|
|
15
|
+
};
|
package/src/types/PlayerIndex.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* PlayerIndex is a specific type of number that represents a unique identifier for a player. Mods
|
|
2
|
+
* `PlayerIndex` is a specific type of number that represents a unique identifier for a player. Mods
|
|
3
3
|
* can signify that data structures handle `EntityPlayer` by using this type. For more information,
|
|
4
4
|
* see the documentation for the `getPlayerIndex` function.
|
|
5
5
|
*
|
package/src/upgradeMod.ts
CHANGED
|
@@ -39,7 +39,8 @@ export function upgradeMod(modVanilla: Mod): ModUpgraded {
|
|
|
39
39
|
patchErrorFunction();
|
|
40
40
|
loadShaderCrashFix(modVanilla);
|
|
41
41
|
|
|
42
|
-
// We initialize the
|
|
42
|
+
// We initialize the `POST_NEW_ROOM_EARLY` callback first since it is used by the save data
|
|
43
|
+
// manager.
|
|
43
44
|
postNewRoomEarlyCallbackInit(mod);
|
|
44
45
|
|
|
45
46
|
// We initialized the save data manager second since it is used by the other custom callbacks
|