isaacscript-common 1.0.563 → 1.0.564
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/functions/log.lua +26 -4
- package/package.json +1 -1
package/dist/functions/log.lua
CHANGED
|
@@ -34,6 +34,8 @@ function ____exports.logAllFlags(flags, flagEnum, description)
|
|
|
34
34
|
description = description .. " "
|
|
35
35
|
end
|
|
36
36
|
____exports.log(("Logging all " .. description) .. "flags:")
|
|
37
|
+
local hasNoFlags = true
|
|
38
|
+
local i = 1
|
|
37
39
|
for ____, ____value in ipairs(
|
|
38
40
|
__TS__ObjectEntries(flagEnum)
|
|
39
41
|
) do
|
|
@@ -42,8 +44,15 @@ function ____exports.logAllFlags(flags, flagEnum, description)
|
|
|
42
44
|
local value
|
|
43
45
|
value = ____value[2]
|
|
44
46
|
if hasFlag(nil, flags, value) then
|
|
45
|
-
____exports.log(
|
|
47
|
+
____exports.log(
|
|
48
|
+
(((((" " .. tostring(i)) .. ") Has flag: ") .. key) .. " (") .. tostring(value)) .. ")"
|
|
49
|
+
)
|
|
50
|
+
hasNoFlags = false
|
|
46
51
|
end
|
|
52
|
+
i = i + 1
|
|
53
|
+
end
|
|
54
|
+
if hasNoFlags then
|
|
55
|
+
____exports.log(" n/a (no flags)")
|
|
47
56
|
end
|
|
48
57
|
end
|
|
49
58
|
function ____exports.logAllDamageFlags(flags)
|
|
@@ -55,6 +64,8 @@ end
|
|
|
55
64
|
function ____exports.logAllGameStateFlags()
|
|
56
65
|
local game = Game()
|
|
57
66
|
____exports.log("Logging all game state flags:")
|
|
67
|
+
local hasNoFlags = true
|
|
68
|
+
local i = 1
|
|
58
69
|
for ____, ____value in ipairs(
|
|
59
70
|
__TS__ObjectEntries(GameStateFlag)
|
|
60
71
|
) do
|
|
@@ -65,8 +76,15 @@ function ____exports.logAllGameStateFlags()
|
|
|
65
76
|
local gameStateFlag = value
|
|
66
77
|
local flagValue = game:GetStateFlag(gameStateFlag)
|
|
67
78
|
if flagValue then
|
|
68
|
-
____exports.log(
|
|
79
|
+
____exports.log(
|
|
80
|
+
(((((" " .. tostring(i)) .. ") Has flag: ") .. key) .. " (") .. tostring(value)) .. ")"
|
|
81
|
+
)
|
|
82
|
+
hasNoFlags = false
|
|
69
83
|
end
|
|
84
|
+
i = i + 1
|
|
85
|
+
end
|
|
86
|
+
if hasNoFlags then
|
|
87
|
+
____exports.log(" n/a (no flags)")
|
|
70
88
|
end
|
|
71
89
|
end
|
|
72
90
|
function ____exports.logAllProjectileFlags(flags)
|
|
@@ -83,6 +101,7 @@ function ____exports.logAllSeedEffects()
|
|
|
83
101
|
local seeds = game:GetSeeds()
|
|
84
102
|
____exports.log("Logging all seed effects:")
|
|
85
103
|
local hasNoSeedEffects = true
|
|
104
|
+
local i = 1
|
|
86
105
|
for ____, ____value in ipairs(
|
|
87
106
|
__TS__ObjectEntries(SeedEffect)
|
|
88
107
|
) do
|
|
@@ -92,12 +111,15 @@ function ____exports.logAllSeedEffects()
|
|
|
92
111
|
value = ____value[2]
|
|
93
112
|
local seedEffect = value
|
|
94
113
|
if seeds:HasSeedEffect(seedEffect) then
|
|
95
|
-
____exports.log(
|
|
114
|
+
____exports.log(
|
|
115
|
+
(((((" " .. tostring(i)) .. ") ") .. key) .. " (") .. tostring(value)) .. ")"
|
|
116
|
+
)
|
|
96
117
|
hasNoSeedEffects = false
|
|
97
118
|
end
|
|
119
|
+
i = i + 1
|
|
98
120
|
end
|
|
99
121
|
if hasNoSeedEffects then
|
|
100
|
-
____exports.log("
|
|
122
|
+
____exports.log(" n/a (no seed effects)")
|
|
101
123
|
end
|
|
102
124
|
end
|
|
103
125
|
function ____exports.logArray(array)
|