From: ScarKy0 <106310278+ScarKy0@users.noreply.github.com> Date: Tue, 11 Mar 2025 09:41:13 +0000 (+0100) Subject: Removable mindshields and revolutionary tweaks. (#35769) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=4d98b9d621e56215f270c7079669c1554019e011;p=space-station-14.git Removable mindshields and revolutionary tweaks. (#35769) * I fucking hate revs * Update preset-revolutionary.ftl * fixy fix --- diff --git a/Content.Server/GameTicking/Rules/RevolutionaryRuleSystem.cs b/Content.Server/GameTicking/Rules/RevolutionaryRuleSystem.cs index a313b78eaf..9ec932b06f 100644 --- a/Content.Server/GameTicking/Rules/RevolutionaryRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/RevolutionaryRuleSystem.cs @@ -189,7 +189,7 @@ public sealed class RevolutionaryRuleSystem : GameRuleSystem(); while (rev.MoveNext(out var uid, out _, out var mc)) @@ -251,35 +251,46 @@ public sealed class RevolutionaryRuleSystem : GameRuleSystemThe list of the entities /// Bool for if you want to check if someone is in space and consider them missing in action. (Won't check when emergency shuttle arrives just in case) /// Bool for if you don't want to count cuffed entities. + /// Bool for if you want to count revolutionaries. /// - private bool IsGroupDetainedOrDead(List list, bool checkOffStation, bool countCuffed) + private bool IsGroupDetainedOrDead(List list, bool checkOffStation, bool countCuffed, bool countRevolutionaries) { var gone = 0; + foreach (var entity in list) { if (TryComp(entity, out var cuffed) && cuffed.CuffedHandCount > 0 && countCuffed) { gone++; + continue; } - else + + if (TryComp(entity, out var state)) { - if (TryComp(entity, out var state)) + if (state.CurrentState == MobState.Dead || state.CurrentState == MobState.Invalid) { - if (state.CurrentState == MobState.Dead || state.CurrentState == MobState.Invalid) - { - gone++; - } - else if (checkOffStation && _stationSystem.GetOwningStation(entity) == null && !_emergencyShuttle.EmergencyShuttleArrived) - { - gone++; - } + gone++; + continue; } - //If they don't have the MobStateComponent they might as well be dead. - else + + if (checkOffStation && _stationSystem.GetOwningStation(entity) == null && !_emergencyShuttle.EmergencyShuttleArrived) { gone++; + continue; } } + //If they don't have the MobStateComponent they might as well be dead. + else + { + gone++; + continue; + } + + if ((HasComp(entity) || HasComp(entity)) && countRevolutionaries) + { + gone++; + continue; + } } return gone == list.Count || list.Count == 0; diff --git a/Content.Server/Mindshield/MindShieldSystem.cs b/Content.Server/Mindshield/MindShieldSystem.cs index bfca6c008e..63d6bf097e 100644 --- a/Content.Server/Mindshield/MindShieldSystem.cs +++ b/Content.Server/Mindshield/MindShieldSystem.cs @@ -8,6 +8,7 @@ using Content.Shared.Implants.Components; using Content.Shared.Mindshield.Components; using Content.Shared.Revolutionary.Components; using Content.Shared.Tag; +using Robust.Shared.Containers; namespace Content.Server.Mindshield; @@ -29,6 +30,7 @@ public sealed class MindShieldSystem : EntitySystem { base.Initialize(); SubscribeLocalEvent(ImplantCheck); + SubscribeLocalEvent(OnImplantDraw); } /// @@ -61,4 +63,10 @@ public sealed class MindShieldSystem : EntitySystem _adminLogManager.Add(LogType.Mind, LogImpact.Medium, $"{ToPrettyString(implanted)} was deconverted due to being implanted with a Mindshield."); } } + + private void OnImplantDraw(Entity ent, ref EntGotRemovedFromContainerMessage args) + { + RemComp(args.Container.Owner); + } } + diff --git a/Content.Shared/Mindshield/Components/MindShieldImplantComponent.cs b/Content.Shared/Mindshield/Components/MindShieldImplantComponent.cs new file mode 100644 index 0000000000..09de4467be --- /dev/null +++ b/Content.Shared/Mindshield/Components/MindShieldImplantComponent.cs @@ -0,0 +1,10 @@ +using Content.Shared.Revolutionary; +using Robust.Shared.GameStates; + +namespace Content.Shared.Mindshield.Components; + +/// +/// Component given to an entity to mark it is a mindshield implant. +/// +[RegisterComponent, NetworkedComponent, Access(typeof(SharedRevolutionarySystem))] +public sealed partial class MindShieldImplantComponent : Component; diff --git a/Resources/Locale/en-US/game-ticking/game-presets/preset-revolutionary.ftl b/Resources/Locale/en-US/game-ticking/game-presets/preset-revolutionary.ftl index 15b53cf14b..83edfd4d69 100644 --- a/Resources/Locale/en-US/game-ticking/game-presets/preset-revolutionary.ftl +++ b/Resources/Locale/en-US/game-ticking/game-presets/preset-revolutionary.ftl @@ -5,28 +5,28 @@ roles-antag-rev-head-objective = Your objective is to take over the station by c head-rev-role-greeting = You are a Head Revolutionary. - You are tasked with removing all of Command from station via death, exilement or imprisonment. + You are tasked with removing all of Command from station via conversion, death or imprisonment. The Syndicate has sponsored you with a flash that converts the crew to your side. - Beware, this won't work on Security, Command, or those wearing sunglasses. + Beware, this won't work on those with a mindshield or wearing eye protection. Viva la revolución! head-rev-briefing = Use flashes to convert people to your cause. - Get rid of all heads to take over the station. + Get rid of or convert all heads to take over the station. head-rev-break-mindshield = The Mindshield was destroyed! ## Rev roles-antag-rev-name = Revolutionary -roles-antag-rev-objective = Your objective is to ensure the safety and follow the orders of the Head Revolutionaries as well as getting rid of all Command staff on station. +roles-antag-rev-objective = Your objective is to ensure the safety and follow the orders of the Head Revolutionaries as well as getting rid or converting of all Command staff on station. rev-break-control = {$name} has remembered their true allegiance! rev-role-greeting = You are a Revolutionary. You are tasked with taking over the station and protecting the Head Revolutionaries. - Get rid of all of the Command staff. + Get rid of all of or convert the Command staff. Viva la revolución! rev-briefing = Help your head revolutionaries get rid of every head to take over the station. diff --git a/Resources/Prototypes/Entities/Objects/Misc/subdermal_implants.yml b/Resources/Prototypes/Entities/Objects/Misc/subdermal_implants.yml index c4e2701769..7336f2726f 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/subdermal_implants.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/subdermal_implants.yml @@ -344,7 +344,7 @@ categories: [ HideSpawnMenu ] components: - type: SubdermalImplant - permanent: true + - type: MindShieldImplant - type: Tag tags: - MindShield diff --git a/Resources/ServerInfo/Guidebook/Antagonist/Revolutionaries.xml b/Resources/ServerInfo/Guidebook/Antagonist/Revolutionaries.xml index 9bc0b28068..c2ff931f85 100644 --- a/Resources/ServerInfo/Guidebook/Antagonist/Revolutionaries.xml +++ b/Resources/ServerInfo/Guidebook/Antagonist/Revolutionaries.xml @@ -11,7 +11,7 @@ Revolutionaries are conversion antagonists sponsored by the [color=#ff0000]Syndicate[/color] who are tasked with taking control of the station. They have no fancy gimmicks or cheap tricks, they only have a cause and strength in numbers. ## Objectives - You must cuff, kill, or exile all of the [textlink="Command staff" link="Command"] on station in no particular order. + You must convert, cuff or kill all of the [textlink="Command staff" link="Command"] on station in no particular order. Your objective is [bold]not to destroy the station[/bold], but [italic]to take it over[/italic], so try to minimize damage where possible. @@ -40,7 +40,7 @@ - [bold]Visibly be destroyed upon being implanted into a [color=#5e9cff]Head Revolutionary[/color][/bold], giving you away - NOT protect against flash disorientation - Assume all of [color=#cb0000]Security[/color] and [color=#1b67a5]Command[/color] are implanted with mindshields already. + Assume all of [color=#cb0000]Security[/color] and [color=#1b67a5]Command[/color] are implanted with mindshields already, [bold]however they can be removed using an empty implanter, obtainable from the Medical department's MedFab.[/bold]