Implement Consumable Buffs

This commit is contained in:
GreenComfyTea
2023-06-30 18:57:14 +03:00
parent b5757e3b1e
commit 90190f5af7
5 changed files with 690 additions and 29 deletions

View File

@@ -3,6 +3,7 @@ local this = {};
local buff_UI_entity;
local config;
local buffs;
local consumables;
local screen;
local sdk = sdk;
@@ -54,6 +55,17 @@ function this.draw()
::continue::
end
for _, consumable in pairs(consumables.list) do
if not consumable.is_active then
goto continue
end
table.insert(displayed_buffs, consumable);
::continue::
end
-- sort
if cached_config.sorting.type == "Name" then
if cached_config.sorting.reversed_order then
@@ -113,6 +125,7 @@ end
function this.init_module()
config = require("MHR_Overlay.Misc.config");
buff_UI_entity = require("MHR_Overlay.UI.UI_Entities.buff_UI_entity");
consumables = require("MHR_Overlay.Buffs.consumables");
buffs = require("MHR_Overlay.Buffs.buffs");
--singletons = require("MHR_Overlay.Game_Handler.singletons");
config = require("MHR_Overlay.Misc.config");