Skip to content

Commit

Permalink
Emaging borgs and sometimes ion storms will remove a borgs censored a…
Browse files Browse the repository at this point in the history
…ccent
  • Loading branch information
ewokswagger committed Oct 28, 2024
1 parent e2ed9fe commit 3128c0e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Content.Server/Silicons/Borgs/BorgSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
using Content.Server.Explosion.EntitySystems;
using Content.Server.Hands.Systems;
using Content.Server.PowerCell;
using Content.Server.DeltaV.Speech.Components;
using Content.Shared.Access.Systems;
using Content.Shared.Alert;
using Content.Shared.Database;
using Content.Shared.Emag.Systems;
using Content.Shared.IdentityManagement;
using Content.Shared.Interaction;
using Content.Shared.Item.ItemToggle.Components;
Expand Down Expand Up @@ -74,6 +76,7 @@ public override void Initialize()
SubscribeLocalEvent<BorgChassisComponent, PowerCellSlotEmptyEvent>(OnPowerCellSlotEmpty);
SubscribeLocalEvent<BorgChassisComponent, GetCharactedDeadIcEvent>(OnGetDeadIC);
SubscribeLocalEvent<BorgChassisComponent, ItemToggledEvent>(OnToggled);
SubscribeLocalEvent<CensoredAccentComponent, GotEmaggedEvent>(OnGotEmagged);

SubscribeLocalEvent<BorgBrainComponent, MindAddedMessage>(OnBrainMindAdded);
SubscribeLocalEvent<BorgBrainComponent, PointAttemptEvent>(OnBrainPointAttempt);
Expand Down Expand Up @@ -137,6 +140,12 @@ private void OnChassisInteractUsing(EntityUid uid, BorgChassisComponent componen
}
}

//emagged borgs will not have the chat censorship of NT borgs
protected void OnGotEmagged(EntityUid uid, CensoredAccentComponent component, ref GotEmaggedEvent args)
{
EntityManager.RemoveComponent<CensoredAccentComponent>(uid);
}

// todo: consider transferring over the ghost role? managing that might suck.
protected override void OnInserted(EntityUid uid, BorgChassisComponent component, EntInsertedIntoContainerMessage args)
{
Expand Down
8 changes: 8 additions & 0 deletions Content.Server/StationEvents/Events/IonStormRule.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Linq;
using Content.Server.DeltaV.Speech.Components;
using Content.Server.Silicons.Laws;
using Content.Server.StationEvents.Components;
using Content.Shared.Administration.Logs;
Expand All @@ -11,6 +12,7 @@
using Content.Shared.Silicons.Laws;
using Content.Shared.Silicons.Laws.Components;
using Content.Shared.Station.Components;
using Robust.Shared.GameObjects;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;

Expand Down Expand Up @@ -168,6 +170,12 @@ protected override void Started(EntityUid uid, IonStormRuleComponent comp, GameR
EnsureComp<SiliconLawProviderComponent>(ent);
var ev = new IonStormLawsEvent(laws);
RaiseLocalEvent(ent, ref ev);

// try to remove borg cencorship filter
if (RobustRandom.Prob(target.RemoveAccentChance))
{
EntityManager.RemoveComponent<CensoredAccentComponent>(ent);
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ public sealed partial class IonStormTargetComponent : Component
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float ShuffleChance = 0.2f;

/// <summary>
/// Chance to remove the borg censorship filter
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float RemoveAccentChance = 0.2f;
}

/// <summary>
Expand Down

0 comments on commit 3128c0e

Please sign in to comment.