isaacscript-common 1.2.216 → 1.2.217
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.
|
@@ -19,12 +19,12 @@ local getCharacterName = ____character.getCharacterName
|
|
|
19
19
|
local ____gridEntity = require("functions.gridEntity")
|
|
20
20
|
local spawnGridEntityWithVariant = ____gridEntity.spawnGridEntityWithVariant
|
|
21
21
|
local ____log = require("functions.log")
|
|
22
|
+
local logEffects = ____log.logEffects
|
|
22
23
|
local logEntities = ____log.logEntities
|
|
23
24
|
local logGridEntities = ____log.logGridEntities
|
|
24
25
|
local logRoom = ____log.logRoom
|
|
25
26
|
local logSeedEffects = ____log.logSeedEffects
|
|
26
27
|
local logSounds = ____log.logSounds
|
|
27
|
-
local logTemporaryEffects = ____log.logTemporaryEffects
|
|
28
28
|
local ____map = require("functions.map")
|
|
29
29
|
local getMapPartialMatch = ____map.getMapPartialMatch
|
|
30
30
|
local ____npc = require("functions.npc")
|
|
@@ -487,7 +487,7 @@ function ____exports.dungeon(self)
|
|
|
487
487
|
end
|
|
488
488
|
function ____exports.effects(self)
|
|
489
489
|
local player = Isaac.GetPlayer()
|
|
490
|
-
|
|
490
|
+
logEffects(player)
|
|
491
491
|
printConsole(nil, "Logged the player's effects to the \"log.txt\" file.")
|
|
492
492
|
end
|
|
493
493
|
function ____exports.eh(self, params)
|
package/dist/functions/log.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export declare function logArray<T>(this: void, array: T[]): void;
|
|
|
14
14
|
export declare function logColor(this: void, color: Color): void;
|
|
15
15
|
/** Helper function for printing out every damage flag that is turned on. Useful when debugging. */
|
|
16
16
|
export declare function logDamageFlags(this: void, flags: int): void;
|
|
17
|
+
export declare function logEffects(this: void, player: EntityPlayer): void;
|
|
17
18
|
/** Helper function for printing out every entity (or filtered entity) in the current room. */
|
|
18
19
|
export declare function logEntities(this: void, includeBackgroundEffects: boolean, entityTypeFilter?: EntityType | int): void;
|
|
19
20
|
/** Helper function for printing out every entity flag that is turned on. Useful when debugging. */
|
|
@@ -56,7 +57,6 @@ export declare function logSounds(this: void): void;
|
|
|
56
57
|
export declare function logTable(this: void, table: unknown, parentTables?: number): void;
|
|
57
58
|
/** Helper function for printing out every tear flag that is turned on. Useful when debugging. */
|
|
58
59
|
export declare function logTearFlags(this: void, flags: int): void;
|
|
59
|
-
export declare function logTemporaryEffects(this: void, player: EntityPlayer): void;
|
|
60
60
|
/** Helper function for printing out every use flag that is turned on. Useful when debugging. */
|
|
61
61
|
export declare function logUseFlags(this: void, flags: int): void;
|
|
62
62
|
/**
|
package/dist/functions/log.lua
CHANGED
|
@@ -80,14 +80,14 @@ function ____exports.logFlags(flags, flagEnum, description)
|
|
|
80
80
|
for key, value in pairs(flagEnum) do
|
|
81
81
|
do
|
|
82
82
|
if type(value) ~= "number" then
|
|
83
|
-
goto
|
|
83
|
+
goto __continue42
|
|
84
84
|
end
|
|
85
85
|
if hasFlag(nil, flags, value) then
|
|
86
86
|
____exports.log((((" Has flag: " .. tostring(key)) .. " (") .. tostring(value)) .. ")")
|
|
87
87
|
hasNoFlags = false
|
|
88
88
|
end
|
|
89
89
|
end
|
|
90
|
-
::
|
|
90
|
+
::__continue42::
|
|
91
91
|
end
|
|
92
92
|
if hasNoFlags then
|
|
93
93
|
____exports.log(" n/a (no flags)")
|
|
@@ -114,6 +114,30 @@ end
|
|
|
114
114
|
function ____exports.logDamageFlags(flags)
|
|
115
115
|
____exports.logFlags(flags, DamageFlag, "damage")
|
|
116
116
|
end
|
|
117
|
+
function ____exports.logEffects(player)
|
|
118
|
+
local effects = getEffectsList(nil, player)
|
|
119
|
+
____exports.log("Logging player effects:")
|
|
120
|
+
if #effects == 0 then
|
|
121
|
+
____exports.log(" n/a (no effects)")
|
|
122
|
+
return
|
|
123
|
+
end
|
|
124
|
+
__TS__ArrayForEach(
|
|
125
|
+
effects,
|
|
126
|
+
function(____, effect, i)
|
|
127
|
+
if effect.Item:IsCollectible() then
|
|
128
|
+
local collectibleName = getCollectibleName(nil, effect.Item.ID)
|
|
129
|
+
____exports.log(((" " .. tostring(i + 1)) .. ") Collectible: ") .. collectibleName)
|
|
130
|
+
elseif effect.Item:IsTrinket() then
|
|
131
|
+
local trinketName = getTrinketName(nil, effect.Item.ID)
|
|
132
|
+
____exports.log(((" " .. tostring(i + 1)) .. ") Trinket: ") .. trinketName)
|
|
133
|
+
elseif effect.Item:IsNull() then
|
|
134
|
+
____exports.log(((" " .. tostring(i + 1)) .. ") Null item: ") .. tostring(effect.Item.ID))
|
|
135
|
+
else
|
|
136
|
+
____exports.log(((" " .. tostring(i + 1)) .. ") Unknown type of effect: ") .. tostring(effect.Item.ID))
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
)
|
|
140
|
+
end
|
|
117
141
|
function ____exports.logEntities(includeBackgroundEffects, entityTypeFilter)
|
|
118
142
|
local headerMsg = "Entities in the room"
|
|
119
143
|
if entityTypeFilter ~= nil then
|
|
@@ -394,30 +418,6 @@ end
|
|
|
394
418
|
function ____exports.logTearFlags(flags)
|
|
395
419
|
____exports.logFlags(flags, TearFlags, "tear")
|
|
396
420
|
end
|
|
397
|
-
function ____exports.logTemporaryEffects(player)
|
|
398
|
-
local effects = getEffectsList(nil, player)
|
|
399
|
-
____exports.log("Logging player temporary effects:")
|
|
400
|
-
if #effects == 0 then
|
|
401
|
-
____exports.log(" n/a (no temporary effects)")
|
|
402
|
-
return
|
|
403
|
-
end
|
|
404
|
-
__TS__ArrayForEach(
|
|
405
|
-
effects,
|
|
406
|
-
function(____, effect, i)
|
|
407
|
-
if effect.Item:IsCollectible() then
|
|
408
|
-
local collectibleName = getCollectibleName(nil, effect.Item.ID)
|
|
409
|
-
____exports.log(((" " .. tostring(i + 1)) .. ") ") .. collectibleName)
|
|
410
|
-
elseif effect.Item:IsTrinket() then
|
|
411
|
-
local trinketName = getTrinketName(nil, effect.Item.ID)
|
|
412
|
-
____exports.log(((" " .. tostring(i + 1)) .. ") ") .. trinketName)
|
|
413
|
-
elseif effect.Item:IsNull() then
|
|
414
|
-
____exports.log(((" " .. tostring(i + 1)) .. ") Null item: ") .. tostring(effect.Item.ID))
|
|
415
|
-
else
|
|
416
|
-
____exports.log(((" " .. tostring(i + 1)) .. ") Unknown type of temporary effect: ") .. tostring(effect.Item.ID))
|
|
417
|
-
end
|
|
418
|
-
end
|
|
419
|
-
)
|
|
420
|
-
end
|
|
421
421
|
function ____exports.logUseFlags(flags)
|
|
422
422
|
____exports.logFlags(flags, UseFlag, "use")
|
|
423
423
|
end
|
|
@@ -449,6 +449,7 @@ function ____exports.setLogFunctionsGlobal(self)
|
|
|
449
449
|
globals.logArray = ____exports.logArray
|
|
450
450
|
globals.logColor = ____exports.logColor
|
|
451
451
|
globals.logDamageFlags = ____exports.logDamageFlags
|
|
452
|
+
globals.logEffects = ____exports.logEffects
|
|
452
453
|
globals.logEntities = ____exports.logEntities
|
|
453
454
|
globals.logEntityID = ____exports.logEntityID
|
|
454
455
|
globals.logEntityFlags = ____exports.logEntityFlags
|
|
@@ -466,7 +467,6 @@ function ____exports.setLogFunctionsGlobal(self)
|
|
|
466
467
|
globals.logSounds = ____exports.logSounds
|
|
467
468
|
globals.logTable = ____exports.logTable
|
|
468
469
|
globals.logTearFlags = ____exports.logTearFlags
|
|
469
|
-
globals.logTemporaryEffects = ____exports.logTemporaryEffects
|
|
470
470
|
globals.logUseFlags = ____exports.logUseFlags
|
|
471
471
|
globals.logUserdata = ____exports.logUserdata
|
|
472
472
|
globals.logVector = ____exports.logVector
|