mirror of
https://github.com/GreenComfyTea/MHR-Overlay.git
synced 2026-01-24 04:18:11 -08:00
Add option to filter parts based on current state
This commit is contained in:
@@ -1260,6 +1260,7 @@ function config.init_default()
|
|||||||
},
|
},
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
|
filter_mode = "Current State",
|
||||||
hide_undamaged_parts = true,
|
hide_undamaged_parts = true,
|
||||||
time_limit = 15
|
time_limit = 15
|
||||||
},
|
},
|
||||||
@@ -2444,6 +2445,7 @@ function config.init_default()
|
|||||||
},
|
},
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
|
filter_mode = "Current State",
|
||||||
hide_undamaged_parts = true,
|
hide_undamaged_parts = true,
|
||||||
time_limit = 15
|
time_limit = 15
|
||||||
},
|
},
|
||||||
@@ -3615,6 +3617,7 @@ function config.init_default()
|
|||||||
},
|
},
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
|
filter_mode = "Current State",
|
||||||
hide_undamaged_parts = true,
|
hide_undamaged_parts = true,
|
||||||
time_limit = 15
|
time_limit = 15
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -496,7 +496,11 @@ language.default_language = {
|
|||||||
hide_timer_for_infinite_buffs = "Hide Timer for infinite Buffs",
|
hide_timer_for_infinite_buffs = "Hide Timer for infinite Buffs",
|
||||||
|
|
||||||
current_value = "Current Value",
|
current_value = "Current Value",
|
||||||
max_value = "Max Value"
|
max_value = "Max Value",
|
||||||
|
|
||||||
|
filter_mode = "Filter Mode",
|
||||||
|
current_state = "Current State",
|
||||||
|
default_state = "Default State"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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 break_supported = part.break_max_health > 0;
|
||||||
local severe_supported = part.loss_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 health_supported then
|
||||||
if break_supported then
|
if break_supported then
|
||||||
if severe_supported then
|
if severe_supported then
|
||||||
|
|||||||
@@ -87,6 +87,16 @@ function body_parts_customization.draw(cached_config)
|
|||||||
|
|
||||||
config_changed = config_changed or changed;
|
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(
|
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");
|
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(
|
changed, index = imgui.combo(
|
||||||
language.current_language.customization_menu.type,
|
language.current_language.customization_menu.type,
|
||||||
table_helpers.find_index(customization_menu.large_monster_UI_parts_sorting_types, cached_config.sorting.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;
|
config_changed = config_changed or changed;
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,8 @@ customization_menu.displayed_anchor_types = {};
|
|||||||
customization_menu.displayed_outline_styles = {};
|
customization_menu.displayed_outline_styles = {};
|
||||||
|
|
||||||
customization_menu.displayed_monster_UI_sorting_types = {};
|
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_ailments_sorting_types = {};
|
||||||
customization_menu.displayed_ailment_buildups_sorting_types = {};
|
customization_menu.displayed_ailment_buildups_sorting_types = {};
|
||||||
customization_menu.displayed_highlighted_buildup_bar_types = {};
|
customization_menu.displayed_highlighted_buildup_bar_types = {};
|
||||||
@@ -96,6 +97,8 @@ customization_menu.anchor_types = {};
|
|||||||
customization_menu.outline_styles = {};
|
customization_menu.outline_styles = {};
|
||||||
|
|
||||||
customization_menu.monster_UI_sorting_types = {};
|
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.ailments_sorting_types = {};
|
||||||
customization_menu.ailment_buildups_sorting_types = {};
|
customization_menu.ailment_buildups_sorting_types = {};
|
||||||
customization_menu.highlighted_buildup_bar_types = {};
|
customization_menu.highlighted_buildup_bar_types = {};
|
||||||
@@ -188,25 +191,31 @@ function customization_menu.init()
|
|||||||
default.health_percentage,
|
default.health_percentage,
|
||||||
default.distance};
|
default.distance};
|
||||||
|
|
||||||
customization_menu.displayed_monster_UI_parts_sorting_types = { current.normal,
|
customization_menu.displayed_large_monster_UI_parts_sorting_types = { current.normal,
|
||||||
current.health,
|
current.health,
|
||||||
current.health_percentage,
|
current.health_percentage,
|
||||||
current.flinch_count,
|
current.flinch_count,
|
||||||
current.break_health,
|
current.break_health,
|
||||||
current.break_health_percentage,
|
current.break_health_percentage,
|
||||||
current.break_count,
|
current.break_count,
|
||||||
current.loss_health,
|
current.loss_health,
|
||||||
current.loss_health_percentage};
|
current.loss_health_percentage};
|
||||||
|
|
||||||
customization_menu.large_monster_UI_parts_sorting_types = { default.normal,
|
customization_menu.large_monster_UI_parts_sorting_types = { default.normal,
|
||||||
default.health,
|
default.health,
|
||||||
default.health_percentage,
|
default.health_percentage,
|
||||||
default.flinch_count,
|
default.flinch_count,
|
||||||
default.break_health,
|
default.break_health,
|
||||||
default.break_health_percentage,
|
default.break_health_percentage,
|
||||||
default.break_count,
|
default.break_count,
|
||||||
default.loss_health,
|
default.loss_health,
|
||||||
default.loss_health_percentage};
|
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,
|
customization_menu.displayed_ailments_sorting_types = { current.normal,
|
||||||
current.buildup,
|
current.buildup,
|
||||||
|
|||||||
@@ -83,6 +83,7 @@
|
|||||||
"creature_name_label": "Creature Name Label",
|
"creature_name_label": "Creature Name Label",
|
||||||
"crown": "Crown",
|
"crown": "Crown",
|
||||||
"crown_thresholds": "Crown Thresholds",
|
"crown_thresholds": "Crown Thresholds",
|
||||||
|
"current_state": "Current State",
|
||||||
"current_value": "Current Value",
|
"current_value": "Current Value",
|
||||||
"cutscene": "Cutscene",
|
"cutscene": "Cutscene",
|
||||||
"damage": "Damage",
|
"damage": "Damage",
|
||||||
@@ -91,6 +92,7 @@
|
|||||||
"damage_meter_UI": "Damage Meter UI",
|
"damage_meter_UI": "Damage Meter UI",
|
||||||
"damage_percentage_label": "Damage Percentage Label",
|
"damage_percentage_label": "Damage Percentage Label",
|
||||||
"damage_value_label": "Damage Value Label",
|
"damage_value_label": "Damage Value Label",
|
||||||
|
"default_state": "Default State",
|
||||||
"delete": "Delete",
|
"delete": "Delete",
|
||||||
"distance": "Distance",
|
"distance": "Distance",
|
||||||
"dps": "DPS",
|
"dps": "DPS",
|
||||||
@@ -108,6 +110,7 @@
|
|||||||
"farthest": "Farthest",
|
"farthest": "Farthest",
|
||||||
"fight_time": "Fight Time",
|
"fight_time": "Fight Time",
|
||||||
"filter": "Filter",
|
"filter": "Filter",
|
||||||
|
"filter_mode": "Filter Mode",
|
||||||
"first": "First",
|
"first": "First",
|
||||||
"first_hit": "First Hit",
|
"first_hit": "First Hit",
|
||||||
"flinch_count": "Flinch Count",
|
"flinch_count": "Flinch Count",
|
||||||
|
|||||||
@@ -83,6 +83,7 @@
|
|||||||
"creature_name_label": "モンスターの名前ラベル",
|
"creature_name_label": "モンスターの名前ラベル",
|
||||||
"crown": "王冠",
|
"crown": "王冠",
|
||||||
"crown_thresholds": "王冠の閾値",
|
"crown_thresholds": "王冠の閾値",
|
||||||
|
"current_state": "Current State",
|
||||||
"current_value": "Current Value",
|
"current_value": "Current Value",
|
||||||
"cutscene": "Cutscene",
|
"cutscene": "Cutscene",
|
||||||
"damage": "ダメージ",
|
"damage": "ダメージ",
|
||||||
@@ -91,6 +92,7 @@
|
|||||||
"damage_meter_UI": "ダメージメーターUI",
|
"damage_meter_UI": "ダメージメーターUI",
|
||||||
"damage_percentage_label": "ダメージ割合(%)ラベル",
|
"damage_percentage_label": "ダメージ割合(%)ラベル",
|
||||||
"damage_value_label": "ダメージラベル",
|
"damage_value_label": "ダメージラベル",
|
||||||
|
"default_state": "Default State",
|
||||||
"delete": "Delete",
|
"delete": "Delete",
|
||||||
"distance": "距離",
|
"distance": "距離",
|
||||||
"dps": "DPS",
|
"dps": "DPS",
|
||||||
@@ -108,6 +110,7 @@
|
|||||||
"farthest": "Farthest",
|
"farthest": "Farthest",
|
||||||
"fight_time": "戦闘時間",
|
"fight_time": "戦闘時間",
|
||||||
"filter": "フィルター",
|
"filter": "フィルター",
|
||||||
|
"filter_mode": "Filter Mode",
|
||||||
"first": "最初",
|
"first": "最初",
|
||||||
"first_hit": "初撃",
|
"first_hit": "初撃",
|
||||||
"flinch_count": "ひるみ回数",
|
"flinch_count": "ひるみ回数",
|
||||||
|
|||||||
@@ -83,6 +83,7 @@
|
|||||||
"creature_name_label": "환경생물 이름 정보",
|
"creature_name_label": "환경생물 이름 정보",
|
||||||
"crown": "금관",
|
"crown": "금관",
|
||||||
"crown_thresholds": "금관 판정값",
|
"crown_thresholds": "금관 판정값",
|
||||||
|
"current_state": "Current State",
|
||||||
"current_value": "Current Value",
|
"current_value": "Current Value",
|
||||||
"cutscene": "컷신",
|
"cutscene": "컷신",
|
||||||
"damage": "대미지",
|
"damage": "대미지",
|
||||||
@@ -91,6 +92,7 @@
|
|||||||
"damage_meter_UI": "대미지 미터 UI",
|
"damage_meter_UI": "대미지 미터 UI",
|
||||||
"damage_percentage_label": "대미지 비율 정보",
|
"damage_percentage_label": "대미지 비율 정보",
|
||||||
"damage_value_label": "대미지 값 정보",
|
"damage_value_label": "대미지 값 정보",
|
||||||
|
"default_state": "Default State",
|
||||||
"delete": "삭제하기",
|
"delete": "삭제하기",
|
||||||
"distance": "간격",
|
"distance": "간격",
|
||||||
"dps": "DPS",
|
"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": "경직 횟수",
|
||||||
|
|||||||
@@ -83,6 +83,7 @@
|
|||||||
"creature_name_label": "Метка имени существа",
|
"creature_name_label": "Метка имени существа",
|
||||||
"crown": "Корона",
|
"crown": "Корона",
|
||||||
"crown_thresholds": "Лимиты корон",
|
"crown_thresholds": "Лимиты корон",
|
||||||
|
"current_state": "Current State",
|
||||||
"current_value": "Current Value",
|
"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": "Кол-во вздрагиваний",
|
||||||
|
|||||||
@@ -83,6 +83,7 @@
|
|||||||
"creature_name_label": "生物名标签",
|
"creature_name_label": "生物名标签",
|
||||||
"crown": "皇冠",
|
"crown": "皇冠",
|
||||||
"crown_thresholds": "皇冠阈值",
|
"crown_thresholds": "皇冠阈值",
|
||||||
|
"current_state": "Current State",
|
||||||
"current_value": "Current Value",
|
"current_value": "Current Value",
|
||||||
"cutscene": "Cutscene",
|
"cutscene": "Cutscene",
|
||||||
"damage": "伤害",
|
"damage": "伤害",
|
||||||
@@ -91,6 +92,7 @@
|
|||||||
"damage_meter_UI": "伤害统计UI",
|
"damage_meter_UI": "伤害统计UI",
|
||||||
"damage_percentage_label": "伤害百分比标签",
|
"damage_percentage_label": "伤害百分比标签",
|
||||||
"damage_value_label": "伤害量标签",
|
"damage_value_label": "伤害量标签",
|
||||||
|
"default_state": "Default State",
|
||||||
"delete": "Delete",
|
"delete": "Delete",
|
||||||
"distance": "距离",
|
"distance": "距离",
|
||||||
"dps": "DPS",
|
"dps": "DPS",
|
||||||
@@ -108,6 +110,7 @@
|
|||||||
"farthest": "Farthest",
|
"farthest": "Farthest",
|
||||||
"fight_time": "战斗时间",
|
"fight_time": "战斗时间",
|
||||||
"filter": "筛选器",
|
"filter": "筛选器",
|
||||||
|
"filter_mode": "Filter Mode",
|
||||||
"first": "第一",
|
"first": "第一",
|
||||||
"first_hit": "第一击",
|
"first_hit": "第一击",
|
||||||
"flinch_count": "胆怯次数",
|
"flinch_count": "胆怯次数",
|
||||||
|
|||||||
@@ -83,6 +83,7 @@
|
|||||||
"creature_name_label": "環境生物名稱",
|
"creature_name_label": "環境生物名稱",
|
||||||
"crown": "皇冠",
|
"crown": "皇冠",
|
||||||
"crown_thresholds": "皇冠的大小判定範圍",
|
"crown_thresholds": "皇冠的大小判定範圍",
|
||||||
|
"current_state": "Current State",
|
||||||
"current_value": "Current Value",
|
"current_value": "Current Value",
|
||||||
"cutscene": "Cutscene",
|
"cutscene": "Cutscene",
|
||||||
"damage": "傷害",
|
"damage": "傷害",
|
||||||
@@ -91,6 +92,7 @@
|
|||||||
"damage_meter_UI": "傷害量計算 UI",
|
"damage_meter_UI": "傷害量計算 UI",
|
||||||
"damage_percentage_label": "傷害量百分比",
|
"damage_percentage_label": "傷害量百分比",
|
||||||
"damage_value_label": "傷害量",
|
"damage_value_label": "傷害量",
|
||||||
|
"default_state": "Default State",
|
||||||
"delete": "Delete",
|
"delete": "Delete",
|
||||||
"distance": "距離",
|
"distance": "距離",
|
||||||
"dps": "DPS",
|
"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": "膽怯次數",
|
||||||
|
|||||||
Reference in New Issue
Block a user