isaacscript-common 30.3.0 → 30.4.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.
- package/dist/index.rollup.d.ts +8 -2
- package/dist/isaacscript-common.lua +7 -4
- package/dist/src/functions/minimap.d.ts +8 -2
- package/dist/src/functions/minimap.d.ts.map +1 -1
- package/dist/src/functions/minimap.lua +9 -2
- package/dist/src/functions/playerHealth.lua +1 -1
- package/dist/src/indexLua.d.ts +185 -0
- package/dist/src/indexLua.d.ts.map +1 -0
- package/dist/src/indexLua.lua +1114 -0
- package/package.json +1 -1
- package/src/functions/minimap.ts +9 -3
- package/src/functions/playerHealth.ts +6 -6
package/package.json
CHANGED
package/src/functions/minimap.ts
CHANGED
|
@@ -134,9 +134,15 @@ export function hideRoomOnMinimap(roomGridIndex: int): void {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
/**
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
/**
|
|
138
|
+
* Helper function to check if a given room is visible on the minimap.
|
|
139
|
+
*
|
|
140
|
+
* @param roomGridIndex The room to check.
|
|
141
|
+
* @param minimapAPI Optional. Whether or not MinimapAPI should be used, if present. Default is
|
|
142
|
+
* true.
|
|
143
|
+
*/
|
|
144
|
+
export function isRoomVisible(roomGridIndex: int, minimapAPI = true): boolean {
|
|
145
|
+
const roomDisplayFlags = getRoomDisplayFlags(roomGridIndex, minimapAPI);
|
|
140
146
|
return roomDisplayFlags !== DisplayFlagZero;
|
|
141
147
|
}
|
|
142
148
|
|
|
@@ -608,14 +608,14 @@ export function setPlayerHealth(
|
|
|
608
608
|
/**
|
|
609
609
|
* Fill in the red heart containers.
|
|
610
610
|
*
|
|
611
|
-
*
|
|
612
|
-
* with half red hearts.
|
|
611
|
+
* Rotten Hearts must be filled in first in order for this to work properly, since they conflict
|
|
612
|
+
* with half red hearts.
|
|
613
613
|
*
|
|
614
|
-
*
|
|
615
|
-
*
|
|
616
|
-
*
|
|
614
|
+
* We multiply by two because the `EntityPlayer.GetRottenHearts` function returns the actual
|
|
615
|
+
* number of rotten hearts, but the `EntityPlayer.AddRottenHearts` works like the other heart
|
|
616
|
+
* functions in that a value of 1 is equivalent to a half-heart.
|
|
617
617
|
*/
|
|
618
|
-
player.AddRottenHearts(playerHealth.rottenHearts);
|
|
618
|
+
player.AddRottenHearts(playerHealth.rottenHearts * 2);
|
|
619
619
|
|
|
620
620
|
if (character === PlayerType.MAGDALENE_B) {
|
|
621
621
|
// Adding 1 heart to Tainted Magdalene will actually add two hearts.
|