isaacscript-common 1.2.253 → 1.2.254
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.
|
@@ -96,7 +96,7 @@ export declare function isLuaDebugEnabled(): boolean;
|
|
|
96
96
|
* Since this is a UI element, we do not want to draw it in water reflections. `renderOffset` will
|
|
97
97
|
* be a non-zero value in reflections.
|
|
98
98
|
*/
|
|
99
|
-
export declare function isReflectionRender(
|
|
99
|
+
export declare function isReflectionRender(): boolean;
|
|
100
100
|
/**
|
|
101
101
|
* Helper function to print something to the in-game console. Use this instead of invoking the
|
|
102
102
|
* `Isaac.ConsoleOutput` method directly because it will automatically insert a newline at the end
|
package/dist/functions/utils.lua
CHANGED
|
@@ -6,6 +6,8 @@ local __TS__StringSubstr = ____lualib.__TS__StringSubstr
|
|
|
6
6
|
local __TS__ObjectKeys = ____lualib.__TS__ObjectKeys
|
|
7
7
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
8
8
|
local ____exports = {}
|
|
9
|
+
local ____cachedClasses = require("cachedClasses")
|
|
10
|
+
local game = ____cachedClasses.game
|
|
9
11
|
local ____directionNames = require("objects.directionNames")
|
|
10
12
|
local DIRECTION_NAMES = ____directionNames.DIRECTION_NAMES
|
|
11
13
|
local HEX_STRING_LENGTH = 6
|
|
@@ -66,10 +68,10 @@ end
|
|
|
66
68
|
function ____exports.isLuaDebugEnabled(self)
|
|
67
69
|
return package ~= nil
|
|
68
70
|
end
|
|
69
|
-
function ____exports.isReflectionRender(self
|
|
70
|
-
local
|
|
71
|
-
local
|
|
72
|
-
return
|
|
71
|
+
function ____exports.isReflectionRender(self)
|
|
72
|
+
local room = game:GetRoom()
|
|
73
|
+
local renderMode = room:GetRenderMode()
|
|
74
|
+
return renderMode == RenderMode.RENDER_WATER_REFLECT
|
|
73
75
|
end
|
|
74
76
|
function ____exports.printConsole(self, msg)
|
|
75
77
|
Isaac.ConsoleOutput(msg .. "\n")
|