mirror of
https://github.com/GreenComfyTea/MHR-Overlay.git
synced 2026-01-24 04:18:11 -08:00
Fix DPS freezing on quest end + total cart count
This commit is contained in:
@@ -69,7 +69,6 @@ time.init_module();
|
|||||||
|
|
||||||
language.init_module();
|
language.init_module();
|
||||||
config.init_module();
|
config.init_module();
|
||||||
quest_status.init_module();
|
|
||||||
part_names.init_module();
|
part_names.init_module();
|
||||||
|
|
||||||
damage_UI_entity.init_module();
|
damage_UI_entity.init_module();
|
||||||
@@ -82,6 +81,7 @@ body_part_UI_entity.init_module();
|
|||||||
|
|
||||||
damage_hook.init_module();
|
damage_hook.init_module();
|
||||||
player.init_module();
|
player.init_module();
|
||||||
|
quest_status.init_module();
|
||||||
|
|
||||||
env_creature_hook.init_module();
|
env_creature_hook.init_module();
|
||||||
env_creature.init_module();
|
env_creature.init_module();
|
||||||
@@ -179,11 +179,9 @@ local function main_loop()
|
|||||||
screen.update_window_size();
|
screen.update_window_size();
|
||||||
player.update_myself_position();
|
player.update_myself_position();
|
||||||
quest_status.update_is_online();
|
quest_status.update_is_online();
|
||||||
quest_status.update_is_quest_host();
|
--quest_status.update_is_quest_host();
|
||||||
time.tick();
|
time.tick();
|
||||||
|
|
||||||
--xy = xy .. quest_status.get_flow_state(quest_status.flow_state, true);
|
|
||||||
|
|
||||||
player.update_player_list(quest_status.index >= 2);
|
player.update_player_list(quest_status.index >= 2);
|
||||||
|
|
||||||
if quest_status.flow_state == quest_status.flow_states.IN_LOBBY then
|
if quest_status.flow_state == quest_status.flow_states.IN_LOBBY then
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ local small_monster;
|
|||||||
local large_monster;
|
local large_monster;
|
||||||
local ailments;
|
local ailments;
|
||||||
local table_helpers;
|
local table_helpers;
|
||||||
|
local singletons;
|
||||||
|
|
||||||
local enemy_character_base_type_def = sdk.find_type_definition("snow.enemy.EnemyCharacterBase");
|
local enemy_character_base_type_def = sdk.find_type_definition("snow.enemy.EnemyCharacterBase");
|
||||||
local enemy_character_base_after_calc_damage_damage_side_method = enemy_character_base_type_def:get_method("afterCalcDamage_DamageSide");
|
local enemy_character_base_after_calc_damage_damage_side_method = enemy_character_base_type_def:get_method("afterCalcDamage_DamageSide");
|
||||||
@@ -201,6 +202,8 @@ function damage_hook.cart(dead_player_id, flag_cat_skill_insurance)
|
|||||||
end
|
end
|
||||||
|
|
||||||
player_.cart_count = player_.cart_count + 1;
|
player_.cart_count = player_.cart_count + 1;
|
||||||
|
|
||||||
|
quest_status.get_cart_count();
|
||||||
end
|
end
|
||||||
|
|
||||||
--function damage_hook.on_get_finish_shoot_wall_hit_damage_rate(enemy, rate, is_part_damage)
|
--function damage_hook.on_get_finish_shoot_wall_hit_damage_rate(enemy, rate, is_part_damage)
|
||||||
@@ -218,6 +221,7 @@ function damage_hook.init_module()
|
|||||||
large_monster = require("MHR_Overlay.Monsters.large_monster");
|
large_monster = require("MHR_Overlay.Monsters.large_monster");
|
||||||
ailments = require("MHR_Overlay.Monsters.ailments");
|
ailments = require("MHR_Overlay.Monsters.ailments");
|
||||||
table_helpers = require("MHR_Overlay.Misc.table_helpers");
|
table_helpers = require("MHR_Overlay.Misc.table_helpers");
|
||||||
|
singletons = require("MHR_Overlay.Game_Handler.singletons");
|
||||||
|
|
||||||
--sdk.hook(get_finish_shoot_wall_hit_damage_rate_method, function(args)
|
--sdk.hook(get_finish_shoot_wall_hit_damage_rate_method, function(args)
|
||||||
-- pcall(damage_hook.on_get_finish_shoot_wall_hit_damage_rate, sdk.to_managed_object(args[2]), sdk.to_float(args[3]), sdk.to_int64(args--[4]));
|
-- pcall(damage_hook.on_get_finish_shoot_wall_hit_damage_rate, sdk.to_managed_object(args[2]), sdk.to_float(args[3]), sdk.to_int64(args--[4]));
|
||||||
|
|||||||
@@ -511,7 +511,8 @@ function player.init_total_UI(_player)
|
|||||||
_player.damage_UI = {
|
_player.damage_UI = {
|
||||||
total_damage_label = table_helpers.deep_copy(cached_config.total_damage_label),
|
total_damage_label = table_helpers.deep_copy(cached_config.total_damage_label),
|
||||||
total_damage_value_label = table_helpers.deep_copy(cached_config.total_damage_value_label),
|
total_damage_value_label = table_helpers.deep_copy(cached_config.total_damage_value_label),
|
||||||
total_dps_label = table_helpers.deep_copy(cached_config.total_dps_label)
|
total_dps_label = table_helpers.deep_copy(cached_config.total_dps_label),
|
||||||
|
total_cart_count_label = table_helpers.deep_copy(cached_config.total_cart_count_label),
|
||||||
};
|
};
|
||||||
|
|
||||||
_player.damage_UI.total_damage_label.offset.x = _player.damage_UI.total_damage_label.offset.x * global_scale_modifier;
|
_player.damage_UI.total_damage_label.offset.x = _player.damage_UI.total_damage_label.offset.x * global_scale_modifier;
|
||||||
@@ -524,6 +525,9 @@ function player.init_total_UI(_player)
|
|||||||
|
|
||||||
_player.damage_UI.total_dps_label.offset.x = _player.damage_UI.total_dps_label.offset.x * global_scale_modifier;
|
_player.damage_UI.total_dps_label.offset.x = _player.damage_UI.total_dps_label.offset.x * global_scale_modifier;
|
||||||
_player.damage_UI.total_dps_label.offset.y = _player.damage_UI.total_dps_label.offset.y * global_scale_modifier;
|
_player.damage_UI.total_dps_label.offset.y = _player.damage_UI.total_dps_label.offset.y * global_scale_modifier;
|
||||||
|
|
||||||
|
_player.damage_UI.total_cart_count_label.offset.x = _player.damage_UI.total_cart_count_label.offset.x * global_scale_modifier;
|
||||||
|
_player.damage_UI.total_cart_count_label.offset.y = _player.damage_UI.total_cart_count_label.offset.y * global_scale_modifier;
|
||||||
end
|
end
|
||||||
|
|
||||||
function player.draw(_player, position_on_screen, opacity_scale, top_damage, top_dps)
|
function player.draw(_player, position_on_screen, opacity_scale, top_damage, top_dps)
|
||||||
@@ -531,11 +535,10 @@ function player.draw(_player, position_on_screen, opacity_scale, top_damage, top
|
|||||||
end
|
end
|
||||||
|
|
||||||
function player.draw_total(position_on_screen, opacity_scale)
|
function player.draw_total(position_on_screen, opacity_scale)
|
||||||
drawing.draw_label(player.total.damage_UI.total_damage_label, position_on_screen, opacity_scale,
|
drawing.draw_label(player.total.damage_UI.total_damage_label, position_on_screen, opacity_scale, language.current_language.UI.total_damage);
|
||||||
language.current_language.UI.total_damage);
|
drawing.draw_label(player.total.damage_UI.total_damage_value_label, position_on_screen, opacity_scale, player.total.display.total_damage);
|
||||||
drawing.draw_label(player.total.damage_UI.total_damage_value_label, position_on_screen, opacity_scale,
|
|
||||||
player.total.display.total_damage);
|
|
||||||
drawing.draw_label(player.total.damage_UI.total_dps_label, position_on_screen, opacity_scale, player.total.dps);
|
drawing.draw_label(player.total.damage_UI.total_dps_label, position_on_screen, opacity_scale, player.total.dps);
|
||||||
|
drawing.draw_label(player.total.damage_UI.total_cart_count_label, position_on_screen, opacity_scale, quest_status.cart_count, quest_status.max_cart_count);
|
||||||
end
|
end
|
||||||
|
|
||||||
function player.init_module()
|
function player.init_module()
|
||||||
|
|||||||
@@ -36,7 +36,10 @@ quest_status.flow_state = quest_status.flow_states.NONE;
|
|||||||
|
|
||||||
quest_status.index = 0;
|
quest_status.index = 0;
|
||||||
quest_status.is_online = false;
|
quest_status.is_online = false;
|
||||||
quest_status.is_quest_host = false;
|
--quest_status.is_quest_host = false;
|
||||||
|
|
||||||
|
quest_status.cart_count = 0;
|
||||||
|
quest_status.max_cart_count = 3;
|
||||||
|
|
||||||
local quest_manager_type_def = sdk.find_type_definition("snow.QuestManager");
|
local quest_manager_type_def = sdk.find_type_definition("snow.QuestManager");
|
||||||
local on_changed_game_status_method = quest_manager_type_def:get_method("onChangedGameStatus");
|
local on_changed_game_status_method = quest_manager_type_def:get_method("onChangedGameStatus");
|
||||||
@@ -46,6 +49,9 @@ local set_quest_clear_sub_method = quest_manager_type_def:get_method("setQuestCl
|
|||||||
local set_quest_clear_sub_hyakurui_method = quest_manager_type_def:get_method("setQuestClearSubHyakuryu");
|
local set_quest_clear_sub_hyakurui_method = quest_manager_type_def:get_method("setQuestClearSubHyakuryu");
|
||||||
local set_quest_fail_method = quest_manager_type_def:get_method("setQuestFail");
|
local set_quest_fail_method = quest_manager_type_def:get_method("setQuestFail");
|
||||||
|
|
||||||
|
local get_death_num_method = quest_manager_type_def:get_method("getDeathNum");
|
||||||
|
local get_quest_life_method = quest_manager_type_def:get_method("getQuestLife");
|
||||||
|
|
||||||
local game_manager_type_def = sdk.find_type_definition("snow.SnowGameManager");
|
local game_manager_type_def = sdk.find_type_definition("snow.SnowGameManager");
|
||||||
local get_status_method = game_manager_type_def:get_method("getStatus");
|
local get_status_method = game_manager_type_def:get_method("getStatus");
|
||||||
|
|
||||||
@@ -77,7 +83,7 @@ local unique_event_manager_type_def = sdk.find_type_definition("snow.eventcut.Un
|
|||||||
local play_event_common_method = unique_event_manager_type_def:get_method("playEventCommon");
|
local play_event_common_method = unique_event_manager_type_def:get_method("playEventCommon");
|
||||||
local event_manager_dispose_method = unique_event_manager_type_def:get_method("dispose");
|
local event_manager_dispose_method = unique_event_manager_type_def:get_method("dispose");
|
||||||
|
|
||||||
function quest_status.get_flow_state(flow_state, new_line)
|
function quest_status.get_flow_state_name(flow_state, new_line)
|
||||||
for key, value in pairs(quest_status.flow_states) do
|
for key, value in pairs(quest_status.flow_states) do
|
||||||
if value == flow_state then
|
if value == flow_state then
|
||||||
if new_line then
|
if new_line then
|
||||||
@@ -89,6 +95,43 @@ function quest_status.get_flow_state(flow_state, new_line)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function quest_status.set_flow_state(new_flow_state)
|
||||||
|
quest_status.previous_flow_state = quest_status.flow_state;
|
||||||
|
quest_status.flow_state = new_flow_state;
|
||||||
|
|
||||||
|
if quest_status.flow_state >= quest_status.flow_states.KILLCAM then
|
||||||
|
damage_meter_UI.freeze_displayed_players = true;
|
||||||
|
quest_status.is_quest_end = true;
|
||||||
|
else
|
||||||
|
damage_meter_UI.freeze_displayed_players = false;
|
||||||
|
quest_status.is_quest_end = false;
|
||||||
|
end
|
||||||
|
|
||||||
|
if quest_status.flow_state == quest_status.flow_states.IN_LOBBY or quest_status.flow_state == quest_status.flow_states.IN_TRAINING_AREA then
|
||||||
|
player.init();
|
||||||
|
small_monster.init_list();
|
||||||
|
large_monster.init_list();
|
||||||
|
env_creature.init_list();
|
||||||
|
elseif quest_status.flow_state >= quest_status.flow_states.LOADING_QUEST then
|
||||||
|
quest_status.get_cart_count();
|
||||||
|
quest_status.get_max_cart_count();
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function quest_status.get_cart_count()
|
||||||
|
local death_num = get_death_num_method:call(singletons.quest_manager);
|
||||||
|
if death_num ~= nil then
|
||||||
|
quest_status.cart_count = death_num;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function quest_status.get_max_cart_count()
|
||||||
|
local quest_life = get_quest_life_method:call(singletons.quest_manager);
|
||||||
|
if quest_life ~= nil then
|
||||||
|
quest_status.max_cart_count = quest_life;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--type 2 = quest start
|
--type 2 = quest start
|
||||||
--type 3 = monster killcam
|
--type 3 = monster killcam
|
||||||
--type 5 = end screen
|
--type 5 = end screen
|
||||||
@@ -108,38 +151,31 @@ function quest_status.on_demo_request_activation(request_data_base)
|
|||||||
|
|
||||||
-- QUEST_START_ANIMATION
|
-- QUEST_START_ANIMATION
|
||||||
if request_data_type == 2 then
|
if request_data_type == 2 then
|
||||||
quest_status.previous_flow_state = quest_status.flow_state;
|
quest_status.set_flow_state(quest_status.flow_states.QUEST_START_ANIMATION);
|
||||||
quest_status.flow_state = quest_status.flow_states.QUEST_START_ANIMATION;
|
|
||||||
|
|
||||||
-- KILLCAM
|
-- KILLCAM
|
||||||
elseif request_data_type == 3 then
|
elseif request_data_type == 3 then
|
||||||
quest_status.previous_flow_state = quest_status.flow_state;
|
quest_status.set_flow_state(quest_status.flow_states.KILLCAM);
|
||||||
quest_status.flow_state = quest_status.flow_states.KILLCAM;
|
|
||||||
|
|
||||||
-- QUEST_END_ANIMATION
|
-- QUEST_END_ANIMATION
|
||||||
elseif request_data_type == 5 or request_data_type == 6 or request_data_type == 7 then
|
elseif request_data_type == 5 or request_data_type == 6 or request_data_type == 7 then
|
||||||
quest_status.previous_flow_state = quest_status.flow_state;
|
quest_status.set_flow_state(quest_status.flow_states.QUEST_END_ANIMATION);
|
||||||
quest_status.flow_state = quest_status.flow_states.QUEST_END_ANIMATION;
|
|
||||||
|
|
||||||
-- PLAYER_DEATH_ANIMATION
|
-- PLAYER_DEATH_ANIMATION
|
||||||
elseif request_data_type == 8 then
|
elseif request_data_type == 8 then
|
||||||
quest_status.previous_flow_state = quest_status.flow_state;
|
quest_status.set_flow_state(quest_status.flow_states.PLAYER_DEATH_ANIMATION);
|
||||||
quest_status.flow_state = quest_status.flow_states.PLAYER_DEATH_ANIMATION;
|
|
||||||
|
|
||||||
-- PLAYER_CART_ANIMATION
|
-- PLAYER_CART_ANIMATION
|
||||||
elseif request_data_type == 9 then
|
elseif request_data_type == 9 then
|
||||||
quest_status.previous_flow_state = quest_status.flow_state;
|
quest_status.set_flow_state(quest_status.flow_states.PLAYER_CART_ANIMATION);
|
||||||
quest_status.flow_state = quest_status.flow_states.PLAYER_CART_ANIMATION;
|
|
||||||
|
|
||||||
-- FAST_TRAVEL_ANIMATION
|
-- FAST_TRAVEL_ANIMATION
|
||||||
elseif request_data_type == 10 then
|
elseif request_data_type == 10 then
|
||||||
quest_status.previous_flow_state = quest_status.flow_state;
|
quest_status.set_flow_state(quest_status.flow_states.FAST_TRAVEL_ANIMATION);
|
||||||
quest_status.flow_state = quest_status.flow_states.FAST_TRAVEL_ANIMATION;
|
|
||||||
|
|
||||||
-- WYVERN_RIDING_START_ANIMATION
|
-- WYVERN_RIDING_START_ANIMATION
|
||||||
elseif request_data_type == 11 then
|
elseif request_data_type == 11 then
|
||||||
quest_status.previous_flow_state = quest_status.flow_state;
|
quest_status.set_flow_state(quest_status.flow_states.WYVERN_RIDING_START_ANIMATION);
|
||||||
quest_status.flow_state = quest_status.flow_states.WYVERN_RIDING_START_ANIMATION;
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -150,62 +186,50 @@ function quest_status.on_demo_end()
|
|||||||
or quest_status.flow_state == quest_status.flow_states.FAST_TRAVEL_ANIMATION
|
or quest_status.flow_state == quest_status.flow_states.FAST_TRAVEL_ANIMATION
|
||||||
or quest_status.flow_state == quest_status.flow_states.WYVERN_RIDING_START_ANIMATION then
|
or quest_status.flow_state == quest_status.flow_states.WYVERN_RIDING_START_ANIMATION then
|
||||||
|
|
||||||
local next_flow_state = quest_status.previous_flow_state;
|
quest_status.set_flow_state(quest_status.previous_flow_state);
|
||||||
quest_status.previous_flow_state = quest_status.flow_state;
|
|
||||||
quest_status.flow_state = next_flow_state;
|
|
||||||
|
|
||||||
elseif quest_status.flow_state == quest_status.flow_states.QUEST_START_ANIMATION then
|
elseif quest_status.flow_state == quest_status.flow_states.QUEST_START_ANIMATION then
|
||||||
|
|
||||||
quest_status.previous_flow_state = quest_status.flow_state;
|
quest_status.set_flow_state(quest_status.flow_states.PLAYING_QUEST);
|
||||||
quest_status.flow_state = quest_status.flow_states.PLAYING_QUEST;
|
|
||||||
|
|
||||||
elseif quest_status.flow_state == quest_status.flow_states.KILLCAM then
|
elseif quest_status.flow_state == quest_status.flow_states.KILLCAM then
|
||||||
|
|
||||||
quest_status.previous_flow_state = quest_status.flow_state;
|
quest_status.set_flow_state(quest_status.flow_states.QUEST_END_TIMER);
|
||||||
quest_status.flow_state = quest_status.flow_states.QUEST_END_TIMER;
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function quest_status.on_set_quest_clear()
|
function quest_status.on_set_quest_clear()
|
||||||
if quest_status.index == 2 and quest_status.flow_state ~= quest_status.flow_states.KILLCAM then
|
if quest_status.index == 2 and quest_status.flow_state ~= quest_status.flow_states.KILLCAM then
|
||||||
quest_status.previous_flow_state = quest_status.flow_state;
|
quest_status.set_flow_state(quest_status.flow_states.QUEST_END_TIMER);
|
||||||
quest_status.flow_state = quest_status.flow_states.QUEST_END_TIMER;
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function quest_status.on_quest_end_set_state()
|
function quest_status.on_quest_end_set_state()
|
||||||
if quest_status.index == 2 then
|
if quest_status.index == 2 then
|
||||||
quest_status.previous_flow_state = quest_status.flow_state;
|
quest_status.set_flow_state(quest_status.flow_states.QUEST_END_SCREEN);
|
||||||
quest_status.flow_state = quest_status.flow_states.QUEST_END_SCREEN;
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function quest_status.on_gui_result_reward_do_open()
|
function quest_status.on_gui_result_reward_do_open()
|
||||||
if quest_status.index == 3 then
|
if quest_status.index == 3 then
|
||||||
quest_status.previous_flow_state = quest_status.flow_state;
|
quest_status.set_flow_state(quest_status.flow_states.REWARD_SCREEN);
|
||||||
quest_status.flow_state = quest_status.flow_states.REWARD_SCREEN;
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function quest_status.on_gui_result_pay_off_do_open()
|
function quest_status.on_gui_result_pay_off_do_open()
|
||||||
if quest_status.index == 3 then
|
if quest_status.index == 3 then
|
||||||
quest_status.previous_flow_state = quest_status.flow_state;
|
quest_status.set_flow_state(quest_status.flow_states.SUMMARY_SCREEN);
|
||||||
quest_status.flow_state = quest_status.flow_states.SUMMARY_SCREEN;
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function quest_status.on_play_event_common()
|
function quest_status.on_play_event_common()
|
||||||
quest_status.previous_flow_state = quest_status.flow_state;
|
quest_status.set_flow_state(quest_status.flow_states.CUTSCENE);
|
||||||
quest_status.flow_state = quest_status.flow_states.CUTSCENE;
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function quest_status.on_event_manager_dispose()
|
function quest_status.on_event_manager_dispose()
|
||||||
if quest_status.flow_state == quest_status.flow_states.CUTSCENE then
|
if quest_status.flow_state == quest_status.flow_states.CUTSCENE then
|
||||||
|
quest_status.set_flow_state(quest_status.previous_flow_state);
|
||||||
local next_flow_state = quest_status.previous_flow_state;
|
|
||||||
quest_status.previous_flow_state = quest_status.flow_state;
|
|
||||||
quest_status.flow_state = next_flow_state;
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -215,8 +239,7 @@ function quest_status.on_set_quest_fail()
|
|||||||
quest_status.flow_state == quest_status.flow_states.FAST_TRAVEL_ANIMATION or
|
quest_status.flow_state == quest_status.flow_states.FAST_TRAVEL_ANIMATION or
|
||||||
quest_status.flow_state == quest_status.flow_states.WYVERN_RIDING_START_ANIMATION then
|
quest_status.flow_state == quest_status.flow_states.WYVERN_RIDING_START_ANIMATION then
|
||||||
|
|
||||||
quest_status.previous_flow_state = quest_status.flow_state;
|
quest_status.set_flow_state(quest_status.flow_states.QUEST_END_ANIMATION);
|
||||||
quest_status.flow_state = quest_status.flow_states.QUEST_END_ANIMATION;
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -225,37 +248,24 @@ function quest_status.on_village_fast_travel(area)
|
|||||||
return;
|
return;
|
||||||
end
|
end
|
||||||
|
|
||||||
quest_status.previous_flow_state = quest_status.flow_state;
|
|
||||||
|
|
||||||
if area == 7 then
|
if area == 7 then
|
||||||
quest_status.flow_state = quest_status.flow_states.IN_TRAINING_AREA;
|
quest_status.set_flow_state(quest_status.flow_states.IN_TRAINING_AREA);
|
||||||
else
|
else
|
||||||
quest_status.flow_state = quest_status.flow_states.IN_LOBBY;
|
quest_status.set_flow_state(quest_status.flow_states.IN_LOBBY);
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function quest_status.on_changed_game_status(new_quest_status)
|
function quest_status.on_changed_game_status(new_quest_status)
|
||||||
quest_status.index = new_quest_status;
|
quest_status.index = new_quest_status;
|
||||||
|
|
||||||
if quest_status.index < 3 then
|
|
||||||
player.init();
|
|
||||||
small_monster.init_list();
|
|
||||||
large_monster.init_list();
|
|
||||||
env_creature.init_list();
|
|
||||||
|
|
||||||
quest_status.is_quest_clear = false;
|
|
||||||
damage_meter_UI.freeze_displayed_players = false;
|
|
||||||
damage_meter_UI.last_displayed_players = {};
|
|
||||||
end
|
|
||||||
|
|
||||||
if quest_status.index == 0 then
|
if quest_status.index == 0 then
|
||||||
quest_status.flow_state = quest_status.flow_states.NONE;
|
quest_status.set_flow_state(quest_status.flow_states.NONE);
|
||||||
elseif quest_status.index == 1 then
|
elseif quest_status.index == 1 then
|
||||||
quest_status.flow_state = quest_status.flow_states.IN_LOBBY;
|
quest_status.set_flow_state(quest_status.flow_states.IN_LOBBY);
|
||||||
elseif quest_status.index == 2 then
|
elseif quest_status.index == 2 then
|
||||||
quest_status.flow_state = quest_status.flow_states.LOADING_QUEST;
|
quest_status.set_flow_state(quest_status.flow_states.LOADING_QUEST);
|
||||||
elseif quest_status.index == 3 then
|
elseif quest_status.index == 3 then
|
||||||
quest_status.flow_state = quest_status.flow_states.SUMMARY_SCREEN;
|
quest_status.set_flow_state(quest_status.flow_states.SUMMARY_SCREEN);
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -273,16 +283,15 @@ function quest_status.init()
|
|||||||
quest_status.index = new_quest_status;
|
quest_status.index = new_quest_status;
|
||||||
|
|
||||||
if quest_status.index == 0 then
|
if quest_status.index == 0 then
|
||||||
quest_status.flow_state = quest_status.flow_states.NONE;
|
quest_status.set_flow_state(quest_status.flow_states.NONE);
|
||||||
elseif quest_status.index == 1 then
|
elseif quest_status.index == 1 then
|
||||||
quest_status.flow_state = quest_status.flow_states.IN_LOBBY;
|
quest_status.set_flow_state(quest_status.flow_states.IN_LOBBY);
|
||||||
elseif quest_status.index == 2 then
|
elseif quest_status.index == 2 then
|
||||||
quest_status.flow_state = quest_status.flow_states.PLAYING_QUEST;
|
quest_status.set_flow_state(quest_status.flow_states.PLAYING_QUEST);
|
||||||
elseif quest_status.index == 3 then
|
elseif quest_status.index == 3 then
|
||||||
quest_status.flow_state = quest_status.flow_states.SUMMARY_SCREEN;
|
quest_status.set_flow_state(quest_status.flow_states.SUMMARY_SCREEN);
|
||||||
end
|
end
|
||||||
|
|
||||||
quest_status.update_is_online();
|
|
||||||
quest_status.update_is_training_area();
|
quest_status.update_is_training_area();
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -296,14 +305,10 @@ function quest_status.update_is_online()
|
|||||||
return;
|
return;
|
||||||
end
|
end
|
||||||
|
|
||||||
if quest_status.is_online and not is_quest_online then
|
|
||||||
damage_meter_UI.freeze_displayed_players = true;
|
|
||||||
end
|
|
||||||
|
|
||||||
quest_status.is_online = is_quest_online;
|
quest_status.is_online = is_quest_online;
|
||||||
end
|
end
|
||||||
|
|
||||||
function quest_status.update_is_quest_host()
|
--[[function quest_status.update_is_quest_host()
|
||||||
if singletons.lobby_manager == nil then
|
if singletons.lobby_manager == nil then
|
||||||
return;
|
return;
|
||||||
end
|
end
|
||||||
@@ -314,7 +319,7 @@ function quest_status.update_is_quest_host()
|
|||||||
end
|
end
|
||||||
|
|
||||||
quest_status.is_quest_host = is_quest_host;
|
quest_status.is_quest_host = is_quest_host;
|
||||||
end
|
end--]]
|
||||||
|
|
||||||
function quest_status.update_is_training_area()
|
function quest_status.update_is_training_area()
|
||||||
if singletons.village_area_manager == nil then
|
if singletons.village_area_manager == nil then
|
||||||
@@ -328,7 +333,7 @@ function quest_status.update_is_training_area()
|
|||||||
end
|
end
|
||||||
|
|
||||||
if _is_training_area then
|
if _is_training_area then
|
||||||
quest_status.flow_state = quest_status.flow_states.IN_TRAINING_AREA;
|
quest_status.set_flow_state(quest_status.flow_states.IN_TRAINING_AREA);
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ end
|
|||||||
function time.update_players_dps()
|
function time.update_players_dps()
|
||||||
local cached_config = config.current_config.damage_meter_UI.settings;
|
local cached_config = config.current_config.damage_meter_UI.settings;
|
||||||
|
|
||||||
if cached_config.freeze_dps_on_quest_clear and quest_status.is_quest_clear then
|
if cached_config.freeze_dps_on_quest_end and quest_status.is_quest_end then
|
||||||
return;
|
return;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -4215,7 +4215,7 @@ function config.init()
|
|||||||
hide_total_if_total_damage_is_zero = false,
|
hide_total_if_total_damage_is_zero = false,
|
||||||
total_damage_offset_is_relative = true,
|
total_damage_offset_is_relative = true,
|
||||||
|
|
||||||
freeze_dps_on_quest_clear = true,
|
freeze_dps_on_quest_end = true,
|
||||||
|
|
||||||
orientation = "Vertical", -- "Vertical" or "Horizontal"
|
orientation = "Vertical", -- "Vertical" or "Horizontal"
|
||||||
highlighted_bar = "Me",
|
highlighted_bar = "Me",
|
||||||
@@ -4313,7 +4313,7 @@ function config.init()
|
|||||||
cart_count_label = {
|
cart_count_label = {
|
||||||
visibility = false,
|
visibility = false,
|
||||||
|
|
||||||
text = "x%d",
|
text = "%d",
|
||||||
offset = {
|
offset = {
|
||||||
x = 315,
|
x = 315,
|
||||||
y = 0
|
y = 0
|
||||||
@@ -4446,6 +4446,26 @@ function config.init()
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
total_cart_count_label = {
|
||||||
|
visibility = true,
|
||||||
|
|
||||||
|
text = "%d/%d",
|
||||||
|
offset = {
|
||||||
|
x = 315,
|
||||||
|
y = 0
|
||||||
|
},
|
||||||
|
color = 0xFFFF7373,
|
||||||
|
|
||||||
|
shadow = {
|
||||||
|
visibility = true,
|
||||||
|
offset = {
|
||||||
|
x = 1,
|
||||||
|
y = 1
|
||||||
|
},
|
||||||
|
color = 0xFF000000
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
damage_bar = {
|
damage_bar = {
|
||||||
visibility = true,
|
visibility = true,
|
||||||
offset = {
|
offset = {
|
||||||
|
|||||||
@@ -390,11 +390,12 @@ language.default_language = {
|
|||||||
|
|
||||||
cart_count = "Cart Count",
|
cart_count = "Cart Count",
|
||||||
cart_count_label = "Cart Count Label",
|
cart_count_label = "Cart Count Label",
|
||||||
|
total_cart_count_label = "Total Cart Count Label",
|
||||||
|
|
||||||
prioritize_large_monsters = "Large Monsters on High Priority",
|
prioritize_large_monsters = "Large Monsters on High Priority",
|
||||||
max_monster_updates_per_tick = "Max Monster Updates per Tick",
|
max_monster_updates_per_tick = "Max Monster Updates per Tick",
|
||||||
|
|
||||||
freeze_dps_on_quest_clear = "Freeze DPS when Quest is cleared",
|
freeze_dps_on_quest_end = "Freeze DPS on Quest End",
|
||||||
|
|
||||||
|
|
||||||
health_break_severe_filter = "Health + Break + Severe",
|
health_break_severe_filter = "Health + Break + Severe",
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ function damage_meter_UI.draw()
|
|||||||
elseif #player.list == 0 then
|
elseif #player.list == 0 then
|
||||||
table.insert(quest_players, player.myself);
|
table.insert(quest_players, player.myself);
|
||||||
end
|
end
|
||||||
|
|
||||||
damage_meter_UI.last_displayed_players = quest_players;
|
damage_meter_UI.last_displayed_players = quest_players;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1412,8 +1412,8 @@ function customization_menu.draw_damage_meter_UI()
|
|||||||
|
|
||||||
config_changed = config_changed or changed;
|
config_changed = config_changed or changed;
|
||||||
|
|
||||||
changed, cached_config.settings.freeze_dps_on_quest_clear = imgui.checkbox(
|
changed, cached_config.settings.freeze_dps_on_quest_end = imgui.checkbox(
|
||||||
language.current_language.customization_menu.freeze_dps_on_quest_clear, cached_config.settings.freeze_dps_on_quest_clear);
|
language.current_language.customization_menu.freeze_dps_on_quest_end, cached_config.settings.freeze_dps_on_quest_end);
|
||||||
|
|
||||||
config_changed = config_changed or changed;
|
config_changed = config_changed or changed;
|
||||||
|
|
||||||
@@ -1892,6 +1892,10 @@ function customization_menu.draw_damage_meter_UI()
|
|||||||
changed = label_customization.draw(language.current_language.customization_menu.total_damage_value_label, cached_config.total_damage_value_label);
|
changed = label_customization.draw(language.current_language.customization_menu.total_damage_value_label, cached_config.total_damage_value_label);
|
||||||
config_changed = config_changed or changed;
|
config_changed = config_changed or changed;
|
||||||
|
|
||||||
|
changed = label_customization.draw(language.current_language.customization_menu.total_cart_count_label, cached_config.total_cart_count_label);
|
||||||
|
config_changed = config_changed or changed;
|
||||||
|
|
||||||
|
|
||||||
changed = bar_customization.draw(language.current_language.customization_menu.damage_bar, cached_config.damage_bar);
|
changed = bar_customization.draw(language.current_language.customization_menu.damage_bar, cached_config.damage_bar);
|
||||||
config_changed = config_changed or changed;
|
config_changed = config_changed or changed;
|
||||||
|
|
||||||
|
|||||||
@@ -104,7 +104,7 @@
|
|||||||
"first_hit": "First Hit",
|
"first_hit": "First Hit",
|
||||||
"flinch_count": "Flinch Count",
|
"flinch_count": "Flinch Count",
|
||||||
"foreground": "Foreground",
|
"foreground": "Foreground",
|
||||||
"freeze_dps_on_quest_clear": "Freeze DPS when Quest is cleared",
|
"freeze_dps_on_quest_end": "Freeze DPS on Quest End",
|
||||||
"global_position_modifier": "Global Position Modifier",
|
"global_position_modifier": "Global Position Modifier",
|
||||||
"global_scale_modifier": "Global Scale Modifier",
|
"global_scale_modifier": "Global Scale Modifier",
|
||||||
"global_settings": "Global Settings",
|
"global_settings": "Global Settings",
|
||||||
@@ -247,6 +247,7 @@
|
|||||||
"total_buildup": "Total Buildup",
|
"total_buildup": "Total Buildup",
|
||||||
"total_buildup_label": "Total Buildup Label",
|
"total_buildup_label": "Total Buildup Label",
|
||||||
"total_buildup_value_label": "Total Buildup Value Label",
|
"total_buildup_value_label": "Total Buildup Value Label",
|
||||||
|
"total_cart_count_label": "Total Cart Count Label",
|
||||||
"total_damage": "Total Damage",
|
"total_damage": "Total Damage",
|
||||||
"total_damage_label": "Total Damage Label",
|
"total_damage_label": "Total Damage Label",
|
||||||
"total_damage_offset_is_relative": "Total Damage Offset is Relative",
|
"total_damage_offset_is_relative": "Total Damage Offset is Relative",
|
||||||
|
|||||||
@@ -104,7 +104,7 @@
|
|||||||
"first_hit": "初撃",
|
"first_hit": "初撃",
|
||||||
"flinch_count": "ひるみ回数",
|
"flinch_count": "ひるみ回数",
|
||||||
"foreground": "前面",
|
"foreground": "前面",
|
||||||
"freeze_dps_on_quest_clear": "Freeze DPS when Quest is cleared",
|
"freeze_dps_on_quest_end": "Freeze DPS on Quest End",
|
||||||
"global_position_modifier": "全体的な位置の調整",
|
"global_position_modifier": "全体的な位置の調整",
|
||||||
"global_scale_modifier": "全体的なスケールの調整",
|
"global_scale_modifier": "全体的なスケールの調整",
|
||||||
"global_settings": "全体設定",
|
"global_settings": "全体設定",
|
||||||
@@ -247,6 +247,7 @@
|
|||||||
"total_buildup": "蓄積合計",
|
"total_buildup": "蓄積合計",
|
||||||
"total_buildup_label": "合計蓄積ラベル",
|
"total_buildup_label": "合計蓄積ラベル",
|
||||||
"total_buildup_value_label": "合計蓄積値ラベル",
|
"total_buildup_value_label": "合計蓄積値ラベル",
|
||||||
|
"total_cart_count_label": "Total Cart Count Label",
|
||||||
"total_damage": "合計ダメージ",
|
"total_damage": "合計ダメージ",
|
||||||
"total_damage_label": "合計ダメージラベル",
|
"total_damage_label": "合計ダメージラベル",
|
||||||
"total_damage_offset_is_relative": "トータルダメージの表示位置を調整",
|
"total_damage_offset_is_relative": "トータルダメージの表示位置を調整",
|
||||||
|
|||||||
@@ -104,7 +104,7 @@
|
|||||||
"first_hit": "첫 공격",
|
"first_hit": "첫 공격",
|
||||||
"flinch_count": "경직 횟수",
|
"flinch_count": "경직 횟수",
|
||||||
"foreground": "전경색",
|
"foreground": "전경색",
|
||||||
"freeze_dps_on_quest_clear": "퀘스트 종료시 DPS 집계 정지",
|
"freeze_dps_on_quest_end": "Freeze DPS on Quest End",
|
||||||
"global_position_modifier": "전역 위치 배율",
|
"global_position_modifier": "전역 위치 배율",
|
||||||
"global_scale_modifier": "전역 크기 배율",
|
"global_scale_modifier": "전역 크기 배율",
|
||||||
"global_settings": "전역 설정",
|
"global_settings": "전역 설정",
|
||||||
@@ -247,6 +247,7 @@
|
|||||||
"total_buildup": "총 누적치",
|
"total_buildup": "총 누적치",
|
||||||
"total_buildup_label": "총 누적치 정보",
|
"total_buildup_label": "총 누적치 정보",
|
||||||
"total_buildup_value_label": "총 누적치 값 정보",
|
"total_buildup_value_label": "총 누적치 값 정보",
|
||||||
|
"total_cart_count_label": "Total Cart Count Label",
|
||||||
"total_damage": "총 대미지",
|
"total_damage": "총 대미지",
|
||||||
"total_damage_label": "총 대미지 정보",
|
"total_damage_label": "총 대미지 정보",
|
||||||
"total_damage_offset_is_relative": "총 대미지 거리를 상대적 값으로",
|
"total_damage_offset_is_relative": "총 대미지 거리를 상대적 값으로",
|
||||||
|
|||||||
@@ -104,7 +104,7 @@
|
|||||||
"first_hit": "Первый удар",
|
"first_hit": "Первый удар",
|
||||||
"flinch_count": "Кол-во вздрагиваний",
|
"flinch_count": "Кол-во вздрагиваний",
|
||||||
"foreground": "Передний план",
|
"foreground": "Передний план",
|
||||||
"freeze_dps_on_quest_clear": "Заморозить УВС после завершения квеста",
|
"freeze_dps_on_quest_end": "Заморозить УВС после завершения квеста",
|
||||||
"global_position_modifier": "Глобальный модификатор расположения",
|
"global_position_modifier": "Глобальный модификатор расположения",
|
||||||
"global_scale_modifier": "Глобальный модификатор размера",
|
"global_scale_modifier": "Глобальный модификатор размера",
|
||||||
"global_settings": "Общие настройки",
|
"global_settings": "Общие настройки",
|
||||||
@@ -247,6 +247,7 @@
|
|||||||
"total_buildup": "Общее накопление",
|
"total_buildup": "Общее накопление",
|
||||||
"total_buildup_label": "Метка общего накопления",
|
"total_buildup_label": "Метка общего накопления",
|
||||||
"total_buildup_value_label": "Метка значения общего накопления",
|
"total_buildup_value_label": "Метка значения общего накопления",
|
||||||
|
"total_cart_count_label": "Total Cart Count Label",
|
||||||
"total_damage": "Общий урон",
|
"total_damage": "Общий урон",
|
||||||
"total_damage_label": "Метка общего урона",
|
"total_damage_label": "Метка общего урона",
|
||||||
"total_damage_offset_is_relative": "Относительный сдвиг общего урона",
|
"total_damage_offset_is_relative": "Относительный сдвиг общего урона",
|
||||||
|
|||||||
@@ -104,7 +104,7 @@
|
|||||||
"first_hit": "第一击",
|
"first_hit": "第一击",
|
||||||
"flinch_count": "胆怯次数",
|
"flinch_count": "胆怯次数",
|
||||||
"foreground": "前景",
|
"foreground": "前景",
|
||||||
"freeze_dps_on_quest_clear": "Freeze DPS when Quest is cleared",
|
"freeze_dps_on_quest_end": "Freeze DPS on Quest End",
|
||||||
"global_position_modifier": "全局位置更改",
|
"global_position_modifier": "全局位置更改",
|
||||||
"global_scale_modifier": "全局比例更改",
|
"global_scale_modifier": "全局比例更改",
|
||||||
"global_settings": "全局设定",
|
"global_settings": "全局设定",
|
||||||
@@ -247,6 +247,7 @@
|
|||||||
"total_buildup": "总积累值",
|
"total_buildup": "总积累值",
|
||||||
"total_buildup_label": "总积累值标签",
|
"total_buildup_label": "总积累值标签",
|
||||||
"total_buildup_value_label": "总积累值标签",
|
"total_buildup_value_label": "总积累值标签",
|
||||||
|
"total_cart_count_label": "Total Cart Count Label",
|
||||||
"total_damage": "总伤害",
|
"total_damage": "总伤害",
|
||||||
"total_damage_label": "总伤害标签",
|
"total_damage_label": "总伤害标签",
|
||||||
"total_damage_offset_is_relative": "总伤害相对偏移",
|
"total_damage_offset_is_relative": "总伤害相对偏移",
|
||||||
|
|||||||
@@ -104,7 +104,7 @@
|
|||||||
"first_hit": "第一擊",
|
"first_hit": "第一擊",
|
||||||
"flinch_count": "膽怯次數",
|
"flinch_count": "膽怯次數",
|
||||||
"foreground": "圖形化顯示條的底色",
|
"foreground": "圖形化顯示條的底色",
|
||||||
"freeze_dps_on_quest_clear": "當任務結束時凍結DPS",
|
"freeze_dps_on_quest_end": "Freeze DPS on Quest End",
|
||||||
"global_position_modifier": "全域位置更改",
|
"global_position_modifier": "全域位置更改",
|
||||||
"global_scale_modifier": "全域比例更改",
|
"global_scale_modifier": "全域比例更改",
|
||||||
"global_settings": "全域設定",
|
"global_settings": "全域設定",
|
||||||
@@ -247,6 +247,7 @@
|
|||||||
"total_buildup": "總累積值",
|
"total_buildup": "總累積值",
|
||||||
"total_buildup_label": "總累積值文字",
|
"total_buildup_label": "總累積值文字",
|
||||||
"total_buildup_value_label": "總累積值數值文字",
|
"total_buildup_value_label": "總累積值數值文字",
|
||||||
|
"total_cart_count_label": "Total Cart Count Label",
|
||||||
"total_damage": "總傷害",
|
"total_damage": "總傷害",
|
||||||
"total_damage_label": "總傷害文字",
|
"total_damage_label": "總傷害文字",
|
||||||
"total_damage_offset_is_relative": "總傷害顯示位置調整",
|
"total_damage_offset_is_relative": "總傷害顯示位置調整",
|
||||||
|
|||||||
Reference in New Issue
Block a user