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);
|
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);
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -15,3 +15,4 @@
|
|||||||
innerclothing: UniformCargoTech
|
innerclothing: UniformCargoTech
|
||||||
backpack: BackpackClothing
|
backpack: BackpackClothing
|
||||||
shoes: ShoesBlack
|
shoes: ShoesBlack
|
||||||
|
idcard: CargoIDCard
|
||||||
|
|||||||
@@ -17,4 +17,5 @@
|
|||||||
innerclothing: UniformAssistant
|
innerclothing: UniformAssistant
|
||||||
backpack: BackpackClothing
|
backpack: BackpackClothing
|
||||||
shoes: ShoesBlack
|
shoes: ShoesBlack
|
||||||
|
idcard: AssistantIDCard
|
||||||
|
|
||||||
|
|||||||
@@ -16,3 +16,4 @@
|
|||||||
shoes: ShoesClown
|
shoes: ShoesClown
|
||||||
mask: MaskClown
|
mask: MaskClown
|
||||||
pocket1: BikeHorn
|
pocket1: BikeHorn
|
||||||
|
idcard: ClownIDCard
|
||||||
|
|||||||
@@ -19,3 +19,4 @@
|
|||||||
backpack: BackpackClothing
|
backpack: BackpackClothing
|
||||||
shoes: ShoesGaloshes
|
shoes: ShoesGaloshes
|
||||||
head: HatPurplesoft
|
head: HatPurplesoft
|
||||||
|
idcard: JanitorIDCard
|
||||||
|
|||||||
@@ -33,3 +33,4 @@
|
|||||||
eyes: SunGlasses
|
eyes: SunGlasses
|
||||||
gloves: GlovesCaptain
|
gloves: GlovesCaptain
|
||||||
outerclothing: OuterclothingCaparmor
|
outerclothing: OuterclothingCaparmor
|
||||||
|
idcard: CaptainIDCard
|
||||||
|
|||||||
@@ -26,3 +26,4 @@
|
|||||||
backpack: BackpackClothing
|
backpack: BackpackClothing
|
||||||
shoes: ShoesBrown
|
shoes: ShoesBrown
|
||||||
head: HatHopcap
|
head: HatHopcap
|
||||||
|
idcard: HoPIDCard
|
||||||
|
|||||||
@@ -22,3 +22,4 @@
|
|||||||
innerclothing: UniformChiefEngineer
|
innerclothing: UniformChiefEngineer
|
||||||
backpack: BackpackEngineering
|
backpack: BackpackEngineering
|
||||||
shoes: ShoesBrown
|
shoes: ShoesBrown
|
||||||
|
idcard: CEIDCard
|
||||||
|
|||||||
@@ -20,3 +20,4 @@
|
|||||||
backpack: BackpackEngineering
|
backpack: BackpackEngineering
|
||||||
shoes: ShoesWorkboots
|
shoes: ShoesWorkboots
|
||||||
outerclothing: OuterclothingHazard
|
outerclothing: OuterclothingHazard
|
||||||
|
idcard: EngineeringIDCard
|
||||||
|
|||||||
@@ -23,3 +23,4 @@
|
|||||||
backpack: BackpackMedical
|
backpack: BackpackMedical
|
||||||
shoes: ShoesBrown
|
shoes: ShoesBrown
|
||||||
outerclothing: OuterclothingLabcoatcmo
|
outerclothing: OuterclothingLabcoatcmo
|
||||||
|
idcard: CMOIDCard
|
||||||
|
|||||||
@@ -19,3 +19,4 @@
|
|||||||
backpack: BackpackMedical
|
backpack: BackpackMedical
|
||||||
shoes: ShoesWhite
|
shoes: ShoesWhite
|
||||||
outerclothing: OuterclothingLabcoatmedspecopen
|
outerclothing: OuterclothingLabcoatmedspecopen
|
||||||
|
idcard: MedicalIDCard
|
||||||
|
|||||||
@@ -21,3 +21,4 @@
|
|||||||
backpack: BackpackClothing
|
backpack: BackpackClothing
|
||||||
shoes: ShoesBrown
|
shoes: ShoesBrown
|
||||||
outerclothing: OuterclothingLabcoatgenopen
|
outerclothing: OuterclothingLabcoatgenopen
|
||||||
|
idcard: RDIDCard
|
||||||
|
|||||||
@@ -19,3 +19,4 @@
|
|||||||
backpack: BackpackClothing
|
backpack: BackpackClothing
|
||||||
shoes: ShoesWhite
|
shoes: ShoesWhite
|
||||||
outerclothing: OuterclothingLabcoattoxopen
|
outerclothing: OuterclothingLabcoattoxopen
|
||||||
|
idcard: ResearchIDCard
|
||||||
|
|||||||
@@ -24,3 +24,4 @@
|
|||||||
outerclothing: OuterclothingHoSTrenchcoat
|
outerclothing: OuterclothingHoSTrenchcoat
|
||||||
eyes: SecGlasses
|
eyes: SecGlasses
|
||||||
head: HatBeretHoS
|
head: HatBeretHoS
|
||||||
|
idcard: HoSIDCard
|
||||||
|
|||||||
@@ -21,3 +21,4 @@
|
|||||||
shoes: ShoesJackboots
|
shoes: ShoesJackboots
|
||||||
eyes: SecGlasses
|
eyes: SecGlasses
|
||||||
outerclothing: OuterclothingArmorsec
|
outerclothing: OuterclothingArmorsec
|
||||||
|
idcard: SecurityIDCard
|
||||||
|
|||||||
Reference in New Issue
Block a user