isaacscript-common 1.0.452 → 1.0.456
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/callbacks/postFlip.lua +4 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.lua +1 -0
- package/dist/functions/collectibles.d.ts +1 -1
- package/dist/functions/collectibles.lua +1 -1
- package/dist/functions/log.d.ts +1 -0
- package/dist/functions/log.lua +6 -0
- package/dist/functions/player.d.ts +3 -0
- package/dist/functions/player.lua +4 -0
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ local ____exports = require("features.saveDataManager.exports")
|
|
|
5
5
|
local saveDataManager = ____exports.saveDataManager
|
|
6
6
|
local ____player = require("functions.player")
|
|
7
7
|
local getPlayers = ____player.getPlayers
|
|
8
|
+
local isTaintedLazarus = ____player.isTaintedLazarus
|
|
8
9
|
local postFirstFlip = require("callbacks.subscriptions.postFirstFlip")
|
|
9
10
|
local postFlip = require("callbacks.subscriptions.postFlip")
|
|
10
11
|
function hasSubscriptions(self)
|
|
@@ -14,6 +15,9 @@ function useItemFlip(self, _collectibleType, _rng, player, _useFlags, _activeSlo
|
|
|
14
15
|
if not hasSubscriptions(nil) then
|
|
15
16
|
return
|
|
16
17
|
end
|
|
18
|
+
if not isTaintedLazarus(nil, player) then
|
|
19
|
+
return
|
|
20
|
+
end
|
|
17
21
|
local newLazarus = getNewLazarus(nil, player)
|
|
18
22
|
if not v.run.usedFlipAtLeastOnce then
|
|
19
23
|
v.run.usedFlipAtLeastOnce = true
|
package/dist/constants.d.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
export declare const AZAZEL_DEFAULT_BRIMSTONE_DISTANCE = 75.125;
|
|
7
7
|
/** Bombs explode when their frame count is equal to this value. */
|
|
8
8
|
export declare const BOMB_EXPLODE_FRAME = 45;
|
|
9
|
+
export declare const CHARACTERS_WITH_AN_ACTIVE_ITEM: Set<PlayerType>;
|
|
9
10
|
export declare const CHARACTERS_WITH_NO_RED_HEARTS: Set<PlayerType>;
|
|
10
11
|
/** This is also the distance that a player spawns from the door that they enter a room from. */
|
|
11
12
|
export declare const DISTANCE_OF_GRID_TILE = 40;
|
package/dist/constants.lua
CHANGED
|
@@ -3,6 +3,7 @@ require("lualib_bundle");
|
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
____exports.AZAZEL_DEFAULT_BRIMSTONE_DISTANCE = 75.125
|
|
5
5
|
____exports.BOMB_EXPLODE_FRAME = 45
|
|
6
|
+
____exports.CHARACTERS_WITH_AN_ACTIVE_ITEM = __TS__New(Set, {PlayerType.PLAYER_ISAAC, PlayerType.PLAYER_MAGDALENE, PlayerType.PLAYER_JUDAS, PlayerType.PLAYER_BLUEBABY, PlayerType.PLAYER_EVE, PlayerType.PLAYER_EDEN, PlayerType.PLAYER_THELOST, PlayerType.PLAYER_LILITH, PlayerType.PLAYER_KEEPER, PlayerType.PLAYER_APOLLYON, PlayerType.PLAYER_EDEN_B})
|
|
6
7
|
____exports.CHARACTERS_WITH_NO_RED_HEARTS = __TS__New(Set, {PlayerType.PLAYER_BLUEBABY, PlayerType.PLAYER_BLACKJUDAS, PlayerType.PLAYER_JUDAS_B, PlayerType.PLAYER_BLUEBABY_B, PlayerType.PLAYER_THEFORGOTTEN_B, PlayerType.PLAYER_BETHANY_B})
|
|
7
8
|
____exports.DISTANCE_OF_GRID_TILE = 40
|
|
8
9
|
____exports.DOOR_HITBOX_DISTANCE = 11
|
|
@@ -36,7 +36,7 @@ export declare function isGlitchedCollectible(entity: Entity): boolean;
|
|
|
36
36
|
* Returns true if the item type in the item config is equal to `ItemType.ITEM_PASSIVE` or
|
|
37
37
|
* `ItemType.ITEM_FAMILIAR`.
|
|
38
38
|
*/
|
|
39
|
-
export declare function isPassiveCollectible(collectibleType: CollectibleType | int):
|
|
39
|
+
export declare function isPassiveCollectible(collectibleType: CollectibleType | int): boolean;
|
|
40
40
|
export declare function isQuestCollectible(collectibleType: CollectibleType | int): boolean;
|
|
41
41
|
export declare function removeAllCollectibles(): void;
|
|
42
42
|
/**
|
|
@@ -118,7 +118,7 @@ function ____exports.isGlitchedCollectible(self, entity)
|
|
|
118
118
|
end
|
|
119
119
|
function ____exports.isPassiveCollectible(self, collectibleType)
|
|
120
120
|
local itemType = ____exports.getCollectibleItemType(nil, collectibleType)
|
|
121
|
-
return (itemType == ItemType.ITEM_PASSIVE) or ItemType.ITEM_FAMILIAR
|
|
121
|
+
return (itemType == ItemType.ITEM_PASSIVE) or (itemType == ItemType.ITEM_FAMILIAR)
|
|
122
122
|
end
|
|
123
123
|
function ____exports.isQuestCollectible(self, collectibleType)
|
|
124
124
|
return ____exports.collectibleHasTag(nil, collectibleType, 32768)
|
package/dist/functions/log.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export declare function logKColor(this: void, kColor: KColor): void;
|
|
|
38
38
|
export declare function logMap(this: void, map: Map<AnyNotNil, unknown>): void;
|
|
39
39
|
export declare function logTable(this: void, table: unknown): void;
|
|
40
40
|
export declare function logSet(this: void, set: Set<AnyNotNil>): void;
|
|
41
|
+
export declare function logVector(this: void, vector: Vector): void;
|
|
41
42
|
/**
|
|
42
43
|
* Converts every `isaacscript-common` function that begins with "log" to a global function.
|
|
43
44
|
* This is useful for printing out variables from the in-game debug console.
|
package/dist/functions/log.lua
CHANGED
|
@@ -128,6 +128,11 @@ function ____exports.logSet(set)
|
|
|
128
128
|
"The size of the set was: " .. tostring(set.size)
|
|
129
129
|
)
|
|
130
130
|
end
|
|
131
|
+
function ____exports.logVector(vector)
|
|
132
|
+
____exports.log(
|
|
133
|
+
((("Vector: (" .. tostring(vector.X)) .. ", ") .. tostring(vector.Y)) .. ")"
|
|
134
|
+
)
|
|
135
|
+
end
|
|
131
136
|
function ____exports.setLogFunctionsGlobal(self)
|
|
132
137
|
local globals = _G
|
|
133
138
|
globals.log = ____exports.log
|
|
@@ -144,6 +149,7 @@ function ____exports.setLogFunctionsGlobal(self)
|
|
|
144
149
|
globals.logMap = ____exports.logMap
|
|
145
150
|
globals.logTable = ____exports.logTable
|
|
146
151
|
globals.logSet = ____exports.logSet
|
|
152
|
+
globals.logVector = ____exports.logVector
|
|
147
153
|
end
|
|
148
154
|
function ____exports.traceback(self)
|
|
149
155
|
if debug ~= nil then
|
|
@@ -184,7 +184,10 @@ export declare function isJacobOrEsau(player: EntityPlayer): boolean;
|
|
|
184
184
|
* where you want to know if the health is coin hearts, for example.
|
|
185
185
|
*/
|
|
186
186
|
export declare function isKeeper(player: EntityPlayer): boolean;
|
|
187
|
+
/** Helper function for detecting when a player is The Lost or Tainted Lost. */
|
|
187
188
|
export declare function isLost(player: EntityPlayer): boolean;
|
|
189
|
+
/** Helper function for detecting when a player is Tainted Lazarus or Dead Tainted Lazarus. */
|
|
190
|
+
export declare function isTaintedLazarus(player: EntityPlayer): boolean;
|
|
188
191
|
export declare function removeCollectibleCostume(player: EntityPlayer, collectibleType: CollectibleType): void;
|
|
189
192
|
/**
|
|
190
193
|
* Helper function to remove the Dead Eye multiplier from a player.
|
|
@@ -400,6 +400,10 @@ function ____exports.isLost(self, player)
|
|
|
400
400
|
local character = player:GetPlayerType()
|
|
401
401
|
return (character == PlayerType.PLAYER_THELOST) or (character == PlayerType.PLAYER_THELOST_B)
|
|
402
402
|
end
|
|
403
|
+
function ____exports.isTaintedLazarus(self, player)
|
|
404
|
+
local character = player:GetPlayerType()
|
|
405
|
+
return (character == PlayerType.PLAYER_LAZARUS_B) or (character == PlayerType.PLAYER_LAZARUS2_B)
|
|
406
|
+
end
|
|
403
407
|
function ____exports.removeCollectibleCostume(self, player, collectibleType)
|
|
404
408
|
local itemConfig = Isaac.GetItemConfig()
|
|
405
409
|
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|