isaacscript-common 35.0.1 → 35.1.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 +10 -7
- package/dist/isaacscript-common.lua +19 -16
- package/dist/src/functions/external.d.ts +4 -1
- package/dist/src/functions/external.d.ts.map +1 -1
- package/dist/src/functions/external.lua +9 -3
- package/dist/src/functions/logMisc.d.ts +6 -6
- package/dist/src/functions/logMisc.d.ts.map +1 -1
- package/dist/src/functions/logMisc.lua +12 -12
- package/package.json +1 -1
- package/src/functions/external.ts +12 -7
- package/src/functions/logMisc.ts +12 -12
package/dist/index.rollup.d.ts
CHANGED
|
@@ -9717,10 +9717,10 @@ export declare function logCollectibleTypes(this: void, collectibleTypes: Collec
|
|
|
9717
9717
|
export declare function logColor(this: void, color: Color, name?: string): void;
|
|
9718
9718
|
|
|
9719
9719
|
/** Helper function to log every damage flag that is turned on. Useful when debugging. */
|
|
9720
|
-
export declare function logDamageFlags(this: void,
|
|
9720
|
+
export declare function logDamageFlags(this: void, damageFlags: DamageFlag | BitFlags<DamageFlag>): void;
|
|
9721
9721
|
|
|
9722
9722
|
/** Helper function to log every display flag that is turned on. Useful when debugging. */
|
|
9723
|
-
export declare function logDisplayFlags(this: void,
|
|
9723
|
+
export declare function logDisplayFlags(this: void, displayFlags: DisplayFlag | BitFlags<DisplayFlag>): void;
|
|
9724
9724
|
|
|
9725
9725
|
/** Helper function for logging an array of specific entities. */
|
|
9726
9726
|
export declare function logEntities(this: void, entities: Entity[]): void;
|
|
@@ -9729,7 +9729,7 @@ export declare function logEntities(this: void, entities: Entity[]): void;
|
|
|
9729
9729
|
export declare function logEntity(this: void, entity: Entity): void;
|
|
9730
9730
|
|
|
9731
9731
|
/** Helper function to log every entity flag that is turned on. Useful when debugging. */
|
|
9732
|
-
export declare function logEntityFlags(this: void,
|
|
9732
|
+
export declare function logEntityFlags(this: void, entityFlags: EntityFlag | BitFlags<EntityFlag>): void;
|
|
9733
9733
|
|
|
9734
9734
|
export declare function logEntityID(this: void, entity: Entity): void;
|
|
9735
9735
|
|
|
@@ -9782,7 +9782,7 @@ export declare function logPlayerEffects(this: void, player: EntityPlayer): void
|
|
|
9782
9782
|
export declare function logPlayerHealth(this: void, player: EntityPlayer): void;
|
|
9783
9783
|
|
|
9784
9784
|
/** Helper function for logging every projectile flag that is turned on. Useful when debugging. */
|
|
9785
|
-
export declare function logProjectileFlags(this: void,
|
|
9785
|
+
export declare function logProjectileFlags(this: void, projectileFlags: ProjectileFlag | BitFlags<ProjectileFlag>): void;
|
|
9786
9786
|
|
|
9787
9787
|
/**
|
|
9788
9788
|
* Helper function to log information about the entity that corresponding to a pointer hash. (Only
|
|
@@ -9852,10 +9852,10 @@ export declare function logTableKeys(this: void, luaTable: unknown): void;
|
|
|
9852
9852
|
export declare function logTableShallow<K extends AnyNotNil, V>(this: void, luaTable: LuaMap<K, V>): void;
|
|
9853
9853
|
|
|
9854
9854
|
/** Helper function for log every tear flag that is turned on. Useful when debugging. */
|
|
9855
|
-
export declare function logTearFlags(this: void,
|
|
9855
|
+
export declare function logTearFlags(this: void, tearFlags: TearFlag | BitFlags<TearFlag>): void;
|
|
9856
9856
|
|
|
9857
9857
|
/** Helper function for printing out every use flag that is turned on. Useful when debugging. */
|
|
9858
|
-
export declare function logUseFlags(this: void,
|
|
9858
|
+
export declare function logUseFlags(this: void, useFlags: UseFlag | BitFlags<UseFlag>): void;
|
|
9859
9859
|
|
|
9860
9860
|
/**
|
|
9861
9861
|
* Helper function to enumerate all of the properties of a "userdata" object (i.e. an object from
|
|
@@ -15160,8 +15160,11 @@ export declare function removeCollectibleFromAllPlayers(...collectibleTypes: Col
|
|
|
15160
15160
|
* this function is not necessary when removing items from players. For example, when you remove a
|
|
15161
15161
|
* collectible with the `EntityPlayer.RemoveCollectible` method, a proper message is sent to the log
|
|
15162
15162
|
* the item tracker will automatically remove it.
|
|
15163
|
+
*
|
|
15164
|
+
* This function is variadic, meaning that you can pass as many collectible types as you want to
|
|
15165
|
+
* remove.
|
|
15163
15166
|
*/
|
|
15164
|
-
export declare function removeCollectibleFromItemTracker(
|
|
15167
|
+
export declare function removeCollectibleFromItemTracker(...collectibleTypes: CollectibleType[]): void;
|
|
15165
15168
|
|
|
15166
15169
|
/**
|
|
15167
15170
|
* Helper function to remove one or more collectibles from all item pools.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 35.
|
|
3
|
+
isaacscript-common 35.1.1
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -29744,14 +29744,14 @@ function ____exports.logColor(color, name)
|
|
|
29744
29744
|
end
|
|
29745
29745
|
log((((((((((((((("Logging " .. name) .. ": R") .. tostring(color.R)) .. ", G") .. tostring(color.G)) .. ", B") .. tostring(color.B)) .. ", A") .. tostring(color.A)) .. ", RO") .. tostring(color.RO)) .. ", BO") .. tostring(color.BO)) .. ", GO") .. tostring(color.GO))
|
|
29746
29746
|
end
|
|
29747
|
-
function ____exports.logDamageFlags(
|
|
29748
|
-
____exports.logFlags(
|
|
29747
|
+
function ____exports.logDamageFlags(damageFlags)
|
|
29748
|
+
____exports.logFlags(damageFlags, DamageFlag, "damage")
|
|
29749
29749
|
end
|
|
29750
|
-
function ____exports.logDisplayFlags(
|
|
29751
|
-
____exports.logFlags(
|
|
29750
|
+
function ____exports.logDisplayFlags(displayFlags)
|
|
29751
|
+
____exports.logFlags(displayFlags, DisplayFlag, "display")
|
|
29752
29752
|
end
|
|
29753
|
-
function ____exports.logEntityFlags(
|
|
29754
|
-
____exports.logFlags(
|
|
29753
|
+
function ____exports.logEntityFlags(entityFlags)
|
|
29754
|
+
____exports.logFlags(entityFlags, EntityFlag, "entity")
|
|
29755
29755
|
end
|
|
29756
29756
|
function ____exports.logEntityID(entity)
|
|
29757
29757
|
local entityID = getEntityID(nil, entity)
|
|
@@ -29866,8 +29866,8 @@ function ____exports.logPlayerHealth(player)
|
|
|
29866
29866
|
end
|
|
29867
29867
|
log(" ]")
|
|
29868
29868
|
end
|
|
29869
|
-
function ____exports.logProjectileFlags(
|
|
29870
|
-
____exports.logFlags(
|
|
29869
|
+
function ____exports.logProjectileFlags(projectileFlags)
|
|
29870
|
+
____exports.logFlags(projectileFlags, ProjectileFlag, "projectile")
|
|
29871
29871
|
end
|
|
29872
29872
|
function ____exports.logRoom()
|
|
29873
29873
|
local room = game:GetRoom()
|
|
@@ -30040,11 +30040,11 @@ function ____exports.logTableShallow(luaTable)
|
|
|
30040
30040
|
false
|
|
30041
30041
|
)
|
|
30042
30042
|
end
|
|
30043
|
-
function ____exports.logTearFlags(
|
|
30044
|
-
____exports.logFlags(
|
|
30043
|
+
function ____exports.logTearFlags(tearFlags)
|
|
30044
|
+
____exports.logFlags(tearFlags, TearFlag, "tear")
|
|
30045
30045
|
end
|
|
30046
|
-
function ____exports.logUseFlags(
|
|
30047
|
-
____exports.logFlags(
|
|
30046
|
+
function ____exports.logUseFlags(useFlags)
|
|
30047
|
+
____exports.logFlags(useFlags, UseFlag, "use")
|
|
30048
30048
|
end
|
|
30049
30049
|
function ____exports.logUserdata(userdata)
|
|
30050
30050
|
if not isUserdata(nil, userdata) then
|
|
@@ -35182,9 +35182,12 @@ local REBIRTH_ITEM_TRACKER_WRITE_TO_FILE_COMMAND = "REBIRTH_ITEM_TRACKER_WRITE_T
|
|
|
35182
35182
|
function ____exports.rebirthItemTrackerWriteToFile(self, msg)
|
|
35183
35183
|
Isaac.DebugString((REBIRTH_ITEM_TRACKER_WRITE_TO_FILE_COMMAND .. " ") .. msg)
|
|
35184
35184
|
end
|
|
35185
|
-
function ____exports.removeCollectibleFromItemTracker(self,
|
|
35186
|
-
local
|
|
35187
|
-
|
|
35185
|
+
function ____exports.removeCollectibleFromItemTracker(self, ...)
|
|
35186
|
+
local collectibleTypes = {...}
|
|
35187
|
+
for ____, collectibleType in ipairs(collectibleTypes) do
|
|
35188
|
+
local collectibleName = getCollectibleName(nil, collectibleType)
|
|
35189
|
+
Isaac.DebugString(((("Removing collectible " .. tostring(collectibleType)) .. " (") .. collectibleName) .. ") on player 0 (Player)")
|
|
35190
|
+
end
|
|
35188
35191
|
end
|
|
35189
35192
|
return ____exports
|
|
35190
35193
|
end,
|
|
@@ -24,6 +24,9 @@ export declare function rebirthItemTrackerWriteToFile(msg: string): void;
|
|
|
24
24
|
* this function is not necessary when removing items from players. For example, when you remove a
|
|
25
25
|
* collectible with the `EntityPlayer.RemoveCollectible` method, a proper message is sent to the log
|
|
26
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.
|
|
27
30
|
*/
|
|
28
|
-
export declare function removeCollectibleFromItemTracker(
|
|
31
|
+
export declare function removeCollectibleFromItemTracker(...collectibleTypes: CollectibleType[]): void;
|
|
29
32
|
//# 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;AAMpE;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAI/D;AAED
|
|
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;AAMpE;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAI/D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gCAAgC,CAC9C,GAAG,gBAAgB,EAAE,eAAe,EAAE,GACrC,IAAI,CAUN"}
|
|
@@ -21,8 +21,14 @@ end
|
|
|
21
21
|
-- this function is not necessary when removing items from players. For example, when you remove a
|
|
22
22
|
-- collectible with the `EntityPlayer.RemoveCollectible` method, a proper message is sent to the log
|
|
23
23
|
-- the item tracker will automatically remove it.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
--
|
|
25
|
+
-- This function is variadic, meaning that you can pass as many collectible types as you want to
|
|
26
|
+
-- remove.
|
|
27
|
+
function ____exports.removeCollectibleFromItemTracker(self, ...)
|
|
28
|
+
local collectibleTypes = {...}
|
|
29
|
+
for ____, collectibleType in ipairs(collectibleTypes) do
|
|
30
|
+
local collectibleName = getCollectibleName(nil, collectibleType)
|
|
31
|
+
Isaac.DebugString(((("Removing collectible " .. tostring(collectibleType)) .. " (") .. collectibleName) .. ") on player 0 (Player)")
|
|
32
|
+
end
|
|
27
33
|
end
|
|
28
34
|
return ____exports
|
|
@@ -23,11 +23,11 @@ export declare function logCollectibleTypes(this: void, collectibleTypes: Collec
|
|
|
23
23
|
*/
|
|
24
24
|
export declare function logColor(this: void, color: Color, name?: string): void;
|
|
25
25
|
/** Helper function to log every damage flag that is turned on. Useful when debugging. */
|
|
26
|
-
export declare function logDamageFlags(this: void,
|
|
26
|
+
export declare function logDamageFlags(this: void, damageFlags: DamageFlag | BitFlags<DamageFlag>): void;
|
|
27
27
|
/** Helper function to log every display flag that is turned on. Useful when debugging. */
|
|
28
|
-
export declare function logDisplayFlags(this: void,
|
|
28
|
+
export declare function logDisplayFlags(this: void, displayFlags: DisplayFlag | BitFlags<DisplayFlag>): void;
|
|
29
29
|
/** Helper function to log every entity flag that is turned on. Useful when debugging. */
|
|
30
|
-
export declare function logEntityFlags(this: void,
|
|
30
|
+
export declare function logEntityFlags(this: void, entityFlags: EntityFlag | BitFlags<EntityFlag>): void;
|
|
31
31
|
export declare function logEntityID(this: void, entity: Entity): void;
|
|
32
32
|
/**
|
|
33
33
|
* Helper function to log an error message and also print it to the console for better visibility.
|
|
@@ -60,7 +60,7 @@ export declare function logMusic(this: void): void;
|
|
|
60
60
|
export declare function logPlayerEffects(this: void, player: EntityPlayer): void;
|
|
61
61
|
export declare function logPlayerHealth(this: void, player: EntityPlayer): void;
|
|
62
62
|
/** Helper function for logging every projectile flag that is turned on. Useful when debugging. */
|
|
63
|
-
export declare function logProjectileFlags(this: void,
|
|
63
|
+
export declare function logProjectileFlags(this: void, projectileFlags: ProjectileFlag | BitFlags<ProjectileFlag>): void;
|
|
64
64
|
/** Helper function for logging information about the current room. */
|
|
65
65
|
export declare function logRoom(this: void): void;
|
|
66
66
|
/**
|
|
@@ -109,9 +109,9 @@ export declare function logTableKeys(this: void, luaTable: unknown): void;
|
|
|
109
109
|
*/
|
|
110
110
|
export declare function logTableShallow<K extends AnyNotNil, V>(this: void, luaTable: LuaMap<K, V>): void;
|
|
111
111
|
/** Helper function for log every tear flag that is turned on. Useful when debugging. */
|
|
112
|
-
export declare function logTearFlags(this: void,
|
|
112
|
+
export declare function logTearFlags(this: void, tearFlags: TearFlag | BitFlags<TearFlag>): void;
|
|
113
113
|
/** Helper function for printing out every use flag that is turned on. Useful when debugging. */
|
|
114
|
-
export declare function logUseFlags(this: void,
|
|
114
|
+
export declare function logUseFlags(this: void, useFlags: UseFlag | BitFlags<UseFlag>): void;
|
|
115
115
|
/**
|
|
116
116
|
* Helper function to enumerate all of the properties of a "userdata" object (i.e. an object from
|
|
117
117
|
* the Isaac API).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logMisc.d.ts","sourceRoot":"","sources":["../../../src/functions/logMisc.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EACL,UAAU,EACV,WAAW,EACX,UAAU,EAMV,cAAc,EAGd,QAAQ,EACR,OAAO,EACR,MAAM,8BAA8B,CAAC;AAoBtC;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EACxB,IAAI,EAAE,IAAI,EAC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CAAC,CAAC,SAAS,SAAS,EAAE,CAAC,EACpD,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GACrB,IAAI,CAqBN;AAED,wFAAwF;AACxF,wBAAgB,YAAY,CAC1B,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,GACvC,IAAI,CAEN;AAED,gGAAgG;AAChG,wBAAgB,WAAW,CACzB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,GACpC,IAAI,CAEN;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,CAoB/D;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE,MAAM,EACb,KAAK,UAAQ,GACZ,IAAI,CAON"}
|
|
@@ -134,16 +134,16 @@ function ____exports.logColor(color, name)
|
|
|
134
134
|
log((((((((((((((("Logging " .. name) .. ": R") .. tostring(color.R)) .. ", G") .. tostring(color.G)) .. ", B") .. tostring(color.B)) .. ", A") .. tostring(color.A)) .. ", RO") .. tostring(color.RO)) .. ", BO") .. tostring(color.BO)) .. ", GO") .. tostring(color.GO))
|
|
135
135
|
end
|
|
136
136
|
--- Helper function to log every damage flag that is turned on. Useful when debugging.
|
|
137
|
-
function ____exports.logDamageFlags(
|
|
138
|
-
____exports.logFlags(
|
|
137
|
+
function ____exports.logDamageFlags(damageFlags)
|
|
138
|
+
____exports.logFlags(damageFlags, DamageFlag, "damage")
|
|
139
139
|
end
|
|
140
140
|
--- Helper function to log every display flag that is turned on. Useful when debugging.
|
|
141
|
-
function ____exports.logDisplayFlags(
|
|
142
|
-
____exports.logFlags(
|
|
141
|
+
function ____exports.logDisplayFlags(displayFlags)
|
|
142
|
+
____exports.logFlags(displayFlags, DisplayFlag, "display")
|
|
143
143
|
end
|
|
144
144
|
--- Helper function to log every entity flag that is turned on. Useful when debugging.
|
|
145
|
-
function ____exports.logEntityFlags(
|
|
146
|
-
____exports.logFlags(
|
|
145
|
+
function ____exports.logEntityFlags(entityFlags)
|
|
146
|
+
____exports.logFlags(entityFlags, EntityFlag, "entity")
|
|
147
147
|
end
|
|
148
148
|
function ____exports.logEntityID(entity)
|
|
149
149
|
local entityID = getEntityID(nil, entity)
|
|
@@ -273,8 +273,8 @@ function ____exports.logPlayerHealth(player)
|
|
|
273
273
|
log(" ]")
|
|
274
274
|
end
|
|
275
275
|
--- Helper function for logging every projectile flag that is turned on. Useful when debugging.
|
|
276
|
-
function ____exports.logProjectileFlags(
|
|
277
|
-
____exports.logFlags(
|
|
276
|
+
function ____exports.logProjectileFlags(projectileFlags)
|
|
277
|
+
____exports.logFlags(projectileFlags, ProjectileFlag, "projectile")
|
|
278
278
|
end
|
|
279
279
|
--- Helper function for logging information about the current room.
|
|
280
280
|
function ____exports.logRoom()
|
|
@@ -475,12 +475,12 @@ function ____exports.logTableShallow(luaTable)
|
|
|
475
475
|
)
|
|
476
476
|
end
|
|
477
477
|
--- Helper function for log every tear flag that is turned on. Useful when debugging.
|
|
478
|
-
function ____exports.logTearFlags(
|
|
479
|
-
____exports.logFlags(
|
|
478
|
+
function ____exports.logTearFlags(tearFlags)
|
|
479
|
+
____exports.logFlags(tearFlags, TearFlag, "tear")
|
|
480
480
|
end
|
|
481
481
|
--- Helper function for printing out every use flag that is turned on. Useful when debugging.
|
|
482
|
-
function ____exports.logUseFlags(
|
|
483
|
-
____exports.logFlags(
|
|
482
|
+
function ____exports.logUseFlags(useFlags)
|
|
483
|
+
____exports.logFlags(useFlags, UseFlag, "use")
|
|
484
484
|
end
|
|
485
485
|
--- Helper function to enumerate all of the properties of a "userdata" object (i.e. an object from
|
|
486
486
|
-- the Isaac API).
|
package/package.json
CHANGED
|
@@ -35,15 +35,20 @@ export function rebirthItemTrackerWriteToFile(msg: string): void {
|
|
|
35
35
|
* this function is not necessary when removing items from players. For example, when you remove a
|
|
36
36
|
* collectible with the `EntityPlayer.RemoveCollectible` method, a proper message is sent to the log
|
|
37
37
|
* the item tracker will automatically remove it.
|
|
38
|
+
*
|
|
39
|
+
* This function is variadic, meaning that you can pass as many collectible types as you want to
|
|
40
|
+
* remove.
|
|
38
41
|
*/
|
|
39
42
|
export function removeCollectibleFromItemTracker(
|
|
40
|
-
|
|
43
|
+
...collectibleTypes: CollectibleType[]
|
|
41
44
|
): void {
|
|
42
|
-
const
|
|
45
|
+
for (const collectibleType of collectibleTypes) {
|
|
46
|
+
const collectibleName = getCollectibleName(collectibleType);
|
|
43
47
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
// This cannot use the "log" function since the prefix will prevent the Rebirth Item Tracker
|
|
49
|
+
// from recognizing the message.
|
|
50
|
+
Isaac.DebugString(
|
|
51
|
+
`Removing collectible ${collectibleType} (${collectibleName}) on player 0 (Player)`,
|
|
52
|
+
);
|
|
53
|
+
}
|
|
49
54
|
}
|
package/src/functions/logMisc.ts
CHANGED
|
@@ -102,25 +102,25 @@ export function logColor(this: void, color: Color, name?: string): void {
|
|
|
102
102
|
/** Helper function to log every damage flag that is turned on. Useful when debugging. */
|
|
103
103
|
export function logDamageFlags(
|
|
104
104
|
this: void,
|
|
105
|
-
|
|
105
|
+
damageFlags: DamageFlag | BitFlags<DamageFlag>,
|
|
106
106
|
): void {
|
|
107
|
-
logFlags(
|
|
107
|
+
logFlags(damageFlags, DamageFlag, "damage");
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
/** Helper function to log every display flag that is turned on. Useful when debugging. */
|
|
111
111
|
export function logDisplayFlags(
|
|
112
112
|
this: void,
|
|
113
|
-
|
|
113
|
+
displayFlags: DisplayFlag | BitFlags<DisplayFlag>,
|
|
114
114
|
): void {
|
|
115
|
-
logFlags(
|
|
115
|
+
logFlags(displayFlags, DisplayFlag, "display");
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
/** Helper function to log every entity flag that is turned on. Useful when debugging. */
|
|
119
119
|
export function logEntityFlags(
|
|
120
120
|
this: void,
|
|
121
|
-
|
|
121
|
+
entityFlags: EntityFlag | BitFlags<EntityFlag>,
|
|
122
122
|
): void {
|
|
123
|
-
logFlags(
|
|
123
|
+
logFlags(entityFlags, EntityFlag, "entity");
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
export function logEntityID(this: void, entity: Entity): void {
|
|
@@ -314,9 +314,9 @@ export function logPlayerHealth(this: void, player: EntityPlayer): void {
|
|
|
314
314
|
/** Helper function for logging every projectile flag that is turned on. Useful when debugging. */
|
|
315
315
|
export function logProjectileFlags(
|
|
316
316
|
this: void,
|
|
317
|
-
|
|
317
|
+
projectileFlags: ProjectileFlag | BitFlags<ProjectileFlag>,
|
|
318
318
|
): void {
|
|
319
|
-
logFlags(
|
|
319
|
+
logFlags(projectileFlags, ProjectileFlag, "projectile");
|
|
320
320
|
}
|
|
321
321
|
|
|
322
322
|
/** Helper function for logging information about the current room. */
|
|
@@ -566,17 +566,17 @@ export function logTableShallow<K extends AnyNotNil, V>(
|
|
|
566
566
|
/** Helper function for log every tear flag that is turned on. Useful when debugging. */
|
|
567
567
|
export function logTearFlags(
|
|
568
568
|
this: void,
|
|
569
|
-
|
|
569
|
+
tearFlags: TearFlag | BitFlags<TearFlag>,
|
|
570
570
|
): void {
|
|
571
|
-
logFlags(
|
|
571
|
+
logFlags(tearFlags, TearFlag, "tear");
|
|
572
572
|
}
|
|
573
573
|
|
|
574
574
|
/** Helper function for printing out every use flag that is turned on. Useful when debugging. */
|
|
575
575
|
export function logUseFlags(
|
|
576
576
|
this: void,
|
|
577
|
-
|
|
577
|
+
useFlags: UseFlag | BitFlags<UseFlag>,
|
|
578
578
|
): void {
|
|
579
|
-
logFlags(
|
|
579
|
+
logFlags(useFlags, UseFlag, "use");
|
|
580
580
|
}
|
|
581
581
|
|
|
582
582
|
/**
|