From ecf3ecad816bf9a2051c3b42997a6e2c963e2352 Mon Sep 17 00:00:00 2001 From: Aviu00 <93730715+Aviu00@users.noreply.github.com> Date: Thu, 19 Oct 2023 02:32:18 +0900 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=BE=D0=B2=D1=8B=D0=B5=20=D0=B0=D1=81?= =?UTF-8?q?=D0=BF=D0=B5=D0=BA=D1=82=D1=8B=20(#495)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add ReflectAspect * Add SlipperyAspect * Add TraitorRichAspect * Add WhisperAspect * Add DarknessAspect & StolenFloorAspect * Add WindowLeakAspect * Add CatEarsAspect * Add NothingAspect * Fix fast and furious clone * Add SkeletonAspect * Add cvar ceanup --- Content.Server/Chat/Systems/ChatSystem.cs | 8 ++ .../GameTicking/Rules/TraitorRuleSystem.cs | 20 ++- .../AspectsSystem/Aspects/CatEarsAspect.cs | 105 ++++++++++++++ .../Components/CatEarsAspectComponent.cs | 6 + .../Components/DarknessAspectComponent.cs | 6 + .../Components/NothingAspectComponent.cs | 6 + .../Components/ReflectAspectComponent.cs | 6 + .../Components/SkeletonAspectComponent.cs | 6 + .../Components/SlipperyAspectComponent.cs | 6 + .../Components/StolenFloorAspectComponent.cs | 6 + .../Components/TraitorRichAspectComponent.cs | 6 + .../Components/WhisperAspectComponent.cs | 6 + .../Components/WindowLeakAspectComponent.cs | 6 + .../AspectsSystem/Aspects/DarknessAspect.cs | 20 +++ .../Aspects/FastAndFuriousAspect.cs | 27 +++- .../AspectsSystem/Aspects/NothingAspect.cs | 8 ++ .../AspectsSystem/Aspects/ReflectAspect.cs | 24 ++++ .../AspectsSystem/Aspects/SkeletonAspect.cs | 71 ++++++++++ .../AspectsSystem/Aspects/SlipperyAspect.cs | 26 ++++ .../Aspects/StolenFloorAspect.cs | 36 +++++ .../Aspects/TraitorRichAspect.cs | 74 ++++++++++ .../AspectsSystem/Aspects/WhisperAspect.cs | 8 ++ .../AspectsSystem/Aspects/WindowLeakAspect.cs | 39 +++++ .../White/AspectsSystem/Base/AspectSystem.cs | 25 ++-- .../AspectsSystem/Managers/AspectManager.cs | 1 + .../White/Other/LightMarkComponent.cs | 6 + .../RandomHumanSystem/RandomHumanSystem.cs | 8 +- .../White/Other/ReflectAspectMarkComponent.cs | 6 + .../White/Other/WindowMarkComponent.cs | 11 ++ Content.Shared/Maps/TileSystem.cs | 11 +- Content.Shared/Slippery/SlipperySystem.cs | 13 +- Content.Shared/White/WhiteCVars.cs | 3 + .../Doors/Airlocks/base_structureairlocks.yml | 3 +- .../Structures/Doors/Firelocks/firelock.yml | 1 + .../Doors/MaterialDoors/material_doors.yml | 1 + .../Structures/Doors/Shutter/shutters.yml | 1 + .../Doors/Windoors/base_structurewindoors.yml | 3 +- .../Structures/Lighting/base_lighting.yml | 1 + .../Entities/Structures/Walls/walls.yml | 1 + .../Entities/Structures/Windows/plasma.yml | 2 + .../Structures/Windows/reinforced.yml | 2 + .../Entities/Structures/Windows/rplasma.yml | 2 + .../Entities/Structures/Windows/ruranium.yml | 2 + .../Entities/Structures/Windows/shuttle.yml | 2 + .../Entities/Structures/Windows/uranium.yml | 2 + .../Entities/Structures/Windows/window.yml | 4 + .../Prototypes/White/Aspects/Aspects.yml | 133 ++++++++++++++++++ Resources/Prototypes/White/polymorphs.yml | 10 ++ 48 files changed, 751 insertions(+), 29 deletions(-) create mode 100644 Content.Server/White/AspectsSystem/Aspects/CatEarsAspect.cs create mode 100644 Content.Server/White/AspectsSystem/Aspects/Components/CatEarsAspectComponent.cs create mode 100644 Content.Server/White/AspectsSystem/Aspects/Components/DarknessAspectComponent.cs create mode 100644 Content.Server/White/AspectsSystem/Aspects/Components/NothingAspectComponent.cs create mode 100644 Content.Server/White/AspectsSystem/Aspects/Components/ReflectAspectComponent.cs create mode 100644 Content.Server/White/AspectsSystem/Aspects/Components/SkeletonAspectComponent.cs create mode 100644 Content.Server/White/AspectsSystem/Aspects/Components/SlipperyAspectComponent.cs create mode 100644 Content.Server/White/AspectsSystem/Aspects/Components/StolenFloorAspectComponent.cs create mode 100644 Content.Server/White/AspectsSystem/Aspects/Components/TraitorRichAspectComponent.cs create mode 100644 Content.Server/White/AspectsSystem/Aspects/Components/WhisperAspectComponent.cs create mode 100644 Content.Server/White/AspectsSystem/Aspects/Components/WindowLeakAspectComponent.cs create mode 100644 Content.Server/White/AspectsSystem/Aspects/DarknessAspect.cs create mode 100644 Content.Server/White/AspectsSystem/Aspects/NothingAspect.cs create mode 100644 Content.Server/White/AspectsSystem/Aspects/ReflectAspect.cs create mode 100644 Content.Server/White/AspectsSystem/Aspects/SkeletonAspect.cs create mode 100644 Content.Server/White/AspectsSystem/Aspects/SlipperyAspect.cs create mode 100644 Content.Server/White/AspectsSystem/Aspects/StolenFloorAspect.cs create mode 100644 Content.Server/White/AspectsSystem/Aspects/TraitorRichAspect.cs create mode 100644 Content.Server/White/AspectsSystem/Aspects/WhisperAspect.cs create mode 100644 Content.Server/White/AspectsSystem/Aspects/WindowLeakAspect.cs create mode 100644 Content.Server/White/Other/LightMarkComponent.cs create mode 100644 Content.Server/White/Other/ReflectAspectMarkComponent.cs create mode 100644 Content.Server/White/Other/WindowMarkComponent.cs create mode 100644 Resources/Prototypes/White/polymorphs.yml diff --git a/Content.Server/Chat/Systems/ChatSystem.cs b/Content.Server/Chat/Systems/ChatSystem.cs index 89214cdc5e..7481f0d661 100644 --- a/Content.Server/Chat/Systems/ChatSystem.cs +++ b/Content.Server/Chat/Systems/ChatSystem.cs @@ -13,6 +13,7 @@ using Content.Server.Speech.Components; using Content.Server.Station.Components; using Content.Server.Station.Systems; using Content.Server.UtkaIntegration; +using Content.Server.White.AspectsSystem.Aspects.Components; using Content.Server.White.Other.Speech; using Content.Shared.ActionBlocker; using Content.Shared.Administration; @@ -63,6 +64,7 @@ public sealed partial class ChatSystem : SharedChatSystem [Dependency] private readonly SharedInteractionSystem _interactionSystem = default!; [Dependency] private readonly ReplacementAccentSystem _wordreplacement = default!; [Dependency] private readonly INetConfigurationManager _netConfigurationManager = default!; // WD + [Dependency] private readonly GameTicker _gameTicker = default!; // WD //WD-EDIT [Dependency] private readonly UtkaTCPWrapper _utkaSockets = default!; @@ -262,6 +264,12 @@ public sealed partial class ChatSystem : SharedChatSystem } } + if (desiredType == InGameICChatType.Speak && + _gameTicker.GetActiveGameRules().Where(HasComp).Any()) // WD + { + desiredType = InGameICChatType.Whisper; + } + // Otherwise, send whatever type. switch (desiredType) { diff --git a/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs b/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs index c74009a599..355f4b33e9 100644 --- a/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs @@ -23,6 +23,10 @@ using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Random; using Robust.Shared.Timing; +using Content.Server.Objectives; +using Content.Server.White.Administration; +using Content.Server.White.AspectsSystem.Aspects; +using Content.Server.White.AspectsSystem.Aspects.Components; using Content.Server.White.Reputation; using Content.Shared.White.Mood; @@ -44,7 +48,8 @@ public sealed class TraitorRuleSystem : GameRuleSystem [Dependency] private readonly SharedRoleSystem _roleSystem = default!; [Dependency] private readonly SharedJobSystem _jobs = default!; [Dependency] private readonly ObjectivesSystem _objectives = default!; - [Dependency] private readonly RoleSystem _roles = default!; // WD + //WD EDIT + [Dependency] private readonly GameTicker _gameTicker = default!; private ISawmill _sawmill = default!; @@ -190,7 +195,7 @@ public sealed class TraitorRuleSystem : GameRuleSystem { return false; }*/ - if (_roles.MindIsAntagonist(mindId)) + if (_roleSystem.MindIsAntagonist(mindId)) { return false; } @@ -200,6 +205,15 @@ public sealed class TraitorRuleSystem : GameRuleSystem if (_jobs.MindTryGetJob(mindId, out _, out var prototype)) startingBalance = Math.Max(startingBalance - prototype.AntagAdvantage, 0); + // WD START + var richAspect = false; + if (_gameTicker.GetActiveGameRules().Where(HasComp).Any()) + { + startingBalance += 10; + richAspect = true; + } + // WD END + // Give traitors their codewords and uplink code to keep in their character info menu var briefing = Loc.GetString("traitor-role-codewords-short", ("codewords", string.Join(", ", traitorRule.Codewords))); Note[]? code = null; @@ -236,6 +250,8 @@ public sealed class TraitorRuleSystem : GameRuleSystem }, mind); _roleSystem.MindPlaySound(mindId, traitorRule.GreetSoundNotification, mind); SendTraitorBriefing(mindId, traitorRule.Codewords, code); + if (richAspect) // WD + TraitorRichAspect.NotifyTraitor(mind, _chatManager); traitorRule.TraitorMinds.Add(mindId); // Change the faction diff --git a/Content.Server/White/AspectsSystem/Aspects/CatEarsAspect.cs b/Content.Server/White/AspectsSystem/Aspects/CatEarsAspect.cs new file mode 100644 index 0000000000..845f76862e --- /dev/null +++ b/Content.Server/White/AspectsSystem/Aspects/CatEarsAspect.cs @@ -0,0 +1,105 @@ +using Content.Server.GameTicking; +using Content.Server.GameTicking.Rules.Components; +using Content.Server.White.AspectsSystem.Aspects.Components; +using Content.Server.White.AspectsSystem.Base; +using Content.Shared.Humanoid; +using Content.Shared.Humanoid.Markings; +using Robust.Shared.Prototypes; + +namespace Content.Server.White.AspectsSystem.Aspects; + +public sealed class CatEarsAspect : AspectSystem +{ + [Dependency] private readonly IPrototypeManager _protoMan = default!; + + private MarkingPrototype _ears = default!; + private MarkingPrototype _tail = default!; + + public override void Initialize() + { + base.Initialize(); + SubscribeLocalEvent(HandleLateJoin); + + _ears = _protoMan.Index("FelinidEarsBasic"); + _tail = _protoMan.Index("FelinidTailBasic"); + } + + protected override void Started(EntityUid uid, CatEarsAspectComponent component, GameRuleComponent gameRule, + GameRuleStartedEvent args) + { + base.Started(uid, component, gameRule, args); + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var ent, out var appearance)) + { + AddMarkings(ent, appearance); + } + } + + private void HandleLateJoin(PlayerSpawnCompleteEvent ev) + { + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var ruleEntity, out _, out var gameRule)) + { + if (!GameTicker.IsGameRuleAdded(ruleEntity, gameRule)) + continue; + + if (!ev.LateJoin) + return; + + AddMarkings(ev.Mob); + } + } + + private void AddMarkings(EntityUid uid, HumanoidAppearanceComponent? appearance = null) + { + if (!Resolve(uid, ref appearance, false)) + return; + + switch (appearance.Species) + { + case "Felinid": + return; + case "Human": + { + if (!appearance.MarkingSet.TryGetCategory(MarkingCategories.HeadTop, out var markings) || + markings.Count == 0) + AddEars(appearance); + + if (!appearance.MarkingSet.TryGetCategory(MarkingCategories.Tail, out markings) || markings.Count == 0) + AddTail(appearance); + + Dirty(uid, appearance); + return; + } + default: + AddEars(appearance); + AddTail(appearance); + Dirty(uid, appearance); + break; + } + } + + private List GetColors(HumanoidAppearanceComponent appearance, MarkingPrototype prototype) + { + return MarkingColoring.GetMarkingLayerColors(prototype, appearance.SkinColor, appearance.EyeColor, + appearance.MarkingSet); + } + + private void AddTail(HumanoidAppearanceComponent appearance) + { + if (!appearance.MarkingSet.TryGetMarking(MarkingCategories.Tail, _tail.ID, out _)) + { + appearance.MarkingSet.AddFront(MarkingCategories.Tail, + new Marking(_tail.ID, GetColors(appearance, _tail)) {Forced = true}); + } + } + + private void AddEars(HumanoidAppearanceComponent appearance) + { + if (!appearance.MarkingSet.TryGetMarking(MarkingCategories.HeadTop, _tail.ID, out _)) + { + appearance.MarkingSet.AddFront(MarkingCategories.HeadTop, + new Marking(_ears.ID, GetColors(appearance, _ears)) {Forced = true}); + } + } +} diff --git a/Content.Server/White/AspectsSystem/Aspects/Components/CatEarsAspectComponent.cs b/Content.Server/White/AspectsSystem/Aspects/Components/CatEarsAspectComponent.cs new file mode 100644 index 0000000000..2c26757cd4 --- /dev/null +++ b/Content.Server/White/AspectsSystem/Aspects/Components/CatEarsAspectComponent.cs @@ -0,0 +1,6 @@ +namespace Content.Server.White.AspectsSystem.Aspects.Components; + +[RegisterComponent] +public sealed partial class CatEarsAspectComponent : Component +{ +} diff --git a/Content.Server/White/AspectsSystem/Aspects/Components/DarknessAspectComponent.cs b/Content.Server/White/AspectsSystem/Aspects/Components/DarknessAspectComponent.cs new file mode 100644 index 0000000000..2b096437d8 --- /dev/null +++ b/Content.Server/White/AspectsSystem/Aspects/Components/DarknessAspectComponent.cs @@ -0,0 +1,6 @@ +namespace Content.Server.White.AspectsSystem.Aspects.Components; + +[RegisterComponent] +public sealed partial class DarknessAspectComponent : Component +{ +} diff --git a/Content.Server/White/AspectsSystem/Aspects/Components/NothingAspectComponent.cs b/Content.Server/White/AspectsSystem/Aspects/Components/NothingAspectComponent.cs new file mode 100644 index 0000000000..3aa02d5d80 --- /dev/null +++ b/Content.Server/White/AspectsSystem/Aspects/Components/NothingAspectComponent.cs @@ -0,0 +1,6 @@ +namespace Content.Server.White.AspectsSystem.Aspects.Components; + +[RegisterComponent] +public sealed partial class NothingAspectComponent : Component +{ +} diff --git a/Content.Server/White/AspectsSystem/Aspects/Components/ReflectAspectComponent.cs b/Content.Server/White/AspectsSystem/Aspects/Components/ReflectAspectComponent.cs new file mode 100644 index 0000000000..62bebbd10c --- /dev/null +++ b/Content.Server/White/AspectsSystem/Aspects/Components/ReflectAspectComponent.cs @@ -0,0 +1,6 @@ +namespace Content.Server.White.AspectsSystem.Aspects.Components; + +[RegisterComponent] +public sealed partial class ReflectAspectComponent : Component +{ +} diff --git a/Content.Server/White/AspectsSystem/Aspects/Components/SkeletonAspectComponent.cs b/Content.Server/White/AspectsSystem/Aspects/Components/SkeletonAspectComponent.cs new file mode 100644 index 0000000000..d13de4b12e --- /dev/null +++ b/Content.Server/White/AspectsSystem/Aspects/Components/SkeletonAspectComponent.cs @@ -0,0 +1,6 @@ +namespace Content.Server.White.AspectsSystem.Aspects.Components; + +[RegisterComponent] +public sealed partial class SkeletonAspectComponent : Component +{ +} diff --git a/Content.Server/White/AspectsSystem/Aspects/Components/SlipperyAspectComponent.cs b/Content.Server/White/AspectsSystem/Aspects/Components/SlipperyAspectComponent.cs new file mode 100644 index 0000000000..ea8cbfeeb8 --- /dev/null +++ b/Content.Server/White/AspectsSystem/Aspects/Components/SlipperyAspectComponent.cs @@ -0,0 +1,6 @@ +namespace Content.Server.White.AspectsSystem.Aspects.Components; + +[RegisterComponent] +public sealed partial class SlipperyAspectComponent : Component +{ +} diff --git a/Content.Server/White/AspectsSystem/Aspects/Components/StolenFloorAspectComponent.cs b/Content.Server/White/AspectsSystem/Aspects/Components/StolenFloorAspectComponent.cs new file mode 100644 index 0000000000..914b5b6866 --- /dev/null +++ b/Content.Server/White/AspectsSystem/Aspects/Components/StolenFloorAspectComponent.cs @@ -0,0 +1,6 @@ +namespace Content.Server.White.AspectsSystem.Aspects.Components; + +[RegisterComponent] +public sealed partial class StolenFloorAspectComponent : Component +{ +} diff --git a/Content.Server/White/AspectsSystem/Aspects/Components/TraitorRichAspectComponent.cs b/Content.Server/White/AspectsSystem/Aspects/Components/TraitorRichAspectComponent.cs new file mode 100644 index 0000000000..5451e4e78d --- /dev/null +++ b/Content.Server/White/AspectsSystem/Aspects/Components/TraitorRichAspectComponent.cs @@ -0,0 +1,6 @@ +namespace Content.Server.White.AspectsSystem.Aspects.Components; + +[RegisterComponent] +public sealed partial class TraitorRichAspectComponent : Component +{ +} diff --git a/Content.Server/White/AspectsSystem/Aspects/Components/WhisperAspectComponent.cs b/Content.Server/White/AspectsSystem/Aspects/Components/WhisperAspectComponent.cs new file mode 100644 index 0000000000..133ae9b461 --- /dev/null +++ b/Content.Server/White/AspectsSystem/Aspects/Components/WhisperAspectComponent.cs @@ -0,0 +1,6 @@ +namespace Content.Server.White.AspectsSystem.Aspects.Components; + +[RegisterComponent] +public sealed partial class WhisperAspectComponent : Component +{ +} diff --git a/Content.Server/White/AspectsSystem/Aspects/Components/WindowLeakAspectComponent.cs b/Content.Server/White/AspectsSystem/Aspects/Components/WindowLeakAspectComponent.cs new file mode 100644 index 0000000000..006403f168 --- /dev/null +++ b/Content.Server/White/AspectsSystem/Aspects/Components/WindowLeakAspectComponent.cs @@ -0,0 +1,6 @@ +namespace Content.Server.White.AspectsSystem.Aspects.Components; + +[RegisterComponent] +public sealed partial class WindowLeakAspectComponent : Component +{ +} diff --git a/Content.Server/White/AspectsSystem/Aspects/DarknessAspect.cs b/Content.Server/White/AspectsSystem/Aspects/DarknessAspect.cs new file mode 100644 index 0000000000..8471cb27f2 --- /dev/null +++ b/Content.Server/White/AspectsSystem/Aspects/DarknessAspect.cs @@ -0,0 +1,20 @@ +using Content.Server.GameTicking.Rules.Components; +using Content.Server.White.AspectsSystem.Aspects.Components; +using Content.Server.White.AspectsSystem.Base; +using Content.Server.White.Other; + +namespace Content.Server.White.AspectsSystem.Aspects; + +public sealed class DarknessAspect : AspectSystem +{ + protected override void Started(EntityUid uid, DarknessAspectComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args) + { + base.Started(uid, component, gameRule, args); + + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var ent, out _)) + { + EntityManager.DeleteEntity(ent); + } + } +} diff --git a/Content.Server/White/AspectsSystem/Aspects/FastAndFuriousAspect.cs b/Content.Server/White/AspectsSystem/Aspects/FastAndFuriousAspect.cs index e77abdee5d..1a414f591f 100644 --- a/Content.Server/White/AspectsSystem/Aspects/FastAndFuriousAspect.cs +++ b/Content.Server/White/AspectsSystem/Aspects/FastAndFuriousAspect.cs @@ -1,7 +1,9 @@ +using Content.Server.Cloning; using Content.Server.GameTicking; using Content.Server.GameTicking.Rules.Components; using Content.Server.White.AspectsSystem.Aspects.Components; using Content.Server.White.AspectsSystem.Base; +using Content.Shared.Cloning; using Content.Shared.Movement.Components; using Content.Shared.Movement.Systems; @@ -15,9 +17,11 @@ public sealed class FastAndFuriousAspect : AspectSystem(HandleLateJoin); + SubscribeLocalEvent(HandleCloning); } - protected override void Started(EntityUid uid, FastAndFuriousAspectComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args) + protected override void Started(EntityUid uid, FastAndFuriousAspectComponent component, GameRuleComponent gameRule, + GameRuleStartedEvent args) { base.Started(uid, component, gameRule, args); var query = EntityQueryEnumerator(); @@ -28,7 +32,8 @@ public sealed class FastAndFuriousAspect : AspectSystem(); @@ -39,7 +44,20 @@ public sealed class FastAndFuriousAspect : AspectSystem(); while (query.MoveNext(out var ruleEntity, out _, out var gameRule)) @@ -47,11 +65,6 @@ public sealed class FastAndFuriousAspect : AspectSystem(mob, out var speedModifierComponent)) return; diff --git a/Content.Server/White/AspectsSystem/Aspects/NothingAspect.cs b/Content.Server/White/AspectsSystem/Aspects/NothingAspect.cs new file mode 100644 index 0000000000..4f881bd429 --- /dev/null +++ b/Content.Server/White/AspectsSystem/Aspects/NothingAspect.cs @@ -0,0 +1,8 @@ +using Content.Server.White.AspectsSystem.Aspects.Components; +using Content.Server.White.AspectsSystem.Base; + +namespace Content.Server.White.AspectsSystem.Aspects; + +public sealed class NothingAspect : AspectSystem +{ +} diff --git a/Content.Server/White/AspectsSystem/Aspects/ReflectAspect.cs b/Content.Server/White/AspectsSystem/Aspects/ReflectAspect.cs new file mode 100644 index 0000000000..55fd3c37a4 --- /dev/null +++ b/Content.Server/White/AspectsSystem/Aspects/ReflectAspect.cs @@ -0,0 +1,24 @@ +using Content.Server.GameTicking.Rules.Components; +using Content.Server.White.AspectsSystem.Aspects.Components; +using Content.Server.White.AspectsSystem.Base; +using Content.Server.White.Other; +using Content.Shared.Weapons.Reflect; + +namespace Content.Server.White.AspectsSystem.Aspects; + +public sealed class ReflectAspect : AspectSystem +{ + protected override void Started(EntityUid uid, ReflectAspectComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args) + { + base.Started(uid, component, gameRule, args); + + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var ent, out _)) + { + var reflect = EnsureComp(ent); + reflect.ReflectProb = 1; + reflect.Reflects = ReflectType.Energy | ReflectType.NonEnergy; + } + } + +} diff --git a/Content.Server/White/AspectsSystem/Aspects/SkeletonAspect.cs b/Content.Server/White/AspectsSystem/Aspects/SkeletonAspect.cs new file mode 100644 index 0000000000..57e3bbd8eb --- /dev/null +++ b/Content.Server/White/AspectsSystem/Aspects/SkeletonAspect.cs @@ -0,0 +1,71 @@ +using Content.Server.GameTicking; +using Content.Server.GameTicking.Rules.Components; +using Content.Server.Humanoid; +using Content.Server.Polymorph.Systems; +using Content.Server.White.AspectsSystem.Aspects.Components; +using Content.Server.White.AspectsSystem.Base; +using Content.Shared.Humanoid; +using Content.Shared.Polymorph; +using Robust.Shared.Prototypes; + +namespace Content.Server.White.AspectsSystem.Aspects; + +public sealed class SkeletonAspect : AspectSystem +{ + [Dependency] private readonly IPrototypeManager _protoMan = default!; + [Dependency] private readonly PolymorphSystem _polymorph = default!; + [Dependency] private readonly HumanoidAppearanceSystem _humanoidAppearance = default!; + + private PolymorphPrototype _proto = default!; + + public override void Initialize() + { + base.Initialize(); + SubscribeLocalEvent(HandleLateJoin); + + _proto = _protoMan.Index("AspectForcedSkeleton"); + } + + protected override void Started(EntityUid uid, SkeletonAspectComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args) + { + base.Started(uid, component, gameRule, args); + + Dictionary entitiesToPolymorph = new(); + + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var ent, out var humanoid)) + { + entitiesToPolymorph[ent] = humanoid; + } + + foreach (var ent in entitiesToPolymorph) + { + PolymorphEntity(ent.Key, ent.Value); + } + } + + private void HandleLateJoin(PlayerSpawnCompleteEvent ev) + { + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var ruleEntity, out _, out var gameRule)) + { + if (!GameTicker.IsGameRuleAdded(ruleEntity, gameRule)) + continue; + + if (!ev.LateJoin) + return; + + PolymorphEntity(ev.Mob); + } + } + + private void PolymorphEntity(EntityUid uid, HumanoidAppearanceComponent? humanoid = null) + { + if (!Resolve(uid, ref humanoid, false)) + return; + + _humanoidAppearance.SetSpecies(uid, "Skeleton", false, humanoid); + _humanoidAppearance.SetBodyType(uid, "SkeletonNormal", false, humanoid); + _polymorph.PolymorphEntity(uid, _proto); + } +} diff --git a/Content.Server/White/AspectsSystem/Aspects/SlipperyAspect.cs b/Content.Server/White/AspectsSystem/Aspects/SlipperyAspect.cs new file mode 100644 index 0000000000..bb7b6679eb --- /dev/null +++ b/Content.Server/White/AspectsSystem/Aspects/SlipperyAspect.cs @@ -0,0 +1,26 @@ +using Content.Server.GameTicking.Rules.Components; +using Content.Server.White.AspectsSystem.Aspects.Components; +using Content.Server.White.AspectsSystem.Base; +using Content.Shared.White; +using Robust.Shared.Configuration; + +namespace Content.Server.White.AspectsSystem.Aspects; + +public sealed class SlipperyAspect : AspectSystem +{ + [Dependency] private readonly IConfigurationManager _cfg = default!; + + protected override void Started(EntityUid uid, SlipperyAspectComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args) + { + base.Started(uid, component, gameRule, args); + + _cfg.SetCVar(WhiteCVars.SlipPowerModifier, 2f); + } + + protected override void Ended(EntityUid uid, SlipperyAspectComponent component, GameRuleComponent gameRule, GameRuleEndedEvent args) + { + base.Ended(uid, component, gameRule, args); + + _cfg.SetCVar(WhiteCVars.SlipPowerModifier, 1f); + } +} diff --git a/Content.Server/White/AspectsSystem/Aspects/StolenFloorAspect.cs b/Content.Server/White/AspectsSystem/Aspects/StolenFloorAspect.cs new file mode 100644 index 0000000000..c45a4d034b --- /dev/null +++ b/Content.Server/White/AspectsSystem/Aspects/StolenFloorAspect.cs @@ -0,0 +1,36 @@ +using Content.Server.GameTicking.Rules.Components; +using Content.Server.Maps; +using Content.Server.White.AspectsSystem.Aspects.Components; +using Content.Server.White.AspectsSystem.Base; +using Content.Shared.Maps; +using Robust.Shared.Map; +using Robust.Shared.Map.Components; + +namespace Content.Server.White.AspectsSystem.Aspects; + +public sealed class StolenFloorAspect : AspectSystem +{ + [Dependency] private readonly ITileDefinitionManager _tileDefinitionManager = default!; + [Dependency] private readonly TileSystem _tileSystem = default!; + + protected override void Started(EntityUid uid, StolenFloorAspectComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args) + { + base.Started(uid, component, gameRule, args); + + if (!TryGetStationGrids(out _, out var grids)) + return; + + foreach (var grid in grids) + { + foreach (var tile in Comp(grid).GetAllTiles()) + { + var tileDef = (ContentTileDefinition) _tileDefinitionManager[tile.Tile.TypeId]; + + if (!tileDef.CanCrowbar) + continue; + + _tileSystem.DeconstructTile(tile, false); + } + } + } +} diff --git a/Content.Server/White/AspectsSystem/Aspects/TraitorRichAspect.cs b/Content.Server/White/AspectsSystem/Aspects/TraitorRichAspect.cs new file mode 100644 index 0000000000..2afaf8b91a --- /dev/null +++ b/Content.Server/White/AspectsSystem/Aspects/TraitorRichAspect.cs @@ -0,0 +1,74 @@ +using System.Linq; +using Content.Server.Chat.Managers; +using Content.Server.GameTicking.Rules; +using Content.Server.GameTicking.Rules.Components; +using Content.Server.Store.Components; +using Content.Server.Store.Systems; +using Content.Server.Traitor.Uplink; +using Content.Server.White.AspectsSystem.Aspects.Components; +using Content.Server.White.AspectsSystem.Base; +using Content.Shared.FixedPoint; +using Content.Shared.Mind; + +namespace Content.Server.White.AspectsSystem.Aspects; + +public sealed class TraitorRichAspect : AspectSystem +{ + [Dependency] private readonly TraitorRuleSystem _traitorRuleSystem = default!; + [Dependency] private readonly UplinkSystem _uplinkSystem = default!; + [Dependency] private readonly StoreSystem _store = default!; + [Dependency] private readonly IChatManager _chatManager = default!; + + private const string BriefingExtra = + "Поздравляем! Было принято решение выделить для вас 10 дополнительных телекристаллов."; + + protected override void Started(EntityUid uid, TraitorRichAspectComponent component, GameRuleComponent gameRule, + GameRuleStartedEvent args) + { + base.Started(uid, component, gameRule, args); + + if (!HasTraitorGameRule()) + ForceEndSelf(uid, gameRule); + + RewardTraitors(); + } + + private void RewardTraitors() + { + var traitors = _traitorRuleSystem.GetAllLivingConnectedTraitors(); + + foreach (var traitor in traitors) + { + var ent = traitor.Mind.CurrentEntity; + + if (ent == null) + continue; + + var uplink = _uplinkSystem.FindUplinkTarget(ent.Value); + + if (uplink == null || !TryComp(uplink, out StoreComponent? store) || store.AccountOwner != ent || + store.Preset != "StorePresetUplink") + continue; + + if (_store.TryAddCurrency( + new Dictionary {{UplinkSystem.TelecrystalCurrencyPrototype, 10}}, uplink.Value, + store)) + { + NotifyTraitor(traitor.Mind, _chatManager); + } + } + } + + public static void NotifyTraitor(MindComponent mind, IChatManager chatManager) + { + if (mind.Session == null) + return; + + chatManager.DispatchServerMessage(mind.Session, BriefingExtra); + } + + private bool HasTraitorGameRule() + { + return EntityQuery().Any(); + } +} diff --git a/Content.Server/White/AspectsSystem/Aspects/WhisperAspect.cs b/Content.Server/White/AspectsSystem/Aspects/WhisperAspect.cs new file mode 100644 index 0000000000..ba0958cb04 --- /dev/null +++ b/Content.Server/White/AspectsSystem/Aspects/WhisperAspect.cs @@ -0,0 +1,8 @@ +using Content.Server.White.AspectsSystem.Aspects.Components; +using Content.Server.White.AspectsSystem.Base; + +namespace Content.Server.White.AspectsSystem.Aspects; + +public sealed class WhisperAspect : AspectSystem +{ +} diff --git a/Content.Server/White/AspectsSystem/Aspects/WindowLeakAspect.cs b/Content.Server/White/AspectsSystem/Aspects/WindowLeakAspect.cs new file mode 100644 index 0000000000..c0dbe0e5bb --- /dev/null +++ b/Content.Server/White/AspectsSystem/Aspects/WindowLeakAspect.cs @@ -0,0 +1,39 @@ +using Content.Server.GameTicking.Rules.Components; +using Content.Server.White.AspectsSystem.Aspects.Components; +using Content.Server.White.AspectsSystem.Base; +using Content.Server.White.Other; +using Content.Shared.Coordinates.Helpers; +using Robust.Shared.Map; + +namespace Content.Server.White.AspectsSystem.Aspects; + +public sealed class WindowLeakAspect : AspectSystem +{ + protected override void Started(EntityUid uid, WindowLeakAspectComponent component, GameRuleComponent gameRule, + GameRuleStartedEvent args) + { + base.Started(uid, component, gameRule, args); + + HashSet coordinatesSet = new(); + + var query = EntityQuery(); + foreach (var (window, windowXform) in query) + { + var coords = windowXform.Coordinates; + coordinatesSet.Add(coords); + + var wall = EntityManager.SpawnEntity(window.ReplacementProto, coords.SnapToGrid(EntityManager)); + EnsureComp(wall); + } + + var xformQuery = EntityQueryEnumerator(); + while (xformQuery.MoveNext(out var tileEnt, out var xform)) + { + if (HasComp(tileEnt)) + continue; + + if (coordinatesSet.Contains(xform.Coordinates)) + EntityManager.DeleteEntity(tileEnt); + } + } +} diff --git a/Content.Server/White/AspectsSystem/Base/AspectSystem.cs b/Content.Server/White/AspectsSystem/Base/AspectSystem.cs index 32e2494b5a..3149f958ad 100644 --- a/Content.Server/White/AspectsSystem/Base/AspectSystem.cs +++ b/Content.Server/White/AspectsSystem/Base/AspectSystem.cs @@ -160,19 +160,28 @@ namespace Content.Server.White.AspectsSystem.Base return true; } + protected bool TryGetStationGrids([NotNullWhen(true)] out EntityUid? targetStation, + [NotNullWhen(true)] out HashSet? grids) + { + if (!TryGetRandomStation(out targetStation)) + { + targetStation = EntityUid.Invalid; + grids = null; + return false; + } + + grids = Comp(targetStation.Value).Grids; + + return grids.Count > 0; + } + protected bool TryFindRandomTile(out Vector2i tile, [NotNullWhen(true)] out EntityUid? targetStation, out EntityUid targetGrid, out EntityCoordinates targetCoords) { tile = default; targetCoords = EntityCoordinates.Invalid; - if (!TryGetRandomStation(out targetStation)) - { - targetStation = EntityUid.Invalid; - targetGrid = EntityUid.Invalid; - return false; - } - var possibleTargets = Comp(targetStation.Value).Grids; - if (possibleTargets.Count == 0) + + if (!TryGetStationGrids(out targetStation, out var possibleTargets)) { targetGrid = EntityUid.Invalid; return false; diff --git a/Content.Server/White/AspectsSystem/Managers/AspectManager.cs b/Content.Server/White/AspectsSystem/Managers/AspectManager.cs index 8666e06172..237783b4f3 100644 --- a/Content.Server/White/AspectsSystem/Managers/AspectManager.cs +++ b/Content.Server/White/AspectsSystem/Managers/AspectManager.cs @@ -72,6 +72,7 @@ namespace Content.Server.White.AspectsSystem.Managers { _cfg.SetCVar(WhiteCVars.DamageModifier, 1.0f); _cfg.SetCVar(WhiteCVars.DamageGetModifier, 1.0f); + _cfg.SetCVar(WhiteCVars.SlipPowerModifier, 1.0f); } #endregion diff --git a/Content.Server/White/Other/LightMarkComponent.cs b/Content.Server/White/Other/LightMarkComponent.cs new file mode 100644 index 0000000000..cefd9a93f7 --- /dev/null +++ b/Content.Server/White/Other/LightMarkComponent.cs @@ -0,0 +1,6 @@ +namespace Content.Server.White.Other; + +[RegisterComponent] +public sealed partial class LightMarkComponent : Component +{ +} diff --git a/Content.Server/White/Other/RandomHumanSystem/RandomHumanSystem.cs b/Content.Server/White/Other/RandomHumanSystem/RandomHumanSystem.cs index 8037c18231..986d08c410 100644 --- a/Content.Server/White/Other/RandomHumanSystem/RandomHumanSystem.cs +++ b/Content.Server/White/Other/RandomHumanSystem/RandomHumanSystem.cs @@ -1,12 +1,12 @@ -using System.Linq; using Content.Server.Access.Systems; using Content.Server.Humanoid; using Content.Server.IdentityManagement; -using Content.Server.Mind.Components; using Content.Server.PDA; using Content.Server.Roles; using Content.Shared.Access.Components; using Content.Shared.Inventory; +using Content.Shared.Mind.Components; +using Content.Shared.NukeOps; using Content.Shared.PDA; using Content.Shared.Preferences; @@ -20,6 +20,7 @@ public sealed class RandomHumanSystem : EntitySystem [Dependency] private readonly IdCardSystem _card = default!; [Dependency] private readonly PdaSystem _pda = default!; [Dependency] private readonly IdentitySystem _identity = default!; + [Dependency] private readonly RoleSystem _roles = default!; public override void Initialize() { @@ -34,8 +35,7 @@ public sealed class RandomHumanSystem : EntitySystem _humanoid.LoadProfile(uid, newProfile); - if (TryComp(uid, out MindContainerComponent? mindContainer) && mindContainer.HasMind && - mindContainer.Mind.Roles.OfType().Any()) + if (HasComp(uid)) return; _metaData.SetEntityName(uid, newProfile.Name); diff --git a/Content.Server/White/Other/ReflectAspectMarkComponent.cs b/Content.Server/White/Other/ReflectAspectMarkComponent.cs new file mode 100644 index 0000000000..9618fa46a8 --- /dev/null +++ b/Content.Server/White/Other/ReflectAspectMarkComponent.cs @@ -0,0 +1,6 @@ +namespace Content.Server.White.Other; + +[RegisterComponent] +public sealed partial class ReflectAspectMarkComponent : Component +{ +} diff --git a/Content.Server/White/Other/WindowMarkComponent.cs b/Content.Server/White/Other/WindowMarkComponent.cs new file mode 100644 index 0000000000..5b787738a5 --- /dev/null +++ b/Content.Server/White/Other/WindowMarkComponent.cs @@ -0,0 +1,11 @@ +using Robust.Shared.Prototypes; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; + +namespace Content.Server.White.Other; + +[RegisterComponent] +public sealed partial class WindowMarkComponent : Component +{ + [DataField("replacementProto", required: true, customTypeSerializer: typeof(PrototypeIdSerializer))] + public string ReplacementProto = default!; +} diff --git a/Content.Shared/Maps/TileSystem.cs b/Content.Shared/Maps/TileSystem.cs index 2c09375d59..374b51230b 100644 --- a/Content.Shared/Maps/TileSystem.cs +++ b/Content.Shared/Maps/TileSystem.cs @@ -112,7 +112,7 @@ public sealed class TileSystem : EntitySystem return true; } - private bool DeconstructTile(TileRef tileRef) + public bool DeconstructTile(TileRef tileRef, bool spawnTile = true) // WD EDIT { if (tileRef.Tile.IsEmpty) return false; @@ -133,9 +133,12 @@ public sealed class TileSystem : EntitySystem (_robustRandom.NextFloat() - 0.5f) * bounds, (_robustRandom.NextFloat() - 0.5f) * bounds)); - //Actually spawn the relevant tile item at the right position and give it some random offset. - var tileItem = Spawn(tileDef.ItemDropPrototypeName, coordinates); - Transform(tileItem).LocalRotation = _robustRandom.NextDouble() * Math.Tau; + if (spawnTile) // WD EDIT + { + //Actually spawn the relevant tile item at the right position and give it some random offset. + var tileItem = Spawn(tileDef.ItemDropPrototypeName, coordinates); + Transform(tileItem).LocalRotation = _robustRandom.NextDouble() * Math.Tau; + } // Destroy any decals on the tile var decals = _decal.GetDecalsInRange(gridUid, coordinates.SnapToGrid(EntityManager, _mapManager).Position, 0.5f); diff --git a/Content.Shared/Slippery/SlipperySystem.cs b/Content.Shared/Slippery/SlipperySystem.cs index b841ef1c0b..8c4b3674f0 100644 --- a/Content.Shared/Slippery/SlipperySystem.cs +++ b/Content.Shared/Slippery/SlipperySystem.cs @@ -4,10 +4,12 @@ using Content.Shared.Inventory; using Content.Shared.StatusEffect; using Content.Shared.StepTrigger.Systems; using Content.Shared.Stunnable; +using Content.Shared.White; using Content.Shared.White.Mood; using JetBrains.Annotations; using Robust.Shared.Audio; using Robust.Shared.Audio.Systems; +using Robust.Shared.Configuration; using Robust.Shared.Containers; using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Systems; @@ -23,6 +25,11 @@ public sealed class SlipperySystem : EntitySystem [Dependency] private readonly StatusEffectsSystem _statusEffects = default!; [Dependency] private readonly SharedContainerSystem _container = default!; [Dependency] private readonly SharedPhysicsSystem _physics = default!; + // WD START + [Dependency] private readonly IConfigurationManager _cfg = default!; + + private float SlipPowerModifier { get; set; } + // WD END public override void Initialize() { @@ -33,6 +40,8 @@ public sealed class SlipperySystem : EntitySystem SubscribeLocalEvent(OnNoSlipAttempt); // as long as slip-resistant mice are never added, this should be fine (otherwise a mouse-hat will transfer it's power to the wearer). SubscribeLocalEvent>((e, c, ev) => OnNoSlipAttempt(e, c, ev.Args)); + + _cfg.OnValueChanged(WhiteCVars.SlipPowerModifier, x => SlipPowerModifier = x, true); // WD } private void HandleStepTrigger(EntityUid uid, SlipperyComponent component, ref StepTriggeredEvent args) @@ -73,11 +82,11 @@ public sealed class SlipperySystem : EntitySystem RaiseLocalEvent(uid, ref ev); if (TryComp(other, out PhysicsComponent? physics)) - _physics.SetLinearVelocity(other, physics.LinearVelocity * component.LaunchForwardsMultiplier, body: physics); + _physics.SetLinearVelocity(other, physics.LinearVelocity * component.LaunchForwardsMultiplier * SlipPowerModifier, body: physics); // WD EDIT var playSound = !_statusEffects.HasStatusEffect(other, "KnockedDown"); - _stun.TryParalyze(other, TimeSpan.FromSeconds(component.ParalyzeTime), true); + _stun.TryParalyze(other, TimeSpan.FromSeconds(component.ParalyzeTime * SlipPowerModifier), true); // WD EDIT RaiseLocalEvent(other, new MoodEffectEvent("MobSlipped")); // WD edit diff --git a/Content.Shared/White/WhiteCVars.cs b/Content.Shared/White/WhiteCVars.cs index 58e78741a0..e3315fc704 100644 --- a/Content.Shared/White/WhiteCVars.cs +++ b/Content.Shared/White/WhiteCVars.cs @@ -332,4 +332,7 @@ public sealed class WhiteCVars */ public static readonly CVarDef ReputationEnabled = CVarDef.Create("white.reputation_enabled", true, CVar.SERVERONLY); + + public static readonly CVarDef SlipPowerModifier = + CVarDef.Create("white.slip_power_modifier", 1.0f, CVar.REPLICATED); } diff --git a/Resources/Prototypes/Entities/Structures/Doors/Airlocks/base_structureairlocks.yml b/Resources/Prototypes/Entities/Structures/Doors/Airlocks/base_structureairlocks.yml index 6d375e9157..7643261b0e 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/Airlocks/base_structureairlocks.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/Airlocks/base_structureairlocks.yml @@ -1,4 +1,4 @@ -- type: entity +- type: entity id: Airlock parent: BaseStructure name: airlock @@ -136,6 +136,7 @@ - Airlock # This tag is used to nagivate the Airlock construction graph. It's needed because the construction graph is shared between Airlock, AirlockGlass, and HighSecDoor - type: PryUnpowered + - type: ReflectAspectMark placement: mode: SnapgridCenter diff --git a/Resources/Prototypes/Entities/Structures/Doors/Firelocks/firelock.yml b/Resources/Prototypes/Entities/Structures/Doors/Firelocks/firelock.yml index dccc76e96c..1e3eda81c3 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/Firelocks/firelock.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/Firelocks/firelock.yml @@ -107,6 +107,7 @@ - type: DoorBolt - type: AccessReader access: [ [ "Engineering" ] ] + - type: ReflectAspectMark - type: entity id: Firelock diff --git a/Resources/Prototypes/Entities/Structures/Doors/MaterialDoors/material_doors.yml b/Resources/Prototypes/Entities/Structures/Doors/MaterialDoors/material_doors.yml index 176eaf7651..f60bc74a0e 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/MaterialDoors/material_doors.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/MaterialDoors/material_doors.yml @@ -56,6 +56,7 @@ key: walls mode: NoSprite - type: Occluder + - type: ReflectAspectMark - type: entity id: MetalDoor diff --git a/Resources/Prototypes/Entities/Structures/Doors/Shutter/shutters.yml b/Resources/Prototypes/Entities/Structures/Doors/Shutter/shutters.yml index 388d4640f6..85cf7240fd 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/Shutter/shutters.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/Shutter/shutters.yml @@ -95,6 +95,7 @@ messagePerceivedByOthers: comp-window-knock interactSuccessSound: path: /Audio/Effects/glass_knock.ogg + - type: ReflectAspectMark - type: entity id: ShuttersNormal diff --git a/Resources/Prototypes/Entities/Structures/Doors/Windoors/base_structurewindoors.yml b/Resources/Prototypes/Entities/Structures/Doors/Windoors/base_structurewindoors.yml index 60d03e0091..71a2e55326 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/Windoors/base_structurewindoors.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/Windoors/base_structurewindoors.yml @@ -1,4 +1,4 @@ -- type: entity +- type: entity id: BaseWindoor parent: BaseStructure abstract: true @@ -139,6 +139,7 @@ - type: StaticPrice price: 100 - type: PryUnpowered + - type: ReflectAspectMark - type: entity id: BaseSecureWindoor diff --git a/Resources/Prototypes/Entities/Structures/Lighting/base_lighting.yml b/Resources/Prototypes/Entities/Structures/Lighting/base_lighting.yml index f5fa13e4e2..39ffb64e5f 100644 --- a/Resources/Prototypes/Entities/Structures/Lighting/base_lighting.yml +++ b/Resources/Prototypes/Entities/Structures/Lighting/base_lighting.yml @@ -60,6 +60,7 @@ max: 2 - !type:DoActsBehavior acts: ["Destruction"] + - type: LightMark placement: mode: SnapgridCenter snap: diff --git a/Resources/Prototypes/Entities/Structures/Walls/walls.yml b/Resources/Prototypes/Entities/Structures/Walls/walls.yml index 40694d918d..47c3e94e21 100644 --- a/Resources/Prototypes/Entities/Structures/Walls/walls.yml +++ b/Resources/Prototypes/Entities/Structures/Walls/walls.yml @@ -50,6 +50,7 @@ - type: RadiationBlocker resistance: 2 - type: WallMark + - type: ReflectAspectMark - type: entity parent: BaseWall diff --git a/Resources/Prototypes/Entities/Structures/Windows/plasma.yml b/Resources/Prototypes/Entities/Structures/Windows/plasma.yml index d69545f8d2..9f0d12fc31 100644 --- a/Resources/Prototypes/Entities/Structures/Windows/plasma.yml +++ b/Resources/Prototypes/Entities/Structures/Windows/plasma.yml @@ -49,6 +49,8 @@ price: 60 - type: RadiationBlocker resistance: 2 + - type: WindowMark + replacementProto: WallSolid - type: entity id: PlasmaWindowDirectional diff --git a/Resources/Prototypes/Entities/Structures/Windows/reinforced.yml b/Resources/Prototypes/Entities/Structures/Windows/reinforced.yml index c7837a5c6c..d0366b813f 100644 --- a/Resources/Prototypes/Entities/Structures/Windows/reinforced.yml +++ b/Resources/Prototypes/Entities/Structures/Windows/reinforced.yml @@ -48,6 +48,8 @@ trackAllDamage: true damageOverlay: sprite: Structures/Windows/cracks.rsi + - type: WindowMark + replacementProto: WallReinforced - type: entity parent: ReinforcedWindow diff --git a/Resources/Prototypes/Entities/Structures/Windows/rplasma.yml b/Resources/Prototypes/Entities/Structures/Windows/rplasma.yml index bdc75b14a9..d6e236f8d8 100644 --- a/Resources/Prototypes/Entities/Structures/Windows/rplasma.yml +++ b/Resources/Prototypes/Entities/Structures/Windows/rplasma.yml @@ -52,6 +52,8 @@ sprite: Structures/Windows/cracks.rsi - type: StaticPrice price: 132 + - type: WindowMark + replacementProto: WallReinforced - type: entity id: PlasmaReinforcedWindowDirectional diff --git a/Resources/Prototypes/Entities/Structures/Windows/ruranium.yml b/Resources/Prototypes/Entities/Structures/Windows/ruranium.yml index 84c978fff0..f31a41b8e6 100644 --- a/Resources/Prototypes/Entities/Structures/Windows/ruranium.yml +++ b/Resources/Prototypes/Entities/Structures/Windows/ruranium.yml @@ -52,6 +52,8 @@ price: 140 - type: RadiationBlocker resistance: 5 + - type: WindowMark + replacementProto: WallReinforced - type: entity parent: ReinforcedUraniumWindow diff --git a/Resources/Prototypes/Entities/Structures/Windows/shuttle.yml b/Resources/Prototypes/Entities/Structures/Windows/shuttle.yml index 835f5ce528..84b86b067d 100644 --- a/Resources/Prototypes/Entities/Structures/Windows/shuttle.yml +++ b/Resources/Prototypes/Entities/Structures/Windows/shuttle.yml @@ -53,6 +53,8 @@ sprite: Structures/Windows/cracks.rsi - type: StaticPrice price: 100 + - type: WindowMark + replacementProto: WallShuttle - type: entity parent: ShuttleWindow diff --git a/Resources/Prototypes/Entities/Structures/Windows/uranium.yml b/Resources/Prototypes/Entities/Structures/Windows/uranium.yml index a11ca62586..f8968bea1c 100644 --- a/Resources/Prototypes/Entities/Structures/Windows/uranium.yml +++ b/Resources/Prototypes/Entities/Structures/Windows/uranium.yml @@ -50,6 +50,8 @@ price: 80 - type: RadiationBlocker resistance: 3 + - type: WindowMark + replacementProto: WallSolid - type: entity parent: UraniumWindow diff --git a/Resources/Prototypes/Entities/Structures/Windows/window.yml b/Resources/Prototypes/Entities/Structures/Windows/window.yml index bbd5718e5d..678662dd0e 100644 --- a/Resources/Prototypes/Entities/Structures/Windows/window.yml +++ b/Resources/Prototypes/Entities/Structures/Windows/window.yml @@ -86,6 +86,9 @@ sprite: Structures/Windows/cracks.rsi - type: StaticPrice price: 100 + - type: ReflectAspectMark + - type: WindowMark + replacementProto: WallSolid - type: entity id: WindowDirectional @@ -175,6 +178,7 @@ sprite: Structures/Windows/cracks_directional.rsi - type: StaticPrice price: 10 + - type: ReflectAspectMark - type: entity id: WindowFrostedDirectional diff --git a/Resources/Prototypes/White/Aspects/Aspects.yml b/Resources/Prototypes/White/Aspects/Aspects.yml index ed71777668..d9132fd454 100644 --- a/Resources/Prototypes/White/Aspects/Aspects.yml +++ b/Resources/Prototypes/White/Aspects/Aspects.yml @@ -206,3 +206,136 @@ path: /Audio/White/Aspects/accent.ogg forbidden: true - type: DancingAspect + +- type: entity + id: ReflectAspect + parent: BaseGameRule + noSpawn: true + components: + - type: Aspect + name: "Reflect" + description: "Ваше отражение повсюду." + weight: 2 + startAudio: + path: /Audio/White/Aspects/accent.ogg + - type: ReflectAspect + +- type: entity + id: SlipperyAspect + parent: BaseGameRule + noSpawn: true + components: + - type: Aspect + name: "Slippery" + description: "Постарайтесь не поскальзываться!" + weight: 2 + startAudio: + path: /Audio/White/Aspects/accent.ogg + - type: SlipperyAspect + +- type: entity + id: TraitorRichAspect + parent: BaseGameRule + noSpawn: true + components: + - type: Aspect + name: "Extra TC" + description: "Синдикат выделил 10 дополнительных телекристаллов для предателей." + requires: "Traitors" + weight: 2 + hidden: true + - type: TraitorRichAspect + +- type: entity + id: WhisperAspect + parent: BaseGameRule + noSpawn: true + components: + - type: Aspect + name: "Whisper" + description: "Из-за боли в горле речь дается вам с трудом." + weight: 3 + startAudio: + path: /Audio/White/Aspects/accent.ogg + - type: WhisperAspect + +- type: entity + id: DarknessAspect + parent: BaseGameRule + noSpawn: true + components: + - type: Aspect + name: "Darkness" + description: "Почему все так темно?" + weight: 2 + startAudio: + path: /Audio/White/Aspects/accent.ogg + - type: DarknessAspect + +- type: entity + id: StolenFloorAspect + parent: BaseGameRule + noSpawn: true + components: + - type: Aspect + name: "Stolen Floor" + description: "Рабочие забыли положить плитку при строительстве станции." + weight: 3 + startAudio: + path: /Audio/White/Aspects/accent.ogg + - type: StolenFloorAspect + +- type: entity + id: WindowLeakAspect + parent: BaseGameRule + noSpawn: true + components: + - type: Aspect + name: "Are We In Dungeon" + description: "В связи с невероятной хрупкостью окон было решено заменить их на стены." + weight: 3 + startAudio: + path: /Audio/White/Aspects/accent.ogg + - type: WindowLeakAspect + +- type: entity + id: CatEarsAspect + parent: BaseGameRule + noSpawn: true + components: + - type: Aspect + name: "Cat Ears And Tail" + description: "Мяукайте." + weight: 3 + startAudio: + path: /Audio/White/Aspects/accent.ogg + - type: CatEarsAspect + +- type: entity + id: NothingAspect + parent: BaseGameRule + noSpawn: true + components: + - type: Aspect + name: "Nothing" + description: "Ничего." + weight: 3 + startAudio: + path: /Audio/White/Aspects/accent.ogg + forbidden: true + hidden: true + - type: NothingAspect + +# Disabled this cause polymorph breaks stuff +#- type: entity +# id: SkeletonAspect +# parent: BaseGameRule +# noSpawn: true +# components: +# - type: Aspect +# name: "Skeletons" +# description: "АЧК АЧК!" +# weight: 1 +# startAudio: +# path: /Audio/White/Aspects/accent.ogg +# - type: SkeletonAspect diff --git a/Resources/Prototypes/White/polymorphs.yml b/Resources/Prototypes/White/polymorphs.yml new file mode 100644 index 0000000000..fb19ce2e3f --- /dev/null +++ b/Resources/Prototypes/White/polymorphs.yml @@ -0,0 +1,10 @@ +- type: polymorph + id: AspectForcedSkeleton + entity: MobSkeletonPerson + forced: true + inventory: Transfer + transferName: true + transferDamage: true + transferHumanoidAppearance: true + revertOnCrit: false + revertOnDeath: false