Skip to main content

Log Misc

Functions

logArray

logArray<T>(this, array, name?): void

Helper function to log all of the values in an array.

Type parameters

Name
T

Parameters

NameTypeDescription
thisvoid-
arrayreadonly T[]The array to log.
name?stringOptional. The name of the array, which will be logged before the elements.

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:54


logCollectibleTypes

logCollectibleTypes(this, collectibleTypes, name?): void

Helper function to log the names of a collectible type array.

Parameters

NameTypeDescription
thisvoid-
collectibleTypesreadonly CollectibleType[]The collectible types to log.
name?stringOptional. The name of the array, which will be logged before the elements.

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:79


logColor

logColor(this, color, name?): void

Helper function to log a Color object.

Parameters

NameTypeDescription
thisvoid-
colorColorThe Color object to log.
name?stringOptional. The name of the object, which will be logged before the properties.

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:104


logDamageFlags

logDamageFlags(this, damageFlags): void

Helper function to log every damage flag that is turned on. Useful when debugging.

Parameters

NameType
thisvoid
damageFlagsDamageFlagValue | BitFlags<DamageFlagValue>

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:115


logDisplayFlags

logDisplayFlags(this, displayFlags): void

Helper function to log every display flag that is turned on. Useful when debugging.

Parameters

NameType
thisvoid
displayFlagsDisplayFlagValue | BitFlags<DisplayFlagValue>

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:123


logEntityFlags

logEntityFlags(this, entityFlags): void

Helper function to log every entity flag that is turned on. Useful when debugging.

Parameters

NameType
thisvoid
entityFlagsEntityFlagValue | BitFlags<EntityFlagValue>

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:131


logEntityID

logEntityID(this, entity): void

Parameters

NameType
thisvoid
entityEntity

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:138


logFlags

logFlags<T>(this, flags, flagEnum, description?): void

Helper function for logging every flag that is turned on. Useful when debugging.

Type parameters

NameType
Textends BitFlag | BitFlag128

Parameters

NameTypeDefault value
thisvoidundefined
flagsT | BitFlags<T>undefined
flagEnumReadonly<Record<string, T>>undefined
descriptionstring""

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:144


logGameStateFlags

logGameStateFlags(this): void

Helper function for logging every game state flag that is turned on. Useful when debugging.

Parameters

NameType
thisvoid

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:172


logItemPoolTypes

logItemPoolTypes(this, itemPoolTypes, name?): void

Helper function to log the names of a item pool type array.

Parameters

NameTypeDescription
thisvoid-
itemPoolTypesreadonly ItemPoolType[]The item pool types to log.
name?stringOptional. The name of the array, which will be logged before the elements.

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:197


logKColor

logKColor(this, kColor, name?): void

Helper function to log a KColor object.

Parameters

NameTypeDescription
thisvoid-
kColorKColorThe KColor object to log.
name?stringOptional. The name of the object, which will be logged before the properties.

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:222


logLevelStateFlags

logLevelStateFlags(this): void

Helper function for logging every level state flag that is turned on. Useful when debugging.

Parameters

NameType
thisvoid

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:233


logMap

logMap(this, map, name?): void

Helper function to log a TSTL Map.

Parameters

NameTypeDescription
thisvoid-
mapReadonlyMap<string | number, unknown>The TSTL Map to log.
name?stringOptional. The name of the map, which will be logged before the elements.

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:259


logMusic

logMusic(this): void

Parameters

NameType
thisvoid

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:283


logPlayerEffects

logPlayerEffects(this, player): void

Parameters

NameType
thisvoid
playerEntityPlayer

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:290


logPlayerHealth

logPlayerHealth(this, player): void

Parameters

NameType
thisvoid
playerEntityPlayer

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:318


logProjectileFlags

logProjectileFlags(this, projectileFlags): void

Helper function for logging every projectile flag that is turned on. Useful when debugging.

Parameters

NameType
thisvoid
projectileFlagsProjectileFlagValue | BitFlags<ProjectileFlagValue>

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:341


logRoom

logRoom(this): void

Helper function for logging information about the current room.

Parameters

NameType
thisvoid

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:349


logSeedEffects

logSeedEffects(this): void

Helper function for logging every seed effect (i.e. Easter Egg) that is turned on for the particular run.

Parameters

NameType
thisvoid

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:381


logSet

logSet(this, set, name?): void

Helper function to log a TSTL Set.

Parameters

NameTypeDescription
thisvoid-
setReadonlySet<string | number>The TSTL Set to log.
name?stringOptional. The name of the set, which will be logged before the elements.

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:406


logSounds

logSounds(this): void

Helper function for logging every sound effect that is currently playing.

Parameters

NameType
thisvoid

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:428


logTable

logTable(this, luaTable, parentTables?): void

Helper function for logging every key and value of a Lua table. This is a deep log; the function will recursively call itself if it encounters a table within a table.

This function will only work on tables that have string keys (because it logs the keys in order, instead of randomly). It will throw a run-time error if it encounters a non-string key.

In order to prevent infinite recursion, this function will not log a sub-table when there are 10 or more parent tables.

Parameters

NameTypeDefault value
thisvoidundefined
luaTableunknownundefined
parentTablesnumber0

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:448


logTableDifferences

logTableDifferences<K, V>(this, table1, table2): void

Helper function to log the differences between the entries of two tables. Note that this will only do a shallow comparison.

Type parameters

NameType
Kextends AnyNotNil
VV

Parameters

NameType
thisvoid
table1LuaMap<K, V>
table2LuaMap<K, V>

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:497


logTableKeys

logTableKeys(this, luaTable): void

Helper function to log the keys of a Lua table. This is not a deep log; only the keys of the top-most table will be logged.

This function is useful for tables that have recursive references.

Parameters

NameType
thisvoid
luaTableunknown

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:541


logTableShallow

logTableShallow<K, V>(this, luaTable): void

Helper function to log every table key and value. This is a shallow log; the function will not recursively traverse sub-tables.

This function will only work on tables that have string keys (because it logs the keys in order, instead of randomly). It will throw a run-time error if it encounters a non-string key.

Type parameters

NameType
Kextends AnyNotNil
VV

Parameters

NameType
thisvoid
luaTableLuaMap<K, V>

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:568


logTearFlags

logTearFlags(this, tearFlags): void

Helper function for log every tear flag that is turned on. Useful when debugging.

Parameters

NameType
thisvoid
tearFlagsTearFlagValue | BitFlags<TearFlagValue>

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:595


logUseFlags

logUseFlags(this, useFlags): void

Helper function for printing out every use flag that is turned on. Useful when debugging.

Parameters

NameType
thisvoid
useFlagsUseFlagValue | BitFlags<UseFlagValue>

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:603


logUserdata

logUserdata(this, userdata): void

Helper function to enumerate all of the properties of a "userdata" object (i.e. an object from the Isaac API).

Parameters

NameType
thisvoid
userdataunknown

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:614


logVector

logVector(this, vector, name?, round?): void

Helper function to log a Vector object.

Parameters

NameTypeDefault valueDescription
thisvoidundefined-
vectorVectorundefinedThe Vector object to log.
name?stringundefinedOptional. The name of the object, which will be logged before the properties.
roundbooleanfalseOptional. If true, will round the vector values to the nearest integer. Default is false.

Returns

void

Defined in

packages/isaacscript-common/src/functions/logMisc.ts:644