isaacscript-common 56.1.0 → 57.0.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 +29 -18
- package/dist/isaacscript-common.lua +10 -11
- package/dist/src/classes/features/callbackLogic/CustomRevive.lua +2 -2
- package/dist/src/functions/bosses.d.ts +1 -0
- package/dist/src/functions/bosses.d.ts.map +1 -1
- package/dist/src/functions/bosses.lua +1 -0
- package/dist/src/functions/external.d.ts +26 -16
- package/dist/src/functions/external.d.ts.map +1 -1
- package/dist/src/functions/external.lua +30 -22
- package/dist/src/sets/bossSets.d.ts.map +1 -1
- package/dist/src/sets/bossSets.lua +1 -0
- package/package.json +1 -1
- package/src/classes/features/callbackLogic/CustomRevive.ts +2 -2
- package/src/functions/bosses.ts +1 -0
- package/src/functions/external.ts +37 -27
- package/src/sets/bossSets.ts +1 -0
package/dist/index.rollup.d.ts
CHANGED
|
@@ -4759,6 +4759,7 @@ export declare function getAliveNPCs(entityType?: EntityType | -1, variant?: num
|
|
|
4759
4759
|
*
|
|
4760
4760
|
* This includes:
|
|
4761
4761
|
* - Ultra Greed
|
|
4762
|
+
* - Ultra Greedier
|
|
4762
4763
|
*
|
|
4763
4764
|
* This does not include:
|
|
4764
4765
|
* - mini-bosses (e.g. Ultra Pride, Krampus)
|
|
@@ -15207,13 +15208,40 @@ declare interface ReadonlySetConstructor {
|
|
|
15207
15208
|
readonly prototype: ReadonlySet<any>;
|
|
15208
15209
|
}
|
|
15209
15210
|
|
|
15211
|
+
/**
|
|
15212
|
+
* Helper function to let the Rebirth Item Tracker know that it should remove a collectible from its
|
|
15213
|
+
* list.
|
|
15214
|
+
*
|
|
15215
|
+
* The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
|
|
15216
|
+
* external Python program.
|
|
15217
|
+
*
|
|
15218
|
+
* This function is variadic, meaning that you can pass as many collectible types as you want to
|
|
15219
|
+
* remove.
|
|
15220
|
+
*
|
|
15221
|
+
* Note that calling this function is not normally necessary when removing collectibles from
|
|
15222
|
+
* players. For example, when you remove a collectible with the `EntityPlayer.RemoveCollectible`
|
|
15223
|
+
* method, a proper message is sent to the log file by the game the item tracker will automatically
|
|
15224
|
+
* remove it. However, in some cases, this function can be useful:
|
|
15225
|
+
*
|
|
15226
|
+
* - We may be giving the player a "fake" collectible (e.g. 1-Up for the purposes of an extra life)
|
|
15227
|
+
* and do not want the fake collectible to show up on the tracker.
|
|
15228
|
+
* - We may be removing a starting active item. Since active items are never removed from the
|
|
15229
|
+
* tracker, we want to tell the item tracker that the player never had a particular active item to
|
|
15230
|
+
* begin with.
|
|
15231
|
+
*
|
|
15232
|
+
* @see https://github.com/Rchardon/RebirthItemTracker
|
|
15233
|
+
*/
|
|
15234
|
+
export declare function rebirthItemTrackerRemoveCollectible(...collectibleTypes: CollectibleType[]): void;
|
|
15235
|
+
|
|
15210
15236
|
/**
|
|
15211
15237
|
* Helper function to let the Rebirth Item Tracker know that it should write the submitted text
|
|
15212
15238
|
* string to a file. This is useful for capturing text in programs like Open Broadcaster Software
|
|
15213
15239
|
* (OBS).
|
|
15214
15240
|
*
|
|
15215
15241
|
* The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
|
|
15216
|
-
* Python program
|
|
15242
|
+
* external Python program.
|
|
15243
|
+
*
|
|
15244
|
+
* @see https://github.com/Rchardon/RebirthItemTracker
|
|
15217
15245
|
*/
|
|
15218
15246
|
export declare function rebirthItemTrackerWriteToFile(msg: string): void;
|
|
15219
15247
|
|
|
@@ -15689,23 +15717,6 @@ export declare function removeCollectibleCostume(player: EntityPlayer, collectib
|
|
|
15689
15717
|
*/
|
|
15690
15718
|
export declare function removeCollectibleFromAllPlayers(...collectibleTypes: CollectibleType[]): void;
|
|
15691
15719
|
|
|
15692
|
-
/**
|
|
15693
|
-
* Helper function to put a message in the log.txt file to let the Rebirth Item Tracker know that it
|
|
15694
|
-
* should remove an item.
|
|
15695
|
-
*
|
|
15696
|
-
* The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
|
|
15697
|
-
* Python program located at: https://github.com/Rchardon/RebirthItemTracker
|
|
15698
|
-
*
|
|
15699
|
-
* This function is useful when you need to add a "fake" collectible to a player. Note that calling
|
|
15700
|
-
* this function is not necessary when removing items from players. For example, when you remove a
|
|
15701
|
-
* collectible with the `EntityPlayer.RemoveCollectible` method, a proper message is sent to the log
|
|
15702
|
-
* the item tracker will automatically remove it.
|
|
15703
|
-
*
|
|
15704
|
-
* This function is variadic, meaning that you can pass as many collectible types as you want to
|
|
15705
|
-
* remove.
|
|
15706
|
-
*/
|
|
15707
|
-
export declare function removeCollectibleFromItemTracker(...collectibleTypes: CollectibleType[]): void;
|
|
15708
|
-
|
|
15709
15720
|
/**
|
|
15710
15721
|
* Helper function to remove one or more collectibles from all item pools.
|
|
15711
15722
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common
|
|
3
|
+
isaacscript-common 57.0.1
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -35365,19 +35365,17 @@ return ____exports
|
|
|
35365
35365
|
end,
|
|
35366
35366
|
["src.functions.external"] = function(...)
|
|
35367
35367
|
local ____exports = {}
|
|
35368
|
-
local
|
|
35369
|
-
local getCollectibleName = ____collectibles.getCollectibleName
|
|
35368
|
+
local REBIRTH_ITEM_TRACKER_REMOVE_COLLECTIBLE_COMMAND = "REBIRTH_ITEM_TRACKER_REMOVE_COLLECTIBLE"
|
|
35370
35369
|
local REBIRTH_ITEM_TRACKER_WRITE_TO_FILE_COMMAND = "REBIRTH_ITEM_TRACKER_WRITE_TO_FILE"
|
|
35371
|
-
function ____exports.
|
|
35372
|
-
Isaac.DebugString((REBIRTH_ITEM_TRACKER_WRITE_TO_FILE_COMMAND .. " ") .. msg)
|
|
35373
|
-
end
|
|
35374
|
-
function ____exports.removeCollectibleFromItemTracker(self, ...)
|
|
35370
|
+
function ____exports.rebirthItemTrackerRemoveCollectible(self, ...)
|
|
35375
35371
|
local collectibleTypes = {...}
|
|
35376
35372
|
for ____, collectibleType in ipairs(collectibleTypes) do
|
|
35377
|
-
|
|
35378
|
-
Isaac.DebugString(((("Removing collectible " .. tostring(collectibleType)) .. " (") .. collectibleName) .. ") on player 0 (Player)")
|
|
35373
|
+
Isaac.DebugString((REBIRTH_ITEM_TRACKER_REMOVE_COLLECTIBLE_COMMAND .. " ") .. tostring(collectibleType))
|
|
35379
35374
|
end
|
|
35380
35375
|
end
|
|
35376
|
+
function ____exports.rebirthItemTrackerWriteToFile(self, msg)
|
|
35377
|
+
Isaac.DebugString((REBIRTH_ITEM_TRACKER_WRITE_TO_FILE_COMMAND .. " ") .. msg)
|
|
35378
|
+
end
|
|
35381
35379
|
return ____exports
|
|
35382
35380
|
end,
|
|
35383
35381
|
["src.classes.features.callbackLogic.CustomRevive"] = function(...)
|
|
@@ -35398,7 +35396,7 @@ local ISCFeature = ____ISCFeature.ISCFeature
|
|
|
35398
35396
|
local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
|
|
35399
35397
|
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
35400
35398
|
local ____external = require("src.functions.external")
|
|
35401
|
-
local
|
|
35399
|
+
local rebirthItemTrackerRemoveCollectible = ____external.rebirthItemTrackerRemoveCollectible
|
|
35402
35400
|
local ____log = require("src.functions.log")
|
|
35403
35401
|
local log = ____log.log
|
|
35404
35402
|
local logError = ____log.logError
|
|
@@ -35500,7 +35498,7 @@ function CustomRevive.prototype.playerIsAboutToDie(self, player)
|
|
|
35500
35498
|
v.run.dyingPlayerIndex = getPlayerIndex(nil, player)
|
|
35501
35499
|
self:logStateChanged()
|
|
35502
35500
|
player:AddCollectible(CollectibleType.ONE_UP, 0, false)
|
|
35503
|
-
|
|
35501
|
+
rebirthItemTrackerRemoveCollectible(nil, CollectibleType.ONE_UP)
|
|
35504
35502
|
local playerIndex = getPlayerIndex(nil, player)
|
|
35505
35503
|
self.runInNFrames:runNextGameFrame(function()
|
|
35506
35504
|
local futurePlayer = getPlayerFromIndex(nil, playerIndex)
|
|
@@ -44503,6 +44501,7 @@ local STORY_BOSS_IDS_SET = __TS__New(ReadonlySet, {
|
|
|
44503
44501
|
BossID.ULTRA_GREED,
|
|
44504
44502
|
BossID.HUSH,
|
|
44505
44503
|
BossID.DELIRIUM,
|
|
44504
|
+
BossID.ULTRA_GREEDIER,
|
|
44506
44505
|
BossID.MOTHER,
|
|
44507
44506
|
BossID.MAUSOLEUM_MOM,
|
|
44508
44507
|
BossID.MAUSOLEUM_MOMS_HEART,
|
|
@@ -15,7 +15,7 @@ local ISCFeature = ____ISCFeature.ISCFeature
|
|
|
15
15
|
local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
|
|
16
16
|
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
17
17
|
local ____external = require("src.functions.external")
|
|
18
|
-
local
|
|
18
|
+
local rebirthItemTrackerRemoveCollectible = ____external.rebirthItemTrackerRemoveCollectible
|
|
19
19
|
local ____log = require("src.functions.log")
|
|
20
20
|
local log = ____log.log
|
|
21
21
|
local logError = ____log.logError
|
|
@@ -117,7 +117,7 @@ function CustomRevive.prototype.playerIsAboutToDie(self, player)
|
|
|
117
117
|
v.run.dyingPlayerIndex = getPlayerIndex(nil, player)
|
|
118
118
|
self:logStateChanged()
|
|
119
119
|
player:AddCollectible(CollectibleType.ONE_UP, 0, false)
|
|
120
|
-
|
|
120
|
+
rebirthItemTrackerRemoveCollectible(nil, CollectibleType.ONE_UP)
|
|
121
121
|
local playerIndex = getPlayerIndex(nil, player)
|
|
122
122
|
self.runInNFrames:runNextGameFrame(function()
|
|
123
123
|
local futurePlayer = getPlayerFromIndex(nil, playerIndex)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bosses.d.ts","sourceRoot":"","sources":["../../../src/functions/bosses.ts"],"names":[],"mappings":"AAAA,O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know that it should
|
|
9
|
-
*
|
|
10
|
-
* (OBS).
|
|
8
|
+
* Helper function to let the Rebirth Item Tracker know that it should remove a collectible from its
|
|
9
|
+
* list.
|
|
11
10
|
*
|
|
12
11
|
* The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
|
|
13
|
-
* Python program
|
|
12
|
+
* external Python program.
|
|
13
|
+
*
|
|
14
|
+
* This function is variadic, meaning that you can pass as many collectible types as you want to
|
|
15
|
+
* remove.
|
|
16
|
+
*
|
|
17
|
+
* Note that calling this function is not normally necessary when removing collectibles from
|
|
18
|
+
* players. For example, when you remove a collectible with the `EntityPlayer.RemoveCollectible`
|
|
19
|
+
* method, a proper message is sent to the log file by the game the item tracker will automatically
|
|
20
|
+
* remove it. However, in some cases, this function can be useful:
|
|
21
|
+
*
|
|
22
|
+
* - We may be giving the player a "fake" collectible (e.g. 1-Up for the purposes of an extra life)
|
|
23
|
+
* and do not want the fake collectible to show up on the tracker.
|
|
24
|
+
* - We may be removing a starting active item. Since active items are never removed from the
|
|
25
|
+
* tracker, we want to tell the item tracker that the player never had a particular active item to
|
|
26
|
+
* begin with.
|
|
27
|
+
*
|
|
28
|
+
* @see https://github.com/Rchardon/RebirthItemTracker
|
|
14
29
|
*/
|
|
15
|
-
export declare function
|
|
30
|
+
export declare function rebirthItemTrackerRemoveCollectible(...collectibleTypes: CollectibleType[]): void;
|
|
16
31
|
/**
|
|
17
|
-
* Helper function to
|
|
18
|
-
*
|
|
32
|
+
* Helper function to let the Rebirth Item Tracker know that it should write the submitted text
|
|
33
|
+
* string to a file. This is useful for capturing text in programs like Open Broadcaster Software
|
|
34
|
+
* (OBS).
|
|
19
35
|
*
|
|
20
36
|
* The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
|
|
21
|
-
* Python program
|
|
37
|
+
* external Python program.
|
|
22
38
|
*
|
|
23
|
-
*
|
|
24
|
-
* this function is not necessary when removing items from players. For example, when you remove a
|
|
25
|
-
* collectible with the `EntityPlayer.RemoveCollectible` method, a proper message is sent to the log
|
|
26
|
-
* the item tracker will automatically remove it.
|
|
27
|
-
*
|
|
28
|
-
* This function is variadic, meaning that you can pass as many collectible types as you want to
|
|
29
|
-
* remove.
|
|
39
|
+
* @see https://github.com/Rchardon/RebirthItemTracker
|
|
30
40
|
*/
|
|
31
|
-
export declare function
|
|
41
|
+
export declare function rebirthItemTrackerWriteToFile(msg: string): void;
|
|
32
42
|
//# sourceMappingURL=external.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"external.d.ts","sourceRoot":"","sources":["../../../src/functions/external.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"external.d.ts","sourceRoot":"","sources":["../../../src/functions/external.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAQpE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,mCAAmC,CACjD,GAAG,gBAAgB,EAAE,eAAe,EAAE,GACrC,IAAI,CAQN;AAED;;;;;;;;;GASG;AACH,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAI/D"}
|
|
@@ -1,34 +1,42 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
|
-
local
|
|
3
|
-
local getCollectibleName = ____collectibles.getCollectibleName
|
|
2
|
+
local REBIRTH_ITEM_TRACKER_REMOVE_COLLECTIBLE_COMMAND = "REBIRTH_ITEM_TRACKER_REMOVE_COLLECTIBLE"
|
|
4
3
|
local REBIRTH_ITEM_TRACKER_WRITE_TO_FILE_COMMAND = "REBIRTH_ITEM_TRACKER_WRITE_TO_FILE"
|
|
5
|
-
--- Helper function to let the Rebirth Item Tracker know that it should
|
|
6
|
-
--
|
|
7
|
-
-- (OBS).
|
|
4
|
+
--- Helper function to let the Rebirth Item Tracker know that it should remove a collectible from its
|
|
5
|
+
-- list.
|
|
8
6
|
--
|
|
9
7
|
-- The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
|
|
10
|
-
-- Python program
|
|
11
|
-
function ____exports.rebirthItemTrackerWriteToFile(self, msg)
|
|
12
|
-
Isaac.DebugString((REBIRTH_ITEM_TRACKER_WRITE_TO_FILE_COMMAND .. " ") .. msg)
|
|
13
|
-
end
|
|
14
|
-
--- Helper function to put a message in the log.txt file to let the Rebirth Item Tracker know that it
|
|
15
|
-
-- should remove an item.
|
|
16
|
-
--
|
|
17
|
-
-- The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
|
|
18
|
-
-- Python program located at: https://github.com/Rchardon/RebirthItemTracker
|
|
19
|
-
--
|
|
20
|
-
-- This function is useful when you need to add a "fake" collectible to a player. Note that calling
|
|
21
|
-
-- this function is not necessary when removing items from players. For example, when you remove a
|
|
22
|
-
-- collectible with the `EntityPlayer.RemoveCollectible` method, a proper message is sent to the log
|
|
23
|
-
-- the item tracker will automatically remove it.
|
|
8
|
+
-- external Python program.
|
|
24
9
|
--
|
|
25
10
|
-- This function is variadic, meaning that you can pass as many collectible types as you want to
|
|
26
11
|
-- remove.
|
|
27
|
-
|
|
12
|
+
--
|
|
13
|
+
-- Note that calling this function is not normally necessary when removing collectibles from
|
|
14
|
+
-- players. For example, when you remove a collectible with the `EntityPlayer.RemoveCollectible`
|
|
15
|
+
-- method, a proper message is sent to the log file by the game the item tracker will automatically
|
|
16
|
+
-- remove it. However, in some cases, this function can be useful:
|
|
17
|
+
--
|
|
18
|
+
-- - We may be giving the player a "fake" collectible (e.g. 1-Up for the purposes of an extra life)
|
|
19
|
+
-- and do not want the fake collectible to show up on the tracker.
|
|
20
|
+
-- - We may be removing a starting active item. Since active items are never removed from the
|
|
21
|
+
-- tracker, we want to tell the item tracker that the player never had a particular active item to
|
|
22
|
+
-- begin with.
|
|
23
|
+
--
|
|
24
|
+
-- @see https ://github.com/Rchardon/RebirthItemTracker
|
|
25
|
+
function ____exports.rebirthItemTrackerRemoveCollectible(self, ...)
|
|
28
26
|
local collectibleTypes = {...}
|
|
29
27
|
for ____, collectibleType in ipairs(collectibleTypes) do
|
|
30
|
-
|
|
31
|
-
Isaac.DebugString(((("Removing collectible " .. tostring(collectibleType)) .. " (") .. collectibleName) .. ") on player 0 (Player)")
|
|
28
|
+
Isaac.DebugString((REBIRTH_ITEM_TRACKER_REMOVE_COLLECTIBLE_COMMAND .. " ") .. tostring(collectibleType))
|
|
32
29
|
end
|
|
33
30
|
end
|
|
31
|
+
--- Helper function to let the Rebirth Item Tracker know that it should write the submitted text
|
|
32
|
+
-- string to a file. This is useful for capturing text in programs like Open Broadcaster Software
|
|
33
|
+
-- (OBS).
|
|
34
|
+
--
|
|
35
|
+
-- The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
|
|
36
|
+
-- external Python program.
|
|
37
|
+
--
|
|
38
|
+
-- @see https ://github.com/Rchardon/RebirthItemTracker
|
|
39
|
+
function ____exports.rebirthItemTrackerWriteToFile(self, msg)
|
|
40
|
+
Isaac.DebugString((REBIRTH_ITEM_TRACKER_WRITE_TO_FILE_COMMAND .. " ") .. msg)
|
|
41
|
+
end
|
|
34
42
|
return ____exports
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bossSets.d.ts","sourceRoot":"","sources":["../../../src/sets/bossSets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAa,MAAM,8BAA8B,CAAC;AA6e7E,eAAO,MAAM,mCAAmC,gEAiB9C,CAAC;AAEH,eAAO,MAAM,8BAA8B,8CAiBzC,CAAC;AAEH,eAAO,MAAM,cAAc,qBAE1B,CAAC;
|
|
1
|
+
{"version":3,"file":"bossSets.d.ts","sourceRoot":"","sources":["../../../src/sets/bossSets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAa,MAAM,8BAA8B,CAAC;AA6e7E,eAAO,MAAM,mCAAmC,gEAiB9C,CAAC;AAEH,eAAO,MAAM,8BAA8B,8CAiBzC,CAAC;AAEH,eAAO,MAAM,cAAc,qBAE1B,CAAC;AAsBF,eAAO,MAAM,qCAAqC,qBAEjD,CAAC"}
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import { sfxManager } from "../../../core/cachedClasses";
|
|
9
9
|
import { ISCFeature } from "../../../enums/ISCFeature";
|
|
10
10
|
import { ModCallbackCustom } from "../../../enums/ModCallbackCustom";
|
|
11
|
-
import {
|
|
11
|
+
import { rebirthItemTrackerRemoveCollectible } from "../../../functions/external";
|
|
12
12
|
import { log, logError } from "../../../functions/log";
|
|
13
13
|
import {
|
|
14
14
|
getPlayerFromIndex,
|
|
@@ -194,7 +194,7 @@ export class CustomRevive extends Feature {
|
|
|
194
194
|
this.logStateChanged();
|
|
195
195
|
|
|
196
196
|
player.AddCollectible(CollectibleType.ONE_UP, 0, false);
|
|
197
|
-
|
|
197
|
+
rebirthItemTrackerRemoveCollectible(CollectibleType.ONE_UP);
|
|
198
198
|
|
|
199
199
|
// The player should always be dead one frame from now. If they are not, then something has gone
|
|
200
200
|
// wrong, probably with the `isDamageToPlayerFatal` function. Since end-user code is already
|
package/src/functions/bosses.ts
CHANGED
|
@@ -5,50 +5,60 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import type { CollectibleType } from "isaac-typescript-definitions";
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
const REBIRTH_ITEM_TRACKER_REMOVE_COLLECTIBLE_COMMAND =
|
|
10
|
+
"REBIRTH_ITEM_TRACKER_REMOVE_COLLECTIBLE";
|
|
9
11
|
|
|
10
12
|
const REBIRTH_ITEM_TRACKER_WRITE_TO_FILE_COMMAND =
|
|
11
13
|
"REBIRTH_ITEM_TRACKER_WRITE_TO_FILE";
|
|
12
14
|
|
|
13
15
|
/**
|
|
14
|
-
* Helper function to let the Rebirth Item Tracker know that it should
|
|
15
|
-
*
|
|
16
|
-
* (OBS).
|
|
16
|
+
* Helper function to let the Rebirth Item Tracker know that it should remove a collectible from its
|
|
17
|
+
* list.
|
|
17
18
|
*
|
|
18
19
|
* The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
|
|
19
|
-
* Python program
|
|
20
|
-
*/
|
|
21
|
-
export function rebirthItemTrackerWriteToFile(msg: string): void {
|
|
22
|
-
// This cannot use the "log" function since the prefix will prevent the Rebirth Item Tracker from
|
|
23
|
-
// recognizing the message.
|
|
24
|
-
Isaac.DebugString(`${REBIRTH_ITEM_TRACKER_WRITE_TO_FILE_COMMAND} ${msg}`);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Helper function to put a message in the log.txt file to let the Rebirth Item Tracker know that it
|
|
29
|
-
* should remove an item.
|
|
30
|
-
*
|
|
31
|
-
* The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
|
|
32
|
-
* Python program located at: https://github.com/Rchardon/RebirthItemTracker
|
|
33
|
-
*
|
|
34
|
-
* This function is useful when you need to add a "fake" collectible to a player. Note that calling
|
|
35
|
-
* this function is not necessary when removing items from players. For example, when you remove a
|
|
36
|
-
* collectible with the `EntityPlayer.RemoveCollectible` method, a proper message is sent to the log
|
|
37
|
-
* the item tracker will automatically remove it.
|
|
20
|
+
* external Python program.
|
|
38
21
|
*
|
|
39
22
|
* This function is variadic, meaning that you can pass as many collectible types as you want to
|
|
40
23
|
* remove.
|
|
24
|
+
*
|
|
25
|
+
* Note that calling this function is not normally necessary when removing collectibles from
|
|
26
|
+
* players. For example, when you remove a collectible with the `EntityPlayer.RemoveCollectible`
|
|
27
|
+
* method, a proper message is sent to the log file by the game the item tracker will automatically
|
|
28
|
+
* remove it. However, in some cases, this function can be useful:
|
|
29
|
+
*
|
|
30
|
+
* - We may be giving the player a "fake" collectible (e.g. 1-Up for the purposes of an extra life)
|
|
31
|
+
* and do not want the fake collectible to show up on the tracker.
|
|
32
|
+
* - We may be removing a starting active item. Since active items are never removed from the
|
|
33
|
+
* tracker, we want to tell the item tracker that the player never had a particular active item to
|
|
34
|
+
* begin with.
|
|
35
|
+
*
|
|
36
|
+
* @see https://github.com/Rchardon/RebirthItemTracker
|
|
41
37
|
*/
|
|
42
|
-
export function
|
|
38
|
+
export function rebirthItemTrackerRemoveCollectible(
|
|
43
39
|
...collectibleTypes: CollectibleType[]
|
|
44
40
|
): void {
|
|
45
41
|
for (const collectibleType of collectibleTypes) {
|
|
46
|
-
const collectibleName = getCollectibleName(collectibleType);
|
|
47
|
-
|
|
48
42
|
// This cannot use the "log" function since the prefix will prevent the Rebirth Item Tracker
|
|
49
43
|
// from recognizing the message.
|
|
50
44
|
Isaac.DebugString(
|
|
51
|
-
|
|
45
|
+
`${REBIRTH_ITEM_TRACKER_REMOVE_COLLECTIBLE_COMMAND} ${collectibleType}`,
|
|
52
46
|
);
|
|
53
47
|
}
|
|
54
48
|
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Helper function to let the Rebirth Item Tracker know that it should write the submitted text
|
|
52
|
+
* string to a file. This is useful for capturing text in programs like Open Broadcaster Software
|
|
53
|
+
* (OBS).
|
|
54
|
+
*
|
|
55
|
+
* The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
|
|
56
|
+
* external Python program.
|
|
57
|
+
*
|
|
58
|
+
* @see https://github.com/Rchardon/RebirthItemTracker
|
|
59
|
+
*/
|
|
60
|
+
export function rebirthItemTrackerWriteToFile(msg: string): void {
|
|
61
|
+
// This cannot use the "log" function since the prefix will prevent the Rebirth Item Tracker from
|
|
62
|
+
// recognizing the message.
|
|
63
|
+
Isaac.DebugString(`${REBIRTH_ITEM_TRACKER_WRITE_TO_FILE_COMMAND} ${msg}`);
|
|
64
|
+
}
|
package/src/sets/bossSets.ts
CHANGED