Fix Parts config incompatibility.

This commit is contained in:
GreenComfyTea
2022-06-17 14:38:12 +03:00
parent 1a95634ec2
commit 91dc3a493f
5 changed files with 895 additions and 895 deletions

View File

@@ -3048,7 +3048,7 @@ function config.init()
}
},
parts = {
body_parts = {
visibility = true,
offset = {

View File

@@ -47,67 +47,67 @@ end
function body_part.init_dynamic_UI(part)
part.body_part_dynamic_UI = body_part_UI_entity.new(
config.current_config.large_monster_UI.dynamic.parts.visibility,
config.current_config.large_monster_UI.dynamic.parts.part_name_label,
config.current_config.large_monster_UI.dynamic.parts.part_health.visibility,
config.current_config.large_monster_UI.dynamic.parts.part_health.bar,
config.current_config.large_monster_UI.dynamic.parts.part_health.text_label,
config.current_config.large_monster_UI.dynamic.parts.part_health.value_label,
config.current_config.large_monster_UI.dynamic.parts.part_health.percentage_label,
config.current_config.large_monster_UI.dynamic.parts.part_break.visibility,
config.current_config.large_monster_UI.dynamic.parts.part_break.bar,
config.current_config.large_monster_UI.dynamic.parts.part_break.text_label,
config.current_config.large_monster_UI.dynamic.parts.part_break.value_label,
config.current_config.large_monster_UI.dynamic.parts.part_break.percentage_label,
config.current_config.large_monster_UI.dynamic.parts.part_loss.visibility,
config.current_config.large_monster_UI.dynamic.parts.part_loss.bar,
config.current_config.large_monster_UI.dynamic.parts.part_loss.text_label,
config.current_config.large_monster_UI.dynamic.parts.part_loss.value_label,
config.current_config.large_monster_UI.dynamic.parts.part_loss.percentage_label
config.current_config.large_monster_UI.dynamic.body_parts.visibility,
config.current_config.large_monster_UI.dynamic.body_parts.part_name_label,
config.current_config.large_monster_UI.dynamic.body_parts.part_health.visibility,
config.current_config.large_monster_UI.dynamic.body_parts.part_health.bar,
config.current_config.large_monster_UI.dynamic.body_parts.part_health.text_label,
config.current_config.large_monster_UI.dynamic.body_parts.part_health.value_label,
config.current_config.large_monster_UI.dynamic.body_parts.part_health.percentage_label,
config.current_config.large_monster_UI.dynamic.body_parts.part_break.visibility,
config.current_config.large_monster_UI.dynamic.body_parts.part_break.bar,
config.current_config.large_monster_UI.dynamic.body_parts.part_break.text_label,
config.current_config.large_monster_UI.dynamic.body_parts.part_break.value_label,
config.current_config.large_monster_UI.dynamic.body_parts.part_break.percentage_label,
config.current_config.large_monster_UI.dynamic.body_parts.part_loss.visibility,
config.current_config.large_monster_UI.dynamic.body_parts.part_loss.bar,
config.current_config.large_monster_UI.dynamic.body_parts.part_loss.text_label,
config.current_config.large_monster_UI.dynamic.body_parts.part_loss.value_label,
config.current_config.large_monster_UI.dynamic.body_parts.part_loss.percentage_label
);
end
function body_part.init_static_UI(part)
part.body_part_static_UI = body_part_UI_entity.new(
config.current_config.large_monster_UI.static.parts.visibility,
config.current_config.large_monster_UI.static.parts.part_name_label,
config.current_config.large_monster_UI.static.parts.part_health.visibility,
config.current_config.large_monster_UI.static.parts.part_health.bar,
config.current_config.large_monster_UI.static.parts.part_health.text_label,
config.current_config.large_monster_UI.static.parts.part_health.value_label,
config.current_config.large_monster_UI.static.parts.part_health.percentage_label,
config.current_config.large_monster_UI.static.parts.part_break.visibility,
config.current_config.large_monster_UI.static.parts.part_break.bar,
config.current_config.large_monster_UI.static.parts.part_break.text_label,
config.current_config.large_monster_UI.static.parts.part_break.value_label,
config.current_config.large_monster_UI.static.parts.part_break.percentage_label,
config.current_config.large_monster_UI.static.parts.part_loss.visibility,
config.current_config.large_monster_UI.static.parts.part_loss.bar,
config.current_config.large_monster_UI.static.parts.part_loss.text_label,
config.current_config.large_monster_UI.static.parts.part_loss.value_label,
config.current_config.large_monster_UI.static.parts.part_loss.percentage_label
config.current_config.large_monster_UI.static.body_parts.visibility,
config.current_config.large_monster_UI.static.body_parts.part_name_label,
config.current_config.large_monster_UI.static.body_parts.part_health.visibility,
config.current_config.large_monster_UI.static.body_parts.part_health.bar,
config.current_config.large_monster_UI.static.body_parts.part_health.text_label,
config.current_config.large_monster_UI.static.body_parts.part_health.value_label,
config.current_config.large_monster_UI.static.body_parts.part_health.percentage_label,
config.current_config.large_monster_UI.static.body_parts.part_break.visibility,
config.current_config.large_monster_UI.static.body_parts.part_break.bar,
config.current_config.large_monster_UI.static.body_parts.part_break.text_label,
config.current_config.large_monster_UI.static.body_parts.part_break.value_label,
config.current_config.large_monster_UI.static.body_parts.part_break.percentage_label,
config.current_config.large_monster_UI.static.body_parts.part_loss.visibility,
config.current_config.large_monster_UI.static.body_parts.part_loss.bar,
config.current_config.large_monster_UI.static.body_parts.part_loss.text_label,
config.current_config.large_monster_UI.static.body_parts.part_loss.value_label,
config.current_config.large_monster_UI.static.body_parts.part_loss.percentage_label
);
end
function body_part.init_highlighted_UI(part)
part.body_part_highlighted_UI = body_part_UI_entity.new(
config.current_config.large_monster_UI.highlighted.parts.visibility,
config.current_config.large_monster_UI.highlighted.parts.part_name_label,
config.current_config.large_monster_UI.highlighted.parts.part_health.visibility,
config.current_config.large_monster_UI.highlighted.parts.part_health.bar,
config.current_config.large_monster_UI.highlighted.parts.part_health.text_label,
config.current_config.large_monster_UI.highlighted.parts.part_health.value_label,
config.current_config.large_monster_UI.highlighted.parts.part_health.percentage_label,
config.current_config.large_monster_UI.highlighted.parts.part_break.visibility,
config.current_config.large_monster_UI.highlighted.parts.part_break.bar,
config.current_config.large_monster_UI.highlighted.parts.part_break.text_label,
config.current_config.large_monster_UI.highlighted.parts.part_break.value_label,
config.current_config.large_monster_UI.highlighted.parts.part_break.percentage_label,
config.current_config.large_monster_UI.highlighted.parts.part_loss.visibility,
config.current_config.large_monster_UI.highlighted.parts.part_loss.bar,
config.current_config.large_monster_UI.highlighted.parts.part_loss.text_label,
config.current_config.large_monster_UI.highlighted.parts.part_loss.value_label,
config.current_config.large_monster_UI.highlighted.parts.part_loss.percentage_label
config.current_config.large_monster_UI.highlighted.body_parts.visibility,
config.current_config.large_monster_UI.highlighted.body_parts.part_name_label,
config.current_config.large_monster_UI.highlighted.body_parts.part_health.visibility,
config.current_config.large_monster_UI.highlighted.body_parts.part_health.bar,
config.current_config.large_monster_UI.highlighted.body_parts.part_health.text_label,
config.current_config.large_monster_UI.highlighted.body_parts.part_health.value_label,
config.current_config.large_monster_UI.highlighted.body_parts.part_health.percentage_label,
config.current_config.large_monster_UI.highlighted.body_parts.part_break.visibility,
config.current_config.large_monster_UI.highlighted.body_parts.part_break.bar,
config.current_config.large_monster_UI.highlighted.body_parts.part_break.text_label,
config.current_config.large_monster_UI.highlighted.body_parts.part_break.value_label,
config.current_config.large_monster_UI.highlighted.body_parts.part_break.percentage_label,
config.current_config.large_monster_UI.highlighted.body_parts.part_loss.visibility,
config.current_config.large_monster_UI.highlighted.body_parts.part_loss.bar,
config.current_config.large_monster_UI.highlighted.body_parts.part_loss.text_label,
config.current_config.large_monster_UI.highlighted.body_parts.part_loss.value_label,
config.current_config.large_monster_UI.highlighted.body_parts.part_loss.percentage_label
);
end
@@ -178,7 +178,7 @@ end
function body_part.draw_dynamic(monster, parts_position_on_screen, opacity_scale)
local displayed_parts = {};
for REpart, part in pairs(monster.parts) do
if config.current_config.large_monster_UI.dynamic.parts.settings.hide_undamaged_parts
if config.current_config.large_monster_UI.dynamic.body_parts.settings.hide_undamaged_parts
and part.health == part.max_health and part.flinch_count == 0
and ((part.break_health == part.break_max_health and part.break_count == 0) or part.break_max_health < 0)
and ((part.loss_health == part.loss_max_health and not part.is_severed) or part.loss_max_health < 0) then
@@ -191,7 +191,7 @@ function body_part.draw_dynamic(monster, parts_position_on_screen, opacity_scale
goto continue;
end
if config.current_config.large_monster_UI.dynamic.parts.settings.time_limit ~= 0 and time.total_elapsed_seconds - part.last_change_time > config.current_config.large_monster_UI.dynamic.parts.settings.time_limit then
if config.current_config.large_monster_UI.dynamic.body_parts.settings.time_limit ~= 0 and time.total_elapsed_seconds - part.last_change_time > config.current_config.large_monster_UI.dynamic.body_parts.settings.time_limit then
goto continue;
end
@@ -199,8 +199,8 @@ function body_part.draw_dynamic(monster, parts_position_on_screen, opacity_scale
::continue::
end
if config.current_config.large_monster_UI.dynamic.parts.sorting.type == "Normal" then
if config.current_config.large_monster_UI.dynamic.parts.sorting.reversed_order then
if config.current_config.large_monster_UI.dynamic.body_parts.sorting.type == "Normal" then
if config.current_config.large_monster_UI.dynamic.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.id > right.id;
end);
@@ -209,8 +209,8 @@ function body_part.draw_dynamic(monster, parts_position_on_screen, opacity_scale
return left.id < right.id;
end);
end
elseif config.current_config.large_monster_UI.dynamic.parts.sorting.type == "Health" then
if config.current_config.large_monster_UI.dynamic.parts.sorting.reversed_order then
elseif config.current_config.large_monster_UI.dynamic.body_parts.sorting.type == "Health" then
if config.current_config.large_monster_UI.dynamic.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.health > right.health;
end);
@@ -219,8 +219,8 @@ function body_part.draw_dynamic(monster, parts_position_on_screen, opacity_scale
return left.health < right.health;
end);
end
elseif config.current_config.large_monster_UI.dynamic.parts.sorting.type == "Health Percentage" then
if config.current_config.large_monster_UI.dynamic.parts.sorting.reversed_order then
elseif config.current_config.large_monster_UI.dynamic.body_parts.sorting.type == "Health Percentage" then
if config.current_config.large_monster_UI.dynamic.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.health_percentage > right.health_percentage;
end);
@@ -229,8 +229,8 @@ function body_part.draw_dynamic(monster, parts_position_on_screen, opacity_scale
return left.health_percentage < right.health_percentage;
end);
end
elseif config.current_config.large_monster_UI.dynamic.parts.sorting.type == "Flinch Count" then
if config.current_config.large_monster_UI.dynamic.parts.sorting.reversed_order then
elseif config.current_config.large_monster_UI.dynamic.body_parts.sorting.type == "Flinch Count" then
if config.current_config.large_monster_UI.dynamic.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.flinch_count > right.flinch_count;
end);
@@ -239,8 +239,8 @@ function body_part.draw_dynamic(monster, parts_position_on_screen, opacity_scale
return left.flinch_count < right.flinch_count;
end);
end
elseif config.current_config.large_monster_UI.dynamic.parts.sorting.type == "Break Health" then
if config.current_config.large_monster_UI.dynamic.parts.sorting.reversed_order then
elseif config.current_config.large_monster_UI.dynamic.body_parts.sorting.type == "Break Health" then
if config.current_config.large_monster_UI.dynamic.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.break_health > right.break_health;
end);
@@ -249,8 +249,8 @@ function body_part.draw_dynamic(monster, parts_position_on_screen, opacity_scale
return left.break_health < right.break_health;
end);
end
elseif config.current_config.large_monster_UI.dynamic.parts.sorting.type == "Break Health Percentage" then
if config.current_config.large_monster_UI.dynamic.parts.sorting.reversed_order then
elseif config.current_config.large_monster_UI.dynamic.body_parts.sorting.type == "Break Health Percentage" then
if config.current_config.large_monster_UI.dynamic.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.break_health_percentage > right.break_health_percentage;
end);
@@ -259,8 +259,8 @@ function body_part.draw_dynamic(monster, parts_position_on_screen, opacity_scale
return left.break_health_percentage < right.break_health_percentage;
end);
end
elseif config.current_config.large_monster_UI.dynamic.parts.sorting.type == "Break Count" then
if config.current_config.large_monster_UI.dynamic.parts.sorting.reversed_order then
elseif config.current_config.large_monster_UI.dynamic.body_parts.sorting.type == "Break Count" then
if config.current_config.large_monster_UI.dynamic.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.break_count > right.break_count;
end);
@@ -269,8 +269,8 @@ function body_part.draw_dynamic(monster, parts_position_on_screen, opacity_scale
return left.break_count < right.break_count;
end);
end
elseif config.current_config.large_monster_UI.dynamic.parts.sorting.type == "Sever Health" then
if config.current_config.large_monster_UI.dynamic.parts.sorting.reversed_order then
elseif config.current_config.large_monster_UI.dynamic.body_parts.sorting.type == "Sever Health" then
if config.current_config.large_monster_UI.dynamic.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.loss_health > right.loss_health;
end);
@@ -279,8 +279,8 @@ function body_part.draw_dynamic(monster, parts_position_on_screen, opacity_scale
return left.loss_health < right.loss_health;
end);
end
elseif config.current_config.large_monster_UI.dynamic.parts.sorting.type == "Sever Health Percentage" then
if config.current_config.large_monster_UI.dynamic.parts.sorting.reversed_order then
elseif config.current_config.large_monster_UI.dynamic.body_parts.sorting.type == "Sever Health Percentage" then
if config.current_config.large_monster_UI.dynamic.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.loss_health_percentage > right.loss_health_percentage;
end);
@@ -295,8 +295,8 @@ function body_part.draw_dynamic(monster, parts_position_on_screen, opacity_scale
for j, part in ipairs(displayed_parts) do
local part_position_on_screen = {
x = parts_position_on_screen.x + config.current_config.large_monster_UI.dynamic.parts.spacing.x * (j - 1) * config.current_config.global_settings.modifiers.global_scale_modifier,
y = parts_position_on_screen.y + config.current_config.large_monster_UI.dynamic.parts.spacing.y * (j - 1) * config.current_config.global_settings.modifiers.global_scale_modifier;
x = parts_position_on_screen.x + config.current_config.large_monster_UI.dynamic.body_parts.spacing.x * (j - 1) * config.current_config.global_settings.modifiers.global_scale_modifier,
y = parts_position_on_screen.y + config.current_config.large_monster_UI.dynamic.body_parts.spacing.y * (j - 1) * config.current_config.global_settings.modifiers.global_scale_modifier;
}
body_part_UI_entity.draw_dynamic(part, part_position_on_screen, opacity_scale);
@@ -310,7 +310,7 @@ function body_part.draw_static(monster, parts_position_on_screen, opacity_scale)
local displayed_parts = {};
for REpart, part in pairs(monster.parts) do
if config.current_config.large_monster_UI.static.parts.settings.hide_undamaged_parts
if config.current_config.large_monster_UI.static.body_parts.settings.hide_undamaged_parts
and part.health == part.max_health and part.flinch_count == 0
and ((part.break_health == part.break_max_health and part.break_count == 0) or part.break_max_health < 0)
and ((part.loss_health == part.loss_max_health and not part.is_severed) or part.loss_max_health < 0) then
@@ -323,7 +323,7 @@ function body_part.draw_static(monster, parts_position_on_screen, opacity_scale)
goto continue;
end
if config.current_config.large_monster_UI.static.parts.settings.time_limit ~= 0 and time.total_elapsed_seconds - part.last_change_time > config.current_config.large_monster_UI.static.parts.settings.time_limit then
if config.current_config.large_monster_UI.static.body_parts.settings.time_limit ~= 0 and time.total_elapsed_seconds - part.last_change_time > config.current_config.large_monster_UI.static.body_parts.settings.time_limit then
goto continue;
end
@@ -331,8 +331,8 @@ function body_part.draw_static(monster, parts_position_on_screen, opacity_scale)
::continue::
end
if config.current_config.large_monster_UI.static.parts.sorting.type == "Normal" then
if config.current_config.large_monster_UI.static.parts.sorting.reversed_order then
if config.current_config.large_monster_UI.static.body_parts.sorting.type == "Normal" then
if config.current_config.large_monster_UI.static.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.id > right.id;
end);
@@ -341,8 +341,8 @@ function body_part.draw_static(monster, parts_position_on_screen, opacity_scale)
return left.id < right.id;
end);
end
elseif config.current_config.large_monster_UI.static.parts.sorting.type == "Health" then
if config.current_config.large_monster_UI.static.parts.sorting.reversed_order then
elseif config.current_config.large_monster_UI.static.body_parts.sorting.type == "Health" then
if config.current_config.large_monster_UI.static.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.health > right.health;
end);
@@ -351,8 +351,8 @@ function body_part.draw_static(monster, parts_position_on_screen, opacity_scale)
return left.health < right.health;
end);
end
elseif config.current_config.large_monster_UI.static.parts.sorting.type == "Health Percentage" then
if config.current_config.large_monster_UI.static.parts.sorting.reversed_order then
elseif config.current_config.large_monster_UI.static.body_parts.sorting.type == "Health Percentage" then
if config.current_config.large_monster_UI.static.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.health_percentage > right.health_percentage;
end);
@@ -361,8 +361,8 @@ function body_part.draw_static(monster, parts_position_on_screen, opacity_scale)
return left.health_percentage < right.health_percentage;
end);
end
elseif config.current_config.large_monster_UI.static.parts.sorting.type == "Flinch Count" then
if config.current_config.large_monster_UI.static.parts.sorting.reversed_order then
elseif config.current_config.large_monster_UI.static.body_parts.sorting.type == "Flinch Count" then
if config.current_config.large_monster_UI.static.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.flinch_count > right.flinch_count;
end);
@@ -371,8 +371,8 @@ function body_part.draw_static(monster, parts_position_on_screen, opacity_scale)
return left.flinch_count < right.flinch_count;
end);
end
elseif config.current_config.large_monster_UI.static.parts.sorting.type == "Break Health" then
if config.current_config.large_monster_UI.static.parts.sorting.reversed_order then
elseif config.current_config.large_monster_UI.static.body_parts.sorting.type == "Break Health" then
if config.current_config.large_monster_UI.static.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.break_health > right.break_health;
end);
@@ -381,8 +381,8 @@ function body_part.draw_static(monster, parts_position_on_screen, opacity_scale)
return left.break_health < right.break_health;
end);
end
elseif config.current_config.large_monster_UI.static.parts.sorting.type == "Break Health Percentage" then
if config.current_config.large_monster_UI.static.parts.sorting.reversed_order then
elseif config.current_config.large_monster_UI.static.body_parts.sorting.type == "Break Health Percentage" then
if config.current_config.large_monster_UI.static.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.break_health_percentage > right.break_health_percentage;
end);
@@ -391,8 +391,8 @@ function body_part.draw_static(monster, parts_position_on_screen, opacity_scale)
return left.break_health_percentage < right.break_health_percentage;
end);
end
elseif config.current_config.large_monster_UI.static.parts.sorting.type == "Break Count" then
if config.current_config.large_monster_UI.static.parts.sorting.reversed_order then
elseif config.current_config.large_monster_UI.static.body_parts.sorting.type == "Break Count" then
if config.current_config.large_monster_UI.static.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.break_count > right.break_count;
end);
@@ -401,8 +401,8 @@ function body_part.draw_static(monster, parts_position_on_screen, opacity_scale)
return left.break_count < right.break_count;
end);
end
elseif config.current_config.large_monster_UI.static.parts.sorting.type == "Sever Health" then
if config.current_config.large_monster_UI.static.parts.sorting.reversed_order then
elseif config.current_config.large_monster_UI.static.body_parts.sorting.type == "Sever Health" then
if config.current_config.large_monster_UI.static.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.loss_health > right.loss_health;
end);
@@ -411,8 +411,8 @@ function body_part.draw_static(monster, parts_position_on_screen, opacity_scale)
return left.loss_health < right.loss_health;
end);
end
elseif config.current_config.large_monster_UI.static.parts.sorting.type == "Sever Health Percentage" then
if config.current_config.large_monster_UI.static.parts.sorting.reversed_order then
elseif config.current_config.large_monster_UI.static.body_parts.sorting.type == "Sever Health Percentage" then
if config.current_config.large_monster_UI.static.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.loss_health_percentage > right.loss_health_percentage;
end);
@@ -427,8 +427,8 @@ function body_part.draw_static(monster, parts_position_on_screen, opacity_scale)
for j, part in ipairs(displayed_parts) do
local part_position_on_screen = {
x = parts_position_on_screen.x + config.current_config.large_monster_UI.static.parts.spacing.x * (j - 1) * config.current_config.global_settings.modifiers.global_scale_modifier,
y = parts_position_on_screen.y + config.current_config.large_monster_UI.static.parts.spacing.y * (j - 1) * config.current_config.global_settings.modifiers.global_scale_modifier;
x = parts_position_on_screen.x + config.current_config.large_monster_UI.static.body_parts.spacing.x * (j - 1) * config.current_config.global_settings.modifiers.global_scale_modifier,
y = parts_position_on_screen.y + config.current_config.large_monster_UI.static.body_parts.spacing.y * (j - 1) * config.current_config.global_settings.modifiers.global_scale_modifier;
}
body_part_UI_entity.draw_static(part, part_position_on_screen, opacity_scale);
@@ -441,7 +441,7 @@ end
function body_part.draw_highlighted(monster, parts_position_on_screen, opacity_scale)
local displayed_parts = {};
for REpart, part in pairs(monster.parts) do
if config.current_config.large_monster_UI.highlighted.parts.settings.hide_undamaged_parts
if config.current_config.large_monster_UI.highlighted.body_parts.settings.hide_undamaged_parts
and part.health == part.max_health and part.flinch_count == 0
and ((part.break_health == part.break_max_health and part.break_count == 0) or part.break_max_health < 0)
and ((part.loss_health == part.loss_max_health and not part.is_severed) or part.loss_max_health < 0) then
@@ -454,7 +454,7 @@ function body_part.draw_highlighted(monster, parts_position_on_screen, opacity_s
goto continue;
end
if config.current_config.large_monster_UI.highlighted.parts.settings.time_limit ~= 0 and time.total_elapsed_seconds - part.last_change_time > config.current_config.large_monster_UI.highlighted.parts.settings.time_limit then
if config.current_config.large_monster_UI.highlighted.body_parts.settings.time_limit ~= 0 and time.total_elapsed_seconds - part.last_change_time > config.current_config.large_monster_UI.highlighted.body_parts.settings.time_limit then
goto continue;
end
@@ -462,8 +462,8 @@ function body_part.draw_highlighted(monster, parts_position_on_screen, opacity_s
::continue::
end
if config.current_config.large_monster_UI.highlighted.parts.sorting.type == "Normal" then
if config.current_config.large_monster_UI.highlighted.parts.sorting.reversed_order then
if config.current_config.large_monster_UI.highlighted.body_parts.sorting.type == "Normal" then
if config.current_config.large_monster_UI.highlighted.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.id > right.id;
end);
@@ -472,8 +472,8 @@ function body_part.draw_highlighted(monster, parts_position_on_screen, opacity_s
return left.id < right.id;
end);
end
elseif config.current_config.large_monster_UI.highlighted.parts.sorting.type == "Health" then
if config.current_config.large_monster_UI.highlighted.parts.sorting.reversed_order then
elseif config.current_config.large_monster_UI.highlighted.body_parts.sorting.type == "Health" then
if config.current_config.large_monster_UI.highlighted.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.health > right.health;
end);
@@ -482,8 +482,8 @@ function body_part.draw_highlighted(monster, parts_position_on_screen, opacity_s
return left.health < right.health;
end);
end
elseif config.current_config.large_monster_UI.highlighted.parts.sorting.type == "Health Percentage" then
if config.current_config.large_monster_UI.highlighted.parts.sorting.reversed_order then
elseif config.current_config.large_monster_UI.highlighted.body_parts.sorting.type == "Health Percentage" then
if config.current_config.large_monster_UI.highlighted.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.health_percentage > right.health_percentage;
end);
@@ -492,8 +492,8 @@ function body_part.draw_highlighted(monster, parts_position_on_screen, opacity_s
return left.health_percentage < right.health_percentage;
end);
end
elseif config.current_config.large_monster_UI.highlighted.parts.sorting.type == "Flinch Count" then
if config.current_config.large_monster_UI.highlighted.parts.sorting.reversed_order then
elseif config.current_config.large_monster_UI.highlighted.body_parts.sorting.type == "Flinch Count" then
if config.current_config.large_monster_UI.highlighted.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.flinch_count > right.flinch_count;
end);
@@ -502,8 +502,8 @@ function body_part.draw_highlighted(monster, parts_position_on_screen, opacity_s
return left.flinch_count < right.flinch_count;
end);
end
elseif config.current_config.large_monster_UI.highlighted.parts.sorting.type == "Break Health" then
if config.current_config.large_monster_UI.highlighted.parts.sorting.reversed_order then
elseif config.current_config.large_monster_UI.highlighted.body_parts.sorting.type == "Break Health" then
if config.current_config.large_monster_UI.highlighted.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.break_health > right.break_health;
end);
@@ -512,8 +512,8 @@ function body_part.draw_highlighted(monster, parts_position_on_screen, opacity_s
return left.break_health < right.break_health;
end);
end
elseif config.current_config.large_monster_UI.highlighted.parts.sorting.type == "Break Health Percentage" then
if config.current_config.large_monster_UI.highlighted.parts.sorting.reversed_order then
elseif config.current_config.large_monster_UI.highlighted.body_parts.sorting.type == "Break Health Percentage" then
if config.current_config.large_monster_UI.highlighted.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.break_health_percentage > right.break_health_percentage;
end);
@@ -522,8 +522,8 @@ function body_part.draw_highlighted(monster, parts_position_on_screen, opacity_s
return left.break_health_percentage < right.break_health_percentage;
end);
end
elseif config.current_config.large_monster_UI.highlighted.parts.sorting.type == "Break Count" then
if config.current_config.large_monster_UI.highlighted.parts.sorting.reversed_order then
elseif config.current_config.large_monster_UI.highlighted.body_parts.sorting.type == "Break Count" then
if config.current_config.large_monster_UI.highlighted.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.break_count > right.break_count;
end);
@@ -532,8 +532,8 @@ function body_part.draw_highlighted(monster, parts_position_on_screen, opacity_s
return left.break_count < right.break_count;
end);
end
elseif config.current_config.large_monster_UI.highlighted.parts.sorting.type == "Sever Health" then
if config.current_config.large_monster_UI.highlighted.parts.sorting.reversed_order then
elseif config.current_config.large_monster_UI.highlighted.body_parts.sorting.type == "Sever Health" then
if config.current_config.large_monster_UI.highlighted.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.loss_health > right.loss_health;
end);
@@ -542,8 +542,8 @@ function body_part.draw_highlighted(monster, parts_position_on_screen, opacity_s
return left.loss_health < right.loss_health;
end);
end
elseif config.current_config.large_monster_UI.highlighted.parts.sorting.type == "Sever Health Percentage" then
if config.current_config.large_monster_UI.highlighted.parts.sorting.reversed_order then
elseif config.current_config.large_monster_UI.highlighted.body_parts.sorting.type == "Sever Health Percentage" then
if config.current_config.large_monster_UI.highlighted.body_parts.sorting.reversed_order then
table.sort(displayed_parts, function(left, right)
return left.loss_health_percentage > right.loss_health_percentage;
end);
@@ -558,8 +558,8 @@ function body_part.draw_highlighted(monster, parts_position_on_screen, opacity_s
for j, part in ipairs(displayed_parts) do
local part_position_on_screen = {
x = parts_position_on_screen.x + config.current_config.large_monster_UI.highlighted.parts.spacing.x * (j - 1) * config.current_config.global_settings.modifiers.global_scale_modifier,
y = parts_position_on_screen.y + config.current_config.large_monster_UI.highlighted.parts.spacing.y * (j - 1) * config.current_config.global_settings.modifiers.global_scale_modifier;
x = parts_position_on_screen.x + config.current_config.large_monster_UI.highlighted.body_parts.spacing.x * (j - 1) * config.current_config.global_settings.modifiers.global_scale_modifier,
y = parts_position_on_screen.y + config.current_config.large_monster_UI.highlighted.body_parts.spacing.y * (j - 1) * config.current_config.global_settings.modifiers.global_scale_modifier;
};
body_part_UI_entity.draw_highlighted(part, part_position_on_screen, opacity_scale);

View File

@@ -722,8 +722,8 @@ function large_monster.draw_dynamic(monster, position_on_screen, opacity_scale)
};
local parts_position_on_screen = {
x = position_on_screen.x + config.current_config.large_monster_UI.dynamic.parts.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier,
y = position_on_screen.y + config.current_config.large_monster_UI.dynamic.parts.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier
x = position_on_screen.x + config.current_config.large_monster_UI.dynamic.body_parts.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier,
y = position_on_screen.y + config.current_config.large_monster_UI.dynamic.body_parts.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier
};
local ailments_position_on_screen = {
@@ -800,8 +800,8 @@ function large_monster.draw_static(monster, position_on_screen, opacity_scale)
};
local parts_position_on_screen = {
x = position_on_screen.x + config.current_config.large_monster_UI.static.parts.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier,
y = position_on_screen.y + config.current_config.large_monster_UI.static.parts.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier
x = position_on_screen.x + config.current_config.large_monster_UI.static.body_parts.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier,
y = position_on_screen.y + config.current_config.large_monster_UI.static.body_parts.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier
};
local ailments_position_on_screen = {
@@ -878,8 +878,8 @@ function large_monster.draw_highlighted(monster, position_on_screen, opacity_sca
};
local parts_position_on_screen = {
x = position_on_screen.x + config.current_config.large_monster_UI.highlighted.parts.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier,
y = position_on_screen.y + config.current_config.large_monster_UI.highlighted.parts.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier
x = position_on_screen.x + config.current_config.large_monster_UI.highlighted.body_parts.offset.x * config.current_config.global_settings.modifiers.global_scale_modifier,
y = position_on_screen.y + config.current_config.large_monster_UI.highlighted.body_parts.offset.y * config.current_config.global_settings.modifiers.global_scale_modifier
};
local ailments_position_on_screen = {

View File

@@ -85,22 +85,22 @@ function body_part_UI_entity.draw_dynamic(part, position_on_screen, opacity_scal
end
local part_name = "";
if config.current_config.large_monster_UI.dynamic.parts.part_name_label.include.part_name then
if config.current_config.large_monster_UI.dynamic.body_parts.part_name_label.include.part_name then
part_name = part.name .. " ";
end
if config.current_config.large_monster_UI.dynamic.parts.part_name_label.include.flinch_count and part.flinch_count ~= 0 then
if config.current_config.large_monster_UI.dynamic.body_parts.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.parts.part_name_label.include.break_count then
if config.current_config.large_monster_UI.dynamic.parts.part_name_label.include.break_max_count 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
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.parts.part_name_label.include.break_max_count then
elseif config.current_config.large_monster_UI.dynamic.body_parts.part_name_label.include.break_max_count then
part_name = part_name .. "/" .. tostring(part.break_max_count);
end
end
@@ -110,20 +110,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.parts.part_health.offset.x,
y = position_on_screen.y + config.current_config.large_monster_UI.dynamic.parts.part_health.offset.y,
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,
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.parts.part_break.offset.x,
y = position_on_screen.y + config.current_config.large_monster_UI.dynamic.parts.part_break.offset.y,
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,
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.parts.part_loss.offset.x,
y = position_on_screen.y + config.current_config.large_monster_UI.dynamic.parts.part_loss.offset.y,
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,
};
@@ -167,22 +167,22 @@ function body_part_UI_entity.draw_static(part, position_on_screen, opacity_scale
end
local part_name = "";
if config.current_config.large_monster_UI.static.parts.part_name_label.include.part_name then
if config.current_config.large_monster_UI.static.body_parts.part_name_label.include.part_name then
part_name = part.name .. " ";
end
if config.current_config.large_monster_UI.static.parts.part_name_label.include.flinch_count and part.flinch_count ~= 0 then
if config.current_config.large_monster_UI.static.body_parts.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.parts.part_name_label.include.break_count then
if config.current_config.large_monster_UI.static.parts.part_name_label.include.break_max_count 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
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.parts.part_name_label.include.break_max_count then
elseif config.current_config.large_monster_UI.static.body_parts.part_name_label.include.break_max_count then
part_name = part_name .. "/" .. tostring(part.break_max_count);
end
end
@@ -192,20 +192,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.parts.part_health.offset.x,
y = position_on_screen.y + config.current_config.large_monster_UI.static.parts.part_health.offset.y,
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,
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.parts.part_break.offset.x,
y = position_on_screen.y + config.current_config.large_monster_UI.static.parts.part_break.offset.y,
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,
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.parts.part_loss.offset.x,
y = position_on_screen.y + config.current_config.large_monster_UI.static.parts.part_loss.offset.y,
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,
};
@@ -249,22 +249,22 @@ function body_part_UI_entity.draw_highlighted(part, position_on_screen, opacity_
end
local part_name = "";
if config.current_config.large_monster_UI.highlighted.parts.part_name_label.include.part_name then
if config.current_config.large_monster_UI.highlighted.body_parts.part_name_label.include.part_name then
part_name = part.name .. " ";
end
if config.current_config.large_monster_UI.highlighted.parts.part_name_label.include.flinch_count and part.flinch_count ~= 0 then
if config.current_config.large_monster_UI.highlighted.body_parts.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.parts.part_name_label.include.break_count then
if config.current_config.large_monster_UI.highlighted.parts.part_name_label.include.break_max_count 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
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.parts.part_name_label.include.break_max_count then
elseif config.current_config.large_monster_UI.highlighted.body_parts.part_name_label.include.break_max_count then
part_name = part_name .. "/" .. tostring(part.break_max_count);
end
end
@@ -274,20 +274,20 @@ 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.parts.part_health.offset.x,
y = position_on_screen.y + config.current_config.large_monster_UI.highlighted.parts.part_health.offset.y,
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,
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.parts.part_break.offset.x,
y = position_on_screen.y + config.current_config.large_monster_UI.highlighted.parts.part_break.offset.y,
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,
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.parts.part_loss.offset.x,
y = position_on_screen.y + config.current_config.large_monster_UI.highlighted.parts.part_loss.offset.y,
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,
};

File diff suppressed because it is too large Load Diff