From df584d861c2ef2b1f1d78367c313511872df5a05 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Thu, 9 Jan 2025 06:10:26 +0900 Subject: [PATCH 1/4] Update Guthub links (#351) * Update addons.cfg * Update addons.cfg * Update addons.cfg --- exp_legacy/module/locale/en/addons.cfg | 4 ++-- exp_legacy/module/locale/zh-CN/addons.cfg | 4 ++-- exp_legacy/module/locale/zh-TW/addons.cfg | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/exp_legacy/module/locale/en/addons.cfg b/exp_legacy/module/locale/en/addons.cfg index 1a8152c5..23fec862 100644 --- a/exp_legacy/module/locale/en/addons.cfg +++ b/exp_legacy/module/locale/en/addons.cfg @@ -10,7 +10,7 @@ player-damage=__1__ discord=https://discord.explosivegaming.nl website=https://www.explosivegaming.nl status=https://status.explosivegaming.nl -github=https://github.com/explosivegaming/scenario +github=https://github.com/explosivegaming/ExpCluster patreon=https://www.patreon.com/ExpGaming [info] @@ -19,7 +19,7 @@ total-map-time=This map has been on for __1__ discord=Join us on our discord at: https://discord.explosivegaming.nl website=Please visit our website at: https://www.explosivegaming.nl status=Want to check if out servers are down? Visit: https://status.explosivegaming.nl -github=Want to help improve our server with some extra features? Help us at: https://github.com/explosivegaming/scenario +github=Want to help improve our server with some extra features? Help us at: https://github.com/explosivegaming/ExpCluster patreon=Consider supporting our server at: https://www.patreon.com/ExpGaming custom-commands=We use custom commands, such as /tag and /me, use /chelp for more info. read-readme=Make sure you have read the information gui (It can be found through the info mark on the top left) diff --git a/exp_legacy/module/locale/zh-CN/addons.cfg b/exp_legacy/module/locale/zh-CN/addons.cfg index 04517f0b..fdc41e8a 100644 --- a/exp_legacy/module/locale/zh-CN/addons.cfg +++ b/exp_legacy/module/locale/zh-CN/addons.cfg @@ -10,7 +10,7 @@ player-damage=__1__ discord=https://discord.explosivegaming.nl website=https://www.explosivegaming.nl status=https://status.explosivegaming.nl -github=https://github.com/explosivegaming/scenario +github=https://github.com/explosivegaming/ExpCluster patreon=https://www.patreon.com/ExpGaming [info] @@ -19,7 +19,7 @@ total-map-time=地圖時間為 __1__ discord=加入社群: https://discord.explosivegaming.nl website=訪問網站: https://www.explosivegaming.nl status=伺服器狀態: https://status.explosivegaming.nl -github=增加功能或回報錯誤: https://github.com/explosivegaming/scenario +github=增加功能或回報錯誤: https://github.com/explosivegaming/ExpCluster patreon=支持我們: https://www.patreon.com/ExpGaming custom-commands=這裹使用了自制指令,如 /tag 和 /me。可使用 /chelp 查看更多。 read-readme=確保你已閱讀相關資訊。按左上 i 圖標可再次查看。 diff --git a/exp_legacy/module/locale/zh-TW/addons.cfg b/exp_legacy/module/locale/zh-TW/addons.cfg index 04517f0b..fdc41e8a 100644 --- a/exp_legacy/module/locale/zh-TW/addons.cfg +++ b/exp_legacy/module/locale/zh-TW/addons.cfg @@ -10,7 +10,7 @@ player-damage=__1__ discord=https://discord.explosivegaming.nl website=https://www.explosivegaming.nl status=https://status.explosivegaming.nl -github=https://github.com/explosivegaming/scenario +github=https://github.com/explosivegaming/ExpCluster patreon=https://www.patreon.com/ExpGaming [info] @@ -19,7 +19,7 @@ total-map-time=地圖時間為 __1__ discord=加入社群: https://discord.explosivegaming.nl website=訪問網站: https://www.explosivegaming.nl status=伺服器狀態: https://status.explosivegaming.nl -github=增加功能或回報錯誤: https://github.com/explosivegaming/scenario +github=增加功能或回報錯誤: https://github.com/explosivegaming/ExpCluster patreon=支持我們: https://www.patreon.com/ExpGaming custom-commands=這裹使用了自制指令,如 /tag 和 /me。可使用 /chelp 查看更多。 read-readme=確保你已閱讀相關資訊。按左上 i 圖標可再次查看。 From 45883d6ce2cd825d020ccbff765a4f03dd74de8a Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Thu, 9 Jan 2025 06:11:27 +0900 Subject: [PATCH 2/4] 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 23fec862..0a868698 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 fdc41e8a..c2f133d2 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 fdc41e8a..c2f133d2 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 10442420..f5d9bad0 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 From b781198841b1baf5f372a1048c36df1abb1a9e29 Mon Sep 17 00:00:00 2001 From: Cooldude2606 <25043174+Cooldude2606@users.noreply.github.com> Date: Wed, 8 Jan 2025 21:24:59 +0000 Subject: [PATCH 3/4] Update Issue Templates --- .../{Bug_report.md => BugReport.md} | 28 ++++++------- .github/ISSUE_TEMPLATE/CrashReport.md | 36 +++++++++++++++++ .../{Desync_report.md => DesyncReport.md} | 19 +++++---- .github/ISSUE_TEMPLATE/Error_report.md | 39 ------------------- .../{Feature_request.md => FeatureRequest.md} | 11 +++--- 5 files changed, 67 insertions(+), 66 deletions(-) rename .github/ISSUE_TEMPLATE/{Bug_report.md => BugReport.md} (55%) create mode 100644 .github/ISSUE_TEMPLATE/CrashReport.md rename .github/ISSUE_TEMPLATE/{Desync_report.md => DesyncReport.md} (64%) delete mode 100644 .github/ISSUE_TEMPLATE/Error_report.md rename .github/ISSUE_TEMPLATE/{Feature_request.md => FeatureRequest.md} (80%) diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/BugReport.md similarity index 55% rename from .github/ISSUE_TEMPLATE/Bug_report.md rename to .github/ISSUE_TEMPLATE/BugReport.md index 3e4cacd5..8eba852e 100644 --- a/.github/ISSUE_TEMPLATE/Bug_report.md +++ b/.github/ISSUE_TEMPLATE/BugReport.md @@ -1,34 +1,34 @@ --- name: Bug report -about: Report a bug which does not crash the game, any bug from the latest major scenario - version +about: Report a bug which does not crash the game, any bug from the latest major scenario version title: '' labels: Bug assignees: '' --- -**Factorio version** -Version number: X.Y.Z +### Versions -**Scenario version** -Version number: X.Y.Z +Factorio: X.Y.Z +ExpCluster: X.Y.Z + +### Bug description -**Bug description** A clear and concise description of what the bug is. -**Reproduction method** -Steps to reproduce the behavior: +### Reproduction method + +Steps to reproduce the behaviour: + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error in log -**Expected behavior** +### Expected behaviour + A clear and concise description of what you expected to happen. -**Screenshots** -If applicable, add screenshots to help explain your problem. +### Screenshots -**Additional context** -Add any other context about the problem here. +If applicable, add screenshots to help explain your problem. diff --git a/.github/ISSUE_TEMPLATE/CrashReport.md b/.github/ISSUE_TEMPLATE/CrashReport.md new file mode 100644 index 00000000..01785b06 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/CrashReport.md @@ -0,0 +1,36 @@ +--- +name: Error report +about: Report a bug which cases the game to crash, or any other issue with an explicit stacktrace +title: '' +labels: Crash +assignees: '' + +--- + +### Versions + +Factorio: X.Y.Z +ExpCluster: X.Y.Z + +### Error message + +```log +error message and stacktrace back +``` + +### Reproduction method + +Steps to reproduce the behaviour: + +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error in log + +### Additional context + +Add any other context about the problem here. + +### Screenshots + +If applicable, add screenshots to help explain your problem. diff --git a/.github/ISSUE_TEMPLATE/Desync_report.md b/.github/ISSUE_TEMPLATE/DesyncReport.md similarity index 64% rename from .github/ISSUE_TEMPLATE/Desync_report.md rename to .github/ISSUE_TEMPLATE/DesyncReport.md index d5c91a32..a744e9a5 100644 --- a/.github/ISSUE_TEMPLATE/Desync_report.md +++ b/.github/ISSUE_TEMPLATE/DesyncReport.md @@ -7,21 +7,24 @@ assignees: '' --- -**Factorio version** -Version number: X.Y.Z +### Versions -**Scenario version** -Version number: X.Y.Z +Factorio: X.Y.Z +ExpCluster: X.Y.Z + +### Desync description -**Desync description** A clear and concise description of what you believe causes the desync. -**Reproduction method** -Steps to reproduce the behavior: +### Reproduction method + +Steps to reproduce the behaviour: + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error in log -**Additional context** +### Additional context + Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/Error_report.md b/.github/ISSUE_TEMPLATE/Error_report.md deleted file mode 100644 index aca61752..00000000 --- a/.github/ISSUE_TEMPLATE/Error_report.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -name: Error report -about: Report a bug which cases the game to crash, any bug from the latest major scenario - version -title: '' -labels: Bug -assignees: '' - ---- - -**Factorio version** -Version number: X.Y.Z - -**Scenario version** -Version number: X.Y.Z - -**Error message** -``` -error message and stacktrace back -``` - -**Error description** -A clear and concise description of what you believe causes the crash. - -**Reproduction method** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error in log - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/Feature_request.md b/.github/ISSUE_TEMPLATE/FeatureRequest.md similarity index 80% rename from .github/ISSUE_TEMPLATE/Feature_request.md rename to .github/ISSUE_TEMPLATE/FeatureRequest.md index 2e528965..4b3915fa 100644 --- a/.github/ISSUE_TEMPLATE/Feature_request.md +++ b/.github/ISSUE_TEMPLATE/FeatureRequest.md @@ -7,15 +7,16 @@ assignees: '' --- -**Feature overview** -Name: name-here TL;DR: a few words about what the feature is -**Details** +### Details + A detailed description of what the new feature is. -**Possible methods** +### Possible methods + Any ideas you have had about how to implement the feature or any problems that may arise. -**Additional context** +### Additional context + Add any other context or screenshots about the feature request here. From 60e34a0767dfe9e65006fd43e137904c478b8f9c Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Thu, 9 Jan 2025 06:30:13 +0900 Subject: [PATCH 4/4] Add Assert For Issue 352 (#349) * Update module_exports.lua * Update module_exports.lua * Link to issue rather than PR --------- Co-authored-by: Cooldude2606 <25043174+Cooldude2606@users.noreply.github.com> --- exp_util/module/module_exports.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/exp_util/module/module_exports.lua b/exp_util/module/module_exports.lua index a98b1e71..01c14397 100644 --- a/exp_util/module/module_exports.lua +++ b/exp_util/module/module_exports.lua @@ -420,6 +420,16 @@ function ExpUtil.get_storage_for_stack(options) local current, count, entities = cache.current, cache.count, cache.entities for i = 1, cache.count do local entity = entities[((current + i - 1) % count) + 1] + if entity == nil then + -- See Github Issue #352 + error("entity was nil, context:\n" .. ExpUtil.format_any({ + cache = cache, + i = i, + }, { + max_line_count = 0, + no_locale_strings = true + })) + end if entity.can_insert(item) then cache.current = current + 1 return entity