isaacscript-common 51.0.0 → 51.1.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 +8 -0
- package/dist/isaacscript-common.lua +71 -14
- package/dist/src/classes/features/other/customStages/versusScreen.lua +9 -9
- package/dist/src/functions/characters.d.ts +7 -0
- package/dist/src/functions/characters.d.ts.map +1 -1
- package/dist/src/functions/characters.lua +11 -0
- package/dist/src/functions/versusScreen.d.ts +16 -12
- package/dist/src/functions/versusScreen.d.ts.map +1 -1
- package/dist/src/functions/versusScreen.lua +16 -12
- package/dist/src/objects/characterSpritePNGFileNames.d.ts +45 -0
- package/dist/src/objects/characterSpritePNGFileNames.d.ts.map +1 -0
- package/dist/src/objects/characterSpritePNGFileNames.lua +48 -0
- package/package.json +1 -1
- package/src/classes/features/other/customStages/versusScreen.ts +9 -9
- package/src/functions/characters.ts +14 -0
- package/src/functions/versusScreen.ts +16 -12
- package/src/objects/characterSpritePNGFileNames.ts +49 -0
package/dist/index.rollup.d.ts
CHANGED
|
@@ -4971,6 +4971,14 @@ export declare function getCharacterName(character: PlayerType): string;
|
|
|
4971
4971
|
/** Helper function to get an array containing the characters of all of the current players. */
|
|
4972
4972
|
export declare function getCharacters(): PlayerType[];
|
|
4973
4973
|
|
|
4974
|
+
/**
|
|
4975
|
+
* Helper function to get the path to the sprite for a particular character.
|
|
4976
|
+
*
|
|
4977
|
+
* For example, the file path for `PlayerType.ISAAC` is
|
|
4978
|
+
* "characters/costumes/character_001_isaac.png".
|
|
4979
|
+
*/
|
|
4980
|
+
export declare function getCharacterSpritePNGFilePath(character: PlayerType): string;
|
|
4981
|
+
|
|
4974
4982
|
/**
|
|
4975
4983
|
* Helper function to get the collectibles that are granted to a particular character at the
|
|
4976
4984
|
* beginning of a run.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 51.
|
|
3
|
+
isaacscript-common 51.1.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -19152,6 +19152,56 @@ ____exports.CHARACTER_NAMES = {
|
|
|
19152
19152
|
[PlayerType.JACOB_2_B] = "Dead Tainted Jacob",
|
|
19153
19153
|
[PlayerType.SOUL_B] = "Tainted Soul"
|
|
19154
19154
|
}
|
|
19155
|
+
return ____exports
|
|
19156
|
+
end,
|
|
19157
|
+
["src.objects.characterSpritePNGFileNames"] = function(...)
|
|
19158
|
+
local ____exports = {}
|
|
19159
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
19160
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
19161
|
+
____exports.CHARACTER_SPRITE_PNG_FILE_NAMES = {
|
|
19162
|
+
[PlayerType.POSSESSOR] = "character_001_isaac.png",
|
|
19163
|
+
[PlayerType.ISAAC] = "character_001_isaac.png",
|
|
19164
|
+
[PlayerType.MAGDALENE] = "character_002_magdalene.png",
|
|
19165
|
+
[PlayerType.CAIN] = "character_003_cain.png",
|
|
19166
|
+
[PlayerType.JUDAS] = "character_004_judas.png",
|
|
19167
|
+
[PlayerType.BLUE_BABY] = "character_006_bluebaby.png",
|
|
19168
|
+
[PlayerType.EVE] = "character_005_eve.png",
|
|
19169
|
+
[PlayerType.SAMSON] = "character_007_samson.png",
|
|
19170
|
+
[PlayerType.AZAZEL] = "character_008_azazel.png",
|
|
19171
|
+
[PlayerType.LAZARUS] = "character_009_lazarus.png",
|
|
19172
|
+
[PlayerType.EDEN] = "character_009_eden.png",
|
|
19173
|
+
[PlayerType.LOST] = "character_012_thelost.png",
|
|
19174
|
+
[PlayerType.LAZARUS_2] = "character_010_lazarus2.png",
|
|
19175
|
+
[PlayerType.DARK_JUDAS] = "character_013_blackjudas.png",
|
|
19176
|
+
[PlayerType.LILITH] = "character_014_lilith.png",
|
|
19177
|
+
[PlayerType.KEEPER] = "character_015_keeper.png",
|
|
19178
|
+
[PlayerType.APOLLYON] = "character_016_apollyon.png",
|
|
19179
|
+
[PlayerType.FORGOTTEN] = "character_017_theforgotten.png",
|
|
19180
|
+
[PlayerType.SOUL] = "character_018_thesoul.png",
|
|
19181
|
+
[PlayerType.BETHANY] = "character_001x_bethany.png",
|
|
19182
|
+
[PlayerType.JACOB] = "character_002x_jacob.png",
|
|
19183
|
+
[PlayerType.ESAU] = "character_003x_esau.png",
|
|
19184
|
+
[PlayerType.ISAAC_B] = "character_001b_isaac.png",
|
|
19185
|
+
[PlayerType.MAGDALENE_B] = "character_002b_magdalene.png",
|
|
19186
|
+
[PlayerType.CAIN_B] = "character_003b_cain.png",
|
|
19187
|
+
[PlayerType.JUDAS_B] = "character_004b_judas.png",
|
|
19188
|
+
[PlayerType.BLUE_BABY_B] = "character_005b_bluebaby.png",
|
|
19189
|
+
[PlayerType.EVE_B] = "character_006b_eve.png",
|
|
19190
|
+
[PlayerType.SAMSON_B] = "character_007b_samson.png",
|
|
19191
|
+
[PlayerType.AZAZEL_B] = "character_008b_azazel.png",
|
|
19192
|
+
[PlayerType.LAZARUS_B] = "character_009b_lazarus.png",
|
|
19193
|
+
[PlayerType.EDEN_B] = "character_009_eden.png",
|
|
19194
|
+
[PlayerType.LOST_B] = "character_012b_thelost.png",
|
|
19195
|
+
[PlayerType.LILITH_B] = "character_014b_lilith.png",
|
|
19196
|
+
[PlayerType.KEEPER_B] = "character_015b_keeper.png",
|
|
19197
|
+
[PlayerType.APOLLYON_B] = "character_016b_apollyon.png",
|
|
19198
|
+
[PlayerType.FORGOTTEN_B] = "character_016b_theforgotten.png",
|
|
19199
|
+
[PlayerType.BETHANY_B] = "character_018b_bethany.png",
|
|
19200
|
+
[PlayerType.JACOB_B] = "character_019b_jacob.png",
|
|
19201
|
+
[PlayerType.LAZARUS_2_B] = "character_009b_lazarus2.png",
|
|
19202
|
+
[PlayerType.JACOB_2_B] = "character_019b_jacob2.png",
|
|
19203
|
+
[PlayerType.SOUL_B] = "character_017b_thesoul.png"
|
|
19204
|
+
}
|
|
19155
19205
|
return ____exports
|
|
19156
19206
|
end,
|
|
19157
19207
|
["src.objects.characterStartingCollectibleTypes"] = function(...)
|
|
@@ -19370,6 +19420,8 @@ local ____characterDamageMultipliers = require("src.objects.characterDamageMulti
|
|
|
19370
19420
|
local CHARACTER_DAMAGE_MULTIPLIERS = ____characterDamageMultipliers.CHARACTER_DAMAGE_MULTIPLIERS
|
|
19371
19421
|
local ____characterNames = require("src.objects.characterNames")
|
|
19372
19422
|
local CHARACTER_NAMES = ____characterNames.CHARACTER_NAMES
|
|
19423
|
+
local ____characterSpritePNGFileNames = require("src.objects.characterSpritePNGFileNames")
|
|
19424
|
+
local CHARACTER_SPRITE_PNG_FILE_NAMES = ____characterSpritePNGFileNames.CHARACTER_SPRITE_PNG_FILE_NAMES
|
|
19373
19425
|
local ____characterStartingCollectibleTypes = require("src.objects.characterStartingCollectibleTypes")
|
|
19374
19426
|
local CHARACTER_STARTING_COLLECTIBLE_TYPES = ____characterStartingCollectibleTypes.CHARACTER_STARTING_COLLECTIBLE_TYPES
|
|
19375
19427
|
local ____characterStartingTrinketTypes = require("src.objects.characterStartingTrinketTypes")
|
|
@@ -19396,6 +19448,7 @@ function ____exports.isVanillaCharacter(self, character)
|
|
|
19396
19448
|
end
|
|
19397
19449
|
local FLYING_CHARACTERS_SET = __TS__New(ReadonlySet, FLYING_CHARACTERS)
|
|
19398
19450
|
local MAIN_CHARACTERS_SET = __TS__New(ReadonlySet, MAIN_CHARACTERS)
|
|
19451
|
+
local PNG_PATH_PREFIX = "characters/costumes"
|
|
19399
19452
|
function ____exports.characterCanHaveRedHearts(self, character)
|
|
19400
19453
|
return not CHARACTERS_WITH_NO_RED_HEARTS_SET:has(character)
|
|
19401
19454
|
end
|
|
@@ -19450,6 +19503,10 @@ function ____exports.getCharacterName(self, character)
|
|
|
19450
19503
|
end
|
|
19451
19504
|
return CHARACTER_NAMES[character]
|
|
19452
19505
|
end
|
|
19506
|
+
function ____exports.getCharacterSpritePNGFilePath(self, character)
|
|
19507
|
+
local fileName = CHARACTER_SPRITE_PNG_FILE_NAMES[character]
|
|
19508
|
+
return (PNG_PATH_PREFIX .. "/") .. fileName
|
|
19509
|
+
end
|
|
19453
19510
|
function ____exports.getCharacterStartingCollectibleTypes(self, character)
|
|
19454
19511
|
return CHARACTER_STARTING_COLLECTIBLE_TYPES[character]
|
|
19455
19512
|
end
|
|
@@ -44762,19 +44819,19 @@ local ____playerPortraitPNGFileNames = require("src.objects.playerPortraitPNGFil
|
|
|
44762
44819
|
local PLAYER_PORTRAIT_PNG_FILE_NAMES = ____playerPortraitPNGFileNames.PLAYER_PORTRAIT_PNG_FILE_NAMES
|
|
44763
44820
|
local PNG_PATH_PREFIX = "gfx/ui/boss"
|
|
44764
44821
|
local PLAYER_PORTRAIT_PNG_PATH_PREFIX = "gfx/ui/stage"
|
|
44765
|
-
function ____exports.
|
|
44822
|
+
function ____exports.getBossNamePNGFilePath(self, bossID)
|
|
44766
44823
|
local fileName = BOSS_NAME_PNG_FILE_NAMES[bossID]
|
|
44767
44824
|
return (PNG_PATH_PREFIX .. "/") .. fileName
|
|
44768
44825
|
end
|
|
44769
|
-
function ____exports.
|
|
44826
|
+
function ____exports.getBossPortraitPNGFilePath(self, bossID)
|
|
44770
44827
|
local fileName = BOSS_PORTRAIT_PNG_FILE_NAMES[bossID]
|
|
44771
44828
|
return (PNG_PATH_PREFIX .. "/") .. fileName
|
|
44772
44829
|
end
|
|
44773
|
-
function ____exports.
|
|
44830
|
+
function ____exports.getCharacterNamePNGFilePath(self, character)
|
|
44774
44831
|
local fileName = PLAYER_NAME_PNG_FILE_NAMES[character]
|
|
44775
44832
|
return (PNG_PATH_PREFIX .. "/") .. tostring(fileName)
|
|
44776
44833
|
end
|
|
44777
|
-
function ____exports.
|
|
44834
|
+
function ____exports.getCharacterPortraitPNGFilePath(self, character)
|
|
44778
44835
|
local fileName = PLAYER_PORTRAIT_PNG_FILE_NAMES[character]
|
|
44779
44836
|
return (PLAYER_PORTRAIT_PNG_PATH_PREFIX .. "/") .. tostring(fileName)
|
|
44780
44837
|
end
|
|
@@ -44888,10 +44945,10 @@ local getScreenCenterPos = ____ui.getScreenCenterPos
|
|
|
44888
44945
|
local ____utils = require("src.functions.utils")
|
|
44889
44946
|
local eRange = ____utils.eRange
|
|
44890
44947
|
local ____versusScreen = require("src.functions.versusScreen")
|
|
44891
|
-
local
|
|
44892
|
-
local
|
|
44893
|
-
local
|
|
44894
|
-
local
|
|
44948
|
+
local getBossNamePNGFilePath = ____versusScreen.getBossNamePNGFilePath
|
|
44949
|
+
local getBossPortraitPNGFilePath = ____versusScreen.getBossPortraitPNGFilePath
|
|
44950
|
+
local getCharacterNamePNGFilePath = ____versusScreen.getCharacterNamePNGFilePath
|
|
44951
|
+
local getCharacterPortraitPNGFilePath = ____versusScreen.getCharacterPortraitPNGFilePath
|
|
44895
44952
|
local ____versusScreenBackgroundColors = require("src.objects.versusScreenBackgroundColors")
|
|
44896
44953
|
local VERSUS_SCREEN_BACKGROUND_COLORS = ____versusScreenBackgroundColors.VERSUS_SCREEN_BACKGROUND_COLORS
|
|
44897
44954
|
local ____versusScreenDirtSpotColors = require("src.objects.versusScreenDirtSpotColors")
|
|
@@ -44918,8 +44975,8 @@ function getPlayerPNGPaths(self)
|
|
|
44918
44975
|
if character == PlayerType.POSSESSOR then
|
|
44919
44976
|
error("Failed to get the player PNG paths since they are a possessor.")
|
|
44920
44977
|
end
|
|
44921
|
-
local namePNGPath =
|
|
44922
|
-
local portraitPNGPath =
|
|
44978
|
+
local namePNGPath = getCharacterNamePNGFilePath(nil, character)
|
|
44979
|
+
local portraitPNGPath = getCharacterPortraitPNGFilePath(nil, character)
|
|
44923
44980
|
return {namePNGPath = namePNGPath, portraitPNGPath = portraitPNGPath}
|
|
44924
44981
|
end
|
|
44925
44982
|
function getBossPNGPaths(self, customStage)
|
|
@@ -44931,13 +44988,13 @@ function getBossPNGPaths(self, customStage)
|
|
|
44931
44988
|
local firstBoss = bosses[1]
|
|
44932
44989
|
local bossID = firstBoss == nil and 0 or firstBoss:GetBossID()
|
|
44933
44990
|
if bossID == 0 then
|
|
44934
|
-
local questionMarkPath =
|
|
44991
|
+
local questionMarkPath = getBossNamePNGFilePath(nil, BossID.BLUE_BABY)
|
|
44935
44992
|
local namePNGPath = questionMarkPath
|
|
44936
44993
|
local portraitPNGPath = questionMarkPath
|
|
44937
44994
|
return {namePNGPath = namePNGPath, portraitPNGPath = portraitPNGPath}
|
|
44938
44995
|
end
|
|
44939
|
-
local namePNGPath =
|
|
44940
|
-
local portraitPNGPath =
|
|
44996
|
+
local namePNGPath = getBossNamePNGFilePath(nil, bossID)
|
|
44997
|
+
local portraitPNGPath = getBossPortraitPNGFilePath(nil, bossID)
|
|
44941
44998
|
return {namePNGPath = namePNGPath, portraitPNGPath = portraitPNGPath}
|
|
44942
44999
|
end
|
|
44943
45000
|
function getBossPNGPathsCustom(self, customStage)
|
|
@@ -25,10 +25,10 @@ local getScreenCenterPos = ____ui.getScreenCenterPos
|
|
|
25
25
|
local ____utils = require("src.functions.utils")
|
|
26
26
|
local eRange = ____utils.eRange
|
|
27
27
|
local ____versusScreen = require("src.functions.versusScreen")
|
|
28
|
-
local
|
|
29
|
-
local
|
|
30
|
-
local
|
|
31
|
-
local
|
|
28
|
+
local getBossNamePNGFilePath = ____versusScreen.getBossNamePNGFilePath
|
|
29
|
+
local getBossPortraitPNGFilePath = ____versusScreen.getBossPortraitPNGFilePath
|
|
30
|
+
local getCharacterNamePNGFilePath = ____versusScreen.getCharacterNamePNGFilePath
|
|
31
|
+
local getCharacterPortraitPNGFilePath = ____versusScreen.getCharacterPortraitPNGFilePath
|
|
32
32
|
local ____versusScreenBackgroundColors = require("src.objects.versusScreenBackgroundColors")
|
|
33
33
|
local VERSUS_SCREEN_BACKGROUND_COLORS = ____versusScreenBackgroundColors.VERSUS_SCREEN_BACKGROUND_COLORS
|
|
34
34
|
local ____versusScreenDirtSpotColors = require("src.objects.versusScreenDirtSpotColors")
|
|
@@ -55,8 +55,8 @@ function getPlayerPNGPaths(self)
|
|
|
55
55
|
if character == PlayerType.POSSESSOR then
|
|
56
56
|
error("Failed to get the player PNG paths since they are a possessor.")
|
|
57
57
|
end
|
|
58
|
-
local namePNGPath =
|
|
59
|
-
local portraitPNGPath =
|
|
58
|
+
local namePNGPath = getCharacterNamePNGFilePath(nil, character)
|
|
59
|
+
local portraitPNGPath = getCharacterPortraitPNGFilePath(nil, character)
|
|
60
60
|
return {namePNGPath = namePNGPath, portraitPNGPath = portraitPNGPath}
|
|
61
61
|
end
|
|
62
62
|
function getBossPNGPaths(self, customStage)
|
|
@@ -68,13 +68,13 @@ function getBossPNGPaths(self, customStage)
|
|
|
68
68
|
local firstBoss = bosses[1]
|
|
69
69
|
local bossID = firstBoss == nil and 0 or firstBoss:GetBossID()
|
|
70
70
|
if bossID == 0 then
|
|
71
|
-
local questionMarkPath =
|
|
71
|
+
local questionMarkPath = getBossNamePNGFilePath(nil, BossID.BLUE_BABY)
|
|
72
72
|
local namePNGPath = questionMarkPath
|
|
73
73
|
local portraitPNGPath = questionMarkPath
|
|
74
74
|
return {namePNGPath = namePNGPath, portraitPNGPath = portraitPNGPath}
|
|
75
75
|
end
|
|
76
|
-
local namePNGPath =
|
|
77
|
-
local portraitPNGPath =
|
|
76
|
+
local namePNGPath = getBossNamePNGFilePath(nil, bossID)
|
|
77
|
+
local portraitPNGPath = getBossPortraitPNGFilePath(nil, bossID)
|
|
78
78
|
return {namePNGPath = namePNGPath, portraitPNGPath = portraitPNGPath}
|
|
79
79
|
end
|
|
80
80
|
function getBossPNGPathsCustom(self, customStage)
|
|
@@ -47,6 +47,13 @@ export declare function getCharacterDeathAnimationName(character: PlayerType): s
|
|
|
47
47
|
export declare function getCharacterMaxHeartContainers(character: PlayerType): int;
|
|
48
48
|
/** Helper function to get the name of a character. Returns "Unknown" for modded characters. */
|
|
49
49
|
export declare function getCharacterName(character: PlayerType): string;
|
|
50
|
+
/**
|
|
51
|
+
* Helper function to get the path to the sprite for a particular character.
|
|
52
|
+
*
|
|
53
|
+
* For example, the file path for `PlayerType.ISAAC` is
|
|
54
|
+
* "characters/costumes/character_001_isaac.png".
|
|
55
|
+
*/
|
|
56
|
+
export declare function getCharacterSpritePNGFilePath(character: PlayerType): string;
|
|
50
57
|
/**
|
|
51
58
|
* Helper function to get the collectibles that are granted to a particular character at the
|
|
52
59
|
* beginning of a run.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"characters.d.ts","sourceRoot":"","sources":["../../../src/functions/characters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACZ,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"characters.d.ts","sourceRoot":"","sources":["../../../src/functions/characters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACZ,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAqB1D;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAExE;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAEzE;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAE7E;AAED;;;;GAIG;AACH,wBAAgB,uCAAuC,CACrD,SAAS,EAAE,UAAU,GACpB,OAAO,CAET;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAE5E;AAED,8EAA8E;AAC9E,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,UAAU,EACrB,iBAAiB,UAAQ,GACxB,KAAK,CAMP;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,UAAU,GAAG,MAAM,CAU5E;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,UAAU,GAAG,GAAG,CAsBzE;AAED,+FAA+F;AAC/F,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,UAAU,GAAG,MAAM,CAM9D;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,SAAS,EAAE,UAAU,GAAG,MAAM,CAG3E;AAED;;;;;GAKG;AACH,wBAAgB,oCAAoC,CAClD,SAAS,EAAE,UAAU,GACpB,SAAS,eAAe,EAAE,CAE5B;AAED;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAC7C,SAAS,EAAE,UAAU,GACpB,WAAW,GAAG,SAAS,CAEzB;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAEhE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAE9D;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAEhE;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAEjE"}
|
|
@@ -12,6 +12,8 @@ local ____characterDamageMultipliers = require("src.objects.characterDamageMulti
|
|
|
12
12
|
local CHARACTER_DAMAGE_MULTIPLIERS = ____characterDamageMultipliers.CHARACTER_DAMAGE_MULTIPLIERS
|
|
13
13
|
local ____characterNames = require("src.objects.characterNames")
|
|
14
14
|
local CHARACTER_NAMES = ____characterNames.CHARACTER_NAMES
|
|
15
|
+
local ____characterSpritePNGFileNames = require("src.objects.characterSpritePNGFileNames")
|
|
16
|
+
local CHARACTER_SPRITE_PNG_FILE_NAMES = ____characterSpritePNGFileNames.CHARACTER_SPRITE_PNG_FILE_NAMES
|
|
15
17
|
local ____characterStartingCollectibleTypes = require("src.objects.characterStartingCollectibleTypes")
|
|
16
18
|
local CHARACTER_STARTING_COLLECTIBLE_TYPES = ____characterStartingCollectibleTypes.CHARACTER_STARTING_COLLECTIBLE_TYPES
|
|
17
19
|
local ____characterStartingTrinketTypes = require("src.objects.characterStartingTrinketTypes")
|
|
@@ -38,6 +40,7 @@ function ____exports.isVanillaCharacter(self, character)
|
|
|
38
40
|
end
|
|
39
41
|
local FLYING_CHARACTERS_SET = __TS__New(ReadonlySet, FLYING_CHARACTERS)
|
|
40
42
|
local MAIN_CHARACTERS_SET = __TS__New(ReadonlySet, MAIN_CHARACTERS)
|
|
43
|
+
local PNG_PATH_PREFIX = "characters/costumes"
|
|
41
44
|
--- Helper function to determine if the given character can have red heart containers. Returns true
|
|
42
45
|
-- for characters like Isaac, Magdalene, or Cain. Returns true for Keeper and Tainted Keeper, even
|
|
43
46
|
-- though coin containers are not technically the same as red heart containers. Returns false for
|
|
@@ -116,6 +119,14 @@ function ____exports.getCharacterName(self, character)
|
|
|
116
119
|
end
|
|
117
120
|
return CHARACTER_NAMES[character]
|
|
118
121
|
end
|
|
122
|
+
--- Helper function to get the path to the sprite for a particular character.
|
|
123
|
+
--
|
|
124
|
+
-- For example, the file path for `PlayerType.ISAAC` is
|
|
125
|
+
-- "characters/costumes/character_001_isaac.png".
|
|
126
|
+
function ____exports.getCharacterSpritePNGFilePath(self, character)
|
|
127
|
+
local fileName = CHARACTER_SPRITE_PNG_FILE_NAMES[character]
|
|
128
|
+
return (PNG_PATH_PREFIX .. "/") .. fileName
|
|
129
|
+
end
|
|
119
130
|
--- Helper function to get the collectibles that are granted to a particular character at the
|
|
120
131
|
-- beginning of a run.
|
|
121
132
|
--
|
|
@@ -1,26 +1,30 @@
|
|
|
1
1
|
import type { BossID, PlayerType } from "isaac-typescript-definitions";
|
|
2
2
|
/**
|
|
3
3
|
* Helper function to get the path to the name file that corresponds to the graphic shown on the
|
|
4
|
-
* versus screen for the particular boss.
|
|
5
|
-
*
|
|
4
|
+
* versus screen for the particular boss.
|
|
5
|
+
*
|
|
6
|
+
* For example, the file path for `BossID.MONSTRO` is "gfx/ui/boss/bossname_20.0_monstro.png".
|
|
6
7
|
*/
|
|
7
|
-
export declare function
|
|
8
|
+
export declare function getBossNamePNGFilePath(bossID: BossID): string;
|
|
8
9
|
/**
|
|
9
10
|
* Helper function to get the path to the portrait file that corresponds to the graphic shown on the
|
|
10
|
-
* versus screen for the particular boss.
|
|
11
|
-
*
|
|
11
|
+
* versus screen for the particular boss.
|
|
12
|
+
*
|
|
13
|
+
* For example, the file path for `BossID.MONSTRO` is "gfx/ui/boss/portrait_20.0_monstro.png".
|
|
12
14
|
*/
|
|
13
|
-
export declare function
|
|
15
|
+
export declare function getBossPortraitPNGFilePath(bossID: BossID): string;
|
|
14
16
|
/**
|
|
15
17
|
* Helper function to get the path to the name file that corresponds to the graphic shown on the
|
|
16
|
-
* versus screen for the particular character.
|
|
17
|
-
*
|
|
18
|
+
* versus screen for the particular character.
|
|
19
|
+
*
|
|
20
|
+
* For example, the file path for `PlayerType.ISAAC` is "gfx/ui/boss/playername_01_isaac.png".
|
|
18
21
|
*/
|
|
19
|
-
export declare function
|
|
22
|
+
export declare function getCharacterNamePNGFilePath(character: PlayerType): string;
|
|
20
23
|
/**
|
|
21
24
|
* Helper function to get the path to the portrait file that corresponds to the graphic shown on the
|
|
22
|
-
* versus screen for the particular character.
|
|
23
|
-
*
|
|
25
|
+
* versus screen for the particular character.
|
|
26
|
+
*
|
|
27
|
+
* For example, the file path for `PlayerType.ISAAC` is "gfx/ui/boss/playerportrait_isaac.png".
|
|
24
28
|
*/
|
|
25
|
-
export declare function
|
|
29
|
+
export declare function getCharacterPortraitPNGFilePath(character: PlayerType): string;
|
|
26
30
|
//# sourceMappingURL=versusScreen.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versusScreen.d.ts","sourceRoot":"","sources":["../../../src/functions/versusScreen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAevE
|
|
1
|
+
{"version":3,"file":"versusScreen.d.ts","sourceRoot":"","sources":["../../../src/functions/versusScreen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAevE;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAG7D;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAGjE;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,UAAU,GAAG,MAAM,CAGzE;AAED;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAAC,SAAS,EAAE,UAAU,GAAG,MAAM,CAG7E"}
|
|
@@ -13,30 +13,34 @@ local PNG_PATH_PREFIX = "gfx/ui/boss"
|
|
|
13
13
|
-- from the animation where the player travels to a new stage.
|
|
14
14
|
local PLAYER_PORTRAIT_PNG_PATH_PREFIX = "gfx/ui/stage"
|
|
15
15
|
--- Helper function to get the path to the name file that corresponds to the graphic shown on the
|
|
16
|
-
-- versus screen for the particular boss.
|
|
17
|
-
--
|
|
18
|
-
|
|
16
|
+
-- versus screen for the particular boss.
|
|
17
|
+
--
|
|
18
|
+
-- For example, the file path for `BossID.MONSTRO` is "gfx/ui/boss/bossname_20.0_monstro.png".
|
|
19
|
+
function ____exports.getBossNamePNGFilePath(self, bossID)
|
|
19
20
|
local fileName = BOSS_NAME_PNG_FILE_NAMES[bossID]
|
|
20
21
|
return (PNG_PATH_PREFIX .. "/") .. fileName
|
|
21
22
|
end
|
|
22
23
|
--- Helper function to get the path to the portrait file that corresponds to the graphic shown on the
|
|
23
|
-
-- versus screen for the particular boss.
|
|
24
|
-
--
|
|
25
|
-
|
|
24
|
+
-- versus screen for the particular boss.
|
|
25
|
+
--
|
|
26
|
+
-- For example, the file path for `BossID.MONSTRO` is "gfx/ui/boss/portrait_20.0_monstro.png".
|
|
27
|
+
function ____exports.getBossPortraitPNGFilePath(self, bossID)
|
|
26
28
|
local fileName = BOSS_PORTRAIT_PNG_FILE_NAMES[bossID]
|
|
27
29
|
return (PNG_PATH_PREFIX .. "/") .. fileName
|
|
28
30
|
end
|
|
29
31
|
--- Helper function to get the path to the name file that corresponds to the graphic shown on the
|
|
30
|
-
-- versus screen for the particular character.
|
|
31
|
-
--
|
|
32
|
-
|
|
32
|
+
-- versus screen for the particular character.
|
|
33
|
+
--
|
|
34
|
+
-- For example, the file path for `PlayerType.ISAAC` is "gfx/ui/boss/playername_01_isaac.png".
|
|
35
|
+
function ____exports.getCharacterNamePNGFilePath(self, character)
|
|
33
36
|
local fileName = PLAYER_NAME_PNG_FILE_NAMES[character]
|
|
34
37
|
return (PNG_PATH_PREFIX .. "/") .. tostring(fileName)
|
|
35
38
|
end
|
|
36
39
|
--- Helper function to get the path to the portrait file that corresponds to the graphic shown on the
|
|
37
|
-
-- versus screen for the particular character.
|
|
38
|
-
--
|
|
39
|
-
|
|
40
|
+
-- versus screen for the particular character.
|
|
41
|
+
--
|
|
42
|
+
-- For example, the file path for `PlayerType.ISAAC` is "gfx/ui/boss/playerportrait_isaac.png".
|
|
43
|
+
function ____exports.getCharacterPortraitPNGFilePath(self, character)
|
|
40
44
|
local fileName = PLAYER_PORTRAIT_PNG_FILE_NAMES[character]
|
|
41
45
|
return (PLAYER_PORTRAIT_PNG_PATH_PREFIX .. "/") .. tostring(fileName)
|
|
42
46
|
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export declare const CHARACTER_SPRITE_PNG_FILE_NAMES: {
|
|
2
|
+
readonly [-1]: "character_001_isaac.png";
|
|
3
|
+
readonly 0: "character_001_isaac.png";
|
|
4
|
+
readonly 1: "character_002_magdalene.png";
|
|
5
|
+
readonly 2: "character_003_cain.png";
|
|
6
|
+
readonly 3: "character_004_judas.png";
|
|
7
|
+
readonly 4: "character_006_bluebaby.png";
|
|
8
|
+
readonly 5: "character_005_eve.png";
|
|
9
|
+
readonly 6: "character_007_samson.png";
|
|
10
|
+
readonly 7: "character_008_azazel.png";
|
|
11
|
+
readonly 8: "character_009_lazarus.png";
|
|
12
|
+
readonly 9: "character_009_eden.png";
|
|
13
|
+
readonly 10: "character_012_thelost.png";
|
|
14
|
+
readonly 11: "character_010_lazarus2.png";
|
|
15
|
+
readonly 12: "character_013_blackjudas.png";
|
|
16
|
+
readonly 13: "character_014_lilith.png";
|
|
17
|
+
readonly 14: "character_015_keeper.png";
|
|
18
|
+
readonly 15: "character_016_apollyon.png";
|
|
19
|
+
readonly 16: "character_017_theforgotten.png";
|
|
20
|
+
readonly 17: "character_018_thesoul.png";
|
|
21
|
+
readonly 18: "character_001x_bethany.png";
|
|
22
|
+
readonly 19: "character_002x_jacob.png";
|
|
23
|
+
readonly 20: "character_003x_esau.png";
|
|
24
|
+
readonly 21: "character_001b_isaac.png";
|
|
25
|
+
readonly 22: "character_002b_magdalene.png";
|
|
26
|
+
readonly 23: "character_003b_cain.png";
|
|
27
|
+
readonly 24: "character_004b_judas.png";
|
|
28
|
+
readonly 25: "character_005b_bluebaby.png";
|
|
29
|
+
readonly 26: "character_006b_eve.png";
|
|
30
|
+
readonly 27: "character_007b_samson.png";
|
|
31
|
+
readonly 28: "character_008b_azazel.png";
|
|
32
|
+
readonly 29: "character_009b_lazarus.png";
|
|
33
|
+
readonly 30: "character_009_eden.png";
|
|
34
|
+
readonly 31: "character_012b_thelost.png";
|
|
35
|
+
readonly 32: "character_014b_lilith.png";
|
|
36
|
+
readonly 33: "character_015b_keeper.png";
|
|
37
|
+
readonly 34: "character_016b_apollyon.png";
|
|
38
|
+
readonly 35: "character_016b_theforgotten.png";
|
|
39
|
+
readonly 36: "character_018b_bethany.png";
|
|
40
|
+
readonly 37: "character_019b_jacob.png";
|
|
41
|
+
readonly 38: "character_009b_lazarus2.png";
|
|
42
|
+
readonly 39: "character_019b_jacob2.png";
|
|
43
|
+
readonly 40: "character_017b_thesoul.png";
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=characterSpritePNGFileNames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"characterSpritePNGFileNames.d.ts","sourceRoot":"","sources":["../../../src/objects/characterSpritePNGFileNames.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CG,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
4
|
+
____exports.CHARACTER_SPRITE_PNG_FILE_NAMES = {
|
|
5
|
+
[PlayerType.POSSESSOR] = "character_001_isaac.png",
|
|
6
|
+
[PlayerType.ISAAC] = "character_001_isaac.png",
|
|
7
|
+
[PlayerType.MAGDALENE] = "character_002_magdalene.png",
|
|
8
|
+
[PlayerType.CAIN] = "character_003_cain.png",
|
|
9
|
+
[PlayerType.JUDAS] = "character_004_judas.png",
|
|
10
|
+
[PlayerType.BLUE_BABY] = "character_006_bluebaby.png",
|
|
11
|
+
[PlayerType.EVE] = "character_005_eve.png",
|
|
12
|
+
[PlayerType.SAMSON] = "character_007_samson.png",
|
|
13
|
+
[PlayerType.AZAZEL] = "character_008_azazel.png",
|
|
14
|
+
[PlayerType.LAZARUS] = "character_009_lazarus.png",
|
|
15
|
+
[PlayerType.EDEN] = "character_009_eden.png",
|
|
16
|
+
[PlayerType.LOST] = "character_012_thelost.png",
|
|
17
|
+
[PlayerType.LAZARUS_2] = "character_010_lazarus2.png",
|
|
18
|
+
[PlayerType.DARK_JUDAS] = "character_013_blackjudas.png",
|
|
19
|
+
[PlayerType.LILITH] = "character_014_lilith.png",
|
|
20
|
+
[PlayerType.KEEPER] = "character_015_keeper.png",
|
|
21
|
+
[PlayerType.APOLLYON] = "character_016_apollyon.png",
|
|
22
|
+
[PlayerType.FORGOTTEN] = "character_017_theforgotten.png",
|
|
23
|
+
[PlayerType.SOUL] = "character_018_thesoul.png",
|
|
24
|
+
[PlayerType.BETHANY] = "character_001x_bethany.png",
|
|
25
|
+
[PlayerType.JACOB] = "character_002x_jacob.png",
|
|
26
|
+
[PlayerType.ESAU] = "character_003x_esau.png",
|
|
27
|
+
[PlayerType.ISAAC_B] = "character_001b_isaac.png",
|
|
28
|
+
[PlayerType.MAGDALENE_B] = "character_002b_magdalene.png",
|
|
29
|
+
[PlayerType.CAIN_B] = "character_003b_cain.png",
|
|
30
|
+
[PlayerType.JUDAS_B] = "character_004b_judas.png",
|
|
31
|
+
[PlayerType.BLUE_BABY_B] = "character_005b_bluebaby.png",
|
|
32
|
+
[PlayerType.EVE_B] = "character_006b_eve.png",
|
|
33
|
+
[PlayerType.SAMSON_B] = "character_007b_samson.png",
|
|
34
|
+
[PlayerType.AZAZEL_B] = "character_008b_azazel.png",
|
|
35
|
+
[PlayerType.LAZARUS_B] = "character_009b_lazarus.png",
|
|
36
|
+
[PlayerType.EDEN_B] = "character_009_eden.png",
|
|
37
|
+
[PlayerType.LOST_B] = "character_012b_thelost.png",
|
|
38
|
+
[PlayerType.LILITH_B] = "character_014b_lilith.png",
|
|
39
|
+
[PlayerType.KEEPER_B] = "character_015b_keeper.png",
|
|
40
|
+
[PlayerType.APOLLYON_B] = "character_016b_apollyon.png",
|
|
41
|
+
[PlayerType.FORGOTTEN_B] = "character_016b_theforgotten.png",
|
|
42
|
+
[PlayerType.BETHANY_B] = "character_018b_bethany.png",
|
|
43
|
+
[PlayerType.JACOB_B] = "character_019b_jacob.png",
|
|
44
|
+
[PlayerType.LAZARUS_2_B] = "character_009b_lazarus2.png",
|
|
45
|
+
[PlayerType.JACOB_2_B] = "character_019b_jacob2.png",
|
|
46
|
+
[PlayerType.SOUL_B] = "character_017b_thesoul.png"
|
|
47
|
+
}
|
|
48
|
+
return ____exports
|
package/package.json
CHANGED
|
@@ -15,10 +15,10 @@ import { removeCharactersBefore } from "../../../../functions/string";
|
|
|
15
15
|
import { getScreenCenterPos } from "../../../../functions/ui";
|
|
16
16
|
import { eRange } from "../../../../functions/utils";
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
getBossNamePNGFilePath,
|
|
19
|
+
getBossPortraitPNGFilePath,
|
|
20
|
+
getCharacterNamePNGFilePath,
|
|
21
|
+
getCharacterPortraitPNGFilePath,
|
|
22
22
|
} from "../../../../functions/versusScreen";
|
|
23
23
|
import type { CustomStage } from "../../../../interfaces/private/CustomStage";
|
|
24
24
|
import { VERSUS_SCREEN_BACKGROUND_COLORS } from "../../../../objects/versusScreenBackgroundColors";
|
|
@@ -232,8 +232,8 @@ function getPlayerPNGPaths(): {
|
|
|
232
232
|
error("Failed to get the player PNG paths since they are a possessor.");
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
const namePNGPath =
|
|
236
|
-
const portraitPNGPath =
|
|
235
|
+
const namePNGPath = getCharacterNamePNGFilePath(character);
|
|
236
|
+
const portraitPNGPath = getCharacterPortraitPNGFilePath(character);
|
|
237
237
|
|
|
238
238
|
return { namePNGPath, portraitPNGPath };
|
|
239
239
|
}
|
|
@@ -254,7 +254,7 @@ function getBossPNGPaths(customStage: CustomStage): {
|
|
|
254
254
|
const firstBoss = bosses[0];
|
|
255
255
|
const bossID = firstBoss === undefined ? 0 : firstBoss.GetBossID();
|
|
256
256
|
if (bossID === 0) {
|
|
257
|
-
const questionMarkPath =
|
|
257
|
+
const questionMarkPath = getBossNamePNGFilePath(BossID.BLUE_BABY);
|
|
258
258
|
const namePNGPath = questionMarkPath;
|
|
259
259
|
const portraitPNGPath = questionMarkPath;
|
|
260
260
|
return { namePNGPath, portraitPNGPath };
|
|
@@ -262,8 +262,8 @@ function getBossPNGPaths(customStage: CustomStage): {
|
|
|
262
262
|
|
|
263
263
|
// If this is a vanilla boss, it will have a boss ID, and we can use the corresponding vanilla
|
|
264
264
|
// files.
|
|
265
|
-
const namePNGPath =
|
|
266
|
-
const portraitPNGPath =
|
|
265
|
+
const namePNGPath = getBossNamePNGFilePath(bossID);
|
|
266
|
+
const portraitPNGPath = getBossPortraitPNGFilePath(bossID);
|
|
267
267
|
|
|
268
268
|
return { namePNGPath, portraitPNGPath };
|
|
269
269
|
}
|
|
@@ -7,6 +7,7 @@ import { FLYING_CHARACTERS, MAIN_CHARACTERS } from "../core/constants";
|
|
|
7
7
|
import { LAST_VANILLA_CHARACTER } from "../core/constantsFirstLast";
|
|
8
8
|
import { CHARACTER_DAMAGE_MULTIPLIERS } from "../objects/characterDamageMultipliers";
|
|
9
9
|
import { CHARACTER_NAMES } from "../objects/characterNames";
|
|
10
|
+
import { CHARACTER_SPRITE_PNG_FILE_NAMES } from "../objects/characterSpritePNGFileNames";
|
|
10
11
|
import { CHARACTER_STARTING_COLLECTIBLE_TYPES } from "../objects/characterStartingCollectibleTypes";
|
|
11
12
|
import { CHARACTER_STARTING_TRINKET_TYPE } from "../objects/characterStartingTrinketTypes";
|
|
12
13
|
import { CHARACTERS_THAT_START_WITH_AN_ACTIVE_ITEM_SET } from "../sets/charactersThatStartWithAnActiveItemSet";
|
|
@@ -20,6 +21,8 @@ import { ReadonlySet } from "../types/ReadonlySet";
|
|
|
20
21
|
const FLYING_CHARACTERS_SET = new ReadonlySet<PlayerType>(FLYING_CHARACTERS);
|
|
21
22
|
const MAIN_CHARACTERS_SET = new ReadonlySet<PlayerType>(MAIN_CHARACTERS);
|
|
22
23
|
|
|
24
|
+
const PNG_PATH_PREFIX = "characters/costumes";
|
|
25
|
+
|
|
23
26
|
/**
|
|
24
27
|
* Helper function to determine if the given character can have red heart containers. Returns true
|
|
25
28
|
* for characters like Isaac, Magdalene, or Cain. Returns true for Keeper and Tainted Keeper, even
|
|
@@ -135,6 +138,17 @@ export function getCharacterName(character: PlayerType): string {
|
|
|
135
138
|
return CHARACTER_NAMES[character];
|
|
136
139
|
}
|
|
137
140
|
|
|
141
|
+
/**
|
|
142
|
+
* Helper function to get the path to the sprite for a particular character.
|
|
143
|
+
*
|
|
144
|
+
* For example, the file path for `PlayerType.ISAAC` is
|
|
145
|
+
* "characters/costumes/character_001_isaac.png".
|
|
146
|
+
*/
|
|
147
|
+
export function getCharacterSpritePNGFilePath(character: PlayerType): string {
|
|
148
|
+
const fileName = CHARACTER_SPRITE_PNG_FILE_NAMES[character];
|
|
149
|
+
return `${PNG_PATH_PREFIX}/${fileName}`;
|
|
150
|
+
}
|
|
151
|
+
|
|
138
152
|
/**
|
|
139
153
|
* Helper function to get the collectibles that are granted to a particular character at the
|
|
140
154
|
* beginning of a run.
|
|
@@ -15,40 +15,44 @@ const PLAYER_PORTRAIT_PNG_PATH_PREFIX = "gfx/ui/stage";
|
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Helper function to get the path to the name file that corresponds to the graphic shown on the
|
|
18
|
-
* versus screen for the particular boss.
|
|
19
|
-
*
|
|
18
|
+
* versus screen for the particular boss.
|
|
19
|
+
*
|
|
20
|
+
* For example, the file path for `BossID.MONSTRO` is "gfx/ui/boss/bossname_20.0_monstro.png".
|
|
20
21
|
*/
|
|
21
|
-
export function
|
|
22
|
+
export function getBossNamePNGFilePath(bossID: BossID): string {
|
|
22
23
|
const fileName = BOSS_NAME_PNG_FILE_NAMES[bossID];
|
|
23
24
|
return `${PNG_PATH_PREFIX}/${fileName}`;
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
/**
|
|
27
28
|
* Helper function to get the path to the portrait file that corresponds to the graphic shown on the
|
|
28
|
-
* versus screen for the particular boss.
|
|
29
|
-
*
|
|
29
|
+
* versus screen for the particular boss.
|
|
30
|
+
*
|
|
31
|
+
* For example, the file path for `BossID.MONSTRO` is "gfx/ui/boss/portrait_20.0_monstro.png".
|
|
30
32
|
*/
|
|
31
|
-
export function
|
|
33
|
+
export function getBossPortraitPNGFilePath(bossID: BossID): string {
|
|
32
34
|
const fileName = BOSS_PORTRAIT_PNG_FILE_NAMES[bossID];
|
|
33
35
|
return `${PNG_PATH_PREFIX}/${fileName}`;
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
/**
|
|
37
39
|
* Helper function to get the path to the name file that corresponds to the graphic shown on the
|
|
38
|
-
* versus screen for the particular character.
|
|
39
|
-
*
|
|
40
|
+
* versus screen for the particular character.
|
|
41
|
+
*
|
|
42
|
+
* For example, the file path for `PlayerType.ISAAC` is "gfx/ui/boss/playername_01_isaac.png".
|
|
40
43
|
*/
|
|
41
|
-
export function
|
|
44
|
+
export function getCharacterNamePNGFilePath(character: PlayerType): string {
|
|
42
45
|
const fileName = PLAYER_NAME_PNG_FILE_NAMES[character];
|
|
43
46
|
return `${PNG_PATH_PREFIX}/${fileName}`;
|
|
44
47
|
}
|
|
45
48
|
|
|
46
49
|
/**
|
|
47
50
|
* Helper function to get the path to the portrait file that corresponds to the graphic shown on the
|
|
48
|
-
* versus screen for the particular character.
|
|
49
|
-
*
|
|
51
|
+
* versus screen for the particular character.
|
|
52
|
+
*
|
|
53
|
+
* For example, the file path for `PlayerType.ISAAC` is "gfx/ui/boss/playerportrait_isaac.png".
|
|
50
54
|
*/
|
|
51
|
-
export function
|
|
55
|
+
export function getCharacterPortraitPNGFilePath(character: PlayerType): string {
|
|
52
56
|
const fileName = PLAYER_PORTRAIT_PNG_FILE_NAMES[character];
|
|
53
57
|
return `${PLAYER_PORTRAIT_PNG_PATH_PREFIX}/${fileName}`;
|
|
54
58
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// cspell:disable
|
|
2
|
+
|
|
3
|
+
import { PlayerType } from "isaac-typescript-definitions";
|
|
4
|
+
|
|
5
|
+
export const CHARACTER_SPRITE_PNG_FILE_NAMES = {
|
|
6
|
+
// Possessor uses the same sprite as Isaac.
|
|
7
|
+
[PlayerType.POSSESSOR]: "character_001_isaac.png", // 0
|
|
8
|
+
[PlayerType.ISAAC]: "character_001_isaac.png", // 0
|
|
9
|
+
[PlayerType.MAGDALENE]: "character_002_magdalene.png", // 1
|
|
10
|
+
[PlayerType.CAIN]: "character_003_cain.png", // 2
|
|
11
|
+
[PlayerType.JUDAS]: "character_004_judas.png", // 3
|
|
12
|
+
[PlayerType.BLUE_BABY]: "character_006_bluebaby.png", // 4
|
|
13
|
+
[PlayerType.EVE]: "character_005_eve.png", // 5
|
|
14
|
+
[PlayerType.SAMSON]: "character_007_samson.png", // 6
|
|
15
|
+
[PlayerType.AZAZEL]: "character_008_azazel.png", // 7
|
|
16
|
+
[PlayerType.LAZARUS]: "character_009_lazarus.png", // 8
|
|
17
|
+
[PlayerType.EDEN]: "character_009_eden.png", // 9
|
|
18
|
+
[PlayerType.LOST]: "character_012_thelost.png", // 10
|
|
19
|
+
[PlayerType.LAZARUS_2]: "character_010_lazarus2.png", // 11
|
|
20
|
+
[PlayerType.DARK_JUDAS]: "character_013_blackjudas.png", // 12
|
|
21
|
+
[PlayerType.LILITH]: "character_014_lilith.png", // 13
|
|
22
|
+
[PlayerType.KEEPER]: "character_015_keeper.png", // 14
|
|
23
|
+
[PlayerType.APOLLYON]: "character_016_apollyon.png", // 15
|
|
24
|
+
[PlayerType.FORGOTTEN]: "character_017_theforgotten.png", // 16
|
|
25
|
+
[PlayerType.SOUL]: "character_018_thesoul.png", // 17
|
|
26
|
+
[PlayerType.BETHANY]: "character_001x_bethany.png", // 18
|
|
27
|
+
[PlayerType.JACOB]: "character_002x_jacob.png", // 19
|
|
28
|
+
[PlayerType.ESAU]: "character_003x_esau.png", // 20
|
|
29
|
+
[PlayerType.ISAAC_B]: "character_001b_isaac.png", // 21
|
|
30
|
+
[PlayerType.MAGDALENE_B]: "character_002b_magdalene.png", // 22
|
|
31
|
+
[PlayerType.CAIN_B]: "character_003b_cain.png", // 23
|
|
32
|
+
[PlayerType.JUDAS_B]: "character_004b_judas.png", // 24
|
|
33
|
+
[PlayerType.BLUE_BABY_B]: "character_005b_bluebaby.png", // 25
|
|
34
|
+
[PlayerType.EVE_B]: "character_006b_eve.png", // 26
|
|
35
|
+
[PlayerType.SAMSON_B]: "character_007b_samson.png", // 27
|
|
36
|
+
[PlayerType.AZAZEL_B]: "character_008b_azazel.png", // 28
|
|
37
|
+
[PlayerType.LAZARUS_B]: "character_009b_lazarus.png", // 29
|
|
38
|
+
[PlayerType.EDEN_B]: "character_009_eden.png", // 30
|
|
39
|
+
[PlayerType.LOST_B]: "character_012b_thelost.png", // 31
|
|
40
|
+
[PlayerType.LILITH_B]: "character_014b_lilith.png", // 32
|
|
41
|
+
[PlayerType.KEEPER_B]: "character_015b_keeper.png", // 33
|
|
42
|
+
[PlayerType.APOLLYON_B]: "character_016b_apollyon.png", // 34
|
|
43
|
+
[PlayerType.FORGOTTEN_B]: "character_016b_theforgotten.png", // 35
|
|
44
|
+
[PlayerType.BETHANY_B]: "character_018b_bethany.png", // 36
|
|
45
|
+
[PlayerType.JACOB_B]: "character_019b_jacob.png", // 37
|
|
46
|
+
[PlayerType.LAZARUS_2_B]: "character_009b_lazarus2.png", // 38
|
|
47
|
+
[PlayerType.JACOB_2_B]: "character_019b_jacob2.png", // 39
|
|
48
|
+
[PlayerType.SOUL_B]: "character_017b_thesoul.png", // 40
|
|
49
|
+
} as const satisfies Record<PlayerType, string>;
|