Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master up to 31/10 #365

Merged
merged 116 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
a1d171d
Update deathhead_r_leg.png (#21226)
FluffiestFloof Oct 24, 2023
b52dfca
Add hint for the examine trigger effect (#21166)
liltenhead Oct 24, 2023
f46900d
Automatic changelog update
PJBot Oct 24, 2023
82a74ca
cornmeal is actually obtainable now (#21162)
Stealthbomber16 Oct 24, 2023
e9977c8
Automatic changelog update
PJBot Oct 24, 2023
aa2b265
Healing skeletons by pouring milk over them (and clean pie remains of…
Myakot Oct 24, 2023
a1d61b1
Automatic changelog update
PJBot Oct 24, 2023
95fd2c4
Fix anomaly locators frantically beeping when entering detection rang…
TemporalOroboros Oct 24, 2023
591c134
Automatic changelog update
PJBot Oct 24, 2023
13a83ce
Remove "mk --> mmm, okay" and "u --> you" to chatsan anti slang (#21177)
Dutch-VanDerLinde Oct 25, 2023
597b70d
Automatic changelog update
PJBot Oct 25, 2023
144b0c7
Change ListContainer to send null when selected is removed from the d…
ShadowCommander Oct 25, 2023
41b8a89
fix feeding unremovable items (#21234)
EmoGarbage404 Oct 25, 2023
c88278f
Automatic changelog update
PJBot Oct 25, 2023
accad85
Power switchable refactor (#20419)
deltanedas Oct 25, 2023
be60286
simple space mobs cant be flashed (#20784)
deltanedas Oct 25, 2023
783013a
give roundstart borgs names (#20081)
deltanedas Oct 25, 2023
d046e39
fix searching on vending machines (#21233)
EmoGarbage404 Oct 25, 2023
65593b9
syndicate snack box (#21024)
deltanedas Oct 25, 2023
09bffb8
Fix DockingControl (#21238)
metalgearsloth Oct 25, 2023
a2abb24
Shadow Dimension visual pack (#21237)
TheShuEd Oct 25, 2023
faa7c96
Potato battery update + potato AI (#21142)
Doru991 Oct 25, 2023
7f81576
Adds AttemptEntity(Uns|S)tickEvent. (#20728)
TemporalOroboros Oct 25, 2023
381242b
Automatic changelog update
PJBot Oct 25, 2023
ebc82cd
Automatic changelog update
PJBot Oct 26, 2023
0aee830
Add missing changelog for storage refactor revert (#21259)
DrSmugleaf Oct 26, 2023
f6c529c
Automatic changelog update
PJBot Oct 26, 2023
fc595a4
BBQ rib sandwich (#21180)
chromiumboy Oct 26, 2023
1bbf2c4
Fix missing toggle fullscreen loc string (#21264)
ficcialfaint Oct 26, 2023
40271a0
Cave Decoration pack (#21265)
TheShuEd Oct 27, 2023
de64cba
fixes and tweaks (#21172)
nmajask Oct 27, 2023
c9f15e7
Automatic changelog update
PJBot Oct 27, 2023
62877ef
Fix ItemPlacer (#21160)
metalgearsloth Oct 27, 2023
360451a
headrev spawn music (#21119)
JoeHammad1844 Oct 27, 2023
566dd05
Automatic changelog update
PJBot Oct 27, 2023
9023986
Techfab resprite + department fab sprites (#21136)
EmoGarbage404 Oct 27, 2023
44aa632
Fix popup messages appearing when someone tries to open a door withou…
nikthechampiongr Oct 27, 2023
e4c0920
Show "departed and moved on" for when a ghost role is taken (#21092)
crazybrain23 Oct 27, 2023
9693047
Automatic changelog update
PJBot Oct 27, 2023
97dfc0f
Implant whitelist/blacklisting (#20678)
deltanedas Oct 27, 2023
f8b1aee
Automatic changelog update
PJBot Oct 27, 2023
950acba
Ion storm event (#20277)
deltanedas Oct 27, 2023
858ec2d
Automatic changelog update
PJBot Oct 27, 2023
23cbc42
A return to foam (foam rework) (#20831)
EmoGarbage404 Oct 27, 2023
0b567b7
Automatic changelog update
PJBot Oct 27, 2023
638054c
ERT Loadout overhaul + Real deathsquad mobs + ERT fixes (#21230)
QuietlyWhisper Oct 27, 2023
58aa312
Automatic changelog update
PJBot Oct 27, 2023
26d774f
Restore Leviathan's 80 pop cap (#21281)
Chief-Engineer Oct 27, 2023
e66c0b5
Un-revert IPlayerManager refactor (#21244)
ElectroJr Oct 27, 2023
bd446ea
Update engine to v172.0.0 (#21288)
ElectroJr Oct 27, 2023
37c2a64
Hopefully fix Delta commands
DebugOk Oct 31, 2023
453903a
Bandaid tests (#21292)
ElectroJr Oct 28, 2023
cde60cc
rename the rocks (#21275)
TheShuEd Oct 28, 2023
9b306dd
Make crystals noRot (#21279)
metalgearsloth Oct 28, 2023
22100ed
Fix nukies sound not played (#21268)
ficcialfaint Oct 28, 2023
66f20c2
Automatic changelog update
PJBot Oct 28, 2023
0f685fc
Fix hijack objective (#21241)
Morb0 Oct 28, 2023
9d7804a
Remove GridModifiedEvent (#21291)
ElectroJr Oct 28, 2023
307d174
Update submodule to 173.0.0 (#21296)
metalgearsloth Oct 28, 2023
b4f0320
Fix namespace error (#21298)
ElectroJr Oct 28, 2023
1d23ee9
Update yaml sequence option in editorconfig (#21297)
ElectroJr Oct 28, 2023
1258a07
Fix namespace (#21299)
metalgearsloth Oct 28, 2023
c2c6265
fix cburn bag issue, make new bag entity for them and filled bag enti…
QuietlyWhisper Oct 28, 2023
7133ae8
Health analyzer UI improve (#17280)
Arteben Oct 28, 2023
b4a74f3
Automatic changelog update
PJBot Oct 28, 2023
ffecbe0
User accessible playtime (#21242)
Titian3 Oct 28, 2023
0bfaedc
Automatic changelog update
PJBot Oct 28, 2023
9a5af16
Moves cloning comp & cloning event to shared (#21253)
keronshb Oct 28, 2023
1f44aa8
Generalizes solution overflow & slightly increases space lube yield (…
TemporalOroboros Oct 28, 2023
15d38b6
Automatic changelog update
PJBot Oct 28, 2023
1465c02
Move ActorComponent to shared (#21293)
ElectroJr Oct 28, 2023
bb7edbb
Update engine to v174.0.0 (#21311)
ElectroJr Oct 28, 2023
b2c9c41
Fix planet command help message (#21312)
ElectroJr Oct 29, 2023
4ec1a6c
Wearable bee plush (#20623)
UbaserB Oct 29, 2023
696ea71
Automatic changelog update
PJBot Oct 29, 2023
752c7ae
remove pulse rifle from ert medic (#21310)
QuietlyWhisper Oct 29, 2023
2e28eb8
Automatic changelog update
PJBot Oct 29, 2023
f5538e9
Atomic bomb add uranium (#21143)
kerisargit Oct 29, 2023
6745b65
Action bugfixes (#21321)
ElectroJr Oct 29, 2023
c683b9c
Disable OOC during round (#21323)
Titian3 Oct 29, 2023
048da0a
Fix PDA notifications when creating a news entry using the Mass-Media…
Simyon264 Oct 29, 2023
c633f49
Automatic changelog update
PJBot Oct 29, 2023
0cedbf5
Update belt.yml (#21317)
Sifb26 Oct 29, 2023
4743692
New foam sprites (edge sprites) (#21308)
brainfood1183 Oct 29, 2023
ae4333f
Fix bola stam damage, bring back old construction requirements (#21340)
misandrie Oct 29, 2023
8b68827
Automatic changelog update
PJBot Oct 29, 2023
2667cad
Added thermal insulation to flannel jackets (#21273)
nmajask Oct 30, 2023
2a67b20
Automatic changelog update
PJBot Oct 30, 2023
c9c529f
Space Asshole Gear (#21243)
Psychpsyo Oct 30, 2023
7244916
Fix broken slot highlight in midnight theme. (#21331)
EmoGarbage404 Oct 30, 2023
5a1cfdd
Update Patrons.yml (#21344)
DrSmugleaf Oct 30, 2023
b42e439
Thicken thindow bounds (#21280)
metalgearsloth Oct 30, 2023
8d0517a
Automatic changelog update
PJBot Oct 30, 2023
14a1ace
1984 mouse AI (#21353)
VasilisThePikachu Oct 31, 2023
673127f
Automatic changelog update
PJBot Oct 31, 2023
d166ed4
Pumpkins, jack o' lanterns and pumpkin hat resprite (#21176)
Doru991 Oct 31, 2023
6ebd553
Update ground_lighting.yml (#21350)
TheShuEd Oct 31, 2023
aa0479f
fix fireaxe swing (#21346)
notquitehadouken Oct 31, 2023
0ffdea9
Automatic changelog update
PJBot Oct 31, 2023
ad1780b
Enable skeletons temporarily for Halloween (#21356)
EmoGarbage404 Oct 31, 2023
718e01d
Automatic changelog update
PJBot Oct 31, 2023
2870524
Revert "Enable skeletons temporarily for Halloween (#21356)"
DebugOk Oct 31, 2023
b09b87d
Automatic changelog update
PJBot Oct 31, 2023
44e0491
Update Changelog.yml
DebugOk Oct 31, 2023
95515a2
Pea Plants (#20504)
ZeroDayDaemon Oct 31, 2023
7e2e08b
Automatic changelog update
PJBot Oct 31, 2023
6d69b5c
fix smoke not transferring (#21332)
EmoGarbage404 Oct 31, 2023
eb49b96
Automatic changelog update
PJBot Oct 31, 2023
e6b3c58
Fix the organtype (#21347)
LankLTE Oct 31, 2023
7a4d631
Automatic changelog update
PJBot Oct 31, 2023
6ec4cc1
Candy Bucket for Halloween (#21257)
Bixkitts Oct 31, 2023
299fff1
Revert "Candy Bucket for Halloween (#21257)"
DebugOk Oct 31, 2023
f8b4c88
Fix whitelist code
DebugOk Oct 31, 2023
d2b6360
Fix missing namespaces and other errors
DebugOk Oct 31, 2023
b130ca0
Remove duplicate flavor
DebugOk Oct 31, 2023
e33e92e
Fix cargo arbitrage
DebugOk Oct 31, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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 @@ -22,7 +22,7 @@ public sealed partial class PlayerListControl : BoxContainer
private List<PlayerInfo> _playerList = new();
private readonly List<PlayerInfo> _sortedPlayerList = new();

public event Action<PlayerInfo?>? OnSelectionChanged;
public event Action<PlayerInfo>? OnSelectionChanged;
public IReadOnlyList<PlayerInfo> PlayerInfo => _playerList;

public Func<PlayerInfo, string, string>? OverrideText;
Expand All @@ -46,9 +46,9 @@ public PlayerListControl()
BackgroundPanel.PanelOverride = new StyleBoxFlat {BackgroundColor = new Color(32, 32, 40)};
}

private void PlayerListItemPressed(BaseButton.ButtonEventArgs args, ListData data)
private void PlayerListItemPressed(BaseButton.ButtonEventArgs? args, ListData? data)
{
if (data is not PlayerListData {Info: var selectedPlayer})
if (args == null || data is not PlayerListData {Info: var selectedPlayer})
return;
if (args.Event.Function == EngineKeyFunctions.UIClick)
{
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
Loading
Loading