Skip to content

Commit

Permalink
Upstream Merge (#515)
Browse files Browse the repository at this point in the history
* fix feeding unremovable items (#21234)

* Automatic changelog update

* Power switchable refactor (#20419)

Co-authored-by: deltanedas <@deltanedas:kde.org>

* simple space mobs cant be flashed (#20784)

Co-authored-by: deltanedas <@deltanedas:kde.org>

* give roundstart borgs names (#20081)

Co-authored-by: deltanedas <@deltanedas:kde.org>

* fix searching on vending machines (#21233)

* syndicate snack box (#21024)

Co-authored-by: deltanedas <@deltanedas:kde.org>

* Fix DockingControl (#21238)

* Shadow Dimension visual pack (#21237)

Co-authored-by: metalgearsloth <[email protected]>

* Potato battery update + potato AI (#21142)

Co-authored-by: metalgearsloth <[email protected]>

* [TEST MERGE] Slot-based Storage (#21212)

* Automatic changelog update

* Some mild item size balancing + fixes (#21250)

* Automatic changelog update

* Revert "Storage TEST MERGE" (#21258)

* Add missing changelog for storage refactor revert (#21259)

* Automatic changelog update

* BBQ rib sandwich (#21180)

* Fix missing toggle fullscreen loc string (#21264)

* Cave Decoration pack  (#21265)

* add chromite chasm

* add desert chasm

* snow chasm

* finish

* fixes and tweaks (#21172)

* Automatic changelog update

* Fix ItemPlacer (#21160)

This is going to lead to many entities being ticked unnecessarily and performance problems.

* headrev spawn music (#21119)

* headrev spawn music

* :trollface:

* skill issue

* double skill issue

* :trollface:

* :trollface:

* :trollface:

* Automatic changelog update

* Techfab resprite + department fab sprites (#21136)

* Fix popup messages appearing when someone tries to open a door without a tool. (#21099)

* The fixTM

* typo fix

* addressing review

* Show "departed and moved on" for when a ghost role is taken (#21092)

* fix ghost role not counting for "departed and moved on"

* I don't think that bit was needed so away it goes

* hopefully finish the upsream merge

* Automatic changelog update

* Implant whitelist/blacklisting (#20678)

* add whitelist and blacklist to implant and implanter components

* handle whitelist and blacklist in systems

* move hardcoded whitelist/blacklist to base implanter + add admeme implanter

* give implants sensible whitelists

* cleaner CheckTarget and fix

* remove unused imports

* network lists

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>

* Automatic changelog update

* Ion storm event (#20277)

* ion storm event prototype + locale

* add lawsets

* use lawsets, make borgs ion storm targets

* ion storm rule and ion storm target

* lawset prototype

* use lawsets

* update silicon law system to use lawsets and support ion storm event

* new toys

* fix

* more fix

* fixy

* ion storm admin logging

* assigning laws makes borg provide its own laws, other stuff

* 1h reoccurence

* 50% chance

* better call saul

* emagLaws is required

* add announcment audio

* fixy

* family friendly gaming

* fixy

* address reviews

* fixy

* more fixy and no erp

* pro

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>

* Automatic changelog update

* A return to foam (foam rework) (#20831)

* Automatic changelog update

* ERT Loadout overhaul + Real deathsquad mobs + ERT fixes (#21230)

* "assist with medical efforts"

* CentComm official description change

* give cburn ert mask

* Ert medic hardsuit uses blood-red medic values

* description changes, they all used to use the blood-red description

* ert engineer hardsuit uses cburn values, good for handling all possible engineering problems.

* janitor hardsuit uses cburn values for extreme messes, otherwise we'd send the non eva variant.

* spawn suffix changes

* shorten suffix

* drop armor from ert jumpsuits

* drop armor from DS jumpsuit

* add more armor to death squad to make up for removed armor in the uniform.

* give sec gas masks armor, give syndicate gas masks armor. ERT gas mask uses syndicate mask values

* add nanotrasen

* removed duplicate

* give centcom IDs their hud icon

* replace all ert bulletproof armor with basic universal armor

* replace all oxygen tanks with air tanks; species is random.

* remove gun and meds from ert engineer kit

* give ert engineer materials

* remove weapons and meds from janitor ert

* give ert janitor light replacer

* remove ert sec pulse weapons, admins will assign loadout. Either the lecter or enforcer, probably.

* Give ert sec the security pistol kit

* typo

* give eva ert sec pistol

* give eva janitor ert gas mask

* give jani purple gloves

* medical gloves for medical ert

* replicate security loadout to leader

* quick ert lecter spawns for lazy admins

* better suffixes to find them easier

* add cburn to ertspawn

* Replace "Spawn" with "role"

* Add death squad. Give ert engineer gas analyzer.

* death squad using wrong equipment

* typo

* missing ghost roles on lecter loadouts

* add freedom implanter to deathsquad

* deathsquad ghost role text

* Operative sounds better

* give Ds flashbang box (why isn't it entirely filled?)

* fix typo. add energy shield to DS

* fix typos

* all centcomm roles are now mindshielded. These cannot be removed.

* Rider didnt include some of the changes ?

* give zipties instead of cuffs for mass arrests!

* upgrade ERT survival boxes to extended capacity

* give cburn extended oxygen too

* Automatic changelog update

* Restore Leviathan's 80 pop cap (#21281)

* Un-revert IPlayerManager refactor (#21244)

* Update engine to v172.0.0 (#21288)

* Bandaid tests (#21292)

* rename the rocks (#21275)

* Make crystals noRot (#21279)

IDK might be better. Ideally the anchoring would be offset 0-0 but this is the world we live in atm.

* Fix nukies sound not played  (#21268)

* Play sound and sending greeting message works for nukies now!!!!!

* oops

* silly change

* Automatic changelog update

* Fix hijack objective (#21241)

* Fix hijack

* Max difficulty

* Remove GridModifiedEvent (#21291)

* Update submodule to 173.0.0 (#21296)

* Fix namespace error (#21298)

* Update yaml sequence option in editorconfig (#21297)

* Fix namespace (#21299)

* fix cburn bag issue, make new bag entity for them and filled bag entity (#21295)

* Health analyzer UI improve (#17280)

* Automatic changelog update

* User accessible playtime (#21242)

Co-authored-by: metalgearsloth <[email protected]>

* Automatic changelog update

* Moves cloning comp & cloning event to shared (#21253)

* Generalizes solution overflow & slightly increases space lube yield (#21094)

* generalize SolutionSpikeOverflowEvent

* let reactions overflow

* spacelube: 3 -> 5

* restore TryMixAndOverflow threshold cap

* Automatic changelog update

* Move ActorComponent to shared (#21293)

* Update engine to v174.0.0 (#21311)

* Fix planet command help message (#21312)

* Wearable bee plush (#20623)

* add

* fix

* temporary change, needs fixing

* mayb fix

* actually fix FR

* yes

* Automatic changelog update

* remove pulse rifle from ert medic (#21310)

* Content audio (#20862)

* Automatic changelog update

* Update submodule to 175.0.0 (#21318)

* Revert "Update submodule to 175.0.0 (#21318)" (#21319)

* Atomic bomb add uranium  (#21143)

* fix: Incendiary bullets no longer deal cold, acid, or shock damage that ignores all armor.

* Atomic bomb

* Action bugfixes (#21321)

* Disable OOC during round (#21323)

* Fix PDA notifications when creating a news entry using the Mass-Media console. (#21320)

* Automatic changelog update

* Update belt.yml (#21317)

changes the chief engineer's belt to remove the lv wires (they take up a lot of space and are easy to get anyways) in exchange for a holofan, a t-ray, and a gas analyzer (first time coding ever this might have to be edited)

* New foam sprites (edge sprites) (#21308)

* New foam sprites (icon smoothing)

* changed to edge sprites for foam

* fix

* edges for metal foams

* fix

* Fix bola stam damage, bring back old construction requirements (#21340)

* Automatic changelog update

* Added thermal insulation to flannel jackets (#21273)

* Automatic changelog update

* Space Asshole Gear (#21243)

* Add Space Asshole Coat

* Add sledgehammer

* Adjust sledgehammer damage values

* Add copyright string to sledgehammer

* Fix broken slot highlight in midnight theme. (#21331)

* Update Patrons.yml (#21344)

* Thicken thindow bounds (#21280)

* Automatic changelog update

* changelist

* player manager and borg laws and engi fab

---------

Co-authored-by: Nemanja <[email protected]>
Co-authored-by: PJBot <[email protected]>
Co-authored-by: deltanedas <[email protected]>
Co-authored-by: metalgearsloth <[email protected]>
Co-authored-by: Ed <[email protected]>
Co-authored-by: Doru991 <[email protected]>
Co-authored-by: metalgearsloth <[email protected]>
Co-authored-by: DrSmugleaf <[email protected]>
Co-authored-by: chromiumboy <[email protected]>
Co-authored-by: faint <[email protected]>
Co-authored-by: nmajask <[email protected]>
Co-authored-by: JoeHammad1844 <[email protected]>
Co-authored-by: nikthechampiongr <[email protected]>
Co-authored-by: crazybrain23 <[email protected]>
Co-authored-by: Whisper <[email protected]>
Co-authored-by: Chief-Engineer <[email protected]>
Co-authored-by: Leon Friedrich <[email protected]>
Co-authored-by: Morb <[email protected]>
Co-authored-by: Artjom <[email protected]>
Co-authored-by: Repo <[email protected]>
Co-authored-by: keronshb <[email protected]>
Co-authored-by: TemporalOroboros <[email protected]>
Co-authored-by: Ubaser <[email protected]>
Co-authored-by: kerisargit <[email protected]>
Co-authored-by: Simon <[email protected]>
Co-authored-by: Yousifb26 <[email protected]>
Co-authored-by: brainfood1183 <[email protected]>
Co-authored-by: Subversionary <[email protected]>
Co-authored-by: Psychpsyo <[email protected]>
  • Loading branch information
1 parent 7c02b87 commit 1cb3504
Show file tree
Hide file tree
Showing 605 changed files with 6,337 additions and 3,336 deletions.
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -338,5 +338,8 @@ dotnet_naming_symbols.type_parameters_symbols.applicable_kinds = type_parameter
resharper_braces_for_ifelse = required_for_multiline
resharper_keep_existing_attribute_arrangement = true

[*.{csproj,xml,yml,dll.config,msbuildproj,targets}]
[*.{csproj,xml,yml,yaml,dll.config,msbuildproj,targets}]
indent_size = 2

[{*.yaml,*.yml}]
ij_yaml_indent_sequence_value = false
9 changes: 4 additions & 5 deletions Content.Client/Actions/ActionsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Linq;
using Content.Shared.Actions;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
using Robust.Client.Player;
using Robust.Shared.ContentPack;
using Robust.Shared.GameStates;
Expand Down Expand Up @@ -41,8 +40,8 @@ public sealed class ActionsSystem : SharedActionsSystem
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<ActionsComponent, PlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<ActionsComponent, PlayerDetachedEvent>(OnPlayerDetached);
SubscribeLocalEvent<ActionsComponent, LocalPlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<ActionsComponent, LocalPlayerDetachedEvent>(OnPlayerDetached);
SubscribeLocalEvent<ActionsComponent, ComponentHandleState>(HandleComponentState);

SubscribeLocalEvent<InstantActionComponent, ComponentHandleState>(OnInstantHandleState);
Expand Down Expand Up @@ -196,12 +195,12 @@ protected override void ActionRemoved(EntityUid performer, EntityUid actionId, A
return GetActions(user);
}

private void OnPlayerAttached(EntityUid uid, ActionsComponent component, PlayerAttachedEvent args)
private void OnPlayerAttached(EntityUid uid, ActionsComponent component, LocalPlayerAttachedEvent args)
{
LinkAllActions(component);
}

private void OnPlayerDetached(EntityUid uid, ActionsComponent component, PlayerDetachedEvent? args = null)
private void OnPlayerDetached(EntityUid uid, ActionsComponent component, LocalPlayerDetachedEvent? args = null)
{
UnlinkAllActions();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Robust.Client.Player;
using Robust.Shared.ContentPack;
using Robust.Shared.Network;
using Robust.Shared.Players;
using Robust.Shared.Player;
using Robust.Shared.Utility;

namespace Content.Client.Administration.Managers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.IoC;
using Robust.Shared.Players;

namespace Content.Client.Administration.UI.Tabs.AdminTab
{
Expand Down
9 changes: 4 additions & 5 deletions Content.Client/Alerts/ClientAlertsSystem.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System.Linq;
using Content.Shared.Alert;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
using Robust.Client.Player;
using Robust.Shared.Prototypes;

Expand All @@ -22,8 +21,8 @@ public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<AlertsComponent, PlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<AlertsComponent, PlayerDetachedEvent>(OnPlayerDetached);
SubscribeLocalEvent<AlertsComponent, LocalPlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<AlertsComponent, LocalPlayerDetachedEvent>(OnPlayerDetached);

SubscribeLocalEvent<AlertsComponent, AfterAutoHandleStateEvent>(ClientAlertsHandleState);
}
Expand Down Expand Up @@ -69,7 +68,7 @@ private void ClientAlertsHandleState(EntityUid uid, AlertsComponent component, r
SyncAlerts?.Invoke(this, component.Alerts);
}

private void OnPlayerAttached(EntityUid uid, AlertsComponent component, PlayerAttachedEvent args)
private void OnPlayerAttached(EntityUid uid, AlertsComponent component, LocalPlayerAttachedEvent args)
{
if (_playerManager.LocalPlayer?.ControlledEntity != uid)
return;
Expand All @@ -87,7 +86,7 @@ protected override void HandleComponentShutdown(EntityUid uid, AlertsComponent c
ClearAlerts?.Invoke(this, EventArgs.Empty);
}

private void OnPlayerDetached(EntityUid uid, AlertsComponent component, PlayerDetachedEvent args)
private void OnPlayerDetached(EntityUid uid, AlertsComponent component, LocalPlayerDetachedEvent args)
{
ClearAlerts?.Invoke(this, EventArgs.Empty);
}
Expand Down
12 changes: 0 additions & 12 deletions Content.Client/CharacterInfo/CharacterInfoSystem.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Content.Shared.CharacterInfo;
using Content.Shared.Objectives;
using Robust.Client.GameObjects;
using Robust.Client.Player;
using Robust.Client.UserInterface;

Expand All @@ -11,14 +10,11 @@ public sealed class CharacterInfoSystem : EntitySystem
[Dependency] private readonly IPlayerManager _players = default!;

public event Action<CharacterData>? OnCharacterUpdate;
public event Action? OnCharacterDetached;

public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<PlayerAttachSysMessage>(OnPlayerAttached);

SubscribeNetworkEvent<CharacterInfoEvent>(OnCharacterInfoEvent);
}

Expand All @@ -33,14 +29,6 @@ public void RequestCharacterInfo()
RaiseNetworkEvent(new RequestCharacterInfoEvent(GetNetEntity(entity.Value)));
}

private void OnPlayerAttached(PlayerAttachSysMessage msg)
{
if (msg.AttachedEntity == default)
{
OnCharacterDetached?.Invoke();
}
}

private void OnCharacterInfoEvent(CharacterInfoEvent msg, EntitySessionEventArgs args)
{
var entity = GetEntity(msg.NetEntity);
Expand Down
23 changes: 16 additions & 7 deletions Content.Client/Chemistry/Visualizers/FoamVisualizerSystem.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using Content.Shared.Smoking;
using Robust.Shared.Spawners;
using Content.Shared.Chemistry.Components;
using Robust.Client.Animations;
using Robust.Client.GameObjects;
using Robust.Shared.Network;
using Robust.Shared.Timing;

namespace Content.Client.Chemistry.Visualizers;
Expand All @@ -18,6 +16,7 @@ public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<FoamVisualsComponent, ComponentInit>(OnComponentInit);
SubscribeLocalEvent<FoamVisualsComponent, AnimationCompletedEvent>(OnAnimationComplete);
}

public override void Update(float frameTime)
Expand All @@ -27,11 +26,11 @@ public override void Update(float frameTime)
if (!_timing.IsFirstTimePredicted)
return;

var query = EntityQueryEnumerator<FoamVisualsComponent, TimedDespawnComponent>();
var query = EntityQueryEnumerator<FoamVisualsComponent, SmokeComponent>();

while (query.MoveNext(out var uid, out var comp, out var despawn))
while (query.MoveNext(out var uid, out var comp, out var smoke))
{
if (despawn.Lifetime > 1f)
if (_timing.CurTime < comp.StartTime + TimeSpan.FromSeconds(smoke.Duration) - TimeSpan.FromSeconds(comp.AnimationTime))
continue;

// Despawn animation.
Expand All @@ -48,6 +47,7 @@ public override void Update(float frameTime)
/// </summary>
private void OnComponentInit(EntityUid uid, FoamVisualsComponent comp, ComponentInit args)
{
comp.StartTime = _timing.CurTime;
comp.Animation = new Animation
{
Length = TimeSpan.FromSeconds(comp.AnimationTime),
Expand All @@ -58,12 +58,21 @@ private void OnComponentInit(EntityUid uid, FoamVisualsComponent comp, Component
LayerKey = FoamVisualLayers.Base,
KeyFrames =
{
new AnimationTrackSpriteFlick.KeyFrame(comp.State, 0f)
new AnimationTrackSpriteFlick.KeyFrame(comp.AnimationState, 0f)
}
}
}
};
}

private void OnAnimationComplete(EntityUid uid, FoamVisualsComponent component, AnimationCompletedEvent args)
{
if (args.Key != FoamVisualsComponent.AnimationKey)
return;

if (TryComp<SpriteComponent>(uid, out var sprite))
sprite.Visible = false;
}
}

public enum FoamVisualLayers : byte
Expand Down
12 changes: 8 additions & 4 deletions Content.Client/Chemistry/Visualizers/FoamVisualsComponent.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Robust.Client.Animations;
using Robust.Client.Graphics;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;

namespace Content.Client.Chemistry.Visualizers;

Expand All @@ -15,18 +16,21 @@ public sealed partial class FoamVisualsComponent : Component
/// </summary>
public const string AnimationKey = "foamdissolve_animation";

[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
public TimeSpan StartTime;

/// <summary>
/// How long the foam visually dissolves for.
/// </summary>
[DataField("animationTime")]
public float AnimationTime = 0.6f;
[DataField]
public float AnimationTime = 0.5f;

/// <summary>
/// The state of the entities base sprite RSI that is displayed when the foam dissolves.
/// Cannot use <see cref="RSI.StateKey"/> because it does not have <see cref="DataDefinitionAttribute"/> and I am not making an engine PR at this time.
/// </summary>
[DataField("animationState")]
public string State = "foam-dissolve";
[DataField]
public string AnimationState = "foam-dissolve";

/// <summary>
/// The animation used while the foam dissolves.
Expand Down
6 changes: 3 additions & 3 deletions Content.Client/Construction/ConstructionSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public override void Initialize()
base.Initialize();

UpdatesOutsidePrediction = true;
SubscribeLocalEvent<PlayerAttachSysMessage>(HandlePlayerAttached);
SubscribeLocalEvent<LocalPlayerAttachedEvent>(HandlePlayerAttached);
SubscribeNetworkEvent<AckStructureConstructionMessage>(HandleAckStructure);
SubscribeNetworkEvent<ResponseConstructionGuide>(OnConstructionGuideReceived);

Expand Down Expand Up @@ -110,9 +110,9 @@ private void HandleAckStructure(AckStructureConstructionMessage msg)
ClearGhost(msg.GhostId);
}

private void HandlePlayerAttached(PlayerAttachSysMessage msg)
private void HandlePlayerAttached(LocalPlayerAttachedEvent msg)
{
var available = IsCraftingAvailable(msg.AttachedEntity);
var available = IsCraftingAvailable(msg.Entity);
UpdateCraftingAvailability(available);
}

Expand Down
9 changes: 4 additions & 5 deletions Content.Client/Drugs/DrugOverlaySystem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Content.Shared.Drugs;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.Player;

Expand All @@ -24,18 +23,18 @@ public override void Initialize()
SubscribeLocalEvent<SeeingRainbowsComponent, ComponentInit>(OnInit);
SubscribeLocalEvent<SeeingRainbowsComponent, ComponentShutdown>(OnShutdown);

SubscribeLocalEvent<SeeingRainbowsComponent, PlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<SeeingRainbowsComponent, PlayerDetachedEvent>(OnPlayerDetached);
SubscribeLocalEvent<SeeingRainbowsComponent, LocalPlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<SeeingRainbowsComponent, LocalPlayerDetachedEvent>(OnPlayerDetached);

_overlay = new();
}

private void OnPlayerAttached(EntityUid uid, SeeingRainbowsComponent component, PlayerAttachedEvent args)
private void OnPlayerAttached(EntityUid uid, SeeingRainbowsComponent component, LocalPlayerAttachedEvent args)
{
_overlayMan.AddOverlay(_overlay);
}

private void OnPlayerDetached(EntityUid uid, SeeingRainbowsComponent component, PlayerDetachedEvent args)
private void OnPlayerDetached(EntityUid uid, SeeingRainbowsComponent component, LocalPlayerDetachedEvent args)
{
_overlay.Intoxication = 0;
_overlayMan.RemoveOverlay(_overlay);
Expand Down
9 changes: 4 additions & 5 deletions Content.Client/Drunk/DrunkSystem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Content.Shared.Drunk;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.Player;

Expand All @@ -19,18 +18,18 @@ public override void Initialize()
SubscribeLocalEvent<DrunkComponent, ComponentInit>(OnDrunkInit);
SubscribeLocalEvent<DrunkComponent, ComponentShutdown>(OnDrunkShutdown);

SubscribeLocalEvent<DrunkComponent, PlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<DrunkComponent, PlayerDetachedEvent>(OnPlayerDetached);
SubscribeLocalEvent<DrunkComponent, LocalPlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<DrunkComponent, LocalPlayerDetachedEvent>(OnPlayerDetached);

_overlay = new();
}

private void OnPlayerAttached(EntityUid uid, DrunkComponent component, PlayerAttachedEvent args)
private void OnPlayerAttached(EntityUid uid, DrunkComponent component, LocalPlayerAttachedEvent args)
{
_overlayMan.AddOverlay(_overlay);
}

private void OnPlayerDetached(EntityUid uid, DrunkComponent component, PlayerDetachedEvent args)
private void OnPlayerDetached(EntityUid uid, DrunkComponent component, LocalPlayerDetachedEvent args)
{
_overlay.CurrentBoozePower = 0;
_overlayMan.RemoveOverlay(_overlay);
Expand Down
18 changes: 4 additions & 14 deletions Content.Client/Eye/Blinding/BlindingSystem.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@

using Content.Shared.Eye.Blinding;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.Player;
using System;
using System.Collections.Generic;
using System.Linq;
using Content.Shared.Administration;
using Content.Shared.Administration.Events;
using Content.Shared.Eye.Blinding.Components;
using Content.Shared.GameTicking;
using Robust.Shared.GameObjects;
using Robust.Shared.Network;

namespace Content.Client.Eye.Blinding;

Expand All @@ -31,20 +21,20 @@ public override void Initialize()
SubscribeLocalEvent<BlindableComponent, ComponentInit>(OnBlindInit);
SubscribeLocalEvent<BlindableComponent, ComponentShutdown>(OnBlindShutdown);

SubscribeLocalEvent<BlindableComponent, PlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<BlindableComponent, PlayerDetachedEvent>(OnPlayerDetached);
SubscribeLocalEvent<BlindableComponent, LocalPlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<BlindableComponent, LocalPlayerDetachedEvent>(OnPlayerDetached);

SubscribeNetworkEvent<RoundRestartCleanupEvent>(RoundRestartCleanup);

_overlay = new();
}

private void OnPlayerAttached(EntityUid uid, BlindableComponent component, PlayerAttachedEvent args)
private void OnPlayerAttached(EntityUid uid, BlindableComponent component, LocalPlayerAttachedEvent args)
{
_overlayMan.AddOverlay(_overlay);
}

private void OnPlayerDetached(EntityUid uid, BlindableComponent component, PlayerDetachedEvent args)
private void OnPlayerDetached(EntityUid uid, BlindableComponent component, LocalPlayerDetachedEvent args)
{
_overlayMan.RemoveOverlay(_overlay);
_lightManager.Enabled = true;
Expand Down
11 changes: 4 additions & 7 deletions Content.Client/Eye/Blinding/BlurryVisionSystem.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
using Content.Shared.Eye.Blinding;
using Content.Shared.Eye.Blinding.Components;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.GameStates;

namespace Content.Client.Eye.Blinding;

Expand All @@ -20,18 +17,18 @@ public override void Initialize()
SubscribeLocalEvent<BlurryVisionComponent, ComponentInit>(OnBlurryInit);
SubscribeLocalEvent<BlurryVisionComponent, ComponentShutdown>(OnBlurryShutdown);

SubscribeLocalEvent<BlurryVisionComponent, PlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<BlurryVisionComponent, PlayerDetachedEvent>(OnPlayerDetached);
SubscribeLocalEvent<BlurryVisionComponent, LocalPlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<BlurryVisionComponent, LocalPlayerDetachedEvent>(OnPlayerDetached);

_overlay = new();
}

private void OnPlayerAttached(EntityUid uid, BlurryVisionComponent component, PlayerAttachedEvent args)
private void OnPlayerAttached(EntityUid uid, BlurryVisionComponent component, LocalPlayerAttachedEvent args)
{
_overlayMan.AddOverlay(_overlay);
}

private void OnPlayerDetached(EntityUid uid, BlurryVisionComponent component, PlayerDetachedEvent args)
private void OnPlayerDetached(EntityUid uid, BlurryVisionComponent component, LocalPlayerDetachedEvent args)
{
_overlayMan.RemoveOverlay(_overlay);
}
Expand Down
Loading

0 comments on commit 1cb3504

Please sign in to comment.