Moves HumanoidAppearanceComponent to ECS (#4855)

* Moves HumanoidCharacterAppearance to ECS

* Makes HumanoidAppearanceSystem work over networks

* Makes HumanoidAppearanceSystem more efficient

* Cleans up the files

* Updates privacy on a couple of functions

* Fixes a few using references, renames a file

* Makes HumanoidAppearanceSystem more cleaner

* Fixes Magic Mirror

* Cleanup

* HumanoidAppearanceComponent now has a friend

SharedHumanoidAppearanceSystem is only allowed to act on this, now

* Fixes the Body-HumanoidAppearance ECS scaffolding

* a little cleanup never hurt anybody

* quick fix for magic mirror appearance access

* Replaces a networked event with a local one

This one was... causing bugs
This commit is contained in:
Flipp Syder
2021-10-16 15:28:02 -07:00
committed by GitHub
parent f69575e15a
commit 7dc6b95a10
17 changed files with 275 additions and 240 deletions

View File

@@ -4,6 +4,7 @@ using Content.Server.EUI;
using Content.Server.Mind.Components;
using Content.Server.Power.Components;
using Content.Server.UserInterface;
using Content.Shared.CharacterAppearance.Systems;
using Content.Shared.Cloning;
using Content.Shared.MobState;
using Content.Shared.Popups;
@@ -136,7 +137,8 @@ namespace Content.Server.Cloning.Components
var mob = Owner.EntityManager.SpawnEntity("MobHuman", Owner.Transform.MapPosition);
mob.GetComponent<HumanoidAppearanceComponent>().UpdateFromProfile(dna.Profile);
EntitySystem.Get<SharedHumanoidAppearanceSystem>().UpdateFromProfile(mob.Uid, dna.Profile);
mob.Name = dna.Profile.Name;
var cloneMindReturn = mob.AddComponent<BeingClonedComponent>();