From 16ebcd82f06f5e9e9fb71c33f5d37e337660f93e Mon Sep 17 00:00:00 2001 From: Doctor-Cpu <77215380+Doctor-Cpu@users.noreply.github.com> Date: Fri, 26 Jul 2024 06:29:08 +0100 Subject: [PATCH 01/14] round start borgs --- .../Station/Systems/StationSpawningSystem.cs | 44 ++- Content.Shared/Roles/StartingGearPrototype.cs | 15 + .../en-US/preferences/loadout-groups.ftl | 2 + .../Entities/Mobs/Player/silicon.yml | 283 +++++++++++++++++- .../Prototypes/Loadouts/Jobs/Science/borg.yml | 53 ++++ .../Prototypes/Loadouts/loadout_groups.yml | 13 + .../Prototypes/Loadouts/role_loadouts.yml | 5 + .../Prototypes/Roles/Jobs/Science/borg.yml | 1 - 8 files changed, 407 insertions(+), 9 deletions(-) create mode 100644 Resources/Prototypes/Loadouts/Jobs/Science/borg.yml diff --git a/Content.Server/Station/Systems/StationSpawningSystem.cs b/Content.Server/Station/Systems/StationSpawningSystem.cs index e960a2bbbe2c7a..ffae39dd49439c 100644 --- a/Content.Server/Station/Systems/StationSpawningSystem.cs +++ b/Content.Server/Station/Systems/StationSpawningSystem.cs @@ -155,10 +155,7 @@ public EntityUid SpawnPlayerMob( if (prototype?.JobEntity != null) { DebugTools.Assert(entity is null); - var jobEntity = EntityManager.SpawnEntity(prototype.JobEntity, coordinates); - MakeSentientCommand.MakeSentient(jobEntity, EntityManager); - DoJobSpecials(job, jobEntity); - _identity.QueueIdentityUpdate(jobEntity); + var jobEntity = SpawnEntity(prototype.JobEntity, coordinates, job); return jobEntity; } @@ -181,7 +178,7 @@ public EntityUid SpawnPlayerMob( if (!_prototypeManager.TryIndex(speciesId, out var species)) throw new ArgumentException($"Invalid species prototype was used: {speciesId}"); - entity ??= Spawn(species.Prototype, coordinates); + entity ??= SpawnEntity(species.Prototype, coordinates, job); if (_randomizeCharacters) { @@ -190,9 +187,9 @@ public EntityUid SpawnPlayerMob( var jobLoadout = LoadoutSystem.GetJobPrototype(prototype?.ID); + RoleLoadout? loadout = null; if (_prototypeManager.TryIndex(jobLoadout, out RoleLoadoutPrototype? roleProto)) { - RoleLoadout? loadout = null; profile?.Loadouts.TryGetValue(jobLoadout, out loadout); // Set to default if not present @@ -205,6 +202,31 @@ public EntityUid SpawnPlayerMob( EquipRoleLoadout(entity.Value, loadout, roleProto); } + if (loadout != null && roleProto != null) + { + foreach (var group in loadout.SelectedLoadouts.OrderBy(x => roleProto.Groups.FindIndex(e => e == x.Key))) + { + foreach (var items in group.Value) + { + if (!_prototypeManager.TryIndex(items.Prototype, out var loadoutProto)) + { + continue; + } + if (!_prototypeManager.TryIndex(loadoutProto.Equipment, out var startingEntity)) + { + continue; + } + if (startingEntity.Entity != null) + { + var newEntity = SpawnEntity(startingEntity.Entity, coordinates, job); + EntityManager.DeleteEntity(entity); //entity isnt deleted before as the loadout is on this entity + entity = newEntity; + return entity.Value; + } + } + } + } + if (prototype?.StartingGear != null) { var startingGear = _prototypeManager.Index(prototype.StartingGear); @@ -227,11 +249,19 @@ public EntityUid SpawnPlayerMob( } } - DoJobSpecials(job, entity.Value); _identity.QueueIdentityUpdate(entity.Value); return entity.Value; } + private EntityUid SpawnEntity(string prototype, EntityCoordinates coordinates, JobComponent? job) + { + var entity = EntityManager.SpawnEntity(prototype, coordinates); + MakeSentientCommand.MakeSentient(entity, EntityManager); + DoJobSpecials(job, entity); + _identity.QueueIdentityUpdate(entity); + return entity; + } + private void DoJobSpecials(JobComponent? job, EntityUid entity) { if (!_prototypeManager.TryIndex(job?.Prototype ?? string.Empty, out JobPrototype? prototype)) diff --git a/Content.Shared/Roles/StartingGearPrototype.cs b/Content.Shared/Roles/StartingGearPrototype.cs index d96d014f88d313..2eea8337017bf3 100644 --- a/Content.Shared/Roles/StartingGearPrototype.cs +++ b/Content.Shared/Roles/StartingGearPrototype.cs @@ -26,6 +26,21 @@ public sealed partial class StartingGearPrototype : IPrototype, IInheritingProto [AlwaysPushInheritance] public Dictionary Equipment = new(); + /// + /// Overides the players entity + /// + [DataField] + [AlwaysPushInheritance] + public string? Entity { get; set; } + + /// + /// Meant to be used in conjunction with Entity + /// Entity to show as the players dummy in the lobby + /// + [DataField] + [AlwaysPushInheritance] + public string? EntityDummy { get; set; } + /// /// The inhand items that are equipped when this starting gear is equipped onto an entity. /// diff --git a/Resources/Locale/en-US/preferences/loadout-groups.ftl b/Resources/Locale/en-US/preferences/loadout-groups.ftl index 28785e305c8943..f5a3112dd8cb28 100644 --- a/Resources/Locale/en-US/preferences/loadout-groups.ftl +++ b/Resources/Locale/en-US/preferences/loadout-groups.ftl @@ -195,3 +195,5 @@ loadout-group-reporter-jumpsuit = Reporter jumpsuit loadout-group-boxer-jumpsuit = Boxer jumpsuit loadout-group-boxer-gloves = Boxer gloves + +loadout-group-borg-chassis = Cyborg chassis diff --git a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml index 0f8998bdec81ab..580b9381a3ee42 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml @@ -18,7 +18,7 @@ nameSegments: [names_borg] - type: entity - id: PlayerBorgBattery + id: PlayerBorgGenericBattery parent: BorgChassisGeneric suffix: Battery components: @@ -32,6 +32,287 @@ name: power-cell-slot-component-slot-name-default startingItem: PowerCellMedium +- type: entity + id: DummyBorgGeneric + components: + - type: Sprite + sprite: Mobs/Silicon/chassis.rsi + drawdepth: Mobs + noRot: true + layers: + - state: robot + - state: robot_e_r + map: ["enum.BorgVisualLayers.Light"] + shader: unshaded + visible: false + - state: robot_l + shader: unshaded + map: ["light"] + visible: false + +- type: entity + id: PlayerBorgMining + parent: BorgChassisMining + suffix: Battery, Tools + components: + - type: ContainerFill + containers: + borg_brain: + - PositronicBrain + borg_module: + - BorgModuleTool + - type: ItemSlots + slots: + cell_slot: + name: power-cell-slot-component-slot-name-default + startingItem: PowerCellMedium + - type: RandomMetadata + nameSegments: [names_borg] + +- type: entity + id: PlayerBorgMiningBattery + parent: BorgChassisMining + suffix: Battery + components: + - type: ContainerFill + containers: + borg_brain: + - MMIFilled + - type: ItemSlots + slots: + cell_slot: + name: power-cell-slot-component-slot-name-default + startingItem: PowerCellMedium + +- type: entity + id: DummyBorgMining + components: + - type: Sprite + sprite: Mobs/Silicon/chassis.rsi + drawdepth: Mobs + noRot: true + layers: + - state: miner + map: ["movement"] + - state: miner_e_r + map: ["enum.BorgVisualLayers.Light"] + shader: unshaded + visible: false + - state: miner_l + shader: unshaded + map: ["light"] + visible: false + +- type: entity + id: PlayerBorgEngineer + parent: BorgChassisEngineer + suffix: Battery, Tools + components: + - type: ContainerFill + containers: + borg_brain: + - PositronicBrain + borg_module: + - BorgModuleTool + - type: ItemSlots + slots: + cell_slot: + name: power-cell-slot-component-slot-name-default + startingItem: PowerCellMedium + - type: RandomMetadata + nameSegments: [names_borg] + +- type: entity + id: PlayerBorgEngineerBattery + parent: BorgChassisEngineer + suffix: Battery + components: + - type: ContainerFill + containers: + borg_brain: + - MMIFilled + - type: ItemSlots + slots: + cell_slot: + name: power-cell-slot-component-slot-name-default + startingItem: PowerCellMedium + +- type: entity + id: DummyBorgEngineer + components: + - type: Sprite + sprite: Mobs/Silicon/chassis.rsi + drawdepth: Mobs + noRot: true + layers: + - state: engineer + - state: engineer_e_r + map: ["enum.BorgVisualLayers.Light"] + shader: unshaded + visible: false + - state: engineer_l + shader: unshaded + map: ["light"] + visible: false + +- type: entity + id: PlayerBorgJanitor + parent: BorgChassisJanitor + suffix: Battery, Tools + components: + - type: ContainerFill + containers: + borg_brain: + - PositronicBrain + borg_module: + - BorgModuleTool + - type: ItemSlots + slots: + cell_slot: + name: power-cell-slot-component-slot-name-default + startingItem: PowerCellMedium + - type: RandomMetadata + nameSegments: [names_borg] + +- type: entity + id: PlayerBorgJanitorBattery + parent: BorgChassisJanitor + suffix: Battery + components: + - type: ContainerFill + containers: + borg_brain: + - MMIFilled + - type: ItemSlots + slots: + cell_slot: + name: power-cell-slot-component-slot-name-default + startingItem: PowerCellMedium + +- type: entity + id: DummyBorgJanitor + components: + - type: Sprite + sprite: Mobs/Silicon/chassis.rsi + drawdepth: Mobs + noRot: true + layers: + - state: janitor + map: ["movement"] + - state: janitor_e_r + map: ["enum.BorgVisualLayers.Light"] + shader: unshaded + visible: false + - state: janitor_l + shader: unshaded + map: ["light"] + visible: false + +- type: entity + id: PlayerBorgMedical + parent: BorgChassisMedical + suffix: Battery, Tools + components: + - type: ContainerFill + containers: + borg_brain: + - PositronicBrain + borg_module: + - BorgModuleTool + - type: ItemSlots + slots: + cell_slot: + name: power-cell-slot-component-slot-name-default + startingItem: PowerCellMedium + - type: RandomMetadata + nameSegments: [names_borg] + +- type: entity + id: PlayerBorgMedicalBattery + parent: BorgChassisMedical + suffix: Battery + components: + - type: ContainerFill + containers: + borg_brain: + - MMIFilled + - type: ItemSlots + slots: + cell_slot: + name: power-cell-slot-component-slot-name-default + startingItem: PowerCellMedium + +- type: entity + id: DummyBorgMedical + components: + - type: Sprite + sprite: Mobs/Silicon/chassis.rsi + drawdepth: Mobs + noRot: true + layers: + - state: medical + map: ["movement"] + - state: medical_e_r + map: ["enum.BorgVisualLayers.Light"] + shader: unshaded + visible: false + - state: medical_l + shader: unshaded + map: ["light"] + visible: false + +- type: entity + id: PlayerBorgService + parent: BorgChassisService + suffix: Battery, Tools + components: + - type: ContainerFill + containers: + borg_brain: + - PositronicBrain + borg_module: + - BorgModuleTool + - type: ItemSlots + slots: + cell_slot: + name: power-cell-slot-component-slot-name-default + startingItem: PowerCellMedium + - type: RandomMetadata + nameSegments: [names_borg] + +- type: entity + id: PlayerBorgServiceBattery + parent: BorgChassisService + suffix: Battery + components: + - type: ContainerFill + containers: + borg_brain: + - MMIFilled + - type: ItemSlots + slots: + cell_slot: + name: power-cell-slot-component-slot-name-default + startingItem: PowerCellMedium + +- type: entity + id: DummyBorgService + components: + - type: Sprite + sprite: Mobs/Silicon/chassis.rsi + drawdepth: Mobs + noRot: true + layers: + - state: service + - state: service_e_r + map: ["enum.BorgVisualLayers.Light"] + shader: unshaded + visible: false + - state: service_l + shader: unshaded + map: ["light"] + visible: false + - type: entity id: PlayerBorgSyndicateAssaultBattery parent: BorgChassisSyndicateAssault diff --git a/Resources/Prototypes/Loadouts/Jobs/Science/borg.yml b/Resources/Prototypes/Loadouts/Jobs/Science/borg.yml new file mode 100644 index 00000000000000..c72ec5f1adc99a --- /dev/null +++ b/Resources/Prototypes/Loadouts/Jobs/Science/borg.yml @@ -0,0 +1,53 @@ +- type: loadout + id: BorgGeneric + equipment: BorgGeneric + +- type: startingGear + id: BorgGeneric + entity: PlayerBorgGeneric + entityDummy: DummyBorgGeneric + +- type: loadout + id: BorgMining + equipment: BorgMining + +- type: startingGear + id: BorgMining + entity: PlayerBorgMining + entityDummy: DummyBorgMining + +- type: loadout + id: BorgEngineer + equipment: BorgEngineer + +- type: startingGear + id: BorgEngineer + entity: PlayerBorgEngineer + entityDummy: DummyBorgEngineer + +- type: loadout + id: BorgJanitor + equipment: BorgJanitor + +- type: startingGear + id: BorgJanitor + entity: PlayerBorgJanitor + entityDummy: DummyBorgJanitor + +- type: loadout + id: BorgMedical + equipment: BorgMedical + +- type: startingGear + id: BorgMedical + entity: PlayerBorgMedical + entityDummy: DummyBorgMedical + +- type: loadout + id: BorgService + equipment: BorgService + +- type: startingGear + id: BorgService + entity: PlayerBorgService + entityDummy: DummyBorgService diff --git a/Resources/Prototypes/Loadouts/loadout_groups.yml b/Resources/Prototypes/Loadouts/loadout_groups.yml index b1d267cc00c9ca..3b10f2e4728361 100644 --- a/Resources/Prototypes/Loadouts/loadout_groups.yml +++ b/Resources/Prototypes/Loadouts/loadout_groups.yml @@ -1271,3 +1271,16 @@ hidden: true loadouts: - LoadoutSpeciesBreathToolSecurity + +- type: loadoutGroup + id: BorgChassis + name: loadout-group-borg-chassis + minLimit: 1 + maxLimit: 1 + loadouts: + - BorgGeneric + - BorgMining + - BorgEngineer + - BorgJanitor + - BorgMedical + - BorgService diff --git a/Resources/Prototypes/Loadouts/role_loadouts.yml b/Resources/Prototypes/Loadouts/role_loadouts.yml index bb30cc182a6131..dad3715cc0df65 100644 --- a/Resources/Prototypes/Loadouts/role_loadouts.yml +++ b/Resources/Prototypes/Loadouts/role_loadouts.yml @@ -507,6 +507,11 @@ - Trinkets - GroupSpeciesBreathTool +- type: roleLoadout + id: JobBorg + groups: + - BorgChassis + # These loadouts are used for non-crew spawns, like off-station antags and event mobs # They will be used without player configuration, thus they will only ever apply what is forced by MinLimit diff --git a/Resources/Prototypes/Roles/Jobs/Science/borg.yml b/Resources/Prototypes/Roles/Jobs/Science/borg.yml index fe829110051bef..4d1caf034d77cf 100644 --- a/Resources/Prototypes/Roles/Jobs/Science/borg.yml +++ b/Resources/Prototypes/Roles/Jobs/Science/borg.yml @@ -9,4 +9,3 @@ canBeAntag: false icon: JobIconBorg supervisors: job-supervisors-rd - jobEntity: PlayerBorgGeneric From 05ac188e21cfcb071d72eb3b30690b7b94e40e2e Mon Sep 17 00:00:00 2001 From: Doctor-Cpu <77215380+Doctor-Cpu@users.noreply.github.com> Date: Sat, 27 Jul 2024 06:03:55 +0100 Subject: [PATCH 02/14] show dummy in loadout options --- .../UI/Loadouts/LoadoutContainer.xaml.cs | 28 +++++++++++-------- .../UI/Loadouts/LoadoutGroupContainer.xaml.cs | 12 +++++++- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/Content.Client/Lobby/UI/Loadouts/LoadoutContainer.xaml.cs b/Content.Client/Lobby/UI/Loadouts/LoadoutContainer.xaml.cs index 36f0772d784e5d..5b5638c36c5549 100644 --- a/Content.Client/Lobby/UI/Loadouts/LoadoutContainer.xaml.cs +++ b/Content.Client/Lobby/UI/Loadouts/LoadoutContainer.xaml.cs @@ -20,7 +20,7 @@ public sealed partial class LoadoutContainer : BoxContainer public Button Select => SelectButton; - public LoadoutContainer(ProtoId proto, bool disabled, FormattedMessage? reason) + public LoadoutContainer(ProtoId proto, bool disabled, FormattedMessage? reason, string? dummy) { RobustXamlLoader.Load(this); IoCManager.InjectDependencies(this); @@ -34,20 +34,24 @@ public LoadoutContainer(ProtoId proto, bool disabled, Formatte SelectButton.TooltipSupplier = _ => tooltip; } - if (_protoManager.TryIndex(proto, out var loadProto)) + if (dummy != String.Empty) { - var ent = _entManager.System().GetFirstOrNull(loadProto); + LoadoutSprite(dummy, _entity); + } + else if (_protoManager.TryIndex(proto, out var loadProto)) + { + LoadoutSprite(_entManager.System().GetFirstOrNull(loadProto), _entity); + } - if (ent != null) - { - _entity = _entManager.SpawnEntity(ent, MapCoordinates.Nullspace); - Sprite.SetEntity(_entity); + } - var spriteTooltip = new Tooltip(); - spriteTooltip.SetMessage(FormattedMessage.FromUnformatted(_entManager.GetComponent(_entity.Value).EntityDescription)); - TooltipSupplier = _ => spriteTooltip; - } - } + private void LoadoutSprite(EntProtoId? proto, EntityUid? ent) + { + ent = _entManager.SpawnEntity(proto, MapCoordinates.Nullspace); + Sprite.SetEntity(ent); + var spriteTooltip = new Tooltip(); + spriteTooltip.SetMessage(FormattedMessage.FromUnformatted(_entManager.GetComponent(ent.Value).EntityDescription)); + TooltipSupplier = _ => spriteTooltip; } protected override void Dispose(bool disposing) diff --git a/Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml.cs b/Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml.cs index bc7cfc7f481ea6..802b13a8708e4f 100644 --- a/Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml.cs +++ b/Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml.cs @@ -69,14 +69,24 @@ public void RefreshLoadouts(HumanoidCharacterProfile profile, RoleLoadout loadou foreach (var loadoutProto in _groupProto.Loadouts) { + string loadoutDummy = String.Empty; + if (!protoMan.TryIndex(loadoutProto, out var loadProto)) continue; + if (protoMan.TryIndex(loadProto.Equipment, out var startingEntity)) + { + if (startingEntity.EntityDummy != null) + { + loadoutDummy = startingEntity.EntityDummy; + } + } + var matchingLoadout = selected.FirstOrDefault(e => e.Prototype == loadoutProto); var pressed = matchingLoadout != null; var enabled = loadout.IsValid(profile, session, loadoutProto, collection, out var reason); - var loadoutContainer = new LoadoutContainer(loadoutProto, !enabled, reason); + var loadoutContainer = new LoadoutContainer(loadoutProto, !enabled, reason, loadoutDummy); loadoutContainer.Select.Pressed = pressed; loadoutContainer.Text = loadoutSystem.GetName(loadProto); From 53278f1fc2681aa0837faa7b1be448083c05ca33 Mon Sep 17 00:00:00 2001 From: Doctor-Cpu <77215380+Doctor-Cpu@users.noreply.github.com> Date: Sat, 27 Jul 2024 09:53:45 +0100 Subject: [PATCH 03/14] show dummy in lobby --- Content.Client/Lobby/LobbyUIController.cs | 40 +++++++++++++++++++++-- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/Content.Client/Lobby/LobbyUIController.cs b/Content.Client/Lobby/LobbyUIController.cs index 824a842d560744..86ce6cbd06d47b 100644 --- a/Content.Client/Lobby/LobbyUIController.cs +++ b/Content.Client/Lobby/LobbyUIController.cs @@ -437,10 +437,42 @@ public void GiveDummyJobClothes(EntityUid dummy, HumanoidCharacterProfile profil public EntityUid LoadProfileEntity(HumanoidCharacterProfile? humanoid, JobPrototype? job, bool jobClothes) { EntityUid dummyEnt; + bool isDummy = false; if (humanoid is not null) { + job ??= GetPreferredJob(humanoid); + var jobLoadout = LoadoutSystem.GetJobPrototype(job.ID); + humanoid.Loadouts.TryGetValue(jobLoadout, out var loadoutValue); + var dummy = _prototypeManager.Index(humanoid.Species).DollPrototype; + + if (loadoutValue != null) + { + foreach (var group in loadoutValue.SelectedLoadouts) + { + foreach (var items in group.Value) + { + if (!_prototypeManager.TryIndex(items.Prototype, out var loadoutProto)) + { + continue; + } + + if (!_prototypeManager.TryIndex(loadoutProto.Equipment, out var equipment)) + { + continue; + } + + if (equipment.EntityDummy != String.Empty && equipment.EntityDummy != null) + { + isDummy = true; + dummy = equipment.EntityDummy; + break; + } + } + } + } + dummyEnt = EntityManager.SpawnEntity(dummy, MapCoordinates.Nullspace); } else @@ -448,11 +480,13 @@ public EntityUid LoadProfileEntity(HumanoidCharacterProfile? humanoid, JobProtot dummyEnt = EntityManager.SpawnEntity(_prototypeManager.Index(SharedHumanoidAppearanceSystem.DefaultSpecies).DollPrototype, MapCoordinates.Nullspace); } - _humanoid.LoadProfile(dummyEnt, humanoid); + if (!isDummy) + { + _humanoid.LoadProfile(dummyEnt, humanoid); + } - if (humanoid != null && jobClothes) + if (humanoid != null && jobClothes && job != null) { - job ??= GetPreferredJob(humanoid); GiveDummyJobClothes(dummyEnt, humanoid, job); if (_prototypeManager.HasIndex(LoadoutSystem.GetJobPrototype(job.ID))) From 7b00448f5625c5dcdff0a8658416d6aa0e62e14b Mon Sep 17 00:00:00 2001 From: Doctor-Cpu <77215380+Doctor-Cpu@users.noreply.github.com> Date: Sat, 27 Jul 2024 12:10:02 +0100 Subject: [PATCH 04/14] make loadout names english --- Resources/Locale/en-US/preferences/loadouts.ftl | 8 ++++++++ Resources/Prototypes/Entities/Mobs/Player/silicon.yml | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/Resources/Locale/en-US/preferences/loadouts.ftl b/Resources/Locale/en-US/preferences/loadouts.ftl index b6953c713b7ffc..aaf76f933b6045 100644 --- a/Resources/Locale/en-US/preferences/loadouts.ftl +++ b/Resources/Locale/en-US/preferences/loadouts.ftl @@ -5,3 +5,11 @@ loadouts-max-limit = Max count: {$count} loadouts-points-limit = Points: {$count} / {$max} loadouts-points-restriction = Insufficient points + +# Cyborg chassis +loadout-BorgGeneric = generic chassis +loadout-BorgMining = mining chassis +loadout-BorgEngineer = engineering chassis +loadout-BorgJanitor = janitor chassis +loadout-BorgMedical = medical chassis +loadout-BorgService = service chassis diff --git a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml index 580b9381a3ee42..4b42dc72409c95 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml @@ -34,6 +34,7 @@ - type: entity id: DummyBorgGeneric + noSpawn: true components: - type: Sprite sprite: Mobs/Silicon/chassis.rsi @@ -86,6 +87,7 @@ - type: entity id: DummyBorgMining + noSpawn: true components: - type: Sprite sprite: Mobs/Silicon/chassis.rsi @@ -139,6 +141,7 @@ - type: entity id: DummyBorgEngineer + noSpawn: true components: - type: Sprite sprite: Mobs/Silicon/chassis.rsi @@ -191,6 +194,7 @@ - type: entity id: DummyBorgJanitor + noSpawn: true components: - type: Sprite sprite: Mobs/Silicon/chassis.rsi @@ -244,6 +248,7 @@ - type: entity id: DummyBorgMedical + noSpawn: true components: - type: Sprite sprite: Mobs/Silicon/chassis.rsi @@ -297,6 +302,7 @@ - type: entity id: DummyBorgService + noSpawn: true components: - type: Sprite sprite: Mobs/Silicon/chassis.rsi From 6b42d188ac40757882222bba1d123dff6e30a65e Mon Sep 17 00:00:00 2001 From: Doctor-Cpu <77215380+Doctor-Cpu@users.noreply.github.com> Date: Sun, 28 Jul 2024 01:51:00 +0100 Subject: [PATCH 05/14] add rounstart modules --- Resources/Prototypes/Entities/Mobs/Player/silicon.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml index 4b42dc72409c95..ba121255b9d1b5 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml @@ -62,6 +62,7 @@ - PositronicBrain borg_module: - BorgModuleTool + - BorgModuleAppraisal - type: ItemSlots slots: cell_slot: @@ -116,6 +117,7 @@ - PositronicBrain borg_module: - BorgModuleTool + - BorgModuleConstruction - type: ItemSlots slots: cell_slot: @@ -169,6 +171,7 @@ - PositronicBrain borg_module: - BorgModuleTool + - BorgModuleCleaning - type: ItemSlots slots: cell_slot: @@ -223,6 +226,7 @@ - PositronicBrain borg_module: - BorgModuleTool + - BorgModuleTreatment - type: ItemSlots slots: cell_slot: @@ -277,6 +281,7 @@ - PositronicBrain borg_module: - BorgModuleTool + - BorgModuleService - type: ItemSlots slots: cell_slot: From eca31c8e28927b27ed8c4082828e557f5689a8ba Mon Sep 17 00:00:00 2001 From: Doctor-Cpu <77215380+Doctor-Cpu@users.noreply.github.com> Date: Tue, 6 Aug 2024 10:34:53 +0100 Subject: [PATCH 06/14] use new loadout system --- Content.Client/Lobby/LobbyUIController.cs | 9 ++----- .../UI/Loadouts/LoadoutGroupContainer.xaml.cs | 7 ++---- .../Station/Systems/StationSpawningSystem.cs | 9 +++---- .../Preferences/Loadouts/LoadoutPrototype.cs | 8 +++++++ Content.Shared/Roles/StartingGearPrototype.cs | 14 +++++++---- .../Prototypes/Loadouts/Jobs/Science/borg.yml | 24 ------------------- 6 files changed, 25 insertions(+), 46 deletions(-) diff --git a/Content.Client/Lobby/LobbyUIController.cs b/Content.Client/Lobby/LobbyUIController.cs index 23014f007366b3..6d3b201b652c78 100644 --- a/Content.Client/Lobby/LobbyUIController.cs +++ b/Content.Client/Lobby/LobbyUIController.cs @@ -475,15 +475,10 @@ public EntityUid LoadProfileEntity(HumanoidCharacterProfile? humanoid, JobProtot continue; } - if (!_prototypeManager.TryIndex(loadoutProto.Equipment, out var equipment)) - { - continue; - } - - if (equipment.EntityDummy != String.Empty && equipment.EntityDummy != null) + if (loadoutProto.EntityDummy != String.Empty && loadoutProto.EntityDummy != null) { isDummy = true; - dummy = equipment.EntityDummy; + dummy = loadoutProto.EntityDummy; break; } } diff --git a/Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml.cs b/Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml.cs index 802b13a8708e4f..29415bdcbdb590 100644 --- a/Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml.cs +++ b/Content.Client/Lobby/UI/Loadouts/LoadoutGroupContainer.xaml.cs @@ -74,12 +74,9 @@ public void RefreshLoadouts(HumanoidCharacterProfile profile, RoleLoadout loadou if (!protoMan.TryIndex(loadoutProto, out var loadProto)) continue; - if (protoMan.TryIndex(loadProto.Equipment, out var startingEntity)) + if (loadProto.EntityDummy != null) { - if (startingEntity.EntityDummy != null) - { - loadoutDummy = startingEntity.EntityDummy; - } + loadoutDummy = loadProto.EntityDummy; } var matchingLoadout = selected.FirstOrDefault(e => e.Prototype == loadoutProto); diff --git a/Content.Server/Station/Systems/StationSpawningSystem.cs b/Content.Server/Station/Systems/StationSpawningSystem.cs index ffae39dd49439c..6d045aeb902138 100644 --- a/Content.Server/Station/Systems/StationSpawningSystem.cs +++ b/Content.Server/Station/Systems/StationSpawningSystem.cs @@ -212,13 +212,10 @@ public EntityUid SpawnPlayerMob( { continue; } - if (!_prototypeManager.TryIndex(loadoutProto.Equipment, out var startingEntity)) - { - continue; - } - if (startingEntity.Entity != null) + + if (loadoutProto.Entity != null) { - var newEntity = SpawnEntity(startingEntity.Entity, coordinates, job); + var newEntity = SpawnEntity(loadoutProto.Entity, coordinates, job); EntityManager.DeleteEntity(entity); //entity isnt deleted before as the loadout is on this entity entity = newEntity; return entity.Value; diff --git a/Content.Shared/Preferences/Loadouts/LoadoutPrototype.cs b/Content.Shared/Preferences/Loadouts/LoadoutPrototype.cs index a570b61d89e442..86e4d7bcee47c2 100644 --- a/Content.Shared/Preferences/Loadouts/LoadoutPrototype.cs +++ b/Content.Shared/Preferences/Loadouts/LoadoutPrototype.cs @@ -31,6 +31,14 @@ public sealed partial class LoadoutPrototype : IPrototype, IEquipmentLoadout [DataField] public Dictionary Equipment { get; set; } = new(); + /// + [DataField] + public string? Entity { get; set; } + + /// + [DataField] + public string? EntityDummy { get; set; } + /// [DataField] public List Inhand { get; set; } = new(); diff --git a/Content.Shared/Roles/StartingGearPrototype.cs b/Content.Shared/Roles/StartingGearPrototype.cs index 69d0295dde149f..446da087ac57f3 100644 --- a/Content.Shared/Roles/StartingGearPrototype.cs +++ b/Content.Shared/Roles/StartingGearPrototype.cs @@ -24,6 +24,16 @@ public sealed partial class StartingGearPrototype : IPrototype, IInheritingProto [AlwaysPushInheritance] public Dictionary Equipment { get; set; } = new(); + /// + [DataField] + [AlwaysPushInheritance] + public string? Entity { get; set; } + + /// + [DataField] + [AlwaysPushInheritance] + public string? EntityDummy { get; set; } + /// [DataField] [AlwaysPushInheritance] @@ -48,16 +58,12 @@ public interface IEquipmentLoadout /// /// Overides the players entity /// - [DataField] - [AlwaysPushInheritance] public string? Entity { get; set; } /// /// Meant to be used in conjunction with Entity /// Entity to show as the players dummy in the lobby /// - [DataField] - [AlwaysPushInheritance] public string? EntityDummy { get; set; } /// diff --git a/Resources/Prototypes/Loadouts/Jobs/Science/borg.yml b/Resources/Prototypes/Loadouts/Jobs/Science/borg.yml index c72ec5f1adc99a..eb0604cdab00d2 100644 --- a/Resources/Prototypes/Loadouts/Jobs/Science/borg.yml +++ b/Resources/Prototypes/Loadouts/Jobs/Science/borg.yml @@ -1,53 +1,29 @@ - type: loadout - id: BorgGeneric - equipment: BorgGeneric - -- type: startingGear id: BorgGeneric entity: PlayerBorgGeneric entityDummy: DummyBorgGeneric - type: loadout - id: BorgMining - equipment: BorgMining - -- type: startingGear id: BorgMining entity: PlayerBorgMining entityDummy: DummyBorgMining - type: loadout - id: BorgEngineer - equipment: BorgEngineer - -- type: startingGear id: BorgEngineer entity: PlayerBorgEngineer entityDummy: DummyBorgEngineer - type: loadout - id: BorgJanitor - equipment: BorgJanitor - -- type: startingGear id: BorgJanitor entity: PlayerBorgJanitor entityDummy: DummyBorgJanitor - type: loadout - id: BorgMedical - equipment: BorgMedical - -- type: startingGear id: BorgMedical entity: PlayerBorgMedical entityDummy: DummyBorgMedical - type: loadout - id: BorgService - equipment: BorgService - -- type: startingGear id: BorgService entity: PlayerBorgService entityDummy: DummyBorgService From d3f7eaf815d304ac7c98eaf92543c78a7f4ceff4 Mon Sep 17 00:00:00 2001 From: Doctor-Cpu <77215380+Doctor-Cpu@users.noreply.github.com> Date: Tue, 6 Aug 2024 11:00:30 +0100 Subject: [PATCH 07/14] dont use a hacky method of the loadout name --- Content.Shared/Clothing/LoadoutSystem.cs | 7 ++++++- Resources/Locale/en-US/preferences/loadouts.ftl | 8 -------- Resources/Prototypes/Entities/Mobs/Player/silicon.yml | 6 ++++++ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Content.Shared/Clothing/LoadoutSystem.cs b/Content.Shared/Clothing/LoadoutSystem.cs index 7605845626e07a..1f1b59c69df3f1 100644 --- a/Content.Shared/Clothing/LoadoutSystem.cs +++ b/Content.Shared/Clothing/LoadoutSystem.cs @@ -106,11 +106,16 @@ public string GetName(IEquipmentLoadout? gear) if (gear == null) return string.Empty; + if (gear.EntityDummy != null && _protoMan.TryIndex(gear.EntityDummy, out var proto)) + { + return proto.Name; + } + var count = gear.Equipment.Count + gear.Storage.Values.Sum(o => o.Count) + gear.Inhand.Count; if (count == 1) { - if (gear.Equipment.Count == 1 && _protoMan.TryIndex(gear.Equipment.Values.First(), out var proto)) + if (gear.Equipment.Count == 1 && _protoMan.TryIndex(gear.Equipment.Values.First(), out proto)) { return proto.Name; } diff --git a/Resources/Locale/en-US/preferences/loadouts.ftl b/Resources/Locale/en-US/preferences/loadouts.ftl index aaf76f933b6045..b6953c713b7ffc 100644 --- a/Resources/Locale/en-US/preferences/loadouts.ftl +++ b/Resources/Locale/en-US/preferences/loadouts.ftl @@ -5,11 +5,3 @@ loadouts-max-limit = Max count: {$count} loadouts-points-limit = Points: {$count} / {$max} loadouts-points-restriction = Insufficient points - -# Cyborg chassis -loadout-BorgGeneric = generic chassis -loadout-BorgMining = mining chassis -loadout-BorgEngineer = engineering chassis -loadout-BorgJanitor = janitor chassis -loadout-BorgMedical = medical chassis -loadout-BorgService = service chassis diff --git a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml index ba121255b9d1b5..5a694bc6d919ae 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml @@ -34,6 +34,7 @@ - type: entity id: DummyBorgGeneric + name: generic chassis noSpawn: true components: - type: Sprite @@ -88,6 +89,7 @@ - type: entity id: DummyBorgMining + name: mining chassis noSpawn: true components: - type: Sprite @@ -143,6 +145,7 @@ - type: entity id: DummyBorgEngineer + name: engineering chassis noSpawn: true components: - type: Sprite @@ -197,6 +200,7 @@ - type: entity id: DummyBorgJanitor + name: janitor chassis noSpawn: true components: - type: Sprite @@ -252,6 +256,7 @@ - type: entity id: DummyBorgMedical + name: medical chassis noSpawn: true components: - type: Sprite @@ -307,6 +312,7 @@ - type: entity id: DummyBorgService + name: service chassis noSpawn: true components: - type: Sprite From a6ed9cb498abc8d7017806c41163ec10f9adcc7a Mon Sep 17 00:00:00 2001 From: Doctor-Cpu <77215380+Doctor-Cpu@users.noreply.github.com> Date: Fri, 9 Aug 2024 08:18:41 +0100 Subject: [PATCH 08/14] move to LoadoutPrototype --- Content.Shared/Clothing/LoadoutSystem.cs | 10 +++++---- .../Preferences/Loadouts/LoadoutPrototype.cs | 15 ++++++++----- Content.Shared/Roles/StartingGearPrototype.cs | 21 ------------------- 3 files changed, 16 insertions(+), 30 deletions(-) diff --git a/Content.Shared/Clothing/LoadoutSystem.cs b/Content.Shared/Clothing/LoadoutSystem.cs index 1f1b59c69df3f1..f5f7a588adf005 100644 --- a/Content.Shared/Clothing/LoadoutSystem.cs +++ b/Content.Shared/Clothing/LoadoutSystem.cs @@ -92,21 +92,23 @@ public string GetName(LoadoutPrototype loadout) { if (_protoMan.TryIndex(loadout.StartingGear, out var gear)) { - return GetName(gear); + return GetName(gear, loadout); } - return GetName((IEquipmentLoadout) loadout); + return GetName((IEquipmentLoadout) loadout, loadout); } /// /// Tries to get the name of a loadout. /// - public string GetName(IEquipmentLoadout? gear) + public string GetName(IEquipmentLoadout? gear, LoadoutPrototype? loadout = null) { if (gear == null) return string.Empty; - if (gear.EntityDummy != null && _protoMan.TryIndex(gear.EntityDummy, out var proto)) + if (loadout != null + && loadout.EntityDummy != null + && _protoMan.TryIndex(loadout.EntityDummy, out var proto)) { return proto.Name; } diff --git a/Content.Shared/Preferences/Loadouts/LoadoutPrototype.cs b/Content.Shared/Preferences/Loadouts/LoadoutPrototype.cs index 86e4d7bcee47c2..1c310f886983ca 100644 --- a/Content.Shared/Preferences/Loadouts/LoadoutPrototype.cs +++ b/Content.Shared/Preferences/Loadouts/LoadoutPrototype.cs @@ -27,17 +27,22 @@ public sealed partial class LoadoutPrototype : IPrototype, IEquipmentLoadout [DataField] public List Effects = new(); - /// + /// + /// Overides the players entity + /// [DataField] - public Dictionary Equipment { get; set; } = new(); + public string? Entity { get; set; } - /// + /// + /// Meant to be used in conjunction with Entity + /// Entity to show as the players dummy in the lobby + /// [DataField] - public string? Entity { get; set; } + public string? EntityDummy { get; set; } /// [DataField] - public string? EntityDummy { get; set; } + public Dictionary Equipment { get; set; } = new(); /// [DataField] diff --git a/Content.Shared/Roles/StartingGearPrototype.cs b/Content.Shared/Roles/StartingGearPrototype.cs index 446da087ac57f3..b0a4b94e550bf5 100644 --- a/Content.Shared/Roles/StartingGearPrototype.cs +++ b/Content.Shared/Roles/StartingGearPrototype.cs @@ -24,16 +24,6 @@ public sealed partial class StartingGearPrototype : IPrototype, IInheritingProto [AlwaysPushInheritance] public Dictionary Equipment { get; set; } = new(); - /// - [DataField] - [AlwaysPushInheritance] - public string? Entity { get; set; } - - /// - [DataField] - [AlwaysPushInheritance] - public string? EntityDummy { get; set; } - /// [DataField] [AlwaysPushInheritance] @@ -55,17 +45,6 @@ public interface IEquipmentLoadout /// public Dictionary Equipment { get; set; } - /// - /// Overides the players entity - /// - public string? Entity { get; set; } - - /// - /// Meant to be used in conjunction with Entity - /// Entity to show as the players dummy in the lobby - /// - public string? EntityDummy { get; set; } - /// /// The inhand items that are equipped when this starting gear is equipped onto an entity. /// From 9f9adc28223b7e70d32c923916988248f4f4da02 Mon Sep 17 00:00:00 2001 From: Doctor-Cpu <77215380+Doctor-Cpu@users.noreply.github.com> Date: Fri, 9 Aug 2024 08:21:08 +0100 Subject: [PATCH 09/14] = null --- Content.Shared/Clothing/LoadoutSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Shared/Clothing/LoadoutSystem.cs b/Content.Shared/Clothing/LoadoutSystem.cs index f5f7a588adf005..3ca5a64821f755 100644 --- a/Content.Shared/Clothing/LoadoutSystem.cs +++ b/Content.Shared/Clothing/LoadoutSystem.cs @@ -101,7 +101,7 @@ public string GetName(LoadoutPrototype loadout) /// /// Tries to get the name of a loadout. /// - public string GetName(IEquipmentLoadout? gear, LoadoutPrototype? loadout = null) + public string GetName(IEquipmentLoadout? gear, LoadoutPrototype? loadout) { if (gear == null) return string.Empty; From 7763ea1f52f52fb11cc2bfc5af14f4f2ae3b1ccd Mon Sep 17 00:00:00 2001 From: Doctor-Cpu <77215380+Doctor-Cpu@users.noreply.github.com> Date: Fri, 9 Aug 2024 10:38:41 +0100 Subject: [PATCH 10/14] re arange spawning logic --- .../Station/Systems/StationSpawningSystem.cs | 82 ++++++++++--------- 1 file changed, 44 insertions(+), 38 deletions(-) diff --git a/Content.Server/Station/Systems/StationSpawningSystem.cs b/Content.Server/Station/Systems/StationSpawningSystem.cs index 6d045aeb902138..58d6b219b87224 100644 --- a/Content.Server/Station/Systems/StationSpawningSystem.cs +++ b/Content.Server/Station/Systems/StationSpawningSystem.cs @@ -159,6 +159,33 @@ public EntityUid SpawnPlayerMob( return jobEntity; } + RoleLoadout? loadout = null; + var jobLoadout = LoadoutSystem.GetJobPrototype(prototype?.ID); + _prototypeManager.TryIndex(jobLoadout, out RoleLoadoutPrototype? roleProto); + profile?.Loadouts.TryGetValue(jobLoadout, out loadout); + + if (loadout != null && roleProto != null) + { + foreach (var group in loadout.SelectedLoadouts.OrderBy(x => roleProto.Groups.FindIndex(e => e == x.Key))) + { + foreach (var items in group.Value) + { + if (!_prototypeManager.TryIndex(items.Prototype, out var loadoutProto)) + { + continue; + } + + if (loadoutProto.Entity != null) + { + var newEntity = SpawnEntity(loadoutProto.Entity, coordinates, job); + EquipLoadout(newEntity, jobLoadout, loadout, roleProto, prototype, profile); + EntityManager.DeleteEntity(entity); + return newEntity; + } + } + } + } + string speciesId; if (_randomizeCharacters) { @@ -185,13 +212,8 @@ public EntityUid SpawnPlayerMob( profile = HumanoidCharacterProfile.RandomWithSpecies(speciesId); } - var jobLoadout = LoadoutSystem.GetJobPrototype(prototype?.ID); - - RoleLoadout? loadout = null; - if (_prototypeManager.TryIndex(jobLoadout, out RoleLoadoutPrototype? roleProto)) + if (roleProto != null) { - profile?.Loadouts.TryGetValue(jobLoadout, out loadout); - // Set to default if not present if (loadout == null) { @@ -199,40 +221,9 @@ public EntityUid SpawnPlayerMob( loadout.SetDefault(profile, _actors.GetSession(entity), _prototypeManager); } - EquipRoleLoadout(entity.Value, loadout, roleProto); + EquipLoadout(entity.Value, jobLoadout, loadout, roleProto, prototype, profile); } - if (loadout != null && roleProto != null) - { - foreach (var group in loadout.SelectedLoadouts.OrderBy(x => roleProto.Groups.FindIndex(e => e == x.Key))) - { - foreach (var items in group.Value) - { - if (!_prototypeManager.TryIndex(items.Prototype, out var loadoutProto)) - { - continue; - } - - if (loadoutProto.Entity != null) - { - var newEntity = SpawnEntity(loadoutProto.Entity, coordinates, job); - EntityManager.DeleteEntity(entity); //entity isnt deleted before as the loadout is on this entity - entity = newEntity; - return entity.Value; - } - } - } - } - - if (prototype?.StartingGear != null) - { - var startingGear = _prototypeManager.Index(prototype.StartingGear); - EquipStartingGear(entity.Value, startingGear, raiseEvent: false); - } - - var gearEquippedEv = new StartingGearEquippedEvent(entity.Value); - RaiseLocalEvent(entity.Value, ref gearEquippedEv); - if (profile != null) { if (prototype != null) @@ -259,6 +250,21 @@ private EntityUid SpawnEntity(string prototype, EntityCoordinates coordinates, J return entity; } + private void EquipLoadout(EntityUid entity, string jobLoadout, RoleLoadout loadout, RoleLoadoutPrototype roleProto, JobPrototype? prototype, HumanoidCharacterProfile? profile) + { + if (prototype?.StartingGear != null) + { + var startingGear = _prototypeManager.Index(prototype.StartingGear); + EquipStartingGear(entity, startingGear, raiseEvent: false); + } + + EquipRoleLoadout(entity, loadout, roleProto); + + var gearEquippedEv = new StartingGearEquippedEvent(entity); + RaiseLocalEvent(entity, ref gearEquippedEv); + + } + private void DoJobSpecials(JobComponent? job, EntityUid entity) { if (!_prototypeManager.TryIndex(job?.Prototype ?? string.Empty, out JobPrototype? prototype)) From 858faea7af57d54c16b20330f462f5e639e420d9 Mon Sep 17 00:00:00 2001 From: Doctor-Cpu <77215380+Doctor-Cpu@users.noreply.github.com> Date: Tue, 20 Aug 2024 23:53:10 +0100 Subject: [PATCH 11/14] apply role loadouts before starting gear --- Content.Server/Station/Systems/StationSpawningSystem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Server/Station/Systems/StationSpawningSystem.cs b/Content.Server/Station/Systems/StationSpawningSystem.cs index 58d6b219b87224..b7a6e1fb5c2e46 100644 --- a/Content.Server/Station/Systems/StationSpawningSystem.cs +++ b/Content.Server/Station/Systems/StationSpawningSystem.cs @@ -252,14 +252,14 @@ private EntityUid SpawnEntity(string prototype, EntityCoordinates coordinates, J private void EquipLoadout(EntityUid entity, string jobLoadout, RoleLoadout loadout, RoleLoadoutPrototype roleProto, JobPrototype? prototype, HumanoidCharacterProfile? profile) { + EquipRoleLoadout(entity, loadout, roleProto); + if (prototype?.StartingGear != null) { var startingGear = _prototypeManager.Index(prototype.StartingGear); EquipStartingGear(entity, startingGear, raiseEvent: false); } - EquipRoleLoadout(entity, loadout, roleProto); - var gearEquippedEv = new StartingGearEquippedEvent(entity); RaiseLocalEvent(entity, ref gearEquippedEv); From 1a2bf36d58a81b5dab330ee0f9fcd1956815931a Mon Sep 17 00:00:00 2001 From: Doctor-Cpu <77215380+Doctor-Cpu@users.noreply.github.com> Date: Mon, 2 Sep 2024 15:18:37 +0100 Subject: [PATCH 12/14] clean up borg yml --- .../Entities/Mobs/Player/silicon.yml | 215 ++++-------------- 1 file changed, 44 insertions(+), 171 deletions(-) diff --git a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml index de2b57c2be5daa..6621025cb71447 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml @@ -314,16 +314,14 @@ # Borgs - type: entity - id: PlayerBorgGeneric - parent: BorgChassisGeneric - suffix: Battery, Tools + id: BasePlayerBorgBattery + suffix: Battery + abstract: true components: - type: ContainerFill containers: borg_brain: - - PositronicBrain - borg_module: - - BorgModuleTool + - MMIFilled - type: ItemSlots slots: cell_slot: @@ -334,18 +332,19 @@ - type: entity id: PlayerBorgGenericBattery - parent: BorgChassisGeneric - suffix: Battery + parent: [ BasePlayerBorgBattery, BorgChassisGeneric ] + +- type: entity + id: PlayerBorgGeneric + parent: PlayerBorgGenericBattery + suffix: Battery, Tools components: - type: ContainerFill containers: borg_brain: - - MMIFilled - - type: ItemSlots - slots: - cell_slot: - name: power-cell-slot-component-slot-name-default - startingItem: PowerCellMedium + - PositronicBrain + borg_module: + - BorgModuleTool - type: entity id: DummyBorgGeneric @@ -358,18 +357,16 @@ noRot: true layers: - state: robot - - state: robot_e_r - map: ["enum.BorgVisualLayers.Light"] + - state: robot_e shader: unshaded - visible: false - - state: robot_l - shader: unshaded - map: ["light"] - visible: false + +- type: entity + id: PlayerBorgMiningBattery + parent: [ BasePlayerBorgBattery, BorgChassisMining ] - type: entity id: PlayerBorgMining - parent: BorgChassisMining + parent: PlayerBorgMiningBattery suffix: Battery, Tools components: - type: ContainerFill @@ -379,28 +376,6 @@ borg_module: - BorgModuleTool - BorgModuleAppraisal - - type: ItemSlots - slots: - cell_slot: - name: power-cell-slot-component-slot-name-default - startingItem: PowerCellMedium - - type: RandomMetadata - nameSegments: [names_borg] - -- type: entity - id: PlayerBorgMiningBattery - parent: BorgChassisMining - suffix: Battery - components: - - type: ContainerFill - containers: - borg_brain: - - MMIFilled - - type: ItemSlots - slots: - cell_slot: - name: power-cell-slot-component-slot-name-default - startingItem: PowerCellMedium - type: entity id: DummyBorgMining @@ -414,18 +389,16 @@ layers: - state: miner map: ["movement"] - - state: miner_e_r - map: ["enum.BorgVisualLayers.Light"] + - state: miner_e shader: unshaded - visible: false - - state: miner_l - shader: unshaded - map: ["light"] - visible: false + +- type: entity + id: PlayerBorgEngineerBattery + parent: [ BasePlayerBorgBattery, BorgChassisEngineer ] - type: entity id: PlayerBorgEngineer - parent: BorgChassisEngineer + parent: PlayerBorgEngineerBattery suffix: Battery, Tools components: - type: ContainerFill @@ -435,28 +408,6 @@ borg_module: - BorgModuleTool - BorgModuleConstruction - - type: ItemSlots - slots: - cell_slot: - name: power-cell-slot-component-slot-name-default - startingItem: PowerCellMedium - - type: RandomMetadata - nameSegments: [names_borg] - -- type: entity - id: PlayerBorgEngineerBattery - parent: BorgChassisEngineer - suffix: Battery - components: - - type: ContainerFill - containers: - borg_brain: - - MMIFilled - - type: ItemSlots - slots: - cell_slot: - name: power-cell-slot-component-slot-name-default - startingItem: PowerCellMedium - type: entity id: DummyBorgEngineer @@ -469,18 +420,16 @@ noRot: true layers: - state: engineer - - state: engineer_e_r - map: ["enum.BorgVisualLayers.Light"] + - state: engineer_e shader: unshaded - visible: false - - state: engineer_l - shader: unshaded - map: ["light"] - visible: false + +- type: entity + id: PlayerBorgJanitorBattery + parent: [ BasePlayerBorgBattery, BorgChassisJanitor ] - type: entity id: PlayerBorgJanitor - parent: BorgChassisJanitor + parent: PlayerBorgJanitorBattery suffix: Battery, Tools components: - type: ContainerFill @@ -490,28 +439,6 @@ borg_module: - BorgModuleTool - BorgModuleCleaning - - type: ItemSlots - slots: - cell_slot: - name: power-cell-slot-component-slot-name-default - startingItem: PowerCellMedium - - type: RandomMetadata - nameSegments: [names_borg] - -- type: entity - id: PlayerBorgJanitorBattery - parent: BorgChassisJanitor - suffix: Battery - components: - - type: ContainerFill - containers: - borg_brain: - - MMIFilled - - type: ItemSlots - slots: - cell_slot: - name: power-cell-slot-component-slot-name-default - startingItem: PowerCellMedium - type: entity id: DummyBorgJanitor @@ -525,18 +452,16 @@ layers: - state: janitor map: ["movement"] - - state: janitor_e_r - map: ["enum.BorgVisualLayers.Light"] - shader: unshaded - visible: false - - state: janitor_l + - state: janitor_e shader: unshaded - map: ["light"] - visible: false + +- type: entity + id: PlayerBorgMedicalBattery + parent: [ BasePlayerBorgBattery, BorgChassisMedical ] - type: entity id: PlayerBorgMedical - parent: BorgChassisMedical + parent: PlayerBorgMedicalBattery suffix: Battery, Tools components: - type: ContainerFill @@ -546,28 +471,6 @@ borg_module: - BorgModuleTool - BorgModuleTreatment - - type: ItemSlots - slots: - cell_slot: - name: power-cell-slot-component-slot-name-default - startingItem: PowerCellMedium - - type: RandomMetadata - nameSegments: [names_borg] - -- type: entity - id: PlayerBorgMedicalBattery - parent: BorgChassisMedical - suffix: Battery - components: - - type: ContainerFill - containers: - borg_brain: - - MMIFilled - - type: ItemSlots - slots: - cell_slot: - name: power-cell-slot-component-slot-name-default - startingItem: PowerCellMedium - type: entity id: DummyBorgMedical @@ -581,18 +484,16 @@ layers: - state: medical map: ["movement"] - - state: medical_e_r - map: ["enum.BorgVisualLayers.Light"] - shader: unshaded - visible: false - - state: medical_l + - state: medical_e shader: unshaded - map: ["light"] - visible: false + +- type: entity + id: PlayerBorgServiceBattery + parent: [ BasePlayerBorgBattery, BorgChassisService ] - type: entity id: PlayerBorgService - parent: BorgChassisService + parent: PlayerBorgServiceBattery suffix: Battery, Tools components: - type: ContainerFill @@ -602,28 +503,6 @@ borg_module: - BorgModuleTool - BorgModuleService - - type: ItemSlots - slots: - cell_slot: - name: power-cell-slot-component-slot-name-default - startingItem: PowerCellMedium - - type: RandomMetadata - nameSegments: [names_borg] - -- type: entity - id: PlayerBorgServiceBattery - parent: BorgChassisService - suffix: Battery - components: - - type: ContainerFill - containers: - borg_brain: - - MMIFilled - - type: ItemSlots - slots: - cell_slot: - name: power-cell-slot-component-slot-name-default - startingItem: PowerCellMedium - type: entity id: DummyBorgService @@ -636,14 +515,8 @@ noRot: true layers: - state: service - - state: service_e_r - map: ["enum.BorgVisualLayers.Light"] - shader: unshaded - visible: false - - state: service_l + - state: service_e shader: unshaded - map: ["light"] - visible: false - type: entity id: PlayerBorgSyndicateAssaultBattery From 7f9c8475618d802d6aae8bac5dd5f7cb799ee817 Mon Sep 17 00:00:00 2001 From: Doctor-Cpu <77215380+Doctor-Cpu@users.noreply.github.com> Date: Mon, 2 Sep 2024 15:24:42 +0100 Subject: [PATCH 13/14] no mmi --- Resources/Prototypes/Entities/Mobs/Player/silicon.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml index 6621025cb71447..c1ff7601fdbfe7 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml @@ -321,7 +321,7 @@ - type: ContainerFill containers: borg_brain: - - MMIFilled + - PositronicBrain - type: ItemSlots slots: cell_slot: From 21a37cbdd56f12d2cee6e7366cce1f457a01747b Mon Sep 17 00:00:00 2001 From: Doctor-Cpu <77215380+Doctor-Cpu@users.noreply.github.com> Date: Fri, 20 Sep 2024 06:00:12 +0100 Subject: [PATCH 14/14] remove nospawn --- .../Prototypes/Entities/Mobs/Player/silicon.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml index 6bb42b6afe1a6f..0d3816f16374e4 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml @@ -436,7 +436,7 @@ - type: entity id: DummyBorgGeneric name: generic chassis - noSpawn: true + categories: [ HideSpawnMenu ] components: - type: Sprite sprite: Mobs/Silicon/chassis.rsi @@ -467,7 +467,7 @@ - type: entity id: DummyBorgMining name: mining chassis - noSpawn: true + categories: [ HideSpawnMenu ] components: - type: Sprite sprite: Mobs/Silicon/chassis.rsi @@ -499,7 +499,7 @@ - type: entity id: DummyBorgEngineer name: engineering chassis - noSpawn: true + categories: [ HideSpawnMenu ] components: - type: Sprite sprite: Mobs/Silicon/chassis.rsi @@ -530,7 +530,7 @@ - type: entity id: DummyBorgJanitor name: janitor chassis - noSpawn: true + categories: [ HideSpawnMenu ] components: - type: Sprite sprite: Mobs/Silicon/chassis.rsi @@ -562,7 +562,7 @@ - type: entity id: DummyBorgMedical name: medical chassis - noSpawn: true + categories: [ HideSpawnMenu ] components: - type: Sprite sprite: Mobs/Silicon/chassis.rsi @@ -594,7 +594,7 @@ - type: entity id: DummyBorgService name: service chassis - noSpawn: true + categories: [ HideSpawnMenu ] components: - type: Sprite sprite: Mobs/Silicon/chassis.rsi