isaacscript-common 15.4.6 → 15.6.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.
Files changed (33) hide show
  1. package/dist/index.d.ts +36 -18
  2. package/dist/isaacscript-common.lua +110 -59
  3. package/dist/src/classes/features/other/ForgottenSwitch.d.ts +1 -1
  4. package/dist/src/classes/features/other/ForgottenSwitch.d.ts.map +1 -1
  5. package/dist/src/classes/features/other/ForgottenSwitch.lua +6 -12
  6. package/dist/src/classes/features/other/PressInput.d.ts +14 -0
  7. package/dist/src/classes/features/other/PressInput.d.ts.map +1 -0
  8. package/dist/src/classes/features/other/PressInput.lua +35 -0
  9. package/dist/src/classes/features/other/SaveDataManager.d.ts +3 -3
  10. package/dist/src/classes/features/other/saveDataManager/glowingHourGlass.lua +1 -1
  11. package/dist/src/enums/ISCFeature.d.ts +14 -13
  12. package/dist/src/enums/ISCFeature.d.ts.map +1 -1
  13. package/dist/src/enums/ISCFeature.lua +15 -13
  14. package/dist/src/features.d.ts +16 -13
  15. package/dist/src/features.d.ts.map +1 -1
  16. package/dist/src/features.lua +5 -1
  17. package/dist/src/functions/input.d.ts +2 -0
  18. package/dist/src/functions/input.d.ts.map +1 -1
  19. package/dist/src/functions/input.lua +6 -6
  20. package/dist/src/functions/rooms.d.ts +1 -1
  21. package/dist/src/functions/rooms.lua +1 -1
  22. package/dist/src/maps/collectibleTypeToNameMap.lua +1 -1
  23. package/package.json +2 -2
  24. package/src/classes/features/callbackLogic/GameReorderedCallbacks.ts +2 -2
  25. package/src/classes/features/other/ForgottenSwitch.ts +10 -28
  26. package/src/classes/features/other/PressInput.ts +55 -0
  27. package/src/classes/features/other/SaveDataManager.ts +5 -5
  28. package/src/classes/features/other/saveDataManager/glowingHourGlass.ts +4 -4
  29. package/src/enums/ISCFeature.ts +1 -0
  30. package/src/features.ts +5 -1
  31. package/src/functions/input.ts +2 -2
  32. package/src/functions/rooms.ts +1 -1
  33. package/src/maps/collectibleTypeToNameMap.ts +1 -1
package/dist/index.d.ts CHANGED
@@ -3794,7 +3794,7 @@ export declare const fonts: {
3794
3794
  export declare function forEach<T>(array: T[], func: (value: T, index: number, array: T[]) => void): void;
3795
3795
 
3796
3796
  declare class ForgottenSwitch extends Feature {
3797
- private isActionTriggered;
3797
+ private pressInput;
3798
3798
  /**
3799
3799
  * When used on The Forgotten, switches to The Soul. When used on The Soul, switches to The
3800
3800
  * Forgotten. This takes 1 game frame to take effect.
@@ -6817,7 +6817,7 @@ export declare function includes<T>(array: T[], element: T): boolean;
6817
6817
  export declare function inCrawlSpace(): boolean;
6818
6818
 
6819
6819
  /**
6820
- * Helper function to detect if the current room is one of the room in the Death Certificate area.
6820
+ * Helper function to detect if the current room is one of the rooms in the Death Certificate area.
6821
6821
  */
6822
6822
  export declare function inDeathCertificateArea(): boolean;
6823
6823
 
@@ -7121,19 +7121,20 @@ export declare enum ISCFeature {
7121
7121
  PICKUP_INDEX_CREATION = 36,
7122
7122
  PLAYER_INVENTORY = 37,
7123
7123
  PONY_DETECTION = 38,
7124
- PREVENT_CHILD_ENTITIES = 39,
7125
- PREVENT_COLLECTIBLE_ROTATION = 40,
7126
- PREVENT_GRID_ENTITY_RESPAWN = 41,
7127
- ROOM_CLEAR_FRAME = 42,
7128
- ROOM_HISTORY = 43,
7129
- RUN_IN_N_FRAMES = 44,
7130
- RUN_NEXT_ROOM = 45,
7131
- SAVE_DATA_MANAGER = 46,
7132
- SPAWN_ALT_ROCK_REWARDS = 47,
7133
- SPAWN_COLLECTIBLE = 48,
7134
- STAGE_HISTORY = 49,
7135
- START_AMBUSH = 50,
7136
- TAINTED_LAZARUS_PLAYERS = 51
7124
+ PRESS_INPUT = 39,
7125
+ PREVENT_CHILD_ENTITIES = 40,
7126
+ PREVENT_COLLECTIBLE_ROTATION = 41,
7127
+ PREVENT_GRID_ENTITY_RESPAWN = 42,
7128
+ ROOM_CLEAR_FRAME = 43,
7129
+ ROOM_HISTORY = 44,
7130
+ RUN_IN_N_FRAMES = 45,
7131
+ RUN_NEXT_ROOM = 46,
7132
+ SAVE_DATA_MANAGER = 47,
7133
+ SPAWN_ALT_ROCK_REWARDS = 48,
7134
+ SPAWN_COLLECTIBLE = 49,
7135
+ STAGE_HISTORY = 50,
7136
+ START_AMBUSH = 51,
7137
+ TAINTED_LAZARUS_PLAYERS = 52
7137
7138
  }
7138
7139
 
7139
7140
  /**
@@ -7182,6 +7183,7 @@ declare interface ISCFeatureToClass {
7182
7183
  [ISCFeature.PICKUP_INDEX_CREATION]: PickupIndexCreation;
7183
7184
  [ISCFeature.PLAYER_INVENTORY]: PlayerInventory;
7184
7185
  [ISCFeature.PONY_DETECTION]: PonyDetection;
7186
+ [ISCFeature.PRESS_INPUT]: PressInput;
7185
7187
  [ISCFeature.PREVENT_CHILD_ENTITIES]: PreventChildEntities;
7186
7188
  [ISCFeature.PREVENT_COLLECTIBLE_ROTATION]: PreventCollectibleRotation;
7187
7189
  [ISCFeature.PREVENT_GRID_ENTITY_RESPAWN]: PreventGridEntityRespawn;
@@ -10974,6 +10976,8 @@ export declare class ModUpgradedBase implements Mod {
10974
10976
  private initOptionalFeature;
10975
10977
  }
10976
10978
 
10979
+ export declare const MOVEMENT_ACTIONS_SET: ReadonlySet<ButtonAction>;
10980
+
10977
10981
  /**
10978
10982
  * Helper function to move all of the players to where they would normally go when arriving at a new
10979
10983
  * floor. (In normal mode, this is the center of the room. In Greed Mode, this is below the top
@@ -11713,6 +11717,18 @@ declare class PreItemPickup extends CustomCallback<ModCallbackCustom.PRE_ITEM_PI
11713
11717
  protected shouldFire: typeof shouldFireItemPickup;
11714
11718
  }
11715
11719
 
11720
+ declare class PressInput extends Feature {
11721
+ private isActionTriggered;
11722
+ /**
11723
+ * Helper function to press an arbitrary `ButtonAction` on the next possible input poll. In most
11724
+ * cases, this will be equivalent to if the first player pressed the corresponding input. It
11725
+ * usually takes 1 frame for the input to take effect.
11726
+ *
11727
+ * In order to use this function, you must upgrade your mod with `ISCFeature.PRESS_INPUT`.
11728
+ */
11729
+ pressInput(buttonAction: ButtonAction): void;
11730
+ }
11731
+
11716
11732
  declare class PreventChildEntities extends Feature {
11717
11733
  private postNPCInit;
11718
11734
  /**
@@ -12886,10 +12902,10 @@ declare class SaveDataManager extends Feature {
12886
12902
  * saved to disk on game exit. (For example, if they contain functions or other non-serializable
12887
12903
  * data.) For these cases, set the second argument to `false`.
12888
12904
  *
12889
- * Note that when the player uses Glowing Hour Glass, the save data manager will automatically
12905
+ * Note that when the player uses Glowing Hourglass, the save data manager will automatically
12890
12906
  * restore any variables on a "run" or "level" object with a backup that was created when the room
12891
- * was entered. Thus, you should not have to explicitly program support for Glowing Hour Glass
12892
- * into your mod features that use the save data manager. If this is undesired for your specific
12907
+ * was entered. Thus, you should not have to explicitly program support for Glowing Hourglass into
12908
+ * your mod features that use the save data manager. If this is undesired for your specific
12893
12909
  * use-case, then add a key of `__ignoreGlowingHourGlass: true` to your "run" or "level" object.
12894
12910
  *
12895
12911
  * @param key The name of the file or feature that is submitting data to be managed by the save
@@ -13428,6 +13444,8 @@ export declare function setUnseeded(): void;
13428
13444
  */
13429
13445
  export declare const sfxManager: SFXManager;
13430
13446
 
13447
+ export declare const SHOOTING_ACTIONS_SET: ReadonlySet<ButtonAction>;
13448
+
13431
13449
  declare function shouldFireCollectibleType(fireArgs: [player: EntityPlayer, collectibleType: CollectibleType], optionalArgs: [collectibleType?: CollectibleType]): boolean;
13432
13450
 
13433
13451
  declare function shouldFireGridEntity(fireArgs: [gridEntity: GridEntity] | [gridEntity: GridEntity, oldState: int, newState: int], optionalArgs: [gridEntityType?: GridEntityType, variant?: int]): boolean;
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 15.4.6
3
+ isaacscript-common 15.6.0
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -11199,7 +11199,19 @@ local TearFlagInternal = {
11199
11199
  CARD_DROP_DEATH = getTearFlag(nil, 79),
11200
11200
  RUNE_DROP_DEATH = getTearFlag(nil, 80),
11201
11201
  TELEPORT = getTearFlag(nil, 81),
11202
- SHORT_RANGE = getTearFlag(nil, 82),
11202
+ TEAR_DECELERATE = getTearFlag(nil, 82),
11203
+ TEAR_ACCELERATE = getTearFlag(nil, 83),
11204
+ BOUNCE_WALLS_ONLY = getTearFlag(nil, 104),
11205
+ NO_GRID_DAMAGE = getTearFlag(nil, 105),
11206
+ BACKSTAB = getTearFlag(nil, 106),
11207
+ FETUS_SWORD = getTearFlag(nil, 107),
11208
+ FETUS_BONE = getTearFlag(nil, 108),
11209
+ FETUS_KNIFE = getTearFlag(nil, 109),
11210
+ FETUS_TECH_X = getTearFlag(nil, 110),
11211
+ FETUS_TECH = getTearFlag(nil, 111),
11212
+ FETUS_BRIMSTONE = getTearFlag(nil, 112),
11213
+ FETUS_BOMBER = getTearFlag(nil, 113),
11214
+ FETUS = getTearFlag(nil, 114),
11203
11215
  REROLL_ROCK_WISP = getTearFlag(nil, 115),
11204
11216
  MOM_STOMP_WISP = getTearFlag(nil, 116),
11205
11217
  ENEMY_TO_WISP = getTearFlag(nil, 117),
@@ -12263,6 +12275,8 @@ ____exports.ModCallback.PRE_SPAWN_CLEAN_AWARD = 70
12263
12275
  ____exports.ModCallback[____exports.ModCallback.PRE_SPAWN_CLEAN_AWARD] = "PRE_SPAWN_CLEAN_AWARD"
12264
12276
  ____exports.ModCallback.PRE_ROOM_ENTITY_SPAWN = 71
12265
12277
  ____exports.ModCallback[____exports.ModCallback.PRE_ROOM_ENTITY_SPAWN] = "PRE_ROOM_ENTITY_SPAWN"
12278
+ ____exports.ModCallback.PRE_ENTITY_DEVOLVE = 72
12279
+ ____exports.ModCallback[____exports.ModCallback.PRE_ENTITY_DEVOLVE] = "PRE_ENTITY_DEVOLVE"
12266
12280
  return ____exports
12267
12281
  end,
12268
12282
  ["lua_modules.isaac-typescript-definitions.dist.src.enums.Mouse"] = function(...)
@@ -14865,8 +14879,8 @@ ____exports.SoundEffect.BEAST_GROWL = 815
14865
14879
  ____exports.SoundEffect[____exports.SoundEffect.BEAST_GROWL] = "BEAST_GROWL"
14866
14880
  ____exports.SoundEffect.BEAST_GRUMBLE = 816
14867
14881
  ____exports.SoundEffect[____exports.SoundEffect.BEAST_GRUMBLE] = "BEAST_GRUMBLE"
14868
- ____exports.SoundEffect.ULTRA_FAMINE_SHOOT = 817
14869
- ____exports.SoundEffect[____exports.SoundEffect.ULTRA_FAMINE_SHOOT] = "ULTRA_FAMINE_SHOOT"
14882
+ ____exports.SoundEffect.FAMINE_GRUNT = 817
14883
+ ____exports.SoundEffect[____exports.SoundEffect.FAMINE_GRUNT] = "FAMINE_GRUNT"
14870
14884
  ____exports.SoundEffect.G_FUEL_1 = 818
14871
14885
  ____exports.SoundEffect[____exports.SoundEffect.G_FUEL_1] = "G_FUEL_1"
14872
14886
  ____exports.SoundEffect.G_FUEL_2 = 819
@@ -14875,28 +14889,28 @@ ____exports.SoundEffect.G_FUEL_3 = 820
14875
14889
  ____exports.SoundEffect[____exports.SoundEffect.G_FUEL_3] = "G_FUEL_3"
14876
14890
  ____exports.SoundEffect.G_FUEL_4 = 821
14877
14891
  ____exports.SoundEffect[____exports.SoundEffect.G_FUEL_4] = "G_FUEL_4"
14878
- ____exports.SoundEffect.EXPLOSION_SMALL = 822
14879
- ____exports.SoundEffect[____exports.SoundEffect.EXPLOSION_SMALL] = "EXPLOSION_SMALL"
14880
- ____exports.SoundEffect.EXPLOSION_BIG = 823
14881
- ____exports.SoundEffect[____exports.SoundEffect.EXPLOSION_BIG] = "EXPLOSION_BIG"
14882
- ____exports.SoundEffect.GUN_SHOT_MEDIUM = 824
14883
- ____exports.SoundEffect[____exports.SoundEffect.GUN_SHOT_MEDIUM] = "GUN_SHOT_MEDIUM"
14884
- ____exports.SoundEffect.GUN_SHOT_SMALL = 825
14885
- ____exports.SoundEffect[____exports.SoundEffect.GUN_SHOT_SMALL] = "GUN_SHOT_SMALL"
14886
- ____exports.SoundEffect.GUN_SHOT_LARGE = 826
14887
- ____exports.SoundEffect[____exports.SoundEffect.GUN_SHOT_LARGE] = "GUN_SHOT_LARGE"
14888
- ____exports.SoundEffect.GUN_SHOT_SPREAD = 827
14889
- ____exports.SoundEffect[____exports.SoundEffect.GUN_SHOT_SPREAD] = "GUN_SHOT_SPREAD"
14890
- ____exports.SoundEffect.AIR_HORN = 828
14891
- ____exports.SoundEffect[____exports.SoundEffect.AIR_HORN] = "AIR_HORN"
14892
- ____exports.SoundEffect.ITEM_EXPLOSION = 829
14893
- ____exports.SoundEffect[____exports.SoundEffect.ITEM_EXPLOSION] = "ITEM_EXPLOSION"
14894
- ____exports.SoundEffect.GUN_SHOT_MINI = 830
14895
- ____exports.SoundEffect[____exports.SoundEffect.GUN_SHOT_MINI] = "GUN_SHOT_MINI"
14896
- ____exports.SoundEffect.BULLET_RICOCHET = 831
14897
- ____exports.SoundEffect[____exports.SoundEffect.BULLET_RICOCHET] = "BULLET_RICOCHET"
14898
- ____exports.SoundEffect.ROCKET_LAUNCHER = 832
14899
- ____exports.SoundEffect[____exports.SoundEffect.ROCKET_LAUNCHER] = "ROCKET_LAUNCHER"
14892
+ ____exports.SoundEffect.G_FUEL_EXPLOSION_SMALL = 822
14893
+ ____exports.SoundEffect[____exports.SoundEffect.G_FUEL_EXPLOSION_SMALL] = "G_FUEL_EXPLOSION_SMALL"
14894
+ ____exports.SoundEffect.G_FUEL_EXPLOSION_BIG = 823
14895
+ ____exports.SoundEffect[____exports.SoundEffect.G_FUEL_EXPLOSION_BIG] = "G_FUEL_EXPLOSION_BIG"
14896
+ ____exports.SoundEffect.G_FUEL_GUNSHOT_MEDIUM = 824
14897
+ ____exports.SoundEffect[____exports.SoundEffect.G_FUEL_GUNSHOT_MEDIUM] = "G_FUEL_GUNSHOT_MEDIUM"
14898
+ ____exports.SoundEffect.G_FUEL_GUNSHOT_SMALL = 825
14899
+ ____exports.SoundEffect[____exports.SoundEffect.G_FUEL_GUNSHOT_SMALL] = "G_FUEL_GUNSHOT_SMALL"
14900
+ ____exports.SoundEffect.G_FUEL_GUNSHOT_LARGE = 826
14901
+ ____exports.SoundEffect[____exports.SoundEffect.G_FUEL_GUNSHOT_LARGE] = "G_FUEL_GUNSHOT_LARGE"
14902
+ ____exports.SoundEffect.G_FUEL_GUNSHOT_SPREAD = 827
14903
+ ____exports.SoundEffect[____exports.SoundEffect.G_FUEL_GUNSHOT_SPREAD] = "G_FUEL_GUNSHOT_SPREAD"
14904
+ ____exports.SoundEffect.G_FUEL_AIR_HORN = 828
14905
+ ____exports.SoundEffect[____exports.SoundEffect.G_FUEL_AIR_HORN] = "G_FUEL_AIR_HORN"
14906
+ ____exports.SoundEffect.G_FUEL_ITEM_APPEAR = 829
14907
+ ____exports.SoundEffect[____exports.SoundEffect.G_FUEL_ITEM_APPEAR] = "G_FUEL_ITEM_APPEAR"
14908
+ ____exports.SoundEffect.G_FUEL_GUNSHOT_MINI = 830
14909
+ ____exports.SoundEffect[____exports.SoundEffect.G_FUEL_GUNSHOT_MINI] = "G_FUEL_GUNSHOT_MINI"
14910
+ ____exports.SoundEffect.G_FUEL_BULLET_RICOCHET = 831
14911
+ ____exports.SoundEffect[____exports.SoundEffect.G_FUEL_BULLET_RICOCHET] = "G_FUEL_BULLET_RICOCHET"
14912
+ ____exports.SoundEffect.G_FUEL_ROCKET_LAUNCHER = 832
14913
+ ____exports.SoundEffect[____exports.SoundEffect.G_FUEL_ROCKET_LAUNCHER] = "G_FUEL_ROCKET_LAUNCHER"
14900
14914
  return ____exports
14901
14915
  end,
14902
14916
  ["lua_modules.isaac-typescript-definitions.dist.src.enums.StageID"] = function(...)
@@ -15465,31 +15479,33 @@ ____exports.ISCFeature.PLAYER_INVENTORY = 37
15465
15479
  ____exports.ISCFeature[____exports.ISCFeature.PLAYER_INVENTORY] = "PLAYER_INVENTORY"
15466
15480
  ____exports.ISCFeature.PONY_DETECTION = 38
15467
15481
  ____exports.ISCFeature[____exports.ISCFeature.PONY_DETECTION] = "PONY_DETECTION"
15468
- ____exports.ISCFeature.PREVENT_CHILD_ENTITIES = 39
15482
+ ____exports.ISCFeature.PRESS_INPUT = 39
15483
+ ____exports.ISCFeature[____exports.ISCFeature.PRESS_INPUT] = "PRESS_INPUT"
15484
+ ____exports.ISCFeature.PREVENT_CHILD_ENTITIES = 40
15469
15485
  ____exports.ISCFeature[____exports.ISCFeature.PREVENT_CHILD_ENTITIES] = "PREVENT_CHILD_ENTITIES"
15470
- ____exports.ISCFeature.PREVENT_COLLECTIBLE_ROTATION = 40
15486
+ ____exports.ISCFeature.PREVENT_COLLECTIBLE_ROTATION = 41
15471
15487
  ____exports.ISCFeature[____exports.ISCFeature.PREVENT_COLLECTIBLE_ROTATION] = "PREVENT_COLLECTIBLE_ROTATION"
15472
- ____exports.ISCFeature.PREVENT_GRID_ENTITY_RESPAWN = 41
15488
+ ____exports.ISCFeature.PREVENT_GRID_ENTITY_RESPAWN = 42
15473
15489
  ____exports.ISCFeature[____exports.ISCFeature.PREVENT_GRID_ENTITY_RESPAWN] = "PREVENT_GRID_ENTITY_RESPAWN"
15474
- ____exports.ISCFeature.ROOM_CLEAR_FRAME = 42
15490
+ ____exports.ISCFeature.ROOM_CLEAR_FRAME = 43
15475
15491
  ____exports.ISCFeature[____exports.ISCFeature.ROOM_CLEAR_FRAME] = "ROOM_CLEAR_FRAME"
15476
- ____exports.ISCFeature.ROOM_HISTORY = 43
15492
+ ____exports.ISCFeature.ROOM_HISTORY = 44
15477
15493
  ____exports.ISCFeature[____exports.ISCFeature.ROOM_HISTORY] = "ROOM_HISTORY"
15478
- ____exports.ISCFeature.RUN_IN_N_FRAMES = 44
15494
+ ____exports.ISCFeature.RUN_IN_N_FRAMES = 45
15479
15495
  ____exports.ISCFeature[____exports.ISCFeature.RUN_IN_N_FRAMES] = "RUN_IN_N_FRAMES"
15480
- ____exports.ISCFeature.RUN_NEXT_ROOM = 45
15496
+ ____exports.ISCFeature.RUN_NEXT_ROOM = 46
15481
15497
  ____exports.ISCFeature[____exports.ISCFeature.RUN_NEXT_ROOM] = "RUN_NEXT_ROOM"
15482
- ____exports.ISCFeature.SAVE_DATA_MANAGER = 46
15498
+ ____exports.ISCFeature.SAVE_DATA_MANAGER = 47
15483
15499
  ____exports.ISCFeature[____exports.ISCFeature.SAVE_DATA_MANAGER] = "SAVE_DATA_MANAGER"
15484
- ____exports.ISCFeature.SPAWN_ALT_ROCK_REWARDS = 47
15500
+ ____exports.ISCFeature.SPAWN_ALT_ROCK_REWARDS = 48
15485
15501
  ____exports.ISCFeature[____exports.ISCFeature.SPAWN_ALT_ROCK_REWARDS] = "SPAWN_ALT_ROCK_REWARDS"
15486
- ____exports.ISCFeature.SPAWN_COLLECTIBLE = 48
15502
+ ____exports.ISCFeature.SPAWN_COLLECTIBLE = 49
15487
15503
  ____exports.ISCFeature[____exports.ISCFeature.SPAWN_COLLECTIBLE] = "SPAWN_COLLECTIBLE"
15488
- ____exports.ISCFeature.STAGE_HISTORY = 49
15504
+ ____exports.ISCFeature.STAGE_HISTORY = 50
15489
15505
  ____exports.ISCFeature[____exports.ISCFeature.STAGE_HISTORY] = "STAGE_HISTORY"
15490
- ____exports.ISCFeature.START_AMBUSH = 50
15506
+ ____exports.ISCFeature.START_AMBUSH = 51
15491
15507
  ____exports.ISCFeature[____exports.ISCFeature.START_AMBUSH] = "START_AMBUSH"
15492
- ____exports.ISCFeature.TAINTED_LAZARUS_PLAYERS = 51
15508
+ ____exports.ISCFeature.TAINTED_LAZARUS_PLAYERS = 52
15493
15509
  ____exports.ISCFeature[____exports.ISCFeature.TAINTED_LAZARUS_PLAYERS] = "TAINTED_LAZARUS_PLAYERS"
15494
15510
  return ____exports
15495
15511
  end,
@@ -18737,7 +18753,7 @@ ____exports.COLLECTIBLE_TYPE_TO_NAME_MAP = __TS__New(Map, {
18737
18753
  {419, "Teleport 2.0"},
18738
18754
  {420, "Black Powder"},
18739
18755
  {421, "Kidney Bean"},
18740
- {422, "Glowing Hour Glass"},
18756
+ {422, "Glowing Hourglass"},
18741
18757
  {423, "Circle of Protection"},
18742
18758
  {424, "Sack Head"},
18743
18759
  {425, "Night Light"},
@@ -34209,9 +34225,9 @@ local MODIFIER_KEYS = {
34209
34225
  Keyboard.RIGHT_SUPER
34210
34226
  }
34211
34227
  local MOVEMENT_ACTIONS = {ButtonAction.LEFT, ButtonAction.RIGHT, ButtonAction.UP, ButtonAction.DOWN}
34212
- local MOVEMENT_ACTIONS_SET = __TS__New(Set, MOVEMENT_ACTIONS)
34228
+ ____exports.MOVEMENT_ACTIONS_SET = __TS__New(Set, MOVEMENT_ACTIONS)
34213
34229
  local SHOOTING_ACTIONS = {ButtonAction.SHOOT_LEFT, ButtonAction.SHOOT_RIGHT, ButtonAction.SHOOT_UP, ButtonAction.SHOOT_DOWN}
34214
- local SHOOTING_ACTIONS_SET = __TS__New(Set, SHOOTING_ACTIONS)
34230
+ ____exports.SHOOTING_ACTIONS_SET = __TS__New(Set, SHOOTING_ACTIONS)
34215
34231
  function ____exports.controllerToString(self, controller)
34216
34232
  local key = Controller[controller]
34217
34233
  if key == nil then
@@ -34220,10 +34236,10 @@ function ____exports.controllerToString(self, controller)
34220
34236
  return trimPrefix(nil, key, "BUTTON_")
34221
34237
  end
34222
34238
  function ____exports.getMoveActions(self)
34223
- return MOVEMENT_ACTIONS_SET
34239
+ return ____exports.MOVEMENT_ACTIONS_SET
34224
34240
  end
34225
34241
  function ____exports.getShootActions(self)
34226
- return SHOOTING_ACTIONS_SET
34242
+ return ____exports.SHOOTING_ACTIONS_SET
34227
34243
  end
34228
34244
  function ____exports.isActionPressedOnAnyInput(self, buttonAction)
34229
34245
  local controllerIndexes = getEnumValues(nil, ControllerIndex)
@@ -34253,7 +34269,7 @@ function ____exports.isModifierKeyPressed(self)
34253
34269
  )
34254
34270
  end
34255
34271
  function ____exports.isMoveAction(self, buttonAction)
34256
- return MOVEMENT_ACTIONS_SET:has(buttonAction)
34272
+ return ____exports.MOVEMENT_ACTIONS_SET:has(buttonAction)
34257
34273
  end
34258
34274
  function ____exports.isMoveActionPressedOnAnyInput(self)
34259
34275
  return __TS__ArraySome(
@@ -34268,7 +34284,7 @@ function ____exports.isMoveActionTriggeredOnAnyInput(self)
34268
34284
  )
34269
34285
  end
34270
34286
  function ____exports.isShootAction(self, buttonAction)
34271
- return SHOOTING_ACTIONS_SET:has(buttonAction)
34287
+ return ____exports.SHOOTING_ACTIONS_SET:has(buttonAction)
34272
34288
  end
34273
34289
  function ____exports.isShootActionPressedOnAnyInput(self)
34274
34290
  return __TS__ArraySome(
@@ -46275,38 +46291,69 @@ end
46275
46291
  __TS__Decorate({Exported}, FlyingDetection.prototype, "hasFlyingTemporaryEffect", true)
46276
46292
  return ____exports
46277
46293
  end,
46278
- ["src.classes.features.other.ForgottenSwitch"] = function(...)
46294
+ ["src.classes.features.other.PressInput"] = function(...)
46279
46295
  local ____lualib = require("lualib_bundle")
46280
46296
  local __TS__Class = ____lualib.__TS__Class
46281
46297
  local __TS__ClassExtends = ____lualib.__TS__ClassExtends
46298
+ local Set = ____lualib.Set
46299
+ local __TS__New = ____lualib.__TS__New
46282
46300
  local __TS__Decorate = ____lualib.__TS__Decorate
46283
46301
  local ____exports = {}
46284
46302
  local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
46285
- local ButtonAction = ____isaac_2Dtypescript_2Ddefinitions.ButtonAction
46286
46303
  local InputHook = ____isaac_2Dtypescript_2Ddefinitions.InputHook
46287
46304
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
46288
46305
  local ____decorators = require("src.decorators")
46289
46306
  local Exported = ____decorators.Exported
46290
46307
  local ____Feature = require("src.classes.private.Feature")
46291
46308
  local Feature = ____Feature.Feature
46309
+ ____exports.PressInput = __TS__Class()
46310
+ local PressInput = ____exports.PressInput
46311
+ PressInput.name = "PressInput"
46312
+ __TS__ClassExtends(PressInput, Feature)
46313
+ function PressInput.prototype.____constructor(self)
46314
+ Feature.prototype.____constructor(self)
46315
+ self.v = {run = {pressButtonAction = __TS__New(Set)}}
46316
+ self.isActionTriggered = function(____, _entity, _inputHook, buttonAction)
46317
+ if not self.v.run.pressButtonAction:has(buttonAction) then
46318
+ return nil
46319
+ end
46320
+ self.v.run.pressButtonAction:delete(buttonAction)
46321
+ return true
46322
+ end
46323
+ self.callbacksUsed = {{ModCallback.INPUT_ACTION, {self.isActionTriggered, InputHook.IS_ACTION_TRIGGERED}}}
46324
+ end
46325
+ function PressInput.prototype.pressInput(self, buttonAction)
46326
+ self.v.run.pressButtonAction:add(buttonAction)
46327
+ end
46328
+ __TS__Decorate({Exported}, PressInput.prototype, "pressInput", true)
46329
+ return ____exports
46330
+ end,
46331
+ ["src.classes.features.other.ForgottenSwitch"] = function(...)
46332
+ local ____lualib = require("lualib_bundle")
46333
+ local __TS__Class = ____lualib.__TS__Class
46334
+ local __TS__ClassExtends = ____lualib.__TS__ClassExtends
46335
+ local __TS__Decorate = ____lualib.__TS__Decorate
46336
+ local ____exports = {}
46337
+ local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
46338
+ local ButtonAction = ____isaac_2Dtypescript_2Ddefinitions.ButtonAction
46339
+ local ____decorators = require("src.decorators")
46340
+ local Exported = ____decorators.Exported
46341
+ local ____ISCFeature = require("src.enums.ISCFeature")
46342
+ local ISCFeature = ____ISCFeature.ISCFeature
46343
+ local ____Feature = require("src.classes.private.Feature")
46344
+ local Feature = ____Feature.Feature
46292
46345
  ____exports.ForgottenSwitch = __TS__Class()
46293
46346
  local ForgottenSwitch = ____exports.ForgottenSwitch
46294
46347
  ForgottenSwitch.name = "ForgottenSwitch"
46295
46348
  __TS__ClassExtends(ForgottenSwitch, Feature)
46296
- function ForgottenSwitch.prototype.____constructor(self)
46349
+ function ForgottenSwitch.prototype.____constructor(self, pressInput)
46297
46350
  Feature.prototype.____constructor(self)
46298
46351
  self.v = {run = {shouldSwitch = false}}
46299
- self.isActionTriggered = function(____, _entity, _inputHook, buttonAction)
46300
- if buttonAction == ButtonAction.DROP and self.v.run.shouldSwitch then
46301
- self.v.run.shouldSwitch = false
46302
- return true
46303
- end
46304
- return nil
46305
- end
46306
- self.callbacksUsed = {{ModCallback.INPUT_ACTION, {self.isActionTriggered, InputHook.IS_ACTION_TRIGGERED}}}
46352
+ self.featuresUsed = {ISCFeature.PRESS_INPUT}
46353
+ self.pressInput = pressInput
46307
46354
  end
46308
46355
  function ForgottenSwitch.prototype.forgottenSwitch(self)
46309
- self.v.run.shouldSwitch = true
46356
+ self.pressInput:pressInput(ButtonAction.DROP)
46310
46357
  end
46311
46358
  __TS__Decorate({Exported}, ForgottenSwitch.prototype, "forgottenSwitch", true)
46312
46359
  return ____exports
@@ -48424,6 +48471,8 @@ local ____PlayerInventory = require("src.classes.features.other.PlayerInventory"
48424
48471
  local PlayerInventory = ____PlayerInventory.PlayerInventory
48425
48472
  local ____PonyDetection = require("src.classes.features.other.PonyDetection")
48426
48473
  local PonyDetection = ____PonyDetection.PonyDetection
48474
+ local ____PressInput = require("src.classes.features.other.PressInput")
48475
+ local PressInput = ____PressInput.PressInput
48427
48476
  local ____PreventChildEntities = require("src.classes.features.other.PreventChildEntities")
48428
48477
  local PreventChildEntities = ____PreventChildEntities.PreventChildEntities
48429
48478
  local ____PreventCollectibleRotation = require("src.classes.features.other.PreventCollectibleRotation")
@@ -48470,6 +48519,7 @@ function ____exports.getFeatures(self, mod, callbacks)
48470
48519
  local disableInputs = __TS__New(DisableInputs)
48471
48520
  local moddedElementDetection = __TS__New(ModdedElementDetection)
48472
48521
  local ponyDetection = __TS__New(PonyDetection)
48522
+ local pressInput = __TS__New(PressInput)
48473
48523
  local preventCollectibleRotation = __TS__New(PreventCollectibleRotation)
48474
48524
  local roomClearFrame = __TS__New(RoomClearFrame)
48475
48525
  local roomHistory = __TS__New(RoomHistory)
@@ -48552,7 +48602,7 @@ function ____exports.getFeatures(self, mod, callbacks)
48552
48602
  [ISCFeature.FADE_IN_REMOVER] = __TS__New(FadeInRemover),
48553
48603
  [ISCFeature.FAST_RESET] = __TS__New(FastReset),
48554
48604
  [ISCFeature.FLYING_DETECTION] = __TS__New(FlyingDetection, moddedElementSets),
48555
- [ISCFeature.FORGOTTEN_SWITCH] = __TS__New(ForgottenSwitch),
48605
+ [ISCFeature.FORGOTTEN_SWITCH] = __TS__New(ForgottenSwitch, pressInput),
48556
48606
  [ISCFeature.EXTRA_CONSOLE_COMMANDS] = __TS__New(ExtraConsoleCommands),
48557
48607
  [ISCFeature.ITEM_POOL_DETECTION] = itemPoolDetection,
48558
48608
  [ISCFeature.MODDED_ELEMENT_DETECTION] = moddedElementDetection,
@@ -48563,6 +48613,7 @@ function ____exports.getFeatures(self, mod, callbacks)
48563
48613
  [ISCFeature.PICKUP_INDEX_CREATION] = pickupIndexCreation,
48564
48614
  [ISCFeature.PLAYER_INVENTORY] = __TS__New(PlayerInventory),
48565
48615
  [ISCFeature.PONY_DETECTION] = ponyDetection,
48616
+ [ISCFeature.PRESS_INPUT] = pressInput,
48566
48617
  [ISCFeature.PREVENT_CHILD_ENTITIES] = __TS__New(PreventChildEntities),
48567
48618
  [ISCFeature.PREVENT_COLLECTIBLE_ROTATION] = preventCollectibleRotation,
48568
48619
  [ISCFeature.PREVENT_GRID_ENTITY_RESPAWN] = preventGridEntityRespawn,
@@ -1,6 +1,6 @@
1
1
  import { Feature } from "../../private/Feature";
2
2
  export declare class ForgottenSwitch extends Feature {
3
- private isActionTriggered;
3
+ private pressInput;
4
4
  /**
5
5
  * When used on The Forgotten, switches to The Soul. When used on The Soul, switches to The
6
6
  * Forgotten. This takes 1 game frame to take effect.
@@ -1 +1 @@
1
- {"version":3,"file":"ForgottenSwitch.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/ForgottenSwitch.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,qBAAa,eAAgB,SAAQ,OAAO;IAsB1C,OAAO,CAAC,iBAAiB,CAWvB;IAEF;;;;;OAKG;IAEI,eAAe,IAAI,IAAI;CAG/B"}
1
+ {"version":3,"file":"ForgottenSwitch.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/ForgottenSwitch.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAGhD,qBAAa,eAAgB,SAAQ,OAAO;IAQ1C,OAAO,CAAC,UAAU,CAAa;IAW/B;;;;;OAKG;IAEI,eAAe,IAAI,IAAI;CAG/B"}
@@ -5,30 +5,24 @@ local __TS__Decorate = ____lualib.__TS__Decorate
5
5
  local ____exports = {}
6
6
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
7
7
  local ButtonAction = ____isaac_2Dtypescript_2Ddefinitions.ButtonAction
8
- local InputHook = ____isaac_2Dtypescript_2Ddefinitions.InputHook
9
- local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
10
8
  local ____decorators = require("src.decorators")
11
9
  local Exported = ____decorators.Exported
10
+ local ____ISCFeature = require("src.enums.ISCFeature")
11
+ local ISCFeature = ____ISCFeature.ISCFeature
12
12
  local ____Feature = require("src.classes.private.Feature")
13
13
  local Feature = ____Feature.Feature
14
14
  ____exports.ForgottenSwitch = __TS__Class()
15
15
  local ForgottenSwitch = ____exports.ForgottenSwitch
16
16
  ForgottenSwitch.name = "ForgottenSwitch"
17
17
  __TS__ClassExtends(ForgottenSwitch, Feature)
18
- function ForgottenSwitch.prototype.____constructor(self)
18
+ function ForgottenSwitch.prototype.____constructor(self, pressInput)
19
19
  Feature.prototype.____constructor(self)
20
20
  self.v = {run = {shouldSwitch = false}}
21
- self.isActionTriggered = function(____, _entity, _inputHook, buttonAction)
22
- if buttonAction == ButtonAction.DROP and self.v.run.shouldSwitch then
23
- self.v.run.shouldSwitch = false
24
- return true
25
- end
26
- return nil
27
- end
28
- self.callbacksUsed = {{ModCallback.INPUT_ACTION, {self.isActionTriggered, InputHook.IS_ACTION_TRIGGERED}}}
21
+ self.featuresUsed = {ISCFeature.PRESS_INPUT}
22
+ self.pressInput = pressInput
29
23
  end
30
24
  function ForgottenSwitch.prototype.forgottenSwitch(self)
31
- self.v.run.shouldSwitch = true
25
+ self.pressInput:pressInput(ButtonAction.DROP)
32
26
  end
33
27
  __TS__Decorate({Exported}, ForgottenSwitch.prototype, "forgottenSwitch", true)
34
28
  return ____exports
@@ -0,0 +1,14 @@
1
+ import { ButtonAction } from "isaac-typescript-definitions";
2
+ import { Feature } from "../../private/Feature";
3
+ export declare class PressInput extends Feature {
4
+ private isActionTriggered;
5
+ /**
6
+ * Helper function to press an arbitrary `ButtonAction` on the next possible input poll. In most
7
+ * cases, this will be equivalent to if the first player pressed the corresponding input. It
8
+ * usually takes 1 frame for the input to take effect.
9
+ *
10
+ * In order to use this function, you must upgrade your mod with `ISCFeature.PRESS_INPUT`.
11
+ */
12
+ pressInput(buttonAction: ButtonAction): void;
13
+ }
14
+ //# sourceMappingURL=PressInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PressInput.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/PressInput.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAGb,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,qBAAa,UAAW,SAAQ,OAAO;IAsBrC,OAAO,CAAC,iBAAiB,CAWvB;IAEF;;;;;;OAMG;IAEI,UAAU,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI;CAGpD"}
@@ -0,0 +1,35 @@
1
+ local ____lualib = require("lualib_bundle")
2
+ local __TS__Class = ____lualib.__TS__Class
3
+ local __TS__ClassExtends = ____lualib.__TS__ClassExtends
4
+ local Set = ____lualib.Set
5
+ local __TS__New = ____lualib.__TS__New
6
+ local __TS__Decorate = ____lualib.__TS__Decorate
7
+ local ____exports = {}
8
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
9
+ local InputHook = ____isaac_2Dtypescript_2Ddefinitions.InputHook
10
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
11
+ local ____decorators = require("src.decorators")
12
+ local Exported = ____decorators.Exported
13
+ local ____Feature = require("src.classes.private.Feature")
14
+ local Feature = ____Feature.Feature
15
+ ____exports.PressInput = __TS__Class()
16
+ local PressInput = ____exports.PressInput
17
+ PressInput.name = "PressInput"
18
+ __TS__ClassExtends(PressInput, Feature)
19
+ function PressInput.prototype.____constructor(self)
20
+ Feature.prototype.____constructor(self)
21
+ self.v = {run = {pressButtonAction = __TS__New(Set)}}
22
+ self.isActionTriggered = function(____, _entity, _inputHook, buttonAction)
23
+ if not self.v.run.pressButtonAction:has(buttonAction) then
24
+ return nil
25
+ end
26
+ self.v.run.pressButtonAction:delete(buttonAction)
27
+ return true
28
+ end
29
+ self.callbacksUsed = {{ModCallback.INPUT_ACTION, {self.isActionTriggered, InputHook.IS_ACTION_TRIGGERED}}}
30
+ end
31
+ function PressInput.prototype.pressInput(self, buttonAction)
32
+ self.v.run.pressButtonAction:add(buttonAction)
33
+ end
34
+ __TS__Decorate({Exported}, PressInput.prototype, "pressInput", true)
35
+ return ____exports
@@ -121,10 +121,10 @@ export declare class SaveDataManager extends Feature {
121
121
  * saved to disk on game exit. (For example, if they contain functions or other non-serializable
122
122
  * data.) For these cases, set the second argument to `false`.
123
123
  *
124
- * Note that when the player uses Glowing Hour Glass, the save data manager will automatically
124
+ * Note that when the player uses Glowing Hourglass, the save data manager will automatically
125
125
  * restore any variables on a "run" or "level" object with a backup that was created when the room
126
- * was entered. Thus, you should not have to explicitly program support for Glowing Hour Glass
127
- * into your mod features that use the save data manager. If this is undesired for your specific
126
+ * was entered. Thus, you should not have to explicitly program support for Glowing Hourglass into
127
+ * your mod features that use the save data manager. If this is undesired for your specific
128
128
  * use-case, then add a key of `__ignoreGlowingHourGlass: true` to your "run" or "level" object.
129
129
  *
130
130
  * @param key The name of the file or feature that is submitting data to be managed by the save
@@ -11,7 +11,7 @@ local ____table = require("src.functions.table")
11
11
  local iterateTableInOrder = ____table.iterateTableInOrder
12
12
  local ____constants = require("src.classes.features.other.saveDataManager.constants")
13
13
  local SAVE_DATA_MANAGER_DEBUG = ____constants.SAVE_DATA_MANAGER_DEBUG
14
- --- When the Glowing Hour Glass is used, certain save data keys will automatically be restored to a
14
+ --- When the Glowing Hourglass is used, certain save data keys will automatically be restored to a
15
15
  -- backup.
16
16
  local GLOWING_HOUR_GLASS_BACKUP_KEYS = {SaveDataKey.RUN, SaveDataKey.LEVEL}
17
17
  local IGNORE_GLOWING_HOUR_GLASS_KEY = "__ignoreGlowingHourGlass"
@@ -38,18 +38,19 @@ export declare enum ISCFeature {
38
38
  PICKUP_INDEX_CREATION = 36,
39
39
  PLAYER_INVENTORY = 37,
40
40
  PONY_DETECTION = 38,
41
- PREVENT_CHILD_ENTITIES = 39,
42
- PREVENT_COLLECTIBLE_ROTATION = 40,
43
- PREVENT_GRID_ENTITY_RESPAWN = 41,
44
- ROOM_CLEAR_FRAME = 42,
45
- ROOM_HISTORY = 43,
46
- RUN_IN_N_FRAMES = 44,
47
- RUN_NEXT_ROOM = 45,
48
- SAVE_DATA_MANAGER = 46,
49
- SPAWN_ALT_ROCK_REWARDS = 47,
50
- SPAWN_COLLECTIBLE = 48,
51
- STAGE_HISTORY = 49,
52
- START_AMBUSH = 50,
53
- TAINTED_LAZARUS_PLAYERS = 51
41
+ PRESS_INPUT = 39,
42
+ PREVENT_CHILD_ENTITIES = 40,
43
+ PREVENT_COLLECTIBLE_ROTATION = 41,
44
+ PREVENT_GRID_ENTITY_RESPAWN = 42,
45
+ ROOM_CLEAR_FRAME = 43,
46
+ ROOM_HISTORY = 44,
47
+ RUN_IN_N_FRAMES = 45,
48
+ RUN_NEXT_ROOM = 46,
49
+ SAVE_DATA_MANAGER = 47,
50
+ SPAWN_ALT_ROCK_REWARDS = 48,
51
+ SPAWN_COLLECTIBLE = 49,
52
+ STAGE_HISTORY = 50,
53
+ START_AMBUSH = 51,
54
+ TAINTED_LAZARUS_PLAYERS = 52
54
55
  }
55
56
  //# sourceMappingURL=ISCFeature.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ISCFeature.d.ts","sourceRoot":"","sources":["../../../src/enums/ISCFeature.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IAEpB,aAAa,IAAA;IACb,iBAAiB,IAAA;IACjB,cAAc,IAAA;IACd,+BAA+B,IAAA;IAC/B,4BAA4B,IAAA;IAC5B,4BAA4B,IAAA;IAC5B,wBAAwB,IAAA;IACxB,qBAAqB,IAAA;IACrB,4BAA4B,IAAA;IAC5B,0BAA0B,IAAA;IAC1B,qBAAqB,KAAA;IACrB,qBAAqB,KAAA;IAGrB,2BAA2B,KAAA;IAC3B,eAAe,KAAA;IACf,0BAA0B,KAAA;IAC1B,oBAAoB,KAAA;IACpB,iBAAiB,KAAA;IACjB,cAAc,KAAA;IACd,cAAc,KAAA;IACd,aAAa,KAAA;IACb,gBAAgB,KAAA;IAChB,aAAa,KAAA;IACb,gBAAgB,KAAA;IAChB,iBAAiB,KAAA;IACjB,cAAc,KAAA;IACd,eAAe,KAAA;IACf,UAAU,KAAA;IACV,gBAAgB,KAAA;IAChB,gBAAgB,KAAA;IAChB,sBAAsB,KAAA;IACtB,mBAAmB,KAAA;IACnB,wBAAwB,KAAA;IACxB,mBAAmB,KAAA;IACnB,cAAc,KAAA;IACd,KAAK,KAAA;IACL,mBAAmB,KAAA;IACnB,qBAAqB,KAAA;IACrB,gBAAgB,KAAA;IAChB,cAAc,KAAA;IACd,sBAAsB,KAAA;IACtB,4BAA4B,KAAA;IAC5B,2BAA2B,KAAA;IAC3B,gBAAgB,KAAA;IAChB,YAAY,KAAA;IACZ,eAAe,KAAA;IACf,aAAa,KAAA;IACb,iBAAiB,KAAA;IACjB,sBAAsB,KAAA;IACtB,iBAAiB,KAAA;IACjB,aAAa,KAAA;IACb,YAAY,KAAA;IACZ,uBAAuB,KAAA;CACxB"}
1
+ {"version":3,"file":"ISCFeature.d.ts","sourceRoot":"","sources":["../../../src/enums/ISCFeature.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IAEpB,aAAa,IAAA;IACb,iBAAiB,IAAA;IACjB,cAAc,IAAA;IACd,+BAA+B,IAAA;IAC/B,4BAA4B,IAAA;IAC5B,4BAA4B,IAAA;IAC5B,wBAAwB,IAAA;IACxB,qBAAqB,IAAA;IACrB,4BAA4B,IAAA;IAC5B,0BAA0B,IAAA;IAC1B,qBAAqB,KAAA;IACrB,qBAAqB,KAAA;IAGrB,2BAA2B,KAAA;IAC3B,eAAe,KAAA;IACf,0BAA0B,KAAA;IAC1B,oBAAoB,KAAA;IACpB,iBAAiB,KAAA;IACjB,cAAc,KAAA;IACd,cAAc,KAAA;IACd,aAAa,KAAA;IACb,gBAAgB,KAAA;IAChB,aAAa,KAAA;IACb,gBAAgB,KAAA;IAChB,iBAAiB,KAAA;IACjB,cAAc,KAAA;IACd,eAAe,KAAA;IACf,UAAU,KAAA;IACV,gBAAgB,KAAA;IAChB,gBAAgB,KAAA;IAChB,sBAAsB,KAAA;IACtB,mBAAmB,KAAA;IACnB,wBAAwB,KAAA;IACxB,mBAAmB,KAAA;IACnB,cAAc,KAAA;IACd,KAAK,KAAA;IACL,mBAAmB,KAAA;IACnB,qBAAqB,KAAA;IACrB,gBAAgB,KAAA;IAChB,cAAc,KAAA;IACd,WAAW,KAAA;IACX,sBAAsB,KAAA;IACtB,4BAA4B,KAAA;IAC5B,2BAA2B,KAAA;IAC3B,gBAAgB,KAAA;IAChB,YAAY,KAAA;IACZ,eAAe,KAAA;IACf,aAAa,KAAA;IACb,iBAAiB,KAAA;IACjB,sBAAsB,KAAA;IACtB,iBAAiB,KAAA;IACjB,aAAa,KAAA;IACb,YAAY,KAAA;IACZ,uBAAuB,KAAA;CACxB"}
@@ -78,30 +78,32 @@ ____exports.ISCFeature.PLAYER_INVENTORY = 37
78
78
  ____exports.ISCFeature[____exports.ISCFeature.PLAYER_INVENTORY] = "PLAYER_INVENTORY"
79
79
  ____exports.ISCFeature.PONY_DETECTION = 38
80
80
  ____exports.ISCFeature[____exports.ISCFeature.PONY_DETECTION] = "PONY_DETECTION"
81
- ____exports.ISCFeature.PREVENT_CHILD_ENTITIES = 39
81
+ ____exports.ISCFeature.PRESS_INPUT = 39
82
+ ____exports.ISCFeature[____exports.ISCFeature.PRESS_INPUT] = "PRESS_INPUT"
83
+ ____exports.ISCFeature.PREVENT_CHILD_ENTITIES = 40
82
84
  ____exports.ISCFeature[____exports.ISCFeature.PREVENT_CHILD_ENTITIES] = "PREVENT_CHILD_ENTITIES"
83
- ____exports.ISCFeature.PREVENT_COLLECTIBLE_ROTATION = 40
85
+ ____exports.ISCFeature.PREVENT_COLLECTIBLE_ROTATION = 41
84
86
  ____exports.ISCFeature[____exports.ISCFeature.PREVENT_COLLECTIBLE_ROTATION] = "PREVENT_COLLECTIBLE_ROTATION"
85
- ____exports.ISCFeature.PREVENT_GRID_ENTITY_RESPAWN = 41
87
+ ____exports.ISCFeature.PREVENT_GRID_ENTITY_RESPAWN = 42
86
88
  ____exports.ISCFeature[____exports.ISCFeature.PREVENT_GRID_ENTITY_RESPAWN] = "PREVENT_GRID_ENTITY_RESPAWN"
87
- ____exports.ISCFeature.ROOM_CLEAR_FRAME = 42
89
+ ____exports.ISCFeature.ROOM_CLEAR_FRAME = 43
88
90
  ____exports.ISCFeature[____exports.ISCFeature.ROOM_CLEAR_FRAME] = "ROOM_CLEAR_FRAME"
89
- ____exports.ISCFeature.ROOM_HISTORY = 43
91
+ ____exports.ISCFeature.ROOM_HISTORY = 44
90
92
  ____exports.ISCFeature[____exports.ISCFeature.ROOM_HISTORY] = "ROOM_HISTORY"
91
- ____exports.ISCFeature.RUN_IN_N_FRAMES = 44
93
+ ____exports.ISCFeature.RUN_IN_N_FRAMES = 45
92
94
  ____exports.ISCFeature[____exports.ISCFeature.RUN_IN_N_FRAMES] = "RUN_IN_N_FRAMES"
93
- ____exports.ISCFeature.RUN_NEXT_ROOM = 45
95
+ ____exports.ISCFeature.RUN_NEXT_ROOM = 46
94
96
  ____exports.ISCFeature[____exports.ISCFeature.RUN_NEXT_ROOM] = "RUN_NEXT_ROOM"
95
- ____exports.ISCFeature.SAVE_DATA_MANAGER = 46
97
+ ____exports.ISCFeature.SAVE_DATA_MANAGER = 47
96
98
  ____exports.ISCFeature[____exports.ISCFeature.SAVE_DATA_MANAGER] = "SAVE_DATA_MANAGER"
97
- ____exports.ISCFeature.SPAWN_ALT_ROCK_REWARDS = 47
99
+ ____exports.ISCFeature.SPAWN_ALT_ROCK_REWARDS = 48
98
100
  ____exports.ISCFeature[____exports.ISCFeature.SPAWN_ALT_ROCK_REWARDS] = "SPAWN_ALT_ROCK_REWARDS"
99
- ____exports.ISCFeature.SPAWN_COLLECTIBLE = 48
101
+ ____exports.ISCFeature.SPAWN_COLLECTIBLE = 49
100
102
  ____exports.ISCFeature[____exports.ISCFeature.SPAWN_COLLECTIBLE] = "SPAWN_COLLECTIBLE"
101
- ____exports.ISCFeature.STAGE_HISTORY = 49
103
+ ____exports.ISCFeature.STAGE_HISTORY = 50
102
104
  ____exports.ISCFeature[____exports.ISCFeature.STAGE_HISTORY] = "STAGE_HISTORY"
103
- ____exports.ISCFeature.START_AMBUSH = 50
105
+ ____exports.ISCFeature.START_AMBUSH = 51
104
106
  ____exports.ISCFeature[____exports.ISCFeature.START_AMBUSH] = "START_AMBUSH"
105
- ____exports.ISCFeature.TAINTED_LAZARUS_PLAYERS = 51
107
+ ____exports.ISCFeature.TAINTED_LAZARUS_PLAYERS = 52
106
108
  ____exports.ISCFeature[____exports.ISCFeature.TAINTED_LAZARUS_PLAYERS] = "TAINTED_LAZARUS_PLAYERS"
107
109
  return ____exports
@@ -38,6 +38,7 @@ import { PersistentEntities } from "./classes/features/other/PersistentEntities"
38
38
  import { PickupIndexCreation } from "./classes/features/other/PickupIndexCreation";
39
39
  import { PlayerInventory } from "./classes/features/other/PlayerInventory";
40
40
  import { PonyDetection } from "./classes/features/other/PonyDetection";
41
+ import { PressInput } from "./classes/features/other/PressInput";
41
42
  import { PreventChildEntities } from "./classes/features/other/PreventChildEntities";
42
43
  import { PreventCollectibleRotation } from "./classes/features/other/PreventCollectibleRotation";
43
44
  import { PreventGridEntityRespawn } from "./classes/features/other/PreventGridEntityRespawn";
@@ -93,6 +94,7 @@ export interface ISCFeatureToClass {
93
94
  [ISCFeature.PICKUP_INDEX_CREATION]: PickupIndexCreation;
94
95
  [ISCFeature.PLAYER_INVENTORY]: PlayerInventory;
95
96
  [ISCFeature.PONY_DETECTION]: PonyDetection;
97
+ [ISCFeature.PRESS_INPUT]: PressInput;
96
98
  [ISCFeature.PREVENT_CHILD_ENTITIES]: PreventChildEntities;
97
99
  [ISCFeature.PREVENT_COLLECTIBLE_ROTATION]: PreventCollectibleRotation;
98
100
  [ISCFeature.PREVENT_GRID_ENTITY_RESPAWN]: PreventGridEntityRespawn;
@@ -147,18 +149,19 @@ export declare function getFeatures(mod: ModUpgradedInterface, callbacks: ModCal
147
149
  readonly 36: PickupIndexCreation;
148
150
  readonly 37: PlayerInventory;
149
151
  readonly 38: PonyDetection;
150
- readonly 39: PreventChildEntities;
151
- readonly 40: PreventCollectibleRotation;
152
- readonly 41: PreventGridEntityRespawn;
153
- readonly 42: RoomClearFrame;
154
- readonly 43: RoomHistory;
155
- readonly 44: RunInNFrames;
156
- readonly 45: RunNextRoom;
157
- readonly 46: SaveDataManager;
158
- readonly 47: SpawnRockAltRewards;
159
- readonly 48: SpawnCollectible;
160
- readonly 49: StageHistory;
161
- readonly 50: StartAmbush;
162
- readonly 51: TaintedLazarusPlayers;
152
+ readonly 39: PressInput;
153
+ readonly 40: PreventChildEntities;
154
+ readonly 41: PreventCollectibleRotation;
155
+ readonly 42: PreventGridEntityRespawn;
156
+ readonly 43: RoomClearFrame;
157
+ readonly 44: RoomHistory;
158
+ readonly 45: RunInNFrames;
159
+ readonly 46: RunNextRoom;
160
+ readonly 47: SaveDataManager;
161
+ readonly 48: SpawnRockAltRewards;
162
+ readonly 49: SpawnCollectible;
163
+ readonly 50: StageHistory;
164
+ readonly 51: StartAmbush;
165
+ readonly 52: TaintedLazarusPlayers;
163
166
  };
164
167
  //# sourceMappingURL=features.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../src/features.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qDAAqD,CAAC;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,yDAAyD,CAAC;AACjG,OAAO,EAAE,4BAA4B,EAAE,MAAM,+DAA+D,CAAC;AAC7G,OAAO,EAAE,yBAAyB,EAAE,MAAM,4DAA4D,CAAC;AACvG,OAAO,EAAE,yBAAyB,EAAE,MAAM,4DAA4D,CAAC;AACvG,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,EAAE,0BAA0B,EAAE,MAAM,6DAA6D,CAAC;AACzG,OAAO,EAAE,wBAAwB,EAAE,MAAM,2DAA2D,CAAC;AACrG,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAA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AAC;CAC7D;AAKD,wBAAgB,WAAW,CACzB,GAAG,EAAE,oBAAoB,EACzB,SAAS,EAAE,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiKpC"}
@@ -79,6 +79,8 @@ local ____PlayerInventory = require("src.classes.features.other.PlayerInventory"
79
79
  local PlayerInventory = ____PlayerInventory.PlayerInventory
80
80
  local ____PonyDetection = require("src.classes.features.other.PonyDetection")
81
81
  local PonyDetection = ____PonyDetection.PonyDetection
82
+ local ____PressInput = require("src.classes.features.other.PressInput")
83
+ local PressInput = ____PressInput.PressInput
82
84
  local ____PreventChildEntities = require("src.classes.features.other.PreventChildEntities")
83
85
  local PreventChildEntities = ____PreventChildEntities.PreventChildEntities
84
86
  local ____PreventCollectibleRotation = require("src.classes.features.other.PreventCollectibleRotation")
@@ -125,6 +127,7 @@ function ____exports.getFeatures(self, mod, callbacks)
125
127
  local disableInputs = __TS__New(DisableInputs)
126
128
  local moddedElementDetection = __TS__New(ModdedElementDetection)
127
129
  local ponyDetection = __TS__New(PonyDetection)
130
+ local pressInput = __TS__New(PressInput)
128
131
  local preventCollectibleRotation = __TS__New(PreventCollectibleRotation)
129
132
  local roomClearFrame = __TS__New(RoomClearFrame)
130
133
  local roomHistory = __TS__New(RoomHistory)
@@ -207,7 +210,7 @@ function ____exports.getFeatures(self, mod, callbacks)
207
210
  [ISCFeature.FADE_IN_REMOVER] = __TS__New(FadeInRemover),
208
211
  [ISCFeature.FAST_RESET] = __TS__New(FastReset),
209
212
  [ISCFeature.FLYING_DETECTION] = __TS__New(FlyingDetection, moddedElementSets),
210
- [ISCFeature.FORGOTTEN_SWITCH] = __TS__New(ForgottenSwitch),
213
+ [ISCFeature.FORGOTTEN_SWITCH] = __TS__New(ForgottenSwitch, pressInput),
211
214
  [ISCFeature.EXTRA_CONSOLE_COMMANDS] = __TS__New(ExtraConsoleCommands),
212
215
  [ISCFeature.ITEM_POOL_DETECTION] = itemPoolDetection,
213
216
  [ISCFeature.MODDED_ELEMENT_DETECTION] = moddedElementDetection,
@@ -218,6 +221,7 @@ function ____exports.getFeatures(self, mod, callbacks)
218
221
  [ISCFeature.PICKUP_INDEX_CREATION] = pickupIndexCreation,
219
222
  [ISCFeature.PLAYER_INVENTORY] = __TS__New(PlayerInventory),
220
223
  [ISCFeature.PONY_DETECTION] = ponyDetection,
224
+ [ISCFeature.PRESS_INPUT] = pressInput,
221
225
  [ISCFeature.PREVENT_CHILD_ENTITIES] = __TS__New(PreventChildEntities),
222
226
  [ISCFeature.PREVENT_COLLECTIBLE_ROTATION] = preventCollectibleRotation,
223
227
  [ISCFeature.PREVENT_GRID_ENTITY_RESPAWN] = preventGridEntityRespawn,
@@ -1,4 +1,6 @@
1
1
  import { ButtonAction, Controller, Keyboard } from "isaac-typescript-definitions";
2
+ export declare const MOVEMENT_ACTIONS_SET: ReadonlySet<ButtonAction>;
3
+ export declare const SHOOTING_ACTIONS_SET: ReadonlySet<ButtonAction>;
2
4
  /**
3
5
  * Helper function to get the enum name for the specified `Controller` value. Note that this will
4
6
  * trim off the "BUTTON_" prefix.
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/functions/input.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,UAAU,EAEV,QAAQ,EACT,MAAM,8BAA8B,CAAC;AAsCtC;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAO7E;AAED,wBAAgB,cAAc,IAAI,WAAW,CAAC,YAAY,CAAC,CAE1D;AAED,wBAAgB,eAAe,IAAI,WAAW,CAAC,YAAY,CAAC,CAE3D;AAED,gGAAgG;AAChG,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAK7E;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,YAAY,EAAE,YAAY,GACzB,OAAO,CAKT;AAED;;;;;GA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G,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,CAI9D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AAED,wBAAgB,YAAY,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAEhE;AAED,wBAAgB,6BAA6B,IAAI,OAAO,CAIvD;AAED,wBAAgB,+BAA+B,IAAI,OAAO,CAIzD;AAED,wBAAgB,aAAa,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAEjE;AAED,wBAAgB,8BAA8B,IAAI,OAAO,CAIxD;AAED,wBAAgB,gCAAgC,IAAI,OAAO,CAI1D;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,OAAO,GACjB,MAAM,GAAG,SAAS,CAQpB"}
@@ -25,9 +25,9 @@ local MODIFIER_KEYS = {
25
25
  Keyboard.RIGHT_SUPER
26
26
  }
27
27
  local MOVEMENT_ACTIONS = {ButtonAction.LEFT, ButtonAction.RIGHT, ButtonAction.UP, ButtonAction.DOWN}
28
- local MOVEMENT_ACTIONS_SET = __TS__New(Set, MOVEMENT_ACTIONS)
28
+ ____exports.MOVEMENT_ACTIONS_SET = __TS__New(Set, MOVEMENT_ACTIONS)
29
29
  local SHOOTING_ACTIONS = {ButtonAction.SHOOT_LEFT, ButtonAction.SHOOT_RIGHT, ButtonAction.SHOOT_UP, ButtonAction.SHOOT_DOWN}
30
- local SHOOTING_ACTIONS_SET = __TS__New(Set, SHOOTING_ACTIONS)
30
+ ____exports.SHOOTING_ACTIONS_SET = __TS__New(Set, SHOOTING_ACTIONS)
31
31
  --- Helper function to get the enum name for the specified `Controller` value. Note that this will
32
32
  -- trim off the "BUTTON_" prefix.
33
33
  function ____exports.controllerToString(self, controller)
@@ -38,10 +38,10 @@ function ____exports.controllerToString(self, controller)
38
38
  return trimPrefix(nil, key, "BUTTON_")
39
39
  end
40
40
  function ____exports.getMoveActions(self)
41
- return MOVEMENT_ACTIONS_SET
41
+ return ____exports.MOVEMENT_ACTIONS_SET
42
42
  end
43
43
  function ____exports.getShootActions(self)
44
- return SHOOTING_ACTIONS_SET
44
+ return ____exports.SHOOTING_ACTIONS_SET
45
45
  end
46
46
  --- Iterates over all inputs to determine if a particular button is pressed (i.e. held down).
47
47
  function ____exports.isActionPressedOnAnyInput(self, buttonAction)
@@ -81,7 +81,7 @@ function ____exports.isModifierKeyPressed(self)
81
81
  )
82
82
  end
83
83
  function ____exports.isMoveAction(self, buttonAction)
84
- return MOVEMENT_ACTIONS_SET:has(buttonAction)
84
+ return ____exports.MOVEMENT_ACTIONS_SET:has(buttonAction)
85
85
  end
86
86
  function ____exports.isMoveActionPressedOnAnyInput(self)
87
87
  return __TS__ArraySome(
@@ -96,7 +96,7 @@ function ____exports.isMoveActionTriggeredOnAnyInput(self)
96
96
  )
97
97
  end
98
98
  function ____exports.isShootAction(self, buttonAction)
99
- return SHOOTING_ACTIONS_SET:has(buttonAction)
99
+ return ____exports.SHOOTING_ACTIONS_SET:has(buttonAction)
100
100
  end
101
101
  function ____exports.isShootActionPressedOnAnyInput(self)
102
102
  return __TS__ArraySome(
@@ -113,7 +113,7 @@ export declare function inBossRoomOf(bossID: BossID): boolean;
113
113
  */
114
114
  export declare function inCrawlSpace(): boolean;
115
115
  /**
116
- * Helper function to detect if the current room is one of the room in the Death Certificate area.
116
+ * Helper function to detect if the current room is one of the rooms in the Death Certificate area.
117
117
  */
118
118
  export declare function inDeathCertificateArea(): boolean;
119
119
  /**
@@ -277,7 +277,7 @@ function ____exports.inCrawlSpace(self)
277
277
  local roomSubType = getRoomSubType(nil)
278
278
  return roomType == RoomType.DUNGEON and roomSubType == asNumber(nil, DungeonSubType.NORMAL)
279
279
  end
280
- --- Helper function to detect if the current room is one of the room in the Death Certificate area.
280
+ --- Helper function to detect if the current room is one of the rooms in the Death Certificate area.
281
281
  function ____exports.inDeathCertificateArea(self)
282
282
  local roomStageID = getRoomStageID(nil)
283
283
  local roomSubType = getRoomSubType(nil)
@@ -427,7 +427,7 @@ ____exports.COLLECTIBLE_TYPE_TO_NAME_MAP = __TS__New(Map, {
427
427
  {419, "Teleport 2.0"},
428
428
  {420, "Black Powder"},
429
429
  {421, "Kidney Bean"},
430
- {422, "Glowing Hour Glass"},
430
+ {422, "Glowing Hourglass"},
431
431
  {423, "Circle of Protection"},
432
432
  {424, "Sack Head"},
433
433
  {425, "Night Light"},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "15.4.6",
3
+ "version": "15.6.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -22,6 +22,6 @@
22
22
  "main": "dist/src/index",
23
23
  "types": "dist/src/index.d.ts",
24
24
  "dependencies": {
25
- "isaac-typescript-definitions": "^9.4.1"
25
+ "isaac-typescript-definitions": "^9.5.0"
26
26
  }
27
27
  }
@@ -67,7 +67,7 @@ export class GameReorderedCallbacks extends Feature {
67
67
  // ModCallback.POST_USE_ITEM (3)
68
68
  // CollectibleType.GLOWING_HOUR_GLASS (422)
69
69
  private useItemGlowingHourGlass = (): boolean | undefined => {
70
- // If Glowing Hour Glass is used on the first room of a floor, it will send the player to the
70
+ // If Glowing Hourglass is used on the first room of a floor, it will send the player to the
71
71
  // previous floor without triggering the `POST_NEW_LEVEL` callback. Manually check for this.
72
72
  this.usedGlowingHourGlass = true;
73
73
 
@@ -109,7 +109,7 @@ export class GameReorderedCallbacks extends Feature {
109
109
  this.usedGlowingHourGlass = false;
110
110
 
111
111
  if (this.currentStage !== stage || this.currentStageType !== stageType) {
112
- // The player has used the Glowing Hour Glass to take them to the previous floor (which does
112
+ // The player has used the Glowing Hourglass to take them to the previous floor (which does
113
113
  // not trigger the `POST_NEW_LEVEL` callback). Emulate what happens in the `POST_NEW_LEVEL`
114
114
  // callback.
115
115
  this.recordCurrentStage();
@@ -1,10 +1,8 @@
1
- import {
2
- ButtonAction,
3
- InputHook,
4
- ModCallback,
5
- } from "isaac-typescript-definitions";
1
+ import { ButtonAction } from "isaac-typescript-definitions";
6
2
  import { Exported } from "../../../decorators";
3
+ import { ISCFeature } from "../../../enums/ISCFeature";
7
4
  import { Feature } from "../../private/Feature";
5
+ import { PressInput } from "./PressInput";
8
6
 
9
7
  export class ForgottenSwitch extends Feature {
10
8
  /** @internal */
@@ -14,32 +12,16 @@ export class ForgottenSwitch extends Feature {
14
12
  },
15
13
  };
16
14
 
15
+ private pressInput: PressInput;
16
+
17
17
  /** @internal */
18
- constructor() {
18
+ constructor(pressInput: PressInput) {
19
19
  super();
20
20
 
21
- this.callbacksUsed = [
22
- [
23
- ModCallback.INPUT_ACTION,
24
- [this.isActionTriggered, InputHook.IS_ACTION_TRIGGERED],
25
- ], // 13
26
- ];
27
- }
28
-
29
- // ModCallback.INPUT_ACTION (13)
30
- // InputHook.IS_ACTION_TRIGGERED (1)
31
- private isActionTriggered = (
32
- _entity: Entity | undefined,
33
- _inputHook: InputHook,
34
- buttonAction: ButtonAction,
35
- ) => {
36
- if (buttonAction === ButtonAction.DROP && this.v.run.shouldSwitch) {
37
- this.v.run.shouldSwitch = false;
38
- return true;
39
- }
21
+ this.featuresUsed = [ISCFeature.PRESS_INPUT];
40
22
 
41
- return undefined;
42
- };
23
+ this.pressInput = pressInput;
24
+ }
43
25
 
44
26
  /**
45
27
  * When used on The Forgotten, switches to The Soul. When used on The Soul, switches to The
@@ -49,6 +31,6 @@ export class ForgottenSwitch extends Feature {
49
31
  */
50
32
  @Exported
51
33
  public forgottenSwitch(): void {
52
- this.v.run.shouldSwitch = true;
34
+ this.pressInput.pressInput(ButtonAction.DROP);
53
35
  }
54
36
  }
@@ -0,0 +1,55 @@
1
+ import {
2
+ ButtonAction,
3
+ InputHook,
4
+ ModCallback,
5
+ } from "isaac-typescript-definitions";
6
+ import { Exported } from "../../../decorators";
7
+ import { Feature } from "../../private/Feature";
8
+
9
+ export class PressInput extends Feature {
10
+ /** @internal */
11
+ public override v = {
12
+ run: {
13
+ pressButtonAction: new Set(),
14
+ },
15
+ };
16
+
17
+ /** @internal */
18
+ constructor() {
19
+ super();
20
+
21
+ this.callbacksUsed = [
22
+ [
23
+ ModCallback.INPUT_ACTION,
24
+ [this.isActionTriggered, InputHook.IS_ACTION_TRIGGERED],
25
+ ], // 13
26
+ ];
27
+ }
28
+
29
+ // ModCallback.INPUT_ACTION (13)
30
+ // InputHook.IS_ACTION_TRIGGERED (1)
31
+ private isActionTriggered = (
32
+ _entity: Entity | undefined,
33
+ _inputHook: InputHook,
34
+ buttonAction: ButtonAction,
35
+ ) => {
36
+ if (!this.v.run.pressButtonAction.has(buttonAction)) {
37
+ return undefined;
38
+ }
39
+
40
+ this.v.run.pressButtonAction.delete(buttonAction);
41
+ return true;
42
+ };
43
+
44
+ /**
45
+ * Helper function to press an arbitrary `ButtonAction` on the next possible input poll. In most
46
+ * cases, this will be equivalent to if the first player pressed the corresponding input. It
47
+ * usually takes 1 frame for the input to take effect.
48
+ *
49
+ * In order to use this function, you must upgrade your mod with `ISCFeature.PRESS_INPUT`.
50
+ */
51
+ @Exported
52
+ public pressInput(buttonAction: ButtonAction): void {
53
+ this.v.run.pressButtonAction.add(buttonAction);
54
+ }
55
+ }
@@ -126,7 +126,7 @@ export class SaveDataManager extends Feature {
126
126
  }
127
127
  this.loadedDataOnThisRun = true;
128
128
 
129
- // Handle the race-condition of using the Glowing Hour Glass and then resetting the run.
129
+ // Handle the race-condition of using the Glowing Hourglass and then resetting the run.
130
130
  this.restoreGlowingHourGlassDataOnNextRoom = false;
131
131
 
132
132
  // We want to unconditionally load save data on every new run since there might be persistent
@@ -182,7 +182,7 @@ export class SaveDataManager extends Feature {
182
182
  SaveDataKey.ROOM,
183
183
  );
184
184
 
185
- // Handle the Glowing Hour Glass.
185
+ // Handle the Glowing Hourglass.
186
186
  if (this.restoreGlowingHourGlassDataOnNextRoom) {
187
187
  this.restoreGlowingHourGlassDataOnNextRoom = false;
188
188
  restoreGlowingHourGlassBackup(
@@ -277,10 +277,10 @@ export class SaveDataManager extends Feature {
277
277
  * saved to disk on game exit. (For example, if they contain functions or other non-serializable
278
278
  * data.) For these cases, set the second argument to `false`.
279
279
  *
280
- * Note that when the player uses Glowing Hour Glass, the save data manager will automatically
280
+ * Note that when the player uses Glowing Hourglass, the save data manager will automatically
281
281
  * restore any variables on a "run" or "level" object with a backup that was created when the room
282
- * was entered. Thus, you should not have to explicitly program support for Glowing Hour Glass
283
- * into your mod features that use the save data manager. If this is undesired for your specific
282
+ * was entered. Thus, you should not have to explicitly program support for Glowing Hourglass into
283
+ * your mod features that use the save data manager. If this is undesired for your specific
284
284
  * use-case, then add a key of `__ignoreGlowingHourGlass: true` to your "run" or "level" object.
285
285
  *
286
286
  * @param key The name of the file or feature that is submitting data to be managed by the save
@@ -1,5 +1,5 @@
1
1
  // The save data manager has a feature where certain variables will automatically be rolled back
2
- // when the Glowing Hour Glass is used.
2
+ // when the Glowing Hourglass is used.
3
3
 
4
4
  import { SaveDataKey } from "../../../../enums/SaveDataKey";
5
5
  import { SerializationType } from "../../../../enums/SerializationType";
@@ -11,7 +11,7 @@ import { AnyClass } from "../../../../types/AnyClass";
11
11
  import { SAVE_DATA_MANAGER_DEBUG } from "./constants";
12
12
 
13
13
  /**
14
- * When the Glowing Hour Glass is used, certain save data keys will automatically be restored to a
14
+ * When the Glowing Hourglass is used, certain save data keys will automatically be restored to a
15
15
  * backup.
16
16
  */
17
17
  const GLOWING_HOUR_GLASS_BACKUP_KEYS: readonly SaveDataKey[] = [
@@ -29,7 +29,7 @@ export function makeGlowingHourGlassBackup(
29
29
  iterateTableInOrder(
30
30
  saveDataMap,
31
31
  (subscriberName, saveData) => {
32
- // We make the Glowing Hour Glass backup using `SerializationType.SERIALIZE`, which means that
32
+ // We make the Glowing Hourglass backup using `SerializationType.SERIALIZE`, which means that
33
33
  // we cannot operate on unserializable data, such as functions. Save data that utilizes
34
34
  // unserializable data will typically be marked using a conditional function that evaluates to
35
35
  // false, so we skip all save data that matches this criteria.
@@ -86,7 +86,7 @@ export function restoreGlowingHourGlassBackup(
86
86
  iterateTableInOrder(
87
87
  saveDataMap,
88
88
  (subscriberName, saveData) => {
89
- // We make the Glowing Hour Glass backup using `SerializationType.SERIALIZE`, which means that
89
+ // We make the Glowing Hourglass backup using `SerializationType.SERIALIZE`, which means that
90
90
  // we cannot operate on unserializable data, such as functions. Save data that utilizes
91
91
  // unserializable data will typically be marked using a conditional function that evaluates to
92
92
  // false, so we skip all save data that matches this criteria.
@@ -41,6 +41,7 @@ export enum ISCFeature {
41
41
  PICKUP_INDEX_CREATION,
42
42
  PLAYER_INVENTORY,
43
43
  PONY_DETECTION,
44
+ PRESS_INPUT,
44
45
  PREVENT_CHILD_ENTITIES,
45
46
  PREVENT_COLLECTIBLE_ROTATION,
46
47
  PREVENT_GRID_ENTITY_RESPAWN,
package/src/features.ts CHANGED
@@ -38,6 +38,7 @@ import { PersistentEntities } from "./classes/features/other/PersistentEntities"
38
38
  import { PickupIndexCreation } from "./classes/features/other/PickupIndexCreation";
39
39
  import { PlayerInventory } from "./classes/features/other/PlayerInventory";
40
40
  import { PonyDetection } from "./classes/features/other/PonyDetection";
41
+ import { PressInput } from "./classes/features/other/PressInput";
41
42
  import { PreventChildEntities } from "./classes/features/other/PreventChildEntities";
42
43
  import { PreventCollectibleRotation } from "./classes/features/other/PreventCollectibleRotation";
43
44
  import { PreventGridEntityRespawn } from "./classes/features/other/PreventGridEntityRespawn";
@@ -102,6 +103,7 @@ export interface ISCFeatureToClass {
102
103
  [ISCFeature.PICKUP_INDEX_CREATION]: PickupIndexCreation;
103
104
  [ISCFeature.PLAYER_INVENTORY]: PlayerInventory;
104
105
  [ISCFeature.PONY_DETECTION]: PonyDetection;
106
+ [ISCFeature.PRESS_INPUT]: PressInput;
105
107
  [ISCFeature.PREVENT_CHILD_ENTITIES]: PreventChildEntities;
106
108
  [ISCFeature.PREVENT_COLLECTIBLE_ROTATION]: PreventCollectibleRotation;
107
109
  [ISCFeature.PREVENT_GRID_ENTITY_RESPAWN]: PreventGridEntityRespawn;
@@ -136,6 +138,7 @@ export function getFeatures(
136
138
  const disableInputs = new DisableInputs();
137
139
  const moddedElementDetection = new ModdedElementDetection();
138
140
  const ponyDetection = new PonyDetection();
141
+ const pressInput = new PressInput();
139
142
  const preventCollectibleRotation = new PreventCollectibleRotation();
140
143
  const roomClearFrame = new RoomClearFrame();
141
144
  const roomHistory = new RoomHistory();
@@ -254,7 +257,7 @@ export function getFeatures(
254
257
  [ISCFeature.FADE_IN_REMOVER]: new FadeInRemover(),
255
258
  [ISCFeature.FAST_RESET]: new FastReset(),
256
259
  [ISCFeature.FLYING_DETECTION]: new FlyingDetection(moddedElementSets),
257
- [ISCFeature.FORGOTTEN_SWITCH]: new ForgottenSwitch(),
260
+ [ISCFeature.FORGOTTEN_SWITCH]: new ForgottenSwitch(pressInput),
258
261
  [ISCFeature.EXTRA_CONSOLE_COMMANDS]: new ExtraConsoleCommands(),
259
262
  [ISCFeature.ITEM_POOL_DETECTION]: itemPoolDetection,
260
263
  [ISCFeature.MODDED_ELEMENT_DETECTION]: moddedElementDetection,
@@ -265,6 +268,7 @@ export function getFeatures(
265
268
  [ISCFeature.PICKUP_INDEX_CREATION]: pickupIndexCreation,
266
269
  [ISCFeature.PLAYER_INVENTORY]: new PlayerInventory(),
267
270
  [ISCFeature.PONY_DETECTION]: ponyDetection,
271
+ [ISCFeature.PRESS_INPUT]: pressInput,
268
272
  [ISCFeature.PREVENT_CHILD_ENTITIES]: new PreventChildEntities(),
269
273
  [ISCFeature.PREVENT_COLLECTIBLE_ROTATION]: preventCollectibleRotation,
270
274
  [ISCFeature.PREVENT_GRID_ENTITY_RESPAWN]: preventGridEntityRespawn,
@@ -26,7 +26,7 @@ const MOVEMENT_ACTIONS: readonly ButtonAction[] = [
26
26
  ButtonAction.DOWN, // 3
27
27
  ];
28
28
 
29
- const MOVEMENT_ACTIONS_SET: ReadonlySet<ButtonAction> = new Set(
29
+ export const MOVEMENT_ACTIONS_SET: ReadonlySet<ButtonAction> = new Set(
30
30
  MOVEMENT_ACTIONS,
31
31
  );
32
32
 
@@ -37,7 +37,7 @@ const SHOOTING_ACTIONS: readonly ButtonAction[] = [
37
37
  ButtonAction.SHOOT_DOWN, // 7
38
38
  ];
39
39
 
40
- const SHOOTING_ACTIONS_SET: ReadonlySet<ButtonAction> = new Set(
40
+ export const SHOOTING_ACTIONS_SET: ReadonlySet<ButtonAction> = new Set(
41
41
  SHOOTING_ACTIONS,
42
42
  );
43
43
 
@@ -338,7 +338,7 @@ export function inCrawlSpace(): boolean {
338
338
  }
339
339
 
340
340
  /**
341
- * Helper function to detect if the current room is one of the room in the Death Certificate area.
341
+ * Helper function to detect if the current room is one of the rooms in the Death Certificate area.
342
342
  */
343
343
  export function inDeathCertificateArea(): boolean {
344
344
  const roomStageID = getRoomStageID();
@@ -433,7 +433,7 @@ export const COLLECTIBLE_TYPE_TO_NAME_MAP: ReadonlyMap<
433
433
  [419, "Teleport 2.0"],
434
434
  [420, "Black Powder"],
435
435
  [421, "Kidney Bean"],
436
- [422, "Glowing Hour Glass"],
436
+ [422, "Glowing Hourglass"],
437
437
  [423, "Circle of Protection"],
438
438
  [424, "Sack Head"],
439
439
  [425, "Night Light"],