Give every job their fancy ID types.
This commit is contained in:
@@ -38,7 +38,7 @@ namespace Content.IntegrationTests.Tests
|
||||
|
||||
human = entityMan.SpawnEntity("HumanMob_Content", 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);
|
||||
var tooBigItem = entityMan.SpawnEntity("RedToolboxItem", MapCoordinates.Nullspace);
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ using Content.Server.Mobs;
|
||||
using Content.Server.Mobs.Roles;
|
||||
using Content.Server.Players;
|
||||
using Content.Shared;
|
||||
using Content.Shared.GameObjects.Components.Inventory;
|
||||
using Content.Shared.Jobs;
|
||||
using Content.Shared.Preferences;
|
||||
using Robust.Server.Interfaces.Maps;
|
||||
@@ -39,6 +38,7 @@ using Robust.Shared.Timers;
|
||||
using Robust.Shared.Timing;
|
||||
using Robust.Shared.Utility;
|
||||
using Robust.Shared.ViewVariables;
|
||||
using static Content.Shared.GameObjects.Components.Inventory.EquipmentSlotDefines;
|
||||
|
||||
namespace Content.Server.GameTicking
|
||||
{
|
||||
@@ -481,10 +481,14 @@ namespace Content.Server.GameTicking
|
||||
|
||||
private void EquipIdCard(IEntity mob, string characterName, JobPrototype jobPrototype)
|
||||
{
|
||||
var card = _entityManager.SpawnEntity("IDCardStandard", mob.Transform.GridPosition);
|
||||
|
||||
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>();
|
||||
cardComponent.FullName = characterName;
|
||||
|
||||
@@ -15,3 +15,4 @@
|
||||
innerclothing: UniformCargoTech
|
||||
backpack: BackpackClothing
|
||||
shoes: ShoesBlack
|
||||
idcard: CargoIDCard
|
||||
|
||||
@@ -17,4 +17,5 @@
|
||||
innerclothing: UniformAssistant
|
||||
backpack: BackpackClothing
|
||||
shoes: ShoesBlack
|
||||
idcard: AssistantIDCard
|
||||
|
||||
|
||||
@@ -16,3 +16,4 @@
|
||||
shoes: ShoesClown
|
||||
mask: MaskClown
|
||||
pocket1: BikeHorn
|
||||
idcard: ClownIDCard
|
||||
|
||||
@@ -19,3 +19,4 @@
|
||||
backpack: BackpackClothing
|
||||
shoes: ShoesGaloshes
|
||||
head: HatPurplesoft
|
||||
idcard: JanitorIDCard
|
||||
|
||||
@@ -33,3 +33,4 @@
|
||||
eyes: SunGlasses
|
||||
gloves: GlovesCaptain
|
||||
outerclothing: OuterclothingCaparmor
|
||||
idcard: CaptainIDCard
|
||||
|
||||
@@ -26,3 +26,4 @@
|
||||
backpack: BackpackClothing
|
||||
shoes: ShoesBrown
|
||||
head: HatHopcap
|
||||
idcard: HoPIDCard
|
||||
|
||||
@@ -22,3 +22,4 @@
|
||||
innerclothing: UniformChiefEngineer
|
||||
backpack: BackpackEngineering
|
||||
shoes: ShoesBrown
|
||||
idcard: CEIDCard
|
||||
|
||||
@@ -20,3 +20,4 @@
|
||||
backpack: BackpackEngineering
|
||||
shoes: ShoesWorkboots
|
||||
outerclothing: OuterclothingHazard
|
||||
idcard: EngineeringIDCard
|
||||
|
||||
@@ -23,3 +23,4 @@
|
||||
backpack: BackpackMedical
|
||||
shoes: ShoesBrown
|
||||
outerclothing: OuterclothingLabcoatcmo
|
||||
idcard: CMOIDCard
|
||||
|
||||
@@ -19,3 +19,4 @@
|
||||
backpack: BackpackMedical
|
||||
shoes: ShoesWhite
|
||||
outerclothing: OuterclothingLabcoatmedspecopen
|
||||
idcard: MedicalIDCard
|
||||
|
||||
@@ -21,3 +21,4 @@
|
||||
backpack: BackpackClothing
|
||||
shoes: ShoesBrown
|
||||
outerclothing: OuterclothingLabcoatgenopen
|
||||
idcard: RDIDCard
|
||||
|
||||
@@ -19,3 +19,4 @@
|
||||
backpack: BackpackClothing
|
||||
shoes: ShoesWhite
|
||||
outerclothing: OuterclothingLabcoattoxopen
|
||||
idcard: ResearchIDCard
|
||||
|
||||
@@ -24,3 +24,4 @@
|
||||
outerclothing: OuterclothingHoSTrenchcoat
|
||||
eyes: SecGlasses
|
||||
head: HatBeretHoS
|
||||
idcard: HoSIDCard
|
||||
|
||||
@@ -21,3 +21,4 @@
|
||||
shoes: ShoesJackboots
|
||||
eyes: SecGlasses
|
||||
outerclothing: OuterclothingArmorsec
|
||||
idcard: SecurityIDCard
|
||||
|
||||
Reference in New Issue
Block a user