isaacscript-common 46.0.0 → 47.0.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.rollup.d.ts +66 -15
- package/dist/isaacscript-common.lua +170 -16
- package/dist/src/functions/cards.d.ts +1 -1
- package/dist/src/functions/cards.lua +1 -1
- package/dist/src/functions/pickups.d.ts +45 -1
- package/dist/src/functions/pickups.d.ts.map +1 -1
- package/dist/src/functions/pickups.lua +65 -0
- package/dist/src/functions/pills.d.ts +1 -1
- package/dist/src/functions/pills.lua +1 -1
- package/dist/src/functions/stage.d.ts +12 -12
- package/dist/src/functions/stage.d.ts.map +1 -1
- package/dist/src/functions/stage.lua +21 -21
- package/dist/src/objects/batteryNames.d.ts +10 -0
- package/dist/src/objects/batteryNames.d.ts.map +1 -0
- package/dist/src/objects/batteryNames.lua +13 -0
- package/dist/src/objects/bombNames.d.ts +13 -0
- package/dist/src/objects/bombNames.d.ts.map +1 -0
- package/dist/src/objects/bombNames.lua +16 -0
- package/dist/src/objects/chestNames.d.ts +16 -0
- package/dist/src/objects/chestNames.d.ts.map +1 -0
- package/dist/src/objects/chestNames.lua +19 -0
- package/dist/src/objects/coinNames.d.ts +13 -0
- package/dist/src/objects/coinNames.d.ts.map +1 -0
- package/dist/src/objects/coinNames.lua +16 -0
- package/dist/src/objects/heartNames.d.ts +18 -0
- package/dist/src/objects/heartNames.d.ts.map +1 -0
- package/dist/src/objects/heartNames.lua +21 -0
- package/dist/src/objects/keyNames.d.ts +10 -0
- package/dist/src/objects/keyNames.d.ts.map +1 -0
- package/dist/src/objects/keyNames.lua +13 -0
- package/dist/src/objects/{englishLevelNames.d.ts → levelNames.d.ts} +2 -2
- package/dist/src/objects/levelNames.d.ts.map +1 -0
- package/dist/src/objects/{englishLevelNames.lua → levelNames.lua} +1 -1
- package/dist/src/objects/sackNames.d.ts +8 -0
- package/dist/src/objects/sackNames.d.ts.map +1 -0
- package/dist/src/objects/sackNames.lua +7 -0
- package/package.json +1 -1
- package/src/functions/cards.ts +1 -1
- package/src/functions/pickups.ts +89 -0
- package/src/functions/pills.ts +3 -1
- package/src/functions/stage.ts +26 -26
- package/src/objects/batteryNames.ts +12 -0
- package/src/objects/bombNames.ts +16 -0
- package/src/objects/cardNames.ts +98 -98
- package/src/objects/chestNames.ts +18 -0
- package/src/objects/coinNames.ts +15 -0
- package/src/objects/heartNames.ts +20 -0
- package/src/objects/keyNames.ts +12 -0
- package/src/objects/languageNames.ts +7 -7
- package/src/objects/{englishLevelNames.ts → levelNames.ts} +26 -1
- package/src/objects/pillEffectNames.ts +50 -50
- package/src/objects/pillEffectTypes.ts +50 -50
- package/src/objects/sackNames.ts +10 -0
- package/dist/src/objects/englishLevelNames.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../../../src/functions/stage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAEL,UAAU,EACV,QAAQ,EACR,SAAS,EACV,MAAM,8BAA8B,CAAC;AAUtC;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,CA6B/D;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,CAmBzE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,UAAU,CAS9C;AAED
|
|
1
|
+
{"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../../../src/functions/stage.ts"],"names":[],"mappings":"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"}
|
|
@@ -8,8 +8,8 @@ local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
|
8
8
|
local StageType = ____isaac_2Dtypescript_2Ddefinitions.StageType
|
|
9
9
|
local ____cachedClasses = require("src.core.cachedClasses")
|
|
10
10
|
local game = ____cachedClasses.game
|
|
11
|
-
local
|
|
12
|
-
local
|
|
11
|
+
local ____levelNames = require("src.objects.levelNames")
|
|
12
|
+
local LEVEL_NAMES = ____levelNames.LEVEL_NAMES
|
|
13
13
|
local ____roomTypeSpecialGotoPrefixes = require("src.objects.roomTypeSpecialGotoPrefixes")
|
|
14
14
|
local ROOM_TYPE_SPECIAL_GOTO_PREFIXES = ____roomTypeSpecialGotoPrefixes.ROOM_TYPE_SPECIAL_GOTO_PREFIXES
|
|
15
15
|
local ____stageToStageID = require("src.objects.stageToStageID")
|
|
@@ -91,6 +91,23 @@ function ____exports.getEffectiveStage(self)
|
|
|
91
91
|
end
|
|
92
92
|
return stage
|
|
93
93
|
end
|
|
94
|
+
--- Helper function to get the corresponding "goto" console command that would correspond to the
|
|
95
|
+
-- provided room type and room variant.
|
|
96
|
+
--
|
|
97
|
+
-- @param roomType The `RoomType` of the destination room.
|
|
98
|
+
-- @param roomVariant The variant of the destination room.
|
|
99
|
+
-- @param useSpecialRoomsForRoomTypeDefault Optional. Whether to use `s.default` as the prefix for
|
|
100
|
+
-- the `goto` command (instead of `d`) if the room type is
|
|
101
|
+
-- `RoomType.DEFAULT` (1). False by default.
|
|
102
|
+
function ____exports.getGotoCommand(self, roomType, roomVariant, useSpecialRoomsForRoomTypeDefault)
|
|
103
|
+
if useSpecialRoomsForRoomTypeDefault == nil then
|
|
104
|
+
useSpecialRoomsForRoomTypeDefault = false
|
|
105
|
+
end
|
|
106
|
+
local isNormalRoom = roomType == RoomType.DEFAULT and not useSpecialRoomsForRoomTypeDefault
|
|
107
|
+
local roomTypeSpecialGotoPrefix = ROOM_TYPE_SPECIAL_GOTO_PREFIXES[roomType]
|
|
108
|
+
local prefix = isNormalRoom and "d" or "s." .. roomTypeSpecialGotoPrefix
|
|
109
|
+
return (("goto " .. prefix) .. ".") .. tostring(roomVariant)
|
|
110
|
+
end
|
|
94
111
|
--- Helper function to get the English name of the level. For example, "Caves 1".
|
|
95
112
|
--
|
|
96
113
|
-- This is useful because the `Level.GetName` method returns a localized version of the level name,
|
|
@@ -100,7 +117,7 @@ end
|
|
|
100
117
|
--
|
|
101
118
|
-- @param stage Optional. If not specified, the current stage will be used.
|
|
102
119
|
-- @param stageType Optional. If not specified, the current stage type will be used.
|
|
103
|
-
function ____exports.
|
|
120
|
+
function ____exports.getLevelName(self, stage, stageType)
|
|
104
121
|
local level = game:GetLevel()
|
|
105
122
|
if stage == nil then
|
|
106
123
|
stage = level:GetStage()
|
|
@@ -108,26 +125,9 @@ function ____exports.getEnglishLevelName(self, stage, stageType)
|
|
|
108
125
|
if stageType == nil then
|
|
109
126
|
stageType = level:GetStageType()
|
|
110
127
|
end
|
|
111
|
-
local stageNames =
|
|
128
|
+
local stageNames = LEVEL_NAMES[stage]
|
|
112
129
|
return stageNames[stageType]
|
|
113
130
|
end
|
|
114
|
-
--- Helper function to get the corresponding "goto" console command that would correspond to the
|
|
115
|
-
-- provided room type and room variant.
|
|
116
|
-
--
|
|
117
|
-
-- @param roomType The `RoomType` of the destination room.
|
|
118
|
-
-- @param roomVariant The variant of the destination room.
|
|
119
|
-
-- @param useSpecialRoomsForRoomTypeDefault Optional. Whether to use `s.default` as the prefix for
|
|
120
|
-
-- the `goto` command (instead of `d`) if the room type is
|
|
121
|
-
-- `RoomType.DEFAULT` (1). False by default.
|
|
122
|
-
function ____exports.getGotoCommand(self, roomType, roomVariant, useSpecialRoomsForRoomTypeDefault)
|
|
123
|
-
if useSpecialRoomsForRoomTypeDefault == nil then
|
|
124
|
-
useSpecialRoomsForRoomTypeDefault = false
|
|
125
|
-
end
|
|
126
|
-
local isNormalRoom = roomType == RoomType.DEFAULT and not useSpecialRoomsForRoomTypeDefault
|
|
127
|
-
local roomTypeSpecialGotoPrefix = ROOM_TYPE_SPECIAL_GOTO_PREFIXES[roomType]
|
|
128
|
-
local prefix = isNormalRoom and "d" or "s." .. roomTypeSpecialGotoPrefix
|
|
129
|
-
return (("goto " .. prefix) .. ".") .. tostring(roomVariant)
|
|
130
|
-
end
|
|
131
131
|
--- Alias for the `Level.GetStage` method.
|
|
132
132
|
function ____exports.getStage(self)
|
|
133
133
|
local level = game:GetLevel()
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const DEFAULT_BATTERY_NAME = "Unknown";
|
|
2
|
+
/** Taken from "entities2.xml". */
|
|
3
|
+
export declare const BATTERY_NAMES: {
|
|
4
|
+
readonly 0: "Unknown";
|
|
5
|
+
readonly 1: "Lil' Battery";
|
|
6
|
+
readonly 2: "Micro Battery";
|
|
7
|
+
readonly 3: "Mega Battery";
|
|
8
|
+
readonly 4: "Golden Battery";
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=batteryNames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batteryNames.d.ts","sourceRoot":"","sources":["../../../src/objects/batteryNames.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAE9C,kCAAkC;AAClC,eAAO,MAAM,aAAa;;;;;;CAMyB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local BatterySubType = ____isaac_2Dtypescript_2Ddefinitions.BatterySubType
|
|
4
|
+
____exports.DEFAULT_BATTERY_NAME = "Unknown"
|
|
5
|
+
--- Taken from "entities2.xml".
|
|
6
|
+
____exports.BATTERY_NAMES = {
|
|
7
|
+
[BatterySubType.NULL] = ____exports.DEFAULT_BATTERY_NAME,
|
|
8
|
+
[BatterySubType.NORMAL] = "Lil' Battery",
|
|
9
|
+
[BatterySubType.MICRO] = "Micro Battery",
|
|
10
|
+
[BatterySubType.MEGA] = "Mega Battery",
|
|
11
|
+
[BatterySubType.GOLDEN] = "Golden Battery"
|
|
12
|
+
}
|
|
13
|
+
return ____exports
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const DEFAULT_BOMB_NAME = "Unknown";
|
|
2
|
+
/** Taken from "entities2.xml". */
|
|
3
|
+
export declare const BOMB_NAMES: {
|
|
4
|
+
readonly 0: "Unknown";
|
|
5
|
+
readonly 1: "Bomb";
|
|
6
|
+
readonly 2: "Double Bomb";
|
|
7
|
+
readonly 3: "Troll Bomb";
|
|
8
|
+
readonly 4: "Golden Bomb";
|
|
9
|
+
readonly 5: "Megatroll Bomb";
|
|
10
|
+
readonly 6: "Golden Troll Bomb";
|
|
11
|
+
readonly 7: "Giga Bomb";
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=bombNames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bombNames.d.ts","sourceRoot":"","sources":["../../../src/objects/bombNames.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAE3C,kCAAkC;AAClC,eAAO,MAAM,UAAU;;;;;;;;;CAUyB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local BombSubType = ____isaac_2Dtypescript_2Ddefinitions.BombSubType
|
|
4
|
+
____exports.DEFAULT_BOMB_NAME = "Unknown"
|
|
5
|
+
--- Taken from "entities2.xml".
|
|
6
|
+
____exports.BOMB_NAMES = {
|
|
7
|
+
[BombSubType.NULL] = ____exports.DEFAULT_BOMB_NAME,
|
|
8
|
+
[BombSubType.NORMAL] = "Bomb",
|
|
9
|
+
[BombSubType.DOUBLE_PACK] = "Double Bomb",
|
|
10
|
+
[BombSubType.TROLL] = "Troll Bomb",
|
|
11
|
+
[BombSubType.GOLDEN] = "Golden Bomb",
|
|
12
|
+
[BombSubType.MEGA_TROLL] = "Megatroll Bomb",
|
|
13
|
+
[BombSubType.GOLDEN_TROLL] = "Golden Troll Bomb",
|
|
14
|
+
[BombSubType.GIGA] = "Giga Bomb"
|
|
15
|
+
}
|
|
16
|
+
return ____exports
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Taken from "entities2.xml". */
|
|
2
|
+
export declare const CHEST_NAMES: {
|
|
3
|
+
readonly 50: "Chest";
|
|
4
|
+
readonly 51: "Bomb Chest";
|
|
5
|
+
readonly 52: "Spiked Chest";
|
|
6
|
+
readonly 53: "Eternal Chest";
|
|
7
|
+
readonly 54: "Mimic Chest";
|
|
8
|
+
readonly 55: "Old Chest";
|
|
9
|
+
readonly 56: "Wooden Chest";
|
|
10
|
+
readonly 57: "Mega Chest";
|
|
11
|
+
readonly 58: "Haunted Chest";
|
|
12
|
+
readonly 60: "Locked Chest";
|
|
13
|
+
readonly 360: "Red Chest";
|
|
14
|
+
readonly 390: "Mom's Chest";
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=chestNames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chestNames.d.ts","sourceRoot":"","sources":["../../../src/objects/chestNames.ts"],"names":[],"mappings":"AAGA,kCAAkC;AAClC,eAAO,MAAM,WAAW;;;;;;;;;;;;;CAamD,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
4
|
+
--- Taken from "entities2.xml".
|
|
5
|
+
____exports.CHEST_NAMES = {
|
|
6
|
+
[PickupVariant.CHEST] = "Chest",
|
|
7
|
+
[PickupVariant.BOMB_CHEST] = "Bomb Chest",
|
|
8
|
+
[PickupVariant.SPIKED_CHEST] = "Spiked Chest",
|
|
9
|
+
[PickupVariant.ETERNAL_CHEST] = "Eternal Chest",
|
|
10
|
+
[PickupVariant.MIMIC_CHEST] = "Mimic Chest",
|
|
11
|
+
[PickupVariant.OLD_CHEST] = "Old Chest",
|
|
12
|
+
[PickupVariant.WOODEN_CHEST] = "Wooden Chest",
|
|
13
|
+
[PickupVariant.MEGA_CHEST] = "Mega Chest",
|
|
14
|
+
[PickupVariant.HAUNTED_CHEST] = "Haunted Chest",
|
|
15
|
+
[PickupVariant.LOCKED_CHEST] = "Locked Chest",
|
|
16
|
+
[PickupVariant.RED_CHEST] = "Red Chest",
|
|
17
|
+
[PickupVariant.MOMS_CHEST] = "Mom's Chest"
|
|
18
|
+
}
|
|
19
|
+
return ____exports
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const DEFAULT_COIN_NAME = "Unknown";
|
|
2
|
+
/** Taken from "entities2.xml". */
|
|
3
|
+
export declare const COIN_NAMES: {
|
|
4
|
+
readonly 0: "Unknown";
|
|
5
|
+
readonly 1: "Penny";
|
|
6
|
+
readonly 2: "Nickel";
|
|
7
|
+
readonly 3: "Dime";
|
|
8
|
+
readonly 4: "Double Penny";
|
|
9
|
+
readonly 5: "Lucky Penny";
|
|
10
|
+
readonly 6: "Sticky Nickel";
|
|
11
|
+
readonly 7: "Golden Penny";
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=coinNames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coinNames.d.ts","sourceRoot":"","sources":["../../../src/objects/coinNames.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAE3C,kCAAkC;AAClC,eAAO,MAAM,UAAU;;;;;;;;;CASyB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local CoinSubType = ____isaac_2Dtypescript_2Ddefinitions.CoinSubType
|
|
4
|
+
____exports.DEFAULT_COIN_NAME = "Unknown"
|
|
5
|
+
--- Taken from "entities2.xml".
|
|
6
|
+
____exports.COIN_NAMES = {
|
|
7
|
+
[CoinSubType.NULL] = ____exports.DEFAULT_COIN_NAME,
|
|
8
|
+
[CoinSubType.PENNY] = "Penny",
|
|
9
|
+
[CoinSubType.NICKEL] = "Nickel",
|
|
10
|
+
[CoinSubType.DIME] = "Dime",
|
|
11
|
+
[CoinSubType.DOUBLE_PACK] = "Double Penny",
|
|
12
|
+
[CoinSubType.LUCKY_PENNY] = "Lucky Penny",
|
|
13
|
+
[CoinSubType.STICKY_NICKEL] = "Sticky Nickel",
|
|
14
|
+
[CoinSubType.GOLDEN] = "Golden Penny"
|
|
15
|
+
}
|
|
16
|
+
return ____exports
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const DEFAULT_HEART_NAME = "Unknown";
|
|
2
|
+
/** Taken from "entities2.xml". */
|
|
3
|
+
export declare const HEART_NAMES: {
|
|
4
|
+
readonly 0: "Unknown";
|
|
5
|
+
readonly 1: "Heart";
|
|
6
|
+
readonly 2: "Heart (half)";
|
|
7
|
+
readonly 3: "Heart (soul)";
|
|
8
|
+
readonly 4: "Heart (eternal)";
|
|
9
|
+
readonly 5: "Heart (double)";
|
|
10
|
+
readonly 6: "Black Heart";
|
|
11
|
+
readonly 7: "Gold Heart";
|
|
12
|
+
readonly 8: "Heart (half soul)";
|
|
13
|
+
readonly 9: "Scared Heart";
|
|
14
|
+
readonly 10: "Blended Heart";
|
|
15
|
+
readonly 11: "Bone Heart";
|
|
16
|
+
readonly 12: "Rotten Heart";
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=heartNames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heartNames.d.ts","sourceRoot":"","sources":["../../../src/objects/heartNames.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAE5C,kCAAkC;AAClC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;CAcyB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local HeartSubType = ____isaac_2Dtypescript_2Ddefinitions.HeartSubType
|
|
4
|
+
____exports.DEFAULT_HEART_NAME = "Unknown"
|
|
5
|
+
--- Taken from "entities2.xml".
|
|
6
|
+
____exports.HEART_NAMES = {
|
|
7
|
+
[HeartSubType.NULL] = ____exports.DEFAULT_HEART_NAME,
|
|
8
|
+
[HeartSubType.FULL] = "Heart",
|
|
9
|
+
[HeartSubType.HALF] = "Heart (half)",
|
|
10
|
+
[HeartSubType.SOUL] = "Heart (soul)",
|
|
11
|
+
[HeartSubType.ETERNAL] = "Heart (eternal)",
|
|
12
|
+
[HeartSubType.DOUBLE_PACK] = "Heart (double)",
|
|
13
|
+
[HeartSubType.BLACK] = "Black Heart",
|
|
14
|
+
[HeartSubType.GOLDEN] = "Gold Heart",
|
|
15
|
+
[HeartSubType.HALF_SOUL] = "Heart (half soul)",
|
|
16
|
+
[HeartSubType.SCARED] = "Scared Heart",
|
|
17
|
+
[HeartSubType.BLENDED] = "Blended Heart",
|
|
18
|
+
[HeartSubType.BONE] = "Bone Heart",
|
|
19
|
+
[HeartSubType.ROTTEN] = "Rotten Heart"
|
|
20
|
+
}
|
|
21
|
+
return ____exports
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const DEFAULT_KEY_NAME = "Unknown";
|
|
2
|
+
/** Taken from "entities2.xml". */
|
|
3
|
+
export declare const KEY_NAMES: {
|
|
4
|
+
readonly 0: "Unknown";
|
|
5
|
+
readonly 1: "Key";
|
|
6
|
+
readonly 2: "Golden Key";
|
|
7
|
+
readonly 3: "Key Ring";
|
|
8
|
+
readonly 4: "Charged Key";
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=keyNames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyNames.d.ts","sourceRoot":"","sources":["../../../src/objects/keyNames.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAE1C,kCAAkC;AAClC,eAAO,MAAM,SAAS;;;;;;CAMyB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local KeySubType = ____isaac_2Dtypescript_2Ddefinitions.KeySubType
|
|
4
|
+
____exports.DEFAULT_KEY_NAME = "Unknown"
|
|
5
|
+
--- Taken from "entities2.xml".
|
|
6
|
+
____exports.KEY_NAMES = {
|
|
7
|
+
[KeySubType.NULL] = ____exports.DEFAULT_KEY_NAME,
|
|
8
|
+
[KeySubType.NORMAL] = "Key",
|
|
9
|
+
[KeySubType.GOLDEN] = "Golden Key",
|
|
10
|
+
[KeySubType.DOUBLE_PACK] = "Key Ring",
|
|
11
|
+
[KeySubType.CHARGED] = "Charged Key"
|
|
12
|
+
}
|
|
13
|
+
return ____exports
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Note that this contains "Blue Womb" instead of "???" for stage 9.
|
|
8
8
|
*/
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const LEVEL_NAMES: {
|
|
10
10
|
readonly 1: {
|
|
11
11
|
readonly 0: "Basement 1";
|
|
12
12
|
readonly 1: "Cellar 1";
|
|
@@ -112,4 +112,4 @@ export declare const ENGLISH_LEVEL_NAMES: {
|
|
|
112
112
|
readonly 5: "Home";
|
|
113
113
|
};
|
|
114
114
|
};
|
|
115
|
-
//# sourceMappingURL=
|
|
115
|
+
//# sourceMappingURL=levelNames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"levelNames.d.ts","sourceRoot":"","sources":["../../../src/objects/levelNames.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkI0C,CAAC"}
|
|
@@ -8,7 +8,7 @@ local StageType = ____isaac_2Dtypescript_2Ddefinitions.StageType
|
|
|
8
8
|
-- which will not display correctly on some fonts.
|
|
9
9
|
--
|
|
10
10
|
-- Note that this contains "Blue Womb" instead of "???" for stage 9.
|
|
11
|
-
____exports.
|
|
11
|
+
____exports.LEVEL_NAMES = {
|
|
12
12
|
[LevelStage.BASEMENT_1] = {
|
|
13
13
|
[StageType.ORIGINAL] = "Basement 1",
|
|
14
14
|
[StageType.WRATH_OF_THE_LAMB] = "Cellar 1",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sackNames.d.ts","sourceRoot":"","sources":["../../../src/objects/sackNames.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAE3C,kCAAkC;AAClC,eAAO,MAAM,UAAU;;;;CAIyB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local SackSubType = ____isaac_2Dtypescript_2Ddefinitions.SackSubType
|
|
4
|
+
____exports.DEFAULT_SACK_NAME = "Unknown"
|
|
5
|
+
--- Taken from "entities2.xml".
|
|
6
|
+
____exports.SACK_NAMES = {[SackSubType.NULL] = ____exports.DEFAULT_SACK_NAME, [SackSubType.NORMAL] = "Grab Bag", [SackSubType.BLACK] = "Black Sack"}
|
|
7
|
+
return ____exports
|
package/package.json
CHANGED
package/src/functions/cards.ts
CHANGED
|
@@ -34,7 +34,7 @@ export function getCardDescription(cardType: CardType): string {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
* Helper function to get a card name from a
|
|
37
|
+
* Helper function to get a card name from a `CardType`.
|
|
38
38
|
*
|
|
39
39
|
* For example, `getCardName(Card.FOOL)` would return "0 - The Fool".
|
|
40
40
|
*/
|
package/src/functions/pickups.ts
CHANGED
|
@@ -1,18 +1,74 @@
|
|
|
1
1
|
import type {
|
|
2
|
+
BatterySubType,
|
|
3
|
+
BombSubType,
|
|
2
4
|
CoinSubType,
|
|
3
5
|
HeartSubType,
|
|
6
|
+
KeySubType,
|
|
4
7
|
PickupVariant,
|
|
8
|
+
SackSubType,
|
|
5
9
|
} from "isaac-typescript-definitions";
|
|
6
10
|
import { CHEST_PICKUP_VARIANTS_SET } from "../core/constants";
|
|
11
|
+
import { BATTERY_NAMES, DEFAULT_BATTERY_NAME } from "../objects/batteryNames";
|
|
12
|
+
import { BOMB_NAMES, DEFAULT_BOMB_NAME } from "../objects/bombNames";
|
|
13
|
+
import { CHEST_NAMES } from "../objects/chestNames";
|
|
14
|
+
import { COIN_NAMES, DEFAULT_COIN_NAME } from "../objects/coinNames";
|
|
7
15
|
import {
|
|
8
16
|
COIN_SUB_TYPE_TO_VALUE,
|
|
9
17
|
DEFAULT_COIN_VALUE,
|
|
10
18
|
} from "../objects/coinSubTypeToValue";
|
|
19
|
+
import { DEFAULT_HEART_NAME, HEART_NAMES } from "../objects/heartNames";
|
|
20
|
+
import { DEFAULT_KEY_NAME, KEY_NAMES } from "../objects/keyNames";
|
|
21
|
+
import { DEFAULT_SACK_NAME, SACK_NAMES } from "../objects/sackNames";
|
|
11
22
|
import { RED_HEART_SUB_TYPES_SET } from "../sets/redHeartSubTypesSet";
|
|
12
23
|
import { removeEntities } from "./entities";
|
|
13
24
|
import { isHeart } from "./pickupVariants";
|
|
14
25
|
import { getHearts } from "./pickupsSpecific";
|
|
15
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Helper function to get a battery name from a `BatterySubType`, as listed in the "entities2.xml"
|
|
29
|
+
* file.
|
|
30
|
+
*
|
|
31
|
+
* For example, `getBatteryName(BatterySubType.MICRO)` would return "Micro Battery".
|
|
32
|
+
*/
|
|
33
|
+
export function getBatteryName(batterySubType: BatterySubType): string {
|
|
34
|
+
// Handle modded hearts.
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
36
|
+
return BATTERY_NAMES[batterySubType] ?? DEFAULT_BATTERY_NAME;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Helper function to get a bomb name from a `BombSubType`, as listed in the "entities2.xml" file.
|
|
41
|
+
*
|
|
42
|
+
* For example, `getBombName(BombSubType.DOUBLE_PACK)` would return "Double Bomb".
|
|
43
|
+
*/
|
|
44
|
+
export function getBombName(bombSubType: BombSubType): string {
|
|
45
|
+
// Handle modded bombs.
|
|
46
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
47
|
+
return BOMB_NAMES[bombSubType] ?? DEFAULT_BOMB_NAME;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Helper function to get a chest name from a `PickupVariant`, as listed in the "entities2.xml"
|
|
52
|
+
* file. Returns "Unknown" if the pickup variant was not a chest.
|
|
53
|
+
*
|
|
54
|
+
* For example, `getChestName(PickupVariant.SPIKED_CHEST)` would return "Spiked Chest".
|
|
55
|
+
*/
|
|
56
|
+
export function getChestName(pickupVariant: PickupVariant): string {
|
|
57
|
+
const chestNames = CHEST_NAMES as Partial<Record<PickupVariant, string>>;
|
|
58
|
+
return chestNames[pickupVariant] ?? "Unknown";
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Helper function to get a coin name from a `CoinSubType`, as listed in the "entities2.xml" file.
|
|
63
|
+
*
|
|
64
|
+
* For example, `getCoinName(CoinSubType.DOUBLE_PACK)` would return "Double Penny".
|
|
65
|
+
*/
|
|
66
|
+
export function getCoinName(coinSubType: CoinSubType): string {
|
|
67
|
+
// Handle modded coins.
|
|
68
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
69
|
+
return COIN_NAMES[coinSubType] ?? DEFAULT_COIN_NAME;
|
|
70
|
+
}
|
|
71
|
+
|
|
16
72
|
/**
|
|
17
73
|
* Helper function to get the corresponding coin amount from a `CoinSubType`. Returns 1 for modded
|
|
18
74
|
* sub-types.
|
|
@@ -24,12 +80,45 @@ export function getCoinValue(coinSubType: CoinSubType): int {
|
|
|
24
80
|
return value ?? DEFAULT_COIN_VALUE;
|
|
25
81
|
}
|
|
26
82
|
|
|
83
|
+
/**
|
|
84
|
+
* Helper function to get a heart name from a `HeartSubType`, as listed in the "entities2.xml" file.
|
|
85
|
+
*
|
|
86
|
+
* For example, `getHeartName(HeartSubType.ETERNAL)` would return "Heart (eternal)".
|
|
87
|
+
*/
|
|
88
|
+
export function getHeartName(heartSubType: HeartSubType): string {
|
|
89
|
+
// Handle modded hearts.
|
|
90
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
91
|
+
return HEART_NAMES[heartSubType] ?? DEFAULT_HEART_NAME;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Helper function to get a key name from a `KeySubType`, as listed in the "entities2.xml" file.
|
|
96
|
+
*
|
|
97
|
+
* For example, `getKeyName(KeySubType.DOUBLE_PACK)` would return "Key Ring".
|
|
98
|
+
*/
|
|
99
|
+
export function getKeyName(keySubType: KeySubType): string {
|
|
100
|
+
// Handle modded bombs.
|
|
101
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
102
|
+
return KEY_NAMES[keySubType] ?? DEFAULT_KEY_NAME;
|
|
103
|
+
}
|
|
104
|
+
|
|
27
105
|
/** Helper function to get all of the red heart pickup entities in the room. */
|
|
28
106
|
export function getRedHearts(): EntityPickupHeart[] {
|
|
29
107
|
const hearts = getHearts();
|
|
30
108
|
return hearts.filter((heart) => RED_HEART_SUB_TYPES_SET.has(heart.SubType));
|
|
31
109
|
}
|
|
32
110
|
|
|
111
|
+
/**
|
|
112
|
+
* Helper function to get a sack name from a `SackSubType`, as listed in the "entities2.xml" file.
|
|
113
|
+
*
|
|
114
|
+
* For example, `getSackName(SackSubType.NORMAL)` would return "Grab Bag".
|
|
115
|
+
*/
|
|
116
|
+
export function getSackName(sackSubType: SackSubType): string {
|
|
117
|
+
// Handle modded hearts.
|
|
118
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
119
|
+
return SACK_NAMES[sackSubType] ?? DEFAULT_SACK_NAME;
|
|
120
|
+
}
|
|
121
|
+
|
|
33
122
|
/** Helper function to test if the provided pickup matches one of the various chest variants. */
|
|
34
123
|
export function isChest(pickup: EntityPickup): boolean {
|
|
35
124
|
return isChestVariant(pickup.Variant);
|
package/src/functions/pills.ts
CHANGED
|
@@ -149,7 +149,9 @@ export function getPillEffectClass(
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
/**
|
|
152
|
-
* Helper function to get a pill effect name from a PillEffect
|
|
152
|
+
* Helper function to get a pill effect name from a `PillEffect`.
|
|
153
|
+
*
|
|
154
|
+
* This function works for both vanilla and modded trinkets.
|
|
153
155
|
*
|
|
154
156
|
* For example, `getPillEffectName(PillEffect.BAD_GAS)` would return "Bad Gas".
|
|
155
157
|
*/
|
package/src/functions/stage.ts
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
StageType,
|
|
7
7
|
} from "isaac-typescript-definitions";
|
|
8
8
|
import { game } from "../core/cachedClasses";
|
|
9
|
-
import {
|
|
9
|
+
import { LEVEL_NAMES } from "../objects/levelNames";
|
|
10
10
|
import { ROOM_TYPE_SPECIAL_GOTO_PREFIXES } from "../objects/roomTypeSpecialGotoPrefixes";
|
|
11
11
|
import { STAGE_TO_STAGE_ID } from "../objects/stageToStageID";
|
|
12
12
|
import { STAGE_TYPE_SUFFIXES } from "../objects/stageTypeSuffixes";
|
|
@@ -90,6 +90,29 @@ export function getEffectiveStage(): LevelStage {
|
|
|
90
90
|
return stage;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
/**
|
|
94
|
+
* Helper function to get the corresponding "goto" console command that would correspond to the
|
|
95
|
+
* provided room type and room variant.
|
|
96
|
+
*
|
|
97
|
+
* @param roomType The `RoomType` of the destination room.
|
|
98
|
+
* @param roomVariant The variant of the destination room.
|
|
99
|
+
* @param useSpecialRoomsForRoomTypeDefault Optional. Whether to use `s.default` as the prefix for
|
|
100
|
+
* the `goto` command (instead of `d`) if the room type is
|
|
101
|
+
* `RoomType.DEFAULT` (1). False by default.
|
|
102
|
+
*/
|
|
103
|
+
export function getGotoCommand(
|
|
104
|
+
roomType: RoomType,
|
|
105
|
+
roomVariant: int,
|
|
106
|
+
useSpecialRoomsForRoomTypeDefault = false,
|
|
107
|
+
): string {
|
|
108
|
+
const isNormalRoom =
|
|
109
|
+
roomType === RoomType.DEFAULT && !useSpecialRoomsForRoomTypeDefault;
|
|
110
|
+
const roomTypeSpecialGotoPrefix = ROOM_TYPE_SPECIAL_GOTO_PREFIXES[roomType];
|
|
111
|
+
const prefix = isNormalRoom ? "d" : `s.${roomTypeSpecialGotoPrefix}`;
|
|
112
|
+
|
|
113
|
+
return `goto ${prefix}.${roomVariant}`;
|
|
114
|
+
}
|
|
115
|
+
|
|
93
116
|
/**
|
|
94
117
|
* Helper function to get the English name of the level. For example, "Caves 1".
|
|
95
118
|
*
|
|
@@ -101,7 +124,7 @@ export function getEffectiveStage(): LevelStage {
|
|
|
101
124
|
* @param stage Optional. If not specified, the current stage will be used.
|
|
102
125
|
* @param stageType Optional. If not specified, the current stage type will be used.
|
|
103
126
|
*/
|
|
104
|
-
export function
|
|
127
|
+
export function getLevelName(
|
|
105
128
|
stage?: LevelStage,
|
|
106
129
|
stageType?: StageType,
|
|
107
130
|
): string {
|
|
@@ -115,33 +138,10 @@ export function getEnglishLevelName(
|
|
|
115
138
|
stageType = level.GetStageType();
|
|
116
139
|
}
|
|
117
140
|
|
|
118
|
-
const stageNames =
|
|
141
|
+
const stageNames = LEVEL_NAMES[stage];
|
|
119
142
|
return stageNames[stageType];
|
|
120
143
|
}
|
|
121
144
|
|
|
122
|
-
/**
|
|
123
|
-
* Helper function to get the corresponding "goto" console command that would correspond to the
|
|
124
|
-
* provided room type and room variant.
|
|
125
|
-
*
|
|
126
|
-
* @param roomType The `RoomType` of the destination room.
|
|
127
|
-
* @param roomVariant The variant of the destination room.
|
|
128
|
-
* @param useSpecialRoomsForRoomTypeDefault Optional. Whether to use `s.default` as the prefix for
|
|
129
|
-
* the `goto` command (instead of `d`) if the room type is
|
|
130
|
-
* `RoomType.DEFAULT` (1). False by default.
|
|
131
|
-
*/
|
|
132
|
-
export function getGotoCommand(
|
|
133
|
-
roomType: RoomType,
|
|
134
|
-
roomVariant: int,
|
|
135
|
-
useSpecialRoomsForRoomTypeDefault = false,
|
|
136
|
-
): string {
|
|
137
|
-
const isNormalRoom =
|
|
138
|
-
roomType === RoomType.DEFAULT && !useSpecialRoomsForRoomTypeDefault;
|
|
139
|
-
const roomTypeSpecialGotoPrefix = ROOM_TYPE_SPECIAL_GOTO_PREFIXES[roomType];
|
|
140
|
-
const prefix = isNormalRoom ? "d" : `s.${roomTypeSpecialGotoPrefix}`;
|
|
141
|
-
|
|
142
|
-
return `goto ${prefix}.${roomVariant}`;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
145
|
/** Alias for the `Level.GetStage` method. */
|
|
146
146
|
export function getStage(): LevelStage {
|
|
147
147
|
const level = game.GetLevel();
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BatterySubType } from "isaac-typescript-definitions";
|
|
2
|
+
|
|
3
|
+
export const DEFAULT_BATTERY_NAME = "Unknown";
|
|
4
|
+
|
|
5
|
+
/** Taken from "entities2.xml". */
|
|
6
|
+
export const BATTERY_NAMES = {
|
|
7
|
+
[BatterySubType.NULL]: DEFAULT_BATTERY_NAME, // 0
|
|
8
|
+
[BatterySubType.NORMAL]: "Lil' Battery", // 1
|
|
9
|
+
[BatterySubType.MICRO]: "Micro Battery", // 2
|
|
10
|
+
[BatterySubType.MEGA]: "Mega Battery", // 3
|
|
11
|
+
[BatterySubType.GOLDEN]: "Golden Battery", // 4
|
|
12
|
+
} as const satisfies Record<BatterySubType, string>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BombSubType } from "isaac-typescript-definitions";
|
|
2
|
+
|
|
3
|
+
export const DEFAULT_BOMB_NAME = "Unknown";
|
|
4
|
+
|
|
5
|
+
/** Taken from "entities2.xml". */
|
|
6
|
+
export const BOMB_NAMES = {
|
|
7
|
+
[BombSubType.NULL]: DEFAULT_BOMB_NAME, // 0
|
|
8
|
+
[BombSubType.NORMAL]: "Bomb", // 1
|
|
9
|
+
[BombSubType.DOUBLE_PACK]: "Double Bomb", // 2
|
|
10
|
+
[BombSubType.TROLL]: "Troll Bomb", // 3
|
|
11
|
+
[BombSubType.GOLDEN]: "Golden Bomb", // 4
|
|
12
|
+
[BombSubType.MEGA_TROLL]: "Megatroll Bomb", // 5
|
|
13
|
+
// The entry for "Golden Troll Bomb" is absent in "entities2.xml", so we infer the name.
|
|
14
|
+
[BombSubType.GOLDEN_TROLL]: "Golden Troll Bomb", // 6
|
|
15
|
+
[BombSubType.GIGA]: "Giga Bomb", // 7
|
|
16
|
+
} as const satisfies Record<BombSubType, string>;
|