From d5be21a990c66f82bd32a52494450a75a783e3f9 Mon Sep 17 00:00:00 2001 From: Matthew Heguy Date: Wed, 23 Jan 2019 23:37:11 -0500 Subject: [PATCH] Chaaaaaaange places --- features/corpse_util.lua | 4 ++-- features/nuke_control.lua | 13 ++++++++----- utils/core.lua | 5 ++--- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/features/corpse_util.lua b/features/corpse_util.lua index 32bdb5f3..e0543e6d 100644 --- a/features/corpse_util.lua +++ b/features/corpse_util.lua @@ -118,7 +118,7 @@ local function mined_entity(event) if player and corpse_owner then local message = table.concat {'## - ', player.name, ' has looted ', corpse_owner.name, "'s corpse"} - Utils.action_warning(message, '[Corpse]') + Utils.action_warning('[Corpse]', message) end end @@ -140,7 +140,7 @@ local function on_gui_opened(event) if player and corpse_owner then local message = table.concat {player.name, ' is looting ', corpse_owner.name, "'s corpse"} - Utils.action_warning(message, '[Corpse]') + Utils.action_warning('[Corpse]', message) end end diff --git a/features/nuke_control.lua b/features/nuke_control.lua index 5eefac78..6ecce459 100644 --- a/features/nuke_control.lua +++ b/features/nuke_control.lua @@ -4,6 +4,9 @@ local Utils = require 'utils.core' local Game = require 'utils.game' local Server = require 'features.server' +local format = string.format +local match = string.match + local function allowed_to_nuke(player) return player.admin or UserGroups.is_regular(player.name) or ((player.online_time / 216000) > global.config.nuke_control.nuke_min_time_hours) end @@ -15,7 +18,7 @@ local function ammo_changed(event) end local nukes = player.remove_item({name = 'atomic-bomb', count = 1000}) if nukes > 0 then - Utils.action_warning(player.name .. ' tried to use a nuke, but instead dropped it on his foot.', '[Nuke]') + Utils.action_warning('[Nuke]', player.name .. ' tried to use a nuke, but instead dropped it on his foot.') local character = player.character if character and character.valid then @@ -37,7 +40,7 @@ local function on_player_deconstructed_area(event) player.remove_item({name = 'deconstruction-planner', count = 1000}) --Make them think they arent noticed - Utils.silent_action_warning(player.name .. ' tried to deconstruct something, but instead deconstructed themself.', '[Deconstruct]', player) + Utils.silent_action_warning('[Deconstruct]', player.name .. ' tried to deconstruct something, but instead deconstructed themself.', player) player.print('Only regulars can mark things for deconstruction, if you want to deconstruct something you may ask an admin to promote you.') local character = player.character @@ -142,12 +145,12 @@ local function on_capsule_used(event) if count > 8 then if global.players_warned[event.player_index] then if nuke_control.enable_autoban then - Server.ban_sync(player.name, string.format('Damaged %i entities with %s. This action was performed automatically. If you want to contest this ban please visit redmew.com/discord.', count, item.name), '