isaacscript-common 21.6.3 → 21.6.4

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.
@@ -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 postFamiliarInit;
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.4
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)
@@ -32657,8 +32659,6 @@ local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
32657
32659
  local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
32658
32660
  local ____collectibles = require("src.functions.collectibles")
32659
32661
  local removeCollectibleFromItemTracker = ____collectibles.removeCollectibleFromItemTracker
32660
- local ____entitiesSpecific = require("src.functions.entitiesSpecific")
32661
- local removeAllFamiliars = ____entitiesSpecific.removeAllFamiliars
32662
32662
  local ____log = require("src.functions.log")
32663
32663
  local log = ____log.log
32664
32664
  local ____logMisc = require("src.functions.logMisc")
@@ -32691,6 +32691,14 @@ function CustomRevive.prototype.____constructor(self, preCustomRevive, postCusto
32691
32691
  end
32692
32692
  sfxManager:Stop(SoundEffect.ONE_UP)
32693
32693
  end
32694
+ self.postFamiliarInit = function(____, familiar)
32695
+ if self.v.run.state ~= CustomReviveState.WAITING_FOR_ROOM_TRANSITION then
32696
+ return
32697
+ end
32698
+ if familiar.Variant == FamiliarVariant.ONE_UP then
32699
+ familiar:Remove()
32700
+ end
32701
+ end
32694
32702
  self.postNewRoomReordered = function()
32695
32703
  if self.v.run.state ~= CustomReviveState.WAITING_FOR_ROOM_TRANSITION then
32696
32704
  return
@@ -32709,7 +32717,7 @@ function CustomRevive.prototype.____constructor(self, preCustomRevive, postCusto
32709
32717
  self:playerIsAboutToDie(player)
32710
32718
  end
32711
32719
  self.featuresUsed = {ISCFeature.RUN_IN_N_FRAMES}
32712
- self.callbacksUsed = {{ModCallback.POST_RENDER, self.postRender}}
32720
+ self.callbacksUsed = {{ModCallback.POST_RENDER, self.postRender}, {ModCallback.POST_FAMILIAR_INIT, self.postFamiliarInit}}
32713
32721
  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
32722
  self.preCustomRevive = preCustomRevive
32715
32723
  self.postCustomRevive = postCustomRevive
@@ -32754,7 +32762,6 @@ function CustomRevive.prototype.playerIsAboutToDie(self, player)
32754
32762
  self.v.run.dyingPlayerIndex = getPlayerIndex(nil, player)
32755
32763
  self:logStateChanged()
32756
32764
  player:AddCollectible(CollectibleType.ONE_UP, 0, false)
32757
- removeAllFamiliars(nil, FamiliarVariant.ONE_UP)
32758
32765
  removeCollectibleFromItemTracker(nil, CollectibleType.ONE_UP)
32759
32766
  local playerIndex = getPlayerIndex(nil, player)
32760
32767
  self.runInNFrames:runNextGameFrame(function()
@@ -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 postFamiliarInit;
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;IACH,2BAA2B,IAAA;IAE3B,0BAA0B,IAAA;CAC3B;AAED,qBAAa,YAAa,SAAQ,OAAO;IACvB,CAAC;;;;;;MAMf;IAEF,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,YAAY,CAAe;gBAGjC,eAAe,EAAE,eAAe,EAChC,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,YAAY;IA2B5B,OAAO,CAAC,UAAU,CAQhB;IAGF,O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@ 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,14 @@ function CustomRevive.prototype.____constructor(self, preCustomRevive, postCusto
50
48
  end
51
49
  sfxManager:Stop(SoundEffect.ONE_UP)
52
50
  end
51
+ self.postFamiliarInit = function(____, familiar)
52
+ if self.v.run.state ~= CustomReviveState.WAITING_FOR_ROOM_TRANSITION then
53
+ return
54
+ end
55
+ if familiar.Variant == FamiliarVariant.ONE_UP then
56
+ familiar:Remove()
57
+ end
58
+ end
53
59
  self.postNewRoomReordered = function()
54
60
  if self.v.run.state ~= CustomReviveState.WAITING_FOR_ROOM_TRANSITION then
55
61
  return
@@ -68,7 +74,7 @@ function CustomRevive.prototype.____constructor(self, preCustomRevive, postCusto
68
74
  self:playerIsAboutToDie(player)
69
75
  end
70
76
  self.featuresUsed = {ISCFeature.RUN_IN_N_FRAMES}
71
- self.callbacksUsed = {{ModCallback.POST_RENDER, self.postRender}}
77
+ self.callbacksUsed = {{ModCallback.POST_RENDER, self.postRender}, {ModCallback.POST_FAMILIAR_INIT, self.postFamiliarInit}}
72
78
  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
79
  self.preCustomRevive = preCustomRevive
74
80
  self.postCustomRevive = postCustomRevive
@@ -113,7 +119,6 @@ function CustomRevive.prototype.playerIsAboutToDie(self, player)
113
119
  self.v.run.dyingPlayerIndex = getPlayerIndex(nil, player)
114
120
  self:logStateChanged()
115
121
  player:AddCollectible(CollectibleType.ONE_UP, 0, false)
116
- removeAllFamiliars(nil, FamiliarVariant.ONE_UP)
117
122
  removeCollectibleFromItemTracker(nil, CollectibleType.ONE_UP)
118
123
  local playerIndex = getPlayerIndex(nil, player)
119
124
  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,QAAQ,EAGT,MAAM,8BAA8B,CAAC;AAkCtC;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,aAAa,EAAE,GAAG,GAAG,IAAI,CAenD;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,GAAG,CAGjC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,IAAI,KAAK,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAiBlE;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,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H,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,EAClB,WAAW,EAAE,GAAG,EAChB,iCAAiC,UAAQ,GACxC,MAAM,CAOR;AAED,6CAA6C;AAC7C,wBAAgB,QAAQ,IAAI,UAAU,CAIrC;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAa7E;AAED,iDAAiD;AACjD,wBAAgB,YAAY,IAAI,SAAS,CAIxC;AAED,8FAA8F;AAC9F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achedClasses")
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.4",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -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,9 @@ export class CustomRevive extends Feature {
62
61
  this.callbacksUsed = [
63
62
  // 2
64
63
  [ModCallback.POST_RENDER, this.postRender],
64
+
65
+ // 7
66
+ [ModCallback.POST_FAMILIAR_INIT, this.postFamiliarInit],
65
67
  ];
66
68
 
67
69
  this.customCallbacksUsed = [
@@ -90,6 +92,17 @@ export class CustomRevive extends Feature {
90
92
  sfxManager.Stop(SoundEffect.ONE_UP);
91
93
  };
92
94
 
95
+ // ModCallback.POST_FAMILIAR_INIT (7)
96
+ private postFamiliarInit = (familiar: EntityFamiliar): void => {
97
+ if (this.v.run.state !== CustomReviveState.WAITING_FOR_ROOM_TRANSITION) {
98
+ return;
99
+ }
100
+
101
+ if (familiar.Variant === FamiliarVariant.ONE_UP) {
102
+ familiar.Remove();
103
+ }
104
+ };
105
+
93
106
  // ModCallbackCustom.POST_NEW_ROOM_REORDERED
94
107
  private postNewRoomReordered = (): void => {
95
108
  if (this.v.run.state !== CustomReviveState.WAITING_FOR_ROOM_TRANSITION) {
@@ -178,7 +191,6 @@ export class CustomRevive extends Feature {
178
191
  this.logStateChanged();
179
192
 
180
193
  player.AddCollectible(CollectibleType.ONE_UP, 0, false);
181
- removeAllFamiliars(FamiliarVariant.ONE_UP);
182
194
  removeCollectibleFromItemTracker(CollectibleType.ONE_UP);
183
195
 
184
196
  // 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>;