isaacscript-common 76.1.0 → 76.3.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/classes/features/callbackLogic/CustomGridEntities.d.ts +8 -0
- package/dist/classes/features/callbackLogic/CustomGridEntities.d.ts.map +1 -1
- package/dist/classes/features/callbackLogic/GameReorderedCallbacks.d.ts +6 -0
- package/dist/classes/features/callbackLogic/GameReorderedCallbacks.d.ts.map +1 -1
- package/dist/classes/features/other/CharacterHealthConversion.d.ts +2 -0
- package/dist/classes/features/other/CharacterHealthConversion.d.ts.map +1 -1
- package/dist/classes/features/other/CharacterStats.d.ts +2 -0
- package/dist/classes/features/other/CharacterStats.d.ts.map +1 -1
- package/dist/classes/features/other/CollectibleItemPoolType.d.ts +2 -0
- package/dist/classes/features/other/CollectibleItemPoolType.d.ts.map +1 -1
- package/dist/classes/features/other/CustomHotkeys.d.ts +4 -0
- package/dist/classes/features/other/CustomHotkeys.d.ts.map +1 -1
- package/dist/classes/features/other/CustomItemPools.d.ts +2 -0
- package/dist/classes/features/other/CustomItemPools.d.ts.map +1 -1
- package/dist/classes/features/other/CustomPickups.d.ts +1 -0
- package/dist/classes/features/other/CustomPickups.d.ts.map +1 -1
- package/dist/classes/features/other/CustomStages.d.ts +3 -0
- package/dist/classes/features/other/CustomStages.d.ts.map +1 -1
- package/dist/classes/features/other/DebugDisplay.d.ts +54 -0
- package/dist/classes/features/other/DebugDisplay.d.ts.map +1 -1
- package/dist/classes/features/other/DeployJSONRoom.d.ts +1 -0
- package/dist/classes/features/other/DeployJSONRoom.d.ts.map +1 -1
- package/dist/classes/features/other/DisableInputs.d.ts +9 -0
- package/dist/classes/features/other/DisableInputs.d.ts.map +1 -1
- package/dist/classes/features/other/EdenStartingStatsHealth.d.ts +6 -0
- package/dist/classes/features/other/EdenStartingStatsHealth.d.ts.map +1 -1
- package/dist/classes/features/other/ExtraConsoleCommands.d.ts +6 -0
- package/dist/classes/features/other/ExtraConsoleCommands.d.ts.map +1 -1
- package/dist/classes/features/other/FadeInRemover.d.ts +4 -0
- package/dist/classes/features/other/FadeInRemover.d.ts.map +1 -1
- package/dist/classes/features/other/FastReset.d.ts +4 -0
- package/dist/classes/features/other/FastReset.d.ts.map +1 -1
- package/dist/classes/features/other/FlyingDetection.d.ts +2 -0
- package/dist/classes/features/other/FlyingDetection.d.ts.map +1 -1
- package/dist/classes/features/other/ForgottenSwitch.d.ts +2 -0
- package/dist/classes/features/other/ForgottenSwitch.d.ts.map +1 -1
- package/dist/classes/features/other/ItemPoolDetection.d.ts +6 -0
- package/dist/classes/features/other/ItemPoolDetection.d.ts.map +1 -1
- package/dist/classes/features/other/ModdedElementDetection.d.ts +32 -0
- package/dist/classes/features/other/ModdedElementDetection.d.ts.map +1 -1
- package/dist/classes/features/other/ModdedElementSets.d.ts +68 -0
- package/dist/classes/features/other/ModdedElementSets.d.ts.map +1 -1
- package/dist/classes/features/other/NoSirenSteal.d.ts +1 -0
- package/dist/classes/features/other/NoSirenSteal.d.ts.map +1 -1
- package/dist/classes/features/other/Pause.d.ts +10 -0
- package/dist/classes/features/other/Pause.d.ts.map +1 -1
- package/dist/classes/features/other/PersistentEntities.d.ts +2 -0
- package/dist/classes/features/other/PersistentEntities.d.ts.map +1 -1
- package/dist/classes/features/other/PlayerCollectibleTracking.d.ts +3 -0
- package/dist/classes/features/other/PlayerCollectibleTracking.d.ts.map +1 -1
- package/dist/classes/features/other/PonyDetection.d.ts +4 -0
- package/dist/classes/features/other/PonyDetection.d.ts.map +1 -1
- package/dist/classes/features/other/PreventChildEntities.d.ts +2 -0
- package/dist/classes/features/other/PreventChildEntities.d.ts.map +1 -1
- package/dist/classes/features/other/RoomClearFrame.d.ts +19 -0
- package/dist/classes/features/other/RoomClearFrame.d.ts.map +1 -1
- package/dist/classes/features/other/RoomClearFrame.lua +8 -2
- package/dist/classes/features/other/RoomHistory.d.ts +17 -1
- package/dist/classes/features/other/RoomHistory.d.ts.map +1 -1
- package/dist/classes/features/other/RunInNFrames.d.ts +9 -2
- package/dist/classes/features/other/RunInNFrames.d.ts.map +1 -1
- package/dist/classes/features/other/RunNextRun.d.ts +2 -0
- package/dist/classes/features/other/RunNextRun.d.ts.map +1 -1
- package/dist/classes/features/other/SaveDataManager.d.ts +21 -0
- package/dist/classes/features/other/SaveDataManager.d.ts.map +1 -1
- package/dist/classes/features/other/SpawnRockAltRewards.d.ts +1 -0
- package/dist/classes/features/other/SpawnRockAltRewards.d.ts.map +1 -1
- package/dist/classes/features/other/StageHistory.d.ts +3 -0
- package/dist/classes/features/other/StageHistory.d.ts.map +1 -1
- package/dist/classes/features/other/StartAmbush.d.ts +2 -0
- package/dist/classes/features/other/StartAmbush.d.ts.map +1 -1
- package/dist/classes/features/other/TaintedLazarusPlayers.d.ts +2 -0
- package/dist/classes/features/other/TaintedLazarusPlayers.d.ts.map +1 -1
- package/dist/classes/features/other/UnlockAchievementsDetection.d.ts +2 -0
- package/dist/classes/features/other/UnlockAchievementsDetection.d.ts.map +1 -1
- package/dist/classes/private/CustomCallback.d.ts +0 -1
- package/dist/classes/private/CustomCallback.d.ts.map +1 -1
- package/dist/classes/private/CustomCallback.lua +0 -19
- package/dist/functions/playerCollectibles.d.ts +6 -0
- package/dist/functions/playerCollectibles.d.ts.map +1 -1
- package/dist/functions/playerCollectibles.lua +30 -23
- package/dist/functions/players.d.ts.map +1 -1
- package/dist/functions/players.lua +7 -7
- package/dist/index.rollup.d.ts +331 -4
- package/dist/isaacscript-common.lua +400 -406
- package/package.json +1 -1
- package/src/classes/features/callbackLogic/CustomGridEntities.ts +8 -0
- package/src/classes/features/callbackLogic/GameReorderedCallbacks.ts +6 -0
- package/src/classes/features/other/CharacterHealthConversion.ts +2 -0
- package/src/classes/features/other/CharacterStats.ts +2 -0
- package/src/classes/features/other/CollectibleItemPoolType.ts +2 -0
- package/src/classes/features/other/CustomHotkeys.ts +4 -0
- package/src/classes/features/other/CustomItemPools.ts +2 -0
- package/src/classes/features/other/CustomPickups.ts +1 -0
- package/src/classes/features/other/CustomStages.ts +3 -0
- package/src/classes/features/other/DebugDisplay.ts +54 -0
- package/src/classes/features/other/DeployJSONRoom.ts +1 -0
- package/src/classes/features/other/DisableInputs.ts +9 -0
- package/src/classes/features/other/EdenStartingStatsHealth.ts +6 -0
- package/src/classes/features/other/ExtraConsoleCommands.ts +6 -0
- package/src/classes/features/other/FadeInRemover.ts +4 -0
- package/src/classes/features/other/FastReset.ts +4 -0
- package/src/classes/features/other/FlyingDetection.ts +2 -0
- package/src/classes/features/other/ForgottenSwitch.ts +2 -0
- package/src/classes/features/other/ItemPoolDetection.ts +6 -0
- package/src/classes/features/other/ModdedElementDetection.ts +32 -0
- package/src/classes/features/other/ModdedElementSets.ts +68 -0
- package/src/classes/features/other/NoSirenSteal.ts +1 -0
- package/src/classes/features/other/Pause.ts +10 -0
- package/src/classes/features/other/PersistentEntities.ts +2 -0
- package/src/classes/features/other/PlayerCollectibleTracking.ts +3 -0
- package/src/classes/features/other/PonyDetection.ts +4 -0
- package/src/classes/features/other/PreventChildEntities.ts +2 -0
- package/src/classes/features/other/RoomClearFrame.ts +27 -1
- package/src/classes/features/other/RoomHistory.ts +17 -1
- package/src/classes/features/other/RunInNFrames.ts +9 -2
- package/src/classes/features/other/RunNextRun.ts +2 -0
- package/src/classes/features/other/SaveDataManager.ts +21 -0
- package/src/classes/features/other/SpawnRockAltRewards.ts +1 -0
- package/src/classes/features/other/StageHistory.ts +3 -0
- package/src/classes/features/other/StartAmbush.ts +2 -0
- package/src/classes/features/other/TaintedLazarusPlayers.ts +2 -0
- package/src/classes/features/other/UnlockAchievementsDetection.ts +2 -0
- package/src/classes/private/CustomCallback.ts +0 -15
- package/src/functions/playerCollectibles.ts +12 -0
- package/src/functions/players.ts +12 -12
|
@@ -25,6 +25,18 @@ local getAllPlayers = ____playerIndex.getAllPlayers
|
|
|
25
25
|
local getPlayers = ____playerIndex.getPlayers
|
|
26
26
|
local ____players = require("functions.players")
|
|
27
27
|
local isCharacter = ____players.isCharacter
|
|
28
|
+
--- Returns the total number of collectibles amongst all players. For example, if player 1 has 1 Sad
|
|
29
|
+
-- Onion and player 2 has 2 Sad Onions, then this function would return 3.
|
|
30
|
+
--
|
|
31
|
+
-- Note that this will filter out non-real collectibles like Lilith's Incubus.
|
|
32
|
+
function ____exports.getTotalPlayerCollectibles(self, collectibleType)
|
|
33
|
+
local players = getPlayers(nil)
|
|
34
|
+
local numCollectiblesArray = __TS__ArrayMap(
|
|
35
|
+
players,
|
|
36
|
+
function(____, player) return player:GetCollectibleNum(collectibleType, true) end
|
|
37
|
+
)
|
|
38
|
+
return sumArray(nil, numCollectiblesArray)
|
|
39
|
+
end
|
|
28
40
|
--- Helper function to add one or more collectibles to a player.
|
|
29
41
|
--
|
|
30
42
|
-- This function is variadic, meaning that you can supply as many collectible types as you want to
|
|
@@ -66,6 +78,13 @@ function ____exports.getActiveItemSlots(self, player, collectibleType)
|
|
|
66
78
|
end
|
|
67
79
|
)
|
|
68
80
|
end
|
|
81
|
+
--- Helper function to get the adjusted price for a pickup, depending on how many Steam Sales all
|
|
82
|
+
-- players currently have. (For example, if Jacob has one Steam Sale and Esau has one Steam Sale,
|
|
83
|
+
-- the prices for items in the shop would be the same as if Isaac had two Steam Sales.)
|
|
84
|
+
function ____exports.getAdjustedPrice(self, basePrice)
|
|
85
|
+
local numSteamSales = ____exports.getTotalPlayerCollectibles(nil, CollectibleType.STEAM_SALE)
|
|
86
|
+
return numSteamSales > 0 and math.floor(basePrice / (numSteamSales + 1)) or basePrice
|
|
87
|
+
end
|
|
69
88
|
--- Helper function to return the total amount of collectibles that a player has that match the
|
|
70
89
|
-- collectible type(s) provided.
|
|
71
90
|
--
|
|
@@ -95,18 +114,6 @@ function ____exports.getPlayersWithCollectible(self, ...)
|
|
|
95
114
|
) end
|
|
96
115
|
)
|
|
97
116
|
end
|
|
98
|
-
--- Returns the total number of collectibles amongst all players. For example, if player 1 has 1 Sad
|
|
99
|
-
-- Onion and player 2 has 2 Sad Onions, then this function would return 3.
|
|
100
|
-
--
|
|
101
|
-
-- Note that this will filter out non-real collectibles like Lilith's Incubus.
|
|
102
|
-
function ____exports.getTotalPlayerCollectibles(self, collectibleType)
|
|
103
|
-
local players = getPlayers(nil)
|
|
104
|
-
local numCollectiblesArray = __TS__ArrayMap(
|
|
105
|
-
players,
|
|
106
|
-
function(____, player) return player:GetCollectibleNum(collectibleType, true) end
|
|
107
|
-
)
|
|
108
|
-
return sumArray(nil, numCollectiblesArray)
|
|
109
|
-
end
|
|
110
117
|
--- Helper function to check to see if a player has one or more collectibles.
|
|
111
118
|
--
|
|
112
119
|
-- This function is variadic, meaning that you can supply as many collectible types as you want to
|
|
@@ -170,7 +177,7 @@ function ____exports.removeAllActiveItems(self, player)
|
|
|
170
177
|
do
|
|
171
178
|
local collectibleType = player:GetActiveItem(activeSlot)
|
|
172
179
|
if collectibleType == CollectibleType.NULL then
|
|
173
|
-
goto
|
|
180
|
+
goto __continue29
|
|
174
181
|
end
|
|
175
182
|
local stillHasCollectible
|
|
176
183
|
repeat
|
|
@@ -180,7 +187,7 @@ function ____exports.removeAllActiveItems(self, player)
|
|
|
180
187
|
end
|
|
181
188
|
until not stillHasCollectible
|
|
182
189
|
end
|
|
183
|
-
::
|
|
190
|
+
::__continue29::
|
|
184
191
|
end
|
|
185
192
|
end
|
|
186
193
|
--- Helper function to remove one or more collectibles to a player.
|
|
@@ -249,9 +256,9 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
249
256
|
itemPool:RemoveCollectible(collectibleType)
|
|
250
257
|
end
|
|
251
258
|
repeat
|
|
252
|
-
local
|
|
253
|
-
local
|
|
254
|
-
if
|
|
259
|
+
local ____switch47 = activeSlot
|
|
260
|
+
local ____cond47 = ____switch47 == ActiveSlot.PRIMARY
|
|
261
|
+
if ____cond47 then
|
|
255
262
|
do
|
|
256
263
|
if primaryCollectibleType ~= CollectibleType.NULL then
|
|
257
264
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -260,8 +267,8 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
260
267
|
break
|
|
261
268
|
end
|
|
262
269
|
end
|
|
263
|
-
|
|
264
|
-
if
|
|
270
|
+
____cond47 = ____cond47 or ____switch47 == ActiveSlot.SECONDARY
|
|
271
|
+
if ____cond47 then
|
|
265
272
|
do
|
|
266
273
|
if primaryCollectibleType ~= CollectibleType.NULL then
|
|
267
274
|
player:RemoveCollectible(primaryCollectibleType)
|
|
@@ -276,16 +283,16 @@ function ____exports.setActiveItem(self, player, collectibleType, activeSlot, ch
|
|
|
276
283
|
break
|
|
277
284
|
end
|
|
278
285
|
end
|
|
279
|
-
|
|
280
|
-
if
|
|
286
|
+
____cond47 = ____cond47 or ____switch47 == ActiveSlot.POCKET
|
|
287
|
+
if ____cond47 then
|
|
281
288
|
do
|
|
282
289
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
283
290
|
player:SetActiveCharge(charge, activeSlot)
|
|
284
291
|
break
|
|
285
292
|
end
|
|
286
293
|
end
|
|
287
|
-
|
|
288
|
-
if
|
|
294
|
+
____cond47 = ____cond47 or ____switch47 == ActiveSlot.POCKET_SINGLE_USE
|
|
295
|
+
if ____cond47 then
|
|
289
296
|
do
|
|
290
297
|
player:SetPocketActiveItem(collectibleType, activeSlot, keepInPools)
|
|
291
298
|
break
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"players.d.ts","sourceRoot":"","sources":["../../src/functions/players.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,eAAe,EAEf,UAAU,EACV,UAAU,EAEX,MAAM,8BAA8B,CAAC;AAatC;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAG9C;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,kBAAkB,EAAE,UAAU,EAAE,GAAG,OAAO,CAKxE;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,MA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B,uBAAuB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAIlE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,EAChB,aAAa,UAAO,GACnB,IAAI,CAsBN"}
|
|
@@ -6,6 +6,7 @@ local __TS__ArrayAt = ____lualib.__TS__ArrayAt
|
|
|
6
6
|
local __TS__ArrayFind = ____lualib.__TS__ArrayFind
|
|
7
7
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
8
8
|
local ____exports = {}
|
|
9
|
+
local isTaintedModded
|
|
9
10
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
10
11
|
local Challenge = ____isaac_2Dtypescript_2Ddefinitions.Challenge
|
|
11
12
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
@@ -47,6 +48,12 @@ function ____exports.isVanillaPlayer(self, player)
|
|
|
47
48
|
local character = player:GetPlayerType()
|
|
48
49
|
return isVanillaCharacter(nil, character)
|
|
49
50
|
end
|
|
51
|
+
function isTaintedModded(self, player)
|
|
52
|
+
local character = player:GetPlayerType()
|
|
53
|
+
local name = player:GetName()
|
|
54
|
+
local taintedCharacter = Isaac.GetPlayerTypeByName(name, true)
|
|
55
|
+
return character == taintedCharacter
|
|
56
|
+
end
|
|
50
57
|
--- Helper function to check to see if any player is holding up an item (from e.g. an active item
|
|
51
58
|
-- activation, a poop from IBS, etc.).
|
|
52
59
|
function ____exports.anyPlayerHoldingItem(self)
|
|
@@ -325,13 +332,6 @@ function ____exports.isEden(self, player)
|
|
|
325
332
|
local character = player:GetPlayerType()
|
|
326
333
|
return character == PlayerType.EDEN or character == PlayerType.EDEN_B
|
|
327
334
|
end
|
|
328
|
-
--- Not exported since end-users should use the `isTainted` helper function directly.
|
|
329
|
-
local function isTaintedModded(self, player)
|
|
330
|
-
local character = player:GetPlayerType()
|
|
331
|
-
local name = player:GetName()
|
|
332
|
-
local taintedCharacter = Isaac.GetPlayerTypeByName(name, true)
|
|
333
|
-
return character == taintedCharacter
|
|
334
|
-
end
|
|
335
335
|
function ____exports.isFirstPlayer(self, player)
|
|
336
336
|
return getPlayerIndexVanilla(nil, player) == 0
|
|
337
337
|
end
|