From 64130aa68c3cc0a49e914f326bdcae365d6dc8af Mon Sep 17 00:00:00 2001 From: GreenComfyTea Date: Thu, 17 Aug 2023 09:47:09 +0300 Subject: [PATCH] Formatting --- .../autorun/MHR_Overlay/Buffs/abnormal_statuses.lua | 5 ----- reframework/autorun/MHR_Overlay/Buffs/consumables.lua | 4 ---- reframework/autorun/MHR_Overlay/Buffs/dangos.lua | 4 ---- .../autorun/MHR_Overlay/Buffs/endemic_life_buffs.lua | 4 ---- .../autorun/MHR_Overlay/Buffs/melody_effects.lua | 4 ++-- reframework/autorun/MHR_Overlay/Buffs/skills.lua | 4 ---- .../autorun/MHR_Overlay/Damage_Meter/non_players.lua | 2 +- reframework/autorun/MHR_Overlay/Misc/player_info.lua | 2 +- reframework/autorun/MHR_Overlay/Monsters/ailments.lua | 10 +++++----- .../autorun/MHR_Overlay/Monsters/large_monster.lua | 6 +++--- .../autorun/MHR_Overlay/UI/customization_menu.lua | 6 +----- 11 files changed, 13 insertions(+), 38 deletions(-) diff --git a/reframework/autorun/MHR_Overlay/Buffs/abnormal_statuses.lua b/reframework/autorun/MHR_Overlay/Buffs/abnormal_statuses.lua index 6c3d1c4..15c6c35 100644 --- a/reframework/autorun/MHR_Overlay/Buffs/abnormal_statuses.lua +++ b/reframework/autorun/MHR_Overlay/Buffs/abnormal_statuses.lua @@ -145,10 +145,6 @@ local player_data_type_def = sdk.find_type_definition("snow.player.PlayerData"); local virus_overcome_buff_timer_field = player_data_type_def:get_field("_VirusOvercomeBuffTimer"); -local system_array_type_def = sdk.find_type_definition("System.Array"); -local length_method = system_array_type_def:get_method("get_Length"); -local get_value_method = system_array_type_def:get_method("GetValue(System.Int32)"); - function this.update(player, player_data) --local item_parameter = get_ref_item_parameter_method:call(singletons.player_manager); --if item_parameter == nil then @@ -289,7 +285,6 @@ function this.update_generic(debuff_key, timer, duration) debuff = buffs.new(buffs.types.debuff, debuff_key, name, 1, duration); this.list[debuff_key] = debuff; - elseif timer ~= nil then buffs.update_timer(debuff, timer); end diff --git a/reframework/autorun/MHR_Overlay/Buffs/consumables.lua b/reframework/autorun/MHR_Overlay/Buffs/consumables.lua index 2d6cd58..5b587c4 100644 --- a/reframework/autorun/MHR_Overlay/Buffs/consumables.lua +++ b/reframework/autorun/MHR_Overlay/Buffs/consumables.lua @@ -97,10 +97,6 @@ local stamina_up_buff_second_timer_field = player_data_type_def:get_field("_Stam -- Gourmet Fish local fish_regene_enable_field = player_data_type_def:get_field("_FishRegeneEnableTimer"); -local system_array_type_def = sdk.find_type_definition("System.Array"); -local length_method = system_array_type_def:get_method("get_Length"); -local get_value_method = system_array_type_def:get_method("GetValue(System.Int32)"); - function this.update(player_data) local item_parameter = get_ref_item_parameter_method:call(singletons.player_manager); if item_parameter == nil then diff --git a/reframework/autorun/MHR_Overlay/Buffs/dangos.lua b/reframework/autorun/MHR_Overlay/Buffs/dangos.lua index 118b0f2..e58174d 100644 --- a/reframework/autorun/MHR_Overlay/Buffs/dangos.lua +++ b/reframework/autorun/MHR_Overlay/Buffs/dangos.lua @@ -67,10 +67,6 @@ local player_data_type_def = sdk.find_type_definition("snow.player.PlayerData"); -- Dango Defender local kitchen_skill_048_field = player_data_type_def:get_field("_KitchenSkill048_Damage"); -local system_array_type_def = sdk.find_type_definition("System.Array"); -local length_method = system_array_type_def:get_method("get_Length"); -local get_value_method = system_array_type_def:get_method("GetValue(System.Int32)"); - function this.update(player_data) local item_parameter = get_ref_item_parameter_method:call(singletons.player_manager); if item_parameter == nil then diff --git a/reframework/autorun/MHR_Overlay/Buffs/endemic_life_buffs.lua b/reframework/autorun/MHR_Overlay/Buffs/endemic_life_buffs.lua index 6868d8b..237a6a3 100644 --- a/reframework/autorun/MHR_Overlay/Buffs/endemic_life_buffs.lua +++ b/reframework/autorun/MHR_Overlay/Buffs/endemic_life_buffs.lua @@ -60,10 +60,6 @@ local crit_up_ec_second_timer_field = player_data_type_def:get_field("_CritUpEcS -- Clothfly local def_up_buff_second_rate_timer_field = player_data_type_def:get_field("_DefUpBuffSecondRateTimer"); -local system_array_type_def = sdk.find_type_definition("System.Array"); -local length_method = system_array_type_def:get_method("get_Length"); -local get_value_method = system_array_type_def:get_method("GetValue(System.Int32)"); - local message_manager_type_def = sdk.find_type_definition("snow.gui.MessageManager"); local get_env_creature_name_message_method = message_manager_type_def:get_method("getEnvCreatureNameMessage"); diff --git a/reframework/autorun/MHR_Overlay/Buffs/melody_effects.lua b/reframework/autorun/MHR_Overlay/Buffs/melody_effects.lua index a047e6a..5dafec5 100644 --- a/reframework/autorun/MHR_Overlay/Buffs/melody_effects.lua +++ b/reframework/autorun/MHR_Overlay/Buffs/melody_effects.lua @@ -115,7 +115,7 @@ local music_data_type_def = sdk.find_type_definition("snow.player.Horn.MusicData local time_field = music_data_type_def:get_field("_Time"); local system_array_type_def = sdk.find_type_definition("System.Array"); -local length_method = system_array_type_def:get_method("get_Length"); +local get_length_method = system_array_type_def:get_method("get_Length"); local get_value_method = system_array_type_def:get_method("GetValue(System.Int32)"); function this.update(master_player) @@ -125,7 +125,7 @@ function this.update(master_player) return; end - local length = length_method:call(music_data_array) - 1; + local length = get_length_method:call(music_data_array) - 1; if length == nil then error_handler.report("melody_effects.update", "Failed to access Data: music_data_array -> length"); return; diff --git a/reframework/autorun/MHR_Overlay/Buffs/skills.lua b/reframework/autorun/MHR_Overlay/Buffs/skills.lua index 0f06ca9..9c41069 100644 --- a/reframework/autorun/MHR_Overlay/Buffs/skills.lua +++ b/reframework/autorun/MHR_Overlay/Buffs/skills.lua @@ -156,10 +156,6 @@ local equip_skill_226_attack_off_timer_field = player_quest_base_type_def:get_fi -- Heaven-Sent local is_active_equip_skill_230_method = player_quest_base_type_def:get_method("isActiveEquipSkill230"); -local system_array_type_def = sdk.find_type_definition("System.Array"); -local length_method = system_array_type_def:get_method("get_Length"); -local get_value_method = system_array_type_def:get_method("GetValue(System.Int32)"); - function this.update(player, player_data) --local item_parameter = get_ref_item_parameter_method:call(singletons.player_manager); --if item_parameter == nil then diff --git a/reframework/autorun/MHR_Overlay/Damage_Meter/non_players.lua b/reframework/autorun/MHR_Overlay/Damage_Meter/non_players.lua index 953f18d..af133a4 100644 --- a/reframework/autorun/MHR_Overlay/Damage_Meter/non_players.lua +++ b/reframework/autorun/MHR_Overlay/Damage_Meter/non_players.lua @@ -231,7 +231,7 @@ function this.update_my_otomos() local level = otomo_create_data_level_field:get_data(first_otomo) or 0; local myself_id = players.myself.id; - local otomo = this.otomo_list[myself_id] + local otomo = this.otomo_list[myself_id]; if otomo == nil then otomo = this.new(0, name, level, players.types.my_otomo); this.otomo_list[myself_id] = otomo; diff --git a/reframework/autorun/MHR_Overlay/Misc/player_info.lua b/reframework/autorun/MHR_Overlay/Misc/player_info.lua index 34cd99c..9d1ddd0 100644 --- a/reframework/autorun/MHR_Overlay/Misc/player_info.lua +++ b/reframework/autorun/MHR_Overlay/Misc/player_info.lua @@ -88,7 +88,7 @@ local element_attack_2nd_field = player_data_type_def:get_field("_ElementAttack2 local resistance_element_field = player_data_type_def:get_field("_ResistanceElement"); local system_array_type_def = sdk.find_type_definition("System.Array"); -local length_method = system_array_type_def:get_method("get_Length"); +local get_length_method = system_array_type_def:get_method("get_Length"); local get_value_method = system_array_type_def:get_method("GetValue(System.Int32)"); function this.update() diff --git a/reframework/autorun/MHR_Overlay/Monsters/ailments.lua b/reframework/autorun/MHR_Overlay/Monsters/ailments.lua index 1bdb5c8..9a483c1 100644 --- a/reframework/autorun/MHR_Overlay/Monsters/ailments.lua +++ b/reframework/autorun/MHR_Overlay/Monsters/ailments.lua @@ -272,7 +272,7 @@ local poison_damage_field = poison_param_type_def:get_field("k__BackingF local poison_get_is_damage_method = poison_param_type_def:get_method("get_IsDamage"); local system_array_type_def = sdk.find_type_definition("System.Array"); -local length_method = system_array_type_def:get_method("get_Length"); +local get_length_method = system_array_type_def:get_method("get_Length"); local get_value_method = system_array_type_def:get_method("GetValue(System.Int32)"); function this.update_ailments(enemy, monster) @@ -305,7 +305,7 @@ function this.update_ailments(enemy, monster) return; end - local condition_param_array_length = length_method:call(condition_param_array); + local condition_param_array_length = get_length_method:call(condition_param_array); if condition_param_array_length == nil then error_handler.report("ailments.update_ailments", "Failed to access Data: condition_param_array_length"); return; @@ -364,7 +364,7 @@ function this.update_ailment(monster, ailment_param, id) local buildup_limit = nil; if activate_count_array ~= nil then - local activate_count_array_length = length_method:call(activate_count_array); + local activate_count_array_length = get_length_method:call(activate_count_array); if activate_count_array_length ~= nil then @@ -385,7 +385,7 @@ function this.update_ailment(monster, ailment_param, id) end if buildup_array ~= nil then - local buildup_array_length = length_method:call(buildup_array); + local buildup_array_length = get_length_method:call(buildup_array); if buildup_array_length ~= nil then @@ -406,7 +406,7 @@ function this.update_ailment(monster, ailment_param, id) end if buildup_limit_array ~= nil then - local buildup_limit_array_length = length_method:call(buildup_limit_array); + local buildup_limit_array_length = get_length_method:call(buildup_limit_array); if buildup_limit_array_length ~= nil then diff --git a/reframework/autorun/MHR_Overlay/Monsters/large_monster.lua b/reframework/autorun/MHR_Overlay/Monsters/large_monster.lua index 382347b..0f7259b 100644 --- a/reframework/autorun/MHR_Overlay/Monsters/large_monster.lua +++ b/reframework/autorun/MHR_Overlay/Monsters/large_monster.lua @@ -229,7 +229,7 @@ local get_mario_player_index_method = mario_param_type:get_method("get_MarioPlay local get_pos_field = enemy_character_base_type_def:get_method("get_Pos"); local system_array_type_def = sdk.find_type_definition("System.Array"); -local length_method = system_array_type_def:get_method("get_Length"); +local get_length_method = system_array_type_def:get_method("get_Length"); local get_value_method = system_array_type_def:get_method("GetValue(System.Int32)"); -- Lucent Nargacuga @@ -920,7 +920,7 @@ function this.update_parts(enemy, monster, physical_param) return; end - local core_parts_array_length = length_method:call(core_parts_array); + local core_parts_array_length = get_length_method:call(core_parts_array); if core_parts_array_length == nil then error_handler.report("large_monster.update_parts", "Failed to access Data: core_parts_array_length"); return; @@ -1074,7 +1074,7 @@ function this.update_anomaly_parts(enemy, monster, mystery_param) return; end - local core_parts_array_length = length_method:call(core_parts_array); + local core_parts_array_length = get_length_method:call(core_parts_array); if core_parts_array_length == nil then error_handler.report("large_monster.update_anomaly_parts", "Failed to access Data: core_parts_array_length"); return; diff --git a/reframework/autorun/MHR_Overlay/UI/customization_menu.lua b/reframework/autorun/MHR_Overlay/UI/customization_menu.lua index 974c53b..3b89c89 100644 --- a/reframework/autorun/MHR_Overlay/UI/customization_menu.lua +++ b/reframework/autorun/MHR_Overlay/UI/customization_menu.lua @@ -2099,11 +2099,7 @@ function this.draw_damage_meter_UI() end if config_changed then - local is_on_quest = quest_status.flow_state ~= quest_status.flow_states.IN_LOBBY and quest_status.flow_state ~= quest_status.flow_states.IN_TRAINING_AREA; - - players.update_player_list(is_on_quest); - non_players.update_servant_list(); - non_players.update_otomo_list(is_on_quest, quest_status.is_online); + players.update_players(); end if damage_display_changed then