8 Commits

Author SHA1 Message Date
GreenComfyTea
26590a3e0b Bump version to v2.6.6 2024-03-01 16:57:15 +02:00
GreenComfyTea
1439498a67 [Hunting Horn -> Bead of Resonance]: Fixed in online when not host 2024-03-01 16:57:01 +02:00
GreenComfyTea
6a876ccdb4 Revert "Whitelist default.json localization file"
This reverts commit 9560dad602.
2024-02-09 10:48:45 +02:00
GreenComfyTea
9560dad602 Whitelist default.json localization file 2024-02-09 10:46:56 +02:00
GreenComfyTea
032b77ca95 Bump version to v2.6.5 2024-02-09 10:42:53 +02:00
GreenComfyTea
efdaae5b5a Formatting 2024-02-09 10:42:37 +02:00
GreenComfyTea
419d25070b Make keyboard.update() event-based 2024-02-09 10:42:21 +02:00
GreenComfyTea
bee2e7d873 Update README.md 2024-01-27 13:43:29 +02:00
6 changed files with 22 additions and 19 deletions

View File

@@ -34,7 +34,7 @@
<img alt="Platform" src="https://custom-icon-badges.demolab.com/badge/platform-win%20%7C%20linux%20%7C%20steam%20deck-blue?logo=device-desktop" /> <img alt="Platform" src="https://custom-icon-badges.demolab.com/badge/platform-win%20%7C%20linux%20%7C%20steam%20deck-blue?logo=device-desktop" />
</a> </a>
<a href=""> <a href="">
<img alt="Maintenance" src="https://custom-icon-badges.demolab.com/maintenance/yes/2023?logo=tools" /> <img alt="Maintenance" src="https://custom-icon-badges.demolab.com/maintenance/yes/2024?logo=tools" />
</a> </a>
<br> <br>
<a href="https://www.nexusmods.com/monsterhunterrise/mods/26"> <a href="https://www.nexusmods.com/monsterhunterrise/mods/26">

View File

@@ -534,7 +534,7 @@ end);
if d2d ~= nil then if d2d ~= nil then
d2d.register(function() d2d.register(function()
drawing.init_font(); drawing.init_font();
end, function() end, function()
if config.current_config.global_settings.renderer.use_d2d_if_available then if config.current_config.global_settings.renderer.use_d2d_if_available then
draw_loop(); draw_loop();
end end
@@ -543,7 +543,6 @@ end
re.on_frame(function() re.on_frame(function()
time.update_timers(); time.update_timers();
keyboard.update();
if d2d == nil or not config.current_config.global_settings.renderer.use_d2d_if_available then if d2d == nil or not config.current_config.global_settings.renderer.use_d2d_if_available then
draw_loop(); draw_loop();

View File

@@ -699,7 +699,6 @@ function this.update_rising_moon()
return; return;
end end
-- Possibly requires players.myself.id instead of 0?
local light_bowgun_shell_030 = get_light_bowgun_shell_030_list_item_method:call(light_bowgun_shell_030s_speed_boost_list, 0); local light_bowgun_shell_030 = get_light_bowgun_shell_030_list_item_method:call(light_bowgun_shell_030s_speed_boost_list, 0);
if light_bowgun_shell_030 == nil then if light_bowgun_shell_030 == nil then
error_handler.report("weapon_skills.update_rising_moon", "Failed to access Data: light_bowgun_shell_030"); error_handler.report("weapon_skills.update_rising_moon", "Failed to access Data: light_bowgun_shell_030");
@@ -769,7 +768,6 @@ function this.update_setting_sun()
return; return;
end end
-- Possibly requires players.myself.id instead of 0?
local light_bowgun_shell_030 = get_light_bowgun_shell_030_list_item_method:call(light_bowgun_shell_030s_all_list, 0); local light_bowgun_shell_030 = get_light_bowgun_shell_030_list_item_method:call(light_bowgun_shell_030s_all_list, 0);
if light_bowgun_shell_030 == nil then if light_bowgun_shell_030 == nil then
error_handler.report("weapon_skills.update_setting_sun", "Failed to access Data: light_bowgun_shell_030"); error_handler.report("weapon_skills.update_setting_sun", "Failed to access Data: light_bowgun_shell_030");
@@ -929,12 +927,12 @@ function this.update_bead_of_resonance()
return; return;
end end
if players.myself.id >= horn_shell_003s_array_length then if horn_shell_003s_array_length == 0 then
this.list.bead_of_resonance = nil; this.list.bead_of_resonance = nil;
return; return;
end end
local horn_shell_003_list = get_value_method:call(horn_shell_003s_array, players.myself.id); local horn_shell_003_list = get_value_method:call(horn_shell_003s_array, 0);
if horn_shell_003_list == nil then if horn_shell_003_list == nil then
error_handler.report("weapon_skills.update_bead_of_resonance", "Failed to access Data: horn_shell_003_list"); error_handler.report("weapon_skills.update_bead_of_resonance", "Failed to access Data: horn_shell_003_list");
this.list.bead_of_resonance = nil; this.list.bead_of_resonance = nil;

View File

@@ -9,6 +9,7 @@ local large_monster;
local damage_meter_UI; local damage_meter_UI;
local time; local time;
local error_handler; local error_handler;
local quest_status;
local sdk = sdk; local sdk = sdk;
local tostring = tostring; local tostring = tostring;
@@ -49,6 +50,7 @@ local hard_keyboard_field_type_def = hard_keyboard_field:get_type();
local get_down_method = hard_keyboard_field_type_def:get_method("getDown"); local get_down_method = hard_keyboard_field_type_def:get_method("getDown");
local get_trigger_method = hard_keyboard_field_type_def:get_method("getTrg"); local get_trigger_method = hard_keyboard_field_type_def:get_method("getTrg");
local get_release_method = hard_keyboard_field_type_def:get_method("getRelease"); local get_release_method = hard_keyboard_field_type_def:get_method("getRelease");
local update_method = hard_keyboard_field_type_def:get_method("update");
this.hotkey_modifiers_down = { this.hotkey_modifiers_down = {
ctrl = false, ctrl = false,
@@ -334,13 +336,7 @@ this.keys = {
--[254] = "Clear" --[254] = "Clear"
}; };
function this.update() function this.update(hard_keyboard)
if singletons.game_keyboard == nil then
error_handler.report("keyboard.update", "Failed to access Data: game_keyboard");
return;
end
local hard_keyboard = hard_keyboard_field:get_data(singletons.game_keyboard);
if hard_keyboard == nil then if hard_keyboard == nil then
error_handler.report("keyboard.update", "Failed to access Data: hard_keyboard"); error_handler.report("keyboard.update", "Failed to access Data: hard_keyboard");
return; return;
@@ -717,9 +713,19 @@ function this.init_dependencies()
damage_meter_UI = require("MHR_Overlay.UI.Modules.damage_meter_UI"); damage_meter_UI = require("MHR_Overlay.UI.Modules.damage_meter_UI");
time = require("MHR_Overlay.Game_Handler.time"); time = require("MHR_Overlay.Game_Handler.time");
error_handler = require("MHR_Overlay.Misc.error_handler"); error_handler = require("MHR_Overlay.Misc.error_handler");
quest_status = require("MHR_Overlay.Game_Handler.quest_status");
end end
function this.init_module() function this.init_module()
sdk.hook(update_method, function(args)
local hard_keyboard = sdk.to_managed_object(args[2]);
this.update(hard_keyboard);
end, function(retval)
return retval;
end);
end end
return this; return this;

View File

@@ -74,14 +74,14 @@ function this.new_timer(callback, cooldown_seconds, start_offset_seconds)
this.timer_list[callback] = timer; this.timer_list[callback] = timer;
end end
function this.new_delay_timer(callback, delay) function this.new_delay_timer(callback, delay_seconds)
if callback == nil or delay == nil then if callback == nil or delay_seconds == nil then
return; return;
end end
local delay_timer = {}; local delay_timer = {};
delay_timer.callback = callback; delay_timer.callback = callback;
delay_timer.delay = delay; delay_timer.delay = delay_seconds;
delay_timer.init_time = os.clock(); delay_timer.init_time = os.clock();
@@ -95,7 +95,7 @@ function this.remove_delay_timer(delay_timer)
return; return;
end end
this.delay_timer_list[delay_timer.callback] = nil; this.delay_timer_list[delay_timer.callback] = nil;
end end
function this.init_global_timers() function this.init_global_timers()

View File

@@ -36,7 +36,7 @@ local os = os;
local ValueType = ValueType; local ValueType = ValueType;
local package = package; local package = package;
this.version = "2.6.4"; this.version = "2.6.6";
this.config_folder = "MHR Overlay\\configs\\"; this.config_folder = "MHR Overlay\\configs\\";
this.current_config_value_file_name = "MHR Overlay\\config.json"; this.current_config_value_file_name = "MHR Overlay\\config.json";