From 70664ffd0c88b37e96abfa2ebc122119ac6c24ec Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Thu, 8 Apr 2021 18:08:41 +0100 Subject: [PATCH] Made requested changes --- locale/en/addons.cfg | 2 +- locale/en/commands.cfg | 2 +- modules/addons/report-jail.lua | 4 ++-- modules/control/reports.lua | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/locale/en/addons.cfg b/locale/en/addons.cfg index 9acd4abc..65510fae 100644 --- a/locale/en/addons.cfg +++ b/locale/en/addons.cfg @@ -78,4 +78,4 @@ get-beer-2= 🍻 Chears Mate 🍻 verify=Please return to our discord and type r!verify __1__ [report-jail] -jail=__1__ was jailed because they have been reported too many times. \ No newline at end of file +jail=__1__ was jailed because they were reported too many times. \ No newline at end of file diff --git a/locale/en/commands.cfg b/locale/en/commands.cfg index 1a053c7e..3aea89ed 100644 --- a/locale/en/commands.cfg +++ b/locale/en/commands.cfg @@ -29,7 +29,7 @@ not-jailed=__1__ is not currently in jail. [expcom-report] player-immune=This player can not be reported. -self-report=You can not report your self. +self-report=You cannot report yourself. non-admin=__1__ was reported for __2__. admin=__1__ was reported by __2__ for __3__. already-reported=You can only report a player once, you can ask a moderator to clear this report. diff --git a/modules/addons/report-jail.lua b/modules/addons/report-jail.lua index b98c3ce0..f9211993 100644 --- a/modules/addons/report-jail.lua +++ b/modules/addons/report-jail.lua @@ -1,4 +1,4 @@ ---- When a player is reported by players with a greater combined delta playtime, the player is automatically jailed +--- When a player is reported, the player is automatically jailed if the combined playtime of the reporters exceeds the reported player -- @addon report-jail local Event = require 'utils.event' ---@dep utils.event @@ -6,7 +6,7 @@ local Jail = require 'modules.control.jail' ---@dep modules.control.jail local Reports = require 'modules.control.reports' --- @dep modules.control.reports local format_chat_player_name = _C.format_chat_player_name --- @dep expcore.common ---- Returns the playtime of the reporter, used to sum the playtime of all reporters +--- Returns the playtime of the reporter. Used when calculating the total playtime of all reporters local function reporter_playtime(_, by_player_name, _) local player = game.get_player(by_player_name) if player == nil then return 0 end diff --git a/modules/control/reports.lua b/modules/control/reports.lua index 354c8235..62d3bea7 100644 --- a/modules/control/reports.lua +++ b/modules/control/reports.lua @@ -132,7 +132,7 @@ function Reports.report_player(player, by_player_name, reason) if not player then return end local player_name = player.name - if reason == nil or not reason:find("/S") then reason = 'Non given' end + if reason == nil or not reason:find("/S") then reason = 'No reason given' end local reports = user_reports[player_name] if not reports then