Give every job their fancy ID types.

This commit is contained in:
Pieter-Jan Briers
2020-02-24 16:58:25 +01:00
parent 15fa417a4f
commit 58ab7631c2
16 changed files with 23 additions and 5 deletions

View File

@@ -38,7 +38,7 @@ namespace Content.IntegrationTests.Tests
human = entityMan.SpawnEntity("HumanMob_Content", MapCoordinates.Nullspace); human = entityMan.SpawnEntity("HumanMob_Content", MapCoordinates.Nullspace);
uniform = entityMan.SpawnEntity("JanitorUniform", MapCoordinates.Nullspace); uniform = entityMan.SpawnEntity("JanitorUniform", MapCoordinates.Nullspace);
idCard = entityMan.SpawnEntity("IDCardStandard", MapCoordinates.Nullspace); idCard = entityMan.SpawnEntity("AssistantIDCard", MapCoordinates.Nullspace);
pocketItem = entityMan.SpawnEntity("FlashlightLantern", MapCoordinates.Nullspace); pocketItem = entityMan.SpawnEntity("FlashlightLantern", MapCoordinates.Nullspace);
var tooBigItem = entityMan.SpawnEntity("RedToolboxItem", MapCoordinates.Nullspace); var tooBigItem = entityMan.SpawnEntity("RedToolboxItem", MapCoordinates.Nullspace);

View File

@@ -13,7 +13,6 @@ using Content.Server.Mobs;
using Content.Server.Mobs.Roles; using Content.Server.Mobs.Roles;
using Content.Server.Players; using Content.Server.Players;
using Content.Shared; using Content.Shared;
using Content.Shared.GameObjects.Components.Inventory;
using Content.Shared.Jobs; using Content.Shared.Jobs;
using Content.Shared.Preferences; using Content.Shared.Preferences;
using Robust.Server.Interfaces.Maps; using Robust.Server.Interfaces.Maps;
@@ -39,6 +38,7 @@ using Robust.Shared.Timers;
using Robust.Shared.Timing; using Robust.Shared.Timing;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using Robust.Shared.ViewVariables; using Robust.Shared.ViewVariables;
using static Content.Shared.GameObjects.Components.Inventory.EquipmentSlotDefines;
namespace Content.Server.GameTicking namespace Content.Server.GameTicking
{ {
@@ -481,10 +481,14 @@ namespace Content.Server.GameTicking
private void EquipIdCard(IEntity mob, string characterName, JobPrototype jobPrototype) private void EquipIdCard(IEntity mob, string characterName, JobPrototype jobPrototype)
{ {
var card = _entityManager.SpawnEntity("IDCardStandard", mob.Transform.GridPosition);
var inventory = mob.GetComponent<InventoryComponent>(); var inventory = mob.GetComponent<InventoryComponent>();
inventory.Equip(EquipmentSlotDefines.Slots.IDCARD, card.GetComponent<ClothingComponent>());
if (!inventory.TryGetSlotItem(Slots.IDCARD, out ItemComponent cardItem))
{
return;
}
var card = cardItem.Owner;
var cardComponent = card.GetComponent<IdCardComponent>(); var cardComponent = card.GetComponent<IdCardComponent>();
cardComponent.FullName = characterName; cardComponent.FullName = characterName;

View File

@@ -15,3 +15,4 @@
innerclothing: UniformCargoTech innerclothing: UniformCargoTech
backpack: BackpackClothing backpack: BackpackClothing
shoes: ShoesBlack shoes: ShoesBlack
idcard: CargoIDCard

View File

@@ -17,4 +17,5 @@
innerclothing: UniformAssistant innerclothing: UniformAssistant
backpack: BackpackClothing backpack: BackpackClothing
shoes: ShoesBlack shoes: ShoesBlack
idcard: AssistantIDCard

View File

@@ -16,3 +16,4 @@
shoes: ShoesClown shoes: ShoesClown
mask: MaskClown mask: MaskClown
pocket1: BikeHorn pocket1: BikeHorn
idcard: ClownIDCard

View File

@@ -19,3 +19,4 @@
backpack: BackpackClothing backpack: BackpackClothing
shoes: ShoesGaloshes shoes: ShoesGaloshes
head: HatPurplesoft head: HatPurplesoft
idcard: JanitorIDCard

View File

@@ -33,3 +33,4 @@
eyes: SunGlasses eyes: SunGlasses
gloves: GlovesCaptain gloves: GlovesCaptain
outerclothing: OuterclothingCaparmor outerclothing: OuterclothingCaparmor
idcard: CaptainIDCard

View File

@@ -26,3 +26,4 @@
backpack: BackpackClothing backpack: BackpackClothing
shoes: ShoesBrown shoes: ShoesBrown
head: HatHopcap head: HatHopcap
idcard: HoPIDCard

View File

@@ -22,3 +22,4 @@
innerclothing: UniformChiefEngineer innerclothing: UniformChiefEngineer
backpack: BackpackEngineering backpack: BackpackEngineering
shoes: ShoesBrown shoes: ShoesBrown
idcard: CEIDCard

View File

@@ -20,3 +20,4 @@
backpack: BackpackEngineering backpack: BackpackEngineering
shoes: ShoesWorkboots shoes: ShoesWorkboots
outerclothing: OuterclothingHazard outerclothing: OuterclothingHazard
idcard: EngineeringIDCard

View File

@@ -23,3 +23,4 @@
backpack: BackpackMedical backpack: BackpackMedical
shoes: ShoesBrown shoes: ShoesBrown
outerclothing: OuterclothingLabcoatcmo outerclothing: OuterclothingLabcoatcmo
idcard: CMOIDCard

View File

@@ -19,3 +19,4 @@
backpack: BackpackMedical backpack: BackpackMedical
shoes: ShoesWhite shoes: ShoesWhite
outerclothing: OuterclothingLabcoatmedspecopen outerclothing: OuterclothingLabcoatmedspecopen
idcard: MedicalIDCard

View File

@@ -21,3 +21,4 @@
backpack: BackpackClothing backpack: BackpackClothing
shoes: ShoesBrown shoes: ShoesBrown
outerclothing: OuterclothingLabcoatgenopen outerclothing: OuterclothingLabcoatgenopen
idcard: RDIDCard

View File

@@ -19,3 +19,4 @@
backpack: BackpackClothing backpack: BackpackClothing
shoes: ShoesWhite shoes: ShoesWhite
outerclothing: OuterclothingLabcoattoxopen outerclothing: OuterclothingLabcoattoxopen
idcard: ResearchIDCard

View File

@@ -24,3 +24,4 @@
outerclothing: OuterclothingHoSTrenchcoat outerclothing: OuterclothingHoSTrenchcoat
eyes: SecGlasses eyes: SecGlasses
head: HatBeretHoS head: HatBeretHoS
idcard: HoSIDCard

View File

@@ -21,3 +21,4 @@
shoes: ShoesJackboots shoes: ShoesJackboots
eyes: SecGlasses eyes: SecGlasses
outerclothing: OuterclothingArmorsec outerclothing: OuterclothingArmorsec
idcard: SecurityIDCard