Add option to filter parts based on current state

This commit is contained in:
GreenComfyTea
2023-03-06 13:48:55 +02:00
parent 6a4f4a9dfe
commit c2531b77a2
11 changed files with 75 additions and 21 deletions

View File

@@ -1260,6 +1260,7 @@ function config.init_default()
},
settings = {
filter_mode = "Current State",
hide_undamaged_parts = true,
time_limit = 15
},
@@ -2444,6 +2445,7 @@ function config.init_default()
},
settings = {
filter_mode = "Current State",
hide_undamaged_parts = true,
time_limit = 15
},
@@ -3615,6 +3617,7 @@ function config.init_default()
},
settings = {
filter_mode = "Current State",
hide_undamaged_parts = true,
time_limit = 15
},

View File

@@ -496,7 +496,11 @@ language.default_language = {
hide_timer_for_infinite_buffs = "Hide Timer for infinite Buffs",
current_value = "Current Value",
max_value = "Max Value"
max_value = "Max Value",
filter_mode = "Filter Mode",
current_state = "Current State",
default_state = "Default State"
}
};

View File

@@ -155,6 +155,16 @@ function body_part.draw(monster, part_UI, cached_config, parts_position_on_scree
local break_supported = part.break_max_health > 0;
local severe_supported = part.loss_max_health > 0;
if cached_config.settings.filter_mode == "Current State" then
if break_supported and part.break_count >= part.break_max_count then
break_supported = false;
end
if severe_supported and part.is_severed then
severe_supported = false;
end
end
if health_supported then
if break_supported then
if severe_supported then

View File

@@ -87,6 +87,16 @@ function body_parts_customization.draw(cached_config)
config_changed = config_changed or changed;
changed, index = imgui.combo(language.current_language.customization_menu.filter_mode,
table_helpers.find_index(customization_menu.large_monster_UI_parts_filter_types, cached_config.settings.filter_mode),
customization_menu.displayed_large_monster_UI_parts_filter_types);
config_changed = config_changed or changed;
if changed then
cached_config.settings.filter_mode = customization_menu.large_monster_UI_parts_filter_types[index];
end
changed, cached_config.settings.time_limit = imgui.drag_float(
language.current_language.customization_menu.time_limit, cached_config.settings.time_limit, 0.1, 0, 99999, "%.1f");
@@ -99,7 +109,7 @@ function body_parts_customization.draw(cached_config)
changed, index = imgui.combo(
language.current_language.customization_menu.type,
table_helpers.find_index(customization_menu.large_monster_UI_parts_sorting_types, cached_config.sorting.type),
customization_menu.displayed_monster_UI_parts_sorting_types);
customization_menu.displayed_large_monster_UI_parts_sorting_types);
config_changed = config_changed or changed;

View File

@@ -75,7 +75,8 @@ customization_menu.displayed_anchor_types = {};
customization_menu.displayed_outline_styles = {};
customization_menu.displayed_monster_UI_sorting_types = {};
customization_menu.displayed_monster_UI_parts_sorting_types = {};
customization_menu.displayed_large_monster_UI_parts_sorting_types = {};
customization_menu.displayed_large_monster_UI_parts_filter_types = {};
customization_menu.displayed_ailments_sorting_types = {};
customization_menu.displayed_ailment_buildups_sorting_types = {};
customization_menu.displayed_highlighted_buildup_bar_types = {};
@@ -96,6 +97,8 @@ customization_menu.anchor_types = {};
customization_menu.outline_styles = {};
customization_menu.monster_UI_sorting_types = {};
customization_menu.large_monster_UI_parts_sorting_types = {};
customization_menu.large_monster_UI_parts_filter_types = {};
customization_menu.ailments_sorting_types = {};
customization_menu.ailment_buildups_sorting_types = {};
customization_menu.highlighted_buildup_bar_types = {};
@@ -188,25 +191,31 @@ function customization_menu.init()
default.health_percentage,
default.distance};
customization_menu.displayed_monster_UI_parts_sorting_types = { current.normal,
current.health,
current.health_percentage,
current.flinch_count,
current.break_health,
current.break_health_percentage,
current.break_count,
current.loss_health,
current.loss_health_percentage};
customization_menu.displayed_large_monster_UI_parts_sorting_types = { current.normal,
current.health,
current.health_percentage,
current.flinch_count,
current.break_health,
current.break_health_percentage,
current.break_count,
current.loss_health,
current.loss_health_percentage};
customization_menu.large_monster_UI_parts_sorting_types = { default.normal,
default.health,
default.health_percentage,
default.flinch_count,
default.break_health,
default.break_health_percentage,
default.break_count,
default.loss_health,
default.loss_health_percentage};
customization_menu.large_monster_UI_parts_sorting_types = { default.normal,
default.health,
default.health_percentage,
default.flinch_count,
default.break_health,
default.break_health_percentage,
default.break_count,
default.loss_health,
default.loss_health_percentage};
customization_menu.displayed_large_monster_UI_parts_filter_types = { current.current_state,
current.default_state};
customization_menu.large_monster_UI_parts_filter_types = { default.current_state,
default.default_state};
customization_menu.displayed_ailments_sorting_types = { current.normal,
current.buildup,

View File

@@ -83,6 +83,7 @@
"creature_name_label": "Creature Name Label",
"crown": "Crown",
"crown_thresholds": "Crown Thresholds",
"current_state": "Current State",
"current_value": "Current Value",
"cutscene": "Cutscene",
"damage": "Damage",
@@ -91,6 +92,7 @@
"damage_meter_UI": "Damage Meter UI",
"damage_percentage_label": "Damage Percentage Label",
"damage_value_label": "Damage Value Label",
"default_state": "Default State",
"delete": "Delete",
"distance": "Distance",
"dps": "DPS",
@@ -108,6 +110,7 @@
"farthest": "Farthest",
"fight_time": "Fight Time",
"filter": "Filter",
"filter_mode": "Filter Mode",
"first": "First",
"first_hit": "First Hit",
"flinch_count": "Flinch Count",

View File

@@ -83,6 +83,7 @@
"creature_name_label": "モンスターの名前ラベル",
"crown": "王冠",
"crown_thresholds": "王冠の閾値",
"current_state": "Current State",
"current_value": "Current Value",
"cutscene": "Cutscene",
"damage": "ダメージ",
@@ -91,6 +92,7 @@
"damage_meter_UI": "ダメージメーターUI",
"damage_percentage_label": "ダメージ割合()ラベル",
"damage_value_label": "ダメージラベル",
"default_state": "Default State",
"delete": "Delete",
"distance": "距離",
"dps": "DPS",
@@ -108,6 +110,7 @@
"farthest": "Farthest",
"fight_time": "戦闘時間",
"filter": "フィルター",
"filter_mode": "Filter Mode",
"first": "最初",
"first_hit": "初撃",
"flinch_count": "ひるみ回数",

View File

@@ -83,6 +83,7 @@
"creature_name_label": "환경생물 이름 정보",
"crown": "금관",
"crown_thresholds": "금관 판정값",
"current_state": "Current State",
"current_value": "Current Value",
"cutscene": "컷신",
"damage": "대미지",
@@ -91,6 +92,7 @@
"damage_meter_UI": "대미지 미터 UI",
"damage_percentage_label": "대미지 비율 정보",
"damage_value_label": "대미지 값 정보",
"default_state": "Default State",
"delete": "삭제하기",
"distance": "간격",
"dps": "DPS",
@@ -108,6 +110,7 @@
"farthest": "가장 멀리있는",
"fight_time": "전투 시간",
"filter": "필터",
"filter_mode": "Filter Mode",
"first": "맨 앞",
"first_hit": "첫 공격",
"flinch_count": "경직 횟수",

View File

@@ -83,6 +83,7 @@
"creature_name_label": "Метка имени существа",
"crown": "Корона",
"crown_thresholds": "Лимиты корон",
"current_state": "Current State",
"current_value": "Current Value",
"cutscene": "Катсцена",
"damage": "Урон",
@@ -91,6 +92,7 @@
"damage_meter_UI": "Интерфейс модуля урона",
"damage_percentage_label": "Метка урона в процентах",
"damage_value_label": "Метка значений урона",
"default_state": "Default State",
"delete": "Удалить",
"distance": "Расстояние",
"dps": "Урон в секунду",
@@ -108,6 +110,7 @@
"farthest": "Самый дальний",
"fight_time": "Время в бою",
"filter": "Фильтр",
"filter_mode": "Filter Mode",
"first": "Первый",
"first_hit": "Первый удар",
"flinch_count": "Кол-во вздрагиваний",

View File

@@ -83,6 +83,7 @@
"creature_name_label": "生物名标签",
"crown": "皇冠",
"crown_thresholds": "皇冠阈值",
"current_state": "Current State",
"current_value": "Current Value",
"cutscene": "Cutscene",
"damage": "伤害",
@@ -91,6 +92,7 @@
"damage_meter_UI": "伤害统计UI",
"damage_percentage_label": "伤害百分比标签",
"damage_value_label": "伤害量标签",
"default_state": "Default State",
"delete": "Delete",
"distance": "距离",
"dps": "DPS",
@@ -108,6 +110,7 @@
"farthest": "Farthest",
"fight_time": "战斗时间",
"filter": "筛选器",
"filter_mode": "Filter Mode",
"first": "第一",
"first_hit": "第一击",
"flinch_count": "胆怯次数",

View File

@@ -83,6 +83,7 @@
"creature_name_label": "環境生物名稱",
"crown": "皇冠",
"crown_thresholds": "皇冠的大小判定範圍",
"current_state": "Current State",
"current_value": "Current Value",
"cutscene": "Cutscene",
"damage": "傷害",
@@ -91,6 +92,7 @@
"damage_meter_UI": "傷害量計算 UI",
"damage_percentage_label": "傷害量百分比",
"damage_value_label": "傷害量",
"default_state": "Default State",
"delete": "Delete",
"distance": "距離",
"dps": "DPS",
@@ -108,6 +110,7 @@
"farthest": "最遠的",
"fight_time": "戰鬥時間",
"filter": "篩選器",
"filter_mode": "Filter Mode",
"first": "第一",
"first_hit": "第一擊",
"flinch_count": "膽怯次數",