From 9018397b09f6495c6d331c44b173fa85d254f06c Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Wed, 28 Jan 2026 15:03:47 +0000 Subject: [PATCH] Fix logistics data on servers without logistic researched (#809) * Initial plan * Add logistics technology validation to prevent load failures Co-authored-by: Danielv123 <6792749+Danielv123@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Danielv123 <6792749+Danielv123@users.noreply.github.com> --- plugins/inventory_sync/module/serialize.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/plugins/inventory_sync/module/serialize.lua b/plugins/inventory_sync/module/serialize.lua index bb7ee5f2..989315e9 100644 --- a/plugins/inventory_sync/module/serialize.lua +++ b/plugins/inventory_sync/module/serialize.lua @@ -76,6 +76,12 @@ end -- min -- max function serialize.serialize_personal_logistic_slots(player) + -- Check if logistics technology is researched + local force = player.force + if not force.technologies["logistic-robotics"] or not force.technologies["logistic-robotics"].researched then + return nil + end + if v2_logistic_api then local logistic_point = player.get_requester_point() if logistic_point == nil then @@ -129,9 +135,18 @@ function serialize.deserialize_personal_logistic_slots(player, serialized) return end + -- Check if logistics technology is researched + local force = player.force + if not force.technologies["logistic-robotics"] or not force.technologies["logistic-robotics"].researched then + return + end + -- Load personal logistic slots if v2_logistic_api then local logistic_point = player.get_requester_point() + if logistic_point == nil then + return + end -- Remove old sections up to section_count for i = logistic_point.sections_count, 1, -1 do