Merge branch 'explosivegaming:main' into aperx

This commit is contained in:
phidias authored and GitHub committed 2026-11-08 00:19:47 +09:00
commit d5deb5cee6
7 files changed
+287 -114

No files matched your search

+2
View File
@@ -297,6 +297,8 @@ export const features: Feature[] = [
description: "A GUI tracking research against target times, the targets live in config/research_data.lua", description: "A GUI tracking research against target times, the targets live in config/research_data.lua",
fields: [ fields: [
str("log_file", "Log file", "Where the milestone times are written within script-output", "log/research.log"), str("log_file", "Log file", "Where the milestone times are written within script-output", "log/research.log"),
num("milestone_rate", "Target rate", "Targeted Milestone Science Research Rate", 45, 5, "SPM"),
num("milestone_warmup_time", "Warmup time", "Warmup time given before start counting.", 10, 0, "minutes"),
], ],
}, },
{ {
+176 -55
View File
@@ -18,63 +18,184 @@ local data = {
}, },
milestone = { milestone = {
["base"] = { ["base"] = {
["automation"] = 600, "automation",
["logistics"] = 300, "logistics",
["steel-processing"] = 300, "steel-processing",
["logistic-science-pack"] = 300, "logistic-science-pack",
["electronics"] = 300, "electronics",
["fast-inserter"] = 300, "fast-inserter",
["steel-axe"] = 300, "steel-axe",
["automation-2"] = 300, "automation-2",
["advanced-material-processing"] = 300, "advanced-material-processing",
["engine"] = 300, "engine",
["fluid-handling"] = 300, "fluid-handling",
["oil-processing"] = 300, "oil-processing",
["sulfur-processing"] = 300, "sulfur-processing",
["plastics"] = 300, "plastics",
["advanced-circuit"] = 300, "advanced-circuit",
["chemical-science-pack"] = 300, "chemical-science-pack",
["modules"] = 300, "modules",
["logistics-2"] = 300, "logistics-2",
["railway"] = 300, "railway",
["research-speed-1"] = 300, "research-speed-1",
["research-speed-2"] = 300, "research-speed-2",
["battery"] = 300, "battery",
["concrete"] = 300, "concrete",
["flammables"] = 300, "flammables",
["low-density-structure"] = 300, "low-density-structure",
["advanced-material-processing-2"] = 300, "advanced-material-processing-2",
["productivity-module"] = 300, "productivity-module",
["production-science-pack"] = 300, "production-science-pack",
["processing-unit"] = 300, "processing-unit",
["advanced-oil-processing"] = 300, "advanced-oil-processing",
["electric-engine"] = 300, "electric-engine",
["robotics"] = 300, "robotics",
["construction-robotics"] = 300, "construction-robotics",
["worker-robots-speed-1"] = 300, "worker-robots-speed-1",
["worker-robots-speed-2"] = 300, "worker-robots-speed-2",
["utility-science-pack"] = 300, "utility-science-pack",
["productivity-module-2"] = 300, "productivity-module-2",
["speed-module-2"] = 300, "speed-module-2",
["rocket-fuel"] = 300, "rocket-fuel",
["effect-transmission"] = 300, "effect-transmission",
["productivity-module-3"] = 300, "productivity-module-3",
["speed-module-3"] = 300, "speed-module-3",
["rocket-silo"] = 300, "rocket-silo",
["space-science-pack"] = 300, "space-science-pack",
}, },
["space-age"] = { ["space-age"] = {
["logistic-science-pack"] = 3600, "automation",
["military-science-pack"] = 3600, "electric-mining-drill",
["chemical-science-pack"] = 5400, "logistics",
["utility-science-pack"] = 7200, "fast-inserter",
["production-science-pack"] = 7200, "steel-processing",
["space-science-pack"] = 7200, "logistic-science-pack",
["metallurgic-science-pack"] = 10800, "gun-turret",
["electromagnetic-science-pack"] = 10800, "automation-2",
["agricultural-science-pack"] = 10800, "advanced-material-processing",
["cryogenic-science-pack"] = 10800, "engine",
["promethium-science-pack"] = 14400, "logistics-2",
"automobilism",
"fluid-handling",
"oil-gathering",
"research-speed-1",
"research-speed-2",
"circuit-network",
"toolbelt",
"electric-energy-distribution-1",
"concrete",
"solar-energy",
"plastics",
"advanced-circuit",
"sulfur-processing",
"chemical-science-pack",
"battery",
"bulk-inserter",
"inserter-capacity-bonus-1",
"inserter-capacity-bonus-2",
"mining-productivity-1",
"modules",
"productivity-module",
"speed-module",
"efficiency-module",
"advanced-oil-processing",
"lubricant",
"electric-engine",
"robotics",
"construction-robotics",
"worker-robots-speed-1",
"worker-robots-speed-2",
"electric-energy-accumulators",
"explosives",
"military",
"stone-wall",
"military-2",
"military-science-pack",
"heavy-armor",
"modular-armor",
"solar-panel-equipment",
"battery-equipment",
"physical-projectile-damage-1",
"weapon-shooting-speed-1",
"repair-pack",
"radar",
"landfill",
"quality-module",
"flammables",
"processing-unit",
"low-density-structure",
"rocket-fuel",
"logistic-robotics",
"advanced-material-processing-2",
"rocket-silo",
"uranium-mining",
"research-speed-3",
"research-speed-4",
"worker-robots-storage-1",
"mining-productivity-2",
"railway",
"production-science-pack",
"utility-science-pack",
"physical-projectile-damage-2",
"weapon-shooting-speed-2",
"stronger-explosives-1",
"power-armor",
"exoskeleton-equipment",
"personal-roboport-equipment",
"nuclear-power",
"space-platform-thruster",
"planet-discovery-gleba",
"logistic-system",
"effect-transmission",
"speed-module-2",
"research-speed-5",
"worker-robots-speed-3",
"worker-robots-speed-4",
"worker-robots-storage-2",
"automation-3",
"productivity-module-2",
"efficiency-module-2",
"quality-module-2",
"planet-discovery-fulgora",
"kovarex-enrichment-process",
"military-3",
"military-4",
"power-armor-mk2",
"fission-reactor-equipment",
"battery-mk2-equipment",
"stronger-explosives-2",
"physical-projectile-damage-3",
"weapon-shooting-speed-3",
"planet-discovery-vulcanus",
"research-speed-6",
"worker-robots-speed-5",
"worker-robots-speed-6",
"worker-robots-storage-3",
"carbon-fiber",
"rocketry",
"rocket-turret",
"captivity",
"biolab",
"advanced-asteroid-processing",
"asteroid-reprocessing",
"planet-discovery-aquilo",
"physical-projectile-damage-4",
"weapon-shooting-speed-4",
"physical-projectile-damage-5",
"weapon-shooting-speed-5",
"physical-projectile-damage-6",
"weapon-shooting-speed-6",
"physical-projectile-damage-7",
"stronger-explosives-3",
"stronger-explosives-4",
"stronger-explosives-5",
"stronger-explosives-6",
"stronger-explosives-7",
"stronger-explosives-8",
"quantum-processor",
"railgun",
"fusion-reactor",
"promethium-science-pack",
} }
}, },
inf_res = { inf_res = {
+71 -24
View File
@@ -24,22 +24,16 @@ local Elements = {}
local Actions = {} local Actions = {}
--- @param command ExpCommand | function (this is needed because of the overload on commands) --- @param command ExpCommand | function (this is needed because of the overload on commands)
--- @param locale table<string, string>
--- @param on_click? ExpElement.EventHandler<EventData.on_gui_click> --- @param on_click? ExpElement.EventHandler<EventData.on_gui_click>
local function new_quick_action(command, on_click) local function new_quick_action(command, locale, on_click)
local command_name = command.name local command_name = command.name
local element = Gui.define("quick_actions/" .. command_name) local element = Gui.define("quick_actions/" .. command_name)
:draw{ :draw{
type = "button", type = "button",
caption = { "?", caption = { locale.caption },
{ "exp-gui_quick-actions.caption-" .. command_name }, tooltip = { locale.tooltip },
command_name,
},
tooltip = { "?",
{ "exp-gui_quick-actions.tooltip-" .. command_name },
command.description,
""
},
} }
:style{ :style{
width = 160, width = 160,
@@ -55,24 +49,77 @@ local function new_quick_action(command, on_click)
} }
end end
new_quick_action(addon_artillery.commands.artillery) new_quick_action(addon_artillery.commands.artillery, {
new_quick_action(addon_trains.commands.set_trains_to_automatic) caption = "exp-commands_artillery.selection-name",
tooltip = "exp-commands_artillery.description"
})
new_quick_action(addon_teleport.commands.spawn, function(def, player, element, event) new_quick_action(addon_trains.commands.set_trains_to_automatic, {
caption = "exp-commands_trains.caption",
tooltip = "exp-commands_trains.description"
})
new_quick_action(addon_teleport.commands.spawn, {
caption = "exp-commands_teleport.description-spawn",
tooltip = "exp-commands_teleport.description-spawn"
}, function(def, player, element, event)
addon_teleport.commands.spawn(player, player) addon_teleport.commands.spawn(player, player)
end) end)
new_quick_action(addon_waterfill.commands.waterfill) new_quick_action(addon_waterfill.commands.waterfill, {
new_quick_action(addon_lawnmower.commands.lawnmower) caption = "exp-commands_waterfill.selection-name",
new_quick_action(addon_surface.commands.clear_ground_items) tooltip = "exp-commands_waterfill.description"
new_quick_action(addon_surface.commands.clear_blueprints_surface) })
new_quick_action(addon_surface.commands.clear_blueprints)
new_quick_action(addon_home.commands.home) new_quick_action(addon_lawnmower.commands.lawnmower, {
new_quick_action(addon_home.commands.home_return) caption = "exp-commands_lawnmower.selection-name",
new_quick_action(addon_home.commands.set_home) tooltip = "exp-commands_lawnmower.description"
new_quick_action(addon_home.commands.get_home) })
new_quick_action(addon_vlayer.commands.vlayer)
new_quick_action(addon_repair.commands.repair) new_quick_action(addon_surface.commands.clear_ground_items, {
caption = "exp-commands_surface.caption-items",
tooltip = "exp-commands_surface.description-items"
})
new_quick_action(addon_surface.commands.clear_blueprints_surface, {
caption = "exp-commands_surface.caption-blueprints-surface",
tooltip = "exp-commands_surface.description-blueprints-surface"
})
new_quick_action(addon_surface.commands.clear_blueprints, {
caption = "exp-commands_surface.caption-blueprints",
tooltip = "exp-commands_surface.description-blueprints"
})
new_quick_action(addon_home.commands.home, {
caption = "exp-commands_home.caption-home",
tooltip = "exp-commands_home.description-home"
})
new_quick_action(addon_home.commands.home_return, {
caption = "exp-commands_home.caption-return",
tooltip = "exp-commands_home.description-return"
})
new_quick_action(addon_home.commands.set_home, {
caption = "exp-commands_home.caption-set",
tooltip = "exp-commands_home.description-set"
})
new_quick_action(addon_home.commands.get_home, {
caption = "exp-commands_home.caption-get",
tooltip = "exp-commands_home.description-get"
})
new_quick_action(addon_vlayer.commands.vlayer, {
caption = "exp-commands_vlayer.caption",
tooltip = "exp-commands_vlayer.description"
})
new_quick_action(addon_repair.commands.repair, {
caption = "exp-commands_repair.selection-name",
tooltip = "exp-commands_repair.description"
})
--- Container added to the left gui flow --- Container added to the left gui flow
--- @class ExpGui_QuickActions.elements.container: ExpElement --- @class ExpGui_QuickActions.elements.container: ExpElement
@@ -10,6 +10,8 @@ local research_data = require("modules/exp_scenario/config/research_data")
local feature, config = Feature.register("research_milestones", { local feature, config = Feature.register("research_milestones", {
log_file = "log/research.log", -- where the milestone times are written log_file = "log/research.log", -- where the milestone times are written
milestone_rate = 45, -- Targeted Milestone Science Research Rate, In terms of SPM.
milestone_warmup_time = 10, -- Warmup time given before start counting. In terms of minutes.
}) })
local table_to_json = helpers.table_to_json local table_to_json = helpers.table_to_json
@@ -41,11 +43,12 @@ local research_targets = {
do --- Calculate the research targets do --- Calculate the research targets
local research_index = 1 local research_index = 1
local total_time = 0 local total_time = config.milestone_warmup_time * 60
for name, time in pairs(research_data.milestone[research_data.mod_set]) do for _, name in pairs(research_data.milestone[research_data.mod_set]) do
if prototypes.technology[name] and (not prototypes.technology[name].hidden) then if prototypes.technology[name] and (not prototypes.technology[name].hidden) then
research_targets.index_lookup[name] = research_index research_targets.index_lookup[name] = research_index
total_time = total_time + time * 60 -- The number is affected by multiplier already
total_time = total_time + math.ceil(prototypes.technology[name].research_unit_count * 60 / config.milestone_rate)
research_targets.target_times[research_index] = { research_targets.target_times[research_index] = {
name = name, name = name,
+10 -6
View File
@@ -73,6 +73,10 @@ description-remove=Remove all enemy spawners.
arg-surface=Surface to remove spawners from. arg-surface=Surface to remove spawners from.
[exp-commands_home] [exp-commands_home]
caption-home=Teleports Home.
caption-return=Teleports Previous.
caption-get=Get Home.
caption-set=Sets Home.
description-home=Teleports you to your home location. description-home=Teleports you to your home location.
description-return=Teleports you to previous location. description-return=Teleports you to previous location.
description-get=Returns your current home location. description-get=Returns your current home location.
@@ -205,6 +209,9 @@ follow-self=You can not follow yourself.
[exp-commands_surface] [exp-commands_surface]
selection-name=Surface selection-name=Surface
caption-items=Clear item
caption-blueprints=Clear Blueprints
caption-blueprints-surface=Clear Blueprints (Surface)
description-items=Clear all items on the ground. description-items=Clear all items on the ground.
description-blueprints=Clear all blueprints. description-blueprints=Clear all blueprints.
description-blueprints-surface=Clear all blueprints on the current surface. description-blueprints-surface=Clear all blueprints on the current surface.
@@ -214,6 +221,7 @@ blueprints=__1__ cleared all blueprints on __2__.
complete=__1__ blueprint ghost were removed. complete=__1__ blueprint ghost were removed.
[exp-commands_trains] [exp-commands_trains]
caption=Set Auto Train
description=Set All Trains to Automatic, does not effect trains with passengers. description=Set All Trains to Automatic, does not effect trains with passengers.
arg-force=Force to set the trains for, default all. arg-force=Force to set the trains for, default all.
arg-surface=Surface to set the trains for, default all. arg-surface=Surface to set the trains for, default all.
@@ -231,8 +239,9 @@ unavailable=They was a problem teleporting you, likely no position found, please
same-player=Player can not be teleported to themselves. same-player=Player can not be teleported to themselves.
[exp-commands_vlayer] [exp-commands_vlayer]
caption=Vlayer information.
description=Print all vlayer information. description=Print all vlayer information.
title=VLayer Information: title=Vlayer Information:
result=__1__: __2__ result=__1__: __2__
[exp-commands_waterfill] [exp-commands_waterfill]
@@ -309,11 +318,6 @@ caption-net=Net
[exp-gui_quick-actions] [exp-gui_quick-actions]
tooltip-main=Quick Actions tooltip-main=Quick Actions
caption-artillery=Artillery
caption-research=Auto Research
caption-spawn=Teleport Spawn
caption-trains=Set Auto Train
caption-waterfill=Waterfill
[exp-gui_readme] [exp-gui_readme]
main-tooltip=Information main-tooltip=Information
+11 -13
View File
@@ -70,10 +70,14 @@ description-remove=移除蟲單位及停止生產器。
arg-surface=要移除蟲巢的位面。 arg-surface=要移除蟲巢的位面。
[exp-commands_home] [exp-commands_home]
caption-home=傳送回家。
caption-return=傳送上次。
caption-set=設定家。
caption-get=取得家。
description-home=傳送回家。 description-home=傳送回家。
description-return=傳送回上一個位置。
description-set=設定目前位置為家。 description-set=設定目前位置為家。
description-get=取得家的位置。 description-get=取得家的位置。
description-return=傳送回上一個位置。
no-home=你在 __1__ 上還沒設回程傳送點。 no-home=你在 __1__ 上還沒設回程傳送點。
no-return=你還沒在 __1__ 上使用過回程。 no-return=你還沒在 __1__ 上使用過回程。
home-set=你的回程傳送點為 __1__ 上, x: __2__ y: __3__ home-set=你的回程傳送點為 __1__ 上, x: __2__ y: __3__
@@ -206,6 +210,9 @@ follow-self=你不能追蹤自己。
[exp-commands_surface] [exp-commands_surface]
selection-name=位面 selection-name=位面
caption-items=清除物品
caption-blueprints=清除藍圖
caption-blueprints-surface=清除藍圖 (位面)
description-items=清除地面上的物品。 description-items=清除地面上的物品。
description-blueprints=清除藍圖。 description-blueprints=清除藍圖。
description-blueprints-surface=清除本位面上的藍圖。 description-blueprints-surface=清除本位面上的藍圖。
@@ -216,6 +223,7 @@ area-too-large=區域太大了,需少過 __1__ 格,你選了 __2__ 格。
complete=__1__ 個地上的藍圖已被清除。 complete=__1__ 個地上的藍圖已被清除。
[exp-commands_trains] [exp-commands_trains]
caption=自動火車
description=把火車設置為自動模式 description=把火車設置為自動模式
arg-force=勢力 arg-force=勢力
arg-surface=位面 arg-surface=位面
@@ -233,7 +241,8 @@ unavailable=沒找到空間進行傳送
same-player=沒辦法傳送到自己 same-player=沒辦法傳送到自己
[exp-commands_vlayer] [exp-commands_vlayer]
description=vlayer 資訊 caption=vlayer 資訊
description=列印所有 vlayer 資訊
title=vlayer 資訊: title=vlayer 資訊:
result=__1__: __2__ result=__1__: __2__
@@ -296,16 +305,6 @@ caption-net=淨值
[exp-gui_quick-actions] [exp-gui_quick-actions]
tooltip-main=工具 tooltip-main=工具
caption-artillery=火炮遙控
tooltip-artillery=火炮遙控
caption-research=研究
tooltip-research=啟用自動研究
caption-spawn=傳送出生
tooltip-spawn-tooltip=傳送到出生點
caption-trains=火車
tooltip-trains=把火車設置為自動模式
caption-waterfill=挖水
tooltip-waterfill=把地換為水。
[exp-gui_readme] [exp-gui_readme]
main-tooltip=資訊 main-tooltip=資訊
@@ -606,7 +605,6 @@ chat-jailed=__1__ 因被多次拆除受保護物體而被禁止行動。請等
[exp_report-jail] [exp_report-jail]
chat-jailed=__1__ 因被多次舉報而被禁止行動。請等候管理員作出下一步處理。 chat-jailed=__1__ 因被多次舉報而被禁止行動。請等候管理員作出下一步處理。
[exp-gui_player-list] [exp-gui_player-list]
main-tooltip = Player List main-tooltip = Player List
open-action-bar = Options open-action-bar = Options
+11 -13
View File
@@ -70,10 +70,14 @@ description-remove=移除蟲單位及停止生產器。
arg-surface=要移除蟲巢的位面。 arg-surface=要移除蟲巢的位面。
[exp-commands_home] [exp-commands_home]
caption-home=傳送回家。
caption-return=傳送上次。
caption-set=設定家。
caption-get=取得家。
description-home=傳送回家。 description-home=傳送回家。
description-return=傳送回上一個位置。
description-set=設定目前位置為家。 description-set=設定目前位置為家。
description-get=取得家的位置。 description-get=取得家的位置。
description-return=傳送回上一個位置。
no-home=你在 __1__ 上還沒設回程傳送點。 no-home=你在 __1__ 上還沒設回程傳送點。
no-return=你還沒在 __1__ 上使用過回程。 no-return=你還沒在 __1__ 上使用過回程。
home-set=你的回程傳送點為 __1__ 上, x: __2__ y: __3__ home-set=你的回程傳送點為 __1__ 上, x: __2__ y: __3__
@@ -206,6 +210,9 @@ follow-self=你不能追蹤自己。
[exp-commands_surface] [exp-commands_surface]
selection-name=位面 selection-name=位面
caption-items=清除物品
caption-blueprints=清除藍圖
caption-blueprints-surface=清除藍圖 (位面)
description-items=清除地面上的物品。 description-items=清除地面上的物品。
description-blueprints=清除藍圖。 description-blueprints=清除藍圖。
description-blueprints-surface=清除本位面上的藍圖。 description-blueprints-surface=清除本位面上的藍圖。
@@ -216,6 +223,7 @@ area-too-large=區域太大了,需少過 __1__ 格,你選了 __2__ 格。
complete=__1__ 個地上的藍圖已被清除。 complete=__1__ 個地上的藍圖已被清除。
[exp-commands_trains] [exp-commands_trains]
caption=自動火車
description=把火車設置為自動模式 description=把火車設置為自動模式
arg-force=勢力 arg-force=勢力
arg-surface=位面 arg-surface=位面
@@ -233,7 +241,8 @@ unavailable=沒找到空間進行傳送
same-player=沒辦法傳送到自己 same-player=沒辦法傳送到自己
[exp-commands_vlayer] [exp-commands_vlayer]
description=vlayer 資訊 caption=vlayer 資訊
description=列印所有 vlayer 資訊
title=vlayer 資訊: title=vlayer 資訊:
result=__1__: __2__ result=__1__: __2__
@@ -296,16 +305,6 @@ caption-net=淨值
[exp-gui_quick-actions] [exp-gui_quick-actions]
tooltip-main=工具 tooltip-main=工具
caption-artillery=火炮遙控
tooltip-artillery=火炮遙控
caption-research=研究
tooltip-research=啟用自動研究
caption-spawn=傳送出生
tooltip-spawn-tooltip=傳送到出生點
caption-trains=火車
tooltip-trains=把火車設置為自動模式
caption-waterfill=挖水
tooltip-waterfill=把地換為水。
[exp-gui_readme] [exp-gui_readme]
main-tooltip=資訊 main-tooltip=資訊
@@ -606,7 +605,6 @@ chat-jailed=__1__ 因被多次拆除受保護物體而被禁止行動。請等
[exp_report-jail] [exp_report-jail]
chat-jailed=__1__ 因被多次舉報而被禁止行動。請等候管理員作出下一步處理。 chat-jailed=__1__ 因被多次舉報而被禁止行動。請等候管理員作出下一步處理。
[exp-gui_player-list] [exp-gui_player-list]
main-tooltip = Player List main-tooltip = Player List
open-action-bar = Options open-action-bar = Options