From f7549b801754050d51440712c5a6088edea14544 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Mon, 3 Feb 2025 18:06:54 +0900 Subject: [PATCH] .. --- exp_scenario/module/commands/repair.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/exp_scenario/module/commands/repair.lua b/exp_scenario/module/commands/repair.lua index 6f82c67b..1d250dfd 100644 --- a/exp_scenario/module/commands/repair.lua +++ b/exp_scenario/module/commands/repair.lua @@ -5,8 +5,6 @@ Adds a command that allows an admin to repair and revive a large area local Commands = require("modules/exp_commands") local config = require("modules.exp_legacy.config.repair") --- @dep config.repair -local huge = math.huge - --- Repairs entities on your force around you Commands.new("repair", { "exp-commands_repair.description" }) :argument("range", { "exp-commands_repair.arg-range" }, Commands.types.integer_range(1, config.max_range)) @@ -46,9 +44,9 @@ Commands.new("repair", { "exp-commands_repair.description" }) } for _, entity in ipairs(entities) do - if entity.health and entity.get_health_ratio() ~= 1 then + if entity.health and entity.max_health and entity.health ~= entity.max_health then healed_count = healed_count + 1 - entity.health = huge + entity.health = entity.max_health end end