mirror of
https://github.com/GreenComfyTea/MHR-Overlay.git
synced 2026-01-24 04:18:11 -08:00
Add Anomaly Core Health Bars to Parts UI
This commit is contained in:
@@ -516,7 +516,7 @@ function this.init_default()
|
||||
text_label = {
|
||||
visibility = false,
|
||||
|
||||
text = language.current_language.UI.buildup,
|
||||
text_format = language.current_language.UI.buildup,
|
||||
|
||||
offset = {
|
||||
x = -60,
|
||||
@@ -1285,11 +1285,11 @@ function this.init_default()
|
||||
},
|
||||
|
||||
body_parts = {
|
||||
visibility = false,
|
||||
visibility = true,
|
||||
|
||||
offset = {
|
||||
x = 10,
|
||||
y = 45
|
||||
y = 111
|
||||
},
|
||||
|
||||
spacing = {
|
||||
@@ -1298,8 +1298,9 @@ function this.init_default()
|
||||
},
|
||||
|
||||
settings = {
|
||||
filter_mode = "Current State",
|
||||
render_inactive_anomaly_cores = false,
|
||||
hide_undamaged_parts = true,
|
||||
filter_mode = "Current State",
|
||||
time_limit = 15
|
||||
},
|
||||
|
||||
@@ -1309,13 +1310,25 @@ function this.init_default()
|
||||
},
|
||||
|
||||
filter = {
|
||||
health_break_severe = true,
|
||||
health_break_sever_anomaly = true,
|
||||
|
||||
health_break_sever = true,
|
||||
health_break_anomaly = true,
|
||||
health_sever_anomaly = true,
|
||||
break_sever_anomaly = true,
|
||||
|
||||
health_break = true,
|
||||
health_severe = true,
|
||||
health_sever = true,
|
||||
health_anomaly = true,
|
||||
|
||||
break_sever = true,
|
||||
break_anomaly = true,
|
||||
sever_anomaly = true,
|
||||
|
||||
health = true,
|
||||
break_severe = true,
|
||||
break_ = true,
|
||||
severe = true
|
||||
sever = true,
|
||||
anomaly = true
|
||||
},
|
||||
|
||||
part_name_label = {
|
||||
@@ -1355,7 +1368,7 @@ function this.init_default()
|
||||
|
||||
text_label = {
|
||||
visibility = false,
|
||||
text = language.current_language.UI.HP,
|
||||
text_format = language.current_language.UI.HP,
|
||||
offset = {
|
||||
x = 100,
|
||||
y = -5
|
||||
@@ -1377,7 +1390,7 @@ function this.init_default()
|
||||
|
||||
include = {
|
||||
current_value = true,
|
||||
max_value = true
|
||||
max_value = false
|
||||
},
|
||||
|
||||
text_format = "%11s", -- current_health/max_health
|
||||
@@ -1460,7 +1473,7 @@ function this.init_default()
|
||||
|
||||
text_label = {
|
||||
visibility = false,
|
||||
text = language.current_language.UI.part_break,
|
||||
text_format = language.current_language.UI.part_break,
|
||||
offset = {
|
||||
x = -42,
|
||||
y = 6
|
||||
@@ -1482,7 +1495,7 @@ function this.init_default()
|
||||
|
||||
include = {
|
||||
current_value = true,
|
||||
max_value = true
|
||||
max_value = false
|
||||
},
|
||||
|
||||
text_format = "%-9s",
|
||||
@@ -1549,7 +1562,7 @@ function this.init_default()
|
||||
},
|
||||
|
||||
colors = {
|
||||
foreground = 0xB999bfff,
|
||||
foreground = 0xB999BFFF,
|
||||
background = 0x88000000,
|
||||
outline = 0xC0000000
|
||||
}
|
||||
@@ -1566,7 +1579,7 @@ function this.init_default()
|
||||
|
||||
text_label = {
|
||||
visibility = false,
|
||||
text = language.current_language.UI.part_sever,
|
||||
text_format = language.current_language.UI.part_sever,
|
||||
offset = {
|
||||
x = 97,
|
||||
y = 5
|
||||
@@ -1588,7 +1601,7 @@ function this.init_default()
|
||||
|
||||
include = {
|
||||
current_value = true,
|
||||
max_value = true
|
||||
max_value = false
|
||||
},
|
||||
|
||||
text_format = "%11s",
|
||||
@@ -1654,13 +1667,118 @@ function this.init_default()
|
||||
},
|
||||
|
||||
colors = {
|
||||
foreground = 0xB9e57386,
|
||||
foreground = 0xB9E57386,
|
||||
background = 0x88000000,
|
||||
outline = 0xC0000000
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
part_anomaly = {
|
||||
visibility = true,
|
||||
|
||||
offset = {
|
||||
x = -10,
|
||||
y = 0
|
||||
},
|
||||
|
||||
text_label = {
|
||||
visibility = false,
|
||||
text_format = language.current_language.UI.part_anomaly_core,
|
||||
offset = {
|
||||
x = -90,
|
||||
y = 1
|
||||
},
|
||||
color = 0xFFFF6680,
|
||||
|
||||
shadow = {
|
||||
visibility = true,
|
||||
offset = {
|
||||
x = 1,
|
||||
y = 1
|
||||
},
|
||||
color = 0xFF000000
|
||||
}
|
||||
},
|
||||
|
||||
value_label = {
|
||||
visibility = true,
|
||||
|
||||
include = {
|
||||
current_value = false,
|
||||
max_value = false
|
||||
},
|
||||
|
||||
text_format = "%11s",
|
||||
|
||||
offset = {
|
||||
x = -84,
|
||||
y = 12
|
||||
},
|
||||
|
||||
color = 0xFFFFFFFF,
|
||||
|
||||
shadow = {
|
||||
visibility = true,
|
||||
offset = {
|
||||
x = 1,
|
||||
y = 1
|
||||
},
|
||||
color = 0xFF000000
|
||||
}
|
||||
},
|
||||
|
||||
percentage_label = {
|
||||
visibility = false,
|
||||
text_format = "%5.1f%%",
|
||||
|
||||
offset = {
|
||||
x = -48,
|
||||
y = 24
|
||||
},
|
||||
color = 0xFFFFFFFF,
|
||||
|
||||
shadow = {
|
||||
visibility = true,
|
||||
offset = {
|
||||
x = 1,
|
||||
y = 1
|
||||
},
|
||||
color = 0xFF000000
|
||||
}
|
||||
},
|
||||
|
||||
bar = {
|
||||
visibility = true,
|
||||
|
||||
settings = {
|
||||
fill_direction = "Bottom to Top"
|
||||
},
|
||||
|
||||
offset = {
|
||||
x = 0,
|
||||
y = 9
|
||||
},
|
||||
|
||||
size = {
|
||||
width = 5,
|
||||
height = 24
|
||||
},
|
||||
|
||||
outline = {
|
||||
visibility = true,
|
||||
thickness = 1,
|
||||
offset = 0,
|
||||
style = "Center"
|
||||
},
|
||||
|
||||
colors = {
|
||||
foreground = 0xB9E53956,
|
||||
background = 0x88000000,
|
||||
outline = 0xC0000000
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
ailments = {
|
||||
@@ -1747,7 +1865,7 @@ function this.init_default()
|
||||
|
||||
text_label = {
|
||||
visibility = false,
|
||||
text = language.current_language.UI.buildup,
|
||||
text_format = language.current_language.UI.buildup,
|
||||
offset = {
|
||||
x = -60,
|
||||
y = 7
|
||||
@@ -2515,11 +2633,11 @@ function this.init_default()
|
||||
},
|
||||
|
||||
body_parts = {
|
||||
visibility = false,
|
||||
visibility = true,
|
||||
|
||||
offset = {
|
||||
x = 10,
|
||||
y = 60
|
||||
y = 111
|
||||
},
|
||||
|
||||
spacing = {
|
||||
@@ -2528,8 +2646,9 @@ function this.init_default()
|
||||
},
|
||||
|
||||
settings = {
|
||||
filter_mode = "Current State",
|
||||
render_inactive_anomaly_cores = false,
|
||||
hide_undamaged_parts = true,
|
||||
filter_mode = "Current State",
|
||||
time_limit = 15
|
||||
},
|
||||
|
||||
@@ -2539,13 +2658,25 @@ function this.init_default()
|
||||
},
|
||||
|
||||
filter = {
|
||||
health_break_severe = true,
|
||||
health_break_sever_anomaly = true,
|
||||
|
||||
health_break_sever = true,
|
||||
health_break_anomaly = true,
|
||||
health_sever_anomaly = true,
|
||||
break_sever_anomaly = true,
|
||||
|
||||
health_break = true,
|
||||
health_severe = true,
|
||||
health_sever = true,
|
||||
health_anomaly = true,
|
||||
|
||||
break_sever = true,
|
||||
break_anomaly = true,
|
||||
sever_anomaly = true,
|
||||
|
||||
health = true,
|
||||
break_severe = true,
|
||||
break_ = true,
|
||||
severe = true
|
||||
sever = true,
|
||||
anomaly = true
|
||||
},
|
||||
|
||||
part_name_label = {
|
||||
@@ -2585,7 +2716,7 @@ function this.init_default()
|
||||
|
||||
text_label = {
|
||||
visibility = false,
|
||||
text = language.current_language.UI.HP,
|
||||
text_format = language.current_language.UI.HP,
|
||||
offset = {
|
||||
x = 100,
|
||||
y = -5
|
||||
@@ -2607,7 +2738,7 @@ function this.init_default()
|
||||
|
||||
include = {
|
||||
current_value = true,
|
||||
max_value = true
|
||||
max_value = false
|
||||
},
|
||||
|
||||
text_format = "%11s", -- current_health/max_health
|
||||
@@ -2690,7 +2821,7 @@ function this.init_default()
|
||||
|
||||
text_label = {
|
||||
visibility = false,
|
||||
text = language.current_language.UI.part_break,
|
||||
text_format = language.current_language.UI.part_break,
|
||||
offset = {
|
||||
x = -42,
|
||||
y = 6
|
||||
@@ -2712,7 +2843,7 @@ function this.init_default()
|
||||
|
||||
include = {
|
||||
current_value = true,
|
||||
max_value = true
|
||||
max_value = false
|
||||
},
|
||||
|
||||
text_format = "%-9s",
|
||||
@@ -2796,7 +2927,7 @@ function this.init_default()
|
||||
|
||||
text_label = {
|
||||
visibility = false,
|
||||
text = language.current_language.UI.part_sever,
|
||||
text_format = language.current_language.UI.part_sever,
|
||||
offset = {
|
||||
x = 97,
|
||||
y = 5
|
||||
@@ -2818,7 +2949,7 @@ function this.init_default()
|
||||
|
||||
include = {
|
||||
current_value = true,
|
||||
max_value = true
|
||||
max_value = false
|
||||
},
|
||||
|
||||
text_format = "%11s",
|
||||
@@ -2889,8 +3020,113 @@ function this.init_default()
|
||||
outline = 0xC0000000
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
part_anomaly = {
|
||||
visibility = true,
|
||||
|
||||
offset = {
|
||||
x = -10,
|
||||
y = 0
|
||||
},
|
||||
|
||||
text_label = {
|
||||
visibility = false,
|
||||
text_format = language.current_language.UI.part_anomaly_core,
|
||||
offset = {
|
||||
x = -90,
|
||||
y = 1
|
||||
},
|
||||
color = 0xFFFF6680,
|
||||
|
||||
shadow = {
|
||||
visibility = true,
|
||||
offset = {
|
||||
x = 1,
|
||||
y = 1
|
||||
},
|
||||
color = 0xFF000000
|
||||
}
|
||||
},
|
||||
|
||||
value_label = {
|
||||
visibility = true,
|
||||
|
||||
include = {
|
||||
current_value = false,
|
||||
max_value = false
|
||||
},
|
||||
|
||||
text_format = "%11s",
|
||||
|
||||
offset = {
|
||||
x = -84,
|
||||
y = 12
|
||||
},
|
||||
|
||||
color = 0xFFFFFFFF,
|
||||
|
||||
shadow = {
|
||||
visibility = true,
|
||||
offset = {
|
||||
x = 1,
|
||||
y = 1
|
||||
},
|
||||
color = 0xFF000000
|
||||
}
|
||||
},
|
||||
|
||||
percentage_label = {
|
||||
visibility = false,
|
||||
text_format = "%5.1f%%",
|
||||
|
||||
offset = {
|
||||
x = -48,
|
||||
y = 24
|
||||
},
|
||||
color = 0xFFFFFFFF,
|
||||
|
||||
shadow = {
|
||||
visibility = true,
|
||||
offset = {
|
||||
x = 1,
|
||||
y = 1
|
||||
},
|
||||
color = 0xFF000000
|
||||
}
|
||||
},
|
||||
|
||||
bar = {
|
||||
visibility = true,
|
||||
|
||||
settings = {
|
||||
fill_direction = "Bottom to Top"
|
||||
},
|
||||
|
||||
offset = {
|
||||
x = 0,
|
||||
y = 9
|
||||
},
|
||||
|
||||
size = {
|
||||
width = 5,
|
||||
height = 24
|
||||
},
|
||||
|
||||
outline = {
|
||||
visibility = true,
|
||||
thickness = 1,
|
||||
offset = 0,
|
||||
style = "Center"
|
||||
},
|
||||
|
||||
colors = {
|
||||
foreground = 0xB9E53956,
|
||||
background = 0x88000000,
|
||||
outline = 0xC0000000
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
ailments = {
|
||||
@@ -2978,7 +3214,7 @@ function this.init_default()
|
||||
|
||||
text_label = {
|
||||
visibility = false,
|
||||
text = language.current_language.UI.buildup,
|
||||
text_format = language.current_language.UI.buildup,
|
||||
offset = {
|
||||
x = -60,
|
||||
y = 7
|
||||
@@ -3745,8 +3981,9 @@ function this.init_default()
|
||||
},
|
||||
|
||||
settings = {
|
||||
filter_mode = "Current State",
|
||||
render_inactive_anomaly_cores = false,
|
||||
hide_undamaged_parts = true,
|
||||
filter_mode = "Current State",
|
||||
time_limit = 15
|
||||
},
|
||||
|
||||
@@ -3756,13 +3993,25 @@ function this.init_default()
|
||||
},
|
||||
|
||||
filter = {
|
||||
health_break_severe = true,
|
||||
health_break_sever_anomaly = true,
|
||||
|
||||
health_break_sever = true,
|
||||
health_break_anomaly = true,
|
||||
health_sever_anomaly = true,
|
||||
break_sever_anomaly = true,
|
||||
|
||||
health_break = true,
|
||||
health_severe = true,
|
||||
health_sever = true,
|
||||
health_anomaly = true,
|
||||
|
||||
break_sever = true,
|
||||
break_anomaly = true,
|
||||
sever_anomaly = true,
|
||||
|
||||
health = true,
|
||||
break_severe = true,
|
||||
break_ = true,
|
||||
severe = true
|
||||
sever = true,
|
||||
anomaly = true
|
||||
},
|
||||
|
||||
part_name_label = {
|
||||
@@ -3802,7 +4051,7 @@ function this.init_default()
|
||||
|
||||
text_label = {
|
||||
visibility = false,
|
||||
text = language.current_language.UI.HP,
|
||||
text_format = language.current_language.UI.HP,
|
||||
offset = {
|
||||
x = 100,
|
||||
y = -5
|
||||
@@ -3824,7 +4073,7 @@ function this.init_default()
|
||||
|
||||
include = {
|
||||
current_value = true,
|
||||
max_value = true
|
||||
max_value = false
|
||||
},
|
||||
|
||||
text_format = "%11s", -- current_health/max_health
|
||||
@@ -3907,7 +4156,7 @@ function this.init_default()
|
||||
|
||||
text_label = {
|
||||
visibility = false,
|
||||
text = language.current_language.UI.part_break,
|
||||
text_format = language.current_language.UI.part_break,
|
||||
offset = {
|
||||
x = -42,
|
||||
y = 6
|
||||
@@ -3929,7 +4178,7 @@ function this.init_default()
|
||||
|
||||
include = {
|
||||
current_value = true,
|
||||
max_value = true
|
||||
max_value = false
|
||||
},
|
||||
|
||||
text_format = "%-9s",
|
||||
@@ -4013,7 +4262,7 @@ function this.init_default()
|
||||
|
||||
text_label = {
|
||||
visibility = false,
|
||||
text = language.current_language.UI.part_sever,
|
||||
text_format = language.current_language.UI.part_sever,
|
||||
offset = {
|
||||
x = 97,
|
||||
y = 5
|
||||
@@ -4035,7 +4284,7 @@ function this.init_default()
|
||||
|
||||
include = {
|
||||
current_value = true,
|
||||
max_value = true
|
||||
max_value = false
|
||||
},
|
||||
|
||||
text_format = "%11s",
|
||||
@@ -4106,6 +4355,112 @@ function this.init_default()
|
||||
outline = 0xC0000000
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
part_anomaly = {
|
||||
visibility = true,
|
||||
|
||||
offset = {
|
||||
x = -10,
|
||||
y = 0
|
||||
},
|
||||
|
||||
text_label = {
|
||||
visibility = false,
|
||||
text_format = language.current_language.UI.part_anomaly_core,
|
||||
offset = {
|
||||
x = -90,
|
||||
y = 1
|
||||
},
|
||||
color = 0xFFFF6680,
|
||||
|
||||
shadow = {
|
||||
visibility = true,
|
||||
offset = {
|
||||
x = 1,
|
||||
y = 1
|
||||
},
|
||||
color = 0xFF000000
|
||||
}
|
||||
},
|
||||
|
||||
value_label = {
|
||||
visibility = true,
|
||||
|
||||
include = {
|
||||
current_value = false,
|
||||
max_value = false
|
||||
},
|
||||
|
||||
text_format = "%11s",
|
||||
|
||||
offset = {
|
||||
x = -84,
|
||||
y = 12
|
||||
},
|
||||
|
||||
color = 0xFFFFFFFF,
|
||||
|
||||
shadow = {
|
||||
visibility = true,
|
||||
offset = {
|
||||
x = 1,
|
||||
y = 1
|
||||
},
|
||||
color = 0xFF000000
|
||||
}
|
||||
},
|
||||
|
||||
percentage_label = {
|
||||
visibility = false,
|
||||
text_format = "%5.1f%%",
|
||||
|
||||
offset = {
|
||||
x = -48,
|
||||
y = 24
|
||||
},
|
||||
color = 0xFFFFFFFF,
|
||||
|
||||
shadow = {
|
||||
visibility = true,
|
||||
offset = {
|
||||
x = 1,
|
||||
y = 1
|
||||
},
|
||||
color = 0xFF000000
|
||||
}
|
||||
},
|
||||
|
||||
bar = {
|
||||
visibility = true,
|
||||
|
||||
settings = {
|
||||
fill_direction = "Bottom to Top"
|
||||
},
|
||||
|
||||
offset = {
|
||||
x = 0,
|
||||
y = 9
|
||||
},
|
||||
|
||||
size = {
|
||||
width = 5,
|
||||
height = 24
|
||||
},
|
||||
|
||||
outline = {
|
||||
visibility = true,
|
||||
thickness = 1,
|
||||
offset = 0,
|
||||
style = "Center"
|
||||
},
|
||||
|
||||
colors = {
|
||||
foreground = 0xB9E53956,
|
||||
background = 0x88000000,
|
||||
outline = 0xC0000000
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -4193,7 +4548,7 @@ function this.init_default()
|
||||
|
||||
text_label = {
|
||||
visibility = false,
|
||||
text = language.current_language.UI.buildup,
|
||||
text_format = language.current_language.UI.buildup,
|
||||
offset = {
|
||||
x = -60,
|
||||
y = 7
|
||||
|
||||
@@ -202,6 +202,7 @@ this.default_language = {
|
||||
total_buildup = "Total Buildup",
|
||||
part_break = "Break",
|
||||
part_sever = "Sever",
|
||||
part_anomaly_core = "Anomaly Core",
|
||||
|
||||
otomo = "Buddy",
|
||||
servant = "Follower",
|
||||
@@ -319,6 +320,7 @@ this.default_language = {
|
||||
rage = "Rage",
|
||||
body_parts = "Body Parts",
|
||||
hide_undamaged_parts = "Hide Undamaged Parts",
|
||||
render_inactive_anomaly_cores = "Render Inactive Anomaly Cores",
|
||||
part_name = "Part Name",
|
||||
flinch_count = "Flinch Count",
|
||||
break_count = "Break Count",
|
||||
@@ -453,6 +455,8 @@ this.default_language = {
|
||||
break_health_percentage = "Break Health Percentage",
|
||||
loss_health = "Sever Health",
|
||||
loss_health_percentage = "Sever Health Percentage",
|
||||
anomaly_health = "Anomaly Core Health",
|
||||
anomaly_health_percentage = "Anomaly Core Health Percentage",
|
||||
|
||||
monster_id = "Monster ID",
|
||||
|
||||
@@ -482,14 +486,24 @@ this.default_language = {
|
||||
|
||||
freeze_dps_on_quest_end = "Freeze DPS on Quest End",
|
||||
|
||||
health_break_sever_anomaly_filter = "Health + Break + Sever + Anomaly Core",
|
||||
health_break_sever_filter = "Health + Break + Sever",
|
||||
health_break_anomaly_filter = "Health + Break + Anomaly Core",
|
||||
health_sever_anomaly_filter = "Health + Sever + Anomaly Core",
|
||||
break_sever_anomaly_filter = "Break + Sever + Anomaly Core",
|
||||
|
||||
health_break_severe_filter = "Health + Break + Severe",
|
||||
health_break_filter = "Health + Break",
|
||||
health_severe_filter = "Health + Severe",
|
||||
health_sever_filter = "Health + Sever",
|
||||
health_anomaly_filter = "Health + Anomaly Core",
|
||||
|
||||
break_sever_filter = "Break + Sever",
|
||||
break_anomaly_filter = "Break + Anomaly Core",
|
||||
sever_anomaly_filter = "Sever + Anomaly Core",
|
||||
|
||||
health_filter = "Health",
|
||||
break_severe_filter = "Break + Severe",
|
||||
break_filter = "Break",
|
||||
severe_filter = "Severe",
|
||||
sever_filter = "Sever",
|
||||
anomaly_filter = "Anomaly Core",
|
||||
|
||||
outline = "Outline",
|
||||
thickness = "Thickness",
|
||||
|
||||
@@ -50,25 +50,31 @@ this.list = {};
|
||||
function this.new(id, name)
|
||||
local part = {};
|
||||
|
||||
part.id = id;
|
||||
|
||||
part.health = 9999;
|
||||
part.max_health = 99999;
|
||||
part.id = id;
|
||||
part.name = name;
|
||||
|
||||
part.health = -9;
|
||||
part.max_health = -10;
|
||||
part.health_percentage = 0;
|
||||
|
||||
part.break_health = 9999;
|
||||
part.break_max_health = 99999;
|
||||
part.break_health = -9;
|
||||
part.break_max_health = -10;
|
||||
part.break_health_percentage = 0;
|
||||
|
||||
part.lost_health = 9999;
|
||||
part.loss_max_health = 99999;
|
||||
part.lost_health = -9;
|
||||
part.loss_max_health = -10;
|
||||
part.loss_health_percentage = 0;
|
||||
|
||||
part.name = name;
|
||||
part.flinch_count = 0;
|
||||
part.break_count = 0;
|
||||
part.break_max_count = 0;
|
||||
|
||||
part.anomaly_health = -9;
|
||||
part.anomaly_max_health = -10;
|
||||
part.anomaly_health_percentage = 0;
|
||||
part.anomaly_is_active = false;
|
||||
|
||||
part.last_change_time = time.total_elapsed_script_seconds;
|
||||
|
||||
return part;
|
||||
@@ -81,7 +87,7 @@ function this.init_part_names(monster_id, parts)
|
||||
end
|
||||
|
||||
function this.update_flinch(part, part_current, part_max)
|
||||
if part_current > part.health then
|
||||
if part_current > part.health and part.max_health > 0 then
|
||||
part.flinch_count = part.flinch_count + 1;
|
||||
end
|
||||
|
||||
@@ -154,6 +160,124 @@ function this.update_loss(part, part_loss_current, part_loss_max, is_severed)
|
||||
|
||||
end
|
||||
|
||||
function this.update_anomaly(part, part_anomaly_current, part_anomaly_max, part_is_active)
|
||||
if part.anomaly_health ~= part_anomaly_current then
|
||||
part.last_change_time = time.total_elapsed_script_seconds;
|
||||
end
|
||||
|
||||
if part.anomaly_max_health ~= part_anomaly_max then
|
||||
part.last_change_time = time.total_elapsed_script_seconds;
|
||||
end
|
||||
|
||||
if part.anomaly_is_active ~= part_is_active then
|
||||
part.last_change_time = time.total_elapsed_script_seconds;
|
||||
end
|
||||
|
||||
part.anomaly_health = part_anomaly_current;
|
||||
part.anomaly_max_health = part_anomaly_max;
|
||||
part.anomaly_is_active = part_is_active;
|
||||
|
||||
if part.anomaly_max_health ~= 0 then
|
||||
part.anomaly_health_percentage = part.anomaly_health / part.anomaly_max_health;
|
||||
end
|
||||
end
|
||||
|
||||
function this.is_filtered_out(cached_config, health_supported, break_supported, sever_supported, anomaly_supported)
|
||||
if health_supported then
|
||||
if break_supported then
|
||||
if sever_supported then
|
||||
if anomaly_supported then
|
||||
if not cached_config.filter.health_break_sever_anomaly then
|
||||
return true;
|
||||
end
|
||||
else
|
||||
if not cached_config.filter.health_break_sever then
|
||||
return true;
|
||||
end
|
||||
end
|
||||
else
|
||||
if anomaly_supported then
|
||||
if not cached_config.filter.health_break_anomaly then
|
||||
return true;
|
||||
end
|
||||
else
|
||||
if not cached_config.filter.health_break then
|
||||
return true;
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
if sever_supported then
|
||||
if anomaly_supported then
|
||||
if not cached_config.filter.health_sever_anomaly then
|
||||
return true;
|
||||
end
|
||||
else
|
||||
if not cached_config.filter.health_sever then
|
||||
return true;
|
||||
end
|
||||
end
|
||||
else
|
||||
if anomaly_supported then
|
||||
if not cached_config.filter.health_anomaly then
|
||||
return true;
|
||||
end
|
||||
else
|
||||
if not cached_config.filter.health then
|
||||
return true;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
if break_supported then
|
||||
if sever_supported then
|
||||
if anomaly_supported then
|
||||
if not cached_config.filter.break_sever_anomaly then
|
||||
return true;
|
||||
end
|
||||
else
|
||||
if not cached_config.filter.break_sever then
|
||||
return true;
|
||||
end
|
||||
end
|
||||
else
|
||||
if anomaly_supported then
|
||||
if not cached_config.filter.break_anomaly then
|
||||
return true;
|
||||
end
|
||||
else
|
||||
if not cached_config.filter.break_ then
|
||||
return true;
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
if sever_supported then
|
||||
if anomaly_supported then
|
||||
if not cached_config.filter.sever_anomaly then
|
||||
return true;
|
||||
end
|
||||
else
|
||||
if not cached_config.filter.sever then
|
||||
return true;
|
||||
end
|
||||
end
|
||||
else
|
||||
if anomaly_supported then
|
||||
if not cached_config.filter.anomaly then
|
||||
return true;
|
||||
end
|
||||
else
|
||||
return true;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return false;
|
||||
end
|
||||
|
||||
function this.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;
|
||||
@@ -162,72 +286,41 @@ function this.draw(monster, part_UI, cached_config, parts_position_on_screen, op
|
||||
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;
|
||||
local sever_supported = part.loss_max_health > 0;
|
||||
local anomaly_supported = part.anomaly_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;
|
||||
if sever_supported and part.is_severed then
|
||||
sever_supported = false;
|
||||
end
|
||||
|
||||
if anomaly_supported and not part.anomaly_is_active then
|
||||
anomaly_supported = false;
|
||||
end
|
||||
end
|
||||
|
||||
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
|
||||
local is_filtered_out = this.is_filtered_out(cached_config, health_supported, break_supported, sever_supported, anomaly_supported);
|
||||
if is_filtered_out then
|
||||
goto continue;
|
||||
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
|
||||
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 sever_supported)
|
||||
and ((part.anomaly_health == part.anomaly_max_health) or not anomaly_supported) then
|
||||
goto continue
|
||||
end
|
||||
|
||||
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
|
||||
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 sever_supported or part.is_severed)
|
||||
and (not part_UI.anomaly_visibility or not anomaly_supported) then
|
||||
goto continue
|
||||
end
|
||||
|
||||
@@ -330,6 +423,26 @@ function this.draw(monster, part_UI, cached_config, parts_position_on_screen, op
|
||||
return left.loss_health_percentage < right.loss_health_percentage;
|
||||
end);
|
||||
end
|
||||
elseif cached_config.sorting.type == "Anomaly Core Health" then
|
||||
if cached_config.sorting.reversed_order then
|
||||
table.sort(displayed_parts, function(left, right)
|
||||
return left.anomaly_health > right.anomaly_health;
|
||||
end);
|
||||
else
|
||||
table.sort(displayed_parts, function(left, right)
|
||||
return left.anomaly_health < right.anomaly_health;
|
||||
end);
|
||||
end
|
||||
elseif cached_config.sorting.type == "Anomaly Core Health Percentage" then
|
||||
if cached_config.sorting.reversed_order then
|
||||
table.sort(displayed_parts, function(left, right)
|
||||
return left.anomaly_health_percentage > right.anomaly_health_percentage;
|
||||
end);
|
||||
else
|
||||
table.sort(displayed_parts, function(left, right)
|
||||
return left.anomaly_health_percentage < right.anomaly_health_percentage;
|
||||
end);
|
||||
end
|
||||
end
|
||||
|
||||
local last_part_position_on_screen;
|
||||
|
||||
@@ -141,6 +141,7 @@ function this.new(enemy)
|
||||
|
||||
this.update(enemy, monster);
|
||||
pcall(this.update_parts, enemy, monster, physical_param);
|
||||
pcall(this.update_anomaly_parts, enemy, monster, nil);
|
||||
|
||||
if this.list[enemy] == nil then
|
||||
this.list[enemy] = monster;
|
||||
@@ -312,7 +313,12 @@ function this.init_UI(monster, monster_UI, cached_config)
|
||||
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
|
||||
cached_config.body_parts.part_loss.percentage_label,
|
||||
cached_config.body_parts.part_anomaly.visibility,
|
||||
cached_config.body_parts.part_anomaly.bar,
|
||||
cached_config.body_parts.part_anomaly.text_label,
|
||||
cached_config.body_parts.part_anomaly.value_label,
|
||||
cached_config.body_parts.part_anomaly.percentage_label
|
||||
);
|
||||
|
||||
monster_UI.ailment_UI = ailment_UI_entity.new(
|
||||
@@ -344,6 +350,7 @@ local physical_param_field = enemy_character_base_type_def:get_field("<PhysicalP
|
||||
local stamina_param_field = enemy_character_base_type_def:get_field("<StaminaParam>k__BackingField");
|
||||
local anger_param_field = enemy_character_base_type_def:get_field("<AngerParam>k__BackingField");
|
||||
local damage_param_field = enemy_character_base_type_def:get_field("<DamageParam>k__BackingField");
|
||||
local mystery_param_field = enemy_character_base_type_def:get_field("<MysteryParam>k__BackingField");
|
||||
|
||||
local check_die_method = enemy_character_base_type_def:get_method("checkDie");
|
||||
local is_disp_icon_mini_map_method = enemy_character_base_type_def:get_method("isDispIconMiniMap");
|
||||
@@ -386,7 +393,7 @@ local get_value_method = system_array_type_def:get_method("GetValue(System.Int32
|
||||
|
||||
function this.update_position(enemy, monster)
|
||||
if not config.current_config.large_monster_UI.dynamic.enabled and
|
||||
config.current_config.large_monster_UI.static.sorting.type ~= "Distance" then
|
||||
config.current_config.large_monster_UI.static.sorting.type ~= "Distance" then
|
||||
return;
|
||||
end
|
||||
|
||||
@@ -427,8 +434,8 @@ function this.update(enemy, monster)
|
||||
local cached_config = config.current_config.large_monster_UI;
|
||||
|
||||
if not cached_config.dynamic.enabled
|
||||
and not cached_config.static.enabled
|
||||
and not cached_config.highlighted.enabled then
|
||||
and not cached_config.static.enabled
|
||||
and not cached_config.highlighted.enabled then
|
||||
return;
|
||||
end
|
||||
|
||||
@@ -476,14 +483,14 @@ function this.update_health(enemy, monster)
|
||||
local cached_config = config.current_config.large_monster_UI;
|
||||
|
||||
if not cached_config.dynamic.enabled
|
||||
and not cached_config.static.enabled
|
||||
and not cached_config.highlighted.enabled then
|
||||
and not cached_config.static.enabled
|
||||
and not cached_config.highlighted.enabled then
|
||||
return;
|
||||
end
|
||||
|
||||
if not cached_config.dynamic.health.visibility
|
||||
and not cached_config.static.health.visibility
|
||||
and not cached_config.highlighted.health.visibility then
|
||||
and not cached_config.static.health.visibility
|
||||
and not cached_config.highlighted.health.visibility then
|
||||
return nil;
|
||||
end
|
||||
|
||||
@@ -516,14 +523,14 @@ function this.update_stamina(enemy, monster, stamina_param)
|
||||
local cached_config = config.current_config.large_monster_UI;
|
||||
|
||||
if not cached_config.dynamic.enabled
|
||||
and not cached_config.static.enabled
|
||||
and not cached_config.highlighted.enabled then
|
||||
and not cached_config.static.enabled
|
||||
and not cached_config.highlighted.enabled then
|
||||
return;
|
||||
end
|
||||
|
||||
if not cached_config.dynamic.stamina.visibility
|
||||
and not cached_config.static.stamina.visibility
|
||||
and not cached_config.highlighted.stamina.visibility then
|
||||
and not cached_config.static.stamina.visibility
|
||||
and not cached_config.highlighted.stamina.visibility then
|
||||
return;
|
||||
end
|
||||
|
||||
@@ -553,14 +560,14 @@ function this.update_stamina_timer(enemy, monster, stamina_param)
|
||||
local cached_config = config.current_config.large_monster_UI;
|
||||
|
||||
if not cached_config.dynamic.enabled
|
||||
and not cached_config.static.enabled
|
||||
and not cached_config.highlighted.enabled then
|
||||
and not cached_config.static.enabled
|
||||
and not cached_config.highlighted.enabled then
|
||||
return;
|
||||
end
|
||||
|
||||
if not cached_config.dynamic.stamina.visibility
|
||||
and not cached_config.static.stamina.visibility
|
||||
and not cached_config.highlighted.stamina.visibility then
|
||||
and not cached_config.static.stamina.visibility
|
||||
and not cached_config.highlighted.stamina.visibility then
|
||||
return;
|
||||
end
|
||||
|
||||
@@ -600,14 +607,14 @@ function this.update_rage(enemy, monster, anger_param)
|
||||
local cached_config = config.current_config.large_monster_UI;
|
||||
|
||||
if not cached_config.dynamic.enabled
|
||||
and not cached_config.static.enabled
|
||||
and not cached_config.highlighted.enabled then
|
||||
and not cached_config.static.enabled
|
||||
and not cached_config.highlighted.enabled then
|
||||
return;
|
||||
end
|
||||
|
||||
if not cached_config.dynamic.rage.visibility
|
||||
and not cached_config.static.rage.visibility
|
||||
and not cached_config.highlighted.rage.visibility then
|
||||
and not cached_config.static.rage.visibility
|
||||
and not cached_config.highlighted.rage.visibility then
|
||||
return;
|
||||
end
|
||||
|
||||
@@ -632,14 +639,14 @@ function this.update_rage_timer(enemy, monster, anger_param)
|
||||
local cached_config = config.current_config.large_monster_UI;
|
||||
|
||||
if not cached_config.dynamic.enabled
|
||||
and not cached_config.static.enabled
|
||||
and not cached_config.highlighted.enabled then
|
||||
and not cached_config.static.enabled
|
||||
and not cached_config.highlighted.enabled then
|
||||
return;
|
||||
end
|
||||
|
||||
if not cached_config.dynamic.rage.visibility
|
||||
and not cached_config.static.rage.visibility
|
||||
and not cached_config.highlighted.rage.visibility then
|
||||
and not cached_config.static.rage.visibility
|
||||
and not cached_config.highlighted.rage.visibility then
|
||||
return;
|
||||
end
|
||||
|
||||
@@ -678,26 +685,26 @@ function this.update_parts(enemy, monster, physical_param)
|
||||
local cached_config = config.current_config.large_monster_UI;
|
||||
|
||||
if not cached_config.dynamic.enabled
|
||||
and not cached_config.static.enabled
|
||||
and not cached_config.highlighted.enabled then
|
||||
and not cached_config.static.enabled
|
||||
and not cached_config.highlighted.enabled then
|
||||
return;
|
||||
end
|
||||
|
||||
if not cached_config.dynamic.body_parts.visibility
|
||||
and not cached_config.static.body_parts.visibility
|
||||
and not cached_config.highlighted.body_parts.visibility then
|
||||
and not cached_config.static.body_parts.visibility
|
||||
and not cached_config.highlighted.body_parts.visibility then
|
||||
return;
|
||||
end
|
||||
|
||||
if not cached_config.dynamic.body_parts.part_health.visibility
|
||||
and not cached_config.dynamic.body_parts.part_break.visibility
|
||||
and not cached_config.dynamic.body_parts.part_loss.visibility
|
||||
and not cached_config.static.body_parts.part_health.visibility
|
||||
and not cached_config.static.body_parts.part_break.visibility
|
||||
and not cached_config.static.body_parts.part_loss.visibility
|
||||
and not cached_config.highlighted.body_parts.part_health.visibility
|
||||
and not cached_config.highlighted.body_parts.part_break.visibility
|
||||
and not cached_config.highlighted.body_parts.part_loss.visibility then
|
||||
and not cached_config.dynamic.body_parts.part_break.visibility
|
||||
and not cached_config.dynamic.body_parts.part_loss.visibility
|
||||
and not cached_config.static.body_parts.part_health.visibility
|
||||
and not cached_config.static.body_parts.part_break.visibility
|
||||
and not cached_config.static.body_parts.part_loss.visibility
|
||||
and not cached_config.highlighted.body_parts.part_health.visibility
|
||||
and not cached_config.highlighted.body_parts.part_break.visibility
|
||||
and not cached_config.highlighted.body_parts.part_loss.visibility then
|
||||
return;
|
||||
end
|
||||
|
||||
@@ -705,7 +712,7 @@ function this.update_parts(enemy, monster, physical_param)
|
||||
physical_param = physical_param_field:get_data(enemy)
|
||||
if physical_param == nil then
|
||||
customization_menu.status = "No physical param";
|
||||
return nil;
|
||||
return;
|
||||
end
|
||||
end
|
||||
|
||||
@@ -721,21 +728,21 @@ function this.update_parts(enemy, monster, physical_param)
|
||||
return;
|
||||
end
|
||||
|
||||
local enemy_parts_info_array = enemy_parts_damage_info:call("get_PartsInfo");
|
||||
if enemy_parts_info_array == nil then
|
||||
local core_parts_array = enemy_parts_damage_info:call("get_PartsInfo");
|
||||
if core_parts_array == nil then
|
||||
customization_menu.status = "No parts damage info array";
|
||||
return;
|
||||
end
|
||||
|
||||
local enemy_parts_info_array_length = length_method:call(enemy_parts_info_array);
|
||||
if enemy_parts_info_array_length == nil then
|
||||
local core_parts_array_length = length_method:call(core_parts_array);
|
||||
if core_parts_array_length == nil then
|
||||
return;
|
||||
end
|
||||
|
||||
for i = 0, enemy_parts_info_array_length - 1 do
|
||||
for i = 0, core_parts_array_length - 1 do
|
||||
local part_id = i + 1;
|
||||
|
||||
local enemy_parts_info = get_value_method:call(enemy_parts_info_array, i);
|
||||
local enemy_parts_info = get_value_method:call(core_parts_array, i);
|
||||
if enemy_parts_info == nil then
|
||||
goto continue
|
||||
end
|
||||
@@ -752,8 +759,8 @@ function this.update_parts(enemy, monster, physical_param)
|
||||
end
|
||||
|
||||
if cached_config.dynamic.body_parts.part_health.visibility
|
||||
or cached_config.static.body_parts.part_health.visibility
|
||||
or cached_config.highlighted.body_parts.part_health.visibility then
|
||||
or cached_config.static.body_parts.part_health.visibility
|
||||
or cached_config.highlighted.body_parts.part_health.visibility then
|
||||
local part_vital = physical_param:call("getVital", 1, i);
|
||||
if part_vital ~= nil then
|
||||
local part_current = part_vital:call("get_Current") or -1;
|
||||
@@ -765,8 +772,8 @@ function this.update_parts(enemy, monster, physical_param)
|
||||
end
|
||||
|
||||
if cached_config.dynamic.body_parts.part_break.visibility
|
||||
or cached_config.static.body_parts.part_break.visibility
|
||||
or cached_config.highlighted.body_parts.part_break.visibility then
|
||||
or cached_config.static.body_parts.part_break.visibility
|
||||
or cached_config.highlighted.body_parts.part_break.visibility then
|
||||
local part_break_vital = physical_param:call("getVital", 2, i);
|
||||
if part_break_vital ~= nil then
|
||||
local part_break_current = part_break_vital:call("get_Current") or -1;
|
||||
@@ -784,8 +791,8 @@ function this.update_parts(enemy, monster, physical_param)
|
||||
end
|
||||
|
||||
if cached_config.dynamic.body_parts.part_loss.visibility
|
||||
or cached_config.static.body_parts.part_loss.visibility
|
||||
or cached_config.highlighted.body_parts.part_loss.visibility then
|
||||
or cached_config.static.body_parts.part_loss.visibility
|
||||
or cached_config.highlighted.body_parts.part_loss.visibility then
|
||||
local part_loss_vital = physical_param:call("getVital", 3, i);
|
||||
if part_loss_vital ~= nil then
|
||||
local part_loss_current = part_loss_vital:call("get_Current") or -1;
|
||||
@@ -807,6 +814,91 @@ function this.update_parts(enemy, monster, physical_param)
|
||||
end
|
||||
end
|
||||
|
||||
function this.update_anomaly_parts(enemy, monster, mystery_param)
|
||||
local cached_config = config.current_config.large_monster_UI;
|
||||
|
||||
if not cached_config.dynamic.enabled
|
||||
and not cached_config.static.enabled
|
||||
and not cached_config.highlighted.enabled then
|
||||
return;
|
||||
end
|
||||
|
||||
if not cached_config.dynamic.body_parts.visibility
|
||||
and not cached_config.static.body_parts.visibility
|
||||
and not cached_config.highlighted.body_parts.visibility then
|
||||
return;
|
||||
end
|
||||
|
||||
if not cached_config.dynamic.body_parts.part_anomaly.visibility
|
||||
and not cached_config.static.body_parts.part_anomaly.visibility
|
||||
and not cached_config.highlighted.body_parts.part_anomaly.visibility then
|
||||
return;
|
||||
end
|
||||
|
||||
if mystery_param == nil then
|
||||
mystery_param = mystery_param_field:get_data(enemy)
|
||||
if mystery_param == nil then
|
||||
return;
|
||||
end
|
||||
end
|
||||
|
||||
local core_parts_array = mystery_param:get_field("CoreParts");
|
||||
if core_parts_array == nil then
|
||||
customization_menu.status = "No core parts array";
|
||||
return;
|
||||
end
|
||||
|
||||
local core_parts_array_length = length_method:call(core_parts_array);
|
||||
if core_parts_array_length == nil then
|
||||
return;
|
||||
end
|
||||
|
||||
for i = 0, core_parts_array_length - 1 do
|
||||
|
||||
local part_id = i + 1;
|
||||
|
||||
local core_part = get_value_method:call(core_parts_array, i);
|
||||
if core_part == nil then
|
||||
goto continue
|
||||
end
|
||||
|
||||
local part = monster.parts[part_id];
|
||||
if part == nil then
|
||||
local part_name = part_names.get_part_name(monster.id, part_id);
|
||||
if part_name == nil then
|
||||
goto continue;
|
||||
else
|
||||
part = body_part.new(part_id, part_name);
|
||||
monster.parts[part_id] = part;
|
||||
end
|
||||
end
|
||||
|
||||
local part_vital = core_part:call("get_Vital");
|
||||
local part_is_active = core_part:get_IsActive();
|
||||
local part_dying_vital_threshold = core_part:get_DyingVitalThreashold();
|
||||
|
||||
if part_is_active == nil then
|
||||
part_is_active = false;
|
||||
end
|
||||
|
||||
if part_vital ~= nil then
|
||||
local part_current = part_vital:call("get_Current") or -1;
|
||||
local part_max = part_vital:call("get_Max") or -1;
|
||||
local part_is_enabled = part_vital:call("isEnable");
|
||||
|
||||
|
||||
if not part_is_enabled then
|
||||
goto continue;
|
||||
end
|
||||
|
||||
body_part.update_anomaly(part, part_current, part_max, part_is_active);
|
||||
|
||||
end
|
||||
|
||||
::continue::
|
||||
end
|
||||
end
|
||||
|
||||
function this.draw(monster, type, cached_config, position_on_screen, opacity_scale)
|
||||
local monster_UI;
|
||||
|
||||
|
||||
@@ -156,6 +156,7 @@ function this.update_large_monster(enemy)
|
||||
if quest_status.is_online and players.myself.id ~= 0 then
|
||||
local physical_param = large_monster.update_health(enemy, monster);
|
||||
pcall(large_monster.update_parts, enemy, monster, physical_param);
|
||||
pcall(large_monster.update_anomaly_parts, enemy, monster, nil);
|
||||
end
|
||||
|
||||
large_monster.update(enemy, monster);
|
||||
@@ -214,6 +215,7 @@ function this.update_health(enemy_damage_check)
|
||||
|
||||
local physical_param = large_monster.update_health(enemy, monster);
|
||||
pcall(large_monster.update_parts, enemy, monster, physical_param);
|
||||
pcall(large_monster.update_anomaly_parts, enemy, monster, nil);
|
||||
else
|
||||
local monster = small_monster.get_monster(enemy);
|
||||
small_monster.update_health(enemy, monster);
|
||||
|
||||
@@ -47,171 +47,279 @@ local os = os;
|
||||
local ValueType = ValueType;
|
||||
local package = package;
|
||||
|
||||
this.large_monster_UI_parts_sorting_types = {};
|
||||
this.displayed_large_monster_UI_parts_sorting_types = {};
|
||||
|
||||
this.large_monster_UI_parts_filter_types = {};
|
||||
this.displayed_large_monster_UI_parts_filter_types = {};
|
||||
|
||||
function this.init()
|
||||
local default = language.default_language.customization_menu;
|
||||
local current = language.current_language.customization_menu;
|
||||
|
||||
this.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,
|
||||
default.anomaly_health,
|
||||
default.anomaly_health_percentage
|
||||
};
|
||||
|
||||
this.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,
|
||||
current.anomaly_health,
|
||||
current.anomaly_health_percentage
|
||||
};
|
||||
|
||||
this.large_monster_UI_parts_filter_types =
|
||||
{
|
||||
default.current_state,
|
||||
default.default_state
|
||||
};
|
||||
|
||||
this.displayed_large_monster_UI_parts_filter_types =
|
||||
{
|
||||
current.current_state,
|
||||
current.default_state
|
||||
};
|
||||
end
|
||||
|
||||
function this.draw(cached_config)
|
||||
local cached_language = language.current_language.customization_menu;
|
||||
|
||||
local changed = false;
|
||||
local config_changed = false;
|
||||
local index = 0;
|
||||
|
||||
if imgui.tree_node(language.current_language.customization_menu.body_parts) then
|
||||
if imgui.tree_node(cached_language.body_parts) then
|
||||
changed, cached_config.visibility = imgui.checkbox(
|
||||
language.current_language.customization_menu.visible, cached_config.visibility);
|
||||
cached_language.visible, cached_config.visibility);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
if imgui.tree_node(language.current_language.customization_menu.offset) then
|
||||
if imgui.tree_node(cached_language.offset) then
|
||||
changed, cached_config.offset.x = imgui.drag_float(
|
||||
language.current_language.customization_menu.x, cached_config.offset.x, 0.1, -screen.width, screen.width, "%.1f");
|
||||
cached_language.x, cached_config.offset.x, 0.1, -screen.width, screen.width, "%.1f");
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, cached_config.offset.y = imgui.drag_float(
|
||||
language.current_language.customization_menu.y, cached_config.offset.y, 0.1, -screen.height, screen.height, "%.1f");
|
||||
cached_language.y, cached_config.offset.y, 0.1, -screen.height, screen.height, "%.1f");
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
imgui.tree_pop();
|
||||
end
|
||||
|
||||
if imgui.tree_node(language.current_language.customization_menu.spacing) then
|
||||
if imgui.tree_node(cached_language.spacing) then
|
||||
changed, cached_config.spacing.x = imgui.drag_float(
|
||||
language.current_language.customization_menu.x, cached_config.spacing.x, 0.1, -screen.width, screen.width, "%.1f");
|
||||
cached_language.x, cached_config.spacing.x, 0.1, -screen.width, screen.width, "%.1f");
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, cached_config.spacing.y = imgui.drag_float(
|
||||
language.current_language.customization_menu.y, cached_config.spacing.y, 0.1, -screen.height, screen.height, "%.1f");
|
||||
cached_language.y, cached_config.spacing.y, 0.1, -screen.height, screen.height, "%.1f");
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
imgui.tree_pop();
|
||||
end
|
||||
|
||||
if imgui.tree_node(language.current_language.customization_menu.settings) then
|
||||
if imgui.tree_node(cached_language.settings) then
|
||||
changed, cached_config.settings.hide_undamaged_parts = imgui.checkbox(
|
||||
language.current_language.customization_menu.hide_undamaged_parts, cached_config.settings.hide_undamaged_parts);
|
||||
cached_language.hide_undamaged_parts, cached_config.settings.hide_undamaged_parts);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, index = imgui.combo(language.current_language.customization_menu.filter_mode,
|
||||
utils.table.find_index(customization_menu.large_monster_UI_parts_filter_types, cached_config.settings.filter_mode),
|
||||
customization_menu.displayed_large_monster_UI_parts_filter_types);
|
||||
changed, cached_config.settings.render_inactive_anomaly_cores = imgui.checkbox(
|
||||
cached_language.render_inactive_anomaly_cores, cached_config.settings.render_inactive_anomaly_cores);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, index = imgui.combo(cached_language.filter_mode,
|
||||
utils.table.find_index(this.large_monster_UI_parts_filter_types, cached_config.settings.filter_mode),
|
||||
this.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];
|
||||
cached_config.settings.filter_mode = this.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");
|
||||
cached_language.time_limit, cached_config.settings.time_limit, 0.1, 0, 99999, "%.1f");
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
imgui.tree_pop();
|
||||
end
|
||||
|
||||
if imgui.tree_node(language.current_language.customization_menu.sorting) then
|
||||
if imgui.tree_node(cached_language.sorting) then
|
||||
changed, index = imgui.combo(
|
||||
language.current_language.customization_menu.type,
|
||||
utils.table.find_index(customization_menu.large_monster_UI_parts_sorting_types, cached_config.sorting.type),
|
||||
customization_menu.displayed_large_monster_UI_parts_sorting_types);
|
||||
cached_language.type,
|
||||
utils.table.find_index(this.large_monster_UI_parts_sorting_types, cached_config.sorting.type),
|
||||
this.displayed_large_monster_UI_parts_sorting_types);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
if changed then
|
||||
cached_config.sorting.type = customization_menu.large_monster_UI_parts_sorting_types[index];
|
||||
cached_config.sorting.type = this.large_monster_UI_parts_sorting_types[index];
|
||||
end
|
||||
|
||||
changed, cached_config.sorting.reversed_order = imgui.checkbox(
|
||||
language.current_language.customization_menu.reversed_order, cached_config.sorting.reversed_order);
|
||||
cached_language.reversed_order, cached_config.sorting.reversed_order);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
imgui.tree_pop();
|
||||
end
|
||||
|
||||
if imgui.tree_node(language.current_language.customization_menu.filter) then
|
||||
changed, cached_config.filter.health_break_severe = imgui.checkbox(
|
||||
language.current_language.customization_menu.health_break_severe_filter, cached_config.filter.health_break_severe);
|
||||
if imgui.tree_node(cached_language.filter) then
|
||||
changed, cached_config.filter.health_break_sever_anomaly = imgui.checkbox(
|
||||
cached_language.health_break_sever_anomaly_filter, cached_config.filter.health_break_sever_anomaly);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
|
||||
|
||||
changed, cached_config.filter.health_break_sever = imgui.checkbox(
|
||||
cached_language.health_break_sever_filter, cached_config.filter.health_break_sever);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, cached_config.filter.health_break_anomaly = imgui.checkbox(
|
||||
cached_language.health_break_anomaly_filter, cached_config.filter.health_break_anomaly);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, cached_config.filter.health_sever_anomaly = imgui.checkbox(
|
||||
cached_language.health_sever_anomaly_filter, cached_config.filter.health_sever_anomaly);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, cached_config.filter.break_sever_anomaly = imgui.checkbox(
|
||||
cached_language.break_sever_anomaly_filter, cached_config.filter.break_sever_anomaly);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
|
||||
|
||||
changed, cached_config.filter.health_break = imgui.checkbox(
|
||||
language.current_language.customization_menu.health_break_filter, cached_config.filter.health_break);
|
||||
cached_language.health_break_filter, cached_config.filter.health_break);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, cached_config.filter.health_severe = imgui.checkbox(
|
||||
language.current_language.customization_menu.health_severe_filter, cached_config.filter.health_severe);
|
||||
changed, cached_config.filter.health_sever = imgui.checkbox(
|
||||
cached_language.health_sever_filter, cached_config.filter.health_sever);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, cached_config.filter.health_anomaly = imgui.checkbox(
|
||||
cached_language.health_anomaly_filter, cached_config.filter.health_anomaly);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
|
||||
|
||||
changed, cached_config.filter.break_sever = imgui.checkbox(
|
||||
cached_language.break_sever_filter, cached_config.filter.break_sever);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, cached_config.filter.break_anomaly = imgui.checkbox(
|
||||
cached_language.break_anomaly_filter, cached_config.filter.break_anomaly);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, cached_config.filter.sever_anomaly = imgui.checkbox(
|
||||
cached_language.sever_anomaly_filter, cached_config.filter.sever_anomaly);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
|
||||
|
||||
changed, cached_config.filter.health = imgui.checkbox(
|
||||
language.current_language.customization_menu.health_filter, cached_config.filter.health);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, cached_config.filter.break_severe = imgui.checkbox(
|
||||
language.current_language.customization_menu.break_severe_filter, cached_config.filter.break_severe);
|
||||
cached_language.health_filter, cached_config.filter.health);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, cached_config.filter.break_ = imgui.checkbox(
|
||||
language.current_language.customization_menu.break_filter, cached_config.filter.break_);
|
||||
cached_language.break_filter, cached_config.filter.break_);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, cached_config.filter.severe = imgui.checkbox(
|
||||
language.current_language.customization_menu.severe_filter, cached_config.filter.severe);
|
||||
changed, cached_config.filter.sever = imgui.checkbox(
|
||||
cached_language.sever_filter, cached_config.filter.sever);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, cached_config.filter.anomaly = imgui.checkbox(
|
||||
cached_language.anomaly_filter, cached_config.filter.anomaly);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
imgui.tree_pop();
|
||||
end
|
||||
|
||||
if imgui.tree_node(language.current_language.customization_menu.part_name_label) then
|
||||
if imgui.tree_node(cached_language.part_name_label) then
|
||||
changed, cached_config.part_name_label.visibility = imgui.checkbox(
|
||||
language.current_language.customization_menu.visible, cached_config.part_name_label.visibility);
|
||||
cached_language.visible, cached_config.part_name_label.visibility);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
if imgui.tree_node(language.current_language.customization_menu.include) then
|
||||
if imgui.tree_node(cached_language.include) then
|
||||
changed, cached_config.part_name_label.include.part_name = imgui.checkbox(
|
||||
language.current_language.customization_menu.part_name, cached_config.part_name_label.include.part_name);
|
||||
cached_language.part_name, cached_config.part_name_label.include.part_name);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, cached_config.part_name_label.include.flinch_count = imgui.checkbox(
|
||||
language.current_language.customization_menu.flinch_count, cached_config.part_name_label.include.flinch_count);
|
||||
cached_language.flinch_count, cached_config.part_name_label.include.flinch_count);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, cached_config.part_name_label.include.break_count = imgui.checkbox(
|
||||
language.current_language.customization_menu.break_count, cached_config.part_name_label.include.break_count);
|
||||
cached_language.break_count, cached_config.part_name_label.include.break_count);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, cached_config.part_name_label.include.break_max_count = imgui.checkbox(
|
||||
language.current_language.customization_menu.break_max_count, cached_config.part_name_label.include.break_max_count);
|
||||
cached_language.break_max_count, cached_config.part_name_label.include.break_max_count);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
imgui.tree_pop();
|
||||
end
|
||||
|
||||
if imgui.tree_node(language.current_language.customization_menu.offset) then
|
||||
if imgui.tree_node(cached_language.offset) then
|
||||
changed, cached_config.part_name_label.offset.x = imgui.drag_float(
|
||||
language.current_language.customization_menu.x, cached_config.part_name_label.offset.x, 0.1, -screen.width, screen.width, "%.1f");
|
||||
cached_language.x, cached_config.part_name_label.offset.x, 0.1, -screen.width, screen.width, "%.1f");
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, cached_config.part_name_label.offset.y = imgui.drag_float(
|
||||
language.current_language.customization_menu.y, cached_config.part_name_label.offset.y, 0.1, -screen.height, screen.height, "%.1f");
|
||||
cached_language.y, cached_config.part_name_label.offset.y, 0.1, -screen.height, screen.height, "%.1f");
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
imgui.tree_pop();
|
||||
end
|
||||
|
||||
if imgui.tree_node(language.current_language.customization_menu.color) then
|
||||
if imgui.tree_node(cached_language.color) then
|
||||
changed, cached_config.part_name_label.color = imgui.color_picker_argb(
|
||||
"", cached_config.part_name_label.color, customization_menu.color_picker_flags);
|
||||
|
||||
@@ -220,21 +328,21 @@ function this.draw(cached_config)
|
||||
imgui.tree_pop();
|
||||
end
|
||||
|
||||
if imgui.tree_node(language.current_language.customization_menu.shadow) then
|
||||
if imgui.tree_node(cached_language.shadow) then
|
||||
changed, cached_config.part_name_label.shadow.visibility = imgui.checkbox(
|
||||
language.current_language.customization_menu.visible, cached_config.part_name_label.shadow.visibility);
|
||||
cached_language.visible, cached_config.part_name_label.shadow.visibility);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
if imgui.tree_node(language.current_language.customization_menu.offset) then
|
||||
if imgui.tree_node(cached_language.offset) then
|
||||
changed, cached_config.part_name_label.shadow.offset.x = imgui.drag_float(
|
||||
language.current_language.customization_menu.x, cached_config.part_name_label.shadow.offset.x,
|
||||
cached_language.x, cached_config.part_name_label.shadow.offset.x,
|
||||
0.1, -screen.width, screen.width, "%.1f");
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, cached_config.part_name_label.shadow.offset.y = imgui.drag_float(
|
||||
language.current_language.customization_menu.y, cached_config.part_name_label.shadow.offset.y,
|
||||
cached_language.y, cached_config.part_name_label.shadow.offset.y,
|
||||
0.1, -screen.height, screen.height, "%.1f");
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
@@ -242,7 +350,7 @@ function this.draw(cached_config)
|
||||
imgui.tree_pop();
|
||||
end
|
||||
|
||||
if imgui.tree_node(language.current_language.customization_menu.color) then
|
||||
if imgui.tree_node(cached_language.color) then
|
||||
changed, cached_config.part_name_label.shadow.color = imgui.color_picker_argb(
|
||||
"",cached_config.part_name_label.shadow.color, customization_menu.color_picker_flags);
|
||||
|
||||
@@ -257,106 +365,141 @@ function this.draw(cached_config)
|
||||
imgui.tree_pop();
|
||||
end
|
||||
|
||||
if imgui.tree_node(language.current_language.customization_menu.part_health) then
|
||||
if imgui.tree_node(cached_language.part_health) then
|
||||
changed, cached_config.part_health.visibility = imgui.checkbox(
|
||||
language.current_language.customization_menu.visible, cached_config.part_health.visibility);
|
||||
cached_language.visible, cached_config.part_health.visibility);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
if imgui.tree_node(language.current_language.customization_menu.offset) then
|
||||
if imgui.tree_node(cached_language.offset) then
|
||||
changed, cached_config.part_health.offset.x = imgui.drag_float(
|
||||
language.current_language.customization_menu.x, cached_config.part_health.offset.x, 0.1, -screen.width, screen.width, "%.1f");
|
||||
cached_language.x, cached_config.part_health.offset.x, 0.1, -screen.width, screen.width, "%.1f");
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, cached_config.part_health.offset.y = imgui.drag_float(
|
||||
language.current_language.customization_menu.y, cached_config.part_health.offset.y, 0.1, -screen.height, screen.height, "%.1f");
|
||||
cached_language.y, cached_config.part_health.offset.y, 0.1, -screen.height, screen.height, "%.1f");
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
imgui.tree_pop();
|
||||
end
|
||||
|
||||
changed = label_customization.draw(language.current_language.customization_menu.text_label, cached_config.part_health.text_label);
|
||||
changed = label_customization.draw(cached_language.text_label, cached_config.part_health.text_label);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed = label_customization.draw(language.current_language.customization_menu.value_label, cached_config.part_health.value_label);
|
||||
changed = label_customization.draw(cached_language.value_label, cached_config.part_health.value_label);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed = label_customization.draw(language.current_language.customization_menu.percentage_label, cached_config.part_health.percentage_label);
|
||||
changed = label_customization.draw(cached_language.percentage_label, cached_config.part_health.percentage_label);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed = bar_customization.draw(language.current_language.customization_menu.bar, cached_config.part_health.bar);
|
||||
changed = bar_customization.draw(cached_language.bar, cached_config.part_health.bar);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
imgui.tree_pop();
|
||||
end
|
||||
|
||||
if imgui.tree_node(language.current_language.customization_menu.break_health) then
|
||||
if imgui.tree_node(cached_language.break_health) then
|
||||
changed, cached_config.part_break.visibility = imgui.checkbox(
|
||||
language.current_language.customization_menu.visible, cached_config.part_break.visibility);
|
||||
cached_language.visible, cached_config.part_break.visibility);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
if imgui.tree_node(language.current_language.customization_menu.offset) then
|
||||
if imgui.tree_node(cached_language.offset) then
|
||||
changed, cached_config.part_break.offset.x = imgui.drag_float(
|
||||
language.current_language.customization_menu.x, cached_config.part_break.offset.x, 0.1, -screen.width, screen.width, "%.1f");
|
||||
cached_language.x, cached_config.part_break.offset.x, 0.1, -screen.width, screen.width, "%.1f");
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, cached_config.part_break.offset.y = imgui.drag_float(
|
||||
language.current_language.customization_menu.y, cached_config.part_break.offset.y, 0.1, -screen.height, screen.height, "%.1f");
|
||||
cached_language.y, cached_config.part_break.offset.y, 0.1, -screen.height, screen.height, "%.1f");
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
imgui.tree_pop();
|
||||
end
|
||||
|
||||
changed = label_customization.draw(language.current_language.customization_menu.text_label, cached_config.part_break.text_label);
|
||||
changed = label_customization.draw(cached_language.text_label, cached_config.part_break.text_label);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed = label_customization.draw(language.current_language.customization_menu.value_label, cached_config.part_break.value_label);
|
||||
changed = label_customization.draw(cached_language.value_label, cached_config.part_break.value_label);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed = label_customization.draw(language.current_language.customization_menu.percentage_label, cached_config.part_break.percentage_label);
|
||||
changed = label_customization.draw(cached_language.percentage_label, cached_config.part_break.percentage_label);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed = bar_customization.draw(language.current_language.customization_menu.bar, cached_config.part_break.bar);
|
||||
changed = bar_customization.draw(cached_language.bar, cached_config.part_break.bar);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
imgui.tree_pop();
|
||||
end
|
||||
|
||||
if imgui.tree_node(language.current_language.customization_menu.loss_health) then
|
||||
if imgui.tree_node(cached_language.loss_health) then
|
||||
changed, cached_config.part_loss.visibility = imgui.checkbox(
|
||||
language.current_language.customization_menu.visible, cached_config.part_loss.visibility);
|
||||
cached_language.visible, cached_config.part_loss.visibility);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
if imgui.tree_node(language.current_language.customization_menu.offset) then
|
||||
if imgui.tree_node(cached_language.offset) then
|
||||
changed, cached_config.part_loss.offset.x = imgui.drag_float(
|
||||
language.current_language.customization_menu.x, cached_config.part_loss.offset.x, 0.1, -screen.width, screen.width, "%.1f");
|
||||
cached_language.x, cached_config.part_loss.offset.x, 0.1, -screen.width, screen.width, "%.1f");
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, cached_config.part_loss.offset.y = imgui.drag_float(
|
||||
language.current_language.customization_menu.y, cached_config.part_loss.offset.y, 0.1, -screen.height, screen.height, "%.1f");
|
||||
cached_language.y, cached_config.part_loss.offset.y, 0.1, -screen.height, screen.height, "%.1f");
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
imgui.tree_pop();
|
||||
end
|
||||
|
||||
changed = label_customization.draw(language.current_language.customization_menu.text_label, cached_config.part_loss.text_label);
|
||||
changed = label_customization.draw(cached_language.text_label, cached_config.part_loss.text_label);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed = label_customization.draw(language.current_language.customization_menu.value_label, cached_config.part_loss.value_label);
|
||||
changed = label_customization.draw(cached_language.value_label, cached_config.part_loss.value_label);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed = label_customization.draw(language.current_language.customization_menu.percentage_label, cached_config.part_loss.percentage_label);
|
||||
changed = label_customization.draw(cached_language.percentage_label, cached_config.part_loss.percentage_label);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed = bar_customization.draw(language.current_language.customization_menu.bar, cached_config.part_loss.bar);
|
||||
changed = bar_customization.draw(cached_language.bar, cached_config.part_loss.bar);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
imgui.tree_pop();
|
||||
end
|
||||
|
||||
if imgui.tree_node(cached_language.anomaly_health) then
|
||||
changed, cached_config.part_anomaly.visibility = imgui.checkbox(
|
||||
cached_language.visible, cached_config.part_anomaly.visibility);
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
if imgui.tree_node(cached_language.offset) then
|
||||
changed, cached_config.part_anomaly.offset.x = imgui.drag_float(
|
||||
cached_language.x, cached_config.part_anomaly.offset.x, 0.1, -screen.width, screen.width, "%.1f");
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed, cached_config.part_anomaly.offset.y = imgui.drag_float(
|
||||
cached_language.y, cached_config.part_anomaly.offset.y, 0.1, -screen.height, screen.height, "%.1f");
|
||||
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
imgui.tree_pop();
|
||||
end
|
||||
|
||||
changed = label_customization.draw(cached_language.text_label, cached_config.part_anomaly.text_label);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed = label_customization.draw(cached_language.value_label, cached_config.part_anomaly.value_label);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed = label_customization.draw(cached_language.percentage_label, cached_config.part_anomaly.percentage_label);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
changed = bar_customization.draw(cached_language.bar, cached_config.part_anomaly.bar);
|
||||
config_changed = config_changed or changed;
|
||||
|
||||
imgui.tree_pop();
|
||||
|
||||
@@ -36,9 +36,11 @@ local os = os;
|
||||
local ValueType = ValueType;
|
||||
local package = package;
|
||||
|
||||
function this.new(part_visibility, part_name_label, flinch_visibility, flinch_bar, flinch_text_label,
|
||||
flinch_value_label, flinch_percentage_label, break_visibility, break_bar, break_text_label, break_value_label,
|
||||
break_percentage_label, loss_visibility, loss_bar, loss_text_label, loss_value_label, loss_health_percentage_label)
|
||||
function this.new(part_visibility, part_name_label,
|
||||
flinch_visibility, flinch_bar, flinch_text_label, flinch_value_label, flinch_percentage_label,
|
||||
break_visibility, break_bar, break_text_label, break_value_label, break_percentage_label,
|
||||
loss_visibility, loss_bar, loss_text_label, loss_value_label, loss_health_percentage_label,
|
||||
anomaly_visibility, anomaly_bar, anomaly_text_label, anomaly_value_label, anomaly_health_percentage_label)
|
||||
|
||||
local global_scale_modifier = config.current_config.global_settings.modifiers.global_scale_modifier;
|
||||
|
||||
@@ -48,6 +50,7 @@ function this.new(part_visibility, part_name_label, flinch_visibility, flinch_ba
|
||||
entity.flinch_visibility = flinch_visibility;
|
||||
entity.break_visibility = break_visibility;
|
||||
entity.loss_visibility = loss_visibility;
|
||||
entity.anomaly_visibility = anomaly_visibility;
|
||||
|
||||
entity.part_name_label = utils.table.deep_copy(part_name_label);
|
||||
|
||||
@@ -117,6 +120,27 @@ function this.new(part_visibility, part_name_label, flinch_visibility, flinch_ba
|
||||
entity.loss_health_percentage_label.offset.x = entity.loss_health_percentage_label.offset.x * global_scale_modifier;
|
||||
entity.loss_health_percentage_label.offset.y = entity.loss_health_percentage_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.anomaly_bar = utils.table.deep_copy(anomaly_bar);
|
||||
entity.anomaly_text_label = utils.table.deep_copy(anomaly_text_label);
|
||||
entity.anomaly_value_label = utils.table.deep_copy(anomaly_value_label);
|
||||
entity.anomaly_health_percentage_label = utils.table.deep_copy(anomaly_health_percentage_label);
|
||||
|
||||
entity.anomaly_bar.offset.x = entity.anomaly_bar.offset.x * global_scale_modifier;
|
||||
entity.anomaly_bar.offset.y = entity.anomaly_bar.offset.y * global_scale_modifier;
|
||||
entity.anomaly_bar.size.width = entity.anomaly_bar.size.width * global_scale_modifier;
|
||||
entity.anomaly_bar.size.height = entity.anomaly_bar.size.height * global_scale_modifier;
|
||||
entity.anomaly_bar.outline.thickness = entity.anomaly_bar.outline.thickness * global_scale_modifier;
|
||||
entity.anomaly_bar.outline.offset = entity.anomaly_bar.outline.offset * global_scale_modifier;
|
||||
|
||||
entity.anomaly_text_label.offset.x = entity.anomaly_text_label.offset.x * global_scale_modifier;
|
||||
entity.anomaly_text_label.offset.y = entity.anomaly_text_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.anomaly_value_label.offset.x = entity.anomaly_value_label.offset.x * global_scale_modifier;
|
||||
entity.anomaly_value_label.offset.y = entity.anomaly_value_label.offset.y * global_scale_modifier;
|
||||
|
||||
entity.anomaly_health_percentage_label.offset.x = entity.anomaly_health_percentage_label.offset.x * global_scale_modifier;
|
||||
entity.anomaly_health_percentage_label.offset.y = entity.anomaly_health_percentage_label.offset.y * global_scale_modifier;
|
||||
|
||||
return entity;
|
||||
end
|
||||
|
||||
@@ -127,9 +151,10 @@ function this.draw(part, part_UI, cached_config, position_on_screen, opacity_sca
|
||||
|
||||
local draw_health = part_UI.flinch_visibility and part.max_health > 0;
|
||||
local draw_break = part_UI.break_visibility and part.break_max_health > 0 and part.break_count < part.break_max_count;
|
||||
local draw_severe = part_UI.loss_visibility and part.loss_max_health > 0 and not part.is_severed;
|
||||
local draw_sever = part_UI.loss_visibility and part.loss_max_health > 0 and not part.is_severed;
|
||||
local draw_anomaly = part_UI.anomaly_visibility and part.anomaly_max_health > 0 and (part.anomaly_is_active or cached_config.settings.render_inactive_anomaly_cores);
|
||||
|
||||
if not draw_health and not draw_break and not draw_severe then
|
||||
if not draw_health and not draw_break and not draw_sever and not draw_anomaly then
|
||||
return;
|
||||
end
|
||||
|
||||
@@ -186,7 +211,7 @@ function this.draw(part, part_UI, cached_config, position_on_screen, opacity_sca
|
||||
|
||||
-- loss health value string
|
||||
local loss_health_string = "";
|
||||
if draw_severe then
|
||||
if draw_sever then
|
||||
local include_loss_health_current_value = part_UI.loss_value_label.include.current_value;
|
||||
local include_loss_health_max_value = part_UI.loss_value_label.include.max_value;
|
||||
|
||||
@@ -199,22 +224,39 @@ function this.draw(part, part_UI, cached_config, position_on_screen, opacity_sca
|
||||
end
|
||||
end
|
||||
|
||||
-- anomaly health value string
|
||||
local anomaly_health_string = "";
|
||||
if draw_anomaly then
|
||||
local include_anomaly_health_current_value = part_UI.anomaly_value_label.include.current_value;
|
||||
local include_anomaly_health_max_value = part_UI.anomaly_value_label.include.max_value;
|
||||
|
||||
if include_anomaly_health_current_value and include_anomaly_health_max_value then
|
||||
anomaly_health_string = string.format("%.0f/%.0f", part.anomaly_health, part.anomaly_max_health);
|
||||
elseif include_anomaly_health_current_value then
|
||||
anomaly_health_string = string.format("%.0f", part.anomaly_health);
|
||||
elseif include_anomaly_health_max_value then
|
||||
anomaly_health_string = string.format("%.0f", part.anomaly_max_health);
|
||||
end
|
||||
end
|
||||
|
||||
local flinch_position_on_screen = {
|
||||
x = position_on_screen.x + cached_config.part_health.offset.x,
|
||||
y = position_on_screen.y + cached_config.part_health.offset.y,
|
||||
visibility = part_UI.flinch_visibility
|
||||
};
|
||||
|
||||
local break_position_on_screen = {
|
||||
x = position_on_screen.x + cached_config.part_break.offset.x,
|
||||
y = position_on_screen.y + cached_config.part_break.offset.y,
|
||||
visibility = part_UI.flinch_visibility
|
||||
};
|
||||
|
||||
local loss_position_on_screen = {
|
||||
x = position_on_screen.x + cached_config.part_loss.offset.x,
|
||||
y = position_on_screen.y + cached_config.part_loss.offset.y,
|
||||
part_UI = part_UI.loss_visibility
|
||||
};
|
||||
|
||||
local anomaly_position_on_screen = {
|
||||
x = position_on_screen.x + cached_config.part_anomaly.offset.x,
|
||||
y = position_on_screen.y + cached_config.part_anomaly.offset.y,
|
||||
};
|
||||
|
||||
if draw_health then
|
||||
@@ -225,10 +267,14 @@ function this.draw(part, part_UI, cached_config, position_on_screen, opacity_sca
|
||||
drawing.draw_bar(part_UI.break_bar, break_position_on_screen, opacity_scale, part.break_health_percentage);
|
||||
end
|
||||
|
||||
if draw_severe then
|
||||
if draw_sever then
|
||||
drawing.draw_bar(part_UI.loss_bar, loss_position_on_screen, opacity_scale, part.loss_health_percentage);
|
||||
end
|
||||
|
||||
if draw_anomaly then
|
||||
drawing.draw_bar(part_UI.anomaly_bar, anomaly_position_on_screen, opacity_scale, part.anomaly_health_percentage);
|
||||
end
|
||||
|
||||
drawing.draw_label(part_UI.part_name_label, position_on_screen, opacity_scale, part_name);
|
||||
|
||||
if draw_health then
|
||||
@@ -243,11 +289,17 @@ function this.draw(part, part_UI, cached_config, position_on_screen, opacity_sca
|
||||
drawing.draw_label(part_UI.break_percentage_label, break_position_on_screen, opacity_scale, 100 * part.break_health_percentage);
|
||||
end
|
||||
|
||||
if draw_severe then
|
||||
if draw_sever then
|
||||
drawing.draw_label(part_UI.loss_text_label, loss_position_on_screen, opacity_scale);
|
||||
drawing.draw_label(part_UI.loss_value_label, loss_position_on_screen, opacity_scale, loss_health_string);
|
||||
drawing.draw_label(part_UI.loss_health_percentage_label, loss_position_on_screen, opacity_scale, 100 * part.loss_health_percentage);
|
||||
end
|
||||
|
||||
if draw_anomaly then
|
||||
drawing.draw_label(part_UI.anomaly_text_label, anomaly_position_on_screen, opacity_scale);
|
||||
drawing.draw_label(part_UI.anomaly_value_label, anomaly_position_on_screen, opacity_scale, anomaly_health_string);
|
||||
drawing.draw_label(part_UI.anomaly_health_percentage_label, anomaly_position_on_screen, opacity_scale, 100 * part.anomaly_health_percentage);
|
||||
end
|
||||
end
|
||||
|
||||
function this.init_module()
|
||||
|
||||
@@ -82,12 +82,6 @@ this.displayed_anchor_types = {};
|
||||
this.monster_UI_sorting_types = {};
|
||||
this.displayed_monster_UI_sorting_types = {};
|
||||
|
||||
this.large_monster_UI_parts_sorting_types = {};
|
||||
this.displayed_large_monster_UI_parts_sorting_types = {};
|
||||
|
||||
this.large_monster_UI_parts_filter_types = {};
|
||||
this.displayed_large_monster_UI_parts_filter_types = {};
|
||||
|
||||
this.buff_UI_sorting_types = {};
|
||||
this.displayed_buff_UI_sorting_types = {};
|
||||
|
||||
@@ -169,6 +163,7 @@ function this.init()
|
||||
bar_customization.init();
|
||||
ailments_customization.init();
|
||||
ailment_buildups_customization.init();
|
||||
body_parts_customization.init();
|
||||
|
||||
this.orientation_types =
|
||||
{
|
||||
@@ -214,44 +209,6 @@ function this.init()
|
||||
current.distance
|
||||
};
|
||||
|
||||
this.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
|
||||
};
|
||||
|
||||
this.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
|
||||
};
|
||||
|
||||
this.large_monster_UI_parts_filter_types =
|
||||
{
|
||||
default.current_state,
|
||||
default.default_state
|
||||
};
|
||||
|
||||
this.displayed_large_monster_UI_parts_filter_types =
|
||||
{
|
||||
current.current_state,
|
||||
current.default_state
|
||||
};
|
||||
|
||||
this.buff_UI_sorting_types =
|
||||
{
|
||||
default.name,
|
||||
|
||||
Reference in New Issue
Block a user