More refactoring

This commit is contained in:
GreenComfyTea
2022-07-28 15:00:22 +03:00
parent 49b6b28c9e
commit 90fba51cd5
15 changed files with 924 additions and 5403 deletions

View File

@@ -10,8 +10,9 @@ local large_monster;
local table_helpers;
local drawing;
function ailment_buildup.draw_dynamic(monster, ailment_buildups_position_on_screen, opacity_scale)
local cached_config = config.current_config.large_monster_UI.dynamic.ailment_buildups;
function ailment_buildup.draw(monster, ailment_buildup_UI, cached_config, ailment_buildups_position_on_screen, opacity_scale)
local cached_config = cached_config.ailment_buildups;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
if not cached_config.visibility then
@@ -105,9 +106,7 @@ function ailment_buildup.draw_dynamic(monster, ailment_buildups_position_on_scre
ailment_name = ailment_name .. "x" .. tostring(ailment.activate_count);
end
drawing.draw_label(monster.ailments[ailments.stun_id].ailment_buildup_dynamic_UI.ailment_name_label,
ailment_buildups_position_on_screen, opacity_scale, ailment_name);
drawing.draw_label(ailment_buildup_UI.ailment_name_label, ailment_buildups_position_on_screen, opacity_scale, ailment_name);
local last_j = 0;
for j, _player in ipairs(displayed_players) do
@@ -116,143 +115,7 @@ function ailment_buildup.draw_dynamic(monster, ailment_buildups_position_on_scre
y = ailment_buildups_position_on_screen.y + cached_config.player_spacing.y * (j - 1) * global_scale_modifier;
};
ailment_buildup_UI_entity.draw_dynamic(_player, monster.ailments[ailments.stun_id].ailment_buildup_dynamic_UI,
ailment_buildup_position_on_screen, opacity_scale, top_buildup);
last_j = j;
end
local total_buildup_position_on_screen = {
x = ailment_buildups_position_on_screen.x + cached_config.player_spacing.x * last_j * global_scale_modifier,
y = ailment_buildups_position_on_screen.y + cached_config.player_spacing.y * last_j * global_scale_modifier;
};
drawing.draw_label(monster.ailments[ailments.stun_id].ailment_buildup_dynamic_UI.total_buildup_label,
total_buildup_position_on_screen, opacity_scale, language.current_language.UI.total_buildup);
drawing.draw_label(monster.ailments[ailments.stun_id].ailment_buildup_dynamic_UI.total_buildup_value_label,
total_buildup_position_on_screen, opacity_scale, total_buildup);
ailment_buildups_position_on_screen = {
x = total_buildup_position_on_screen.x + cached_config.ailment_spacing.x * global_scale_modifier,
y = total_buildup_position_on_screen.y + 17 + cached_config.ailment_spacing.y * global_scale_modifier
};
::continue::
end
end
function ailment_buildup.draw_static(monster, ailment_buildups_position_on_screen, opacity_scale)
local cached_config = config.current_config.large_monster_UI.static.ailment_buildups;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
if not cached_config.visibility then
return;
end
for id, ailment in pairs(monster.ailments) do
if id == ailments.stun_id then
if not cached_config.filter.stun then
goto continue
end
elseif id == ailments.poison_id then
if not cached_config.filter.poison then
goto continue
end
elseif id == ailments.blast_id then
if not cached_config.filter.blast then
goto continue
end
else
goto continue
end
if cached_config.settings.time_limit ~= 0 and
time.total_elapsed_script_seconds - ailment.last_change_time > cached_config.settings.time_limit then
goto continue
end
local total_buildup = 0;
local top_buildup = 0;
local displayed_players = {};
for player_id, player_buildup in pairs(ailment.buildup) do
total_buildup = total_buildup + player_buildup;
if player_buildup > top_buildup then
top_buildup = player_buildup;
end
table.insert(displayed_players,
{
["buildup"] = player_buildup,
["buildup_share"] = ailment.buildup_share[player_id],
["id"] = player_id
}
);
end
if total_buildup == 0 then
goto continue
end
if cached_config.sorting.type == "Normal" then
if cached_config.sorting.reversed_order then
table.sort(displayed_players, function(left, right)
return left.id < right.id;
end);
else
table.sort(displayed_players, function(left, right)
return left.id > right.id;
end);
end
elseif cached_config.sorting.type == "Buildup" then
if cached_config.sorting.reversed_order then
table.sort(displayed_players, function(left, right)
return left.buildup < right.buildup;
end);
else
table.sort(displayed_players, function(left, right)
return left.buildup > right.buildup;
end);
end
elseif cached_config.sorting.type == "Buildup Percentage" then
if cached_config.sorting.reversed_order then
table.sort(displayed_players, function(left, right)
return left.buildup_share < right.buildup_share;
end);
else
table.sort(displayed_players, function(left, right)
return left.buildup_share > right.buildup_share;
end);
end
end
local ailment_name = "";
if cached_config.ailment_name_label.include.ailment_name then
ailment_name = ailment.name .. " ";
end
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
drawing.draw_label(monster.ailments[ailments.stun_id].ailment_buildup_static_UI.ailment_name_label,
ailment_buildups_position_on_screen, opacity_scale, ailment_name);
local last_j = 0;
for j, _player in ipairs(displayed_players) do
local ailment_buildup_position_on_screen = {
x = ailment_buildups_position_on_screen.x + cached_config.player_spacing.x * (j - 1) * global_scale_modifier,
y = ailment_buildups_position_on_screen.y + cached_config.player_spacing.y * (j - 1) * global_scale_modifier;
};
ailment_buildup_UI_entity.draw_static(_player, monster.ailments[ailments.stun_id].ailment_buildup_static_UI,
ailment_buildup_position_on_screen, opacity_scale, top_buildup);
ailment_buildup_UI_entity.draw(_player, ailment_buildup_UI, cached_config, ailment_buildup_position_on_screen, opacity_scale, top_buildup);
last_j = j;
end
@@ -262,277 +125,8 @@ function ailment_buildup.draw_static(monster, ailment_buildups_position_on_scree
y = ailment_buildups_position_on_screen.y + cached_config.player_spacing.y * last_j * global_scale_modifier;
};
drawing.draw_label(monster.ailments[ailments.stun_id].ailment_buildup_static_UI.total_buildup_label,
total_buildup_position_on_screen, opacity_scale, language.current_language.UI.total_buildup);
drawing.draw_label(monster.ailments[ailments.stun_id].ailment_buildup_static_UI.total_buildup_value_label,
total_buildup_position_on_screen, opacity_scale, total_buildup);
ailment_buildups_position_on_screen = {
x = total_buildup_position_on_screen.x + cached_config.ailment_spacing.x * global_scale_modifier,
y = total_buildup_position_on_screen.y + 17 + cached_config.ailment_spacing.y * global_scale_modifier
};
::continue::
end
end
function ailment_buildup.draw_highlighted(monster, ailment_buildups_position_on_screen, opacity_scale)
local cached_config = config.current_config.large_monster_UI.highlighted.ailment_buildups;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
if not cached_config.visibility then
return;
end
for id, ailment in pairs(monster.ailments) do
if id == ailments.stun_id then
if not cached_config.filter.stun then
goto continue
end
elseif id == ailments.poison_id then
if not cached_config.filter.poison then
goto continue
end
elseif id == ailments.blast_id then
if not cached_config.filter.blast then
goto continue
end
else
goto continue
end
if cached_config.settings.time_limit ~= 0 and
time.total_elapsed_script_seconds - ailment.last_change_time > cached_config.settings.time_limit then
goto continue
end
local total_buildup = 0;
local top_buildup = 0;
local displayed_players = {};
for player_id, player_buildup in pairs(ailment.buildup) do
total_buildup = total_buildup + player_buildup;
if player_buildup > top_buildup then
top_buildup = player_buildup;
end
table.insert(displayed_players,
{
["buildup"] = player_buildup,
["buildup_share"] = ailment.buildup_share[player_id],
["id"] = player_id
}
);
end
if total_buildup == 0 then
goto continue
end
if cached_config.sorting.type == "Normal" then
if cached_config.sorting.reversed_order then
table.sort(displayed_players, function(left, right)
return left.id < right.id;
end);
else
table.sort(displayed_players, function(left, right)
return left.id > right.id;
end);
end
elseif cached_config.sorting.type == "Buildup" then
if cached_config.sorting.reversed_order then
table.sort(displayed_players, function(left, right)
return left.buildup < right.buildup;
end);
else
table.sort(displayed_players, function(left, right)
return left.buildup > right.buildup;
end);
end
elseif cached_config.sorting.type == "Buildup Percentage" then
if cached_config.sorting.reversed_order then
table.sort(displayed_players, function(left, right)
return left.buildup_share < right.buildup_share;
end);
else
table.sort(displayed_players, function(left, right)
return left.buildup_share > right.buildup_share;
end);
end
end
local ailment_name = "";
if cached_config.ailment_name_label.include.ailment_name then
ailment_name = ailment.name .. " ";
end
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
drawing.draw_label(monster.ailments[ailments.stun_id].ailment_buildup_highlighted_UI.ailment_name_label,
ailment_buildups_position_on_screen, opacity_scale, ailment_name);
local last_j = 0;
for j, _player in ipairs(displayed_players) do
local ailment_buildup_position_on_screen = {
x = ailment_buildups_position_on_screen.x + cached_config.player_spacing.x * (j - 1) * global_scale_modifier,
y = ailment_buildups_position_on_screen.y + cached_config.player_spacing.y * (j - 1) * global_scale_modifier;
};
ailment_buildup_UI_entity.draw_highlighted(_player, monster.ailments[ailments.stun_id].ailment_buildup_highlighted_UI
, ailment_buildup_position_on_screen, opacity_scale, top_buildup);
last_j = j;
end
local total_buildup_position_on_screen = {
x = ailment_buildups_position_on_screen.x + cached_config.player_spacing.x * last_j * global_scale_modifier,
y = ailment_buildups_position_on_screen.y + cached_config.player_spacing.y * last_j * global_scale_modifier;
};
drawing.draw_label(monster.ailments[ailments.stun_id].ailment_buildup_highlighted_UI.total_buildup_label,
total_buildup_position_on_screen, opacity_scale, language.current_language.UI.total_buildup);
drawing.draw_label(monster.ailments[ailments.stun_id].ailment_buildup_highlighted_UI.total_buildup_value_label,
total_buildup_position_on_screen, opacity_scale, total_buildup);
ailment_buildups_position_on_screen = {
x = total_buildup_position_on_screen.x + cached_config.ailment_spacing.x * global_scale_modifier,
y = total_buildup_position_on_screen.y + 17 + cached_config.ailment_spacing.y * global_scale_modifier
};
::continue::
end
end
function ailment_buildup.draw_small(monster, ailment_buildups_position_on_screen, opacity_scale)
local cached_config = config.current_config.small_monster_UI.ailment_buildups;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
if not cached_config.visibility then
return;
end
for id, ailment in pairs(monster.ailments) do
if id == ailments.stun_id then
if not cached_config.filter.stun then
goto continue
end
elseif id == ailments.poison_id then
if not cached_config.filter.poison then
goto continue
end
elseif id == ailments.blast_id then
if not cached_config.filter.blast then
goto continue
end
else
goto continue
end
if cached_config.settings.time_limit ~= 0 and
time.total_elapsed_script_seconds - ailment.last_change_time > cached_config.settings.time_limit then
goto continue
end
local total_buildup = 0;
local top_buildup = 0;
local displayed_players = {};
for player_id, player_buildup in pairs(ailment.buildup) do
total_buildup = total_buildup + player_buildup;
if player_buildup > top_buildup then
top_buildup = player_buildup;
end
table.insert(displayed_players,
{
["buildup"] = player_buildup,
["buildup_share"] = ailment.buildup_share[player_id],
["id"] = player_id
}
);
end
if total_buildup == 0 then
goto continue
end
if cached_config.sorting.type == "Normal" then
if cached_config.sorting.reversed_order then
table.sort(displayed_players, function(left, right)
return left.id < right.id;
end);
else
table.sort(displayed_players, function(left, right)
return left.id > right.id;
end);
end
elseif cached_config.sorting.type == "Buildup" then
if cached_config.sorting.reversed_order then
table.sort(displayed_players, function(left, right)
return left.buildup < right.buildup;
end);
else
table.sort(displayed_players, function(left, right)
return left.buildup > right.buildup;
end);
end
elseif cached_config.sorting.type == "Buildup Percentage" then
if cached_config.sorting.reversed_order then
table.sort(displayed_players, function(left, right)
return left.buildup_share < right.buildup_share;
end);
else
table.sort(displayed_players, function(left, right)
return left.buildup_share > right.buildup_share;
end);
end
end
local ailment_name = "";
if cached_config.ailment_name_label.include.ailment_name then
ailment_name = ailment.name .. " ";
end
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
drawing.draw_label(monster.ailments[ailments.stun_id].ailment_buildup_small_UI.ailment_name_label,
ailment_buildups_position_on_screen, opacity_scale, ailment_name);
local last_j = 0;
for j, _player in ipairs(displayed_players) do
local ailment_buildup_position_on_screen = {
x = ailment_buildups_position_on_screen.x + cached_config.player_spacing.x * (j - 1) * global_scale_modifier,
y = ailment_buildups_position_on_screen.y + cached_config.player_spacing.y * (j - 1) * global_scale_modifier;
};
ailment_buildup_UI_entity.draw_small(_player, monster.ailments[ailments.stun_id].ailment_buildup_small_UI,
ailment_buildup_position_on_screen, opacity_scale, top_buildup);
last_j = j;
end
local total_buildup_position_on_screen = {
x = ailment_buildups_position_on_screen.x + cached_config.player_spacing.x * last_j * global_scale_modifier,
y = ailment_buildups_position_on_screen.y + cached_config.player_spacing.y * last_j * global_scale_modifier;
};
drawing.draw_label(monster.ailments[ailments.stun_id].ailment_buildup_small_UI.total_buildup_label,
total_buildup_position_on_screen, opacity_scale, language.current_language.UI.total_buildup);
drawing.draw_label(monster.ailments[ailments.stun_id].ailment_buildup_small_UI.total_buildup_value_label,
total_buildup_position_on_screen, opacity_scale, total_buildup);
drawing.draw_label(ailment_buildup_UI.total_buildup_label, total_buildup_position_on_screen, opacity_scale, language.current_language.UI.total_buildup);
drawing.draw_label(ailment_buildup_UI.total_buildup_value_label, total_buildup_position_on_screen, opacity_scale, total_buildup);
ailment_buildups_position_on_screen = {
x = total_buildup_position_on_screen.x + cached_config.ailment_spacing.x * global_scale_modifier,

View File

@@ -148,78 +148,9 @@ function ailments.init_ailments()
_ailments[ailments.stun_id].buildup = {};
_ailments[ailments.stun_id].buildup_share = {};
ailments.init_ailment_buildup_UI(_ailments);
return _ailments;
end
function ailments.init_ailment_buildup_UI(_ailments)
ailments.init_ailment_buildup_dynamic_UI(_ailments);
ailments.init_ailment_buildup_static_UI(_ailments);
ailments.init_ailment_buildup_highlighted_UI(_ailments);
ailments.init_ailment_buildup_small_UI(_ailments);
end
function ailments.init_ailment_buildup_dynamic_UI(_ailments)
local cached_config = config.current_config.large_monster_UI.dynamic.ailment_buildups;
_ailments[ailments.stun_id].ailment_buildup_dynamic_UI = ailment_buildup_UI_entity.new(
cached_config.buildup_bar,
cached_config.highlighted_buildup_bar,
cached_config.ailment_name_label,
cached_config.player_name_label,
cached_config.buildup_value_label,
cached_config.buildup_percentage_label,
cached_config.total_buildup_label,
cached_config.total_buildup_value_label
);
end
function ailments.init_ailment_buildup_static_UI(_ailments)
local cached_config = config.current_config.large_monster_UI.static.ailment_buildups;
_ailments[ailments.stun_id].ailment_buildup_static_UI = ailment_buildup_UI_entity.new(
cached_config.buildup_bar,
cached_config.highlighted_buildup_bar,
cached_config.ailment_name_label,
cached_config.player_name_label,
cached_config.buildup_value_label,
cached_config.buildup_percentage_label,
cached_config.total_buildup_label,
cached_config.total_buildup_value_label
);
end
function ailments.init_ailment_buildup_highlighted_UI(_ailments)
local cached_config = config.current_config.large_monster_UI.highlighted.ailment_buildups;
_ailments[ailments.stun_id].ailment_buildup_highlighted_UI = ailment_buildup_UI_entity.new(
cached_config.buildup_bar,
cached_config.highlighted_buildup_bar,
cached_config.ailment_name_label,
cached_config.player_name_label,
cached_config.buildup_value_label,
cached_config.buildup_percentage_label,
cached_config.total_buildup_label,
cached_config.total_buildup_value_label
);
end
function ailments.init_ailment_buildup_small_UI(_ailments)
local cached_config = config.current_config.small_monster_UI.ailment_buildups;
_ailments[ailments.stun_id].ailment_buildup_small_UI = ailment_buildup_UI_entity.new(
cached_config.buildup_bar,
cached_config.highlighted_buildup_bar,
cached_config.ailment_name_label,
cached_config.player_name_label,
cached_config.buildup_value_label,
cached_config.buildup_percentage_label,
cached_config.total_buildup_label,
cached_config.total_buildup_value_label
);
end
local enemy_character_base_type_def = sdk.find_type_definition("snow.enemy.EnemyCharacterBase");
local enemy_condition_damage_param_base_type_def = sdk.find_type_definition("snow.enemy.EnemyConditionDamageParamBase");
@@ -429,176 +360,8 @@ function ailments.update_poison(monster, poison_param)
end
end
function ailments.draw_dynamic(monster, ailments_position_on_screen, opacity_scale)
local cached_config = config.current_config.large_monster_UI.dynamic.ailments;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
--sort parts here
local displayed_ailments = {};
for id, ailment in pairs(monster.ailments) do
if id == ailments.paralyze_id then
if not cached_config.filter.paralysis then
goto continue
end
elseif id == ailments.sleep_id then
if not cached_config.filter.sleep then
goto continue
end
elseif id == ailments.stun_id then
if not cached_config.filter.stun then
goto continue
end
elseif id == ailments.flash_id then
if not cached_config.filter.flash then
goto continue
end
elseif id == ailments.poison_id then
if not cached_config.filter.poison then
goto continue
end
elseif id == ailments.blast_id then
if not cached_config.filter.blast then
goto continue
end
elseif id == ailments.exhaust_id then
if not cached_config.filter.exhaust then
goto continue
end
elseif id == ailments.ride_id then
if not cached_config.filter.ride then
goto continue
end
elseif id == ailments.water_id then
if not cached_config.filter.waterblight then
goto continue
end
elseif id == ailments.fire_id then
if not cached_config.filter.fireblight then
goto continue
end
elseif id == ailments.ice_id then
if not cached_config.filter.iceblight then
goto continue
end
elseif id == ailments.thunder_id then
if not cached_config.filter.thunderblight then
goto continue
end
elseif id == ailments.fall_trap_id then
if not cached_config.filter.fall_trap then
goto continue
end
elseif id == ailments.shock_trap_id then
if not cached_config.filter.shock_trap then
goto continue
end
elseif id == ailments.capture_id then
if not cached_config.filter.tranq_bomb then
goto continue
end
elseif id == ailments.koyashi_id then
if not cached_config.filter.dung_bomb then
goto continue
end
elseif id == ailments.steel_fang_id then
if not cached_config.filter.steel_fang then
goto continue
end
elseif id == ailments.fall_quick_sand_id then
if not cached_config.filter.quick_sand then
goto continue
end
elseif id == ailments.fall_otomo_trap_id then
if not cached_config.filter.fall_otomo_trap then
goto continue
end
elseif id == ailments.shock_otomo_trap_id then
if not cached_config.filter.shock_otomo_trap then
goto continue
end
else
goto continue
end
if cached_config.settings.hide_ailments_with_zero_buildup and ailment.total_buildup == 0 and
ailment.buildup_limit ~= 0
and ailment.activate_count == 0 and not ailment.is_active then
goto continue
end
if cached_config.settings.hide_inactive_ailments_with_no_buildup_support and ailment.buildup_limit == 0 and
not ailment.is_active then
goto continue
end
if cached_config.settings.hide_all_inactive_ailments and not ailment.is_active then
goto continue
end
if cached_config.settings.hide_all_active_ailments and ailment.is_active then
goto continue
end
if cached_config.settings.hide_disabled_ailments and not ailment.is_enable then
goto continue
end
if cached_config.settings.time_limit ~= 0 and
time.total_elapsed_script_seconds - ailment.last_change_time > cached_config.settings.time_limit and
not ailment.is_active then
goto continue
end
table.insert(displayed_ailments, ailment);
::continue::
end
if cached_config.sorting.type == "Normal" then
if cached_config.sorting.reversed_order then
table.sort(displayed_ailments, function(left, right)
return left.id > right.id;
end);
else
table.sort(displayed_ailments, function(left, right)
return left.id < right.id;
end);
end
elseif cached_config.sorting.type == "Buildup" then
if cached_config.sorting.reversed_order then
table.sort(displayed_ailments, function(left, right)
return left.total_buildup > right.total_buildup;
end);
else
table.sort(displayed_ailments, function(left, right)
return left.total_buildup < right.total_buildup;
end);
end
elseif cached_config.sorting.type == "Buildup Percentage" then
if cached_config.sorting.reversed_order then
table.sort(displayed_ailments, function(left, right)
return left.buildup_percentage > right.buildup_percentage;
end);
else
table.sort(displayed_ailments, function(left, right)
return left.buildup_percentage < right.buildup_percentage;
end);
end
end
for j, ailment in ipairs(displayed_ailments) do
local ailment_position_on_screen = {
x = ailments_position_on_screen.x + cached_config.spacing.x * (j - 1) * global_scale_modifier,
y = ailments_position_on_screen.y + cached_config.spacing.y * (j - 1) * global_scale_modifier;
}
ailment_UI_entity.draw_dynamic(ailment, monster.ailment_dynamic_UI, ailment_position_on_screen, opacity_scale);
end
end
function ailments.draw_static(monster, ailments_position_on_screen, opacity_scale)
local cached_config = config.current_config.large_monster_UI.static.ailments;
function ailments.draw(monster, ailment_UI, cached_config, ailments_position_on_screen, opacity_scale)
local cached_config = cached_config.ailments;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
--sort parts here
@@ -760,349 +523,10 @@ function ailments.draw_static(monster, ailments_position_on_screen, opacity_scal
y = ailments_position_on_screen.y + cached_config.spacing.y * (j - 1) * global_scale_modifier;
}
ailment_UI_entity.draw_static(ailment, monster.ailment_static_UI, ailment_position_on_screen, opacity_scale);
end
end
function ailments.draw_highlighted(monster, ailments_position_on_screen, opacity_scale)
local cached_config = config.current_config.large_monster_UI.highlighted.ailments;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
--sort parts here
local displayed_ailments = {};
for id, ailment in pairs(monster.ailments) do
if id == ailments.paralyze_id then
if not cached_config.filter.paralysis then
goto continue
end
elseif id == ailments.sleep_id then
if not cached_config.filter.sleep then
goto continue
end
elseif id == ailments.stun_id then
if not cached_config.filter.stun then
goto continue
end
elseif id == ailments.flash_id then
if not cached_config.filter.flash then
goto continue
end
elseif id == ailments.poison_id then
if not cached_config.filter.poison then
goto continue
end
elseif id == ailments.blast_id then
if not cached_config.filter.blast then
goto continue
end
elseif id == ailments.exhaust_id then
if not cached_config.filter.exhaust then
goto continue
end
elseif id == ailments.ride_id then
if not cached_config.filter.ride then
goto continue
end
elseif id == ailments.water_id then
if not cached_config.filter.waterblight then
goto continue
end
elseif id == ailments.fire_id then
if not cached_config.filter.fireblight then
goto continue
end
elseif id == ailments.ice_id then
if not cached_config.filter.iceblight then
goto continue
end
elseif id == ailments.thunder_id then
if not cached_config.filter.thunderblight then
goto continue
end
elseif id == ailments.fall_trap_id then
if not cached_config.filter.fall_trap then
goto continue
end
elseif id == ailments.shock_trap_id then
if not cached_config.filter.shock_trap then
goto continue
end
elseif id == ailments.capture_id then
if not cached_config.filter.tranq_bomb then
goto continue
end
elseif id == ailments.koyashi_id then
if not cached_config.filter.dung_bomb then
goto continue
end
elseif id == ailments.steel_fang_id then
if not cached_config.filter.steel_fang then
goto continue
end
elseif id == ailments.fall_quick_sand_id then
if not cached_config.filter.quick_sand then
goto continue
end
elseif id == ailments.fall_otomo_trap_id then
if not cached_config.filter.fall_otomo_trap then
goto continue
end
elseif id == ailments.shock_otomo_trap_id then
if not cached_config.filter.shock_otomo_trap then
goto continue
end
else
goto continue
end
if cached_config.settings.hide_ailments_with_zero_buildup and ailment.total_buildup == 0 and
ailment.buildup_limit ~= 0
and ailment.activate_count == 0 and not ailment.is_active then
goto continue
end
if cached_config.settings.hide_inactive_ailments_with_no_buildup_support and ailment.buildup_limit == 0 and
not ailment.is_active then
goto continue
end
if cached_config.settings.hide_all_inactive_ailments and not ailment.is_active then
goto continue
end
if cached_config.settings.hide_all_active_ailments and ailment.is_active then
goto continue
end
if cached_config.settings.hide_disabled_ailments and not ailment.is_enable then
goto continue
end
if cached_config.settings.time_limit ~= 0 and
time.total_elapsed_script_seconds - ailment.last_change_time > cached_config.settings.time_limit and
not ailment.is_active then
goto continue
end
table.insert(displayed_ailments, ailment);
::continue::
end
if cached_config.sorting.type == "Normal" then
if cached_config.sorting.reversed_order then
table.sort(displayed_ailments, function(left, right)
return left.id > right.id;
end);
else
table.sort(displayed_ailments, function(left, right)
return left.id < right.id;
end);
end
elseif cached_config.sorting.type == "Buildup" then
if cached_config.sorting.reversed_order then
table.sort(displayed_ailments, function(left, right)
return left.total_buildup > right.total_buildup;
end);
else
table.sort(displayed_ailments, function(left, right)
return left.total_buildup < right.total_buildup;
end);
end
elseif cached_config.sorting.type == "Buildup Percentage" then
if cached_config.sorting.reversed_order then
table.sort(displayed_ailments, function(left, right)
return left.buildup_percentage > right.buildup_percentage;
end);
else
table.sort(displayed_ailments, function(left, right)
return left.buildup_percentage < right.buildup_percentage;
end);
end
end
for j, ailment in ipairs(displayed_ailments) do
local ailment_position_on_screen = {
x = ailments_position_on_screen.x + cached_config.spacing.x * (j - 1) * global_scale_modifier,
y = ailments_position_on_screen.y + cached_config.spacing.y * (j - 1) * global_scale_modifier;
}
ailment_UI_entity.draw_highlighted(ailment, monster.ailment_highlighted_UI, ailment_position_on_screen, opacity_scale);
end
end
function ailments.draw_small(monster, ailments_position_on_screen, opacity_scale)
local cached_config = config.current_config.small_monster_UI.ailments;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
--sort parts here
local displayed_ailments = {};
for id, ailment in pairs(monster.ailments) do
if id == ailments.paralyze_id then
if not cached_config.filter.paralysis then
goto continue
end
elseif id == ailments.sleep_id then
if not cached_config.filter.sleep then
goto continue
end
elseif id == ailments.stun_id then
if not cached_config.filter.stun then
goto continue
end
elseif id == ailments.flash_id then
if not cached_config.filter.flash then
goto continue
end
elseif id == ailments.poison_id then
if not cached_config.filter.poison then
goto continue
end
elseif id == ailments.blast_id then
if not cached_config.filter.blast then
goto continue
end
elseif id == ailments.exhaust_id then
if not cached_config.filter.exhaust then
goto continue
end
elseif id == ailments.ride_id then
if not cached_config.filter.ride then
goto continue
end
elseif id == ailments.water_id then
if not cached_config.filter.waterblight then
goto continue
end
elseif id == ailments.fire_id then
if not cached_config.filter.fireblight then
goto continue
end
elseif id == ailments.ice_id then
if not cached_config.filter.iceblight then
goto continue
end
elseif id == ailments.thunder_id then
if not cached_config.filter.thunderblight then
goto continue
end
elseif id == ailments.fall_trap_id then
if not cached_config.filter.fall_trap then
goto continue
end
elseif id == ailments.shock_trap_id then
if not cached_config.filter.shock_trap then
goto continue
end
elseif id == ailments.capture_id then
if not cached_config.filter.tranq_bomb then
goto continue
end
elseif id == ailments.koyashi_id then
if not cached_config.filter.dung_bomb then
goto continue
end
elseif id == ailments.steel_fang_id then
if not cached_config.filter.steel_fang then
goto continue
end
elseif id == ailments.fall_quick_sand_id then
if not cached_config.filter.quick_sand then
goto continue
end
elseif id == ailments.fall_otomo_trap_id then
if not cached_config.filter.fall_otomo_trap then
goto continue
end
elseif id == ailments.shock_otomo_trap_id then
if not cached_config.filter.shock_otomo_trap then
goto continue
end
else
goto continue
end
if cached_config.settings.hide_ailments_with_zero_buildup and ailment.total_buildup == 0 and
ailment.buildup_limit ~= 0
and ailment.activate_count == 0 and not ailment.is_active then
goto continue
end
if cached_config.settings.hide_inactive_ailments_with_no_buildup_support and ailment.buildup_limit == 0 and
not ailment.is_active then
goto continue
end
if cached_config.settings.hide_all_inactive_ailments and not ailment.is_active then
goto continue
end
if cached_config.settings.hide_all_active_ailments and ailment.is_active then
goto continue
end
if cached_config.settings.hide_disabled_ailments and not ailment.is_enable then
goto continue
end
if cached_config.settings.time_limit ~= 0 and
time.total_elapsed_script_seconds - ailment.last_change_time > cached_config.settings.time_limit and
not ailment.is_active then
goto continue
end
table.insert(displayed_ailments, ailment);
::continue::
ailment_UI_entity.draw(ailment, ailment_UI, cached_config, ailment_position_on_screen, opacity_scale);
end
if cached_config.sorting.type == "Normal" then
if cached_config.sorting.reversed_order then
table.sort(displayed_ailments, function(left, right)
if cached_config.settings.prioritize_active_ailments and left.is_active then return false; end
return left.id > right.id;
end);
else
table.sort(displayed_ailments, function(left, right)
if cached_config.settings.prioritize_active_ailments and left.is_active then return true; end
return left.id < right.id;
end);
end
elseif cached_config.sorting.type == "Buildup" then
if cached_config.sorting.reversed_order then
table.sort(displayed_ailments, function(left, right)
if cached_config.settings.prioritize_active_ailments and left.is_active then return false; end
return left.total_buildup > right.total_buildup;
end);
else
table.sort(displayed_ailments, function(left, right)
if cached_config.settings.prioritize_active_ailments and left.is_active then return true; end
return left.total_buildup < right.total_buildup;
end);
end
elseif cached_config.sorting.type == "Buildup Percentage" then
if cached_config.sorting.reversed_order then
table.sort(displayed_ailments, function(left, right)
if cached_config.settings.prioritize_active_ailments and left.is_active then return false; end
return left.buildup_percentage > right.buildup_percentage;
end);
else
table.sort(displayed_ailments, function(left, right)
if cached_config.settings.prioritize_active_ailments and left.is_active then return true; end
return left.buildup_percentage < right.buildup_percentage;
end);
end
end
for j, ailment in ipairs(displayed_ailments) do
local ailment_position_on_screen = {
x = ailments_position_on_screen.x + cached_config.spacing.x * (j - 1) * global_scale_modifier,
y = ailments_position_on_screen.y + cached_config.spacing.y * (j - 1) * global_scale_modifier;
}
ailment_UI_entity.draw_small(ailment, monster.ailment_UI, ailment_position_on_screen, opacity_scale);
end
end
function ailments.apply_ailment_buildup(monster, attacker_id, ailment_type, ailment_buildup)

View File

@@ -38,84 +38,9 @@ function body_part.new(id, name)
part.last_change_time = time.total_elapsed_script_seconds;
body_part.init_dynamic_UI(part);
body_part.init_static_UI(part);
body_part.init_highlighted_UI(part);
return part;
end
function body_part.init_dynamic_UI(part)
local cached_config = config.current_config.large_monster_UI.dynamic.body_parts;
part.body_part_dynamic_UI = body_part_UI_entity.new(
cached_config.visibility,
cached_config.part_name_label,
cached_config.part_health.visibility,
cached_config.part_health.bar,
cached_config.part_health.text_label,
cached_config.part_health.value_label,
cached_config.part_health.percentage_label,
cached_config.part_break.visibility,
cached_config.part_break.bar,
cached_config.part_break.text_label,
cached_config.part_break.value_label,
cached_config.part_break.percentage_label,
cached_config.part_loss.visibility,
cached_config.part_loss.bar,
cached_config.part_loss.text_label,
cached_config.part_loss.value_label,
cached_config.part_loss.percentage_label
);
end
function body_part.init_static_UI(part)
local cached_config = config.current_config.large_monster_UI.static.body_parts;
part.body_part_static_UI = body_part_UI_entity.new(
cached_config.visibility,
cached_config.part_name_label,
cached_config.part_health.visibility,
cached_config.part_health.bar,
cached_config.part_health.text_label,
cached_config.part_health.value_label,
cached_config.part_health.percentage_label,
cached_config.part_break.visibility,
cached_config.part_break.bar,
cached_config.part_break.text_label,
cached_config.part_break.value_label,
cached_config.part_break.percentage_label,
cached_config.part_loss.visibility,
cached_config.part_loss.bar,
cached_config.part_loss.text_label,
cached_config.part_loss.value_label,
cached_config.part_loss.percentage_label
);
end
function body_part.init_highlighted_UI(part)
local cached_config = config.current_config.large_monster_UI.highlighted.body_parts;
part.body_part_highlighted_UI = body_part_UI_entity.new(
cached_config.visibility,
cached_config.part_name_label,
cached_config.part_health.visibility,
cached_config.part_health.bar,
cached_config.part_health.text_label,
cached_config.part_health.value_label,
cached_config.part_health.percentage_label,
cached_config.part_break.visibility,
cached_config.part_break.bar,
cached_config.part_break.text_label,
cached_config.part_break.value_label,
cached_config.part_break.percentage_label,
cached_config.part_loss.visibility,
cached_config.part_loss.bar,
cached_config.part_loss.text_label,
cached_config.part_loss.value_label,
cached_config.part_loss.percentage_label
);
end
function body_part.update_flinch(part, part_current, part_max)
if part_current > part.health then
part.flinch_count = part.flinch_count + 1;
@@ -190,8 +115,8 @@ function body_part.update_loss(part, part_loss_current, part_loss_max, is_severe
end
function body_part.draw_dynamic(monster, parts_position_on_screen, opacity_scale)
local cached_config = config.current_config.large_monster_UI.dynamic.body_parts;
function body_part.draw(monster, part_UI, cached_config, parts_position_on_screen, opacity_scale)
local cached_config = cached_config.body_parts;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
local displayed_parts = {};
@@ -251,382 +176,9 @@ function body_part.draw_dynamic(monster, parts_position_on_screen, opacity_scale
goto continue
end
if (not part.body_part_dynamic_UI.flinch_visibility or not health_supported)
and
(not part.body_part_dynamic_UI.break_visibility or not break_supported or part.break_count >= part.break_max_count
)
and (not part.body_part_dynamic_UI.loss_visibility or not severe_supported or part.is_severed) then
goto continue
end
if cached_config.settings.time_limit ~= 0 and
time.total_elapsed_script_seconds - part.last_change_time > cached_config.settings.time_limit then
goto continue
end
table.insert(displayed_parts, part);
::continue::
end
if cached_config.sorting.type == "Normal" then
if cached_config.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.id > right.id;
end);
else
table.sort(displayed_parts, function(left, right)
return left.id < right.id;
end);
end
elseif cached_config.sorting.type == "Health" then
if cached_config.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.health > right.health;
end);
else
table.sort(displayed_parts, function(left, right)
return left.health < right.health;
end);
end
elseif cached_config.sorting.type == "Health Percentage" then
if cached_config.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.health_percentage > right.health_percentage;
end);
else
table.sort(displayed_parts, function(left, right)
return left.health_percentage < right.health_percentage;
end);
end
elseif cached_config.sorting.type == "Flinch Count" then
if cached_config.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.flinch_count > right.flinch_count;
end);
else
table.sort(displayed_parts, function(left, right)
return left.flinch_count < right.flinch_count;
end);
end
elseif cached_config.sorting.type == "Break Health" then
if cached_config.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.break_health > right.break_health;
end);
else
table.sort(displayed_parts, function(left, right)
return left.break_health < right.break_health;
end);
end
elseif cached_config.sorting.type == "Break Health Percentage" then
if cached_config.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.break_health_percentage > right.break_health_percentage;
end);
else
table.sort(displayed_parts, function(left, right)
return left.break_health_percentage < right.break_health_percentage;
end);
end
elseif cached_config.sorting.type == "Break Count" then
if cached_config.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.break_count > right.break_count;
end);
else
table.sort(displayed_parts, function(left, right)
return left.break_count < right.break_count;
end);
end
elseif cached_config.sorting.type == "Sever Health" then
if cached_config.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.loss_health > right.loss_health;
end);
else
table.sort(displayed_parts, function(left, right)
return left.loss_health < right.loss_health;
end);
end
elseif cached_config.sorting.type == "Sever Health Percentage" then
if cached_config.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.loss_health_percentage > right.loss_health_percentage;
end);
else
table.sort(displayed_parts, function(left, right)
return left.loss_health_percentage < right.loss_health_percentage;
end);
end
end
local last_part_position_on_screen;
for j, part in ipairs(displayed_parts) do
local part_position_on_screen = {
x = parts_position_on_screen.x + cached_config.spacing.x * (j - 1) * global_scale_modifier,
y = parts_position_on_screen.y + cached_config.spacing.y * (j - 1) * global_scale_modifier;
}
body_part_UI_entity.draw_dynamic(part, part_position_on_screen, opacity_scale);
last_part_position_on_screen = part_position_on_screen;
end
return last_part_position_on_screen;
end
function body_part.draw_static(monster, parts_position_on_screen, opacity_scale)
local cached_config = config.current_config.large_monster_UI.static.body_parts;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
local displayed_parts = {};
for REpart, part in pairs(monster.parts) do
local health_supported = part.max_health >= 0;
local break_supported = part.break_max_health >= 0;
local severe_supported = part.loss_max_health >= 0;
if health_supported then
if break_supported then
if severe_supported then
if not cached_config.filter.health_break_severe then
goto continue
end
else
if not cached_config.filter.health_break then
goto continue
end
end
else
if severe_supported then
if not cached_config.filter.health_severe then
goto continue
end
else
if not cached_config.filter.health then
goto continue
end
end
end
else
if break_supported then
if severe_supported then
if not cached_config.filter.break_severe then
goto continue
end
else
if not cached_config.filter.break_ then
goto continue
end
end
else
if severe_supported then
if not cached_config.filter.severe then
goto continue
end
else
goto continue
end
end
end
if cached_config.settings.hide_undamaged_parts
and ((part.health == part.max_health and part.flinch_count == 0) or not health_supported)
and ((part.break_health == part.break_max_health and part.break_count == 0) or not break_supported)
and ((part.loss_health == part.loss_max_health and not part.is_severed) or not severe_supported) then
goto continue
end
if (not part.body_part_static_UI.flinch_visibility or not health_supported)
and
(not part.body_part_static_UI.break_visibility or not break_supported or part.break_count >= part.break_max_count
)
and (not part.body_part_static_UI.loss_visibility or not severe_supported or part.is_severed) then
goto continue
end
if cached_config.settings.time_limit ~= 0 and
time.total_elapsed_script_seconds - part.last_change_time > cached_config.settings.time_limit then
goto continue
end
table.insert(displayed_parts, part);
::continue::
end
if cached_config.sorting.type == "Normal" then
if cached_config.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.id > right.id;
end);
else
table.sort(displayed_parts, function(left, right)
return left.id < right.id;
end);
end
elseif cached_config.sorting.type == "Health" then
if cached_config.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.health > right.health;
end);
else
table.sort(displayed_parts, function(left, right)
return left.health < right.health;
end);
end
elseif cached_config.sorting.type == "Health Percentage" then
if cached_config.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.health_percentage > right.health_percentage;
end);
else
table.sort(displayed_parts, function(left, right)
return left.health_percentage < right.health_percentage;
end);
end
elseif cached_config.sorting.type == "Flinch Count" then
if cached_config.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.flinch_count > right.flinch_count;
end);
else
table.sort(displayed_parts, function(left, right)
return left.flinch_count < right.flinch_count;
end);
end
elseif cached_config.sorting.type == "Break Health" then
if cached_config.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.break_health > right.break_health;
end);
else
table.sort(displayed_parts, function(left, right)
return left.break_health < right.break_health;
end);
end
elseif cached_config.sorting.type == "Break Health Percentage" then
if cached_config.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.break_health_percentage > right.break_health_percentage;
end);
else
table.sort(displayed_parts, function(left, right)
return left.break_health_percentage < right.break_health_percentage;
end);
end
elseif cached_config.sorting.type == "Break Count" then
if cached_config.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.break_count > right.break_count;
end);
else
table.sort(displayed_parts, function(left, right)
return left.break_count < right.break_count;
end);
end
elseif cached_config.sorting.type == "Sever Health" then
if cached_config.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.loss_health > right.loss_health;
end);
else
table.sort(displayed_parts, function(left, right)
return left.loss_health < right.loss_health;
end);
end
elseif cached_config.sorting.type == "Sever Health Percentage" then
if cached_config.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.loss_health_percentage > right.loss_health_percentage;
end);
else
table.sort(displayed_parts, function(left, right)
return left.loss_health_percentage < right.loss_health_percentage;
end);
end
end
local last_part_position_on_screen;
for j, part in ipairs(displayed_parts) do
local part_position_on_screen = {
x = parts_position_on_screen.x + cached_config.spacing.x * (j - 1) * global_scale_modifier,
y = parts_position_on_screen.y + cached_config.spacing.y * (j - 1) * global_scale_modifier;
}
body_part_UI_entity.draw_static(part, part_position_on_screen, opacity_scale);
last_part_position_on_screen = part_position_on_screen;
end
return last_part_position_on_screen;
end
function body_part.draw_highlighted(monster, parts_position_on_screen, opacity_scale)
local cached_config = config.current_config.large_monster_UI.highlighted.body_parts;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
local displayed_parts = {};
for REpart, part in pairs(monster.parts) do
local health_supported = part.max_health >= 0;
local break_supported = part.break_max_health >= 0;
local severe_supported = part.loss_max_health >= 0;
if health_supported then
if break_supported then
if severe_supported then
if not cached_config.filter.health_break_severe then
goto continue
end
else
if not cached_config.filter.health_break then
goto continue
end
end
else
if severe_supported then
if not cached_config.filter.health_severe then
goto continue
end
else
if not cached_config.filter.health then
goto continue
end
end
end
else
if break_supported then
if severe_supported then
if not cached_config.filter.break_severe then
goto continue
end
else
if not cached_config.filter.break_ then
goto continue
end
end
else
if severe_supported then
if not cached_config.filter.severe then
goto continue
end
else
goto continue
end
end
end
if cached_config.settings.hide_undamaged_parts
and ((part.health == part.max_health and part.flinch_count == 0) or not health_supported)
and ((part.break_health == part.break_max_health and part.break_count == 0) or not break_supported)
and ((part.loss_health == part.loss_max_health and not part.is_severed) or not severe_supported) then
goto continue
end
if (not part.body_part_highlighted_UI.flinch_visibility or not health_supported)
and (
not part.body_part_highlighted_UI.break_visibility or not break_supported or part.break_count >= part.break_max_count
)
and (not part.body_part_highlighted_UI.loss_visibility or not severe_supported or part.is_severed) then
if (not part_UI.flinch_visibility or not health_supported)
and (not part_UI.break_visibility or not break_supported or part.break_count >= part.break_max_count)
and (not part_UI.loss_visibility or not severe_supported or part.is_severed) then
goto continue
end
@@ -739,7 +291,7 @@ function body_part.draw_highlighted(monster, parts_position_on_screen, opacity_s
y = parts_position_on_screen.y + cached_config.spacing.y * (j - 1) * global_scale_modifier;
};
body_part_UI_entity.draw_highlighted(part, part_position_on_screen, opacity_scale);
body_part_UI_entity.draw(part, part_UI, cached_config, part_position_on_screen, opacity_scale);
last_part_position_on_screen = part_position_on_screen;
end

View File

@@ -9,6 +9,8 @@ local stamina_UI_entity;
local rage_UI_entity;
local ailment_UI_entity;
local ailment_buildup;
local ailment_buildup_UI_entity;
local body_part_UI_entity;
local screen;
local drawing;
local ailments;
@@ -83,10 +85,14 @@ function large_monster.new(enemy)
monster.rider_id = -1;
monster.dynamic_UI = {};
monster.static_UI = {};
monster.highlighted_UI = {};
large_monster.init(monster, enemy);
large_monster.init_static_UI(monster);
large_monster.init_dynamic_UI(monster);
large_monster.init_highlighted_UI(monster);
large_monster.init_UI(monster, monster.dynamic_UI, config.current_config.large_monster_UI.dynamic);
large_monster.init_UI(monster, monster.static_UI, config.current_config.large_monster_UI.static);
large_monster.init_UI(monster, monster.highlighted_UI, config.current_config.large_monster_UI.highlighted);
if large_monster.list[enemy] == nil then
large_monster.list[enemy] = monster;
@@ -190,13 +196,12 @@ function large_monster.init(monster, enemy)
end
end
function large_monster.init_dynamic_UI(monster)
local cached_config = config.current_config.large_monster_UI.dynamic;
function large_monster.init_UI(monster, monster_UI, cached_config)
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
monster.dynamic_name_label = table_helpers.deep_copy(cached_config.monster_name_label);
monster_UI.monster_name_label = table_helpers.deep_copy(cached_config.monster_name_label);
monster.health_dynamic_UI = health_UI_entity.new(
monster_UI.health_UI = health_UI_entity.new(
cached_config.health.visibility,
cached_config.health.bar,
cached_config.health.text_label,
@@ -204,18 +209,14 @@ function large_monster.init_dynamic_UI(monster)
cached_config.health.percentage_label
);
monster.health_dynamic_UI.bar.capture_line.offset.x = monster.health_dynamic_UI.bar.capture_line.offset.x *
global_scale_modifier;
monster.health_dynamic_UI.bar.capture_line.offset.y = monster.health_dynamic_UI.bar.capture_line.offset.y *
global_scale_modifier;
monster.health_dynamic_UI.bar.capture_line.size.width = monster.health_dynamic_UI.bar.capture_line.size.width *
global_scale_modifier;
monster.health_dynamic_UI.bar.capture_line.size.height = monster.health_dynamic_UI.bar.capture_line.size.height *
global_scale_modifier;
monster_UI.health_UI.bar.capture_line.offset.x = monster_UI.health_UI.bar.capture_line.offset.x * global_scale_modifier;
monster_UI.health_UI.bar.capture_line.offset.y = monster_UI.health_UI.bar.capture_line.offset.y * global_scale_modifier;
monster_UI.health_UI.bar.capture_line.size.width = monster_UI.health_UI.bar.capture_line.size.width * global_scale_modifier;
monster_UI.health_UI.bar.capture_line.size.height = monster_UI.health_UI.bar.capture_line.size.height * global_scale_modifier;
monster.health_dynamic_UI.bar.colors = cached_config.health.bar.normal_colors;
monster_UI.health_UI.bar.colors = monster_UI.health_UI.bar.normal_colors;
monster.stamina_dynamic_UI = stamina_UI_entity.new(
monster_UI.stamina_UI = stamina_UI_entity.new(
cached_config.stamina.visibility,
cached_config.stamina.bar,
cached_config.stamina.text_label,
@@ -224,7 +225,7 @@ function large_monster.init_dynamic_UI(monster)
cached_config.stamina.timer_label
);
monster.rage_dynamic_UI = rage_UI_entity.new(
monster_UI.rage_UI = rage_UI_entity.new(
cached_config.rage.visibility,
cached_config.rage.bar,
cached_config.rage.text_label,
@@ -233,11 +234,27 @@ function large_monster.init_dynamic_UI(monster)
cached_config.rage.timer_label
);
for REpart, part in pairs(monster.parts) do
body_part.init_dynamic_UI(part);
end
monster_UI.part_UI = body_part_UI_entity.new(
cached_config.body_parts.visibility,
cached_config.body_parts.part_name_label,
cached_config.body_parts.part_health.visibility,
cached_config.body_parts.part_health.bar,
cached_config.body_parts.part_health.text_label,
cached_config.body_parts.part_health.value_label,
cached_config.body_parts.part_health.percentage_label,
cached_config.body_parts.part_break.visibility,
cached_config.body_parts.part_break.bar,
cached_config.body_parts.part_break.text_label,
cached_config.body_parts.part_break.value_label,
cached_config.body_parts.part_break.percentage_label,
cached_config.body_parts.part_loss.visibility,
cached_config.body_parts.part_loss.bar,
cached_config.body_parts.part_loss.text_label,
cached_config.body_parts.part_loss.value_label,
cached_config.body_parts.part_loss.percentage_label
);
monster.ailment_dynamic_UI = ailment_UI_entity.new(
monster_UI.ailment_UI = ailment_UI_entity.new(
cached_config.ailments.visibility,
cached_config.ailments.bar,
cached_config.ailments.ailment_name_label,
@@ -247,130 +264,16 @@ function large_monster.init_dynamic_UI(monster)
cached_config.ailments.timer_label
);
ailments.init_ailment_buildup_dynamic_UI(monster.ailments);
end
function large_monster.init_static_UI(monster)
local cached_config = config.current_config.large_monster_UI.static;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
monster.static_name_label = table_helpers.deep_copy(cached_config.monster_name_label);
monster.static_name_label.offset.x = monster.static_name_label.offset.x * global_scale_modifier;
monster.static_name_label.offset.y = monster.static_name_label.offset.y * global_scale_modifier;
monster.health_static_UI = health_UI_entity.new(
cached_config.health.visibility,
cached_config.health.bar,
cached_config.health.text_label,
cached_config.health.value_label,
cached_config.health.percentage_label
monster_UI.ailment_buildup_UI = ailment_buildup_UI_entity.new(
cached_config.ailment_buildups.buildup_bar,
cached_config.ailment_buildups.highlighted_buildup_bar,
cached_config.ailment_buildups.ailment_name_label,
cached_config.ailment_buildups.player_name_label,
cached_config.ailment_buildups.buildup_value_label,
cached_config.ailment_buildups.buildup_percentage_label,
cached_config.ailment_buildups.total_buildup_label,
cached_config.ailment_buildups.total_buildup_value_label
);
monster.health_static_UI.bar.capture_line.offset.x = monster.health_static_UI.bar.capture_line.offset.x *
global_scale_modifier;
monster.health_static_UI.bar.capture_line.offset.y = monster.health_static_UI.bar.capture_line.offset.y *
global_scale_modifier;
monster.health_static_UI.bar.capture_line.size.width = monster.health_static_UI.bar.capture_line.size.width *
global_scale_modifier;
monster.health_static_UI.bar.capture_line.size.height = monster.health_static_UI.bar.capture_line.size.height *
global_scale_modifier;
monster.health_static_UI.bar.colors = cached_config.health.bar.normal_colors;
monster.stamina_static_UI = stamina_UI_entity.new(
cached_config.stamina.visibility,
cached_config.stamina.bar,
cached_config.stamina.text_label,
cached_config.stamina.value_label,
cached_config.stamina.percentage_label,
cached_config.stamina.timer_label
);
monster.rage_static_UI = rage_UI_entity.new(
cached_config.rage.visibility,
cached_config.rage.bar,
cached_config.rage.text_label,
cached_config.rage.value_label,
cached_config.rage.percentage_label,
cached_config.rage.timer_label
);
for REpart, part in pairs(monster.parts) do
body_part.init_static_UI(part);
end
monster.ailment_static_UI = ailment_UI_entity.new(
cached_config.ailments.visibility,
cached_config.ailments.bar,
cached_config.ailments.ailment_name_label,
cached_config.ailments.text_label,
cached_config.ailments.value_label,
cached_config.ailments.percentage_label,
cached_config.ailments.timer_label
);
ailments.init_ailment_buildup_static_UI(monster.ailments);
end
function large_monster.init_highlighted_UI(monster)
local cached_config = config.current_config.large_monster_UI.highlighted;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
monster.highlighted_name_label = table_helpers.deep_copy(cached_config.monster_name_label);
monster.health_highlighted_UI = health_UI_entity.new(
cached_config.health.visibility,
cached_config.health.bar,
cached_config.health.text_label,
cached_config.health.value_label,
cached_config.health.percentage_label
);
monster.health_highlighted_UI.bar.capture_line.offset.x = monster.health_highlighted_UI.bar.capture_line.offset.x *
global_scale_modifier;
monster.health_highlighted_UI.bar.capture_line.offset.y = monster.health_highlighted_UI.bar.capture_line.offset.y *
global_scale_modifier;
monster.health_highlighted_UI.bar.capture_line.size.width = monster.health_highlighted_UI.bar.capture_line.size.width *
global_scale_modifier;
monster.health_highlighted_UI.bar.capture_line.size.height = monster.health_highlighted_UI.bar.capture_line.size.height
* global_scale_modifier;
monster.health_highlighted_UI.bar.colors = cached_config.health.bar.normal_colors;
monster.stamina_highlighted_UI = stamina_UI_entity.new(
cached_config.stamina.visibility,
cached_config.stamina.bar,
cached_config.stamina.text_label,
cached_config.stamina.value_label,
cached_config.stamina.percentage_label,
cached_config.stamina.timer_label
);
monster.rage_highlighted_UI = rage_UI_entity.new(
cached_config.rage.visibility,
cached_config.rage.bar,
cached_config.rage.text_label,
cached_config.rage.value_label,
cached_config.rage.percentage_label,
cached_config.rage.timer_label
);
for REpart, part in pairs(monster.parts) do
body_part.init_highlighted_UI(part);
end
monster.ailment_highlighted_UI = ailment_UI_entity.new(
cached_config.ailments.visibility,
cached_config.ailments.bar,
cached_config.ailments.ailment_name_label,
cached_config.ailments.text_label,
cached_config.ailments.value_label,
cached_config.ailments.percentage_label,
cached_config.ailments.timer_label
);
ailments.init_ailment_buildup_highlighted_UI(monster.ailments);
end
local physical_param_field = enemy_character_base_type_def:get_field("<PhysicalParam>k__BackingField");
@@ -790,38 +693,48 @@ function large_monster.update_parts(enemy, monster, physical_param)
end
end
function large_monster.draw_dynamic(monster, position_on_screen, opacity_scale)
local cached_config = config.current_config.large_monster_UI.dynamic;
function large_monster.draw(monster, type, cached_config, position_on_screen, opacity_scale)
local monster_UI;
xy = 1;
if type == "dynamic" then
monster_UI = monster.dynamic_UI;
elseif type == "static" then
monster_UI = monster.static_UI;
else
monster_UI = monster.highlighted_UI;
end
xy = 2;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
xy = 2.01;
local monster_name_text = "";
if cached_config.monster_name_label.include.monster_name then
monster_name_text = string.format("%s ", monster.name);
end
xy = 2.02;
if cached_config.monster_name_label.include.monster_id then
monster_name_text = monster_name_text .. tostring(monster.id) .. " ";
end
xy = 2.03;
if cached_config.monster_name_label.include.crown and monster.crown ~= "" then
monster_name_text = monster_name_text .. string.format("%s ", monster.crown);
end
xy = 2.04;
if cached_config.monster_name_label.include.size then
monster_name_text = monster_name_text .. string.format("#%.0f ", 100 * monster.size);
end
xy = 2.05;
if cached_config.monster_name_label.include.scrown_thresholds then
monster_name_text = monster_name_text .. string.format("<=%.0f >=%.0f >=%.0f", 100 * monster.small_border,
100 * monster.big_border, 100 * monster.king_border);
end
xy = table_helpers.tostring(monster_UI);
if monster.health < monster.capture_health then
monster.health_dynamic_UI.bar.colors = cached_config.health.bar.capture_colors;
monster_UI.health_UI.bar.colors = monster_UI.health_UI.bar.capture_colors;
else
monster.health_dynamic_UI.bar.colors = cached_config.health.bar.normal_colors;
monster_UI.health_UI.bar.colors = monster_UI.health_UI.bar.normal_colors;
end
drawing.draw_label(monster.dynamic_name_label, position_on_screen, opacity_scale, monster_name_text);
xy = 2.1;
drawing.draw_label(monster_UI.monster_name_label, position_on_screen, opacity_scale, monster_name_text);
local health_position_on_screen = {
x = position_on_screen.x + cached_config.health.offset.x * global_scale_modifier,
@@ -853,106 +766,13 @@ function large_monster.draw_dynamic(monster, position_on_screen, opacity_scale)
y = position_on_screen.y + cached_config.ailment_buildups.offset.y * global_scale_modifier
};
health_UI_entity.draw(monster, monster.health_dynamic_UI, health_position_on_screen, opacity_scale);
drawing.draw_capture_line(monster.health_dynamic_UI, health_position_on_screen, opacity_scale,
monster.capture_percentage);
health_UI_entity.draw(monster, monster_UI.health_UI, health_position_on_screen, opacity_scale);
drawing.draw_capture_line(monster_UI.health_UI, health_position_on_screen, opacity_scale, monster.capture_percentage);
stamina_UI_entity.draw(monster, monster_UI.stamina_UI, stamina_position_on_screen, opacity_scale);
rage_UI_entity.draw(monster, monster_UI.rage_UI, rage_position_on_screen, opacity_scale);
stamina_UI_entity.draw(monster, monster.stamina_dynamic_UI, stamina_position_on_screen, opacity_scale);
rage_UI_entity.draw(monster, monster.rage_dynamic_UI, rage_position_on_screen, opacity_scale);
local last_part_position_on_screen = body_part.draw_dynamic(monster,
parts_position_on_screen
, opacity_scale);
if cached_config.ailments.settings.offset_is_relative_to_parts then
if last_part_position_on_screen ~= nil then
ailments_position_on_screen = {
x = last_part_position_on_screen.x +
config.current_config.large_monster_UI.highlighted.ailments.relative_offset.x * global_scale_modifier,
y = last_part_position_on_screen.y +
config.current_config.large_monster_UI.highlighted.ailments.relative_offset.y * global_scale_modifier
};
end
end
ailments.draw_dynamic(monster, ailments_position_on_screen, opacity_scale);
ailment_buildup.draw_dynamic(monster, ailment_buildups_position_on_screen, opacity_scale);
end
function large_monster.draw_static(monster, position_on_screen, opacity_scale)
local cached_config = config.current_config.large_monster_UI.static;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
local monster_name_text = "";
if cached_config.monster_name_label.include.monster_name then
monster_name_text = string.format("%s ", monster.name);
end
if cached_config.monster_name_label.include.monster_id then
monster_name_text = monster_name_text .. tostring(monster.id) .. " ";
end
if cached_config.monster_name_label.include.crown and monster.crown ~= "" then
monster_name_text = monster_name_text .. string.format("%s ", monster.crown);
end
if cached_config.monster_name_label.include.size then
monster_name_text = monster_name_text .. string.format("#%.0f ", 100 * monster.size);
end
if cached_config.monster_name_label.include.scrown_thresholds then
monster_name_text = monster_name_text .. string.format("<=%.0f >=%.0f >=%.0f", 100 * monster.small_border,
100 * monster.big_border, 100 * monster.king_border);
end
if monster.health < monster.capture_health then
monster.health_static_UI.bar.colors = cached_config.health.bar.capture_colors;
else
monster.health_static_UI.bar.colors = cached_config.health.bar.normal_colors;
end
drawing.draw_label(monster.static_name_label, position_on_screen, opacity_scale, monster_name_text);
local health_position_on_screen = {
x = position_on_screen.x + cached_config.health.offset.x * global_scale_modifier,
y = position_on_screen.y + cached_config.health.offset.y * global_scale_modifier
};
local stamina_position_on_screen = {
x = position_on_screen.x + cached_config.stamina.offset.x * global_scale_modifier,
y = position_on_screen.y + cached_config.stamina.offset.y * global_scale_modifier
};
local rage_position_on_screen = {
x = position_on_screen.x + cached_config.rage.offset.x * global_scale_modifier,
y = position_on_screen.y + cached_config.rage.offset.y * global_scale_modifier
};
local parts_position_on_screen = {
x = position_on_screen.x + cached_config.body_parts.offset.x * global_scale_modifier,
y = position_on_screen.y + cached_config.body_parts.offset.y * global_scale_modifier
};
local ailments_position_on_screen = {
x = position_on_screen.x + cached_config.ailments.offset.x * global_scale_modifier,
y = position_on_screen.y + cached_config.ailments.offset.y * global_scale_modifier
};
local ailment_buildups_position_on_screen = {
x = position_on_screen.x + cached_config.ailment_buildups.offset.x * global_scale_modifier,
y = position_on_screen.y + cached_config.ailment_buildups.offset.y * global_scale_modifier
};
health_UI_entity.draw(monster, monster.health_static_UI, health_position_on_screen, opacity_scale);
drawing.draw_capture_line(monster.health_static_UI, health_position_on_screen, opacity_scale, monster.capture_percentage);
stamina_UI_entity.draw(monster, monster.stamina_static_UI, stamina_position_on_screen, opacity_scale);
rage_UI_entity.draw(monster, monster.rage_static_UI, rage_position_on_screen, opacity_scale);
local last_part_position_on_screen = body_part.draw_static(monster,
parts_position_on_screen
, opacity_scale);
local last_part_position_on_screen = body_part.draw(monster, monster_UI.part_UI, cached_config, parts_position_on_screen, opacity_scale);
if cached_config.ailments.settings.offset_is_relative_to_parts then
if last_part_position_on_screen ~= nil then
@@ -963,95 +783,8 @@ function large_monster.draw_static(monster, position_on_screen, opacity_scale)
end
end
ailments.draw_static(monster, ailments_position_on_screen, opacity_scale);
ailment_buildup.draw_static(monster, ailment_buildups_position_on_screen, opacity_scale);
end
function large_monster.draw_highlighted(monster, position_on_screen, opacity_scale)
local cached_config = config.current_config.large_monster_UI.highlighted;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
local monster_name_text = "";
if cached_config.monster_name_label.include.monster_name then
monster_name_text = string.format("%s ", monster.name);
end
if cached_config.monster_name_label.include.monster_id then
monster_name_text = monster_name_text .. tostring(monster.id) .. " ";
end
if cached_config.monster_name_label.include.crown and monster.crown ~= "" then
monster_name_text = monster_name_text .. string.format("%s ", monster.crown);
end
if cached_config.monster_name_label.include.size then
monster_name_text = monster_name_text .. string.format("#%.0f ", 100 * monster.size);
end
if cached_config.monster_name_label.include.scrown_thresholds then
monster_name_text = monster_name_text .. string.format("<=%.0f >=%.0f >=%.0f", 100 * monster.small_border,
100 * monster.big_border, 100 * monster.king_border);
end
if monster.health < monster.capture_health then
monster.health_highlighted_UI.bar.colors = cached_config.health.bar.capture_colors;
else
monster.health_highlighted_UI.bar.colors = cached_config.health.bar.normal_colors;
end
drawing.draw_label(monster.highlighted_name_label, position_on_screen, opacity_scale, monster_name_text);
local health_position_on_screen = {
x = position_on_screen.x + cached_config.health.offset.x * global_scale_modifier,
y = position_on_screen.y + cached_config.health.offset.y * global_scale_modifier
};
local stamina_position_on_screen = {
x = position_on_screen.x + cached_config.stamina.offset.x * global_scale_modifier,
y = position_on_screen.y + cached_config.stamina.offset.y * global_scale_modifier
};
local rage_position_on_screen = {
x = position_on_screen.x + cached_config.rage.offset.x * global_scale_modifier,
y = position_on_screen.y + cached_config.rage.offset.y * global_scale_modifier
};
local parts_position_on_screen = {
x = position_on_screen.x + cached_config.body_parts.offset.x * global_scale_modifier,
y = position_on_screen.y + cached_config.body_parts.offset.y * global_scale_modifier
};
local ailments_position_on_screen = {
x = position_on_screen.x + cached_config.ailments.offset.x * global_scale_modifier,
y = position_on_screen.y + cached_config.ailments.offset.y * global_scale_modifier
};
local ailment_buildups_position_on_screen = {
x = position_on_screen.x + cached_config.ailment_buildups.offset.x * global_scale_modifier,
y = position_on_screen.y + cached_config.ailment_buildups.offset.y * global_scale_modifier
};
health_UI_entity.draw(monster, monster.health_highlighted_UI, health_position_on_screen, opacity_scale);
drawing.draw_capture_line(monster.health_highlighted_UI, health_position_on_screen, opacity_scale,
monster.capture_percentage);
stamina_UI_entity.draw(monster, monster.stamina_highlighted_UI, stamina_position_on_screen, opacity_scale);
rage_UI_entity.draw(monster, monster.rage_highlighted_UI, rage_position_on_screen, opacity_scale);
local last_part_position_on_screen = body_part.draw_highlighted(monster,
parts_position_on_screen
, opacity_scale);
if cached_config.ailments.settings.offset_is_relative_to_parts then
if last_part_position_on_screen ~= nil then
ailments_position_on_screen = {
x = last_part_position_on_screen.x + cached_config.ailments.relative_offset.x * global_scale_modifier,
y = last_part_position_on_screen.y + cached_config.ailments.relative_offset.y * global_scale_modifier
};
end
end
ailments.draw_highlighted(monster, ailments_position_on_screen, opacity_scale);
ailment_buildup.draw_highlighted(monster, ailment_buildups_position_on_screen, opacity_scale);
ailments.draw(monster, monster_UI.ailment_UI, cached_config, ailments_position_on_screen, opacity_scale);
ailment_buildup.draw(monster, monster_UI.ailment_buildup_UI, cached_config, ailment_buildups_position_on_screen, opacity_scale);
end
function large_monster.init_list()
@@ -1069,6 +802,8 @@ function large_monster.init_module()
stamina_UI_entity = require("MHR_Overlay.UI.UI_Entities.stamina_UI_entity");
rage_UI_entity = require("MHR_Overlay.UI.UI_Entities.rage_UI_entity");
ailment_UI_entity = require("MHR_Overlay.UI.UI_Entities.ailment_UI_entity");
ailment_buildup_UI_entity = require("MHR_Overlay.UI.UI_Entities.ailment_buildup_UI_entity");
body_part_UI_entity = require("MHR_Overlay.UI.UI_Entities.body_part_UI_entity");
screen = require("MHR_Overlay.Game_Handler.screen");
drawing = require("MHR_Overlay.UI.drawing");

View File

@@ -10,6 +10,7 @@ local drawing;
local ailments;
local ailment_UI_entity;
local ailment_buildup;
local ailment_buildup_UI_entity;
small_monster.list = {};
@@ -27,9 +28,11 @@ function small_monster.new(enemy)
monster.distance = 0;
monster.name = "Small Monster";
monster.ailments = ailments.init_ailments();
monster.UI = {};
small_monster.init(monster, enemy);
small_monster.init_UI(monster);
@@ -78,12 +81,14 @@ function small_monster.init_UI(monster)
local cached_config = config.current_config.small_monster_UI;
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
monster.name_label = table_helpers.deep_copy(cached_config.monster_name_label);
local monster_UI = monster.UI;
monster.name_label.offset.x = monster.name_label.offset.x * global_scale_modifier;
monster.name_label.offset.y = monster.name_label.offset.y * global_scale_modifier;
monster_UI.name_label = table_helpers.deep_copy(cached_config.monster_name_label);
monster_UI.name_label.offset.x = monster_UI.name_label.offset.x * global_scale_modifier;
monster_UI.name_label.offset.y = monster_UI.name_label.offset.y * global_scale_modifier;
monster.health_UI = health_UI_entity.new(
monster_UI.health_UI = health_UI_entity.new(
cached_config.health.visibility,
cached_config.health.bar,
cached_config.health.text_label,
@@ -91,17 +96,26 @@ function small_monster.init_UI(monster)
cached_config.health.percentage_label
);
monster.ailment_UI = ailment_UI_entity.new(
monster_UI.ailment_UI = ailment_UI_entity.new(
cached_config.ailments.visibility,
cached_config.ailments.bar,
cached_config.ailments.ailment_name_label,
cached_config.ailments.text_label,
cached_config.ailments.value_label,
cached_config.ailments.percentage_label,
cached_config.ailments.percentage_label,
cached_config.ailments.timer_label
);
ailments.init_ailment_buildup_small_UI(monster.ailments);
monster_UI.ailment_buildup_UI = ailment_buildup_UI_entity.new(
cached_config.ailment_buildups.buildup_bar,
cached_config.ailment_buildups.highlighted_buildup_bar,
cached_config.ailment_buildups.ailment_name_label,
cached_config.ailment_buildups.player_name_label,
cached_config.ailment_buildups.buildup_value_label,
cached_config.ailment_buildups.buildup_percentage_label,
cached_config.ailment_buildups.total_buildup_label,
cached_config.ailment_buildups.total_buildup_value_label
);
end
local physical_param_field = enemy_character_base_type_def:get_field("<PhysicalParam>k__BackingField");
@@ -171,11 +185,10 @@ function small_monster.update_health(enemy, monster)
end
end
function small_monster.draw(monster, position_on_screen, opacity_scale)
local cached_config = config.current_config.small_monster_UI;
function small_monster.draw(monster, cached_config, position_on_screen, opacity_scale)
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
drawing.draw_label(monster.name_label, position_on_screen, opacity_scale, monster.name);
drawing.draw_label(monster.UI.name_label, position_on_screen, opacity_scale, monster.name);
local health_position_on_screen = {
x = position_on_screen.x + cached_config.health.offset.x * global_scale_modifier,
@@ -192,9 +205,9 @@ function small_monster.draw(monster, position_on_screen, opacity_scale)
y = position_on_screen.y + cached_config.ailment_buildups.offset.y * global_scale_modifier
};
health_UI_entity.draw(monster, monster.health_UI, health_position_on_screen, opacity_scale);
ailments.draw_small(monster, ailments_position_on_screen, opacity_scale);
ailment_buildup.draw_small(monster, ailment_buildups_position_on_screen, opacity_scale);
health_UI_entity.draw(monster, monster.UI.health_UI, health_position_on_screen, opacity_scale);
ailments.draw(monster, monster.UI.ailment_UI, cached_config, ailments_position_on_screen, opacity_scale);
ailment_buildup.draw(monster, monster.UI.ailment_buildup_UI, cached_config, ailment_buildups_position_on_screen, opacity_scale);
end
function small_monster.init_list()
@@ -213,6 +226,7 @@ function small_monster.init_module()
ailments = require("MHR_Overlay.Monsters.ailments");
ailment_UI_entity = require("MHR_Overlay.UI.UI_Entities.ailment_UI_entity");
ailment_buildup = require("MHR_Overlay.Monsters.ailment_buildup");
ailment_buildup_UI_entity = require("MHR_Overlay.UI.UI_Entities.ailment_buildup_UI_entity");
end
return small_monster;