6 Commits

Author SHA1 Message Date
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
5 changed files with 20 additions and 15 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

@@ -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

@@ -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();

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.5";
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";