From aa7fe73bb01387555c202b51ab98e9bd9d9491db Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Fri, 26 Jun 2026 07:14:14 +0900 Subject: [PATCH] vlayer info add quick action (#438) * Update vlayer.lua * Add vlayer command to quick actions --- exp_scenario/module/commands/vlayer.lua | 10 +++++++++- exp_scenario/module/gui/quick_actions.lua | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/exp_scenario/module/commands/vlayer.lua b/exp_scenario/module/commands/vlayer.lua index 4a21f13f..f4b38e96 100644 --- a/exp_scenario/module/commands/vlayer.lua +++ b/exp_scenario/module/commands/vlayer.lua @@ -5,8 +5,12 @@ Adds a virtual layer to store power to save space. local Commands = require("modules/exp_commands") local vlayer = require("modules.exp_legacy.modules.control.vlayer") +--- @class ExpCommand_vlayer.commands +local commands = {} + --- Print all vlayer information -Commands.new("vlayer-info", { "exp-commands_vlayer.description" }) +--- @class ExpCommands_vlayer.commands.vlayer: ExpCommand +commands.vlayer = Commands.new("vlayer-info", { "exp-commands_vlayer.description" }) :register(function(player) local index = 3 local response = { "", "exp-commands_vlayer.title" } --- @type LocalisedString @@ -16,3 +20,7 @@ Commands.new("vlayer-info", { "exp-commands_vlayer.description" }) end return Commands.status.success(response) end) + +return { + commands = commands, +} diff --git a/exp_scenario/module/gui/quick_actions.lua b/exp_scenario/module/gui/quick_actions.lua index 28ea5af4..28c82117 100644 --- a/exp_scenario/module/gui/quick_actions.lua +++ b/exp_scenario/module/gui/quick_actions.lua @@ -11,6 +11,7 @@ local addon_research = require("modules/exp_scenario/commands/research") local addon_trains = require("modules/exp_scenario/commands/trains") local addon_teleport = require("modules/exp_scenario/commands/teleport") local addon_waterfill = require("modules/exp_scenario/commands/waterfill") +local addon_vlayer = require("modules/exp_scenario/commands/vlayer") --- @class ExpGui_QuickActions.elements local Elements = {} @@ -51,6 +52,7 @@ new_quick_action("spawn", addon_teleport.commands.spawn, function(def, player, e end) new_quick_action("waterfill", addon_waterfill.commands.waterfill) +new_quick_action("vlayer", addon_vlayer.commands.vlayer) --- Container added to the left gui flow --- @class ExpGui_QuickActions.elements.container: ExpElement