From 45883d6ce2cd825d020ccbff765a4f03dd74de8a Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Thu, 9 Jan 2025 06:11:27 +0900 Subject: [PATCH] Fix Deconlog Surface Tags (#350) * Update deconlog.lua * Update addons.cfg * Update addons.cfg * Update addons.cfg * Update deconlog.lua --- exp_legacy/module/locale/en/addons.cfg | 2 +- exp_legacy/module/locale/zh-CN/addons.cfg | 2 +- exp_legacy/module/locale/zh-TW/addons.cfg | 2 +- exp_legacy/module/modules/addons/deconlog.lua | 9 ++++----- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/exp_legacy/module/locale/en/addons.cfg b/exp_legacy/module/locale/en/addons.cfg index 23fec8626f..0a868698a4 100644 --- a/exp_legacy/module/locale/en/addons.cfg +++ b/exp_legacy/module/locale/en/addons.cfg @@ -92,4 +92,4 @@ add-l=[RES] __1__ at level __2__ has been researched add-n=[RES] __1__ has been researched [deconlog] -decon=__1__ tried to deconstruct on __2__ from __3__ to __4__ which has __5__ items. +decon=__1__ tried to deconstruct from __2__ to __3__ which has __4__ items. diff --git a/exp_legacy/module/locale/zh-CN/addons.cfg b/exp_legacy/module/locale/zh-CN/addons.cfg index fdc41e8ad7..c2f133d24a 100644 --- a/exp_legacy/module/locale/zh-CN/addons.cfg +++ b/exp_legacy/module/locale/zh-CN/addons.cfg @@ -92,4 +92,4 @@ add-l=[RES] __1__ at level __2__ has been researched add-n=[RES] __1__ has been researched [deconlog] -decon=__1__ 試圖拆除在 __2__ 上從 __3__ 到 __4__ ,有 __5__ 個物品。 +decon=__1__ 試圖拆除在 __2__ 到 __3__ ,有 __4__ 個物品。 diff --git a/exp_legacy/module/locale/zh-TW/addons.cfg b/exp_legacy/module/locale/zh-TW/addons.cfg index fdc41e8ad7..c2f133d24a 100644 --- a/exp_legacy/module/locale/zh-TW/addons.cfg +++ b/exp_legacy/module/locale/zh-TW/addons.cfg @@ -92,4 +92,4 @@ add-l=[RES] __1__ at level __2__ has been researched add-n=[RES] __1__ has been researched [deconlog] -decon=__1__ 試圖拆除在 __2__ 上從 __3__ 到 __4__ ,有 __5__ 個物品。 +decon=__1__ 試圖拆除在 __2__ 到 __3__ ,有 __4__ 個物品。 diff --git a/exp_legacy/module/modules/addons/deconlog.lua b/exp_legacy/module/modules/addons/deconlog.lua index 10442420af..f5d9bad046 100644 --- a/exp_legacy/module/modules/addons/deconlog.lua +++ b/exp_legacy/module/modules/addons/deconlog.lua @@ -24,8 +24,8 @@ local function pos_to_string(pos) return tostring(pos.x) .. "," .. tostring(pos.y) end -local function pos_to_gps_string(pos) - return "[gps=" .. string.format("%.1f", pos.x) .. "," .. string.format("%.1f", pos.y) .. "]" +local function pos_to_gps_string(pos, surface_name) + return "[gps=" .. string.format("%.1f", pos.x) .. "," .. string.format("%.1f", pos.y) .. "," .. surface_name .. "]" end --- Print a message to all players who match the value of admin @@ -59,9 +59,8 @@ if config.decon_area then print_to_players(true, { "deconlog.decon", player.name, - e.surface.localised_name, - pos_to_gps_string(e.area.left_top), - pos_to_gps_string(e.area.right_bottom), + pos_to_gps_string(e.area.left_top, e.surface.name), + pos_to_gps_string(e.area.right_bottom, e.surface.name), format_number(#items, false), }) end