Removable mindshields and revolutionary tweaks. (#35769)

* I fucking hate revs

* Update preset-revolutionary.ftl

* fixy fix
This commit is contained in:
ScarKy0
2025-03-11 10:41:13 +01:00
committed by GitHub
parent 314b64226c
commit 4d98b9d621
6 changed files with 54 additions and 25 deletions

View File

@@ -189,7 +189,7 @@ public sealed class RevolutionaryRuleSystem : GameRuleSystem<RevolutionaryRuleCo
commandList.Add(id);
}
return IsGroupDetainedOrDead(commandList, true, true);
return IsGroupDetainedOrDead(commandList, true, true, true);
}
private void OnHeadRevMobStateChanged(EntityUid uid, HeadRevolutionaryComponent comp, MobStateChangedEvent ev)
@@ -214,7 +214,7 @@ public sealed class RevolutionaryRuleSystem : GameRuleSystem<RevolutionaryRuleCo
// If no Head Revs are alive all normal Revs will lose their Rev status and rejoin Nanotrasen
// Cuffing Head Revs is not enough - they must be killed.
if (IsGroupDetainedOrDead(headRevList, false, false))
if (IsGroupDetainedOrDead(headRevList, false, false, false))
{
var rev = AllEntityQuery<RevolutionaryComponent, MindContainerComponent>();
while (rev.MoveNext(out var uid, out _, out var mc))
@@ -251,34 +251,45 @@ public sealed class RevolutionaryRuleSystem : GameRuleSystem<RevolutionaryRuleCo
/// <param name="list">The list of the entities</param>
/// <param name="checkOffStation">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)</param>
/// <param name="countCuffed">Bool for if you don't want to count cuffed entities.</param>
/// <param name="countRevolutionaries">Bool for if you want to count revolutionaries.</param>
/// <returns></returns>
private bool IsGroupDetainedOrDead(List<EntityUid> list, bool checkOffStation, bool countCuffed)
private bool IsGroupDetainedOrDead(List<EntityUid> list, bool checkOffStation, bool countCuffed, bool countRevolutionaries)
{
var gone = 0;
foreach (var entity in list)
{
if (TryComp<CuffableComponent>(entity, out var cuffed) && cuffed.CuffedHandCount > 0 && countCuffed)
{
gone++;
continue;
}
else
if (TryComp<MobStateComponent>(entity, out var state))
{
if (TryComp<MobStateComponent>(entity, out var state))
{
if (state.CurrentState == MobState.Dead || state.CurrentState == MobState.Invalid)
{
gone++;
}
else if (checkOffStation && _stationSystem.GetOwningStation(entity) == null && !_emergencyShuttle.EmergencyShuttleArrived)
{
gone++;
}
}
//If they don't have the MobStateComponent they might as well be dead.
else
if (state.CurrentState == MobState.Dead || state.CurrentState == MobState.Invalid)
{
gone++;
continue;
}
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<RevolutionaryComponent>(entity) || HasComp<HeadRevolutionaryComponent>(entity)) && countRevolutionaries)
{
gone++;
continue;
}
}

View File

@@ -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<SubdermalImplantComponent, ImplantImplantedEvent>(ImplantCheck);
SubscribeLocalEvent<MindShieldImplantComponent, EntGotRemovedFromContainerMessage>(OnImplantDraw);
}
/// <summary>
@@ -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<MindShieldImplantComponent> ent, ref EntGotRemovedFromContainerMessage args)
{
RemComp<MindShieldComponent>(args.Container.Owner);
}
}

View File

@@ -0,0 +1,10 @@
using Content.Shared.Revolutionary;
using Robust.Shared.GameStates;
namespace Content.Shared.Mindshield.Components;
/// <summary>
/// Component given to an entity to mark it is a mindshield implant.
/// </summary>
[RegisterComponent, NetworkedComponent, Access(typeof(SharedRevolutionarySystem))]
public sealed partial class MindShieldImplantComponent : Component;

View File

@@ -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.

View File

@@ -344,7 +344,7 @@
categories: [ HideSpawnMenu ]
components:
- type: SubdermalImplant
permanent: true
- type: MindShieldImplant
- type: Tag
tags:
- MindShield

View File

@@ -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]
<Box>
<GuideEntityEmbed Entity="MindShieldImplanter"/>