isaacscript-common 1.0.480 → 1.0.481
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/constants.d.ts +5 -0
- package/dist/constants.lua +1 -0
- package/dist/functions/player.lua +3 -1
- package/package.json +1 -1
package/dist/constants.d.ts
CHANGED
|
@@ -35,6 +35,11 @@ export declare const GRID_ENTITY_XML_MAP: Map<GridEntityXMLType, [GridEntityType
|
|
|
35
35
|
export declare const GRID_INDEX_CENTER_OF_1X1_ROOM = 67;
|
|
36
36
|
export declare const GAME_FRAMES_PER_SECOND = 30;
|
|
37
37
|
export declare const ISAAC_FRAMES_PER_SECOND = 60;
|
|
38
|
+
/**
|
|
39
|
+
* This is the set of characters that look like The Lost and play the "LostDeath" animation when
|
|
40
|
+
* they die.
|
|
41
|
+
*/
|
|
42
|
+
export declare const LOST_STYLE_PLAYER_TYPES: Set<PlayerType>;
|
|
38
43
|
/** In a 2x2 room, there can be 8 doors. */
|
|
39
44
|
export declare const MAX_NUM_DOORS = 8;
|
|
40
45
|
/**
|
package/dist/constants.lua
CHANGED
|
@@ -17,6 +17,7 @@ ____exports.GRID_ENTITY_XML_MAP = __TS__New(Map, {{1000, {GridEntityType.GRID_RO
|
|
|
17
17
|
____exports.GRID_INDEX_CENTER_OF_1X1_ROOM = 67
|
|
18
18
|
____exports.GAME_FRAMES_PER_SECOND = 30
|
|
19
19
|
____exports.ISAAC_FRAMES_PER_SECOND = 60
|
|
20
|
+
____exports.LOST_STYLE_PLAYER_TYPES = __TS__New(Set, {PlayerType.PLAYER_THELOST, PlayerType.PLAYER_THESOUL, PlayerType.PLAYER_THELOST_B, PlayerType.PLAYER_JACOB2_B, PlayerType.PLAYER_THESOUL_B})
|
|
20
21
|
____exports.MAX_NUM_DOORS = 8
|
|
21
22
|
____exports.MAX_NUM_FAMILIARS = 64
|
|
22
23
|
____exports.MAX_NUM_INPUTS = 4
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
require("lualib_bundle");
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
local EXCLUDED_CHARACTERS
|
|
5
|
+
local ____constants = require("constants")
|
|
6
|
+
local LOST_STYLE_PLAYER_TYPES = ____constants.LOST_STYLE_PLAYER_TYPES
|
|
5
7
|
local ____HealthType = require("types.HealthType")
|
|
6
8
|
local HealthType = ____HealthType.HealthType
|
|
7
9
|
local ____PocketItemType = require("types.PocketItemType")
|
|
@@ -135,7 +137,7 @@ function ____exports.getClosestPlayer(self, position)
|
|
|
135
137
|
end
|
|
136
138
|
function ____exports.getDeathAnimationName(self, player)
|
|
137
139
|
local character = player:GetPlayerType()
|
|
138
|
-
if (
|
|
140
|
+
if LOST_STYLE_PLAYER_TYPES:has(character) then
|
|
139
141
|
return "LostDeath"
|
|
140
142
|
end
|
|
141
143
|
if character == PlayerType.PLAYER_THEFORGOTTEN_B then
|