isaacscript-common 56.1.0 → 57.0.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/index.rollup.d.ts +28 -18
- package/dist/isaacscript-common.lua +9 -11
- package/dist/src/classes/features/callbackLogic/CustomRevive.lua +2 -2
- 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/package.json +1 -1
- package/src/classes/features/callbackLogic/CustomRevive.ts +2 -2
- package/src/functions/external.ts +37 -27
package/dist/index.rollup.d.ts
CHANGED
|
@@ -15207,13 +15207,40 @@ declare interface ReadonlySetConstructor {
|
|
|
15207
15207
|
readonly prototype: ReadonlySet<any>;
|
|
15208
15208
|
}
|
|
15209
15209
|
|
|
15210
|
+
/**
|
|
15211
|
+
* Helper function to let the Rebirth Item Tracker know that it should remove a collectible from its
|
|
15212
|
+
* list.
|
|
15213
|
+
*
|
|
15214
|
+
* The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
|
|
15215
|
+
* external Python program.
|
|
15216
|
+
*
|
|
15217
|
+
* This function is variadic, meaning that you can pass as many collectible types as you want to
|
|
15218
|
+
* remove.
|
|
15219
|
+
*
|
|
15220
|
+
* Note that calling this function is not normally necessary when removing collectibles from
|
|
15221
|
+
* players. For example, when you remove a collectible with the `EntityPlayer.RemoveCollectible`
|
|
15222
|
+
* method, a proper message is sent to the log file by the game the item tracker will automatically
|
|
15223
|
+
* remove it. However, in some cases, this function can be useful:
|
|
15224
|
+
*
|
|
15225
|
+
* - We may be giving the player a "fake" collectible (e.g. 1-Up for the purposes of an extra life)
|
|
15226
|
+
* and do not want the fake collectible to show up on the tracker.
|
|
15227
|
+
* - We may be removing a starting active item. Since active items are never removed from the
|
|
15228
|
+
* tracker, we want to tell the item tracker that the player never had a particular active item to
|
|
15229
|
+
* begin with.
|
|
15230
|
+
*
|
|
15231
|
+
* @see https://github.com/Rchardon/RebirthItemTracker
|
|
15232
|
+
*/
|
|
15233
|
+
export declare function rebirthItemTrackerRemoveCollectible(...collectibleTypes: CollectibleType[]): void;
|
|
15234
|
+
|
|
15210
15235
|
/**
|
|
15211
15236
|
* Helper function to let the Rebirth Item Tracker know that it should write the submitted text
|
|
15212
15237
|
* string to a file. This is useful for capturing text in programs like Open Broadcaster Software
|
|
15213
15238
|
* (OBS).
|
|
15214
15239
|
*
|
|
15215
15240
|
* The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
|
|
15216
|
-
* Python program
|
|
15241
|
+
* external Python program.
|
|
15242
|
+
*
|
|
15243
|
+
* @see https://github.com/Rchardon/RebirthItemTracker
|
|
15217
15244
|
*/
|
|
15218
15245
|
export declare function rebirthItemTrackerWriteToFile(msg: string): void;
|
|
15219
15246
|
|
|
@@ -15689,23 +15716,6 @@ export declare function removeCollectibleCostume(player: EntityPlayer, collectib
|
|
|
15689
15716
|
*/
|
|
15690
15717
|
export declare function removeCollectibleFromAllPlayers(...collectibleTypes: CollectibleType[]): void;
|
|
15691
15718
|
|
|
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
15719
|
/**
|
|
15710
15720
|
* Helper function to remove one or more collectibles from all item pools.
|
|
15711
15721
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common
|
|
3
|
+
isaacscript-common 57.0.0
|
|
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)
|
|
@@ -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)
|
|
@@ -5,28 +5,38 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { CollectibleType } from "isaac-typescript-definitions";
|
|
7
7
|
/**
|
|
8
|
-
* Helper function to let the Rebirth Item Tracker 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
|
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
|
|
@@ -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
|
+
}
|