Change default values

This commit is contained in:
GreenComfyTea
2023-08-09 16:08:27 +03:00
parent a100932a02
commit b805d88205
6 changed files with 37 additions and 18 deletions

View File

@@ -10,6 +10,7 @@ local drawing;
local language;
local players;
local error_handler;
local utils;
local sdk = sdk;
local tostring = tostring;
@@ -56,8 +57,8 @@ function this.new(id, name, level, type)
non_player.type = type;
non_player.join_time = -1;
non_player.first_hit_time = -1;
non_player.join_time = utils.constants.uninitialized_int;
non_player.first_hit_time = utils.constants.uninitialized_int;
non_player.dps = 0;
non_player.small_monsters = players.init_damage_sources()
@@ -409,6 +410,7 @@ function this.init_dependencies()
language = require("MHR_Overlay.Misc.language");
players = require("MHR_Overlay.Damage_Meter.players");
error_handler = require("MHR_Overlay.Misc.error_handler");
utils = require("MHR_Overlay.Misc.utils");
end
function this.init_module()

View File

@@ -91,8 +91,8 @@ function this.new(id, name, master_rank, hunter_rank, type)
player.cart_count = 0;
player.join_time = -1;
player.first_hit_time = -1;
player.join_time = utils.constants.uninitialized_int;
player.first_hit_time = utils.constants.uninitialized_int;
player.dps = 0;
player.small_monsters = this.init_damage_sources();
@@ -141,7 +141,7 @@ function this.update_damage(player, damage_source_type, is_large_monster, damage
return;
end
if player.first_hit_time == -1 then
if player.first_hit_time == utils.constants.uninitialized_int then
player.first_hit_time = time.total_elapsed_script_seconds;
end
@@ -375,7 +375,7 @@ end
function this.update_player_dps(player)
local cached_config = config.current_config.damage_meter_UI.settings;
if player.join_time == -1 then
if player.join_time == utils.constants.uninitialized_int then
player.join_time = time.total_elapsed_script_seconds;
end