Dont register global xy debug variable if debug is missing or debug.enabled = false

This commit is contained in:
GreenComfyTea
2023-04-21 10:21:27 +03:00
parent 9b1ff5b264
commit 81a803cc7c

View File

@@ -1,5 +1,3 @@
xy = "";
local sdk = sdk; local sdk = sdk;
local tostring = tostring; local tostring = tostring;
local pairs = pairs; local pairs = pairs;
@@ -95,6 +93,10 @@ local large_monster_UI_customization = require("MHR_Overlay.UI.Customizations.la
local drawing = require("MHR_Overlay.UI.drawing"); local drawing = require("MHR_Overlay.UI.drawing");
if debug ~= nil and debug.enabled then
xy = "";
end
------------------------INIT MODULES------------------------- ------------------------INIT MODULES-------------------------
-- #region -- #region
screen.init_module(); screen.init_module();
@@ -335,7 +337,7 @@ end);
-- #endregion -- #endregion
----------------------------D2D------------------------------ ----------------------------D2D------------------------------
if debug.enabled then if debug ~= nil and debug.enabled then
if d2d ~= nil then if d2d ~= nil then
d2d.register(function() d2d.register(function()
end, function() end, function()