diff --git a/Content.Server/Silicons/Borgs/BorgSystem.Modules.cs b/Content.Server/Silicons/Borgs/BorgSystem.Modules.cs index bbd62d7a01..67408d1d5a 100644 --- a/Content.Server/Silicons/Borgs/BorgSystem.Modules.cs +++ b/Content.Server/Silicons/Borgs/BorgSystem.Modules.cs @@ -65,6 +65,16 @@ public sealed partial class BorgSystem _actions.SetEntityIcon(actEnt, uid); if (TryComp(uid, out var moduleIconComp)) _actions.SetIcon(actEnt, moduleIconComp.Icon); + + /// Set a custom name and description on the action. The borg module action prototypes are shared across + /// all modules. Extract localized names, then populate variables with the info from the module itself. + var moduleName = Name(uid); + var actionMetaData = MetaData(component.ModuleSwapActionEntity.Value); + + var instanceName = Loc.GetString("borg-module-action-name", ("moduleName", moduleName)); + _metaData.SetEntityName(component.ModuleSwapActionEntity.Value, instanceName, actionMetaData); + var instanceDesc = Loc.GetString("borg-module-action-description", ("moduleName", moduleName)); + _metaData.SetEntityDescription(component.ModuleSwapActionEntity.Value, instanceDesc, actionMetaData); } if (!TryComp(chassis, out BorgChassisComponent? chassisComp)) diff --git a/Resources/Locale/en-US/borg/borg.ftl b/Resources/Locale/en-US/borg/borg.ftl index 9c9dc71069..54a733e1cf 100644 --- a/Resources/Locale/en-US/borg/borg.ftl +++ b/Resources/Locale/en-US/borg/borg.ftl @@ -10,6 +10,9 @@ borg-module-too-many = There's not enough room for another module... borg-module-duplicate = This module is already installed in this cyborg. borg-module-whitelist-deny = This module doesn't fit in this type of cyborg... +borg-module-action-name = Activate {$moduleName} +borg-module-action-description = Select the {$moduleName}, enabling you to use the tools it provides. + borg-construction-guide-string = The cyborg limbs and torso must be attached to the endoskeleton. borg-ui-menu-title = Cyborg Interface @@ -60,5 +63,3 @@ borg-type-medical-transponder = medical cyborg borg-type-service-name = Service borg-type-service-desc = Help out with a wide range of crew services, ranging from serving snacks and drinks to botany to entertainment. borg-type-service-transponder = service cyborg - - diff --git a/Resources/Prototypes/Entities/Objects/Specific/Robotics/borg_modules.yml b/Resources/Prototypes/Entities/Objects/Specific/Robotics/borg_modules.yml index e023133f27..9cc47d5b10 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Robotics/borg_modules.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Robotics/borg_modules.yml @@ -51,6 +51,7 @@ - type: entity parent: BaseAction id: ActionBorgSwapModule + # Name and description will normally be changed by BorgSystem name: Swap Module description: Select this module, enabling you to use the tools it provides. components: