mirror of
https://github.com/GreenComfyTea/MHR-Overlay.git
synced 2026-01-24 12:28:03 -08:00
Release v1.11
1) Cache config access function-wide where possible; 2) Break and Sever values added to parts; 3) Hooks are now applied in init_module instead of global space; 4) Added checks for submodule (health, stamina, etc) visibility. If not visible, do not pull data.
This commit is contained in:
@@ -7,6 +7,8 @@ local language;
|
||||
function ailment_UI_entity.new(visibility, bar, name_label, text_label, value_label, percentage_label, timer_label)
|
||||
local entity = {};
|
||||
|
||||
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
|
||||
entity.visibility = visibility;
|
||||
entity.bar = table_helpers.deep_copy(bar);
|
||||
entity.name_label = table_helpers.deep_copy(name_label);
|
||||
@@ -15,25 +17,25 @@ function ailment_UI_entity.new(visibility, bar, name_label, text_label, value_la
|
||||
entity.percentage_label = table_helpers.deep_copy(percentage_label);
|
||||
entity.timer_label = table_helpers.deep_copy(timer_label);
|
||||
|
||||
entity.bar.offset.x = entity.bar.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.bar.offset.y = entity.bar.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.bar.size.width = entity.bar.size.width * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.bar.size.height = entity.bar.size.height * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.bar.offset.x = entity.bar.offset.x * global_scale_modifier;
|
||||
entity.bar.offset.y = entity.bar.offset.y * global_scale_modifier;
|
||||
entity.bar.size.width = entity.bar.size.width * global_scale_modifier;
|
||||
entity.bar.size.height = entity.bar.size.height * global_scale_modifier;
|
||||
|
||||
entity.name_label.offset.x = entity.name_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.name_label.offset.y = entity.name_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.name_label.offset.x = entity.name_label.offset.x * global_scale_modifier;
|
||||
entity.name_label.offset.y = entity.name_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.text_label.offset.x = entity.text_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.text_label.offset.y = entity.text_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.text_label.offset.x = entity.text_label.offset.x * global_scale_modifier;
|
||||
entity.text_label.offset.y = entity.text_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.value_label.offset.x = entity.value_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.value_label.offset.y = entity.value_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.value_label.offset.x = entity.value_label.offset.x * global_scale_modifier;
|
||||
entity.value_label.offset.y = entity.value_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.percentage_label.offset.x = entity.percentage_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.percentage_label.offset.y = entity.percentage_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.percentage_label.offset.x = entity.percentage_label.offset.x * global_scale_modifier;
|
||||
entity.percentage_label.offset.y = entity.percentage_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.timer_label.offset.x = entity.timer_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.timer_label.offset.y = entity.timer_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.timer_label.offset.x = entity.timer_label.offset.x * global_scale_modifier;
|
||||
entity.timer_label.offset.y = entity.timer_label.offset.y * global_scale_modifier;
|
||||
|
||||
return entity;
|
||||
end
|
||||
@@ -43,11 +45,13 @@ function ailment_UI_entity.draw_dynamic(ailment, ailment_UI, position_on_screen,
|
||||
return;
|
||||
end
|
||||
|
||||
local cached_config = config.current_config.large_monster_UI.dynamic.ailments;
|
||||
|
||||
local ailment_name = "";
|
||||
if config.current_config.large_monster_UI.dynamic.ailments.ailment_name_label.include.ailment_name then
|
||||
if cached_config.ailment_name_label.include.ailment_name then
|
||||
ailment_name = ailment.name .. " ";
|
||||
end
|
||||
if config.current_config.large_monster_UI.dynamic.ailments.ailment_name_label.include.activation_count and ailment.activate_count ~= 0 then
|
||||
if cached_config.ailment_name_label.include.activation_count and ailment.activate_count ~= 0 then
|
||||
ailment_name = ailment_name .. "x" .. tostring(ailment.activate_count);
|
||||
end
|
||||
|
||||
@@ -72,11 +76,13 @@ function ailment_UI_entity.draw_static(ailment, ailment_UI, position_on_screen,
|
||||
return;
|
||||
end
|
||||
|
||||
local cached_config = config.current_config.large_monster_UI.static.ailments;
|
||||
|
||||
local ailment_name = "";
|
||||
if config.current_config.large_monster_UI.static.ailments.ailment_name_label.include.ailment_name then
|
||||
if cached_config.ailment_name_label.include.ailment_name then
|
||||
ailment_name = ailment.name .. " ";
|
||||
end
|
||||
if config.current_config.large_monster_UI.static.ailments.ailment_name_label.include.activation_count and ailment.activate_count ~= 0 then
|
||||
if cached_config.ailment_name_label.include.activation_count and ailment.activate_count ~= 0 then
|
||||
ailment_name = ailment_name .. "x" .. tostring(ailment.activate_count);
|
||||
end
|
||||
|
||||
@@ -101,11 +107,13 @@ function ailment_UI_entity.draw_highlighted(ailment, ailment_UI, position_on_scr
|
||||
return;
|
||||
end
|
||||
|
||||
local cached_config = config.current_config.large_monster_UI.highlighted.ailments;
|
||||
|
||||
local ailment_name = "";
|
||||
if config.current_config.large_monster_UI.highlighted.ailments.ailment_name_label.include.ailment_name then
|
||||
if cached_config.ailment_name_label.include.ailment_name then
|
||||
ailment_name = ailment.name .. " ";
|
||||
end
|
||||
if config.current_config.large_monster_UI.highlighted.ailments.ailment_name_label.include.activation_count and ailment.activate_count ~= 0 then
|
||||
if cached_config.ailment_name_label.include.activation_count and ailment.activate_count ~= 0 then
|
||||
ailment_name = ailment_name .. "x" .. tostring(ailment.activate_count);
|
||||
end
|
||||
|
||||
@@ -130,11 +138,13 @@ function ailment_UI_entity.draw_small(ailment, ailment_UI, position_on_screen, o
|
||||
return;
|
||||
end
|
||||
|
||||
local cached_config = config.current_config.small_monster_UI.ailments;
|
||||
|
||||
local ailment_name = "";
|
||||
if config.current_config.small_monster_UI.ailments.ailment_name_label.include.ailment_name then
|
||||
if cached_config.ailment_name_label.include.ailment_name then
|
||||
ailment_name = ailment.name .. " ";
|
||||
end
|
||||
if config.current_config.small_monster_UI.ailments.ailment_name_label.include.activation_count and ailment.activate_count ~= 0 then
|
||||
if cached_config.ailment_name_label.include.activation_count and ailment.activate_count ~= 0 then
|
||||
ailment_name = ailment_name .. "x" .. tostring(ailment.activate_count);
|
||||
end
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ local language;
|
||||
function ailment_buildup_UI_entity.new(buildup_bar, highlighted_buildup_bar, ailment_name_label, player_name_label, buildup_value_label, buildup_percentage_label, total_buildup_label, total_buildup_value_label)
|
||||
local entity = {};
|
||||
|
||||
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
|
||||
--entity.visibility = visibility;
|
||||
entity.buildup_bar = table_helpers.deep_copy(buildup_bar);
|
||||
@@ -19,38 +20,39 @@ function ailment_buildup_UI_entity.new(buildup_bar, highlighted_buildup_bar, ail
|
||||
entity.total_buildup_label = table_helpers.deep_copy(total_buildup_label);
|
||||
entity.total_buildup_value_label = table_helpers.deep_copy(total_buildup_value_label);
|
||||
|
||||
entity.buildup_bar.offset.x = entity.buildup_bar.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.buildup_bar.offset.y = entity.buildup_bar.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.buildup_bar.size.width = entity.buildup_bar.size.width * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.buildup_bar.size.height = entity.buildup_bar.size.height * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.buildup_bar.offset.x = entity.buildup_bar.offset.x * global_scale_modifier;
|
||||
entity.buildup_bar.offset.y = entity.buildup_bar.offset.y * global_scale_modifier;
|
||||
entity.buildup_bar.size.width = entity.buildup_bar.size.width * global_scale_modifier;
|
||||
entity.buildup_bar.size.height = entity.buildup_bar.size.height * global_scale_modifier;
|
||||
|
||||
entity.highlighted_buildup_bar.offset.x = entity.highlighted_buildup_bar.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.highlighted_buildup_bar.offset.y = entity.highlighted_buildup_bar.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.highlighted_buildup_bar.size.width = entity.highlighted_buildup_bar.size.width * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.highlighted_buildup_bar.size.height = entity.highlighted_buildup_bar.size.height * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.highlighted_buildup_bar.offset.x = entity.highlighted_buildup_bar.offset.x * global_scale_modifier;
|
||||
entity.highlighted_buildup_bar.offset.y = entity.highlighted_buildup_bar.offset.y * global_scale_modifier;
|
||||
entity.highlighted_buildup_bar.size.width = entity.highlighted_buildup_bar.size.width * global_scale_modifier;
|
||||
entity.highlighted_buildup_bar.size.height = entity.highlighted_buildup_bar.size.height * global_scale_modifier;
|
||||
|
||||
entity.player_name_label.offset.x = entity.player_name_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.player_name_label.offset.y = entity.player_name_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.player_name_label.offset.x = entity.player_name_label.offset.x * global_scale_modifier;
|
||||
entity.player_name_label.offset.y = entity.player_name_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.buildup_value_label.offset.x = entity.buildup_value_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.buildup_value_label.offset.y = entity.buildup_value_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.buildup_value_label.offset.x = entity.buildup_value_label.offset.x * global_scale_modifier;
|
||||
entity.buildup_value_label.offset.y = entity.buildup_value_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.buildup_percentage_label.offset.x = entity.buildup_percentage_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.buildup_percentage_label.offset.y = entity.buildup_percentage_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.buildup_percentage_label.offset.x = entity.buildup_percentage_label.offset.x * global_scale_modifier
|
||||
entity.buildup_percentage_label.offset.y = entity.buildup_percentage_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.total_buildup_label.offset.x = entity.total_buildup_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.total_buildup_label.offset.y = entity.total_buildup_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.total_buildup_label.offset.x = entity.total_buildup_label.offset.x * global_scale_modifier;
|
||||
entity.total_buildup_label.offset.y = entity.total_buildup_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.total_buildup_value_label.offset.x = entity.total_buildup_value_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.total_buildup_value_label.offset.y = entity.total_buildup_value_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.total_buildup_value_label.offset.x = entity.total_buildup_value_label.offset.x * global_scale_modifier;
|
||||
entity.total_buildup_value_label.offset.y = entity.total_buildup_value_label.offset.y * global_scale_modifier;
|
||||
|
||||
return entity;
|
||||
end
|
||||
|
||||
function ailment_buildup_UI_entity.draw_dynamic(_player, ailment_buildup_UI, position_on_screen, opacity_scale, top_buildup)
|
||||
|
||||
local cached_config = config.current_config.large_monster_UI.dynamic.ailment_buildups;
|
||||
|
||||
local player_buildup_bar_percentage = 0;
|
||||
if config.current_config.large_monster_UI.dynamic.ailment_buildups.settings.buildup_bar_relative_to == "Total Buildup" then
|
||||
if cached_config.settings.buildup_bar_relative_to == "Total Buildup" then
|
||||
player_buildup_bar_percentage = _player.buildup_share;
|
||||
else
|
||||
if top_buildup ~= 0 then
|
||||
@@ -58,9 +60,9 @@ function ailment_buildup_UI_entity.draw_dynamic(_player, ailment_buildup_UI, pos
|
||||
end
|
||||
end
|
||||
|
||||
if _player.id == player.myself.id and config.current_config.large_monster_UI.dynamic.ailment_buildups.settings.highlighted_bar == "Me" then
|
||||
if _player.id == player.myself.id and cached_config.settings.highlighted_bar == "Me" then
|
||||
drawing.draw_bar(ailment_buildup_UI.highlighted_buildup_bar, position_on_screen, opacity_scale, player_buildup_bar_percentage);
|
||||
elseif config.current_config.large_monster_UI.dynamic.ailment_buildups.settings.highlighted_bar == "Top Buildup" and _player.buildup == top_buildup then
|
||||
elseif cached_config.settings.highlighted_bar == "Top Buildup" and _player.buildup == top_buildup then
|
||||
drawing.draw_bar(ailment_buildup_UI.highlighted_buildup_bar, position_on_screen, opacity_scale, player_buildup_bar_percentage);
|
||||
else
|
||||
drawing.draw_bar(ailment_buildup_UI.buildup_bar, position_on_screen, opacity_scale, player_buildup_bar_percentage);
|
||||
@@ -72,9 +74,10 @@ function ailment_buildup_UI_entity.draw_dynamic(_player, ailment_buildup_UI, pos
|
||||
end
|
||||
|
||||
function ailment_buildup_UI_entity.draw_static(_player, ailment_buildup_UI, position_on_screen, opacity_scale, top_buildup)
|
||||
local cached_config = config.current_config.large_monster_UI.static.ailment_buildups;
|
||||
|
||||
local player_buildup_bar_percentage = 0;
|
||||
if config.current_config.large_monster_UI.static.ailment_buildups.settings.buildup_bar_relative_to == "Total Buildup" then
|
||||
if cached_config.settings.buildup_bar_relative_to == "Total Buildup" then
|
||||
player_buildup_bar_percentage = _player.buildup_share;
|
||||
else
|
||||
if top_buildup ~= 0 then
|
||||
@@ -82,9 +85,9 @@ function ailment_buildup_UI_entity.draw_static(_player, ailment_buildup_UI, posi
|
||||
end
|
||||
end
|
||||
|
||||
if _player.id == player.myself.id and config.current_config.large_monster_UI.static.ailment_buildups.settings.highlighted_bar == "Me" then
|
||||
if _player.id == player.myself.id and cached_config.settings.highlighted_bar == "Me" then
|
||||
drawing.draw_bar(ailment_buildup_UI.highlighted_buildup_bar, position_on_screen, opacity_scale, player_buildup_bar_percentage);
|
||||
elseif config.current_config.large_monster_UI.static.ailment_buildups.settings.highlighted_bar == "Top Buildup" and _player.buildup == top_buildup then
|
||||
elseif cached_config.settings.highlighted_bar == "Top Buildup" and _player.buildup == top_buildup then
|
||||
drawing.draw_bar(ailment_buildup_UI.highlighted_buildup_bar, position_on_screen, opacity_scale, player_buildup_bar_percentage);
|
||||
else
|
||||
drawing.draw_bar(ailment_buildup_UI.buildup_bar, position_on_screen, opacity_scale, player_buildup_bar_percentage);
|
||||
@@ -96,9 +99,10 @@ function ailment_buildup_UI_entity.draw_static(_player, ailment_buildup_UI, posi
|
||||
end
|
||||
|
||||
function ailment_buildup_UI_entity.draw_highlighted(_player, ailment_buildup_UI, position_on_screen, opacity_scale, top_buildup)
|
||||
|
||||
local cached_config = config.current_config.large_monster_UI.highlighted.ailment_buildups;
|
||||
|
||||
local player_buildup_bar_percentage = 0;
|
||||
if config.current_config.large_monster_UI.highlighted.ailment_buildups.settings.buildup_bar_relative_to == "Total Buildup" then
|
||||
if cached_config.settings.buildup_bar_relative_to == "Total Buildup" then
|
||||
player_buildup_bar_percentage = _player.buildup_share;
|
||||
else
|
||||
if top_buildup ~= 0 then
|
||||
@@ -106,9 +110,9 @@ function ailment_buildup_UI_entity.draw_highlighted(_player, ailment_buildup_UI,
|
||||
end
|
||||
end
|
||||
|
||||
if _player.id == player.myself.id and config.current_config.large_monster_UI.highlighted.ailment_buildups.settings.highlighted_bar == "Me" then
|
||||
if _player.id == player.myself.id and cached_config.settings.highlighted_bar == "Me" then
|
||||
drawing.draw_bar(ailment_buildup_UI.highlighted_buildup_bar, position_on_screen, opacity_scale, player_buildup_bar_percentage);
|
||||
elseif config.current_config.large_monster_UI.highlighted.ailment_buildups.settings.highlighted_bar == "Top Buildup" and _player.buildup == top_buildup then
|
||||
elseif cached_config.settings.highlighted_bar == "Top Buildup" and _player.buildup == top_buildup then
|
||||
drawing.draw_bar(ailment_buildup_UI.highlighted_buildup_bar, position_on_screen, opacity_scale, player_buildup_bar_percentage);
|
||||
else
|
||||
drawing.draw_bar(ailment_buildup_UI.buildup_bar, position_on_screen, opacity_scale, player_buildup_bar_percentage);
|
||||
@@ -120,9 +124,10 @@ function ailment_buildup_UI_entity.draw_highlighted(_player, ailment_buildup_UI,
|
||||
end
|
||||
|
||||
function ailment_buildup_UI_entity.draw_small(_player, ailment_buildup_UI, position_on_screen, opacity_scale, top_buildup)
|
||||
local cached_config = config.current_config.small_monster_UI.ailment_buildups;
|
||||
|
||||
local player_buildup_bar_percentage = 0;
|
||||
if config.current_config.small_monster_UI.ailment_buildups.settings.buildup_bar_relative_to == "Total Buildup" then
|
||||
if cached_config.settings.buildup_bar_relative_to == "Total Buildup" then
|
||||
player_buildup_bar_percentage = _player.buildup_share;
|
||||
else
|
||||
if top_buildup ~= 0 then
|
||||
@@ -130,9 +135,9 @@ function ailment_buildup_UI_entity.draw_small(_player, ailment_buildup_UI, posit
|
||||
end
|
||||
end
|
||||
|
||||
if _player.id == player.myself.id and config.current_config.small_monster_UI.ailment_buildups.settings.highlighted_bar == "Me" then
|
||||
if _player.id == player.myself.id and cached_config.settings.highlighted_bar == "Me" then
|
||||
drawing.draw_bar(ailment_buildup_UI.highlighted_buildup_bar, position_on_screen, opacity_scale, player_buildup_bar_percentage);
|
||||
elseif config.current_config.small_monster_UI.ailment_buildups.settings.highlighted_bar == "Top Buildup" and _player.buildup == top_buildup then
|
||||
elseif cached_config.settings.highlighted_bar == "Top Buildup" and _player.buildup == top_buildup then
|
||||
drawing.draw_bar(ailment_buildup_UI.highlighted_buildup_bar, position_on_screen, opacity_scale, player_buildup_bar_percentage);
|
||||
else
|
||||
drawing.draw_bar(ailment_buildup_UI.buildup_bar, position_on_screen, opacity_scale, player_buildup_bar_percentage);
|
||||
|
||||
@@ -7,6 +7,9 @@ function body_part_UI_entity.new(part_visibility, part_name_label,
|
||||
flinch_visibility, flinch_bar, flinch_text_label, flinch_value_label, flinch_percentage_label,
|
||||
break_visibility, break_bar, break_text_label, break_value_label, break_percentage_label,
|
||||
loss_visibility, loss_bar, loss_text_label, loss_value_label, loss_health_percentage_label)
|
||||
|
||||
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
|
||||
local entity = {};
|
||||
|
||||
entity.part_visibility = part_visibility;
|
||||
@@ -16,91 +19,93 @@ function body_part_UI_entity.new(part_visibility, part_name_label,
|
||||
|
||||
entity.part_name_label = table_helpers.deep_copy(part_name_label);
|
||||
|
||||
entity.part_name_label.offset.x = entity.part_name_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.part_name_label.offset.y = entity.part_name_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.part_name_label.offset.x = entity.part_name_label.offset.x * global_scale_modifier;
|
||||
entity.part_name_label.offset.y = entity.part_name_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.flinch_bar = table_helpers.deep_copy(flinch_bar);
|
||||
entity.flinch_text_label = table_helpers.deep_copy(flinch_text_label);
|
||||
entity.flinch_value_label = table_helpers.deep_copy(flinch_value_label);
|
||||
entity.flinch_percentage_label = table_helpers.deep_copy(flinch_percentage_label);
|
||||
|
||||
entity.flinch_bar.offset.x = entity.flinch_bar.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.flinch_bar.offset.y = entity.flinch_bar.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.flinch_bar.size.width = entity.flinch_bar.size.width * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.flinch_bar.size.height = entity.flinch_bar.size.height * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.flinch_bar.offset.x = entity.flinch_bar.offset.x * global_scale_modifier;
|
||||
entity.flinch_bar.offset.y = entity.flinch_bar.offset.y * global_scale_modifier;
|
||||
entity.flinch_bar.size.width = entity.flinch_bar.size.width * global_scale_modifier;
|
||||
entity.flinch_bar.size.height = entity.flinch_bar.size.height * global_scale_modifier;
|
||||
|
||||
entity.flinch_text_label.offset.x = entity.flinch_text_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.flinch_text_label.offset.y = entity.flinch_text_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.flinch_text_label.offset.x = entity.flinch_text_label.offset.x * global_scale_modifier;
|
||||
entity.flinch_text_label.offset.y = entity.flinch_text_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.flinch_value_label.offset.x = entity.flinch_value_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.flinch_value_label.offset.y = entity.flinch_value_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.flinch_value_label.offset.x = entity.flinch_value_label.offset.x * global_scale_modifier;
|
||||
entity.flinch_value_label.offset.y = entity.flinch_value_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.flinch_percentage_label.offset.x = entity.flinch_percentage_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.flinch_percentage_label.offset.y = entity.flinch_percentage_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.flinch_percentage_label.offset.x = entity.flinch_percentage_label.offset.x * global_scale_modifier;
|
||||
entity.flinch_percentage_label.offset.y = entity.flinch_percentage_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.break_bar = table_helpers.deep_copy(break_bar);
|
||||
entity.break_text_label = table_helpers.deep_copy(break_text_label);
|
||||
entity.break_value_label = table_helpers.deep_copy(break_value_label);
|
||||
entity.break_percentage_label = table_helpers.deep_copy(break_percentage_label);
|
||||
|
||||
entity.break_bar.offset.x = entity.break_bar.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.break_bar.offset.y = entity.break_bar.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.break_bar.size.width = entity.break_bar.size.width * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.break_bar.size.height = entity.break_bar.size.height * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.break_bar.offset.x = entity.break_bar.offset.x * global_scale_modifier;
|
||||
entity.break_bar.offset.y = entity.break_bar.offset.y * global_scale_modifier;
|
||||
entity.break_bar.size.width = entity.break_bar.size.width * global_scale_modifier;
|
||||
entity.break_bar.size.height = entity.break_bar.size.height * global_scale_modifier;
|
||||
|
||||
entity.break_text_label.offset.x = entity.break_text_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.break_text_label.offset.y = entity.break_text_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.break_text_label.offset.x = entity.break_text_label.offset.x * global_scale_modifier;
|
||||
entity.break_text_label.offset.y = entity.break_text_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.break_value_label.offset.x = entity.break_value_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.break_value_label.offset.y = entity.break_value_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.break_value_label.offset.x = entity.break_value_label.offset.x * global_scale_modifier;
|
||||
entity.break_value_label.offset.y = entity.break_value_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.break_percentage_label.offset.x = entity.break_percentage_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.break_percentage_label.offset.y = entity.break_percentage_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.break_percentage_label.offset.x = entity.break_percentage_label.offset.x * global_scale_modifier;
|
||||
entity.break_percentage_label.offset.y = entity.break_percentage_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.loss_bar = table_helpers.deep_copy(loss_bar);
|
||||
entity.loss_text_label = table_helpers.deep_copy(loss_text_label);
|
||||
entity.loss_value_label = table_helpers.deep_copy(loss_value_label);
|
||||
entity.loss_health_percentage_label = table_helpers.deep_copy(loss_health_percentage_label);
|
||||
|
||||
entity.loss_bar.offset.x = entity.loss_bar.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.loss_bar.offset.y = entity.loss_bar.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.loss_bar.size.width = entity.loss_bar.size.width * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.loss_bar.size.height = entity.loss_bar.size.height * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.loss_bar.offset.x = entity.loss_bar.offset.x * global_scale_modifier;
|
||||
entity.loss_bar.offset.y = entity.loss_bar.offset.y * global_scale_modifier;
|
||||
entity.loss_bar.size.width = entity.loss_bar.size.width * global_scale_modifier;
|
||||
entity.loss_bar.size.height = entity.loss_bar.size.height * global_scale_modifier;
|
||||
|
||||
entity.loss_text_label.offset.x = entity.loss_text_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.loss_text_label.offset.y = entity.loss_text_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.loss_text_label.offset.x = entity.loss_text_label.offset.x * global_scale_modifier;
|
||||
entity.loss_text_label.offset.y = entity.loss_text_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.loss_value_label.offset.x = entity.loss_value_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.loss_value_label.offset.y = entity.loss_value_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.loss_value_label.offset.x = entity.loss_value_label.offset.x * global_scale_modifier;
|
||||
entity.loss_value_label.offset.y = entity.loss_value_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.loss_health_percentage_label.offset.x = entity.loss_health_percentage_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.loss_health_percentage_label.offset.y = entity.loss_health_percentage_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.loss_health_percentage_label.offset.x = entity.loss_health_percentage_label.offset.x * global_scale_modifier;
|
||||
entity.loss_health_percentage_label.offset.y = entity.loss_health_percentage_label.offset.y * global_scale_modifier;
|
||||
|
||||
return entity;
|
||||
end
|
||||
|
||||
function body_part_UI_entity.draw_dynamic(part, position_on_screen, opacity_scale)
|
||||
local cached_config = config.current_config.large_monster_UI.dynamic.body_parts;
|
||||
|
||||
if not part.body_part_dynamic_UI.part_visibility then
|
||||
return;
|
||||
end
|
||||
|
||||
local part_name = "";
|
||||
if config.current_config.large_monster_UI.dynamic.body_parts.part_name_label.include.part_name then
|
||||
if cached_config.part_name_label.include.part_name then
|
||||
part_name = part.name .. " ";
|
||||
end
|
||||
if config.current_config.large_monster_UI.dynamic.body_parts.part_name_label.include.flinch_count and part.flinch_count ~= 0 then
|
||||
if cached_config.part_name_label.include.flinch_count and part.flinch_count ~= 0 then
|
||||
part_name = part_name .. "x" .. tostring(part.flinch_count) .. " ";
|
||||
end
|
||||
|
||||
if part.break_max_count ~= 0 then
|
||||
if config.current_config.large_monster_UI.dynamic.body_parts.part_name_label.include.break_count then
|
||||
if config.current_config.large_monster_UI.dynamic.body_parts.part_name_label.include.break_max_count then
|
||||
if cached_config.part_name_label.include.break_count then
|
||||
if cached_config.part_name_label.include.break_max_count then
|
||||
part_name = part_name .. tostring(part.break_count) .. "/" .. tostring(part.break_max_count);
|
||||
|
||||
elseif part.flinch_count ~= 0 then
|
||||
part_name = part_name .. "x" .. tostring(part.break_count);
|
||||
end
|
||||
elseif config.current_config.large_monster_UI.dynamic.body_parts.part_name_label.include.break_max_count then
|
||||
elseif cached_config.part_name_label.include.break_max_count then
|
||||
part_name = part_name .. "/" .. tostring(part.break_max_count);
|
||||
end
|
||||
end
|
||||
@@ -110,20 +115,20 @@ function body_part_UI_entity.draw_dynamic(part, position_on_screen, opacity_scal
|
||||
local loss_health_string = string.format("%.0f/%.0f", part.loss_health, part.loss_max_health);
|
||||
|
||||
local flinch_position_on_screen = {
|
||||
x = position_on_screen.x + config.current_config.large_monster_UI.dynamic.body_parts.part_health.offset.x,
|
||||
y = position_on_screen.y + config.current_config.large_monster_UI.dynamic.body_parts.part_health.offset.y,
|
||||
x = position_on_screen.x + cached_config.part_health.offset.x,
|
||||
y = position_on_screen.y + cached_config.part_health.offset.y,
|
||||
visibility = part.body_part_dynamic_UI.flinch_visibility
|
||||
};
|
||||
|
||||
local break_position_on_screen = {
|
||||
x = position_on_screen.x + config.current_config.large_monster_UI.dynamic.body_parts.part_break.offset.x,
|
||||
y = position_on_screen.y + config.current_config.large_monster_UI.dynamic.body_parts.part_break.offset.y,
|
||||
x = position_on_screen.x + cached_config.part_break.offset.x,
|
||||
y = position_on_screen.y + cached_config.part_break.offset.y,
|
||||
visibility = part.body_part_dynamic_UI.flinch_visibility
|
||||
};
|
||||
|
||||
local loss_position_on_screen = {
|
||||
x = position_on_screen.x + config.current_config.large_monster_UI.dynamic.body_parts.part_loss.offset.x,
|
||||
y = position_on_screen.y + config.current_config.large_monster_UI.dynamic.body_parts.part_loss.offset.y,
|
||||
x = position_on_screen.x + cached_config.part_loss.offset.x,
|
||||
y = position_on_screen.y + cached_config.part_loss.offset.y,
|
||||
|
||||
|
||||
};
|
||||
@@ -162,27 +167,29 @@ function body_part_UI_entity.draw_dynamic(part, position_on_screen, opacity_scal
|
||||
end
|
||||
|
||||
function body_part_UI_entity.draw_static(part, position_on_screen, opacity_scale)
|
||||
local cached_config = config.current_config.large_monster_UI.static.body_parts;
|
||||
|
||||
if not part.body_part_static_UI.part_visibility then
|
||||
return;
|
||||
end
|
||||
|
||||
local part_name = "";
|
||||
if config.current_config.large_monster_UI.static.body_parts.part_name_label.include.part_name then
|
||||
if cached_config.part_name_label.include.part_name then
|
||||
part_name = part.name .. " ";
|
||||
end
|
||||
if config.current_config.large_monster_UI.static.body_parts.part_name_label.include.flinch_count and part.flinch_count ~= 0 then
|
||||
if cached_config.part_name_label.include.flinch_count and part.flinch_count ~= 0 then
|
||||
part_name = part_name .. "x" .. tostring(part.flinch_count) .. " ";
|
||||
end
|
||||
|
||||
if part.break_max_count ~= 0 then
|
||||
if config.current_config.large_monster_UI.static.body_parts.part_name_label.include.break_count then
|
||||
if config.current_config.large_monster_UI.static.body_parts.part_name_label.include.break_max_count then
|
||||
if cached_config.part_name_label.include.break_count then
|
||||
if cached_config.part_name_label.include.break_max_count then
|
||||
part_name = part_name .. tostring(part.break_count) .. "/" .. tostring(part.break_max_count);
|
||||
|
||||
elseif part.flinch_count ~= 0 then
|
||||
part_name = part_name .. "x" .. tostring(part.break_count);
|
||||
end
|
||||
elseif config.current_config.large_monster_UI.static.body_parts.part_name_label.include.break_max_count then
|
||||
elseif cached_config.part_name_label.include.break_max_count then
|
||||
part_name = part_name .. "/" .. tostring(part.break_max_count);
|
||||
end
|
||||
end
|
||||
@@ -192,20 +199,20 @@ function body_part_UI_entity.draw_static(part, position_on_screen, opacity_scale
|
||||
local loss_health_string = string.format("%.0f/%.0f", part.loss_health, part.loss_max_health);
|
||||
|
||||
local flinch_position_on_screen = {
|
||||
x = position_on_screen.x + config.current_config.large_monster_UI.static.body_parts.part_health.offset.x,
|
||||
y = position_on_screen.y + config.current_config.large_monster_UI.static.body_parts.part_health.offset.y,
|
||||
x = position_on_screen.x + cached_config.part_health.offset.x,
|
||||
y = position_on_screen.y + cached_config.part_health.offset.y,
|
||||
visibility = part.body_part_static_UI.flinch_visibility
|
||||
};
|
||||
|
||||
local break_position_on_screen = {
|
||||
x = position_on_screen.x + config.current_config.large_monster_UI.static.body_parts.part_break.offset.x,
|
||||
y = position_on_screen.y + config.current_config.large_monster_UI.static.body_parts.part_break.offset.y,
|
||||
x = position_on_screen.x + cached_config.part_break.offset.x,
|
||||
y = position_on_screen.y + cached_config.part_break.offset.y,
|
||||
visibility = part.body_part_static_UI.flinch_visibility
|
||||
};
|
||||
|
||||
local loss_position_on_screen = {
|
||||
x = position_on_screen.x + config.current_config.large_monster_UI.static.body_parts.part_loss.offset.x,
|
||||
y = position_on_screen.y + config.current_config.large_monster_UI.static.body_parts.part_loss.offset.y,
|
||||
x = position_on_screen.x + cached_config.part_loss.offset.x,
|
||||
y = position_on_screen.y + cached_config.part_loss.offset.y,
|
||||
|
||||
|
||||
};
|
||||
@@ -244,27 +251,29 @@ function body_part_UI_entity.draw_static(part, position_on_screen, opacity_scale
|
||||
end
|
||||
|
||||
function body_part_UI_entity.draw_highlighted(part, position_on_screen, opacity_scale)
|
||||
local cached_config = config.current_config.large_monster_UI.highlighted.body_parts;
|
||||
|
||||
if not part.body_part_highlighted_UI.part_visibility then
|
||||
return;
|
||||
end
|
||||
|
||||
local part_name = "";
|
||||
if config.current_config.large_monster_UI.highlighted.body_parts.part_name_label.include.part_name then
|
||||
if cached_config.part_name_label.include.part_name then
|
||||
part_name = part.name .. " ";
|
||||
end
|
||||
if config.current_config.large_monster_UI.highlighted.body_parts.part_name_label.include.flinch_count and part.flinch_count ~= 0 then
|
||||
if cached_config.part_name_label.include.flinch_count and part.flinch_count ~= 0 then
|
||||
part_name = part_name .. "x" .. tostring(part.flinch_count) .. " ";
|
||||
end
|
||||
|
||||
if part.break_max_count ~= 0 then
|
||||
if config.current_config.large_monster_UI.highlighted.body_parts.part_name_label.include.break_count then
|
||||
if config.current_config.large_monster_UI.highlighted.body_parts.part_name_label.include.break_max_count then
|
||||
if cached_config.part_name_label.include.break_count then
|
||||
if cached_config.part_name_label.include.break_max_count then
|
||||
part_name = part_name .. tostring(part.break_count) .. "/" .. tostring(part.break_max_count);
|
||||
|
||||
elseif part.flinch_count ~= 0 then
|
||||
part_name = part_name .. "x" .. tostring(part.break_count);
|
||||
end
|
||||
elseif config.current_config.large_monster_UI.highlighted.body_parts.part_name_label.include.break_max_count then
|
||||
elseif cached_config.part_name_label.include.break_max_count then
|
||||
part_name = part_name .. "/" .. tostring(part.break_max_count);
|
||||
end
|
||||
end
|
||||
@@ -274,51 +283,55 @@ function body_part_UI_entity.draw_highlighted(part, position_on_screen, opacity_
|
||||
local loss_health_string = string.format("%.0f/%.0f", part.loss_health, part.loss_max_health);
|
||||
|
||||
local flinch_position_on_screen = {
|
||||
x = position_on_screen.x + config.current_config.large_monster_UI.highlighted.body_parts.part_health.offset.x,
|
||||
y = position_on_screen.y + config.current_config.large_monster_UI.highlighted.body_parts.part_health.offset.y,
|
||||
x = position_on_screen.x + cached_config.part_health.offset.x,
|
||||
y = position_on_screen.y + cached_config.part_health.offset.y,
|
||||
visibility = part.body_part_highlighted_UI.flinch_visibility
|
||||
};
|
||||
|
||||
local break_position_on_screen = {
|
||||
x = position_on_screen.x + config.current_config.large_monster_UI.highlighted.body_parts.part_break.offset.x,
|
||||
y = position_on_screen.y + config.current_config.large_monster_UI.highlighted.body_parts.part_break.offset.y,
|
||||
x = position_on_screen.x + cached_config.part_break.offset.x,
|
||||
y = position_on_screen.y + cached_config.part_break.offset.y,
|
||||
visibility = part.body_part_highlighted_UI.flinch_visibility
|
||||
};
|
||||
|
||||
local loss_position_on_screen = {
|
||||
x = position_on_screen.x + config.current_config.large_monster_UI.highlighted.body_parts.part_loss.offset.x,
|
||||
y = position_on_screen.y + config.current_config.large_monster_UI.highlighted.body_parts.part_loss.offset.y,
|
||||
x = position_on_screen.x + cached_config.part_loss.offset.x,
|
||||
y = position_on_screen.y + cached_config.part_loss.offset.y,
|
||||
|
||||
|
||||
};
|
||||
|
||||
if part.body_part_highlighted_UI.flinch_visibility then
|
||||
local draw_health = part.body_part_highlighted_UI.flinch_visibility and part.max_health > 0;
|
||||
local draw_break = part.body_part_highlighted_UI.break_visibility and part.break_max_health > 0 and part.break_count < part.break_max_count;
|
||||
local draw_loss = part.body_part_highlighted_UI.loss_visibility and part.loss_max_health > 0 and not part.is_severed;
|
||||
|
||||
if draw_health then
|
||||
drawing.draw_bar(part.body_part_highlighted_UI.flinch_bar, flinch_position_on_screen, opacity_scale, part.health_percentage);
|
||||
end
|
||||
|
||||
if part.body_part_highlighted_UI.break_visibility and part.break_max_health ~= -1 and part.break_count < part.break_max_count then
|
||||
if draw_break then
|
||||
drawing.draw_bar(part.body_part_highlighted_UI.break_bar, break_position_on_screen, opacity_scale, part.break_health_percentage);
|
||||
end
|
||||
|
||||
if part.body_part_highlighted_UI.loss_visibility and part.loss_max_health ~= -1 and not part.is_severed then
|
||||
if draw_loss then
|
||||
drawing.draw_bar(part.body_part_highlighted_UI.loss_bar, loss_position_on_screen, opacity_scale, part.loss_health_percentage);
|
||||
end
|
||||
|
||||
drawing.draw_label(part.body_part_highlighted_UI.part_name_label, position_on_screen, opacity_scale, part_name);
|
||||
|
||||
if part.body_part_highlighted_UI.flinch_visibility then
|
||||
if draw_health then
|
||||
drawing.draw_label(part.body_part_highlighted_UI.flinch_text_label, flinch_position_on_screen, opacity_scale);
|
||||
drawing.draw_label(part.body_part_highlighted_UI.flinch_value_label, flinch_position_on_screen, opacity_scale, health_string);
|
||||
drawing.draw_label(part.body_part_highlighted_UI.flinch_percentage_label, flinch_position_on_screen, opacity_scale, 100 * part.health_percentage);
|
||||
end
|
||||
|
||||
if part.body_part_highlighted_UI.break_visibility and part.break_max_health ~= -1 and part.break_count < part.break_max_count then
|
||||
if draw_break then
|
||||
drawing.draw_label(part.body_part_highlighted_UI.break_text_label, break_position_on_screen, opacity_scale);
|
||||
drawing.draw_label(part.body_part_highlighted_UI.break_value_label, break_position_on_screen, opacity_scale, break_health_string);
|
||||
drawing.draw_label(part.body_part_highlighted_UI.break_percentage_label, break_position_on_screen, opacity_scale, 100 * part.break_health_percentage);
|
||||
end
|
||||
|
||||
if part.body_part_highlighted_UI.loss_visibility and part.loss_max_health ~= -1 and not part.is_severed then
|
||||
if draw_loss then
|
||||
drawing.draw_label(part.body_part_highlighted_UI.loss_text_label, loss_position_on_screen, opacity_scale);
|
||||
drawing.draw_label(part.body_part_highlighted_UI.loss_value_label, loss_position_on_screen, opacity_scale, loss_health_string);
|
||||
drawing.draw_label(part.body_part_highlighted_UI.loss_health_percentage_label, loss_position_on_screen, opacity_scale, 100 * part.loss_health_percentage);
|
||||
|
||||
@@ -8,6 +8,8 @@ local language;
|
||||
function damage_UI_entity.new(bar, highlighted_bar, player_name_label, dps_label, hunter_rank_label, value_label, percentage_label)
|
||||
local entity = {};
|
||||
|
||||
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
|
||||
--entity.visibility = visibility;
|
||||
entity.bar = table_helpers.deep_copy(bar);
|
||||
entity.highlighted_bar = table_helpers.deep_copy(highlighted_bar);
|
||||
@@ -17,39 +19,40 @@ function damage_UI_entity.new(bar, highlighted_bar, player_name_label, dps_label
|
||||
entity.value_label = table_helpers.deep_copy(value_label);
|
||||
entity.percentage_label = table_helpers.deep_copy(percentage_label);
|
||||
|
||||
entity.bar.offset.x = entity.bar.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.bar.offset.y = entity.bar.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.bar.size.width = entity.bar.size.width * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.bar.size.height = entity.bar.size.height * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.bar.offset.x = entity.bar.offset.x * global_scale_modifier;
|
||||
entity.bar.offset.y = entity.bar.offset.y * global_scale_modifier;
|
||||
entity.bar.size.width = entity.bar.size.width * global_scale_modifier;
|
||||
entity.bar.size.height = entity.bar.size.height * global_scale_modifier;
|
||||
|
||||
entity.highlighted_bar.offset.x = entity.highlighted_bar.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.highlighted_bar.offset.y = entity.highlighted_bar.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.highlighted_bar.size.width = entity.highlighted_bar.size.width * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.highlighted_bar.size.height = entity.highlighted_bar.size.height * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.highlighted_bar.offset.x = entity.highlighted_bar.offset.x * global_scale_modifier;
|
||||
entity.highlighted_bar.offset.y = entity.highlighted_bar.offset.y * global_scale_modifier;
|
||||
entity.highlighted_bar.size.width = entity.highlighted_bar.size.width * global_scale_modifier;
|
||||
entity.highlighted_bar.size.height = entity.highlighted_bar.size.height * global_scale_modifier;
|
||||
|
||||
entity.player_name_label.offset.x = entity.player_name_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.player_name_label.offset.y = entity.player_name_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.player_name_label.offset.x = entity.player_name_label.offset.x * global_scale_modifier;
|
||||
entity.player_name_label.offset.y = entity.player_name_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.dps_label.offset.x = entity.dps_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.dps_label.offset.y = entity.dps_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.dps_label.offset.x = entity.dps_label.offset.x * global_scale_modifier;
|
||||
entity.dps_label.offset.y = entity.dps_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.hunter_rank_label.offset.x = entity.hunter_rank_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.hunter_rank_label.offset.y = entity.hunter_rank_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.hunter_rank_label.offset.x = entity.hunter_rank_label.offset.x * global_scale_modifier;
|
||||
entity.hunter_rank_label.offset.y = entity.hunter_rank_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.value_label.offset.x = entity.value_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.value_label.offset.y = entity.value_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.value_label.offset.x = entity.value_label.offset.x * global_scale_modifier;
|
||||
entity.value_label.offset.y = entity.value_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.percentage_label.offset.x = entity.percentage_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.percentage_label.offset.y = entity.percentage_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.percentage_label.offset.x = entity.percentage_label.offset.x * global_scale_modifier;
|
||||
entity.percentage_label.offset.y = entity.percentage_label.offset.y * global_scale_modifier;
|
||||
|
||||
return entity;
|
||||
end
|
||||
|
||||
function damage_UI_entity.draw(_player, position_on_screen, opacity_scale, top_damage, top_dps)
|
||||
local cached_config = config.current_config.damage_meter_UI;
|
||||
|
||||
local player_include = config.current_config.damage_meter_UI.player_name_label.include.others;
|
||||
local player_include = cached_config.player_name_label.include.others;
|
||||
if _player.id == player.myself.id then
|
||||
player_include = config.current_config.damage_meter_UI.player_name_label.include.myself;
|
||||
player_include = cached_config.player_name_label.include.myself;
|
||||
end
|
||||
|
||||
local player_name_text = "";
|
||||
@@ -76,7 +79,7 @@ function damage_UI_entity.draw(_player, position_on_screen, opacity_scale, top_d
|
||||
end
|
||||
|
||||
local player_damage_bar_percentage = 0;
|
||||
if config.current_config.damage_meter_UI.settings.damage_bar_relative_to == "Total Damage" then
|
||||
if cached_config.settings.damage_bar_relative_to == "Total Damage" then
|
||||
if player.total.display.total_damage ~= 0 then
|
||||
player_damage_bar_percentage = _player.display.total_damage / player.total.display.total_damage;
|
||||
end
|
||||
@@ -86,11 +89,11 @@ function damage_UI_entity.draw(_player, position_on_screen, opacity_scale, top_d
|
||||
end
|
||||
end
|
||||
|
||||
if _player.id == player.myself.id and config.current_config.damage_meter_UI.settings.highlighted_bar == "Me" then
|
||||
if _player.id == player.myself.id and cached_config.settings.highlighted_bar == "Me" then
|
||||
drawing.draw_bar(_player.damage_UI.highlighted_bar, position_on_screen, opacity_scale, player_damage_bar_percentage);
|
||||
elseif config.current_config.damage_meter_UI.settings.highlighted_bar == "Top Damage" and _player.display.total_damage == top_damage then
|
||||
elseif cached_config.settings.highlighted_bar == "Top Damage" and _player.display.total_damage == top_damage then
|
||||
drawing.draw_bar(_player.damage_UI.highlighted_bar, position_on_screen, opacity_scale, player_damage_bar_percentage);
|
||||
elseif config.current_config.damage_meter_UI.settings.highlighted_bar == "Top DPS" and _player.dps == top_dps then
|
||||
elseif cached_config.settings.highlighted_bar == "Top DPS" and _player.dps == top_dps then
|
||||
drawing.draw_bar(_player.damage_UI.highlighted_bar, position_on_screen, opacity_scale, player_damage_bar_percentage);
|
||||
else
|
||||
drawing.draw_bar(_player.damage_UI.bar, position_on_screen, opacity_scale, player_damage_bar_percentage);
|
||||
|
||||
@@ -7,25 +7,27 @@ local config;
|
||||
function health_UI_entity.new(visibility, bar, text_label, value_label, percentage_label)
|
||||
local entity = {};
|
||||
|
||||
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
|
||||
entity.visibility = visibility;
|
||||
entity.bar = table_helpers.deep_copy(bar);
|
||||
entity.text_label = table_helpers.deep_copy(text_label);
|
||||
entity.value_label = table_helpers.deep_copy(value_label);
|
||||
entity.percentage_label = table_helpers.deep_copy(percentage_label);
|
||||
|
||||
entity.bar.offset.x = entity.bar.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.bar.offset.y = entity.bar.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.bar.size.width = entity.bar.size.width * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.bar.size.height = entity.bar.size.height * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.bar.offset.x = entity.bar.offset.x * global_scale_modifier;
|
||||
entity.bar.offset.y = entity.bar.offset.y * global_scale_modifier;
|
||||
entity.bar.size.width = entity.bar.size.width * global_scale_modifier;
|
||||
entity.bar.size.height = entity.bar.size.height * global_scale_modifier;
|
||||
|
||||
entity.text_label.offset.x = entity.text_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.text_label.offset.y = entity.text_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.text_label.offset.x = entity.text_label.offset.x * global_scale_modifier;
|
||||
entity.text_label.offset.y = entity.text_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.value_label.offset.x = entity.value_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.value_label.offset.y = entity.value_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.value_label.offset.x = entity.value_label.offset.x * global_scale_modifier;
|
||||
entity.value_label.offset.y = entity.value_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.percentage_label.offset.x = entity.percentage_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.percentage_label.offset.y = entity.percentage_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.percentage_label.offset.x = entity.percentage_label.offset.x * global_scale_modifier;
|
||||
entity.percentage_label.offset.y = entity.percentage_label.offset.y * global_scale_modifier;
|
||||
|
||||
return entity;
|
||||
end
|
||||
|
||||
@@ -7,6 +7,8 @@ local config;
|
||||
function rage_UI_entity.new(visibility, bar, text_label, value_label, percentage_label, timer_label)
|
||||
local entity = {};
|
||||
|
||||
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
|
||||
entity.visibility = visibility;
|
||||
entity.bar = table_helpers.deep_copy(bar);
|
||||
entity.text_label = table_helpers.deep_copy(text_label);
|
||||
@@ -14,22 +16,22 @@ function rage_UI_entity.new(visibility, bar, text_label, value_label, percentage
|
||||
entity.percentage_label = table_helpers.deep_copy(percentage_label);
|
||||
entity.timer_label = table_helpers.deep_copy(timer_label);
|
||||
|
||||
entity.bar.offset.x = entity.bar.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.bar.offset.y = entity.bar.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.bar.size.width = entity.bar.size.width * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.bar.size.height = entity.bar.size.height * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.bar.offset.x = entity.bar.offset.x * global_scale_modifier;
|
||||
entity.bar.offset.y = entity.bar.offset.y * global_scale_modifier;
|
||||
entity.bar.size.width = entity.bar.size.width * global_scale_modifier;
|
||||
entity.bar.size.height = entity.bar.size.height * global_scale_modifier;
|
||||
|
||||
entity.text_label.offset.x = entity.text_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.text_label.offset.y = entity.text_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.text_label.offset.x = entity.text_label.offset.x * global_scale_modifier;
|
||||
entity.text_label.offset.y = entity.text_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.value_label.offset.x = entity.value_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.value_label.offset.y = entity.value_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.value_label.offset.x = entity.value_label.offset.x * global_scale_modifier;
|
||||
entity.value_label.offset.y = entity.value_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.percentage_label.offset.x = entity.percentage_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.percentage_label.offset.y = entity.percentage_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.percentage_label.offset.x = entity.percentage_label.offset.x * global_scale_modifier;
|
||||
entity.percentage_label.offset.y = entity.percentage_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.timer_label.offset.x = entity.timer_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.timer_label.offset.y = entity.timer_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.timer_label.offset.x = entity.timer_label.offset.x * global_scale_modifier;
|
||||
entity.timer_label.offset.y = entity.timer_label.offset.y * global_scale_modifier;
|
||||
|
||||
return entity;
|
||||
end
|
||||
|
||||
@@ -7,25 +7,27 @@ local config;
|
||||
function stamina_UI_entity.new(visibility, bar, text_label, value_label, percentage_label)
|
||||
local entity = {};
|
||||
|
||||
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
|
||||
entity.visibility = visibility;
|
||||
entity.bar = table_helpers.deep_copy(bar);
|
||||
entity.text_label = table_helpers.deep_copy(text_label);
|
||||
entity.value_label = table_helpers.deep_copy(value_label);
|
||||
entity.percentage_label = table_helpers.deep_copy(percentage_label);
|
||||
|
||||
entity.bar.offset.x = entity.bar.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.bar.offset.y = entity.bar.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.bar.size.width = entity.bar.size.width * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.bar.size.height = entity.bar.size.height * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.bar.offset.x = entity.bar.offset.x * global_scale_modifier;
|
||||
entity.bar.offset.y = entity.bar.offset.y * global_scale_modifier;
|
||||
entity.bar.size.width = entity.bar.size.width * global_scale_modifier;
|
||||
entity.bar.size.height = entity.bar.size.height * global_scale_modifier;
|
||||
|
||||
entity.text_label.offset.x = entity.text_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.text_label.offset.y = entity.text_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.text_label.offset.x = entity.text_label.offset.x * global_scale_modifier;
|
||||
entity.text_label.offset.y = entity.text_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.value_label.offset.x = entity.value_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.value_label.offset.y = entity.value_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.value_label.offset.x = entity.value_label.offset.x * global_scale_modifier;
|
||||
entity.value_label.offset.y = entity.value_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.percentage_label.offset.x = entity.percentage_label.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.percentage_label.offset.y = entity.percentage_label.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
entity.percentage_label.offset.x = entity.percentage_label.offset.x * global_scale_modifier;
|
||||
entity.percentage_label.offset.y = entity.percentage_label.offset.y * global_scale_modifier;
|
||||
|
||||
return entity;
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user