Skip to content

Commit

Permalink
cleanup: remove TargetingDoll-related code (#20866)
Browse files Browse the repository at this point in the history
  • Loading branch information
iacore authored and DebugOk committed Oct 14, 2023
1 parent 8eb8293 commit 8bef6db
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 147 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ PublishScripts/
# NuGet v3's project.json files produces more ignoreable files
*.nuget.props
*.nuget.targets
.nuget/

# Microsoft Azure Build Output
csx/
Expand Down
12 changes: 0 additions & 12 deletions Content.Client/CombatMode/CombatModeSystem.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Content.Client.Hands.Systems;
using Content.Shared.CCVar;
using Content.Shared.CombatMode;
using Content.Shared.Targeting;
using Robust.Client.Graphics;
using Robust.Client.Input;
using Robust.Client.Player;
Expand Down Expand Up @@ -44,11 +43,6 @@ public override void Shutdown()
base.Shutdown();
}

private void OnTargetingZoneChanged(TargetingZone obj)
{
EntityManager.RaisePredictiveEvent(new CombatModeSystemMessages.SetTargetZoneMessage(obj));
}

public bool IsInCombatMode()
{
var entity = _playerManager.LocalPlayer?.ControlledEntity;
Expand All @@ -65,12 +59,6 @@ public override void SetInCombatMode(EntityUid entity, bool value, CombatModeCom
UpdateHud(entity);
}

public override void SetActiveZone(EntityUid entity, TargetingZone zone, CombatModeComponent? component = null)
{
base.SetActiveZone(entity, zone, component);
UpdateHud(entity);
}

private void UpdateHud(EntityUid entity)
{
if (entity != _playerManager.LocalPlayer?.ControlledEntity || !Timing.IsFirstTimePredicted)
Expand Down
24 changes: 0 additions & 24 deletions Content.Client/Stylesheets/StyleNano.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Content.Client.Examine;
using Content.Client.PDA;
using Content.Client.Resources;
using Content.Client.Targeting.UI;
using Content.Client.UserInterface.Controls;
using Content.Client.UserInterface.Controls.FancyTree;
using Content.Client.Verbs.UI;
Expand Down Expand Up @@ -1148,29 +1147,6 @@ public StyleNano(IResourceCache resCache) : base(resCache)
new StyleProperty(Label.StylePropertyFont, notoSansDisplayBold14),
}),

// Targeting doll

new StyleRule(
new SelectorElement(typeof(TextureButton), new[] {TargetingDoll.StyleClassTargetDollZone}, null,
new[] {TextureButton.StylePseudoClassNormal}), new[]
{
new StyleProperty(Control.StylePropertyModulateSelf, ButtonColorDefault),
}),

new StyleRule(
new SelectorElement(typeof(TextureButton), new[] {TargetingDoll.StyleClassTargetDollZone}, null,
new[] {TextureButton.StylePseudoClassHover}), new[]
{
new StyleProperty(Control.StylePropertyModulateSelf, ButtonColorHovered),
}),

new StyleRule(
new SelectorElement(typeof(TextureButton), new[] {TargetingDoll.StyleClassTargetDollZone}, null,
new[] {TextureButton.StylePseudoClassPressed}), new[]
{
new StyleProperty(Control.StylePropertyModulateSelf, ButtonColorPressed),
}),

// NanoHeading

new StyleRule(
Expand Down
8 changes: 0 additions & 8 deletions Content.Client/Targeting/UI/TargetingDoll.xaml

This file was deleted.

44 changes: 0 additions & 44 deletions Content.Client/Targeting/UI/TargetingDoll.xaml.cs

This file was deleted.

4 changes: 0 additions & 4 deletions Content.Shared/CombatMode/CombatModeComponent.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Content.Shared.MouseRotator;
using Content.Shared.Movement.Components;
using Content.Shared.Targeting;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
Expand Down Expand Up @@ -49,8 +48,5 @@ public sealed partial class CombatModeComponent : Component
/// </summary>
[DataField, AutoNetworkedField]
public bool ToggleMouseRotator = true;

[ViewVariables(VVAccess.ReadWrite), DataField("activeZone"), AutoNetworkedField]
public TargetingZone ActiveZone;
}
}
19 changes: 0 additions & 19 deletions Content.Shared/CombatMode/Events/CombatModeSystemMessages.cs

This file was deleted.

10 changes: 0 additions & 10 deletions Content.Shared/CombatMode/SharedCombatModeSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using Content.Shared.MouseRotator;
using Content.Shared.Movement.Components;
using Content.Shared.Popups;
using Content.Shared.Targeting;
using Robust.Shared.Network;
using Robust.Shared.Timing;

Expand Down Expand Up @@ -89,15 +88,6 @@ public virtual void SetInCombatMode(EntityUid entity, bool value, CombatModeComp
SetMouseRotatorComponents(entity, value);
}

public virtual void SetActiveZone(EntityUid entity, TargetingZone zone,
CombatModeComponent? component = null)
{
if (!Resolve(entity, ref component))
return;

component.ActiveZone = zone;
}

private void SetMouseRotatorComponents(EntityUid uid, bool value)
{
if (value)
Expand Down
26 changes: 0 additions & 26 deletions Content.Shared/Targeting/TargetingZone.cs

This file was deleted.

0 comments on commit 8bef6db

Please sign in to comment.