isaacscript-common 2.1.0 → 2.3.1

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 (87) hide show
  1. package/README.md +1 -1
  2. package/classes/DefaultMap.d.ts +1 -1
  3. package/classes/ModUpgraded.d.ts +8 -2
  4. package/constants.d.ts +5 -5
  5. package/constants.lua +1 -1
  6. package/{constantsMax.d.ts → constantsFirstLast.d.ts} +0 -0
  7. package/{constantsMax.lua → constantsFirstLast.lua} +0 -0
  8. package/enums/HealthType.d.ts +2 -2
  9. package/enums/ModCallbackCustom.d.ts +753 -2
  10. package/features/debugDisplay/exports.d.ts +36 -36
  11. package/features/deployJSONRoom.d.ts +1 -1
  12. package/features/extraConsoleCommands/commandsDisplay.d.ts +18 -18
  13. package/features/extraConsoleCommands/init.d.ts +3 -2
  14. package/features/extraConsoleCommands/init.lua +76 -76
  15. package/features/extraConsoleCommands/{commands.d.ts → listCommands.d.ts} +17 -17
  16. package/features/extraConsoleCommands/{commands.lua → listCommands.lua} +9 -9
  17. package/features/{isPonyActive.d.ts → ponyDetection.d.ts} +0 -0
  18. package/features/{isPonyActive.lua → ponyDetection.lua} +2 -2
  19. package/features/{preventCollectibleRotate.d.ts → preventCollectibleRotation.d.ts} +1 -1
  20. package/features/{preventCollectibleRotate.lua → preventCollectibleRotation.lua} +3 -3
  21. package/features/saveDataManager/exports.d.ts +13 -10
  22. package/features/saveDataManager/load.d.ts +1 -1
  23. package/features/saveDataManager/main.d.ts +1 -1
  24. package/features/saveDataManager/maps.d.ts +1 -1
  25. package/features/saveDataManager/save.d.ts +1 -1
  26. package/functions/cards.lua +5 -5
  27. package/functions/character.lua +2 -2
  28. package/functions/chargeBar.d.ts +1 -1
  29. package/functions/collectibleCacheFlag.d.ts +4 -4
  30. package/functions/collectibleSet.lua +2 -2
  31. package/functions/collectibles.lua +5 -5
  32. package/functions/enums.d.ts +3 -3
  33. package/functions/jsonRoom.d.ts +1 -1
  34. package/functions/language.d.ts +7 -1
  35. package/functions/language.lua +2 -11
  36. package/functions/pills.lua +9 -9
  37. package/functions/playerDataStructures.d.ts +51 -0
  38. package/functions/playerDataStructures.lua +4 -0
  39. package/functions/playerHealth.d.ts +1 -1
  40. package/functions/pocketItems.d.ts +1 -1
  41. package/functions/run.lua +2 -2
  42. package/functions/spawnCollectible.lua +3 -3
  43. package/functions/trinketGive.d.ts +1 -1
  44. package/functions/trinkets.lua +5 -5
  45. package/functions/utils.d.ts +2 -2
  46. package/index.d.ts +14 -13
  47. package/index.lua +12 -12
  48. package/initFeatures.lua +6 -6
  49. package/{types → interfaces}/AddCallbackParameterCustom.d.ts +0 -0
  50. package/{types → interfaces}/AddCallbackParameterCustom.lua +0 -0
  51. package/{types → interfaces}/ChargeBarSprites.d.ts +0 -0
  52. package/{types → interfaces}/ChargeBarSprites.lua +0 -0
  53. package/{types → interfaces}/JSONDoor.d.ts +1 -0
  54. package/{types → interfaces}/JSONDoor.lua +0 -0
  55. package/{types → interfaces}/JSONEntity.d.ts +1 -0
  56. package/{types → interfaces}/JSONEntity.lua +0 -0
  57. package/{types → interfaces}/JSONRoom.d.ts +1 -5
  58. package/{types → interfaces}/JSONRoom.lua +0 -0
  59. package/{types → interfaces}/JSONRooms.d.ts +0 -0
  60. package/{types → interfaces}/JSONRooms.lua +0 -0
  61. package/{types → interfaces}/JSONSpawn.d.ts +1 -0
  62. package/{types → interfaces}/JSONSpawn.lua +0 -0
  63. package/{types → interfaces}/PlayerHealth.d.ts +1 -0
  64. package/{types → interfaces}/PlayerHealth.lua +0 -0
  65. package/{types → interfaces}/PocketItemDescription.d.ts +1 -0
  66. package/{types → interfaces}/PocketItemDescription.lua +0 -0
  67. package/interfaces/SaveData.d.ts +29 -0
  68. package/{types → interfaces}/SaveData.lua +0 -0
  69. package/{types → interfaces}/TrinketSituation.d.ts +1 -0
  70. package/{types → interfaces}/TrinketSituation.lua +0 -0
  71. package/{types → interfaces}/private/TSTLClassMetatable.d.ts +0 -0
  72. package/{types → interfaces}/private/TSTLClassMetatable.lua +0 -0
  73. package/maps/cardMap.lua +85 -85
  74. package/maps/characterMap.lua +58 -58
  75. package/maps/pillEffectMap.lua +39 -39
  76. package/maps/roomTypeMap.lua +12 -12
  77. package/objects/LRoomShapeToRectangles.d.ts +1 -1
  78. package/objects/callbackRegisterFunctions.d.ts +1 -1
  79. package/objects/colors.d.ts +8 -8
  80. package/objects/languageNames.d.ts +4 -0
  81. package/objects/languageNames.lua +13 -0
  82. package/objects/roomTypeNames.lua +1 -1
  83. package/package.json +3 -3
  84. package/types/PickingUpItem.d.ts +12 -2
  85. package/types/PickingUpItem.lua +3 -0
  86. package/upgradeMod.d.ts +2 -1
  87. package/types/SaveData.d.ts +0 -28
@@ -8,7 +8,7 @@ ____exports.CHARACTER_MAP = __TS__New(Map, {
8
8
  {"maggy", 1},
9
9
  {"cain", 2},
10
10
  {"judas", 3},
11
- {"bluebaby", 4},
11
+ {"blueBaby", 4},
12
12
  {"bb", 4},
13
13
  {"eve", 5},
14
14
  {"samson", 6},
@@ -16,74 +16,74 @@ ____exports.CHARACTER_MAP = __TS__New(Map, {
16
16
  {"lazarus", 8},
17
17
  {"laz", 8},
18
18
  {"eden", 9},
19
- {"thelost", 10},
19
+ {"theLost", 10},
20
20
  {"lost", 10},
21
21
  {"lazarus2", 11},
22
22
  {"laz2", 11},
23
- {"darkjudas", 12},
24
- {"djudas", 12},
25
- {"blackjudas", 12},
26
- {"bjudas", 12},
23
+ {"darkJudas", 12},
24
+ {"dJudas", 12},
25
+ {"blackJudas", 12},
26
+ {"bJudas", 12},
27
27
  {"lilith", 13},
28
28
  {"keeper", 14},
29
29
  {"apollyon", 15},
30
- {"theforgotten", 16},
30
+ {"theForgotten", 16},
31
31
  {"forgotten", 16},
32
- {"thesoul", 17},
32
+ {"theSoul", 17},
33
33
  {"soul", 17},
34
34
  {"bethany", 18},
35
35
  {"jacob", 19},
36
36
  {"esau", 20},
37
- {"taintedisaac", 21},
38
- {"tisaac", 21},
39
- {"taintedmagdalene", 22},
40
- {"tmagdalene", 22},
41
- {"taintedmaggy", 22},
42
- {"tmaggy", 22},
43
- {"taintedcain", 23},
44
- {"tcain", 23},
45
- {"taintedjudas", 24},
46
- {"tjudas", 24},
47
- {"taintedbluebaby", 25},
48
- {"tbluebaby", 25},
37
+ {"taintedIsaac", 21},
38
+ {"tIsaac", 21},
39
+ {"taintedMagdalene", 22},
40
+ {"tMagdalene", 22},
41
+ {"taintedMaggy", 22},
42
+ {"tMaggy", 22},
43
+ {"taintedCain", 23},
44
+ {"tCain", 23},
45
+ {"taintedJudas", 24},
46
+ {"tJudas", 24},
47
+ {"taintedBlueBaby", 25},
48
+ {"tBlueBaby", 25},
49
49
  {"tbb", 25},
50
- {"taintedeve", 26},
51
- {"teve", 26},
52
- {"taintedsamson", 27},
53
- {"tsamson", 27},
54
- {"taintedazazel", 28},
55
- {"tazazel", 28},
56
- {"taintedlazarus", 29},
57
- {"tlazarus", 29},
58
- {"taintedlaz", 29},
59
- {"tlaz", 29},
60
- {"taintededen", 30},
61
- {"teden", 30},
62
- {"taintedlost", 31},
63
- {"tlost", 31},
64
- {"taintedlilith", 32},
65
- {"tlilith", 32},
66
- {"taintedkeeper", 33},
67
- {"tkeeper", 33},
68
- {"taintedapollyon", 34},
69
- {"tapollyon", 34},
70
- {"taintedforgotten", 34},
71
- {"tforgotten", 35},
72
- {"taintedbethany", 36},
73
- {"tbethany", 36},
74
- {"taintedjacob", 37},
75
- {"tjacob", 37},
76
- {"taintedlazarusdead", 38},
77
- {"tlazarusdead", 38},
78
- {"taintedlazdead", 38},
79
- {"tlazdead", 38},
80
- {"deadtaintedlazarus", 38},
81
- {"deadtlazarus", 38},
82
- {"deadtaintedlaz", 38},
83
- {"deadtlaz", 38},
84
- {"taintedjacobghost", 39},
85
- {"tjacobghost", 39},
86
- {"taintedsoul", 40},
87
- {"tsoul", 40}
50
+ {"taintedEve", 26},
51
+ {"tEve", 26},
52
+ {"taintedSamson", 27},
53
+ {"tSamson", 27},
54
+ {"taintedAzazel", 28},
55
+ {"tAzazel", 28},
56
+ {"taintedLazarus", 29},
57
+ {"tLazarus", 29},
58
+ {"taintedLaz", 29},
59
+ {"tLaz", 29},
60
+ {"taintedEden", 30},
61
+ {"tEden", 30},
62
+ {"taintedLost", 31},
63
+ {"tLost", 31},
64
+ {"taintedLilith", 32},
65
+ {"tLilith", 32},
66
+ {"taintedKeeper", 33},
67
+ {"tKeeper", 33},
68
+ {"taintedApollyon", 34},
69
+ {"tApollyon", 34},
70
+ {"taintedForgotten", 34},
71
+ {"tForgotten", 35},
72
+ {"taintedBethany", 36},
73
+ {"tBethany", 36},
74
+ {"taintedJacob", 37},
75
+ {"tJacob", 37},
76
+ {"taintedLazarusDead", 38},
77
+ {"tLazarusDead", 38},
78
+ {"taintedLazDead", 38},
79
+ {"tLazDead", 38},
80
+ {"deadTaintedLazarus", 38},
81
+ {"deadTLazarus", 38},
82
+ {"deadTaintedLaz", 38},
83
+ {"deadTLaz", 38},
84
+ {"taintedJacobGhost", 39},
85
+ {"tJacobGhost", 39},
86
+ {"taintedSoul", 40},
87
+ {"tSoul", 40}
88
88
  })
89
89
  return ____exports
@@ -5,58 +5,58 @@ local ____exports = {}
5
5
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
6
6
  local PillEffect = ____isaac_2Dtypescript_2Ddefinitions.PillEffect
7
7
  ____exports.PILL_EFFECT_MAP = __TS__New(Map, {
8
- {"badgas", PillEffect.BAD_GAS},
8
+ {"badGas", PillEffect.BAD_GAS},
9
9
  {"gas", PillEffect.BAD_GAS},
10
- {"badtrip", PillEffect.BAD_TRIP},
10
+ {"badTrip", PillEffect.BAD_TRIP},
11
11
  {"trip", PillEffect.BAD_TRIP},
12
- {"ballsofsteel", PillEffect.BALLS_OF_STEEL},
13
- {"ballssteel", PillEffect.BALLS_OF_STEEL},
12
+ {"ballsOfSteel", PillEffect.BALLS_OF_STEEL},
13
+ {"ballsSteel", PillEffect.BALLS_OF_STEEL},
14
14
  {"steel", PillEffect.BALLS_OF_STEEL},
15
- {"bombsarekey", PillEffect.BOMBS_ARE_KEYS},
16
- {"bombskey", PillEffect.BOMBS_ARE_KEYS},
15
+ {"bombsAreKey", PillEffect.BOMBS_ARE_KEYS},
16
+ {"bombsKey", PillEffect.BOMBS_ARE_KEYS},
17
17
  {"key", PillEffect.BOMBS_ARE_KEYS},
18
- {"explosivediarrhea", PillEffect.EXPLOSIVE_DIARRHEA},
18
+ {"explosiveDiarrhea", PillEffect.EXPLOSIVE_DIARRHEA},
19
19
  {"diarrhea", PillEffect.EXPLOSIVE_DIARRHEA},
20
- {"fullhealth", PillEffect.FULL_HEALTH},
21
- {"healthdown", PillEffect.HEALTH_DOWN},
22
- {"healthup", PillEffect.HEALTH_UP},
23
- {"ifoundpills", PillEffect.I_FOUND_PILLS},
24
- {"foundpills", PillEffect.I_FOUND_PILLS},
20
+ {"fullHealth", PillEffect.FULL_HEALTH},
21
+ {"healthDown", PillEffect.HEALTH_DOWN},
22
+ {"healthUp", PillEffect.HEALTH_UP},
23
+ {"iFoundPills", PillEffect.I_FOUND_PILLS},
24
+ {"foundPills", PillEffect.I_FOUND_PILLS},
25
25
  {"pills", PillEffect.I_FOUND_PILLS},
26
26
  {"puberty", PillEffect.PUBERTY},
27
- {"prettyfly", PillEffect.PRETTY_FLY},
27
+ {"prettyFly", PillEffect.PRETTY_FLY},
28
28
  {"fly", PillEffect.PRETTY_FLY},
29
- {"rangedown", PillEffect.RANGE_DOWN},
30
- {"rangeup", PillEffect.RANGE_UP},
31
- {"speeddown", PillEffect.SPEED_DOWN},
32
- {"speedup", PillEffect.SPEED_UP},
33
- {"tearsdown", PillEffect.TEARS_DOWN},
34
- {"tearsup", PillEffect.TEARS_UP},
35
- {"luckdown", PillEffect.LUCK_DOWN},
36
- {"luckup", PillEffect.LUCK_UP},
29
+ {"rangeDown", PillEffect.RANGE_DOWN},
30
+ {"rangeUp", PillEffect.RANGE_UP},
31
+ {"speedDown", PillEffect.SPEED_DOWN},
32
+ {"speedUp", PillEffect.SPEED_UP},
33
+ {"tearsDown", PillEffect.TEARS_DOWN},
34
+ {"tearsUp", PillEffect.TEARS_UP},
35
+ {"luckDown", PillEffect.LUCK_DOWN},
36
+ {"luckUp", PillEffect.LUCK_UP},
37
37
  {"telepills", PillEffect.TELEPILLS},
38
- {"48hourenergy", PillEffect.FORTY_EIGHT_HOUR_ENERGY},
38
+ {"48HourEnergy", PillEffect.FORTY_EIGHT_HOUR_ENERGY},
39
39
  {"energy", PillEffect.FORTY_EIGHT_HOUR_ENERGY},
40
40
  {"48", PillEffect.FORTY_EIGHT_HOUR_ENERGY},
41
41
  {"hematemesis", PillEffect.HEMATEMESIS},
42
42
  {"paralysis", PillEffect.PARALYSIS},
43
- {"icanseeforever!", PillEffect.I_CAN_SEE_FOREVER},
44
- {"cansee", PillEffect.I_CAN_SEE_FOREVER},
43
+ {"iCanSeeForever!", PillEffect.I_CAN_SEE_FOREVER},
44
+ {"canSee", PillEffect.I_CAN_SEE_FOREVER},
45
45
  {"see", PillEffect.I_CAN_SEE_FOREVER},
46
46
  {"pheromones", PillEffect.PHEROMONES},
47
47
  {"amnesia", PillEffect.AMNESIA},
48
- {"lemonparty", PillEffect.LEMON_PARTY},
48
+ {"lemonParty", PillEffect.LEMON_PARTY},
49
49
  {"party", PillEffect.LEMON_PARTY},
50
- {"ruawizard", PillEffect.R_U_A_WIZARD},
51
- {"areyouawizard", PillEffect.R_U_A_WIZARD},
50
+ {"RUAWizard", PillEffect.R_U_A_WIZARD},
51
+ {"areYouAWizard", PillEffect.R_U_A_WIZARD},
52
52
  {"wizard", PillEffect.R_U_A_WIZARD},
53
53
  {"percs!", PillEffect.PERCS},
54
54
  {"addicted!", PillEffect.ADDICTED},
55
55
  {"relax", PillEffect.RELAX},
56
56
  {"???", PillEffect.QUESTION_MARKS},
57
- {"onemakesyoularger", PillEffect.ONE_MAKES_YOU_LARGER},
57
+ {"oneMakesYouLarger", PillEffect.ONE_MAKES_YOU_LARGER},
58
58
  {"larger", PillEffect.ONE_MAKES_YOU_LARGER},
59
- {"onemakesyousmaller", PillEffect.ONE_MAKES_YOU_SMALL},
59
+ {"oneMakesYouSmaller", PillEffect.ONE_MAKES_YOU_SMALL},
60
60
  {"smaller", PillEffect.ONE_MAKES_YOU_SMALL},
61
61
  {"infested!", PillEffect.INFESTED_EXCLAMATION},
62
62
  {"infest!", PillEffect.INFESTED_EXCLAMATION},
@@ -64,26 +64,26 @@ ____exports.PILL_EFFECT_MAP = __TS__New(Map, {
64
64
  {"infested?", PillEffect.INFESTED_QUESTION},
65
65
  {"infest?", PillEffect.INFESTED_QUESTION},
66
66
  {"inf?", PillEffect.INFESTED_QUESTION},
67
- {"powerpill", PillEffect.POWER},
68
- {"retrovision", PillEffect.RETRO_VISION},
67
+ {"powerPill", PillEffect.POWER},
68
+ {"retroVision", PillEffect.RETRO_VISION},
69
69
  {"vision", PillEffect.RETRO_VISION},
70
- {"friendstilltheend", PillEffect.FRIENDS_TILL_THE_END},
71
- {"friendsutilltheend", PillEffect.FRIENDS_TILL_THE_END},
70
+ {"friendsTillTheEnd", PillEffect.FRIENDS_TILL_THE_END},
71
+ {"friendsUntilTheEnd", PillEffect.FRIENDS_TILL_THE_END},
72
72
  {"xlax", PillEffect.X_LAX},
73
- {"somethingswrong", PillEffect.SOMETHINGS_WRONG},
73
+ {"somethingsWrong", PillEffect.SOMETHINGS_WRONG},
74
74
  {"wrong", PillEffect.SOMETHINGS_WRONG},
75
- {"imdrowsy", PillEffect.IM_DROWSY},
75
+ {"imDrowsy", PillEffect.IM_DROWSY},
76
76
  {"drowsy", PillEffect.IM_DROWSY},
77
- {"imexcited!!!", PillEffect.IM_EXCITED},
77
+ {"imExcited!!!", PillEffect.IM_EXCITED},
78
78
  {"excited", PillEffect.IM_EXCITED},
79
79
  {"gulp!", PillEffect.GULP},
80
80
  {"horf!", PillEffect.HORF},
81
- {"feelslikeimwalkingonsunshine!", PillEffect.FEELS_LIKE_IM_WALKING_ON_SUNSHINE},
81
+ {"feelsLikeImWalkingOnSunshine!", PillEffect.FEELS_LIKE_IM_WALKING_ON_SUNSHINE},
82
82
  {"walking", PillEffect.FEELS_LIKE_IM_WALKING_ON_SUNSHINE},
83
83
  {"sunshine", PillEffect.FEELS_LIKE_IM_WALKING_ON_SUNSHINE},
84
84
  {"vurp!", PillEffect.VURP},
85
- {"shotspeeddown", PillEffect.SHOT_SPEED_DOWN},
86
- {"shotspeedup", PillEffect.SHOT_SPEED_UP},
85
+ {"shotSpeedDown", PillEffect.SHOT_SPEED_DOWN},
86
+ {"shotSpeedUp", PillEffect.SHOT_SPEED_UP},
87
87
  {"experimental", PillEffect.EXPERIMENTAL}
88
88
  })
89
89
  return ____exports
@@ -9,12 +9,12 @@ ____exports.ROOM_TYPE_MAP = __TS__New(Map, {
9
9
  {"default", RoomType.DEFAULT},
10
10
  {"shop", RoomType.SHOP},
11
11
  {"error", RoomType.ERROR},
12
- {"iamerror", RoomType.ERROR},
12
+ {"iAmError", RoomType.ERROR},
13
13
  {"treasure", RoomType.TREASURE},
14
14
  {"boss", RoomType.BOSS},
15
- {"miniboss", RoomType.MINI_BOSS},
15
+ {"miniBoss", RoomType.MINI_BOSS},
16
16
  {"secret", RoomType.SECRET},
17
- {"supersecret", RoomType.SUPER_SECRET},
17
+ {"superSecret", RoomType.SUPER_SECRET},
18
18
  {"arcade", RoomType.ARCADE},
19
19
  {"curse", RoomType.CURSE},
20
20
  {"challenge", RoomType.CHALLENGE},
@@ -23,22 +23,22 @@ ____exports.ROOM_TYPE_MAP = __TS__New(Map, {
23
23
  {"devil", RoomType.DEVIL},
24
24
  {"angel", RoomType.ANGEL},
25
25
  {"dungeon", RoomType.DUNGEON},
26
- {"crawlspace", RoomType.DUNGEON},
27
- {"bossrush", RoomType.BOSS_RUSH},
26
+ {"crawlSpace", RoomType.DUNGEON},
27
+ {"bossRush", RoomType.BOSS_RUSH},
28
28
  {"isaacs", RoomType.CLEAN_BEDROOM},
29
29
  {"bedroom", RoomType.CLEAN_BEDROOM},
30
- {"cleanbedroom", RoomType.CLEAN_BEDROOM},
30
+ {"cleanBedroom", RoomType.CLEAN_BEDROOM},
31
+ {"dirtyBedroom", RoomType.DIRTY_BEDROOM},
31
32
  {"barren", RoomType.DIRTY_BEDROOM},
32
- {"dirtybedroom", RoomType.DIRTY_BEDROOM},
33
33
  {"chest", RoomType.CHEST},
34
34
  {"dice", RoomType.DICE},
35
- {"blackmarket", RoomType.BLACK_MARKET},
36
- {"greedexit", RoomType.GREED_EXIT},
35
+ {"blackMarket", RoomType.BLACK_MARKET},
36
+ {"greedExit", RoomType.GREED_EXIT},
37
37
  {"planetarium", RoomType.PLANETARIUM},
38
38
  {"teleporter", RoomType.TELEPORTER},
39
- {"teleporterexit", RoomType.TELEPORTER_EXIT},
40
- {"secretexit", RoomType.SECRET_EXIT},
39
+ {"teleporterExit", RoomType.TELEPORTER_EXIT},
40
+ {"secretExit", RoomType.SECRET_EXIT},
41
41
  {"blue", RoomType.BLUE},
42
- {"ultrasecret", RoomType.ULTRA_SECRET}
42
+ {"ultraSecret", RoomType.ULTRA_SECRET}
43
43
  })
44
44
  return ____exports
@@ -4,7 +4,7 @@ import { RoomShape } from "isaac-typescript-definitions";
4
4
  * wall would be at "Vector(-1, -1)".)
5
5
  */
6
6
  export declare const L_ROOM_SHAPE_TO_RECTANGLES: {
7
- [key in RoomShape]?: [
7
+ readonly [key in RoomShape]?: readonly [
8
8
  verticalTopLeft: Vector,
9
9
  verticalBottomRight: Vector,
10
10
  horizontalTopLeft: Vector,
@@ -1,5 +1,5 @@
1
1
  import { ModCallbackCustom } from "../enums/ModCallbackCustom";
2
- import { AddCallbackParameterCustom } from "../types/AddCallbackParameterCustom";
2
+ import { AddCallbackParameterCustom } from "../interfaces/AddCallbackParameterCustom";
3
3
  export declare const CALLBACK_REGISTER_FUNCTIONS: {
4
4
  readonly [key in ModCallbackCustom]: (...args: AddCallbackParameterCustom[key]) => void;
5
5
  };
@@ -6,12 +6,12 @@
6
6
  * `copyColor` function.
7
7
  */
8
8
  export declare const COLORS: {
9
- Black: Color;
10
- Red: Color;
11
- Green: Color;
12
- Blue: Color;
13
- Yellow: Color;
14
- Pink: Color;
15
- Cyan: Color;
16
- White: Color;
9
+ readonly Black: Color;
10
+ readonly Red: Color;
11
+ readonly Green: Color;
12
+ readonly Blue: Color;
13
+ readonly Yellow: Color;
14
+ readonly Pink: Color;
15
+ readonly Cyan: Color;
16
+ readonly White: Color;
17
17
  };
@@ -0,0 +1,4 @@
1
+ import { LanguageAbbreviation } from "isaac-typescript-definitions";
2
+ export declare const LANGUAGE_NAMES: {
3
+ readonly [key in LanguageAbbreviation]: string;
4
+ };
@@ -0,0 +1,13 @@
1
+ local ____exports = {}
2
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
3
+ local LanguageAbbreviation = ____isaac_2Dtypescript_2Ddefinitions.LanguageAbbreviation
4
+ ____exports.LANGUAGE_NAMES = {
5
+ [LanguageAbbreviation.ENGLISH] = "English",
6
+ [LanguageAbbreviation.JAPANESE] = "Japanese",
7
+ [LanguageAbbreviation.KOREAN] = "Korean",
8
+ [LanguageAbbreviation.CHINESE_SIMPLE] = "Chinese (Simple)",
9
+ [LanguageAbbreviation.RUSSIAN] = "Russian",
10
+ [LanguageAbbreviation.GERMAN] = "German",
11
+ [LanguageAbbreviation.SPANISH] = "Spanish"
12
+ }
13
+ return ____exports
@@ -6,7 +6,7 @@ ____exports.ROOM_TYPE_NAMES = {
6
6
  [RoomType.NULL] = "null room",
7
7
  [RoomType.DEFAULT] = "default room",
8
8
  [RoomType.SHOP] = "shop",
9
- [RoomType.ERROR] = "IAMERROR Room",
9
+ [RoomType.ERROR] = "I AM ERROR Room",
10
10
  [RoomType.TREASURE] = "Treasure Room",
11
11
  [RoomType.BOSS] = "Boss Room",
12
12
  [RoomType.MINI_BOSS] = "Miniboss Room",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "2.1.0",
3
+ "version": "2.3.1",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -22,6 +22,6 @@
22
22
  "main": "index",
23
23
  "types": "index.d.ts",
24
24
  "dependencies": {
25
- "isaac-typescript-definitions": "^2.0.53"
25
+ "isaac-typescript-definitions": "^2.0.54"
26
26
  }
27
- }
27
+ }
@@ -1,24 +1,34 @@
1
+ /**
2
+ * This is the type that is fed to the `PRE_ITEM_PICKUP` and `POST_ITEM_PICKUP` custom callbacks.
3
+ *
4
+ * @module
5
+ */
1
6
  import { CollectibleType, ItemType, TrinketType } from "isaac-typescript-definitions";
2
7
  export declare type PickingUpItem = PickingUpItemNull | PickingUpItemCollectible | PickingUpItemTrinket;
8
+ /** Part of {@link PickingUpItem}. */
3
9
  export interface PickingUpItemNull {
4
10
  /** Needed so that we can distinguish between picking up a collectible and a trinket. */
5
11
  itemType: ItemType.NULL;
6
12
  /** Equal to either the collectible type, the trinket type, or 0. */
7
13
  subType: 0;
8
14
  }
15
+ /** Part of {@link PickingUpItem}. */
9
16
  export interface PickingUpItemCollectible {
10
17
  /** Needed so that we can distinguish between picking up a collectible and a trinket. */
11
18
  itemType: ItemType.PASSIVE | ItemType.ACTIVE | ItemType.FAMILIAR;
12
19
  /** Equal to either the collectible type, the trinket type, or 0. */
13
20
  subType: CollectibleType;
14
21
  }
22
+ /** Part of {@link PickingUpItem}. */
15
23
  export interface PickingUpItemTrinket {
16
24
  /** Needed so that we can distinguish between picking up a collectible and a trinket. */
17
25
  itemType: ItemType.TRINKET;
18
26
  /** Equal to either the collectible type, the trinket type, or 0. */
19
27
  subType: TrinketType;
20
28
  }
21
- export declare function newPickingUpItem(): PickingUpItem;
22
- export declare function resetPickingUpItem(pickingUpItem: PickingUpItem): void;
29
+ /** Helper function to narrow the type of `PickingUpItem`. */
30
+ export declare function pickingUpItemIsNull(pickingUpItem: PickingUpItem): pickingUpItem is PickingUpItemTrinket;
31
+ /** Helper function to narrow the type of `PickingUpItem`. */
23
32
  export declare function pickingUpItemIsCollectible(pickingUpItem: PickingUpItem): pickingUpItem is PickingUpItemCollectible;
33
+ /** Helper function to narrow the type of `PickingUpItem`. */
24
34
  export declare function pickingUpItemIsTrinket(pickingUpItem: PickingUpItem): pickingUpItem is PickingUpItemTrinket;
@@ -15,6 +15,9 @@ function ____exports.resetPickingUpItem(self, pickingUpItem)
15
15
  pickingUpItem.subType = DEFAULT_SUB_TYPE
16
16
  end
17
17
  local COLLECTIBLE_ITEM_TYPES = __TS__New(Set, {ItemType.PASSIVE, ItemType.ACTIVE, ItemType.FAMILIAR})
18
+ function ____exports.pickingUpItemIsNull(self, pickingUpItem)
19
+ return pickingUpItem.itemType == ItemType.NULL
20
+ end
18
21
  function ____exports.pickingUpItemIsCollectible(self, pickingUpItem)
19
22
  return COLLECTIBLE_ITEM_TYPES:has(pickingUpItem.itemType)
20
23
  end
package/upgradeMod.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
2
  import { ModUpgraded } from "./classes/ModUpgraded";
3
3
  /**
4
- * Use this function to enable the custom features and callbacks provided by `isaacscript-common`.
4
+ * Use this function to enable the custom callbacks and other optional features provided by
5
+ * `isaacscript-common`.
5
6
  *
6
7
  * For example:
7
8
  *
@@ -1,28 +0,0 @@
1
- /**
2
- * Each sub-object of save data has a string as a key, without arbitrary data as a value. However,
3
- * the data has to be serializable (i.e. no `userdata` objects).
4
- *
5
- * The values of the save data group can only be:
6
- * - `boolean`
7
- * - `number`
8
- * - `string`
9
- * - `Map` / `DefaultMap`
10
- * - `Set`
11
- * - a TSTL class
12
- * - serializable Isaac API classes (such as `Color`)
13
- * - a sub-object or `LuaTable` that contains the above values
14
- *
15
- * It is not possible to create a recursive type definition that matches these properties, so this
16
- * is typed as "unknown", which provides no type safety.
17
- */
18
- export declare type SaveDataGroup = Record<string, unknown>;
19
- /**
20
- * The object that contains all of the variables that will be managed by the save data manager.
21
- * Depending on which property is used, the variables will be reset at certain times.
22
- */
23
- export interface SaveData {
24
- persistent?: SaveDataGroup;
25
- run?: SaveDataGroup;
26
- level?: SaveDataGroup;
27
- room?: SaveDataGroup;
28
- }