From f3a04fd26c6b72ad1ed41d07b904ac52aaac86e4 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Thu, 25 Jun 2026 05:25:39 +0900 Subject: [PATCH 1/5] remove personal-logistic (#428) * Delete exp_legacy/module/modules/data/personal-logistic.lua * Update _file_loader.lua * Update roles.lua * Delete exp_legacy/module/config/personal_logistic.lua --- exp_legacy/module/config/_file_loader.lua | 1 - exp_legacy/module/config/expcore/roles.lua | 1 - .../module/config/personal_logistic.lua | 1641 ----------------- .../module/modules/data/personal-logistic.lua | 89 - 4 files changed, 1732 deletions(-) delete mode 100644 exp_legacy/module/config/personal_logistic.lua delete mode 100644 exp_legacy/module/modules/data/personal-logistic.lua diff --git a/exp_legacy/module/config/_file_loader.lua b/exp_legacy/module/config/_file_loader.lua index 4562a7d5..fae86b7c 100644 --- a/exp_legacy/module/config/_file_loader.lua +++ b/exp_legacy/module/config/_file_loader.lua @@ -17,7 +17,6 @@ return { "modules.data.alt-view", "modules.data.tag", -- 'modules.data.bonus', - "modules.data.personal-logistic", "modules.data.language", --"modules.data.toolbar", diff --git a/exp_legacy/module/config/expcore/roles.lua b/exp_legacy/module/config/expcore/roles.lua index 46e26d73..a42a0a52 100644 --- a/exp_legacy/module/config/expcore/roles.lua +++ b/exp_legacy/module/config/expcore/roles.lua @@ -236,7 +236,6 @@ Roles.new_role("Member", "Mem") "gui/tool", "command/save-quickbar", "command/vlayer-info", - "command/personal-logistic", "command/lawnmower", "command/waterfill", "command/artillery", diff --git a/exp_legacy/module/config/personal_logistic.lua b/exp_legacy/module/config/personal_logistic.lua deleted file mode 100644 index d8e4e7bb..00000000 --- a/exp_legacy/module/config/personal_logistic.lua +++ /dev/null @@ -1,1641 +0,0 @@ ---- PL Settings --- @config Personal Logistic - -return { - start = 0, - production_required = { - ["belt"] = 100, - ["power"] = 20, - ["miner"] = 20, - ["furnace"] = 20, - ["machine"] = 20, - ["pole"] = 20, - ["bot"] = 20, - ["inserter"] = 20, - ["chest"] = 20, - ["rail"] = 100, - ["module"] = 20, - ["defense"] = 20, - ["rocket"] = 20, - ["ammo"] = 20, - ["armor"] = 3, - ["armor_equipment"] = 4, - ["weapon"] = 0, - }, - request = { - -- belt - ["transport-belt"] = { - key = 1, - upgrade_of = nil, - type = "belt", - stack = 100, - min = 800, - max = 800, - }, - ["underground-belt"] = { - key = 2, - upgrade_of = nil, - type = "belt", - stack = 50, - min = 250, - max = 250, - }, - ["splitter"] = { - key = 3, - upgrade_of = nil, - type = "belt", - stack = 50, - min = 100, - max = 100, - }, - ["fast-transport-belt"] = { - key = 11, - upgrade_of = "transport-belt", - type = "belt", - stack = 100, - min = 800, - max = 800, - }, - ["fast-underground-belt"] = { - key = 12, - upgrade_of = "underground-belt", - type = "belt", - stack = 50, - min = 250, - max = 250, - }, - ["fast-splitter"] = { - key = 13, - upgrade_of = "splitter", - type = "belt", - stack = 50, - min = 100, - max = 100, - }, - ["express-transport-belt"] = { - key = 21, - upgrade_of = "fast-transport-belt", - type = "belt", - stack = 100, - min = 800, - max = 800, - }, - ["express-underground-belt"] = { - key = 22, - upgrade_of = "fast-underground-belt", - type = "belt", - stack = 50, - min = 250, - max = 250, - }, - ["express-splitter"] = { - key = 23, - upgrade_of = "fast-splitter", - type = "belt", - stack = 50, - min = 100, - max = 100, - }, - -- power - ["solar-panel"] = { - key = 4, - upgrade_of = nil, - type = "power", - stack = 50, - min = 0, - max = 0, - }, - ["accumulator"] = { - key = 5, - upgrade_of = nil, - type = "power", - stack = 50, - min = 0, - max = 0, - }, - ["boiler"] = { - key = 6, - upgrade_of = nil, - type = nil, - stack = 50, - min = 0, - max = 0, - }, - ["steam-engine"] = { - key = 7, - upgrade_of = nil, - type = nil, - stack = 10, - min = 0, - max = 0, - }, - -- miner - ["burner-mining-drill"] = { - key = 8, - upgrade_of = nil, - type = "miner", - stack = 50, - min = 0, - max = 0, - }, - ["electric-mining-drill"] = { - key = 9, - upgrade_of = "burner-mining-drill", - type = "miner", - stack = 50, - min = 250, - max = 250, - }, - ["pumpjack"] = { - key = 10, - upgrade_of = nil, - type = "miner", - stack = 20, - min = 20, - max = 20, - }, - -- furnace - ["stone-furnace"] = { - key = 18, - upgrade_of = nil, - type = "furnace", - stack = 50, - min = 0, - max = 0, - }, - ["steel-furnace"] = { - key = 19, - upgrade_of = "stone-furnace", - type = "furnace", - stack = 50, - min = 0, - max = 0, - }, - ["electric-furnace"] = { - key = 20, - upgrade_of = "steel-furnace", - type = "furnace", - stack = 50, - min = 0, - max = 0, - }, - -- machine - ["assembling-machine-1"] = { - key = 28, - upgrade_of = nil, - type = "machine", - stack = 50, - min = 0, - max = 50, - }, - ["assembling-machine-2"] = { - key = 29, - upgrade_of = "assembling-machine-1", - type = "machine", - stack = 50, - min = 50, - max = 50, - }, - ["assembling-machine-3"] = { - key = 30, - upgrade_of = "assembling-machine-2", - type = "machine", - stack = 50, - min = 50, - max = 50, - }, - ["oil-refinery"] = { - key = 24, - upgrade_of = nil, - type = "machine", - stack = 10, - min = 0, - max = 0, - }, - ["chemical-plant"] = { - key = 25, - upgrade_of = nil, - type = "machine", - stack = 10, - min = 0, - max = 0, - }, - ["centrifuge"] = { - key = 26, - upgrade_of = nil, - type = nil, - stack = 50, - min = 0, - max = 0, - }, - ["lab"] = { - key = 27, - upgrade_of = nil, - type = nil, - stack = 10, - min = 0, - max = 0, - }, - ["nuclear-reactor"] = { - key = 14, - upgrade_of = nil, - type = nil, - stack = 10, - min = 0, - max = 0, - }, - ["heat-pipe"] = { - key = 15, - upgrade_of = nil, - type = nil, - stack = 50, - min = 0, - max = 0, - }, - ["heat-exchanger"] = { - key = 16, - upgrade_of = nil, - type = nil, - stack = 50, - min = 0, - max = 0, - }, - ["steam-turbine"] = { - key = 17, - upgrade_of = nil, - type = nil, - stack = 10, - min = 0, - max = 0, - }, - ["rocket-silo"] = { - key = 80, - upgrade_of = nil, - type = nil, - stack = 1, - min = 0, - max = 0, - }, - -- pole - ["small-electric-pole"] = { - key = 31, - upgrade_of = nil, - type = "pole", - stack = 50, - min = 150, - max = 150, - }, - ["medium-electric-pole"] = { - key = 32, - upgrade_of = "small-electric-pole", - type = "pole", - stack = 50, - min = 150, - max = 150, - }, - ["big-electric-pole"] = { - key = 33, - upgrade_of = nil, - type = "pole", - stack = 50, - min = 150, - max = 150, - }, - ["substation"] = { - key = 34, - upgrade_of = nil, - type = "pole", - stack = 50, - min = 50, - max = 50, - }, - -- bot - ["roboport"] = { - key = 35, - upgrade_of = nil, - type = "bot", - stack = 10, - min = 20, - max = 20, - }, - ["construction-robot"] = { - key = 36, - upgrade_of = nil, - type = "bot", - stack = 50, - min = 100, - max = 100, - }, - ["logistic-robot"] = { - key = 37, - upgrade_of = nil, - type = "bot", - stack = 50, - min = 10, - max = 10, - }, - ["cliff-explosives"] = { - key = 38, - upgrade_of = nil, - type = "bot", - stack = 20, - min = 80, - max = 80, - }, - ["repair-pack"] = { - key = 39, - upgrade_of = nil, - type = "bot", - stack = 100, - min = 100, - max = 100, - }, - ["landfill"] = { - key = 40, - upgrade_of = nil, - type = "bot", - stack = 100, - min = 300, - max = 300, - }, - -- ore - ["wood"] = { - key = 151, - upgrade_of = nil, - type = nil, - stack = 100, - min = 0, - max = 0, - }, - ["coal"] = { - key = 152, - upgrade_of = nil, - type = nil, - stack = 50, - min = 0, - max = 0, - }, - ["stone"] = { - key = 153, - upgrade_of = nil, - type = nil, - stack = 50, - min = 0, - max = 0, - }, - ["iron-ore"] = { - key = 154, - upgrade_of = nil, - type = nil, - stack = 50, - min = 0, - max = 0, - }, - ["copper-ore"] = { - key = 155, - upgrade_of = nil, - type = nil, - stack = 50, - min = 0, - max = 0, - }, - ["uranium-ore"] = { - key = 156, - upgrade_of = nil, - type = nil, - stack = 50, - min = 0, - max = 0, - }, - ["raw-fish"] = { - key = 157, - upgrade_of = nil, - type = nil, - stack = 100, - min = 0, - max = 0, - }, - ["iron-stick"] = { - key = 158, - upgrade_of = nil, - type = nil, - stack = 100, - min = 0, - max = 0, - }, - ["iron-gear-wheel"] = { - key = 159, - upgrade_of = nil, - type = nil, - stack = 100, - min = 0, - max = 0, - }, - ["satellite"] = { - key = 160, - upgrade_of = nil, - type = nil, - stack = 1, - min = 0, - max = 0, - }, - -- inserter - ["burner-inserter"] = { - key = 41, - upgrade_of = nil, - type = "inserter", - stack = 50, - min = 0, - max = 50, - }, - ["inserter"] = { - key = 42, - upgrade_of = "burner-inserter", - type = "inserter", - stack = 50, - min = 0, - max = 50, - }, - ["long-handed-inserter"] = { - key = 43, - upgrade_of = nil, - type = "inserter", - stack = 50, - min = 0, - max = 0, - }, - ["fast-inserter"] = { - key = 44, - upgrade_of = "inserter", - type = "inserter", - stack = 50, - min = 0, - max = 50, - }, - ["filter-inserter"] = { - key = 45, - upgrade_of = nil, - type = "inserter", - stack = 50, - min = 50, - max = 50, - }, - ["stack-inserter"] = { - key = 46, - upgrade_of = "fast-inserter", - type = "inserter", - stack = 50, - min = 100, - max = 100, - }, - ["stack-filter-inserter"] = { - key = 47, - upgrade_of = nil, - type = "inserter", - stack = 50, - min = 50, - max = 50, - }, - -- pipe - ["pipe"] = { - key = 48, - upgrade_of = nil, - type = nil, - stack = 100, - min = 200, - max = 200, - }, - ["pipe-to-ground"] = { - key = 49, - upgrade_of = nil, - type = nil, - stack = 50, - min = 150, - max = 150, - }, - ["pump"] = { - key = 50, - upgrade_of = nil, - type = nil, - stack = 50, - min = 100, - max = 100, - }, - ["storage-tank"] = { - key = 59, - upgrade_of = nil, - type = nil, - stack = 50, - min = 50, - max = 50, - }, - -- chest - ["wooden-chest"] = { - key = 51, - upgrade_of = nil, - type = "chest", - stack = 50, - min = 0, - max = 50, - }, - ["iron-chest"] = { - key = 52, - upgrade_of = "wooden-chest", - type = "chest", - stack = 50, - min = 0, - max = 50, - }, - ["steel-chest"] = { - key = 53, - upgrade_of = "iron-chest", - type = "chest", - stack = 50, - min = 50, - max = 100, - }, - ["passive-provider-chest"] = { - key = 54, - upgrade_of = nil, - type = "chest", - stack = 50, - min = 50, - max = 50, - }, - ["storage-chest"] = { - key = 55, - upgrade_of = nil, - type = "chest", - stack = 50, - min = 50, - max = 50, - }, - ["requester-chest"] = { - key = 56, - upgrade_of = nil, - type = "chest", - stack = 50, - min = 50, - max = 50, - }, - ["buffer-chest"] = { - key = 57, - upgrade_of = nil, - type = "chest", - stack = 50, - min = 50, - max = 50, - }, - ["active-provider-chest"] = { - key = 58, - upgrade_of = nil, - type = "chest", - stack = 50, - min = 50, - max = 50, - }, - -- rail - ["rail"] = { - key = 61, - upgrade_of = nil, - type = "rail", - stack = 100, - min = 1500, - max = 1500, - }, - ["train-stop"] = { - key = 62, - upgrade_of = nil, - type = "rail", - stack = 10, - min = 20, - max = 20, - }, - ["rail-signal"] = { - key = 63, - upgrade_of = nil, - type = "rail", - stack = 50, - min = 150, - max = 150, - }, - ["rail-chain-signal"] = { - key = 64, - upgrade_of = nil, - type = "rail", - stack = 50, - min = 150, - max = 150, - }, - ["locomotive"] = { - key = 65, - upgrade_of = nil, - type = "rail", - stack = 5, - min = 0, - max = 0, - }, - ["cargo-wagon"] = { - key = 66, - upgrade_of = nil, - type = "rail", - stack = 5, - min = 0, - max = 0, - }, - ["fluid-wagon"] = { - key = 67, - upgrade_of = nil, - type = "rail", - stack = 5, - min = 0, - max = 0, - }, - ["artillery-wagon"] = { - key = 68, - upgrade_of = nil, - type = "rail", - stack = 5, - min = 0, - max = 0, - }, - -- circuit - ["constant-combinator"] = { - key = 71, - upgrade_of = nil, - type = nil, - stack = 50, - min = 50, - max = 50, - }, - ["arithmetic-combinator"] = { - key = 72, - upgrade_of = nil, - type = nil, - stack = 50, - min = 50, - max = 50, - }, - ["decider-combinator"] = { - key = 73, - upgrade_of = nil, - type = nil, - stack = 50, - min = 50, - max = 50, - }, - ["small-lamp"] = { - key = 74, - upgrade_of = nil, - type = nil, - stack = 50, - min = 50, - max = 50, - }, - ["red-wire"] = { - key = 75, - upgrade_of = nil, - type = nil, - stack = 200, - min = 200, - max = 200, - }, - ["green-wire"] = { - key = 76, - upgrade_of = nil, - type = nil, - stack = 200, - min = 200, - max = 200, - }, - ["copper-cable"] = { - key = 77, - upgrade_of = nil, - type = nil, - stack = 200, - min = 200, - max = 200, - }, - ["power-switch"] = { - key = 78, - upgrade_of = nil, - type = nil, - stack = 50, - min = 0, - max = 0, - }, - ["programmable-speaker"] = { - key = 79, - upgrade_of = nil, - type = nil, - stack = 50, - min = 10, - max = 10, - }, - ["offshore-pump"] = { - key = 60, - upgrade_of = nil, - type = nil, - stack = 20, - min = 20, - max = 20, - }, - -- module - ["beacon"] = { - key = 81, - upgrade_of = nil, - type = "module", - stack = 10, - min = 120, - max = 120, - }, - ["speed-module"] = { - key = 82, - upgrade_of = nil, - type = "module", - stack = 50, - min = 500, - max = 500, - }, - ["speed-module-2"] = { - key = 83, - upgrade_of = "speed-module", - type = "module", - stack = 50, - min = 0, - max = 0, - }, - ["speed-module-3"] = { - key = 84, - upgrade_of = "speed-module-2", - type = "module", - stack = 50, - min = 500, - max = 500, - }, - ["productivity-module"] = { - key = 85, - upgrade_of = nil, - type = "module", - stack = 50, - min = 0, - max = 0, - }, - ["productivity-module-2"] = { - key = 86, - upgrade_of = "productivity-module", - type = "module", - stack = 50, - min = 0, - max = 0, - }, - ["productivity-module-3"] = { - key = 87, - upgrade_of = "productivity-module-2", - type = "module", - stack = 50, - min = 0, - max = 0, - }, - ["effectivity-module"] = { - key = 88, - upgrade_of = nil, - type = "module", - stack = 50, - min = 0, - max = 0, - }, - ["effectivity-module-2"] = { - key = 89, - upgrade_of = "effectivity-module", - type = "module", - stack = 50, - min = 0, - max = 0, - }, - ["effectivity-module-3"] = { - key = 90, - upgrade_of = "effectivity-module-2", - type = "module", - stack = 50, - min = 0, - max = 0, - }, - -- defense - ["stone-wall"] = { - key = 91, - upgrade_of = nil, - type = "defense", - stack = 100, - min = 0, - max = 0, - }, - ["gate"] = { - key = 92, - upgrade_of = nil, - type = "defense", - stack = 50, - min = 0, - max = 0, - }, - ["gun-turret"] = { - key = 93, - upgrade_of = nil, - type = "defense", - stack = 50, - min = 0, - max = 0, - }, - ["laser-turret"] = { - key = 94, - upgrade_of = nil, - type = "defense", - stack = 50, - min = 100, - max = 100, - }, - ["flamethrower-turret"] = { - key = 95, - upgrade_of = nil, - type = "defense", - stack = 50, - min = 0, - max = 0, - }, - ["artillery-turret"] = { - key = 96, - upgrade_of = nil, - type = "defense", - stack = 10, - min = 0, - max = 0, - }, - -- rocket - ["rocket"] = { - key = 101, - upgrade_of = nil, - type = "rocket", - stack = 200, - min = 0, - max = 0, - }, - ["explosive-rocket"] = { - key = 102, - upgrade_of = "rocket", - type = "rocket", - stack = 200, - min = 0, - max = 0, - }, - ["atomic-bomb"] = { - key = 103, - upgrade_of = "explosive-rocket", - type = "rocket", - stack = 10, - min = 0, - max = 0, - }, - ["rocket-launcher"] = { - key = 104, - upgrade_of = nil, - type = "weapon", - stack = 5, - min = 1, - max = 1, - }, - ["flamethrower"] = { - key = 105, - upgrade_of = nil, - type = "weapon", - stack = 5, - min = 0, - max = 0, - }, - ["pistol"] = { - key = 106, - upgrade_of = nil, - type = "weapon", - stack = 5, - min = 0, - max = 0, - }, - ["submachine-gun"] = { - key = 107, - upgrade_of = nil, - type = "weapon", - stack = 5, - min = 0, - max = 0, - }, - ["shotgun"] = { - key = 108, - upgrade_of = nil, - type = "weapon", - stack = 5, - min = 0, - max = 0, - }, - ["combat-shotgun"] = { - key = 109, - upgrade_of = nil, - type = "weapon", - stack = 5, - min = 0, - max = 0, - }, - ["land-mine"] = { - key = 110, - upgrade_of = nil, - type = nil, - stack = 100, - min = 0, - max = 0, - }, - -- ammo - ["firearm-magazine"] = { - key = 111, - upgrade_of = nil, - type = "ammo", - stack = 200, - min = 0, - max = 0, - }, - ["piercing-rounds-magazine"] = { - key = 112, - upgrade_of = "firearm-magazine", - type = "ammo", - stack = 200, - min = 0, - max = 0, - }, - ["uranium-rounds-magazine"] = { - key = 113, - upgrade_of = "piercing-rounds-magazine", - type = "ammo", - stack = 200, - min = 0, - max = 0, - }, - ["flamethrower-ammo"] = { - key = 114, - upgrade_of = nil, - type = "ammo", - stack = 100, - min = 0, - max = 0, - }, - ["shotgun-shell"] = { - key = 115, - upgrade_of = nil, - type = "ammo", - stack = 200, - min = 0, - max = 0, - }, - ["piercing-shotgun-shell"] = { - key = 116, - upgrade_of = nil, - type = "ammo", - stack = 200, - min = 0, - max = 0, - }, - ["cannon-shell"] = { - key = 117, - upgrade_of = nil, - type = "ammo", - stack = 200, - min = 0, - max = 0, - }, - ["explosive-cannon-shell"] = { - key = 118, - upgrade_of = nil, - type = "ammo", - stack = 200, - min = 0, - max = 0, - }, - ["uranium-cannon-shell"] = { - key = 119, - upgrade_of = nil, - type = "ammo", - stack = 200, - min = 0, - max = 0, - }, - ["explosive-uranium-cannon-shell"] = { - key = 120, - upgrade_of = nil, - type = "ammo", - stack = 200, - min = 0, - max = 0, - }, - ["grenade"] = { - key = 97, - upgrade_of = nil, - type = "ammo", - stack = 100, - min = 0, - max = 0, - }, - ["cluster-grenade"] = { - key = 98, - upgrade_of = nil, - type = "ammo", - stack = 100, - min = 0, - max = 0, - }, - ["artillery-shell"] = { - key = 121, - upgrade_of = nil, - type = nil, - stack = 1, - min = 0, - max = 0, - }, - ["poison-capsule"] = { - key = 122, - upgrade_of = nil, - type = nil, - stack = 100, - min = 0, - max = 0, - }, - ["slowdown-capsule"] = { - key = 123, - upgrade_of = nil, - type = nil, - stack = 100, - min = 0, - max = 0, - }, - ["defender-capsule"] = { - key = 124, - upgrade_of = nil, - type = nil, - stack = 100, - min = 0, - max = 0, - }, - ["distractor-capsule"] = { - key = 125, - upgrade_of = nil, - type = nil, - stack = 100, - min = 0, - max = 0, - }, - ["destroyer-capsule"] = { - key = 126, - upgrade_of = nil, - type = nil, - stack = 100, - min = 0, - max = 0, - }, - ["car"] = { - key = 127, - upgrade_of = nil, - type = nil, - stack = 1, - min = 0, - max = 0, - }, - ["tank"] = { - key = 128, - upgrade_of = nil, - type = nil, - stack = 1, - min = 0, - max = 0, - }, - ["spidertron"] = { - key = 129, - upgrade_of = nil, - type = nil, - stack = 1, - min = 0, - max = 5, - }, - ["spidertron-remote"] = { - key = 130, - upgrade_of = nil, - type = nil, - stack = 1, - min = 0, - max = 5, - }, - ["radar"] = { - key = 99, - upgrade_of = nil, - type = nil, - stack = 50, - min = 50, - max = 50, - }, - -- armor - ["light-armor"] = { - key = 131, - upgrade_of = nil, - type = "armor", - stack = 1, - min = 0, - max = 1, - }, - ["heavy-armor"] = { - key = 132, - upgrade_of = "light-armor", - type = "armor", - stack = 1, - min = 0, - max = 1, - }, - ["modular-armor"] = { - key = 133, - upgrade_of = "heavy-armor", - type = "armor", - stack = 1, - min = 0, - max = 1, - }, - ["power-armor"] = { - key = 134, - upgrade_of = "modular-armor", - type = "armor", - stack = 1, - min = 0, - max = 1, - }, - ["power-armor-mk2"] = { - key = 135, - upgrade_of = "power-armor", - type = "armor", - stack = 1, - min = 0, - max = 1, - }, - -- armor equipment - ["solar-panel-equipment"] = { - key = 136, - upgrade_of = nil, - type = "armor_equipment", - stack = 20, - min = 0, - max = 5, - }, - ["fusion-reactor-equipment"] = { - key = 137, - upgrade_of = "solar-panel-equipment", - type = "armor_equipment", - stack = 20, - min = 0, - max = 5, - }, - ["belt-immunity-equipment"] = { - key = 138, - upgrade_of = nil, - type = "armor_equipment", - stack = 20, - min = 0, - max = 5, - }, - ["night-vision-equipment"] = { - key = 139, - upgrade_of = nil, - type = "armor_equipment", - stack = 20, - min = 0, - max = 5, - }, - ["personal-laser-defense-equipment"] = { - key = 140, - upgrade_of = nil, - type = "armor_equipment", - stack = 20, - min = 0, - max = 20, - }, - ["personal-roboport-equipment"] = { - key = 141, - upgrade_of = nil, - type = "armor_equipment", - stack = 20, - min = 0, - max = 0, - }, - ["personal-roboport-mk2-equipment"] = { - key = 142, - upgrade_of = "personal-roboport-equipment", - type = "armor_equipment", - stack = 20, - min = 0, - max = 5, - }, - ["energy-shield-equipment"] = { - key = 143, - upgrade_of = nil, - type = "armor_equipment", - stack = 20, - min = 0, - max = 0, - }, - ["energy-shield-mk2-equipment"] = { - key = 144, - upgrade_of = "energy-shield-equipment", - type = "armor_equipment", - stack = 20, - min = 0, - max = 5, - }, - ["battery-equipment"] = { - key = 145, - upgrade_of = nil, - type = "armor_equipment", - stack = 20, - min = 0, - max = 0, - }, - ["battery-mk2-equipment"] = { - key = 146, - upgrade_of = "battery-equipment", - type = "armor_equipment", - stack = 20, - min = 0, - max = 5, - }, - ["exoskeleton-equipment"] = { - key = 147, - upgrade_of = nil, - type = "armor_equipment", - stack = 20, - min = 0, - max = 5, - }, - ["discharge-defense-equipment"] = { - key = 148, - upgrade_of = nil, - type = "armor_equipment", - stack = 20, - min = 0, - max = 0, - }, - ["discharge-defense-remote"] = { - key = 149, - upgrade_of = nil, - type = nil, - stack = 1, - min = 0, - max = 0, - }, - ["artillery-targeting-remote"] = { - key = 150, - upgrade_of = nil, - type = nil, - stack = 1, - min = 1, - max = 1, - }, - -- path - ["stone-brick"] = { - key = 100, - upgrade_of = nil, - type = nil, - stack = 100, - min = 0, - max = 0, - }, - ["concrete"] = { - key = 69, - upgrade_of = nil, - type = nil, - stack = 100, - min = 0, - max = 0, - }, - ["hazard-concrete"] = { - key = 70, - upgrade_of = nil, - type = nil, - stack = 100, - min = 0, - max = 0, - }, - ["refined-concrete"] = { - key = 188, - upgrade_of = nil, - type = nil, - stack = 100, - min = 0, - max = 0, - }, - ["refined-hazard-concrete"] = { - key = 189, - upgrade_of = nil, - type = nil, - stack = 100, - min = 0, - max = 0, - }, - ["crude-oil-barrel"] = { - key = 161, - upgrade_of = nil, - type = nil, - stack = 10, - min = 0, - max = 0, - }, - ["heavy-oil-barrel"] = { - key = 162, - upgrade_of = nil, - type = nil, - stack = 10, - min = 0, - max = 0, - }, - ["light-oil-barrel"] = { - key = 163, - upgrade_of = nil, - type = nil, - stack = 10, - min = 0, - max = 0, - }, - ["lubricant-barrel"] = { - key = 164, - upgrade_of = nil, - type = nil, - stack = 10, - min = 0, - max = 0, - }, - ["petroleum-gas-barrel"] = { - key = 165, - upgrade_of = nil, - type = nil, - stack = 10, - min = 0, - max = 0, - }, - ["sulfuric-acid-barrel"] = { - key = 166, - upgrade_of = nil, - type = nil, - stack = 10, - min = 0, - max = 0, - }, - ["water-barrel"] = { - key = 167, - upgrade_of = nil, - type = nil, - stack = 10, - min = 0, - max = 0, - }, - ["empty-barrel"] = { - key = 168, - upgrade_of = nil, - type = nil, - stack = 10, - min = 0, - max = 0, - }, - ["uranium-fuel-cell"] = { - key = 169, - upgrade_of = nil, - type = nil, - stack = 50, - min = 0, - max = 0, - }, - ["used-up-uranium-fuel-cell"] = { - key = 170, - upgrade_of = nil, - type = nil, - stack = 50, - min = 0, - max = 0, - }, - -- science and circuit - ["automation-science-pack"] = { - key = 171, - upgrade_of = nil, - type = nil, - stack = 200, - min = 0, - max = 0, - }, - ["logistic-science-pack"] = { - key = 172, - upgrade_of = nil, - type = nil, - stack = 200, - min = 0, - max = 0, - }, - ["military-science-pack"] = { - key = 173, - upgrade_of = nil, - type = nil, - stack = 200, - min = 0, - max = 0, - }, - ["chemical-science-pack"] = { - key = 174, - upgrade_of = nil, - type = nil, - stack = 200, - min = 0, - max = 0, - }, - ["production-science-pack"] = { - key = 175, - upgrade_of = nil, - type = nil, - stack = 200, - min = 0, - max = 0, - }, - ["utility-science-pack"] = { - key = 176, - upgrade_of = nil, - type = nil, - stack = 200, - min = 0, - max = 0, - }, - ["space-science-pack"] = { - key = 177, - upgrade_of = nil, - type = nil, - stack = 2000, - min = 0, - max = 0, - }, - ["electronic-circuit"] = { - key = 178, - upgrade_of = nil, - type = nil, - stack = 200, - min = 0, - max = 0, - }, - ["advanced-circuit"] = { - key = 179, - upgrade_of = nil, - type = nil, - stack = 200, - min = 0, - max = 0, - }, - ["processing-unit"] = { - key = 180, - upgrade_of = nil, - type = nil, - stack = 100, - min = 0, - max = 0, - }, - -- intermediate - ["iron-plate"] = { - key = 181, - upgrade_of = nil, - type = nil, - stack = 100, - min = 0, - max = 0, - }, - ["copper-plate"] = { - key = 182, - upgrade_of = nil, - type = nil, - stack = 100, - min = 0, - max = 0, - }, - ["steel-plate"] = { - key = 183, - upgrade_of = nil, - type = nil, - stack = 100, - min = 0, - max = 0, - }, - ["plastic-bar"] = { - key = 184, - upgrade_of = nil, - type = nil, - stack = 100, - min = 0, - max = 0, - }, - ["sulfur"] = { - key = 185, - upgrade_of = nil, - type = nil, - stack = 50, - min = 0, - max = 0, - }, - ["battery"] = { - key = 186, - upgrade_of = nil, - type = nil, - stack = 200, - min = 0, - max = 0, - }, - ["explosives"] = { - key = 187, - upgrade_of = nil, - type = nil, - stack = 50, - min = 0, - max = 0, - }, - ["engine-unit"] = { - key = 191, - upgrade_of = nil, - type = nil, - stack = 50, - min = 0, - max = 0, - }, - ["electric-engine-unit"] = { - key = 192, - upgrade_of = nil, - type = nil, - stack = 50, - min = 0, - max = 0, - }, - ["flying-robot-frame"] = { - key = 193, - upgrade_of = nil, - type = nil, - stack = 50, - min = 0, - max = 0, - }, - ["rocket-control-unit"] = { - key = 194, - upgrade_of = nil, - type = nil, - stack = 10, - min = 0, - max = 0, - }, - ["low-density-structure"] = { - key = 195, - upgrade_of = nil, - type = nil, - stack = 10, - min = 0, - max = 0, - }, - ["solid-fuel"] = { - key = 196, - upgrade_of = nil, - type = nil, - stack = 50, - min = 0, - max = 0, - }, - ["rocket-fuel"] = { - key = 197, - upgrade_of = nil, - type = nil, - stack = 10, - min = 0, - max = 0, - }, - ["nuclear-fuel"] = { - key = 198, - upgrade_of = nil, - type = nil, - stack = 1, - min = 0, - max = 0, - }, - ["uranium-235"] = { - key = 199, - upgrade_of = nil, - type = nil, - stack = 100, - min = 0, - max = 0, - }, - ["uranium-238"] = { - key = 200, - upgrade_of = nil, - type = nil, - stack = 100, - min = 0, - max = 0, - }, - }, -} diff --git a/exp_legacy/module/modules/data/personal-logistic.lua b/exp_legacy/module/modules/data/personal-logistic.lua deleted file mode 100644 index 4d5abaa5..00000000 --- a/exp_legacy/module/modules/data/personal-logistic.lua +++ /dev/null @@ -1,89 +0,0 @@ -local Commands = require("modules/exp_commands") -local config = require("modules.exp_legacy.config.personal_logistic") --- @dep config.personal-logistic - ----@param target LuaEntity | LuaPlayer ----@param amount number -local function pl(target, amount) - local c - local s - - --- @cast target any Remove cast once implemented - error("Needs updating to use 2.0 logistics") - - if target.object_name == "LuaPlayer" then - c = target.clear_personal_logistic_slot - s = target.set_personal_logistic_slot - else - c = target.clear_vehicle_logistic_slot - s = target.set_vehicle_logistic_slot - end - - for _, v in pairs(config.request) do - c(config.start + v.key) - end - - if (amount < 0) then - return - end - - local stats = target.force.get_item_production_statistics(target.surface) - - for k, v in pairs(config.request) do - local v_min = math.ceil(v.min * amount) - local v_max = math.ceil(v.max * amount) - - if v.stack ~= nil and v.stack ~= 1 and v.type ~= "weapon" then - v_min = math.floor(v_min / v.stack) * v.stack - v_max = math.ceil(v_max / v.stack) * v.stack - end - - if v.upgrade_of == nil then - if v.type ~= nil then - if stats.get_input_count(k) < config.production_required[v.type] then - if v_min > 0 then - if v_min == v_max then - v_min = math.floor((v_max * 0.5) / v.stack) * v.stack - end - else - v_min = 0 - end - end - end - - s(config.start + v.key, { name = k, min = v_min, max = v_max }) - else - if v.type ~= nil then - if stats.get_input_count(k) >= config.production_required[v.type] then - s(config.start + v.key, { name = k, min = v_min, max = v_max }) - local vuo = v.upgrade_of - - while (vuo ~= nil) do - s(config.start + config.request[vuo].key, { name = vuo, min = 0, max = 0 }) - vuo = config.request[vuo].upgrade_of - end - else - s(config.start + v.key, { name = k, min = 0, max = v_max }) - end - end - end - end -end - -Commands.new("personal-logistic", "Set Personal Logistic (-1 to cancel all) (Select spidertron to edit spidertron)") - :argument("amount", "", Commands.types.integer_range(-1, 10)) - :add_aliases{ "pl" } - :add_flags{ "disabled" } -- Remove once implemented above - :register(function(player, amount) - --- @cast amount number - if player.force.technologies["logistic-robotics"].researched then - if player.selected ~= nil then - if player.selected.name == "spidertron" then - pl(player.selected, amount / 10) - end - else - pl(player, amount / 10) - end - else - return Commands.status.error("Personal Logistic not researched") - end - end) From dc015bc609eb91d7f611a07105d96931d55261ee Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Thu, 25 Jun 2026 05:30:46 +0900 Subject: [PATCH 2/5] bonus changes (#429) * Delete exp_legacy/module/modules/data/bonus.lua * Update _file_loader.lua * Update roles.lua * Update bonus.lua * Update player_bonus.lua * Update bonus.lua --------- Co-authored-by: Cooldude2606 <25043174+Cooldude2606@users.noreply.github.com> --- exp_legacy/module/config/_file_loader.lua | 1 - exp_legacy/module/config/bonus.lua | 231 ++------------------- exp_legacy/module/config/expcore/roles.lua | 2 - exp_legacy/module/modules/data/bonus.lua | 99 --------- exp_scenario/module/control/bonus.lua | 4 +- exp_scenario/module/gui/player_bonus.lua | 5 +- 6 files changed, 19 insertions(+), 323 deletions(-) delete mode 100644 exp_legacy/module/modules/data/bonus.lua diff --git a/exp_legacy/module/config/_file_loader.lua b/exp_legacy/module/config/_file_loader.lua index fae86b7c..b0868f01 100644 --- a/exp_legacy/module/config/_file_loader.lua +++ b/exp_legacy/module/config/_file_loader.lua @@ -16,7 +16,6 @@ return { "modules.data.quickbar", "modules.data.alt-view", "modules.data.tag", - -- 'modules.data.bonus', "modules.data.language", --"modules.data.toolbar", diff --git a/exp_legacy/module/config/bonus.lua b/exp_legacy/module/config/bonus.lua index 67e3d0be..5c1a3c22 100644 --- a/exp_legacy/module/config/bonus.lua +++ b/exp_legacy/module/config/bonus.lua @@ -3,21 +3,17 @@ return { --[[ - TODO - force bonus - quick health regeneration - Base point is equal to the amount of standard value in each parameter. CMMS CRS CCS CISB CHB CRDB PBR - STD 30 90 32 20 16 12 60 - = 260 + STD 20 60 24 10 12 8 40 + = 174 - MAX 60 180 64 40 32 24 120 - = 480 + MAX 40 120 48 20 24 16 80 + = 348 ]] points = { - base = 260, + base = 174, increase_percentage_per_role_level = 0.03, role_name = "Member", }, @@ -27,8 +23,7 @@ return { name = "character_mining_speed_modifier", scale = 1, cost = 10, - max_value = 6, - initial_value = 3, + max_value = 4, value_step = 0.5, is_percentage = true, }, @@ -36,8 +31,7 @@ return { name = "character_running_speed_modifier", scale = 1, cost = 60, - max_value = 3, - initial_value = 1.5, + max_value = 2, value_step = 0.25, is_percentage = true, }, @@ -45,33 +39,29 @@ return { name = "character_crafting_speed_modifier", scale = 1, cost = 4, - max_value = 16, - initial_value = 8, + max_value = 12, value_step = 1, is_percentage = true, }, { name = "character_inventory_slots_bonus", - cost = 2, scale = 10, - max_value = 200, - initial_value = 100, + cost = 2, + max_value = 100, value_step = 10, }, { name = "character_health_bonus", scale = 50, cost = 4, - max_value = 400, - initial_value = 200, + max_value = 300, value_step = 50, }, { name = "character_reach_distance_bonus", - cost = 1, scale = 1, - max_value = 24, - initial_value = 12, + cost = 1, + max_value = 16, value_step = 2, combined_bonus = { "character_resource_reach_distance_bonus", @@ -80,104 +70,15 @@ return { }, { name = "personal_battery_recharge", - initial_value = 6, - max_value = 12, - value_step = 1, scale = 4, cost = 40, + max_value = 8, + value_step = 1, is_special = true, }, - --[[ - ['character_item_pickup_distance_bonus'] = { - initial_value = 0, - max_value = 20, - value_step = 1, - scale = 1, - cost = 1, - is_percentage = false - }, - ['character_loot_pickup_distance_bonus'] = { - initial_value = 0, - max_value = 20, - value_step = 1, - scale = 1, - cost = 1, - is_percentage = false - }, - ['character_item_drop_distance_bonus'] = { - initial_value = 0, - max_value = 20, - value_step = 1, - scale = 1, - cost = 1, - is_percentage = false - } - ]] }, force_bonus = { - --[[ - ['character_mining_speed_modifier'] = { - initial_value = 0, - max_value = 6, - value_step = 0.5, - scale = 1, - cost = 10, - is_percentage = true - }, - ['character_running_speed_modifier'] = { - initial_value = 0, - max_value = 3, - value_step = 0.25, - scale = 1, - cost = 40, - is_percentage = true - }, - ['character_crafting_speed_modifier'] = { - initial_value = 0, - max_value = 16, - value_step = 1, - scale = 1, - cost = 4, - is_percentage = true - }, - ['character_inventory_slots_bonus'] = { - initial_value = 0, - max_value = 200, - value_step = 10, - scale = 100, - cost = 2, - is_percentage = false - }, - ['character_health_bonus'] = { - initial_value = 0, - max_value = 400, - value_step = 50, - cost = 4, - is_percentage = false - }, - ['character_reach_distance_bonus'] = { - initial_value = 0, - max_value = 24, - value_step = 2, - scale = 1, - cost = 1, - is_percentage = false, - combined_bonus = { - 'character_resource_reach_distance_bonus', - 'character_build_distance_bonus' - } - }, - ['worker_robots_speed_modifier'] = { - initial_value = 0, - max_value = 0, - value_step = 0, - scale = 1, - cost = 1, - is_percentage = false - }, - ]] ["worker_robots_battery_modifier"] = { - initial_value = 1, max_value = 1, value_step = 1, scale = 1, @@ -185,7 +86,6 @@ return { is_percentage = false, }, ["worker_robots_storage_bonus"] = { - initial_value = 1, max_value = 1, value_step = 1, scale = 1, @@ -193,114 +93,13 @@ return { is_percentage = false, }, ["following_robots_lifetime_modifier"] = { - initial_value = 1, max_value = 1, value_step = 1, scale = 1, cost = 1, is_percentage = false, }, - --[[ - ['character_item_pickup_distance_bonus'] = { - initial_value = 0, - max_value = 20, - value_step = 1, - scale = 1, - cost = 1, - is_percentage = false - }, - ['character_loot_pickup_distance_bonus'] = { - initial_value = 0, - max_value = 20, - value_step = 1, - scale = 1, - cost = 1, - is_percentage = false - }, - ['character_item_drop_distance_bonus'] = { - initial_value = 0, - max_value = 20, - value_step = 1, - scale = 1, - cost = 1, - is_percentage = false - }, - ['character_trash_slot_count'] = { - initial_value = 0, - max_value = 0, - value_step = 0, - scale = 1, - cost = 1, - is_percentage = false - }, - ['mining_drill_productivity_bonus'] = { - initial_value = 0, - max_value = 0, - value_step = 0, - scale = 1, - cost = 1, - is_percentage = false - }, - ['train_braking_force_bonus'] = { - initial_value = 0, - max_value = 0, - value_step = 0, - scale = 1, - cost = 1, - is_percentage = false - }, - ['laboratory_speed_modifier'] = { - initial_value = 0, - max_value = 0, - value_step = 0, - scale = 1, - cost = 1, - is_percentage = false - }, - ['laboratory_productivity_bonus'] = { - initial_value = 0, - max_value = 0, - value_step = 0, - scale = 1, - cost = 1, - is_percentage = false - }, - ['inserter_stack_size_bonus'] = { - initial_value = 0, - max_value = 0, - value_step = 0, - scale = 1, - cost = 1, - is_percentage = false - }, - ['stack_inserter_capacity_bonus'] = { - initial_value = 0, - max_value = 0, - value_step = 0, - scale = 1, - cost = 1, - is_percentage = false - }, - ['artillery_range_modifier'] = { - initial_value = 0, - max_value = 0, - value_step = 0, - scale = 1, - cost = 1, - is_percentage = false - } - ]] }, surface_bonus = { - --[[ - ['solar_power_multiplier'] = { - initial_value = 1, - max_value = 1000, - value_step = 1, - scale = 1, - cost = 1, - is_percentage = false - } - ]] }, } diff --git a/exp_legacy/module/config/expcore/roles.lua b/exp_legacy/module/config/expcore/roles.lua index a42a0a52..2dd07f77 100644 --- a/exp_legacy/module/config/expcore/roles.lua +++ b/exp_legacy/module/config/expcore/roles.lua @@ -80,7 +80,6 @@ Roles.new_role("Moderator", "Mod") "command/clear-inventory", "command/kill-enemies", "command/remove-enemies", - --'command/bonus', "command/home", "command/set-home", "command/get-home", @@ -167,7 +166,6 @@ Roles.new_role("Sponsor", "Spon") "gui/rocket-info/toggle-active", "gui/rocket-info/remote_launch", "gui/bonus", - --"command/bonus", "command/home", "command/set-home", "command/get-home", diff --git a/exp_legacy/module/modules/data/bonus.lua b/exp_legacy/module/modules/data/bonus.lua deleted file mode 100644 index 6ebf2a34..00000000 --- a/exp_legacy/module/modules/data/bonus.lua +++ /dev/null @@ -1,99 +0,0 @@ ---[[-- Commands Module - Bonus - - Adds a command that allows players to have increased stats - @data Bonus -]] - -local Roles = require("modules.exp_legacy.expcore.roles") --- @dep expcore.roles -local Event = require("modules/exp_legacy/utils/event") --- @dep utils.event -local config = require("modules.exp_legacy.config.bonus") --- @dep config.bonuses -local Commands = require("modules/exp_commands") - --- Stores the bonus for the player -local PlayerData = require("modules.exp_legacy.expcore.player_data") --- @dep expcore.player_data -local PlayerBonus = PlayerData.Settings:combine("Bonus") -PlayerBonus:set_default(0) -PlayerBonus:set_metadata{ - permission = "command/bonus", - stringify = function(value) - if not value or value == 0 then - return "None set" - end - - return value - end, -} - ---- Apply a bonus to a player -local function apply_bonus(player, stage) - if not player.character then - return - end - - for k, v in pairs(config.player_bonus) do - player[k] = v.value * stage / 10 - - if v.combined_bonus then - for i = 1, #v.combined_bonus, 1 do - player[v.combined_bonus[i]] = v.value * stage / 10 - end - end - end -end - ---- When store is updated apply new bonus to the player -PlayerBonus:on_update(function(player_name, player_bonus) - apply_bonus(game.players[player_name], player_bonus or 0) -end) - ---- Changes the amount of bonus you receive -Commands.new("bonus", { "bonus.description" }) - :optional("amount", { "bonus.arg-amount" }, Commands.types.integer_range(0, 10)) - :register(function(player, amount) - --- @cast amount number? - if amount then - PlayerBonus:set(player, amount) - return Commands.status.success{ "bonus.set", amount } - else - return Commands.status.success{ "bonus.get", PlayerBonus:get(player) } - end - end) - ---- When a player respawns re-apply bonus -Event.add(defines.events.on_player_respawned, function(event) - local player = game.players[event.player_index] - apply_bonus(player, PlayerBonus:get(player)) -end) - ---- Remove bonus if a player no longer has access to the command -local function role_update(event) - local player = game.players[event.player_index] - if not Roles.player_allowed(player, "command/bonus") then - apply_bonus(player, 0) - end -end - ---- When a player dies allow them to have instant respawn -Event.add(defines.events.on_player_died, function(event) - local player = game.players[event.player_index] - - if Roles.player_has_flag(player, "instant-respawn") then - player.ticks_to_respawn = 120 - end -end) - -Event.add(defines.events.on_player_created, function(event) - if event.player_index ~= 1 then - return - end - - for k, v in pairs(config.force_bonus) do - game.players[event.player_index].force[k] = v.value - end - - for k, v in pairs(config.surface_bonus) do - game.players[event.player_index].surface[k] = v.value - end -end) - -Event.add(Roles.events.on_role_assigned, role_update) -Event.add(Roles.events.on_role_unassigned, role_update) diff --git a/exp_scenario/module/control/bonus.lua b/exp_scenario/module/control/bonus.lua index e253b0f6..f8b532cb 100644 --- a/exp_scenario/module/control/bonus.lua +++ b/exp_scenario/module/control/bonus.lua @@ -11,7 +11,7 @@ local config = require("modules/exp_legacy/config/bonus") local function apply_force_bonus(event) local force = event.force for k, v in pairs(config.force_bonus) do - force[k] = v.initial_value + force[k] = math.floor(v.max_value / 2) end end @@ -19,7 +19,7 @@ end local function apply_surface_bonus(event) local surface = assert(game.get_surface(event.surface_index)) for k, v in pairs(config.surface_bonus) do - surface[k] = v.initial_value + surface[k] = math.floor(v.max_value / 2) end end diff --git a/exp_scenario/module/gui/player_bonus.lua b/exp_scenario/module/gui/player_bonus.lua index 82595d71..79c9eac6 100644 --- a/exp_scenario/module/gui/player_bonus.lua +++ b/exp_scenario/module/gui/player_bonus.lua @@ -16,7 +16,6 @@ local Elements = {} --- @field cost number --- @field scale number --- @field max_value number ---- @field initial_value number --- @field is_percentage boolean --- @field is_special boolean --- @field value_step number @@ -229,7 +228,7 @@ Elements.bonus_slider = Gui.define("player_bonus/bonus_slider") local player = Gui.get_player(parent) local value = Elements.container.get_player_bonus(player, bonus_data.name) if not value then - value = bonus_data.initial_value + value = math.floor(bonus_data.initial_value / 2) elements.apply_button.enabled = true end @@ -290,7 +289,7 @@ function Elements.bonus_slider.reset_value(slider) local player = Gui.get_player(slider) local element_data = Elements.bonus_slider.data[slider] local bonus_data = element_data.bonus_data - local value = Elements.container.get_player_bonus(player, bonus_data.name) or bonus_data.initial_value + local value = Elements.container.get_player_bonus(player, bonus_data.name) or math.floor(bonus_data.initial_value / 2) slider.slider_value = value element_data.label.caption = Elements.bonus_slider.calculate_slider_caption(bonus_data, value) element_data.previous_value = value From 8c351a8411d1d5dd4d945ff5cb2b54ebd477dac6 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Thu, 25 Jun 2026 05:33:31 +0900 Subject: [PATCH 3/5] Update protection.lua (#431) --- exp_legacy/module/config/protection.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/exp_legacy/module/config/protection.lua b/exp_legacy/module/config/protection.lua index 37c78f79..d598fb65 100644 --- a/exp_legacy/module/config/protection.lua +++ b/exp_legacy/module/config/protection.lua @@ -5,15 +5,13 @@ return { repeat_lifetime = 3600 * 20, --- @setting repeat_lifetime The length of time, in ticks, that protected removals will be remembered for refresh_rate = 3600 * 5, --- @setting refresh_rate How often the age of protected removals are checked against repeat_lifetime always_protected_names = { --- @setting always_protected_names Names of entities which are always protected - }, always_protected_types = { --- @setting always_protected_types Types of entities which are always protected - "boiler", "generator", "offshore-pump", "power-switch", "reactor", "rocket-silo", + "boiler", "generator", "offshore-pump", "reactor", "heat-exchanger", "heat-pipe", "fusion-reactor", "fusion-generator", "power-switch", "rocket-silo", }, always_trigger_repeat_names = { --- @setting always_trigger_repeat_names Names of entities which always trigger repeated removal protection - }, always_trigger_repeat_types = { --- @setting always_trigger_repeat_types Types of entities which always trigger repeated removal protection - "reactor", "rocket-silo", + "reactor", "fusion-reactor", "rocket-silo", }, } From 7c9d47b6db330775946aff82d5b6f59414afb9f9 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Thu, 25 Jun 2026 05:34:51 +0900 Subject: [PATCH 4/5] remove landfill blueprint (#433) * Delete exp_scenario/module/gui/landfill_blueprint.lua * Update control.lua * Update roles.lua * Update en.cfg * Update zh-CN.cfg * Update zh-TW.cfg --- exp_legacy/module/config/expcore/roles.lua | 1 - exp_scenario/module/control.lua | 1 - .../module/gui/landfill_blueprint.lua | 175 ------------------ exp_scenario/module/locale/en.cfg | 6 +- exp_scenario/module/locale/zh-CN.cfg | 4 - exp_scenario/module/locale/zh-TW.cfg | 4 - 6 files changed, 1 insertion(+), 190 deletions(-) delete mode 100644 exp_scenario/module/gui/landfill_blueprint.lua diff --git a/exp_legacy/module/config/expcore/roles.lua b/exp_legacy/module/config/expcore/roles.lua index 2dd07f77..a392953f 100644 --- a/exp_legacy/module/config/expcore/roles.lua +++ b/exp_legacy/module/config/expcore/roles.lua @@ -289,7 +289,6 @@ local default = Roles.new_role("Guest", "") "gui/research", "gui/autofill", "gui/module", - "gui/landfill", "gui/production", } diff --git a/exp_scenario/module/control.lua b/exp_scenario/module/control.lua index b031e221..5d8654f9 100644 --- a/exp_scenario/module/control.lua +++ b/exp_scenario/module/control.lua @@ -70,7 +70,6 @@ add(require("modules/exp_scenario/control/station_auto_name")) --- Guis add(require("modules/exp_scenario/gui/autofill")) add(require("modules/exp_scenario/gui/elements")) -add(require("modules/exp_scenario/gui/landfill_blueprint")) add(require("modules/exp_scenario/gui/module_inserter")) add(require("modules/exp_scenario/gui/player_bonus")) add(require("modules/exp_scenario/gui/player_stats")) diff --git a/exp_scenario/module/gui/landfill_blueprint.lua b/exp_scenario/module/gui/landfill_blueprint.lua deleted file mode 100644 index 0eae3367..00000000 --- a/exp_scenario/module/gui/landfill_blueprint.lua +++ /dev/null @@ -1,175 +0,0 @@ ---[[-- Gui - Landfill Blueprint -Adds a button to the toolbar which adds landfill to the held blueprint -]] - -local Gui = require("modules/exp_gui") -local Roles = require("modules/exp_legacy/expcore/roles") - ---- @param box BoundingBox -local function rotate_bounding_box(box) - box.left_top.x, box.left_top.y, box.right_bottom.x, box.right_bottom.y - = -box.right_bottom.y, box.left_top.x, -box.left_top.y, box.right_bottom.x -end - -local function curve_flip_lr(oc) - local nc = table.deep_copy(oc) - - for r = 1, 8 do - for c = 1, 8 do - nc[r][c] = oc[r][9 - c] - end - end - - return nc -end - -local function curve_flip_d(oc) - local nc = table.deep_copy(oc) - - for r = 1, 8 do - for c = 1, 8 do - nc[r][c] = oc[c][r] - end - end - - return nc -end - -local curve_masks = {} do - local curves = { { - { 0, 0, 0, 0, 0, 1, 0, 0 }, - { 0, 0, 0, 0, 1, 1, 1, 0 }, - { 0, 0, 0, 1, 1, 1, 1, 0 }, - { 0, 0, 0, 1, 1, 1, 0, 0 }, - { 0, 0, 1, 1, 1, 0, 0, 0 }, - { 0, 0, 1, 1, 1, 0, 0, 0 }, - { 0, 0, 1, 1, 0, 0, 0, 0 }, - { 0, 0, 1, 1, 0, 0, 0, 0 }, - } } - - curves[6] = curve_flip_d(curves[1]) - curves[3] = curve_flip_lr(curves[6]) - curves[4] = curve_flip_d(curves[3]) - curves[5] = curve_flip_lr(curves[4]) - curves[2] = curve_flip_d(curves[5]) - curves[7] = curve_flip_lr(curves[2]) - curves[8] = curve_flip_d(curves[7]) - - for i, map in ipairs(curves) do - local index = 0 - local mask = {} - curve_masks[i] = mask - - for row = 1, 8 do - for col = 1, 8 do - if map[row][col] == 1 then - index = index + 1 - mask[index] = { - x = col - 5, - y = row - 5, - } - end - end - end - end -end - -local rolling_stocks = {} -for name, _ in pairs(prototypes.get_entity_filtered{ { filter = "rolling-stock" } }) do - rolling_stocks[name] = true -end - ---- @param blueprint LuaItemStack ---- @return table -local function landfill_gui_add_landfill(blueprint) - local entities = assert(blueprint.get_blueprint_entities()) - local tile_index = 0 - local new_tiles = {} - - for _, entity in pairs(entities) do - if rolling_stocks[entity.name] or entity.name == "offshore-pump" then - goto continue - end - - if entity.name == "curved-rail" then - -- Curved rail - local curve_mask = curve_masks[entity.direction or 8] - for _, offset in ipairs(curve_mask) do - tile_index = tile_index + 1 - new_tiles[tile_index] = { - name = "landfill", - position = { entity.position.x + offset.x, entity.position.y + offset.y }, - } - end - else - -- Any other entity - local proto = prototypes.entity[entity.name] - if proto.collision_mask["ground-tile"] ~= nil then - goto continue - end - - -- Rotate the collision box to be north facing - local box = proto.collision_box or proto.selection_box - if entity.direction then - if entity.direction ~= defines.direction.north then - rotate_bounding_box(box) - if entity.direction ~= defines.direction.east then - rotate_bounding_box(box) - if entity.direction ~= defines.direction.south then - rotate_bounding_box(box) - end - end - end - end - - -- Add the landfill - for y = math.floor(entity.position.y + box.left_top.y), math.floor(entity.position.y + box.right_bottom.y), 1 do - for x = math.floor(entity.position.x + box.left_top.x), math.floor(entity.position.x + box.right_bottom.x), 1 do - tile_index = tile_index + 1 - new_tiles[tile_index] = { - name = "landfill", - position = { x, y }, - } - end - end - end - - ::continue:: - end - - local old_tiles = blueprint.get_blueprint_tiles() - - if old_tiles then - for _, old_tile in pairs(old_tiles) do - tile_index = tile_index + 1 - new_tiles[tile_index] = { - name = "landfill", - position = old_tile.position, - } - end - end - - return { tiles = new_tiles } -end - ---- Add the toolbar button -Gui.toolbar.create_button{ - name = "trigger_landfill_blueprint", - sprite = "item/landfill", - tooltip = { "exp-gui_landfill-blueprint.tooltip-main" }, - visible = function(player, element) - return Roles.player_allowed(player, "gui/landfill") - end -}:on_click(function(def, player, element) - local stack = player.cursor_stack - if stack and stack.valid_for_read and stack.type == "blueprint" and stack.is_blueprint_setup() then - local modified = landfill_gui_add_landfill(stack) - if modified and next(modified.tiles) then - stack.set_blueprint_tiles(modified.tiles) - end - else - player.print{ "exp-gui_landfill-blueprint.error-no-blueprint" } - end -end) - -return {} diff --git a/exp_scenario/module/locale/en.cfg b/exp_scenario/module/locale/en.cfg index ac5ec9cb..c75a927d 100644 --- a/exp_scenario/module/locale/en.cfg +++ b/exp_scenario/module/locale/en.cfg @@ -295,10 +295,6 @@ tooltip-amount=Amount of items to insert into the __1__ slots invalid=Autofill set to maximum amount: __1__ __2__ for __3__ inserted=Inserted __1__ __2__ into __3__ -[exp-gui_landfill-blueprint] -tooltip-main=Landfill Blueprint -error-no-blueprint=You need to hold the blueprint in cursor - [exp-gui_module-inserter] tooltip-main=Module Inserter caption-main=Modules @@ -572,4 +568,4 @@ chat-found=You cannot have __1__ in your inventory, so it was placed into the ch chat-jailed=__1__ was jailed because they removed too many protected entities. Please wait for a moderator. [exp_report-jail] -chat-jailed=__1__ was jailed because they were reported too many times. Please wait for a moderator. \ No newline at end of file +chat-jailed=__1__ was jailed because they were reported too many times. Please wait for a moderator. diff --git a/exp_scenario/module/locale/zh-CN.cfg b/exp_scenario/module/locale/zh-CN.cfg index da26d0fa..b08f6ba1 100644 --- a/exp_scenario/module/locale/zh-CN.cfg +++ b/exp_scenario/module/locale/zh-CN.cfg @@ -295,10 +295,6 @@ tooltip-amount=自動填入 __1__ 的數量 invalid=自動填入最大值 __1__ __2__ 給 __3__ inserted=自動填入 __1__ __2__ 到 __3__ -[exp-gui_landfill-blueprint] -tooltip-main=藍圖填海 -error-no-blueprint=您需要將藍圖保持在遊標處 - [exp-gui_module-inserter] tooltip-main=模組 caption-main=Modules diff --git a/exp_scenario/module/locale/zh-TW.cfg b/exp_scenario/module/locale/zh-TW.cfg index da26d0fa..b08f6ba1 100644 --- a/exp_scenario/module/locale/zh-TW.cfg +++ b/exp_scenario/module/locale/zh-TW.cfg @@ -295,10 +295,6 @@ tooltip-amount=自動填入 __1__ 的數量 invalid=自動填入最大值 __1__ __2__ 給 __3__ inserted=自動填入 __1__ __2__ 到 __3__ -[exp-gui_landfill-blueprint] -tooltip-main=藍圖填海 -error-no-blueprint=您需要將藍圖保持在遊標處 - [exp-gui_module-inserter] tooltip-main=模組 caption-main=Modules From 986341217793459b59fbfc25a47a7f2b98fff37b Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Thu, 25 Jun 2026 06:11:37 +0900 Subject: [PATCH 5/5] Remove unused properties from vlayer energy calculations (#426) Removed unused day time, day length, and tick properties from energy calculations. --- exp_legacy/module/modules/control/vlayer.lua | 6 ------ 1 file changed, 6 deletions(-) diff --git a/exp_legacy/module/modules/control/vlayer.lua b/exp_legacy/module/modules/control/vlayer.lua index fd32a966..ed9703c4 100644 --- a/exp_legacy/module/modules/control/vlayer.lua +++ b/exp_legacy/module/modules/control/vlayer.lua @@ -514,9 +514,6 @@ function vlayer.get_statistics() energy_sustained = vdp * gsm, energy_capacity = vlayer_data.properties.capacity * mega, energy_storage = vlayer_data.storage.energy, - day_time = math.floor(vlayer_data.surface.daytime * vlayer_data.surface.ticks_per_day), - day_length = vlayer_data.surface.ticks_per_day, - tick = game.tick, } end @@ -540,9 +537,6 @@ function vlayer.get_circuits() energy_sustained = "signal-S", energy_capacity = "signal-C", energy_storage = "signal-E", - day_time = "signal-D", - day_length = "signal-L", - tick = "signal-T", } end