diff --git a/Content.Server/Corvax/AutoDeleteItems/AutoDeleteSystem.cs b/Content.Server/Corvax/AutoDeleteItems/AutoDeleteSystem.cs index 3d80078d80a..fcc3c210c4b 100644 --- a/Content.Server/Corvax/AutoDeleteItems/AutoDeleteSystem.cs +++ b/Content.Server/Corvax/AutoDeleteItems/AutoDeleteSystem.cs @@ -30,7 +30,7 @@ public override void Update(float frameTime) { return; } - + if (autoDeleteComponent.NextTimeToCheck > _gameTiming.CurTime) return; @@ -47,12 +47,12 @@ public override void Update(float frameTime) { autoDeleteComponent.IsSSDNear = false; } - + if (iterator.Owner == uid) continue; var humanoids = new HashSet>(); - + _lookup.GetEntitiesInRange(xform.Coordinates, autoDeleteComponent.DistanceToCheck, humanoids); if (humanoids.Count > 0 && !autoDeleteComponent.IsSSDNear) diff --git a/Content.Server/Corvax/Elzuosa/ElzuosaColorComponent.cs b/Content.Server/Corvax/Elzuosa/ElzuosaColorComponent.cs new file mode 100644 index 00000000000..242a352e82a --- /dev/null +++ b/Content.Server/Corvax/Elzuosa/ElzuosaColorComponent.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Robust.Shared.Audio; + +namespace Content.Server.Corvax.Elzuosa +{ + [RegisterComponent] + public sealed partial class ElzuosaColorComponent : Component + { + public Color SkinColor { get; set; } + + public bool Hacked { get; set; } = false; + + [DataField("cycleRate")] + public float CycleRate = 1f; + } +} diff --git a/Content.Server/Corvax/Elzuosa/ElzuosaColorSystem.cs b/Content.Server/Corvax/Elzuosa/ElzuosaColorSystem.cs new file mode 100644 index 00000000000..632708e7915 --- /dev/null +++ b/Content.Server/Corvax/Elzuosa/ElzuosaColorSystem.cs @@ -0,0 +1,37 @@ +using Content.Shared.Humanoid; +using Content.Shared.Preferences; +using Robust.Server.GameObjects; +using Content.Server.GameTicking; +namespace Content.Server.Corvax.Elzuosa +{ + public sealed class ElzuosaColorSystem : EntitySystem + { + [Dependency] private readonly PointLightSystem _pointLightSystem = default!; + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnPlayerSpawn); + } + + private void OnPlayerSpawn(EntityUid uid, ElzuosaColorComponent comp, PlayerSpawnCompleteEvent args) + { + if (!HasComp(uid)) + return; + if (args == null) + return; + var profile = args.Profile; + SetEntityPointLightColor(uid, profile); + } + + public void SetEntityPointLightColor(EntityUid uid, HumanoidCharacterProfile? profile) + { + if (profile == null) + return; + + var color = profile.Appearance.SkinColor; + _pointLightSystem.SetColor(uid,color); + + } + } +} diff --git a/Resources/Prototypes/Corvax/Entities/Mobs/Species/elzuosa.yml b/Resources/Prototypes/Corvax/Entities/Mobs/Species/elzuosa.yml index fcc0674829c..94b628deaa1 100644 --- a/Resources/Prototypes/Corvax/Entities/Mobs/Species/elzuosa.yml +++ b/Resources/Prototypes/Corvax/Entities/Mobs/Species/elzuosa.yml @@ -4,6 +4,7 @@ name: Urist McElzuosa abstract: true components: + - type: ElzuosaColor - type: Hunger # Corvax-Frontier starvationDamage: types: @@ -42,6 +43,7 @@ - type: PointLight enabled: true radius: 2 + cycleRate: 0.01 - type: InteractionPopup successChance: 1 interactSuccessString: pat-success-elzuosa