isaacscript-common 11.1.0 → 11.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -2692,6 +2692,8 @@ export declare function getCollectibleChargeType(collectibleType: CollectibleTyp
2692
2692
  /**
2693
2693
  * Helper function to get the in-game description for a collectible. Returns "Unknown" if the
2694
2694
  * provided collectible type was not valid.
2695
+ *
2696
+ * This function works for both vanilla and modded collectibles.
2695
2697
  */
2696
2698
  export declare function getCollectibleDescription(collectibleType: CollectibleType): string;
2697
2699
 
@@ -2799,6 +2801,8 @@ export declare function getCollectibleMaxCharges(collectibleType: CollectibleTyp
2799
2801
  * type is not valid.
2800
2802
  *
2801
2803
  * For example, `getCollectibleName(CollectibleType.SAD_ONION)` would return "Sad Onion".
2804
+ *
2805
+ * This function works for both vanilla and modded collectibles.
2802
2806
  */
2803
2807
  export declare function getCollectibleName(collectibleType: CollectibleType): string;
2804
2808
 
@@ -5210,6 +5214,8 @@ export declare function getTrinketArray(): readonly TrinketType[];
5210
5214
  /**
5211
5215
  * Helper function to get the in-game description for a trinket. Returns "Unknown" if the provided
5212
5216
  * trinket type was not valid.
5217
+ *
5218
+ * This function works for both vanilla and modded trinkets.
5213
5219
  */
5214
5220
  export declare function getTrinketDescription(trinketType: TrinketType): string;
5215
5221
 
@@ -5228,6 +5234,8 @@ export declare function getTrinketGfxFilename(trinketType: TrinketType): string;
5228
5234
  * not valid.
5229
5235
  *
5230
5236
  * For example, `getTrinketName(TrinketType.SWALLOWED_PENNY)` would return "Swallowed Penny".
5237
+ *
5238
+ * This function works for both vanilla and modded trinkets.
5231
5239
  */
5232
5240
  export declare function getTrinketName(trinketType: TrinketType): string;
5233
5241
 
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 11.1.0
3
+ isaacscript-common 11.2.0
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -4861,7 +4861,7 @@ return ____exports
4861
4861
  ["lua_modules.isaac-typescript-definitions.dist.package"] = function(...)
4862
4862
  return {
4863
4863
  name = "isaac-typescript-definitions",
4864
- version = "7.2.1",
4864
+ version = "7.2.3",
4865
4865
  description = "TypeScript definitions for The Binding of Isaac: Repentance.",
4866
4866
  keywords = {"isaac", "rebirth", "afterbirth", "repentance"},
4867
4867
  homepage = "https://isaacscript.github.io/",
@@ -25272,6 +25272,8 @@ function ____exports.getCollectibleChargeType(self, collectibleType)
25272
25272
  end
25273
25273
  --- Helper function to get the in-game description for a collectible. Returns "Unknown" if the
25274
25274
  -- provided collectible type was not valid.
25275
+ --
25276
+ -- This function works for both vanilla and modded collectibles.
25275
25277
  function ____exports.getCollectibleDescription(self, collectibleType)
25276
25278
  local collectibleDescription = COLLECTIBLE_DESCRIPTION_MAP:get(collectibleType)
25277
25279
  if collectibleDescription ~= nil then
@@ -25423,6 +25425,8 @@ end
25423
25425
  -- type is not valid.
25424
25426
  --
25425
25427
  -- For example, `getCollectibleName(CollectibleType.SAD_ONION)` would return "Sad Onion".
25428
+ --
25429
+ -- This function works for both vanilla and modded collectibles.
25426
25430
  function ____exports.getCollectibleName(self, collectibleType)
25427
25431
  local collectibleName = COLLECTIBLE_TYPE_TO_NAME_MAP:get(collectibleType)
25428
25432
  if collectibleName ~= nil then
@@ -29016,6 +29020,8 @@ function ____exports.getOpenTrinketSlot(self, player)
29016
29020
  end
29017
29021
  --- Helper function to get the in-game description for a trinket. Returns "Unknown" if the provided
29018
29022
  -- trinket type was not valid.
29023
+ --
29024
+ -- This function works for both vanilla and modded trinkets.
29019
29025
  function ____exports.getTrinketDescription(self, trinketType)
29020
29026
  local trinketDescription = TRINKET_DESCRIPTION_MAP:get(trinketType)
29021
29027
  if trinketDescription ~= nil then
@@ -29044,6 +29050,8 @@ end
29044
29050
  -- not valid.
29045
29051
  --
29046
29052
  -- For example, `getTrinketName(TrinketType.SWALLOWED_PENNY)` would return "Swallowed Penny".
29053
+ --
29054
+ -- This function works for both vanilla and modded trinkets.
29047
29055
  function ____exports.getTrinketName(self, trinketType)
29048
29056
  local trinketName = TRINKET_TYPE_TO_NAME_MAP:get(trinketType)
29049
29057
  if trinketName ~= nil then
@@ -31625,8 +31633,9 @@ local ____lualib = require("lualib_bundle")
31625
31633
  local Set = ____lualib.Set
31626
31634
  local __TS__New = ____lualib.__TS__New
31627
31635
  local ____exports = {}
31628
- local postPlayerInit, preGameExit, postNewLevel, postNewRoomEarly, restoreDefaultsAll, restoreDefaults, clearAndCopyAllElements, RESETTABLE_SAVE_DATA_KEYS, mod, loadedDataOnThisRun
31636
+ local postUseItemGlowingHourGlass, postPlayerInit, preGameExit, postNewLevel, postNewRoomEarly, restoreDefaultsAll, restoreDefaults, clearAndCopyAllElements, RESETTABLE_SAVE_DATA_KEYS, mod, loadedDataOnThisRun
31629
31637
  local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
31638
+ local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
31630
31639
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
31631
31640
  local ____cachedClasses = require("src.core.cachedClasses")
31632
31641
  local game = ____cachedClasses.game
@@ -31656,6 +31665,9 @@ local saveToDisk = ____save.saveToDisk
31656
31665
  local ____saveDataManagerConstants = require("src.features.saveDataManager.saveDataManagerConstants")
31657
31666
  local SAVE_DATA_MANAGER_DEBUG = ____saveDataManagerConstants.SAVE_DATA_MANAGER_DEBUG
31658
31667
  local SAVE_DATA_MANAGER_FEATURE_NAME = ____saveDataManagerConstants.SAVE_DATA_MANAGER_FEATURE_NAME
31668
+ function postUseItemGlowingHourGlass(self)
31669
+ return nil
31670
+ end
31659
31671
  function postPlayerInit(self)
31660
31672
  if mod == nil then
31661
31673
  error(("The mod for the " .. SAVE_DATA_MANAGER_FEATURE_NAME) .. " was not initialized.")
@@ -31738,6 +31750,7 @@ mod = nil
31738
31750
  loadedDataOnThisRun = false
31739
31751
  function ____exports.saveDataManagerInit(self, incomingMod)
31740
31752
  mod = incomingMod
31753
+ mod:AddCallback(ModCallback.POST_USE_ITEM, postUseItemGlowingHourGlass, CollectibleType.GLOWING_HOUR_GLASS)
31741
31754
  mod:AddCallback(ModCallback.POST_PLAYER_INIT, postPlayerInit)
31742
31755
  mod:AddCallback(ModCallback.PRE_GAME_EXIT, preGameExit)
31743
31756
  mod:AddCallback(ModCallback.POST_NEW_LEVEL, postNewLevel)
@@ -46956,7 +46969,7 @@ return ____exports
46956
46969
  ["package"] = function(...)
46957
46970
  return {
46958
46971
  name = "isaacscript-common",
46959
- version = "11.1.0",
46972
+ version = "11.2.0",
46960
46973
  description = "Helper functions and features for IsaacScript mods.",
46961
46974
  keywords = {"isaac", "rebirth", "afterbirth", "repentance"},
46962
46975
  homepage = "https://isaacscript.github.io/",
@@ -46967,7 +46980,7 @@ return {
46967
46980
  type = "commonjs",
46968
46981
  main = "dist/src/index",
46969
46982
  types = "dist/src/index.d.ts",
46970
- dependencies = {["isaac-typescript-definitions"] = "^7.2.1"}
46983
+ dependencies = {["isaac-typescript-definitions"] = "^7.2.3"}
46971
46984
  }
46972
46985
  end,
46973
46986
  ["src.functions.map"] = function(...)
@@ -50907,14 +50920,16 @@ local v = {persistent = {
50907
50920
  maze = false,
50908
50921
  blind = false,
50909
50922
  giant = false,
50910
- disableCurses = false
50911
- }, run = {
50923
+ disableCurses = false,
50924
+ damage = false,
50925
+ damageAmount = 500,
50926
+ speed = false,
50927
+ speedAmount = 2,
50928
+ tears = false,
50929
+ tearsAmount = 1,
50930
+ flight = false,
50912
50931
  chaosCardTears = false,
50913
- spamBloodRights = false,
50914
- maxDamage = false,
50915
- maxSpeed = false,
50916
- maxTears = false,
50917
- flight = false
50932
+ spamBloodRights = false
50918
50933
  }}
50919
50934
  ____exports.default = v
50920
50935
  --- The contents of the map are initialized in the "init.ts" file.
@@ -51073,8 +51088,8 @@ end
51073
51088
  --- Toggles Chaos Card tears for the player. Useful for killing enemies very fast without using
51074
51089
  -- "debug 10".
51075
51090
  function ____exports.chaosCardTears(self)
51076
- v.run.chaosCardTears = not v.run.chaosCardTears
51077
- printEnabled(nil, v.run.chaosCardTears, "Chaos Card tears")
51091
+ v.persistent.chaosCardTears = not v.persistent.chaosCardTears
51092
+ printEnabled(nil, v.persistent.chaosCardTears, "Chaos Card tears")
51078
51093
  end
51079
51094
  --- Warps to the Devil Room for the floor. If the Angel Room has already been visited or initialized,
51080
51095
  -- this will uninitialize it and make an Devil Room instead.
@@ -51513,10 +51528,19 @@ function ____exports.dadsNote(self)
51513
51528
  setStage(nil, LevelStage.DEPTHS_2, StageType.REPENTANCE)
51514
51529
  ____exports.bossRoom(nil)
51515
51530
  end
51516
- --- Toggles extremely high-damage tears for the player.
51517
- function ____exports.damage(self)
51518
- v.run.maxDamage = not v.run.maxDamage
51519
- printEnabled(nil, v.run.maxDamage, "debug damage")
51531
+ --- Toggles a set damage stat for the player. You can provide an optional argument to this command in
51532
+ -- order to set the damage to a specific amount. Default is 500.
51533
+ function ____exports.damage(self, params)
51534
+ if params ~= "" then
51535
+ local num = tonumber(params)
51536
+ if num == nil then
51537
+ printConsole(nil, "The provided damage amount is invalid: " .. params)
51538
+ return
51539
+ end
51540
+ v.persistent.damageAmount = num
51541
+ end
51542
+ v.persistent.damage = not v.persistent.damage
51543
+ printEnabled(nil, v.persistent.damage, "debug damage")
51520
51544
  end
51521
51545
  --- Toggles permanent Curse of Darkness.
51522
51546
  function ____exports.darkness(self)
@@ -51562,21 +51586,21 @@ end
51562
51586
  --- Toggles flight for the player.
51563
51587
  function ____exports.flight(self, params)
51564
51588
  local player = Isaac.GetPlayer()
51565
- v.run.flight = not v.run.flight
51589
+ v.persistent.flight = not v.persistent.flight
51566
51590
  if params == "true" then
51567
- v.run.flight = true
51591
+ v.persistent.flight = true
51568
51592
  elseif params == "false" then
51569
- v.run.flight = false
51593
+ v.persistent.flight = false
51570
51594
  end
51571
51595
  player:AddCacheFlags(CacheFlag.FLYING)
51572
51596
  player:EvaluateItems()
51573
51597
  local collectibleUsedToShowFlight = CollectibleType.FATE
51574
- if v.run.flight then
51598
+ if v.persistent.flight then
51575
51599
  addCollectibleCostume(nil, player, collectibleUsedToShowFlight)
51576
51600
  else
51577
51601
  removeCollectibleCostume(nil, player, collectibleUsedToShowFlight)
51578
51602
  end
51579
- printEnabled(nil, v.run.maxSpeed, "max speed")
51603
+ printEnabled(nil, v.persistent.speed, "max speed")
51580
51604
  end
51581
51605
  --- Alias for the "startingRoom" command.
51582
51606
  function ____exports.fool(self)
@@ -52102,8 +52126,8 @@ end
52102
52126
  --- Toggles spamming Blood Rights on every frame. Useful for killing enemies very fast without using
52103
52127
  -- "debug 10".
52104
52128
  function ____exports.spam(self)
52105
- v.run.spamBloodRights = not v.run.spamBloodRights
52106
- printEnabled(nil, v.run.spamBloodRights, "spamming Blood Rights")
52129
+ v.persistent.spamBloodRights = not v.persistent.spamBloodRights
52130
+ printEnabled(nil, v.persistent.spamBloodRights, "spamming Blood Rights")
52107
52131
  end
52108
52132
  function ____exports.spawnCollectible(self, params)
52109
52133
  if params == "" then
@@ -52170,15 +52194,25 @@ function ____exports.spawnTrinket(self, params)
52170
52194
  local centerPos = roomClass:GetCenterPos()
52171
52195
  spawnTrinketFunction(nil, trinketType, centerPos)
52172
52196
  end
52173
- --- Toggles maximum movement speed and flight for the player.
52174
- function ____exports.speed(self)
52197
+ --- Toggles a set movement speed and flight for the player. You can provide an optional argument to
52198
+ -- this command in order to set the speed to a specific amount. Default is 2.0 (which is the maximum
52199
+ -- that the stat can be set to).
52200
+ function ____exports.speed(self, params)
52175
52201
  local player = Isaac.GetPlayer()
52176
- v.run.maxSpeed = not v.run.maxSpeed
52202
+ if params ~= "" then
52203
+ local num = tonumber(params)
52204
+ if num == nil then
52205
+ printConsole(nil, "The provided speed amount is invalid: " .. params)
52206
+ return
52207
+ end
52208
+ v.persistent.damageAmount = num
52209
+ end
52210
+ v.persistent.speed = not v.persistent.speed
52177
52211
  player:AddCacheFlags(CacheFlag.SPEED)
52178
52212
  player:EvaluateItems()
52179
- local value = tostring(v.run.maxSpeed)
52213
+ local value = tostring(v.persistent.speed)
52180
52214
  ____exports.flight(nil, value)
52181
- printEnabled(nil, v.run.maxSpeed, "max speed and flight")
52215
+ printEnabled(nil, v.persistent.speed, "max speed and flight")
52182
52216
  end
52183
52217
  --- Alias for the "startingRoom" command.
52184
52218
  function ____exports.startRoom(self)
@@ -52188,14 +52222,23 @@ end
52188
52222
  function ____exports.superSecretRoom(self)
52189
52223
  warpToRoomType(nil, RoomType.SUPER_SECRET)
52190
52224
  end
52191
- --- Toggles an extremely high tears stat (e.g. fire rate) for the player, equivalent of that to soy
52192
- -- milk.
52193
- function ____exports.tears(self)
52194
- v.run.maxTears = not v.run.maxTears
52225
+ --- Toggles a set tear delay (e.g. fire rate) for the player. You can provide an optional argument to
52226
+ -- this command in order to set the tear delay to a specific amount. Default is 1 (which is
52227
+ -- equivalent to the Soy Milk tear rate).
52228
+ function ____exports.tears(self, params)
52229
+ if params ~= "" then
52230
+ local num = tonumber(params)
52231
+ if num == nil then
52232
+ printConsole(nil, "The provided tear delay amount is invalid: " .. params)
52233
+ return
52234
+ end
52235
+ v.persistent.tearsAmount = num
52236
+ end
52237
+ v.persistent.tears = not v.persistent.tears
52195
52238
  local player = Isaac.GetPlayer()
52196
52239
  player:AddCacheFlags(CacheFlag.FIRE_DELAY)
52197
52240
  player:EvaluateItems()
52198
- printEnabled(nil, v.run.maxDamage, "debug tear-rate")
52241
+ printEnabled(nil, v.persistent.damage, "debug tear-rate")
52199
52242
  end
52200
52243
  --- Alias for the "runTests" command.
52201
52244
  function ____exports.tests(self)
@@ -52270,16 +52313,13 @@ local ____lualib = require("lualib_bundle")
52270
52313
  local Map = ____lualib.Map
52271
52314
  local __TS__ObjectEntries = ____lualib.__TS__ObjectEntries
52272
52315
  local ____exports = {}
52273
- local initCommandMap, initCallbacks, postUpdate, evaluateCacheFireDelay, evaluateCacheSpeed, evaluateCacheFlying, entityTakeDmgPlayer, postCurseEval, executeCmd, postFireTear
52316
+ local initCommandMap, initCallbacks, postUpdate, evaluateCacheDamage, evaluateCacheFireDelay, evaluateCacheSpeed, evaluateCacheFlying, entityTakeDmgPlayer, postCurseEval, executeCmd
52274
52317
  local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
52275
52318
  local CacheFlag = ____isaac_2Dtypescript_2Ddefinitions.CacheFlag
52276
52319
  local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
52277
52320
  local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
52278
52321
  local LevelCurse = ____isaac_2Dtypescript_2Ddefinitions.LevelCurse
52279
52322
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
52280
- local TearVariant = ____isaac_2Dtypescript_2Ddefinitions.TearVariant
52281
- local ____constants = require("src.core.constants")
52282
- local MAX_SPEED_STAT = ____constants.MAX_SPEED_STAT
52283
52323
  local ____flag = require("src.functions.flag")
52284
52324
  local addFlag = ____flag.addFlag
52285
52325
  local bitFlags = ____flag.bitFlags
@@ -52310,37 +52350,42 @@ function initCommandMap(self)
52310
52350
  end
52311
52351
  function initCallbacks(self, mod)
52312
52352
  mod:AddCallback(ModCallback.POST_UPDATE, postUpdate)
52353
+ mod:AddCallback(ModCallback.EVALUATE_CACHE, evaluateCacheDamage, CacheFlag.DAMAGE)
52313
52354
  mod:AddCallback(ModCallback.EVALUATE_CACHE, evaluateCacheFireDelay, CacheFlag.FIRE_DELAY)
52314
52355
  mod:AddCallback(ModCallback.EVALUATE_CACHE, evaluateCacheSpeed, CacheFlag.SPEED)
52315
52356
  mod:AddCallback(ModCallback.EVALUATE_CACHE, evaluateCacheFlying, CacheFlag.FLYING)
52316
52357
  mod:AddCallback(ModCallback.ENTITY_TAKE_DMG, entityTakeDmgPlayer, EntityType.PLAYER)
52317
52358
  mod:AddCallback(ModCallback.POST_CURSE_EVAL, postCurseEval)
52318
52359
  mod:AddCallback(ModCallback.EXECUTE_CMD, executeCmd)
52319
- mod:AddCallback(ModCallback.POST_FIRE_TEAR, postFireTear)
52320
52360
  end
52321
52361
  function postUpdate(self)
52322
- if v.run.spamBloodRights then
52362
+ if v.persistent.spamBloodRights then
52323
52363
  local player = Isaac.GetPlayer()
52324
52364
  player:UseActiveItem(CollectibleType.BLOOD_RIGHTS)
52325
52365
  end
52326
52366
  end
52367
+ function evaluateCacheDamage(self, player)
52368
+ if v.persistent.damage then
52369
+ player.Damage = v.persistent.damageAmount
52370
+ end
52371
+ end
52327
52372
  function evaluateCacheFireDelay(self, player)
52328
- if v.run.maxTears then
52329
- player.FireDelay = 1
52373
+ if v.persistent.tears then
52374
+ player.FireDelay = v.persistent.tearsAmount
52330
52375
  end
52331
52376
  end
52332
52377
  function evaluateCacheSpeed(self, player)
52333
- if v.run.maxSpeed then
52334
- player.MoveSpeed = MAX_SPEED_STAT
52378
+ if v.persistent.speed then
52379
+ player.MoveSpeed = v.persistent.speedAmount
52335
52380
  end
52336
52381
  end
52337
52382
  function evaluateCacheFlying(self, player)
52338
- if v.run.flight then
52383
+ if v.persistent.flight then
52339
52384
  player.CanFly = true
52340
52385
  end
52341
52386
  end
52342
52387
  function entityTakeDmgPlayer(self, _entity, _damageAmount, _damageFlags, _damageSource, _damageCountdownFrames)
52343
- if v.run.spamBloodRights then
52388
+ if v.persistent.spamBloodRights then
52344
52389
  return false
52345
52390
  end
52346
52391
  return nil
@@ -52392,15 +52437,6 @@ function executeCmd(self, command, params)
52392
52437
  printConsole(nil, "Command: " .. commandName)
52393
52438
  commandFunction(nil, params)
52394
52439
  end
52395
- function postFireTear(self, tear)
52396
- if v.run.chaosCardTears then
52397
- tear:ChangeVariant(TearVariant.CHAOS_CARD)
52398
- end
52399
- if v.run.maxDamage then
52400
- tear.CollisionDamage = tear.CollisionDamage * 1000
52401
- tear:ChangeVariant(TearVariant.TOOTH)
52402
- end
52403
- end
52404
52440
  function ____exports.extraConsoleCommandsInit(self, mod)
52405
52441
  saveDataManager(nil, "extraConsoleCommands", v, false)
52406
52442
  initCommandMap(nil)
package/dist/package.lua CHANGED
@@ -1,6 +1,6 @@
1
1
  return {
2
2
  name = "isaacscript-common",
3
- version = "11.1.0",
3
+ version = "11.2.0",
4
4
  description = "Helper functions and features for IsaacScript mods.",
5
5
  keywords = {"isaac", "rebirth", "afterbirth", "repentance"},
6
6
  homepage = "https://isaacscript.github.io/",
@@ -11,5 +11,5 @@ return {
11
11
  type = "commonjs",
12
12
  main = "dist/src/index",
13
13
  types = "dist/src/index.d.ts",
14
- dependencies = {["isaac-typescript-definitions"] = "^7.2.1"}
14
+ dependencies = {["isaac-typescript-definitions"] = "^7.2.3"}
15
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/features/extraConsoleCommands/init.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAWxD,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAK/D"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/features/extraConsoleCommands/init.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAUxD,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAK/D"}
@@ -2,16 +2,13 @@ local ____lualib = require("lualib_bundle")
2
2
  local Map = ____lualib.Map
3
3
  local __TS__ObjectEntries = ____lualib.__TS__ObjectEntries
4
4
  local ____exports = {}
5
- local initCommandMap, initCallbacks, postUpdate, evaluateCacheFireDelay, evaluateCacheSpeed, evaluateCacheFlying, entityTakeDmgPlayer, postCurseEval, executeCmd, postFireTear
5
+ local initCommandMap, initCallbacks, postUpdate, evaluateCacheDamage, evaluateCacheFireDelay, evaluateCacheSpeed, evaluateCacheFlying, entityTakeDmgPlayer, postCurseEval, executeCmd
6
6
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
7
7
  local CacheFlag = ____isaac_2Dtypescript_2Ddefinitions.CacheFlag
8
8
  local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
9
9
  local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
10
10
  local LevelCurse = ____isaac_2Dtypescript_2Ddefinitions.LevelCurse
11
11
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
12
- local TearVariant = ____isaac_2Dtypescript_2Ddefinitions.TearVariant
13
- local ____constants = require("src.core.constants")
14
- local MAX_SPEED_STAT = ____constants.MAX_SPEED_STAT
15
12
  local ____flag = require("src.functions.flag")
16
13
  local addFlag = ____flag.addFlag
17
14
  local bitFlags = ____flag.bitFlags
@@ -42,37 +39,42 @@ function initCommandMap(self)
42
39
  end
43
40
  function initCallbacks(self, mod)
44
41
  mod:AddCallback(ModCallback.POST_UPDATE, postUpdate)
42
+ mod:AddCallback(ModCallback.EVALUATE_CACHE, evaluateCacheDamage, CacheFlag.DAMAGE)
45
43
  mod:AddCallback(ModCallback.EVALUATE_CACHE, evaluateCacheFireDelay, CacheFlag.FIRE_DELAY)
46
44
  mod:AddCallback(ModCallback.EVALUATE_CACHE, evaluateCacheSpeed, CacheFlag.SPEED)
47
45
  mod:AddCallback(ModCallback.EVALUATE_CACHE, evaluateCacheFlying, CacheFlag.FLYING)
48
46
  mod:AddCallback(ModCallback.ENTITY_TAKE_DMG, entityTakeDmgPlayer, EntityType.PLAYER)
49
47
  mod:AddCallback(ModCallback.POST_CURSE_EVAL, postCurseEval)
50
48
  mod:AddCallback(ModCallback.EXECUTE_CMD, executeCmd)
51
- mod:AddCallback(ModCallback.POST_FIRE_TEAR, postFireTear)
52
49
  end
53
50
  function postUpdate(self)
54
- if v.run.spamBloodRights then
51
+ if v.persistent.spamBloodRights then
55
52
  local player = Isaac.GetPlayer()
56
53
  player:UseActiveItem(CollectibleType.BLOOD_RIGHTS)
57
54
  end
58
55
  end
56
+ function evaluateCacheDamage(self, player)
57
+ if v.persistent.damage then
58
+ player.Damage = v.persistent.damageAmount
59
+ end
60
+ end
59
61
  function evaluateCacheFireDelay(self, player)
60
- if v.run.maxTears then
61
- player.FireDelay = 1
62
+ if v.persistent.tears then
63
+ player.FireDelay = v.persistent.tearsAmount
62
64
  end
63
65
  end
64
66
  function evaluateCacheSpeed(self, player)
65
- if v.run.maxSpeed then
66
- player.MoveSpeed = MAX_SPEED_STAT
67
+ if v.persistent.speed then
68
+ player.MoveSpeed = v.persistent.speedAmount
67
69
  end
68
70
  end
69
71
  function evaluateCacheFlying(self, player)
70
- if v.run.flight then
72
+ if v.persistent.flight then
71
73
  player.CanFly = true
72
74
  end
73
75
  end
74
76
  function entityTakeDmgPlayer(self, _entity, _damageAmount, _damageFlags, _damageSource, _damageCountdownFrames)
75
- if v.run.spamBloodRights then
77
+ if v.persistent.spamBloodRights then
76
78
  return false
77
79
  end
78
80
  return nil
@@ -124,15 +126,6 @@ function executeCmd(self, command, params)
124
126
  printConsole(nil, "Command: " .. commandName)
125
127
  commandFunction(nil, params)
126
128
  end
127
- function postFireTear(self, tear)
128
- if v.run.chaosCardTears then
129
- tear:ChangeVariant(TearVariant.CHAOS_CARD)
130
- end
131
- if v.run.maxDamage then
132
- tear.CollisionDamage = tear.CollisionDamage * 1000
133
- tear:ChangeVariant(TearVariant.TOOTH)
134
- end
135
- end
136
129
  function ____exports.extraConsoleCommandsInit(self, mod)
137
130
  saveDataManager(nil, "extraConsoleCommands", v, false)
138
131
  initCommandMap(nil)
@@ -107,8 +107,11 @@ export declare function d20(): void;
107
107
  export declare function d6(): void;
108
108
  /** Warps to the Mausoleum 2 Boss Room that has Dad's Note in it. */
109
109
  export declare function dadsNote(): void;
110
- /** Toggles extremely high-damage tears for the player. */
111
- export declare function damage(): void;
110
+ /**
111
+ * Toggles a set damage stat for the player. You can provide an optional argument to this command in
112
+ * order to set the damage to a specific amount. Default is 500.
113
+ */
114
+ export declare function damage(params: string): void;
112
115
  /** Toggles permanent Curse of Darkness. */
113
116
  export declare function darkness(): void;
114
117
  /** Alias for the "devil" command. */
@@ -360,8 +363,12 @@ export declare function spawnCollectible(params: string): void;
360
363
  /** Spawns a golden version of the specified trinket type. */
361
364
  export declare function spawnGoldenTrinket(params: string): void;
362
365
  export declare function spawnTrinket(params: string): void;
363
- /** Toggles maximum movement speed and flight for the player. */
364
- export declare function speed(): void;
366
+ /**
367
+ * Toggles a set movement speed and flight for the player. You can provide an optional argument to
368
+ * this command in order to set the speed to a specific amount. Default is 2.0 (which is the maximum
369
+ * that the stat can be set to).
370
+ */
371
+ export declare function speed(params: string): void;
365
372
  /** Alias for the "startingRoom" command. */
366
373
  export declare function startRoom(): void;
367
374
  /** Warps to the starting room of the floor. */
@@ -369,10 +376,11 @@ export declare function startingRoom(): void;
369
376
  /** Warps to the first Super Secret Room on the floor. */
370
377
  export declare function superSecretRoom(): void;
371
378
  /**
372
- * Toggles an extremely high tears stat (e.g. fire rate) for the player, equivalent of that to soy
373
- * milk.
379
+ * Toggles a set tear delay (e.g. fire rate) for the player. You can provide an optional argument to
380
+ * this command in order to set the tear delay to a specific amount. Default is 1 (which is
381
+ * equivalent to the Soy Milk tear rate).
374
382
  */
375
- export declare function tears(): void;
383
+ export declare function tears(params: string): void;
376
384
  /** Alias for the "runTests" command. */
377
385
  export declare function tests(): void;
378
386
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"listCommands.d.ts","sourceRoot":"","sources":["../../../../src/features/extraConsoleCommands/listCommands.ts"],"names":[],"mappings":"AAwIA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CA2C/C;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED,gEAAgE;AAChE,wBAAgB,MAAM,IAAI,IAAI,CAK7B;AAED,sEAAsE;AACtE,wBAAgB,OAAO,IAAI,IAAI,CAkB9B;AAED;;;GAGG;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IAAI,IAAI,CAG9B;AAED,sFAAsF;AACtF,wBAAgB,MAAM,IAAI,IAAI,CAQ7B;AAED,wFAAwF;AACxF,wBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEvC;AAED;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CA0BzC"}
1
+ {"version":3,"file":"listCommands.d.ts","sourceRoot":"","sources":["../../../../src/features/extraConsoleCommands/listCommands.ts"],"names":[],"mappings":"AAwIA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CA2C/C;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED,gEAAgE;AAChE,wBAAgB,MAAM,IAAI,IAAI,CAK7B;AAED,sEAAsE;AACtE,wBAAgB,OAAO,IAAI,IAAI,CAkB9B;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEhD;AAED,+CAA+C;AAC/C,wBAAgB,WAAW,IAAI,IAAI,CAElC;AAED,4CAA4C;AAC5C,wBAAgB,KAAK,IAAI,IAAI,CAG5B;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAcjD;AAED,2CAA2C;AAC3C,wBAAgB,EAAE,IAAI,IAAI,CAEzB;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAczC;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAc1C;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAE/C;AAED,wCAAwC;AACxC,wBAAgB,IAAI,IAAI,IAAI,CAE3B;AAED,kEAAkE;AAClE,wBAAgB,YAAY,IAAI,IAAI,CAEnC;AAED,iDAAiD;AACjD,wBA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D;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAsB1C;AAED,4CAA4C;AAC5C,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED,+CAA+C;AAC/C,wBAAgB,YAAY,IAAI,IAAI,CAInC;AAED,yDAAyD;AACzD,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAkB1C;AAED,wCAAwC;AACxC,wBAAgB,KAAK,IAAI,IAAI,CAE5B;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CA4CnD;AAED,6CAA6C;AAC7C,wBAAgB,QAAQ,IAAI,IAAI,CAE/B;AAED,qDAAqD;AACrD,wBAAgB,YAAY,IAAI,IAAI,CAEnC;AAED,yDAAyD;AACzD,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAED,8CAA8C;AAC9C,wBAAgB,OAAO,IAAI,IAAI,CAG9B;AAED,sFAAsF;AACtF,wBAAgB,MAAM,IAAI,IAAI,CAQ7B;AAED,wFAAwF;AACxF,wBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEvC;AAED;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CA0BzC"}
@@ -143,8 +143,8 @@ end
143
143
  --- Toggles Chaos Card tears for the player. Useful for killing enemies very fast without using
144
144
  -- "debug 10".
145
145
  function ____exports.chaosCardTears(self)
146
- v.run.chaosCardTears = not v.run.chaosCardTears
147
- printEnabled(nil, v.run.chaosCardTears, "Chaos Card tears")
146
+ v.persistent.chaosCardTears = not v.persistent.chaosCardTears
147
+ printEnabled(nil, v.persistent.chaosCardTears, "Chaos Card tears")
148
148
  end
149
149
  --- Warps to the Devil Room for the floor. If the Angel Room has already been visited or initialized,
150
150
  -- this will uninitialize it and make an Devil Room instead.
@@ -583,10 +583,19 @@ function ____exports.dadsNote(self)
583
583
  setStage(nil, LevelStage.DEPTHS_2, StageType.REPENTANCE)
584
584
  ____exports.bossRoom(nil)
585
585
  end
586
- --- Toggles extremely high-damage tears for the player.
587
- function ____exports.damage(self)
588
- v.run.maxDamage = not v.run.maxDamage
589
- printEnabled(nil, v.run.maxDamage, "debug damage")
586
+ --- Toggles a set damage stat for the player. You can provide an optional argument to this command in
587
+ -- order to set the damage to a specific amount. Default is 500.
588
+ function ____exports.damage(self, params)
589
+ if params ~= "" then
590
+ local num = tonumber(params)
591
+ if num == nil then
592
+ printConsole(nil, "The provided damage amount is invalid: " .. params)
593
+ return
594
+ end
595
+ v.persistent.damageAmount = num
596
+ end
597
+ v.persistent.damage = not v.persistent.damage
598
+ printEnabled(nil, v.persistent.damage, "debug damage")
590
599
  end
591
600
  --- Toggles permanent Curse of Darkness.
592
601
  function ____exports.darkness(self)
@@ -632,21 +641,21 @@ end
632
641
  --- Toggles flight for the player.
633
642
  function ____exports.flight(self, params)
634
643
  local player = Isaac.GetPlayer()
635
- v.run.flight = not v.run.flight
644
+ v.persistent.flight = not v.persistent.flight
636
645
  if params == "true" then
637
- v.run.flight = true
646
+ v.persistent.flight = true
638
647
  elseif params == "false" then
639
- v.run.flight = false
648
+ v.persistent.flight = false
640
649
  end
641
650
  player:AddCacheFlags(CacheFlag.FLYING)
642
651
  player:EvaluateItems()
643
652
  local collectibleUsedToShowFlight = CollectibleType.FATE
644
- if v.run.flight then
653
+ if v.persistent.flight then
645
654
  addCollectibleCostume(nil, player, collectibleUsedToShowFlight)
646
655
  else
647
656
  removeCollectibleCostume(nil, player, collectibleUsedToShowFlight)
648
657
  end
649
- printEnabled(nil, v.run.maxSpeed, "max speed")
658
+ printEnabled(nil, v.persistent.speed, "max speed")
650
659
  end
651
660
  --- Alias for the "startingRoom" command.
652
661
  function ____exports.fool(self)
@@ -1172,8 +1181,8 @@ end
1172
1181
  --- Toggles spamming Blood Rights on every frame. Useful for killing enemies very fast without using
1173
1182
  -- "debug 10".
1174
1183
  function ____exports.spam(self)
1175
- v.run.spamBloodRights = not v.run.spamBloodRights
1176
- printEnabled(nil, v.run.spamBloodRights, "spamming Blood Rights")
1184
+ v.persistent.spamBloodRights = not v.persistent.spamBloodRights
1185
+ printEnabled(nil, v.persistent.spamBloodRights, "spamming Blood Rights")
1177
1186
  end
1178
1187
  function ____exports.spawnCollectible(self, params)
1179
1188
  if params == "" then
@@ -1240,15 +1249,25 @@ function ____exports.spawnTrinket(self, params)
1240
1249
  local centerPos = roomClass:GetCenterPos()
1241
1250
  spawnTrinketFunction(nil, trinketType, centerPos)
1242
1251
  end
1243
- --- Toggles maximum movement speed and flight for the player.
1244
- function ____exports.speed(self)
1252
+ --- Toggles a set movement speed and flight for the player. You can provide an optional argument to
1253
+ -- this command in order to set the speed to a specific amount. Default is 2.0 (which is the maximum
1254
+ -- that the stat can be set to).
1255
+ function ____exports.speed(self, params)
1245
1256
  local player = Isaac.GetPlayer()
1246
- v.run.maxSpeed = not v.run.maxSpeed
1257
+ if params ~= "" then
1258
+ local num = tonumber(params)
1259
+ if num == nil then
1260
+ printConsole(nil, "The provided speed amount is invalid: " .. params)
1261
+ return
1262
+ end
1263
+ v.persistent.damageAmount = num
1264
+ end
1265
+ v.persistent.speed = not v.persistent.speed
1247
1266
  player:AddCacheFlags(CacheFlag.SPEED)
1248
1267
  player:EvaluateItems()
1249
- local value = tostring(v.run.maxSpeed)
1268
+ local value = tostring(v.persistent.speed)
1250
1269
  ____exports.flight(nil, value)
1251
- printEnabled(nil, v.run.maxSpeed, "max speed and flight")
1270
+ printEnabled(nil, v.persistent.speed, "max speed and flight")
1252
1271
  end
1253
1272
  --- Alias for the "startingRoom" command.
1254
1273
  function ____exports.startRoom(self)
@@ -1258,14 +1277,23 @@ end
1258
1277
  function ____exports.superSecretRoom(self)
1259
1278
  warpToRoomType(nil, RoomType.SUPER_SECRET)
1260
1279
  end
1261
- --- Toggles an extremely high tears stat (e.g. fire rate) for the player, equivalent of that to soy
1262
- -- milk.
1263
- function ____exports.tears(self)
1264
- v.run.maxTears = not v.run.maxTears
1280
+ --- Toggles a set tear delay (e.g. fire rate) for the player. You can provide an optional argument to
1281
+ -- this command in order to set the tear delay to a specific amount. Default is 1 (which is
1282
+ -- equivalent to the Soy Milk tear rate).
1283
+ function ____exports.tears(self, params)
1284
+ if params ~= "" then
1285
+ local num = tonumber(params)
1286
+ if num == nil then
1287
+ printConsole(nil, "The provided tear delay amount is invalid: " .. params)
1288
+ return
1289
+ end
1290
+ v.persistent.tearsAmount = num
1291
+ end
1292
+ v.persistent.tears = not v.persistent.tears
1265
1293
  local player = Isaac.GetPlayer()
1266
1294
  player:AddCacheFlags(CacheFlag.FIRE_DELAY)
1267
1295
  player:EvaluateItems()
1268
- printEnabled(nil, v.run.maxDamage, "debug tear-rate")
1296
+ printEnabled(nil, v.persistent.damage, "debug tear-rate")
1269
1297
  end
1270
1298
  --- Alias for the "runTests" command.
1271
1299
  function ____exports.tests(self)
@@ -9,14 +9,15 @@ declare const v: {
9
9
  blind: boolean;
10
10
  giant: boolean;
11
11
  disableCurses: boolean;
12
- };
13
- run: {
12
+ damage: boolean;
13
+ damageAmount: number;
14
+ speed: boolean;
15
+ speedAmount: number;
16
+ tears: boolean;
17
+ tearsAmount: number;
18
+ flight: boolean;
14
19
  chaosCardTears: boolean;
15
20
  spamBloodRights: boolean;
16
- maxDamage: boolean;
17
- maxSpeed: boolean;
18
- maxTears: boolean;
19
- flight: boolean;
20
21
  };
21
22
  };
22
23
  export default v;
@@ -1 +1 @@
1
- {"version":3,"file":"v.d.ts","sourceRoot":"","sources":["../../../../src/features/extraConsoleCommands/v.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;CAsBN,CAAC;AACF,eAAe,CAAC,CAAC;AAEjB,qEAAqE;AACrE,eAAO,MAAM,+BAA+B,uBAEjC,MAAM,KAAK,IAAI,CACvB,CAAC;AAEJ;;;;GAIG;AACH,wBAAgB,iCAAiC,IAAI,OAAO,CAE3D"}
1
+ {"version":3,"file":"v.d.ts","sourceRoot":"","sources":["../../../../src/features/extraConsoleCommands/v.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;CA0BN,CAAC;AACF,eAAe,CAAC,CAAC;AAEjB,qEAAqE;AACrE,eAAO,MAAM,+BAA+B,uBAEjC,MAAM,KAAK,IAAI,CACvB,CAAC;AAEJ;;;;GAIG;AACH,wBAAgB,iCAAiC,IAAI,OAAO,CAE3D"}
@@ -11,14 +11,16 @@ local v = {persistent = {
11
11
  maze = false,
12
12
  blind = false,
13
13
  giant = false,
14
- disableCurses = false
15
- }, run = {
14
+ disableCurses = false,
15
+ damage = false,
16
+ damageAmount = 500,
17
+ speed = false,
18
+ speedAmount = 2,
19
+ tears = false,
20
+ tearsAmount = 1,
21
+ flight = false,
16
22
  chaosCardTears = false,
17
- spamBloodRights = false,
18
- maxDamage = false,
19
- maxSpeed = false,
20
- maxTears = false,
21
- flight = false
23
+ spamBloodRights = false
22
24
  }}
23
25
  ____exports.default = v
24
26
  --- The contents of the map are initialized in the "init.ts" file.
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../src/features/saveDataManager/main.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAMtD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAsBrD,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAUlE;AAqFD,wBAAgB,sBAAsB,CACpC,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,GACvB,IAAI,CA4CN;AAiBD,wBAAgB,wBAAwB,IAAI,IAAI,CAM/C;AAED,wBAAgB,wBAAwB,IAAI,IAAI,CAM/C"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../src/features/saveDataManager/main.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAMtD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAsBrD,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAelE;AA2FD,wBAAgB,sBAAsB,CACpC,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,GACvB,IAAI,CA4CN;AAiBD,wBAAgB,wBAAwB,IAAI,IAAI,CAM/C;AAED,wBAAgB,wBAAwB,IAAI,IAAI,CAM/C"}
@@ -2,8 +2,9 @@ local ____lualib = require("lualib_bundle")
2
2
  local Set = ____lualib.Set
3
3
  local __TS__New = ____lualib.__TS__New
4
4
  local ____exports = {}
5
- local postPlayerInit, preGameExit, postNewLevel, postNewRoomEarly, restoreDefaultsAll, restoreDefaults, clearAndCopyAllElements, RESETTABLE_SAVE_DATA_KEYS, mod, loadedDataOnThisRun
5
+ local postUseItemGlowingHourGlass, postPlayerInit, preGameExit, postNewLevel, postNewRoomEarly, restoreDefaultsAll, restoreDefaults, clearAndCopyAllElements, RESETTABLE_SAVE_DATA_KEYS, mod, loadedDataOnThisRun
6
6
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
7
+ local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
7
8
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
8
9
  local ____cachedClasses = require("src.core.cachedClasses")
9
10
  local game = ____cachedClasses.game
@@ -33,6 +34,9 @@ local saveToDisk = ____save.saveToDisk
33
34
  local ____saveDataManagerConstants = require("src.features.saveDataManager.saveDataManagerConstants")
34
35
  local SAVE_DATA_MANAGER_DEBUG = ____saveDataManagerConstants.SAVE_DATA_MANAGER_DEBUG
35
36
  local SAVE_DATA_MANAGER_FEATURE_NAME = ____saveDataManagerConstants.SAVE_DATA_MANAGER_FEATURE_NAME
37
+ function postUseItemGlowingHourGlass(self)
38
+ return nil
39
+ end
36
40
  function postPlayerInit(self)
37
41
  if mod == nil then
38
42
  error(("The mod for the " .. SAVE_DATA_MANAGER_FEATURE_NAME) .. " was not initialized.")
@@ -115,6 +119,7 @@ mod = nil
115
119
  loadedDataOnThisRun = false
116
120
  function ____exports.saveDataManagerInit(self, incomingMod)
117
121
  mod = incomingMod
122
+ mod:AddCallback(ModCallback.POST_USE_ITEM, postUseItemGlowingHourGlass, CollectibleType.GLOWING_HOUR_GLASS)
118
123
  mod:AddCallback(ModCallback.POST_PLAYER_INIT, postPlayerInit)
119
124
  mod:AddCallback(ModCallback.PRE_GAME_EXIT, preGameExit)
120
125
  mod:AddCallback(ModCallback.POST_NEW_LEVEL, postNewLevel)
@@ -11,6 +11,8 @@ export declare function getCollectibleChargeType(collectibleType: CollectibleTyp
11
11
  /**
12
12
  * Helper function to get the in-game description for a collectible. Returns "Unknown" if the
13
13
  * provided collectible type was not valid.
14
+ *
15
+ * This function works for both vanilla and modded collectibles.
14
16
  */
15
17
  export declare function getCollectibleDescription(collectibleType: CollectibleType): string;
16
18
  /**
@@ -103,6 +105,8 @@ export declare function getCollectibleMaxCharges(collectibleType: CollectibleTyp
103
105
  * type is not valid.
104
106
  *
105
107
  * For example, `getCollectibleName(CollectibleType.SAD_ONION)` would return "Sad Onion".
108
+ *
109
+ * This function works for both vanilla and modded collectibles.
106
110
  */
107
111
  export declare function getCollectibleName(collectibleType: CollectibleType): string;
108
112
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"collectibles.d.ts","sourceRoot":"","sources":["../../../src/functions/collectibles.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EAEvB,eAAe,EAEf,oBAAoB,EACpB,aAAa,E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G,IAAI,CASnE;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAUnE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAuBtE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,YAAY,EACzB,OAAO,EAAE,MAAM,GAAG,SAAS,GAC1B,IAAI,CAqBN;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,YAAY,EACzB,kBAAkB,EAAE,eAAe,GAClC,IAAI,CA2BN;AAED;;;GAGG;AACH,wBAAgB,qCAAqC,IAAI,IAAI,CAK5D"}
1
+ {"version":3,"file":"collectibles.d.ts","sourceRoot":"","sources":["../../../src/functions/collectibles.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EAEvB,eAAe,EAEf,oBAAoB,EACpB,aAAa,EAEb,QAAQ,EACR,WAAW,EAGZ,MAAM,8BAA8B,CAAC;AAgBtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAwB7D,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAEtE;AAED,6FAA6F;AAC7F,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAsBT;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,eAAe,EAAE,eAAe,GAC/B,oBAAoB,CAOtB;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,eAAe,EAAE,eAAe,GAC/B,MAAM,CAeR;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,eAAe,EAAE,eAAe,GAC/B,GAAG,CAYL;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,eAAe,EAAE,eAAe,EAChC,MAAM,EAAE,YAAY,GACnB,WAAW,CAyBb;AAED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GAC/B,OAAO,CAET;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,eAAe,GAC/B,OAAO,CAGT;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,eAAe,EAAE,eAAe,GAC/B,OAAO,CAET;AAED,wBAAgB,sBAAsB,CACpC,eAAe,EAAE,eAAe,GAC/B,OAAO,CAGT;AAED,wBAAgB,wBAAwB,CACtC,eAAe,EAAE,eAAe,GAC/B,OAAO,CAET;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,eAAe,EAAE,eAAe,GAAG,MAAM,CAa7E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gCAAgC,CAC9C,eAAe,EAAE,eAAe,GAC/B,IAAI,CAQN;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAS5E;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CASnE;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAUnE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAuBtE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,YAAY,EACzB,OAAO,EAAE,MAAM,GAAG,SAAS,GAC1B,IAAI,CAqBN;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,YAAY,EACzB,kBAAkB,EAAE,eAAe,GAClC,IAAI,CA2BN;AAED;;;GAGG;AACH,wBAAgB,qCAAqC,IAAI,IAAI,CAK5D"}
@@ -142,6 +142,8 @@ function ____exports.getCollectibleChargeType(self, collectibleType)
142
142
  end
143
143
  --- Helper function to get the in-game description for a collectible. Returns "Unknown" if the
144
144
  -- provided collectible type was not valid.
145
+ --
146
+ -- This function works for both vanilla and modded collectibles.
145
147
  function ____exports.getCollectibleDescription(self, collectibleType)
146
148
  local collectibleDescription = COLLECTIBLE_DESCRIPTION_MAP:get(collectibleType)
147
149
  if collectibleDescription ~= nil then
@@ -293,6 +295,8 @@ end
293
295
  -- type is not valid.
294
296
  --
295
297
  -- For example, `getCollectibleName(CollectibleType.SAD_ONION)` would return "Sad Onion".
298
+ --
299
+ -- This function works for both vanilla and modded collectibles.
296
300
  function ____exports.getCollectibleName(self, collectibleType)
297
301
  local collectibleName = COLLECTIBLE_TYPE_TO_NAME_MAP:get(collectibleType)
298
302
  if collectibleName ~= nil then
@@ -24,6 +24,8 @@ export declare function getOpenTrinketSlot(player: EntityPlayer): int | undefine
24
24
  /**
25
25
  * Helper function to get the in-game description for a trinket. Returns "Unknown" if the provided
26
26
  * trinket type was not valid.
27
+ *
28
+ * This function works for both vanilla and modded trinkets.
27
29
  */
28
30
  export declare function getTrinketDescription(trinketType: TrinketType): string;
29
31
  /**
@@ -40,6 +42,8 @@ export declare function getTrinketGfxFilename(trinketType: TrinketType): string;
40
42
  * not valid.
41
43
  *
42
44
  * For example, `getTrinketName(TrinketType.SWALLOWED_PENNY)` would return "Swallowed Penny".
45
+ *
46
+ * This function works for both vanilla and modded trinkets.
43
47
  */
44
48
  export declare function getTrinketName(trinketType: TrinketType): string;
45
49
  /** Helper function to get an array that represents every vanilla trinket type. */
@@ -1 +1 @@
1
- {"version":3,"file":"trinkets.d.ts","sourceRoot":"","sources":["../../../src/functions/trinkets.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAkCtC;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAE1E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,GAAG,GAAG,SAAS,CAkBxE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,WAAW,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,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,CAc/D;AAED,kFAAkF;AAClF,wBAAgB,sBAAsB,IAAI,WAAW,EAAE,CAEtD;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAOhE;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAErE;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAErE;AAED,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAEtE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,CASjE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,MAAM,GAAG,SAAS,GAC1B,IAAI,CAeN"}
@@ -75,6 +75,8 @@ function ____exports.getOpenTrinketSlot(self, player)
75
75
  end
76
76
  --- Helper function to get the in-game description for a trinket. Returns "Unknown" if the provided
77
77
  -- trinket type was not valid.
78
+ --
79
+ -- This function works for both vanilla and modded trinkets.
78
80
  function ____exports.getTrinketDescription(self, trinketType)
79
81
  local trinketDescription = TRINKET_DESCRIPTION_MAP:get(trinketType)
80
82
  if trinketDescription ~= nil then
@@ -103,6 +105,8 @@ end
103
105
  -- not valid.
104
106
  --
105
107
  -- For example, `getTrinketName(TrinketType.SWALLOWED_PENNY)` would return "Swallowed Penny".
108
+ --
109
+ -- This function works for both vanilla and modded trinkets.
106
110
  function ____exports.getTrinketName(self, trinketType)
107
111
  local trinketName = TRINKET_TYPE_TO_NAME_MAP:get(trinketType)
108
112
  if trinketName ~= nil then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "11.1.0",
3
+ "version": "11.2.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": "^7.2.1"
25
+ "isaac-typescript-definitions": "^7.2.3"
26
26
  }
27
27
  }
@@ -5,10 +5,8 @@ import {
5
5
  EntityType,
6
6
  LevelCurse,
7
7
  ModCallback,
8
- TearVariant,
9
8
  } from "isaac-typescript-definitions";
10
9
  import { ModUpgraded } from "../../classes/ModUpgraded";
11
- import { MAX_SPEED_STAT } from "../../core/constants";
12
10
  import { addFlag, bitFlags } from "../../functions/flag";
13
11
  import { getMapPartialMatch } from "../../functions/map";
14
12
  import { printConsole } from "../../functions/utils";
@@ -37,6 +35,11 @@ function initCommandMap() {
37
35
 
38
36
  function initCallbacks(mod: ModUpgraded) {
39
37
  mod.AddCallback(ModCallback.POST_UPDATE, postUpdate); // 1
38
+ mod.AddCallback(
39
+ ModCallback.EVALUATE_CACHE,
40
+ evaluateCacheDamage,
41
+ CacheFlag.DAMAGE, // 1 << 0
42
+ ); // 8
40
43
  mod.AddCallback(
41
44
  ModCallback.EVALUATE_CACHE,
42
45
  evaluateCacheFireDelay,
@@ -59,37 +62,44 @@ function initCallbacks(mod: ModUpgraded) {
59
62
  ); // 11
60
63
  mod.AddCallback(ModCallback.POST_CURSE_EVAL, postCurseEval); // 12
61
64
  mod.AddCallback(ModCallback.EXECUTE_CMD, executeCmd); // 22
62
- mod.AddCallback(ModCallback.POST_FIRE_TEAR, postFireTear); // 61
63
65
  }
64
66
 
65
67
  // ModCallback.POST_UPDATE (1)
66
68
  function postUpdate() {
67
- if (v.run.spamBloodRights) {
69
+ if (v.persistent.spamBloodRights) {
68
70
  const player = Isaac.GetPlayer();
69
71
  player.UseActiveItem(CollectibleType.BLOOD_RIGHTS);
70
72
  }
71
73
  }
72
74
 
75
+ // ModCallback.EVALUATE_CACHE (8)
76
+ // CacheFlag.DAMAGE (1 << 0)
77
+ function evaluateCacheDamage(player: EntityPlayer) {
78
+ if (v.persistent.damage) {
79
+ player.Damage = v.persistent.damageAmount;
80
+ }
81
+ }
82
+
73
83
  // ModCallback.EVALUATE_CACHE (8)
74
84
  // CacheFlag.FIRE_DELAY (1 << 1)
75
85
  function evaluateCacheFireDelay(player: EntityPlayer) {
76
- if (v.run.maxTears) {
77
- player.FireDelay = 1; // Equivalent to Soy Milk
86
+ if (v.persistent.tears) {
87
+ player.FireDelay = v.persistent.tearsAmount; // Equivalent to Soy Milk
78
88
  }
79
89
  }
80
90
 
81
91
  // ModCallback.EVALUATE_CACHE (8)
82
92
  // CacheFlag.SPEED (1 << 4)
83
93
  function evaluateCacheSpeed(player: EntityPlayer) {
84
- if (v.run.maxSpeed) {
85
- player.MoveSpeed = MAX_SPEED_STAT;
94
+ if (v.persistent.speed) {
95
+ player.MoveSpeed = v.persistent.speedAmount;
86
96
  }
87
97
  }
88
98
 
89
99
  // ModCallback.EVALUATE_CACHE (8)
90
100
  // CacheFlag.FLYING (1 << 7)
91
101
  function evaluateCacheFlying(player: EntityPlayer) {
92
- if (v.run.flight) {
102
+ if (v.persistent.flight) {
93
103
  player.CanFly = true;
94
104
  }
95
105
  }
@@ -103,7 +113,7 @@ function entityTakeDmgPlayer(
103
113
  _damageSource: EntityRef,
104
114
  _damageCountdownFrames: int,
105
115
  ) {
106
- if (v.run.spamBloodRights) {
116
+ if (v.persistent.spamBloodRights) {
107
117
  return false;
108
118
  }
109
119
 
@@ -178,19 +188,3 @@ function executeCmd(command: string, params: string) {
178
188
  printConsole(`Command: ${commandName}`);
179
189
  commandFunction(params);
180
190
  }
181
-
182
- // ModCallback.POST_FIRE_TEAR (61)
183
- function postFireTear(tear: EntityTear) {
184
- if (v.run.chaosCardTears) {
185
- tear.ChangeVariant(TearVariant.CHAOS_CARD);
186
- }
187
-
188
- if (v.run.maxDamage) {
189
- // If we increase the damage stat too high, then the tears will become bigger than the screen.
190
- // Instead, increase the collision damage of the tear.
191
- tear.CollisionDamage *= 1000;
192
-
193
- // Change the visual of the tear so that it is more clear that we have debug-damage turned on.
194
- tear.ChangeVariant(TearVariant.TOOTH);
195
- }
196
- }
@@ -407,8 +407,8 @@ export function cc(): void {
407
407
  * "debug 10".
408
408
  */
409
409
  export function chaosCardTears(): void {
410
- v.run.chaosCardTears = !v.run.chaosCardTears;
411
- printEnabled(v.run.chaosCardTears, "Chaos Card tears");
410
+ v.persistent.chaosCardTears = !v.persistent.chaosCardTears;
411
+ printEnabled(v.persistent.chaosCardTears, "Chaos Card tears");
412
412
  }
413
413
 
414
414
  /**
@@ -529,10 +529,23 @@ export function dadsNote(): void {
529
529
  bossRoom();
530
530
  }
531
531
 
532
- /** Toggles extremely high-damage tears for the player. */
533
- export function damage(): void {
534
- v.run.maxDamage = !v.run.maxDamage;
535
- printEnabled(v.run.maxDamage, "debug damage");
532
+ /**
533
+ * Toggles a set damage stat for the player. You can provide an optional argument to this command in
534
+ * order to set the damage to a specific amount. Default is 500.
535
+ */
536
+ export function damage(params: string): void {
537
+ if (params !== "") {
538
+ const num = tonumber(params);
539
+ if (num === undefined) {
540
+ printConsole(`The provided damage amount is invalid: ${params}`);
541
+ return;
542
+ }
543
+
544
+ v.persistent.damageAmount = num;
545
+ }
546
+
547
+ v.persistent.damage = !v.persistent.damage;
548
+ printEnabled(v.persistent.damage, "debug damage");
536
549
  }
537
550
 
538
551
  /** Toggles permanent Curse of Darkness. */
@@ -599,26 +612,26 @@ export function eternalHearts(params: string): void {
599
612
  export function flight(params: string): void {
600
613
  const player = Isaac.GetPlayer();
601
614
 
602
- v.run.flight = !v.run.flight;
615
+ v.persistent.flight = !v.persistent.flight;
603
616
 
604
617
  // Optionally, allow the toggle to be overridden by a parameter.
605
618
  if (params === "true") {
606
- v.run.flight = true;
619
+ v.persistent.flight = true;
607
620
  } else if (params === "false") {
608
- v.run.flight = false;
621
+ v.persistent.flight = false;
609
622
  }
610
623
 
611
624
  player.AddCacheFlags(CacheFlag.FLYING);
612
625
  player.EvaluateItems();
613
626
 
614
627
  const collectibleUsedToShowFlight = CollectibleType.FATE;
615
- if (v.run.flight) {
628
+ if (v.persistent.flight) {
616
629
  addCollectibleCostume(player, collectibleUsedToShowFlight);
617
630
  } else {
618
631
  removeCollectibleCostume(player, collectibleUsedToShowFlight);
619
632
  }
620
633
 
621
- printEnabled(v.run.maxSpeed, "max speed");
634
+ printEnabled(v.persistent.speed, "max speed");
622
635
  }
623
636
 
624
637
  /** Alias for the "startingRoom" command. */
@@ -1330,8 +1343,8 @@ export function sounds(): void {
1330
1343
  * "debug 10".
1331
1344
  */
1332
1345
  export function spam(): void {
1333
- v.run.spamBloodRights = !v.run.spamBloodRights;
1334
- printEnabled(v.run.spamBloodRights, "spamming Blood Rights");
1346
+ v.persistent.spamBloodRights = !v.persistent.spamBloodRights;
1347
+ printEnabled(v.persistent.spamBloodRights, "spamming Blood Rights");
1335
1348
  }
1336
1349
 
1337
1350
  export function spawnCollectible(params: string): void {
@@ -1417,19 +1430,33 @@ export function spawnTrinket(params: string): void {
1417
1430
  spawnTrinketFunction(trinketType, centerPos);
1418
1431
  }
1419
1432
 
1420
- /** Toggles maximum movement speed and flight for the player. */
1421
- export function speed(): void {
1433
+ /**
1434
+ * Toggles a set movement speed and flight for the player. You can provide an optional argument to
1435
+ * this command in order to set the speed to a specific amount. Default is 2.0 (which is the maximum
1436
+ * that the stat can be set to).
1437
+ */
1438
+ export function speed(params: string): void {
1422
1439
  const player = Isaac.GetPlayer();
1423
1440
 
1424
- v.run.maxSpeed = !v.run.maxSpeed;
1441
+ if (params !== "") {
1442
+ const num = tonumber(params);
1443
+ if (num === undefined) {
1444
+ printConsole(`The provided speed amount is invalid: ${params}`);
1445
+ return;
1446
+ }
1447
+
1448
+ v.persistent.damageAmount = num;
1449
+ }
1450
+
1451
+ v.persistent.speed = !v.persistent.speed;
1425
1452
 
1426
1453
  player.AddCacheFlags(CacheFlag.SPEED);
1427
1454
  player.EvaluateItems();
1428
1455
 
1429
- const value = tostring(v.run.maxSpeed);
1456
+ const value = tostring(v.persistent.speed);
1430
1457
  flight(value);
1431
1458
 
1432
- printEnabled(v.run.maxSpeed, "max speed and flight");
1459
+ printEnabled(v.persistent.speed, "max speed and flight");
1433
1460
  }
1434
1461
 
1435
1462
  /** Alias for the "startingRoom" command. */
@@ -1450,17 +1477,28 @@ export function superSecretRoom(): void {
1450
1477
  }
1451
1478
 
1452
1479
  /**
1453
- * Toggles an extremely high tears stat (e.g. fire rate) for the player, equivalent of that to soy
1454
- * milk.
1480
+ * Toggles a set tear delay (e.g. fire rate) for the player. You can provide an optional argument to
1481
+ * this command in order to set the tear delay to a specific amount. Default is 1 (which is
1482
+ * equivalent to the Soy Milk tear rate).
1455
1483
  */
1456
- export function tears(): void {
1457
- v.run.maxTears = !v.run.maxTears;
1484
+ export function tears(params: string): void {
1485
+ if (params !== "") {
1486
+ const num = tonumber(params);
1487
+ if (num === undefined) {
1488
+ printConsole(`The provided tear delay amount is invalid: ${params}`);
1489
+ return;
1490
+ }
1491
+
1492
+ v.persistent.tearsAmount = num;
1493
+ }
1494
+
1495
+ v.persistent.tears = !v.persistent.tears;
1458
1496
 
1459
1497
  const player = Isaac.GetPlayer();
1460
1498
  player.AddCacheFlags(CacheFlag.FIRE_DELAY);
1461
1499
  player.EvaluateItems();
1462
1500
 
1463
- printEnabled(v.run.maxDamage, "debug tear-rate");
1501
+ printEnabled(v.persistent.damage, "debug tear-rate");
1464
1502
  }
1465
1503
 
1466
1504
  /** Alias for the "runTests" command. */
@@ -1,5 +1,6 @@
1
1
  const v = {
2
2
  persistent: {
3
+ // Curses
3
4
  darkness: false, // 1
4
5
  labyrinth: false, // 2
5
6
  lost: false, // 3
@@ -8,17 +9,20 @@ const v = {
8
9
  maze: false, // 6
9
10
  blind: false, // 7
10
11
  giant: false, // 8
11
-
12
12
  disableCurses: false,
13
- },
14
13
 
15
- run: {
14
+ // Stats
15
+ damage: false,
16
+ damageAmount: 500,
17
+ speed: false,
18
+ speedAmount: 2.0,
19
+ tears: false,
20
+ tearsAmount: 1, // In tear delay, not tears stat
21
+ flight: false,
22
+
23
+ // Other
16
24
  chaosCardTears: false,
17
25
  spamBloodRights: false,
18
- maxDamage: false,
19
- maxSpeed: false,
20
- maxTears: false,
21
- flight: false,
22
26
  },
23
27
  };
24
28
  export default v;
@@ -1,4 +1,4 @@
1
- import { ModCallback } from "isaac-typescript-definitions";
1
+ import { CollectibleType, ModCallback } from "isaac-typescript-definitions";
2
2
  import { ModUpgraded } from "../../classes/ModUpgraded";
3
3
  import { game } from "../../core/cachedClasses";
4
4
  import { ModCallbackCustom } from "../../enums/ModCallbackCustom";
@@ -33,6 +33,11 @@ let loadedDataOnThisRun = false;
33
33
  export function saveDataManagerInit(incomingMod: ModUpgraded): void {
34
34
  mod = incomingMod;
35
35
 
36
+ mod.AddCallback(
37
+ ModCallback.POST_USE_ITEM,
38
+ postUseItemGlowingHourGlass,
39
+ CollectibleType.GLOWING_HOUR_GLASS,
40
+ ); // 3
36
41
  mod.AddCallback(ModCallback.POST_PLAYER_INIT, postPlayerInit); // 9
37
42
  mod.AddCallback(ModCallback.PRE_GAME_EXIT, preGameExit); // 17
38
43
  mod.AddCallback(ModCallback.POST_NEW_LEVEL, postNewLevel); // 18
@@ -42,6 +47,12 @@ export function saveDataManagerInit(incomingMod: ModUpgraded): void {
42
47
  ); // 19
43
48
  }
44
49
 
50
+ // ModCallback.POST_USE_ITEM (3)
51
+ // CollectibleType.GLOWING_HOUR_GLASS (422)
52
+ function postUseItemGlowingHourGlass() {
53
+ return undefined;
54
+ }
55
+
45
56
  // ModCallback.POST_PLAYER_INIT (9)
46
57
  function postPlayerInit() {
47
58
  if (mod === null) {
@@ -100,6 +100,8 @@ export function getCollectibleChargeType(
100
100
  /**
101
101
  * Helper function to get the in-game description for a collectible. Returns "Unknown" if the
102
102
  * provided collectible type was not valid.
103
+ *
104
+ * This function works for both vanilla and modded collectibles.
103
105
  */
104
106
  export function getCollectibleDescription(
105
107
  collectibleType: CollectibleType,
@@ -319,6 +321,8 @@ export function getCollectibleMaxCharges(
319
321
  * type is not valid.
320
322
  *
321
323
  * For example, `getCollectibleName(CollectibleType.SAD_ONION)` would return "Sad Onion".
324
+ *
325
+ * This function works for both vanilla and modded collectibles.
322
326
  */
323
327
  export function getCollectibleName(collectibleType: CollectibleType): string {
324
328
  // "ItemConfigItem.Name" is bugged with vanilla items on patch v1.7.6, so we use a hard-coded map
@@ -83,6 +83,8 @@ export function getOpenTrinketSlot(player: EntityPlayer): int | undefined {
83
83
  /**
84
84
  * Helper function to get the in-game description for a trinket. Returns "Unknown" if the provided
85
85
  * trinket type was not valid.
86
+ *
87
+ * This function works for both vanilla and modded trinkets.
86
88
  */
87
89
  export function getTrinketDescription(trinketType: TrinketType): string {
88
90
  // "ItemConfigItem.Description" is bugged with vanilla items on patch v1.7.6, so we use a
@@ -122,6 +124,8 @@ export function getTrinketGfxFilename(trinketType: TrinketType): string {
122
124
  * not valid.
123
125
  *
124
126
  * For example, `getTrinketName(TrinketType.SWALLOWED_PENNY)` would return "Swallowed Penny".
127
+ *
128
+ * This function works for both vanilla and modded trinkets.
125
129
  */
126
130
  export function getTrinketName(trinketType: TrinketType): string {
127
131
  // "ItemConfigItem.Name" is bugged with vanilla items on patch v1.7.6, so we use a hard-coded map