isaacscript-common 21.6.3 → 21.6.5

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.
Files changed (27) hide show
  1. package/dist/index.rollup.d.ts +5 -6
  2. package/dist/isaacscript-common.lua +47 -39
  3. package/dist/src/classes/callbacks/PostPlayerFatalDamage.d.ts +4 -0
  4. package/dist/src/classes/callbacks/PostPlayerFatalDamage.d.ts.map +1 -1
  5. package/dist/src/classes/callbacks/PostPlayerFatalDamage.lua +3 -0
  6. package/dist/src/classes/features/callbackLogic/CustomRevive.d.ts +1 -0
  7. package/dist/src/classes/features/callbackLogic/CustomRevive.d.ts.map +1 -1
  8. package/dist/src/classes/features/callbackLogic/CustomRevive.lua +7 -4
  9. package/dist/src/functions/rooms.d.ts +2 -3
  10. package/dist/src/functions/rooms.d.ts.map +1 -1
  11. package/dist/src/functions/rooms.lua +2 -3
  12. package/dist/src/functions/stage.d.ts +2 -3
  13. package/dist/src/functions/stage.d.ts.map +1 -1
  14. package/dist/src/functions/stage.lua +7 -6
  15. package/dist/src/objects/roomTypeSpecialGotoPrefixes.d.ts +32 -0
  16. package/dist/src/objects/roomTypeSpecialGotoPrefixes.d.ts.map +1 -0
  17. package/dist/src/objects/roomTypeSpecialGotoPrefixes.lua +35 -0
  18. package/package.json +1 -1
  19. package/src/classes/callbacks/PostPlayerFatalDamage.ts +8 -2
  20. package/src/classes/features/callbackLogic/CustomRevive.ts +17 -2
  21. package/src/functions/rooms.ts +2 -3
  22. package/src/functions/stage.ts +7 -8
  23. package/src/objects/roomTypeSpecialGotoPrefixes.ts +33 -0
  24. package/dist/src/objects/roomTypeGotoPrefixes.d.ts +0 -32
  25. package/dist/src/objects/roomTypeGotoPrefixes.d.ts.map +0 -1
  26. package/dist/src/objects/roomTypeGotoPrefixes.lua +0 -35
  27. package/src/objects/roomTypeGotoPrefixes.ts +0 -33
@@ -1864,6 +1864,7 @@ declare class CustomRevive extends Feature {
1864
1864
  private runInNFrames;
1865
1865
  constructor(preCustomRevive: PreCustomRevive, postCustomRevive: PostCustomRevive, runInNFrames: RunInNFrames);
1866
1866
  private postRender;
1867
+ private postFamiliarInitOneUp;
1867
1868
  private postNewRoomReordered;
1868
1869
  private postPEffectUpdateReordered;
1869
1870
  private checkWaitingForItemAnimation;
@@ -4968,9 +4969,8 @@ export declare function getGoldenTrinketType(trinketType: TrinketType): TrinketT
4968
4969
  * @param roomType The `RoomType` of the destination room.
4969
4970
  * @param roomVariant The variant of the destination room.
4970
4971
  * @param useSpecialRoomsForRoomTypeDefault Optional. Whether to use `s.default` as the prefix for
4971
- * the `goto` command (instead of `d`). False by default. Set this
4972
- * to true if you want to go to a special room of `RoomType.DEFAULT`
4973
- * (1).
4972
+ * the `goto` command (instead of `d`) if the room type is
4973
+ * `RoomType.DEFAULT` (1). False by default.
4974
4974
  */
4975
4975
  export declare function getGotoCommand(roomType: RoomType, roomVariant: int, useSpecialRoomsForRoomTypeDefault?: boolean): string;
4976
4976
 
@@ -6110,9 +6110,8 @@ export declare function getRoomData(roomGridIndex?: int): RoomConfig | undefined
6110
6110
  * at the same time, and then use the `teleport` helper function when
6111
6111
  * you are finished.
6112
6112
  * @param useSpecialRoomsForRoomTypeDefault Optional. Whether to use `s.default` as the prefix for
6113
- * the `goto` command (instead of `d`). False by default. Set this
6114
- * to true if you want to go to a special room of `RoomType.DEFAULT`
6115
- * (1).
6113
+ * the `goto` command (instead of `d`) if the room type is
6114
+ * `RoomType.DEFAULT` (1). False by default.
6116
6115
  */
6117
6116
  export declare function getRoomDataForTypeVariant(roomType: RoomType, roomVariant: int, cancelRoomTransition?: boolean, useSpecialRoomsForRoomTypeDefault?: boolean): Readonly<RoomConfig> | undefined;
6118
6117
 
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 21.6.3
3
+ isaacscript-common 21.6.5
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -26079,40 +26079,40 @@ ____exports.ENGLISH_LEVEL_NAMES = {
26079
26079
  }
26080
26080
  return ____exports
26081
26081
  end,
26082
- ["src.objects.roomTypeGotoPrefixes"] = function(...)
26082
+ ["src.objects.roomTypeSpecialGotoPrefixes"] = function(...)
26083
26083
  local ____exports = {}
26084
26084
  local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
26085
26085
  local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
26086
- ____exports.ROOM_TYPE_GOTO_PREFIXES = {
26087
- [RoomType.DEFAULT] = "d",
26088
- [RoomType.SHOP] = "s.shop",
26089
- [RoomType.ERROR] = "s.error",
26090
- [RoomType.TREASURE] = "s.treasure",
26091
- [RoomType.BOSS] = "s.boss",
26092
- [RoomType.MINI_BOSS] = "s.miniboss",
26093
- [RoomType.SECRET] = "s.secret",
26094
- [RoomType.SUPER_SECRET] = "s.supersecret",
26095
- [RoomType.ARCADE] = "s.arcade",
26096
- [RoomType.CURSE] = "s.curse",
26097
- [RoomType.CHALLENGE] = "s.challenge",
26098
- [RoomType.LIBRARY] = "s.library",
26099
- [RoomType.SACRIFICE] = "s.sacrifice",
26100
- [RoomType.DEVIL] = "s.devil",
26101
- [RoomType.ANGEL] = "s.angel",
26102
- [RoomType.DUNGEON] = "s.itemdungeon",
26103
- [RoomType.BOSS_RUSH] = "s.bossrush",
26104
- [RoomType.CLEAN_BEDROOM] = "s.isaacs",
26105
- [RoomType.DIRTY_BEDROOM] = "s.barren",
26106
- [RoomType.CHEST] = "s.chest",
26107
- [RoomType.DICE] = "s.dice",
26108
- [RoomType.BLACK_MARKET] = "s.blackmarket",
26109
- [RoomType.GREED_EXIT] = "s.greedexit",
26110
- [RoomType.PLANETARIUM] = "s.planetarium",
26111
- [RoomType.TELEPORTER] = "s.teleporter",
26112
- [RoomType.TELEPORTER_EXIT] = "s.teleporterexit",
26113
- [RoomType.SECRET_EXIT] = "s.secretexit",
26114
- [RoomType.BLUE] = "s.blue",
26115
- [RoomType.ULTRA_SECRET] = "s.ultrasecret"
26086
+ ____exports.ROOM_TYPE_SPECIAL_GOTO_PREFIXES = {
26087
+ [RoomType.DEFAULT] = "default",
26088
+ [RoomType.SHOP] = "shop",
26089
+ [RoomType.ERROR] = "error",
26090
+ [RoomType.TREASURE] = "treasure",
26091
+ [RoomType.BOSS] = "boss",
26092
+ [RoomType.MINI_BOSS] = "miniboss",
26093
+ [RoomType.SECRET] = "secret",
26094
+ [RoomType.SUPER_SECRET] = "supersecret",
26095
+ [RoomType.ARCADE] = "arcade",
26096
+ [RoomType.CURSE] = "curse",
26097
+ [RoomType.CHALLENGE] = "challenge",
26098
+ [RoomType.LIBRARY] = "library",
26099
+ [RoomType.SACRIFICE] = "sacrifice",
26100
+ [RoomType.DEVIL] = "devil",
26101
+ [RoomType.ANGEL] = "angel",
26102
+ [RoomType.DUNGEON] = "itemdungeon",
26103
+ [RoomType.BOSS_RUSH] = "bossrush",
26104
+ [RoomType.CLEAN_BEDROOM] = "isaacs",
26105
+ [RoomType.DIRTY_BEDROOM] = "barren",
26106
+ [RoomType.CHEST] = "chest",
26107
+ [RoomType.DICE] = "dice",
26108
+ [RoomType.BLACK_MARKET] = "blackmarket",
26109
+ [RoomType.GREED_EXIT] = "greedexit",
26110
+ [RoomType.PLANETARIUM] = "planetarium",
26111
+ [RoomType.TELEPORTER] = "teleporter",
26112
+ [RoomType.TELEPORTER_EXIT] = "teleporterexit",
26113
+ [RoomType.SECRET_EXIT] = "secretexit",
26114
+ [RoomType.BLUE] = "blue",
26115
+ [RoomType.ULTRA_SECRET] = "ultrasecret"
26116
26116
  }
26117
26117
  return ____exports
26118
26118
  end,
@@ -26250,8 +26250,8 @@ local ____cachedClasses = require("src.core.cachedClasses")
26250
26250
  local game = ____cachedClasses.game
26251
26251
  local ____englishLevelNames = require("src.objects.englishLevelNames")
26252
26252
  local ENGLISH_LEVEL_NAMES = ____englishLevelNames.ENGLISH_LEVEL_NAMES
26253
- local ____roomTypeGotoPrefixes = require("src.objects.roomTypeGotoPrefixes")
26254
- local ROOM_TYPE_GOTO_PREFIXES = ____roomTypeGotoPrefixes.ROOM_TYPE_GOTO_PREFIXES
26253
+ local ____roomTypeSpecialGotoPrefixes = require("src.objects.roomTypeSpecialGotoPrefixes")
26254
+ local ROOM_TYPE_SPECIAL_GOTO_PREFIXES = ____roomTypeSpecialGotoPrefixes.ROOM_TYPE_SPECIAL_GOTO_PREFIXES
26255
26255
  local ____stageToStageID = require("src.objects.stageToStageID")
26256
26256
  local STAGE_TO_STAGE_ID = ____stageToStageID.STAGE_TO_STAGE_ID
26257
26257
  local ____stageTypeSuffixes = require("src.objects.stageTypeSuffixes")
@@ -26324,7 +26324,9 @@ function ____exports.getGotoCommand(self, roomType, roomVariant, useSpecialRooms
26324
26324
  if useSpecialRoomsForRoomTypeDefault == nil then
26325
26325
  useSpecialRoomsForRoomTypeDefault = false
26326
26326
  end
26327
- local prefix = roomType == RoomType.DEFAULT and useSpecialRoomsForRoomTypeDefault and "s.default" or ROOM_TYPE_GOTO_PREFIXES[roomType]
26327
+ local isNormalRoom = roomType == RoomType.DEFAULT and not useSpecialRoomsForRoomTypeDefault
26328
+ local roomTypeSpecialGotoPrefix = ROOM_TYPE_SPECIAL_GOTO_PREFIXES[roomType]
26329
+ local prefix = isNormalRoom and "d" or "s." .. roomTypeSpecialGotoPrefix
26328
26330
  return (("goto " .. prefix) .. ".") .. tostring(roomVariant)
26329
26331
  end
26330
26332
  function ____exports.getStage(self)
@@ -30160,6 +30162,9 @@ function PostPlayerFatalDamage.prototype.____constructor(self)
30160
30162
  if not inBossRoomOf(nil, BossID.SATAN) then
30161
30163
  return nil
30162
30164
  end
30165
+ if willPlayerRevive(nil, player) then
30166
+ return nil
30167
+ end
30163
30168
  local shouldSustainDeath = self:fire(
30164
30169
  player,
30165
30170
  0,
@@ -32657,8 +32662,6 @@ local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
32657
32662
  local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
32658
32663
  local ____collectibles = require("src.functions.collectibles")
32659
32664
  local removeCollectibleFromItemTracker = ____collectibles.removeCollectibleFromItemTracker
32660
- local ____entitiesSpecific = require("src.functions.entitiesSpecific")
32661
- local removeAllFamiliars = ____entitiesSpecific.removeAllFamiliars
32662
32665
  local ____log = require("src.functions.log")
32663
32666
  local log = ____log.log
32664
32667
  local ____logMisc = require("src.functions.logMisc")
@@ -32691,6 +32694,12 @@ function CustomRevive.prototype.____constructor(self, preCustomRevive, postCusto
32691
32694
  end
32692
32695
  sfxManager:Stop(SoundEffect.ONE_UP)
32693
32696
  end
32697
+ self.postFamiliarInitOneUp = function(____, familiar)
32698
+ if self.v.run.state ~= CustomReviveState.WAITING_FOR_ROOM_TRANSITION then
32699
+ return
32700
+ end
32701
+ familiar:Remove()
32702
+ end
32694
32703
  self.postNewRoomReordered = function()
32695
32704
  if self.v.run.state ~= CustomReviveState.WAITING_FOR_ROOM_TRANSITION then
32696
32705
  return
@@ -32709,7 +32718,7 @@ function CustomRevive.prototype.____constructor(self, preCustomRevive, postCusto
32709
32718
  self:playerIsAboutToDie(player)
32710
32719
  end
32711
32720
  self.featuresUsed = {ISCFeature.RUN_IN_N_FRAMES}
32712
- self.callbacksUsed = {{ModCallback.POST_RENDER, self.postRender}}
32721
+ self.callbacksUsed = {{ModCallback.POST_RENDER, self.postRender}, {ModCallback.POST_FAMILIAR_INIT, self.postFamiliarInitOneUp, {FamiliarVariant.ONE_UP}}}
32713
32722
  self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, self.postNewRoomReordered}, {ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, self.postPEffectUpdateReordered}, {ModCallbackCustom.POST_PLAYER_FATAL_DAMAGE, self.postPlayerFatalDamage}, {ModCallbackCustom.PRE_BERSERK_DEATH, self.preBerserkDeath}}
32714
32723
  self.preCustomRevive = preCustomRevive
32715
32724
  self.postCustomRevive = postCustomRevive
@@ -32754,7 +32763,6 @@ function CustomRevive.prototype.playerIsAboutToDie(self, player)
32754
32763
  self.v.run.dyingPlayerIndex = getPlayerIndex(nil, player)
32755
32764
  self:logStateChanged()
32756
32765
  player:AddCollectible(CollectibleType.ONE_UP, 0, false)
32757
- removeAllFamiliars(nil, FamiliarVariant.ONE_UP)
32758
32766
  removeCollectibleFromItemTracker(nil, CollectibleType.ONE_UP)
32759
32767
  local playerIndex = getPlayerIndex(nil, player)
32760
32768
  self.runInNFrames:runNextGameFrame(function()
@@ -11,6 +11,10 @@ export declare class PostPlayerFatalDamage extends CustomCallback<ModCallbackCus
11
11
  };
12
12
  constructor();
13
13
  protected shouldFire: typeof shouldFirePlayer;
14
+ /**
15
+ * Using The Bible on Satan is one of the few ways to die without taking damage, so we need to
16
+ * handle this case.
17
+ */
14
18
  private preUseItemBible;
15
19
  private entityTakeDmgPlayer;
16
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PostPlayerFatalDamage.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostPlayerFatalDamage.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAWlE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,qBAAa,qBAAsB,SAAQ,cAAc,CAAC,iBAAiB,CAAC,wBAAwB,CAAC;IACnF,CAAC;;YAEb,oEAAoE;;;MAGtE;;IAeF,UAAmB,UAAU,0BAAoB;IAIjD,OAAO,CAAC,eAAe,CA4BrB;IAGF,OAAO,CAAC,mBAAmB,CAyCzB;CACH"}
1
+ {"version":3,"file":"PostPlayerFatalDamage.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostPlayerFatalDamage.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAWlE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,qBAAa,qBAAsB,SAAQ,cAAc,CAAC,iBAAiB,CAAC,wBAAwB,CAAC;IACnF,CAAC;;YAEb,oEAAoE;;;MAGtE;;IAeF,UAAmB,UAAU,0BAAoB;IAEjD;;;OAGG;IAGH,OAAO,CAAC,eAAe,CA8BrB;IAGF,OAAO,CAAC,mBAAmB,CAyCzB;CACH"}
@@ -39,6 +39,9 @@ function PostPlayerFatalDamage.prototype.____constructor(self)
39
39
  if not inBossRoomOf(nil, BossID.SATAN) then
40
40
  return nil
41
41
  end
42
+ if willPlayerRevive(nil, player) then
43
+ return nil
44
+ end
42
45
  local shouldSustainDeath = self:fire(
43
46
  player,
44
47
  0,
@@ -25,6 +25,7 @@ export declare class CustomRevive extends Feature {
25
25
  private runInNFrames;
26
26
  constructor(preCustomRevive: PreCustomRevive, postCustomRevive: PostCustomRevive, runInNFrames: RunInNFrames);
27
27
  private postRender;
28
+ private postFamiliarInitOneUp;
28
29
  private postNewRoomReordered;
29
30
  private postPEffectUpdateReordered;
30
31
  private checkWaitingForItemAnimation;
@@ -1 +1 @@
1
- {"version":3,"file":"CustomRevive.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/callbackLogic/CustomRevive.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIrD,aAAK,iBAAiB;IACpB,QAAQ,IAAA;IAER;;;OAGG;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;IAkC5B,OAAO,CAAC,UAAU,CAQhB;IAIF,OAAO,CAAC,qBAAqB,CAM3B;IAGF,OAAO,CAAC,oBAAoB,CAO1B;IAGF,OAAO,CAAC,0BAA0B,CAEhC;IAEF,OAAO,CAAC,4BAA4B;IA6CpC,OAAO,CAAC,qBAAqB,CAK3B;IAGF,OAAO,CAAC,eAAe,CAErB;IAEF;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAmC1B,OAAO,CAAC,eAAe;CASxB"}
@@ -16,8 +16,6 @@ local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
16
16
  local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
17
17
  local ____collectibles = require("src.functions.collectibles")
18
18
  local removeCollectibleFromItemTracker = ____collectibles.removeCollectibleFromItemTracker
19
- local ____entitiesSpecific = require("src.functions.entitiesSpecific")
20
- local removeAllFamiliars = ____entitiesSpecific.removeAllFamiliars
21
19
  local ____log = require("src.functions.log")
22
20
  local log = ____log.log
23
21
  local ____logMisc = require("src.functions.logMisc")
@@ -50,6 +48,12 @@ function CustomRevive.prototype.____constructor(self, preCustomRevive, postCusto
50
48
  end
51
49
  sfxManager:Stop(SoundEffect.ONE_UP)
52
50
  end
51
+ self.postFamiliarInitOneUp = function(____, familiar)
52
+ if self.v.run.state ~= CustomReviveState.WAITING_FOR_ROOM_TRANSITION then
53
+ return
54
+ end
55
+ familiar:Remove()
56
+ end
53
57
  self.postNewRoomReordered = function()
54
58
  if self.v.run.state ~= CustomReviveState.WAITING_FOR_ROOM_TRANSITION then
55
59
  return
@@ -68,7 +72,7 @@ function CustomRevive.prototype.____constructor(self, preCustomRevive, postCusto
68
72
  self:playerIsAboutToDie(player)
69
73
  end
70
74
  self.featuresUsed = {ISCFeature.RUN_IN_N_FRAMES}
71
- self.callbacksUsed = {{ModCallback.POST_RENDER, self.postRender}}
75
+ self.callbacksUsed = {{ModCallback.POST_RENDER, self.postRender}, {ModCallback.POST_FAMILIAR_INIT, self.postFamiliarInitOneUp, {FamiliarVariant.ONE_UP}}}
72
76
  self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, self.postNewRoomReordered}, {ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, self.postPEffectUpdateReordered}, {ModCallbackCustom.POST_PLAYER_FATAL_DAMAGE, self.postPlayerFatalDamage}, {ModCallbackCustom.PRE_BERSERK_DEATH, self.preBerserkDeath}}
73
77
  self.preCustomRevive = preCustomRevive
74
78
  self.postCustomRevive = postCustomRevive
@@ -113,7 +117,6 @@ function CustomRevive.prototype.playerIsAboutToDie(self, player)
113
117
  self.v.run.dyingPlayerIndex = getPlayerIndex(nil, player)
114
118
  self:logStateChanged()
115
119
  player:AddCollectible(CollectibleType.ONE_UP, 0, false)
116
- removeAllFamiliars(nil, FamiliarVariant.ONE_UP)
117
120
  removeCollectibleFromItemTracker(nil, CollectibleType.ONE_UP)
118
121
  local playerIndex = getPlayerIndex(nil, player)
119
122
  self.runInNFrames:runNextGameFrame(function()
@@ -43,9 +43,8 @@ export declare function getReadOnlyRooms(): Array<Readonly<RoomDescriptor>>;
43
43
  * at the same time, and then use the `teleport` helper function when
44
44
  * you are finished.
45
45
  * @param useSpecialRoomsForRoomTypeDefault Optional. Whether to use `s.default` as the prefix for
46
- * the `goto` command (instead of `d`). False by default. Set this
47
- * to true if you want to go to a special room of `RoomType.DEFAULT`
48
- * (1).
46
+ * the `goto` command (instead of `d`) if the room type is
47
+ * `RoomType.DEFAULT` (1). False by default.
49
48
  */
50
49
  export declare function getRoomDataForTypeVariant(roomType: RoomType, roomVariant: int, cancelRoomTransition?: boolean, useSpecialRoomsForRoomTypeDefault?: boolean): Readonly<RoomConfig> | undefined;
51
50
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"rooms.d.ts","sourceRoot":"","sources":["../../../src/functions/rooms.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EACZ,MAAM,EACN,SAAS,EAMT,YAAY,EAEZ,UAAU,EAGV,QA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ED;;;;;GAKG;AACH,wBAAgB,yBAAyB,IAAI,OAAO,CAGnD;AAED,wBAAgB,eAAe,IAAI,OAAO,CAMzC;AAED,wBAAgB,aAAa,IAAI,OAAO,CAIvC;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAUtC;AAED,+FAA+F;AAC/F,wBAAgB,OAAO,IAAI,OAAO,CAUjC;AAED,gGAAgG;AAChG,wBAAgB,eAAe,IAAI,OAAO,CAIzC;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,OAAO,CASrC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAWhE;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAWtC;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,SAAS,EAAE,QAAQ,EAAE,GAAG,OAAO,CAI5D;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAItC;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAItC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAMxC;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,kBAAkB,CAAC,EAAE,QAAQ,EAAE,GAAG,OAAO,CAgBxE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAWrC;AAED,iFAAiF;AACjF,wBAAgB,WAAW,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAG5D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,IAAI,CA8BrC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAKvC"}
@@ -173,9 +173,8 @@ end
173
173
  -- at the same time, and then use the `teleport` helper function when
174
174
  -- you are finished.
175
175
  -- @param useSpecialRoomsForRoomTypeDefault Optional. Whether to use `s.default` as the prefix for
176
- -- the `goto` command (instead of `d`). False by default. Set this
177
- -- to true if you want to go to a special room of `RoomType.DEFAULT`
178
- -- (1).
176
+ -- the `goto` command (instead of `d`) if the room type is
177
+ -- `RoomType.DEFAULT` (1). False by default.
179
178
  function ____exports.getRoomDataForTypeVariant(self, roomType, roomVariant, cancelRoomTransition, useSpecialRoomsForRoomTypeDefault)
180
179
  if cancelRoomTransition == nil then
181
180
  cancelRoomTransition = true
@@ -34,9 +34,8 @@ export declare function getEnglishLevelName(stage?: LevelStage, stageType?: Stag
34
34
  * @param roomType The `RoomType` of the destination room.
35
35
  * @param roomVariant The variant of the destination room.
36
36
  * @param useSpecialRoomsForRoomTypeDefault Optional. Whether to use `s.default` as the prefix for
37
- * the `goto` command (instead of `d`). False by default. Set this
38
- * to true if you want to go to a special room of `RoomType.DEFAULT`
39
- * (1).
37
+ * the `goto` command (instead of `d`) if the room type is
38
+ * `RoomType.DEFAULT` (1). False by default.
40
39
  */
41
40
  export declare function getGotoCommand(roomType: RoomType, roomVariant: int, useSpecialRoomsForRoomTypeDefault?: boolean): string;
42
41
  /** Alias for the `Level.GetStage` method. */
@@ -1 +1 @@
1
- {"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../../../src/functions/stage.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,QAAQ,EACR,OAAO,EACP,SAAS,EACV,MAAM,8BAA8B,CAAC;AAUtC;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,CA6B/D;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,CAmBzE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,UAAU,CAS9C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,CAAC,EAAE,UAAU,EAClB,SAAS,CAAC,EAAE,SAAS,GACpB,MAAM,CAaR;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,QAAQ,E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CAQjC;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,IAAI,OAAO,CAMrD;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,SAAS,EACpB,MAAM,UAAQ,GACb,IAAI,CAUN;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CAE9D"}
@@ -8,8 +8,8 @@ local ____cachedClasses = require("src.core.cachedClasses")
8
8
  local game = ____cachedClasses.game
9
9
  local ____englishLevelNames = require("src.objects.englishLevelNames")
10
10
  local ENGLISH_LEVEL_NAMES = ____englishLevelNames.ENGLISH_LEVEL_NAMES
11
- local ____roomTypeGotoPrefixes = require("src.objects.roomTypeGotoPrefixes")
12
- local ROOM_TYPE_GOTO_PREFIXES = ____roomTypeGotoPrefixes.ROOM_TYPE_GOTO_PREFIXES
11
+ local ____roomTypeSpecialGotoPrefixes = require("src.objects.roomTypeSpecialGotoPrefixes")
12
+ local ROOM_TYPE_SPECIAL_GOTO_PREFIXES = ____roomTypeSpecialGotoPrefixes.ROOM_TYPE_SPECIAL_GOTO_PREFIXES
13
13
  local ____stageToStageID = require("src.objects.stageToStageID")
14
14
  local STAGE_TO_STAGE_ID = ____stageToStageID.STAGE_TO_STAGE_ID
15
15
  local ____stageTypeSuffixes = require("src.objects.stageTypeSuffixes")
@@ -108,14 +108,15 @@ end
108
108
  -- @param roomType The `RoomType` of the destination room.
109
109
  -- @param roomVariant The variant of the destination room.
110
110
  -- @param useSpecialRoomsForRoomTypeDefault Optional. Whether to use `s.default` as the prefix for
111
- -- the `goto` command (instead of `d`). False by default. Set this
112
- -- to true if you want to go to a special room of `RoomType.DEFAULT`
113
- -- (1).
111
+ -- the `goto` command (instead of `d`) if the room type is
112
+ -- `RoomType.DEFAULT` (1). False by default.
114
113
  function ____exports.getGotoCommand(self, roomType, roomVariant, useSpecialRoomsForRoomTypeDefault)
115
114
  if useSpecialRoomsForRoomTypeDefault == nil then
116
115
  useSpecialRoomsForRoomTypeDefault = false
117
116
  end
118
- local prefix = roomType == RoomType.DEFAULT and useSpecialRoomsForRoomTypeDefault and "s.default" or ROOM_TYPE_GOTO_PREFIXES[roomType]
117
+ local isNormalRoom = roomType == RoomType.DEFAULT and not useSpecialRoomsForRoomTypeDefault
118
+ local roomTypeSpecialGotoPrefix = ROOM_TYPE_SPECIAL_GOTO_PREFIXES[roomType]
119
+ local prefix = isNormalRoom and "d" or "s." .. roomTypeSpecialGotoPrefix
119
120
  return (("goto " .. prefix) .. ".") .. tostring(roomVariant)
120
121
  end
121
122
  --- Alias for the `Level.GetStage` method.
@@ -0,0 +1,32 @@
1
+ export declare const ROOM_TYPE_SPECIAL_GOTO_PREFIXES: {
2
+ readonly 1: "default";
3
+ readonly 2: "shop";
4
+ readonly 3: "error";
5
+ readonly 4: "treasure";
6
+ readonly 5: "boss";
7
+ readonly 6: "miniboss";
8
+ readonly 7: "secret";
9
+ readonly 8: "supersecret";
10
+ readonly 9: "arcade";
11
+ readonly 10: "curse";
12
+ readonly 11: "challenge";
13
+ readonly 12: "library";
14
+ readonly 13: "sacrifice";
15
+ readonly 14: "devil";
16
+ readonly 15: "angel";
17
+ readonly 16: "itemdungeon";
18
+ readonly 17: "bossrush";
19
+ readonly 18: "isaacs";
20
+ readonly 19: "barren";
21
+ readonly 20: "chest";
22
+ readonly 21: "dice";
23
+ readonly 22: "blackmarket";
24
+ readonly 23: "greedexit";
25
+ readonly 24: "planetarium";
26
+ readonly 25: "teleporter";
27
+ readonly 26: "teleporterexit";
28
+ readonly 27: "secretexit";
29
+ readonly 28: "blue";
30
+ readonly 29: "ultrasecret";
31
+ };
32
+ //# sourceMappingURL=roomTypeSpecialGotoPrefixes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roomTypeSpecialGotoPrefixes.d.ts","sourceRoot":"","sources":["../../../src/objects/roomTypeSpecialGotoPrefixes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BC,CAAC"}
@@ -0,0 +1,35 @@
1
+ local ____exports = {}
2
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
+ local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
4
+ ____exports.ROOM_TYPE_SPECIAL_GOTO_PREFIXES = {
5
+ [RoomType.DEFAULT] = "default",
6
+ [RoomType.SHOP] = "shop",
7
+ [RoomType.ERROR] = "error",
8
+ [RoomType.TREASURE] = "treasure",
9
+ [RoomType.BOSS] = "boss",
10
+ [RoomType.MINI_BOSS] = "miniboss",
11
+ [RoomType.SECRET] = "secret",
12
+ [RoomType.SUPER_SECRET] = "supersecret",
13
+ [RoomType.ARCADE] = "arcade",
14
+ [RoomType.CURSE] = "curse",
15
+ [RoomType.CHALLENGE] = "challenge",
16
+ [RoomType.LIBRARY] = "library",
17
+ [RoomType.SACRIFICE] = "sacrifice",
18
+ [RoomType.DEVIL] = "devil",
19
+ [RoomType.ANGEL] = "angel",
20
+ [RoomType.DUNGEON] = "itemdungeon",
21
+ [RoomType.BOSS_RUSH] = "bossrush",
22
+ [RoomType.CLEAN_BEDROOM] = "isaacs",
23
+ [RoomType.DIRTY_BEDROOM] = "barren",
24
+ [RoomType.CHEST] = "chest",
25
+ [RoomType.DICE] = "dice",
26
+ [RoomType.BLACK_MARKET] = "blackmarket",
27
+ [RoomType.GREED_EXIT] = "greedexit",
28
+ [RoomType.PLANETARIUM] = "planetarium",
29
+ [RoomType.TELEPORTER] = "teleporter",
30
+ [RoomType.TELEPORTER_EXIT] = "teleporterexit",
31
+ [RoomType.SECRET_EXIT] = "secretexit",
32
+ [RoomType.BLUE] = "blue",
33
+ [RoomType.ULTRA_SECRET] = "ultrasecret"
34
+ }
35
+ return ____exports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "21.6.3",
3
+ "version": "21.6.5",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -46,6 +46,10 @@ export class PostPlayerFatalDamage extends CustomCallback<ModCallbackCustom.POST
46
46
 
47
47
  protected override shouldFire = shouldFirePlayer;
48
48
 
49
+ /**
50
+ * Using The Bible on Satan is one of the few ways to die without taking damage, so we need to
51
+ * handle this case.
52
+ */
49
53
  // ModCallback.PRE_USE_ITEM (23)
50
54
  // CollectibleType.BIBLE (33)
51
55
  private preUseItemBible = (
@@ -56,12 +60,14 @@ export class PostPlayerFatalDamage extends CustomCallback<ModCallbackCustom.POST
56
60
  _activeSlot: ActiveSlot,
57
61
  _customVarData: int,
58
62
  ): boolean | undefined => {
59
- // Using The Bible on Satan is one of the few ways to die without taking damage, so we need to
60
- // handle this case.
61
63
  if (!inBossRoomOf(BossID.SATAN)) {
62
64
  return undefined;
63
65
  }
64
66
 
67
+ if (willPlayerRevive(player)) {
68
+ return undefined;
69
+ }
70
+
65
71
  const shouldSustainDeath = this.fire(
66
72
  player,
67
73
  0,
@@ -9,7 +9,6 @@ import { sfxManager } from "../../../core/cachedClasses";
9
9
  import { ISCFeature } from "../../../enums/ISCFeature";
10
10
  import { ModCallbackCustom } from "../../../enums/ModCallbackCustom";
11
11
  import { removeCollectibleFromItemTracker } from "../../../functions/collectibles";
12
- import { removeAllFamiliars } from "../../../functions/entitiesSpecific";
13
12
  import { log } from "../../../functions/log";
14
13
  import { logError } from "../../../functions/logMisc";
15
14
  import {
@@ -62,6 +61,13 @@ export class CustomRevive extends Feature {
62
61
  this.callbacksUsed = [
63
62
  // 2
64
63
  [ModCallback.POST_RENDER, this.postRender],
64
+
65
+ // 7
66
+ [
67
+ ModCallback.POST_FAMILIAR_INIT,
68
+ this.postFamiliarInitOneUp,
69
+ [FamiliarVariant.ONE_UP],
70
+ ],
65
71
  ];
66
72
 
67
73
  this.customCallbacksUsed = [
@@ -90,6 +96,16 @@ export class CustomRevive extends Feature {
90
96
  sfxManager.Stop(SoundEffect.ONE_UP);
91
97
  };
92
98
 
99
+ // ModCallback.POST_FAMILIAR_INIT (7)
100
+ // FamiliarVariant.ONE_UP (41)
101
+ private postFamiliarInitOneUp = (familiar: EntityFamiliar): void => {
102
+ if (this.v.run.state !== CustomReviveState.WAITING_FOR_ROOM_TRANSITION) {
103
+ return;
104
+ }
105
+
106
+ familiar.Remove();
107
+ };
108
+
93
109
  // ModCallbackCustom.POST_NEW_ROOM_REORDERED
94
110
  private postNewRoomReordered = (): void => {
95
111
  if (this.v.run.state !== CustomReviveState.WAITING_FOR_ROOM_TRANSITION) {
@@ -178,7 +194,6 @@ export class CustomRevive extends Feature {
178
194
  this.logStateChanged();
179
195
 
180
196
  player.AddCollectible(CollectibleType.ONE_UP, 0, false);
181
- removeAllFamiliars(FamiliarVariant.ONE_UP);
182
197
  removeCollectibleFromItemTracker(CollectibleType.ONE_UP);
183
198
 
184
199
  // The player should always be dead one frame from now. If they are not, then something has gone
@@ -132,9 +132,8 @@ export function getReadOnlyRooms(): Array<Readonly<RoomDescriptor>> {
132
132
  * at the same time, and then use the `teleport` helper function when
133
133
  * you are finished.
134
134
  * @param useSpecialRoomsForRoomTypeDefault Optional. Whether to use `s.default` as the prefix for
135
- * the `goto` command (instead of `d`). False by default. Set this
136
- * to true if you want to go to a special room of `RoomType.DEFAULT`
137
- * (1).
135
+ * the `goto` command (instead of `d`) if the room type is
136
+ * `RoomType.DEFAULT` (1). False by default.
138
137
  */
139
138
  export function getRoomDataForTypeVariant(
140
139
  roomType: RoomType,
@@ -7,7 +7,7 @@ import {
7
7
  } from "isaac-typescript-definitions";
8
8
  import { game } from "../core/cachedClasses";
9
9
  import { ENGLISH_LEVEL_NAMES } from "../objects/englishLevelNames";
10
- import { ROOM_TYPE_GOTO_PREFIXES } from "../objects/roomTypeGotoPrefixes";
10
+ import { ROOM_TYPE_SPECIAL_GOTO_PREFIXES } from "../objects/roomTypeSpecialGotoPrefixes";
11
11
  import { STAGE_TO_STAGE_ID } from "../objects/stageToStageID";
12
12
  import { STAGE_TYPE_SUFFIXES } from "../objects/stageTypeSuffixes";
13
13
  import { STAGE_TYPE_TO_LETTER } from "../objects/stageTypeToLetter";
@@ -126,19 +126,18 @@ export function getEnglishLevelName(
126
126
  * @param roomType The `RoomType` of the destination room.
127
127
  * @param roomVariant The variant of the destination room.
128
128
  * @param useSpecialRoomsForRoomTypeDefault Optional. Whether to use `s.default` as the prefix for
129
- * the `goto` command (instead of `d`). False by default. Set this
130
- * to true if you want to go to a special room of `RoomType.DEFAULT`
131
- * (1).
129
+ * the `goto` command (instead of `d`) if the room type is
130
+ * `RoomType.DEFAULT` (1). False by default.
132
131
  */
133
132
  export function getGotoCommand(
134
133
  roomType: RoomType,
135
134
  roomVariant: int,
136
135
  useSpecialRoomsForRoomTypeDefault = false,
137
136
  ): string {
138
- const prefix =
139
- roomType === RoomType.DEFAULT && useSpecialRoomsForRoomTypeDefault
140
- ? `s.default`
141
- : ROOM_TYPE_GOTO_PREFIXES[roomType];
137
+ const isNormalRoom =
138
+ roomType === RoomType.DEFAULT && !useSpecialRoomsForRoomTypeDefault;
139
+ const roomTypeSpecialGotoPrefix = ROOM_TYPE_SPECIAL_GOTO_PREFIXES[roomType];
140
+ const prefix = isNormalRoom ? `d` : `s.${roomTypeSpecialGotoPrefix}`;
142
141
 
143
142
  return `goto ${prefix}.${roomVariant}`;
144
143
  }
@@ -0,0 +1,33 @@
1
+ import { RoomType } from "isaac-typescript-definitions";
2
+
3
+ export const ROOM_TYPE_SPECIAL_GOTO_PREFIXES = {
4
+ [RoomType.DEFAULT]: "default", // 1
5
+ [RoomType.SHOP]: "shop", // 2
6
+ [RoomType.ERROR]: "error", // 3
7
+ [RoomType.TREASURE]: "treasure", // 4
8
+ [RoomType.BOSS]: "boss", // 5
9
+ [RoomType.MINI_BOSS]: "miniboss", // 6
10
+ [RoomType.SECRET]: "secret", // 7
11
+ [RoomType.SUPER_SECRET]: "supersecret", // 8
12
+ [RoomType.ARCADE]: "arcade", // 9
13
+ [RoomType.CURSE]: "curse", // 10
14
+ [RoomType.CHALLENGE]: "challenge", // 11
15
+ [RoomType.LIBRARY]: "library", // 12
16
+ [RoomType.SACRIFICE]: "sacrifice", // 13
17
+ [RoomType.DEVIL]: "devil", // 14
18
+ [RoomType.ANGEL]: "angel", // 15
19
+ [RoomType.DUNGEON]: "itemdungeon", // 16
20
+ [RoomType.BOSS_RUSH]: "bossrush", // 17
21
+ [RoomType.CLEAN_BEDROOM]: "isaacs", // 18
22
+ [RoomType.DIRTY_BEDROOM]: "barren", // 19
23
+ [RoomType.CHEST]: "chest", // 20
24
+ [RoomType.DICE]: "dice", // 21
25
+ [RoomType.BLACK_MARKET]: "blackmarket", // 22
26
+ [RoomType.GREED_EXIT]: "greedexit", // 23
27
+ [RoomType.PLANETARIUM]: "planetarium", // 24
28
+ [RoomType.TELEPORTER]: "teleporter", // 25
29
+ [RoomType.TELEPORTER_EXIT]: "teleporterexit", // 26
30
+ [RoomType.SECRET_EXIT]: "secretexit", // 27
31
+ [RoomType.BLUE]: "blue", // 28
32
+ [RoomType.ULTRA_SECRET]: "ultrasecret", // 29
33
+ } as const satisfies Record<RoomType, string>;
@@ -1,32 +0,0 @@
1
- export declare const ROOM_TYPE_GOTO_PREFIXES: {
2
- readonly 1: "d";
3
- readonly 2: "s.shop";
4
- readonly 3: "s.error";
5
- readonly 4: "s.treasure";
6
- readonly 5: "s.boss";
7
- readonly 6: "s.miniboss";
8
- readonly 7: "s.secret";
9
- readonly 8: "s.supersecret";
10
- readonly 9: "s.arcade";
11
- readonly 10: "s.curse";
12
- readonly 11: "s.challenge";
13
- readonly 12: "s.library";
14
- readonly 13: "s.sacrifice";
15
- readonly 14: "s.devil";
16
- readonly 15: "s.angel";
17
- readonly 16: "s.itemdungeon";
18
- readonly 17: "s.bossrush";
19
- readonly 18: "s.isaacs";
20
- readonly 19: "s.barren";
21
- readonly 20: "s.chest";
22
- readonly 21: "s.dice";
23
- readonly 22: "s.blackmarket";
24
- readonly 23: "s.greedexit";
25
- readonly 24: "s.planetarium";
26
- readonly 25: "s.teleporter";
27
- readonly 26: "s.teleporterexit";
28
- readonly 27: "s.secretexit";
29
- readonly 28: "s.blue";
30
- readonly 29: "s.ultrasecret";
31
- };
32
- //# sourceMappingURL=roomTypeGotoPrefixes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"roomTypeGotoPrefixes.d.ts","sourceRoot":"","sources":["../../../src/objects/roomTypeGotoPrefixes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BS,CAAC"}
@@ -1,35 +0,0 @@
1
- local ____exports = {}
2
- local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
- local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
4
- ____exports.ROOM_TYPE_GOTO_PREFIXES = {
5
- [RoomType.DEFAULT] = "d",
6
- [RoomType.SHOP] = "s.shop",
7
- [RoomType.ERROR] = "s.error",
8
- [RoomType.TREASURE] = "s.treasure",
9
- [RoomType.BOSS] = "s.boss",
10
- [RoomType.MINI_BOSS] = "s.miniboss",
11
- [RoomType.SECRET] = "s.secret",
12
- [RoomType.SUPER_SECRET] = "s.supersecret",
13
- [RoomType.ARCADE] = "s.arcade",
14
- [RoomType.CURSE] = "s.curse",
15
- [RoomType.CHALLENGE] = "s.challenge",
16
- [RoomType.LIBRARY] = "s.library",
17
- [RoomType.SACRIFICE] = "s.sacrifice",
18
- [RoomType.DEVIL] = "s.devil",
19
- [RoomType.ANGEL] = "s.angel",
20
- [RoomType.DUNGEON] = "s.itemdungeon",
21
- [RoomType.BOSS_RUSH] = "s.bossrush",
22
- [RoomType.CLEAN_BEDROOM] = "s.isaacs",
23
- [RoomType.DIRTY_BEDROOM] = "s.barren",
24
- [RoomType.CHEST] = "s.chest",
25
- [RoomType.DICE] = "s.dice",
26
- [RoomType.BLACK_MARKET] = "s.blackmarket",
27
- [RoomType.GREED_EXIT] = "s.greedexit",
28
- [RoomType.PLANETARIUM] = "s.planetarium",
29
- [RoomType.TELEPORTER] = "s.teleporter",
30
- [RoomType.TELEPORTER_EXIT] = "s.teleporterexit",
31
- [RoomType.SECRET_EXIT] = "s.secretexit",
32
- [RoomType.BLUE] = "s.blue",
33
- [RoomType.ULTRA_SECRET] = "s.ultrasecret"
34
- }
35
- return ____exports
@@ -1,33 +0,0 @@
1
- import { RoomType } from "isaac-typescript-definitions";
2
-
3
- export const ROOM_TYPE_GOTO_PREFIXES = {
4
- [RoomType.DEFAULT]: "d", // 1
5
- [RoomType.SHOP]: "s.shop", // 2
6
- [RoomType.ERROR]: "s.error", // 3
7
- [RoomType.TREASURE]: "s.treasure", // 4
8
- [RoomType.BOSS]: "s.boss", // 5
9
- [RoomType.MINI_BOSS]: "s.miniboss", // 6
10
- [RoomType.SECRET]: "s.secret", // 7
11
- [RoomType.SUPER_SECRET]: "s.supersecret", // 8
12
- [RoomType.ARCADE]: "s.arcade", // 9
13
- [RoomType.CURSE]: "s.curse", // 10
14
- [RoomType.CHALLENGE]: "s.challenge", // 11
15
- [RoomType.LIBRARY]: "s.library", // 12
16
- [RoomType.SACRIFICE]: "s.sacrifice", // 13
17
- [RoomType.DEVIL]: "s.devil", // 14
18
- [RoomType.ANGEL]: "s.angel", // 15
19
- [RoomType.DUNGEON]: "s.itemdungeon", // 16
20
- [RoomType.BOSS_RUSH]: "s.bossrush", // 17
21
- [RoomType.CLEAN_BEDROOM]: "s.isaacs", // 18
22
- [RoomType.DIRTY_BEDROOM]: "s.barren", // 19
23
- [RoomType.CHEST]: "s.chest", // 20
24
- [RoomType.DICE]: "s.dice", // 21
25
- [RoomType.BLACK_MARKET]: "s.blackmarket", // 22
26
- [RoomType.GREED_EXIT]: "s.greedexit", // 23
27
- [RoomType.PLANETARIUM]: "s.planetarium", // 24
28
- [RoomType.TELEPORTER]: "s.teleporter", // 25
29
- [RoomType.TELEPORTER_EXIT]: "s.teleporterexit", // 26
30
- [RoomType.SECRET_EXIT]: "s.secretexit", // 27
31
- [RoomType.BLUE]: "s.blue", // 28
32
- [RoomType.ULTRA_SECRET]: "s.ultrasecret", // 29
33
- } as const satisfies Record<RoomType, string>;