isaacscript-common 6.3.0 → 6.4.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/cachedClasses.d.ts +15 -0
- package/cachedClasses.lua +20 -0
- package/constants.d.ts +17 -4
- package/constants.lua +13 -4
- package/features/customStage/backdrop.lua +4 -2
- package/features/customStage/customStageConstants.d.ts +1 -0
- package/features/customStage/customStageConstants.lua +3 -0
- package/features/customStage/exports.d.ts +27 -0
- package/features/customStage/exports.lua +33 -3
- package/features/customStage/init.lua +14 -7
- package/features/customStage/streakText.d.ts +2 -0
- package/features/customStage/streakText.lua +22 -0
- package/features/customStage/v.d.ts +3 -0
- package/features/customStage/v.lua +3 -1
- package/features/customStage/versusScreen.d.ts +3 -0
- package/features/customStage/versusScreen.lua +193 -0
- package/features/deployJSONRoom.lua +6 -2
- package/features/saveDataManager/exports.lua +2 -2
- package/features/saveDataManager/load.lua +3 -3
- package/features/saveDataManager/main.lua +3 -3
- package/features/saveDataManager/merge.lua +2 -2
- package/features/saveDataManager/save.lua +3 -3
- package/features/saveDataManager/{constants.d.ts → saveDataManagerConstants.d.ts} +0 -0
- package/features/saveDataManager/{constants.lua → saveDataManagerConstants.lua} +0 -0
- package/functions/color.d.ts +0 -2
- package/functions/color.lua +0 -4
- package/functions/deepCopy.lua +2 -2
- package/functions/entity.d.ts +5 -0
- package/functions/entity.lua +13 -0
- package/functions/gridEntity.d.ts +5 -0
- package/functions/gridEntity.lua +7 -2
- package/functions/kColor.d.ts +0 -2
- package/functions/kColor.lua +0 -4
- package/functions/log.lua +2 -1
- package/functions/ui.d.ts +2 -0
- package/functions/ui.lua +8 -0
- package/functions/utils.d.ts +6 -4
- package/functions/utils.lua +6 -4
- package/interfaces/CustomStageLua.d.ts +25 -0
- package/objects/bossNamePNGFileNames.d.ts +5 -0
- package/objects/bossNamePNGFileNames.lua +108 -0
- package/objects/bossPortraitPNGFileNames.d.ts +5 -0
- package/objects/bossPortraitPNGFileNames.lua +108 -0
- package/objects/colors.d.ts +15 -8
- package/objects/colors.lua +9 -2
- package/objects/playerNamePNGFileNames.d.ts +5 -0
- package/objects/playerNamePNGFileNames.lua +49 -0
- package/objects/playerPortraitPNGFileNames.d.ts +5 -0
- package/objects/playerPortraitPNGFileNames.lua +49 -0
- package/objects/versusScreenBackgroundColors.d.ts +5 -0
- package/objects/versusScreenBackgroundColors.lua +38 -0
- package/objects/versusScreenDirtSpotColors.d.ts +5 -0
- package/objects/versusScreenDirtSpotColors.lua +38 -0
- package/package.json +2 -2
- package/features/customStage/boss.d.ts +0 -2
- package/features/customStage/boss.lua +0 -74
- package/features/customStage/stageAPIBoss.d.ts +0 -29
- package/features/customStage/stageAPIBoss.lua +0 -9
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
4
|
+
--- Used when rendering the "versusscreen.anm2" sprite.
|
|
5
|
+
____exports.PLAYER_PORTRAIT_PNG_FILE_NAMES = {
|
|
6
|
+
[PlayerType.POSSESSOR] = nil,
|
|
7
|
+
[PlayerType.ISAAC] = "playerportrait_isaac.png",
|
|
8
|
+
[PlayerType.MAGDALENE] = "playerportrait_magdalene.png",
|
|
9
|
+
[PlayerType.CAIN] = "playerportrait_cain.png",
|
|
10
|
+
[PlayerType.JUDAS] = "playerportrait_judas.png",
|
|
11
|
+
[PlayerType.BLUE_BABY] = "playerportrait_bluebaby.png",
|
|
12
|
+
[PlayerType.EVE] = "playerportrait_eve.png",
|
|
13
|
+
[PlayerType.SAMSON] = "playerportrait_samson.png",
|
|
14
|
+
[PlayerType.AZAZEL] = "playerportrait_azazel.png",
|
|
15
|
+
[PlayerType.LAZARUS] = "playerportrait_lazarus.png",
|
|
16
|
+
[PlayerType.EDEN] = "playerportrait_eden.png",
|
|
17
|
+
[PlayerType.THE_LOST] = "playerportrait_thelost.png",
|
|
18
|
+
[PlayerType.LAZARUS_2] = "playerportrait_lazarus2.png",
|
|
19
|
+
[PlayerType.BLACK_JUDAS] = "playerportrait_darkjudas.png",
|
|
20
|
+
[PlayerType.LILITH] = "playerportrait_lilith.png",
|
|
21
|
+
[PlayerType.KEEPER] = "playerportrait_keeper.png",
|
|
22
|
+
[PlayerType.APOLLYON] = "playerportrait_apollyon.png",
|
|
23
|
+
[PlayerType.THE_FORGOTTEN] = "playerportrait_theforgotten.png",
|
|
24
|
+
[PlayerType.THE_SOUL] = "playerportrait_theforgotten.png",
|
|
25
|
+
[PlayerType.BETHANY] = "playerportrait_bethany.png",
|
|
26
|
+
[PlayerType.JACOB] = "playerportrait_jacob.png",
|
|
27
|
+
[PlayerType.ESAU] = "playerportrait_jacob.png",
|
|
28
|
+
[PlayerType.ISAAC_B] = "playerportrait_isaac_b.png",
|
|
29
|
+
[PlayerType.MAGDALENE_B] = "playerportrait_magdalene_b.png",
|
|
30
|
+
[PlayerType.CAIN_B] = "playerportrait_cain_b.png",
|
|
31
|
+
[PlayerType.JUDAS_B] = "playerportrait_judas_b.png",
|
|
32
|
+
[PlayerType.BLUE_BABY_B] = "playerportrait_bluebaby_b.png",
|
|
33
|
+
[PlayerType.EVE_B] = "playerportrait_eve_b.png",
|
|
34
|
+
[PlayerType.SAMSON_B] = "playerportrait_samson_b.png",
|
|
35
|
+
[PlayerType.AZAZEL_B] = "playerportrait_azazel_b.png",
|
|
36
|
+
[PlayerType.LAZARUS_B] = "playerportrait_lazarus_b.png",
|
|
37
|
+
[PlayerType.EDEN_B] = "playerportrait_eden_b.png",
|
|
38
|
+
[PlayerType.THE_LOST_B] = "playerportrait_thelost_b.png",
|
|
39
|
+
[PlayerType.LILITH_B] = "playerportrait_lilith_b.png",
|
|
40
|
+
[PlayerType.KEEPER_B] = "playerportrait_keeper_b.png",
|
|
41
|
+
[PlayerType.APOLLYON_B] = "playerportrait_apollyon_b.png",
|
|
42
|
+
[PlayerType.THE_FORGOTTEN_B] = "playerportrait_theforgotten_b.png",
|
|
43
|
+
[PlayerType.BETHANY_B] = "playerportrait_bethany_b.png",
|
|
44
|
+
[PlayerType.JACOB_B] = "playerportrait_jacob_b.png",
|
|
45
|
+
[PlayerType.LAZARUS_2_B] = "playerportrait_lazarus_b_dead.png",
|
|
46
|
+
[PlayerType.JACOB_2_B] = "playerportrait_jacob_b.png",
|
|
47
|
+
[PlayerType.THE_SOUL_B] = "playerportrait_theforgotten_b.png"
|
|
48
|
+
}
|
|
49
|
+
return ____exports
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local StageID = ____isaac_2Dtypescript_2Ddefinitions.StageID
|
|
4
|
+
--- We arbitrarily specify a default color equal to that of Basement.
|
|
5
|
+
local DEFAULT_COLOR = Color(26 / 255, 14 / 255, 12 / 255)
|
|
6
|
+
--- These values are taken from StageAPI.
|
|
7
|
+
____exports.VERSUS_SCREEN_BACKGROUND_COLORS = {
|
|
8
|
+
[StageID.SPECIAL_ROOMS] = DEFAULT_COLOR,
|
|
9
|
+
[StageID.BASEMENT] = Color(26 / 255, 14 / 255, 12 / 255),
|
|
10
|
+
[StageID.CELLAR] = Color(26 / 255, 17 / 255, 13 / 255),
|
|
11
|
+
[StageID.BURNING_BASEMENT] = Color(28 / 255, 12 / 255, 10 / 255),
|
|
12
|
+
[StageID.CAVES] = Color(18 / 255, 13 / 255, 8 / 255),
|
|
13
|
+
[StageID.CATACOMBS] = Color(15 / 255, 10 / 255, 8 / 255),
|
|
14
|
+
[StageID.FLOODED_CAVES] = Color(21 / 255, 28 / 255, 35 / 255),
|
|
15
|
+
[StageID.DEPTHS] = Color(8 / 255, 8 / 255, 8 / 255),
|
|
16
|
+
[StageID.NECROPOLIS] = Color(10 / 255, 6 / 255, 6 / 255),
|
|
17
|
+
[StageID.DANK_DEPTHS] = Color(8 / 255, 8 / 255, 8 / 255),
|
|
18
|
+
[StageID.WOMB] = Color(27 / 255, 3 / 255, 3 / 255),
|
|
19
|
+
[StageID.UTERO] = Color(22 / 255, 6 / 255, 5 / 255),
|
|
20
|
+
[StageID.SCARRED_WOMB] = Color(42 / 255, 19 / 255, 10 / 255),
|
|
21
|
+
[StageID.BLUE_WOMB] = Color(26 / 255, 32 / 255, 40 / 255),
|
|
22
|
+
[StageID.SHEOL] = Color(6 / 255, 6 / 255, 6 / 255),
|
|
23
|
+
[StageID.CATHEDRAL] = Color(6 / 255, 13 / 255, 17 / 255),
|
|
24
|
+
[StageID.DARK_ROOM] = Color(9 / 255, 4 / 255, 3 / 255),
|
|
25
|
+
[StageID.CHEST] = Color(15 / 255, 9 / 255, 6 / 255),
|
|
26
|
+
[StageID.VOID] = Color(0, 0, 0),
|
|
27
|
+
[StageID.DOWNPOUR] = Color(29 / 255, 30 / 255, 32 / 255),
|
|
28
|
+
[StageID.DROSS] = Color(35 / 255, 35 / 255, 29 / 255),
|
|
29
|
+
[StageID.MINES] = Color(17 / 255, 15 / 255, 12 / 255),
|
|
30
|
+
[StageID.ASHPIT] = Color(12 / 255, 10 / 255, 10 / 255),
|
|
31
|
+
[StageID.MAUSOLEUM] = Color(14 / 255, 10 / 255, 14 / 255),
|
|
32
|
+
[StageID.GEHENNA] = Color(15 / 255, 4 / 255, 4 / 255),
|
|
33
|
+
[StageID.CORPSE] = Color(13 / 255, 14 / 255, 12 / 255),
|
|
34
|
+
[StageID.MORTIS] = Color(13 / 255, 14 / 255, 12 / 255),
|
|
35
|
+
[StageID.HOME] = DEFAULT_COLOR,
|
|
36
|
+
[StageID.BACKWARDS] = DEFAULT_COLOR
|
|
37
|
+
}
|
|
38
|
+
return ____exports
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local StageID = ____isaac_2Dtypescript_2Ddefinitions.StageID
|
|
4
|
+
--- We arbitrarily specify a default color equal to that of Basement.
|
|
5
|
+
local DEFAULT_COLOR = Color(201 / 255, 114 / 255, 96 / 255)
|
|
6
|
+
--- These values are taken from StageAPI.
|
|
7
|
+
____exports.VERSUS_SCREEN_DIRT_SPOT_COLORS = {
|
|
8
|
+
[StageID.SPECIAL_ROOMS] = DEFAULT_COLOR,
|
|
9
|
+
[StageID.BASEMENT] = Color(201 / 255, 114 / 255, 96 / 255),
|
|
10
|
+
[StageID.CELLAR] = Color(229 / 255, 157 / 255, 111 / 255),
|
|
11
|
+
[StageID.BURNING_BASEMENT] = Color(252 / 255, 108 / 255, 90 / 255),
|
|
12
|
+
[StageID.CAVES] = Color(167 / 255, 111 / 255, 75 / 255),
|
|
13
|
+
[StageID.CATACOMBS] = Color(135 / 255, 90 / 255, 80 / 255),
|
|
14
|
+
[StageID.FLOODED_CAVES] = Color(111 / 255, 147 / 255, 180 / 255),
|
|
15
|
+
[StageID.DEPTHS] = Color(70 / 255, 70 / 255, 72 / 255),
|
|
16
|
+
[StageID.NECROPOLIS] = Color(88 / 255, 67 / 255, 54 / 255),
|
|
17
|
+
[StageID.DANK_DEPTHS] = Color(70 / 255, 70 / 255, 72 / 255),
|
|
18
|
+
[StageID.WOMB] = Color(241 / 255, 28 / 255, 28 / 255),
|
|
19
|
+
[StageID.UTERO] = Color(199 / 255, 60 / 255, 48 / 255),
|
|
20
|
+
[StageID.SCARRED_WOMB] = Color(247 / 255, 152 / 255, 88 / 255),
|
|
21
|
+
[StageID.BLUE_WOMB] = Color(157 / 255, 209 / 255, 255 / 255),
|
|
22
|
+
[StageID.SHEOL] = Color(60 / 255, 54 / 255, 54 / 255),
|
|
23
|
+
[StageID.CATHEDRAL] = Color(44 / 255, 100 / 255, 111 / 255),
|
|
24
|
+
[StageID.DARK_ROOM] = Color(80 / 255, 38 / 255, 20 / 255),
|
|
25
|
+
[StageID.CHEST] = Color(175 / 255, 108 / 255, 72 / 255),
|
|
26
|
+
[StageID.VOID] = Color(70 / 255, 5 / 255, 5 / 255),
|
|
27
|
+
[StageID.DOWNPOUR] = Color(149 / 255, 157 / 255, 167 / 255),
|
|
28
|
+
[StageID.DROSS] = Color(179 / 255, 179 / 255, 143 / 255),
|
|
29
|
+
[StageID.MINES] = Color(93 / 255, 85 / 255, 72 / 255),
|
|
30
|
+
[StageID.ASHPIT] = Color(106 / 255, 102 / 255, 94 / 255),
|
|
31
|
+
[StageID.MAUSOLEUM] = Color(70 / 255, 59 / 255, 72 / 255),
|
|
32
|
+
[StageID.GEHENNA] = Color(59 / 255, 41 / 255, 41 / 255),
|
|
33
|
+
[StageID.CORPSE] = Color(124 / 255, 134 / 255, 111 / 255),
|
|
34
|
+
[StageID.MORTIS] = Color(124 / 255, 134 / 255, 111 / 255),
|
|
35
|
+
[StageID.HOME] = DEFAULT_COLOR,
|
|
36
|
+
[StageID.BACKWARDS] = DEFAULT_COLOR
|
|
37
|
+
}
|
|
38
|
+
return ____exports
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript-common",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.4.0",
|
|
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": "^3.0.
|
|
25
|
+
"isaac-typescript-definitions": "^3.0.22"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
local ____exports = {}
|
|
2
|
-
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
-
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
4
|
-
local SoundEffect = ____isaac_2Dtypescript_2Ddefinitions.SoundEffect
|
|
5
|
-
local ____cachedClasses = require("cachedClasses")
|
|
6
|
-
local game = ____cachedClasses.game
|
|
7
|
-
local sfxManager = ____cachedClasses.sfxManager
|
|
8
|
-
local ____pause = require("features.pause")
|
|
9
|
-
local pause = ____pause.pause
|
|
10
|
-
local unpause = ____pause.unpause
|
|
11
|
-
local ____v = require("features.customStage.v")
|
|
12
|
-
local v = ____v.default
|
|
13
|
-
local VERSUS_SCREEN_ANIMATION = "Scene"
|
|
14
|
-
--- Taken from StageAPI. I do not know why rendering in a certain order is necessary, but otherwise
|
|
15
|
-
-- the overlay layer will be on top of everything else and will hide the other elements.
|
|
16
|
-
local VERSUS_SCREEN_LAYER_RENDER_ORDER = {
|
|
17
|
-
0,
|
|
18
|
-
1,
|
|
19
|
-
2,
|
|
20
|
-
3,
|
|
21
|
-
9,
|
|
22
|
-
14,
|
|
23
|
-
13,
|
|
24
|
-
4,
|
|
25
|
-
5,
|
|
26
|
-
12,
|
|
27
|
-
11,
|
|
28
|
-
6,
|
|
29
|
-
7,
|
|
30
|
-
8,
|
|
31
|
-
10
|
|
32
|
-
}
|
|
33
|
-
local versusScreenSprite = Sprite()
|
|
34
|
-
versusScreenSprite:Load("gfx/ui/boss/versusscreen.anm2", true)
|
|
35
|
-
function ____exports.playBossRoomAnimation(self, force)
|
|
36
|
-
if force == nil then
|
|
37
|
-
force = false
|
|
38
|
-
end
|
|
39
|
-
local room = game:GetRoom()
|
|
40
|
-
local roomType = room:GetType()
|
|
41
|
-
local hud = game:GetHUD()
|
|
42
|
-
if roomType ~= RoomType.BOSS and not force then
|
|
43
|
-
return
|
|
44
|
-
end
|
|
45
|
-
v.run.showingBossVersusScreen = true
|
|
46
|
-
pause(nil)
|
|
47
|
-
hud:SetVisible(false)
|
|
48
|
-
versusScreenSprite:Play(VERSUS_SCREEN_ANIMATION, true)
|
|
49
|
-
versusScreenSprite.PlaybackSpeed = 0.5
|
|
50
|
-
end
|
|
51
|
-
local function finishBossRoomAnimation(self)
|
|
52
|
-
local hud = game:GetHUD()
|
|
53
|
-
v.run.showingBossVersusScreen = false
|
|
54
|
-
unpause(nil)
|
|
55
|
-
hud:SetVisible(true)
|
|
56
|
-
sfxManager:Play(SoundEffect.CASTLE_PORTCULLIS)
|
|
57
|
-
end
|
|
58
|
-
function ____exports.bossPostRender(self)
|
|
59
|
-
if not v.run.showingBossVersusScreen then
|
|
60
|
-
return
|
|
61
|
-
end
|
|
62
|
-
if versusScreenSprite:IsFinished(VERSUS_SCREEN_ANIMATION) then
|
|
63
|
-
finishBossRoomAnimation(nil)
|
|
64
|
-
return
|
|
65
|
-
end
|
|
66
|
-
local room = game:GetRoom()
|
|
67
|
-
local centerPos = room:GetCenterPos()
|
|
68
|
-
local position = Isaac.WorldToRenderPosition(centerPos)
|
|
69
|
-
for ____, layerID in ipairs(VERSUS_SCREEN_LAYER_RENDER_ORDER) do
|
|
70
|
-
versusScreenSprite:RenderLayer(layerID, position)
|
|
71
|
-
end
|
|
72
|
-
versusScreenSprite:Update()
|
|
73
|
-
end
|
|
74
|
-
return ____exports
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
-
/// <reference types="isaac-typescript-definitions" />
|
|
3
|
-
/// <reference types="isaac-typescript-definitions" />
|
|
4
|
-
interface ParamTable {
|
|
5
|
-
BossPortrait?: string;
|
|
6
|
-
BossPortraitTwo?: string;
|
|
7
|
-
BossName?: string;
|
|
8
|
-
BossSpot?: string;
|
|
9
|
-
PlayerPortrait?: string;
|
|
10
|
-
PlayerName?: string;
|
|
11
|
-
PlayerSpot?: string;
|
|
12
|
-
Unskippable?: boolean;
|
|
13
|
-
BackgroundColor?: Color;
|
|
14
|
-
DirtColor?: Color;
|
|
15
|
-
NoShake?: boolean;
|
|
16
|
-
Animation?: string;
|
|
17
|
-
Sprite?: Sprite;
|
|
18
|
-
NoLoadGraphics?: boolean;
|
|
19
|
-
BossOffset?: Vector;
|
|
20
|
-
}
|
|
21
|
-
declare const StageAPILocal: {
|
|
22
|
-
BossSprite: Sprite | undefined;
|
|
23
|
-
BossSpriteBg: Sprite | undefined;
|
|
24
|
-
BossSpriteDirt: Sprite | undefined;
|
|
25
|
-
PlayingBossSprite: Sprite | undefined;
|
|
26
|
-
PlayingBossSpriteBg: Sprite | undefined;
|
|
27
|
-
PlayingBossSpriteDirt: Sprite | undefined;
|
|
28
|
-
BossOffset: Vector | undefined;
|
|
29
|
-
};
|