Add some dangos, skills and endemic life buffs

This commit is contained in:
GreenComfyTea
2023-08-08 16:23:17 +03:00
parent 26966818b3
commit 6c2d09b505
18 changed files with 714 additions and 23 deletions

View File

@@ -5,9 +5,12 @@ local config;
local buffs;
local consumables;
local melody_effects;
local endemic_life_buff;
local screen;
local utils;
local error_handler;
local skills;
local dangos;
local sdk = sdk;
local tostring = tostring;
@@ -69,6 +72,36 @@ function this.draw()
::continue2::
end
for key, endemic_life_buff in pairs(endemic_life_buff.list) do
if not endemic_life_buff.is_active then
goto continue3;
end
table.insert(displayed_buffs, endemic_life_buff);
::continue3::
end
for key, skill in pairs(skills.list) do
if not skill.is_active then
goto continue4;
end
table.insert(displayed_buffs, skill);
::continue4::
end
for key, dango_buff in pairs(dangos.list) do
if not dango_buff.is_active then
goto continue5;
end
table.insert(displayed_buffs, dango_buff);
::continue5::
end
-- sort
if cached_config.sorting.type == "Name" then
if cached_config.sorting.reversed_order then
@@ -139,6 +172,9 @@ function this.init_dependencies()
--drawing = require("MHR_Overlay.UI.drawing");
utils = require("MHR_Overlay.Misc.utils");
error_handler = require("MHR_Overlay.Misc.error_handler");
endemic_life_buff = require("MHR_Overlay.Buffs.endemic_life_buffs");
skills = require("MHR_Overlay.Buffs.skills");
dangos = require("MHR_Overlay.Buffs.dangos");
end
function this.init_module()

View File

@@ -73,7 +73,12 @@ function this.draw(buff, buff_UI, position_on_screen, opacity_scale)
drawing.draw_bar(buff_UI.bar, position_on_screen, opacity_scale, 1);
end
drawing.draw_label(buff_UI.name_label, position_on_screen, opacity_scale, buff.name);
local buff_name = buff.name;
if cached_config.name_label.include.skill_level and buff.level > 1 then
buff_name = string.format("%s %d", buff_name, buff.level);
end
drawing.draw_label(buff_UI.name_label, position_on_screen, opacity_scale, buff_name);
if not buff.is_infinite then
drawing.draw_label(buff_UI.timer_label, position_on_screen, opacity_scale, buff.minutes_left, buff.seconds_left);