isaacscript-common 29.4.0 → 29.5.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/index.rollup.d.ts +129 -105
- package/dist/isaacscript-common.lua +139 -106
- package/dist/src/callbackClasses.d.ts +1 -0
- package/dist/src/callbackClasses.d.ts.map +1 -1
- package/dist/src/callbackClasses.lua +5 -0
- package/dist/src/callbacks.d.ts +106 -105
- package/dist/src/callbacks.d.ts.map +1 -1
- package/dist/src/callbacks.lua +1 -0
- package/dist/src/classes/callbacks/PostGameEndFilter.d.ts +9 -0
- package/dist/src/classes/callbacks/PostGameEndFilter.d.ts.map +1 -0
- package/dist/src/classes/callbacks/PostGameEndFilter.lua +23 -0
- package/dist/src/enums/ModCallbackCustom.d.ts +118 -105
- package/dist/src/enums/ModCallbackCustom.d.ts.map +1 -1
- package/dist/src/enums/ModCallbackCustom.lua +107 -105
- package/dist/src/functions/rooms.d.ts +7 -0
- package/dist/src/functions/rooms.d.ts.map +1 -1
- package/dist/src/functions/rooms.lua +5 -0
- package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts +4 -0
- package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/callbackClasses.ts +1 -0
- package/src/callbacks.ts +1 -0
- package/src/classes/callbacks/PostGameEndFilter.ts +22 -0
- package/src/enums/ModCallbackCustom.ts +14 -0
- package/src/functions/rooms.ts +7 -0
- package/src/interfaces/private/AddCallbackParametersCustom.ts +5 -0
package/src/functions/rooms.ts
CHANGED
|
@@ -377,6 +377,13 @@ export function inDevilsCrownTreasureRoom(): boolean {
|
|
|
377
377
|
return hasFlag(roomDescriptor.Flags, RoomDescriptorFlag.DEVIL_TREASURE);
|
|
378
378
|
}
|
|
379
379
|
|
|
380
|
+
/**
|
|
381
|
+
* Helper function to detect if the current room is a Double Trouble Boss Room.
|
|
382
|
+
*
|
|
383
|
+
* This is performed by checking for the string "Double Trouble" inside of the room name. The
|
|
384
|
+
* vanilla game uses this convention for every Double Trouble Boss Room. Note that this method might
|
|
385
|
+
* fail for mods that add extra Double Trouble rooms but do not follow the convention.
|
|
386
|
+
*/
|
|
380
387
|
export function inDoubleTrouble(): boolean {
|
|
381
388
|
const room = game.GetRoom();
|
|
382
389
|
const roomType = room.GetType();
|
|
@@ -276,6 +276,11 @@ export interface AddCallbackParametersCustom {
|
|
|
276
276
|
callback: (newLazarus: EntityPlayer, oldLazarus: EntityPlayer) => void,
|
|
277
277
|
];
|
|
278
278
|
|
|
279
|
+
[ModCallbackCustom.POST_GAME_END_FILTER]: [
|
|
280
|
+
callback: (isGameOver: boolean) => void,
|
|
281
|
+
isGameOver?: boolean,
|
|
282
|
+
];
|
|
283
|
+
|
|
279
284
|
[ModCallbackCustom.POST_GAME_STARTED_REORDERED]: [
|
|
280
285
|
callback: (isContinued: boolean) => void,
|
|
281
286
|
// `isContinued` is mandatory to prevent users from shooting themselves in the foot.
|