Skip to content

Commit

Permalink
Revert "Merge remote-tracking branch 'ee-personal/Psionic-Power-Refac…
Browse files Browse the repository at this point in the history
…tor' into latest-experimental-psionics"

This reverts commit e750eae, reversing
changes made to 2f3218d.
  • Loading branch information
VMSolidus committed Jul 4, 2024
1 parent e750eae commit d5a1296
Show file tree
Hide file tree
Showing 163 changed files with 1,226 additions and 3,306 deletions.
1 change: 0 additions & 1 deletion Content.Client/Entry/EntryPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ public override void Init()
_prototypeManager.RegisterIgnore("alertLevels");
_prototypeManager.RegisterIgnore("nukeopsRole");
_prototypeManager.RegisterIgnore("stationGoal");
_prototypeManager.RegisterIgnore("npcConversationTree");

_componentFactory.GenerateNetIds();
_adminManager.Initialize();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
using Robust.Client.GameObjects;
using Robust.Client.UserInterface;
using Content.Client.Psionics.UI;
using Content.Client.UserInterface.Fragments;
using Content.Shared.CartridgeLoader.Cartridges;
using Content.Shared.CartridgeLoader;

namespace Content.Client.Psionics.GlimmerMonitor;
namespace Content.Client.Nyanotrasen.CartridgeLoader.Cartridges;

public sealed partial class GlimmerMonitorUi : UIFragment
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<cartridges:GlimmerMonitorUiFragment xmlns:cartridges="clr-namespace:Content.Client.Psionics.GlimmerMonitor"
<cartridges:GlimmerMonitorUiFragment xmlns:cartridges="clr-namespace:Content.Client.Nyanotrasen.CartridgeLoader.Cartridges"
xmlns="https://spacestation14.io" Margin="1 0 2 0">
<PanelContainer StyleClasses="BackgroundDark"></PanelContainer>
<BoxContainer Name="SettingsBox" Orientation="Horizontal" HorizontalExpand="True" VerticalExpand="False">
<Label Text="{Loc 'glimmer-monitor-interval'}"/>
<Button Name="IntervalButton6s" Access="Public" Text="6s" StyleClasses="OpenRight"/>
<Button Name="IntervalButton1" Access="Public" Text="1m" StyleClasses="OpenRight"/>
<Button Name="IntervalButton5" Access="Public" Text="5m" StyleClasses="OpenBoth"/>
<Button Name="IntervalButton10" Access="Public" Text="10m" StyleClasses="OpenLeft"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System.Linq;
using System.Numerics;
using Content.Client.Psionics.UI;
using Content.Client.Nyanotrasen.UserInterface;
using Robust.Client.AutoGenerated;
using Robust.Client.ResourceManagement;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;

namespace Content.Client.Psionics.GlimmerMonitor;
namespace Content.Client.Nyanotrasen.CartridgeLoader.Cartridges;

[GenerateTypedNameReferences]
public sealed partial class GlimmerMonitorUiFragment : BoxContainer
Expand All @@ -26,14 +26,12 @@ public GlimmerMonitorUiFragment()
VerticalExpand = true;

var intervalGroup = new ButtonGroup();
IntervalButton6s.Group = intervalGroup;
IntervalButton1.Group = intervalGroup;
IntervalButton5.Group = intervalGroup;
IntervalButton10.Group = intervalGroup;

IntervalButton6s.Pressed = true;
IntervalButton1.Pressed = true;

IntervalButton6s.OnPressed += _ => UpdateState(_cachedValues);
IntervalButton1.OnPressed += _ => UpdateState(_cachedValues);
IntervalButton5.OnPressed += _ => UpdateState(_cachedValues);
IntervalButton10.OnPressed += _ => UpdateState(_cachedValues);
Expand Down Expand Up @@ -64,12 +62,14 @@ private List<int> FormatGlimmerValues(List<int> glimmerValues)
{
var returnList = glimmerValues;

if (IntervalButton1.Pressed)
returnList = GetAveragedList(glimmerValues, 10);
else if (IntervalButton5.Pressed)
returnList = GetAveragedList(glimmerValues, 50);
if (IntervalButton5.Pressed)
{
returnList = GetAveragedList(glimmerValues, 5);
}
else if (IntervalButton10.Pressed)
returnList = GetAveragedList(glimmerValues, 100);
{
returnList = GetAveragedList(glimmerValues, 10);
}

return ClipToFifteen(returnList);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Content.Shared.Psionics.Abilities;
using Content.Shared.Abilities.Psionics;
using Content.Client.Chat.Managers;
using Robust.Client.Player;

namespace Content.Client.Psionics.Chat
namespace Content.Client.Nyanotrasen.Chat
{
public sealed class PsionicChatUpdateSystem : EntitySystem
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Robust.Client.ResourceManagement;
using Robust.Client.UserInterface;

namespace Content.Client.Psionics.UI;
namespace Content.Client.Nyanotrasen.UserInterface;

public sealed class GlimmerGraph : Control
{
Expand Down
9 changes: 5 additions & 4 deletions Content.Client/UserInterface/Systems/Chat/ChatUIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
using Content.Shared.Examine;
using Content.Shared.Input;
using Content.Shared.Radio;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.Input;
using Robust.Client.Player;
Expand All @@ -36,7 +37,7 @@
using Robust.Shared.Replays;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
using Content.Client.Psionics.Chat;
using Content.Client.Nyanotrasen.Chat; //Nyano - Summary: chat namespace.

namespace Content.Client.UserInterface.Systems.Chat;

Expand All @@ -60,7 +61,7 @@ public sealed class ChatUIController : UIController
[UISystemDependency] private readonly GhostSystem? _ghost = default;
[UISystemDependency] private readonly TypingIndicatorSystem? _typingIndicator = default;
[UISystemDependency] private readonly ChatSystem? _chatSys = default;
[UISystemDependency] private readonly PsionicChatUpdateSystem? _psionic = default!; //EE - Summary: makes the psionic chat available.
[UISystemDependency] private readonly PsionicChatUpdateSystem? _psionic = default!; //Nyano - Summary: makes the psionic chat available.

[ValidatePrototypeId<ColorPalettePrototype>]
private const string ChatNamePalette = "ChatNames";
Expand All @@ -81,7 +82,7 @@ public sealed class ChatUIController : UIController
{SharedChatSystem.AdminPrefix, ChatSelectChannel.Admin},
{SharedChatSystem.RadioCommonPrefix, ChatSelectChannel.Radio},
{SharedChatSystem.DeadPrefix, ChatSelectChannel.Dead},
{SharedChatSystem.TelepathicPrefix, ChatSelectChannel.Telepathic} //EE - Summary: adds the telepathic prefix =.
{SharedChatSystem.TelepathicPrefix, ChatSelectChannel.Telepathic} //Nyano - Summary: adds the telepathic prefix =.
};

public static readonly Dictionary<ChatSelectChannel, char> ChannelPrefixes = new()
Expand All @@ -95,7 +96,7 @@ public sealed class ChatUIController : UIController
{ChatSelectChannel.Admin, SharedChatSystem.AdminPrefix},
{ChatSelectChannel.Radio, SharedChatSystem.RadioCommonPrefix},
{ChatSelectChannel.Dead, SharedChatSystem.DeadPrefix},
{ChatSelectChannel.Telepathic, SharedChatSystem.TelepathicPrefix } //EE - Summary: associates telepathic with =.
{ChatSelectChannel.Telepathic, SharedChatSystem.TelepathicPrefix } //Nyano - Summary: associates telepathic with =.
};

/// <summary>
Expand Down
12 changes: 0 additions & 12 deletions Content.Server/Abilities/Mime/MimePowersComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,5 @@ public sealed partial class MimePowersComponent : Component
/// </summary>
[DataField("vowCooldown")]
public TimeSpan VowCooldown = TimeSpan.FromMinutes(5);

/// <summary
/// Psionic Feedback for if a mime with their vow intact is scanned by a Mantis
/// </summary>
[DataField("mimeFeedback")]
public string MimeFeedback = "mime-feedback";

/// <summary
/// Psionic Feedback for if a mime with their vow intact is scanned by a Mantis
/// </summary>
[DataField("mimeBrokenFeedback")]
public string MimeBrokenFeedback = "mime-broken-feedback";
}
}
38 changes: 8 additions & 30 deletions Content.Server/Abilities/Mime/MimePowersSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Content.Server.Popups;
using Content.Server.Speech.Muting;
using Content.Shared.Actions;
using Content.Shared.Actions.Events;
using Content.Shared.Alert;
Expand All @@ -9,7 +10,7 @@
using Robust.Shared.Containers;
using Robust.Shared.Map;
using Robust.Shared.Timing;
using Content.Shared.Psionics.Abilities;
using Content.Shared.Abilities.Psionics; //Nyano - Summary: Makes Mime psionic.
using Content.Shared.Speech.Muting;

namespace Content.Server.Abilities.Mime
Expand Down Expand Up @@ -57,21 +58,14 @@ private void OnComponentInit(EntityUid uid, MimePowersComponent component, Compo
EnsureComp<MutedComponent>(uid);
_alertsSystem.ShowAlert(uid, AlertType.VowOfSilence);
_actionsSystem.AddAction(uid, ref component.InvisibleWallActionEntity, component.InvisibleWallAction, uid);

// Mimes gain their power from a special Vow, but this vow extends to Telepathic speech.
if (EnsureComp<PsionicComponent>(uid, out var psionic))
{
psionic.TelepathicMute = true;
psionic.ActivePowers.Add(component);
psionic.PsychicFeedback.Add(component.MimeFeedback);
psionic.Dampening += 1f;
}
//Nyano - Summary: Add Psionic Ability to Mime.
if (TryComp<PsionicComponent>(uid, out var psionic) && psionic.PsionicAbility == null)
psionic.PsionicAbility = component.InvisibleWallActionEntity;
}

/// <summary>
/// Creates an invisible wall in a free space after some checks.
/// </summary>
// TODO: Consider separating this out from the Mime entirely, and make a standalone "Telekinetic Barricade" power.
private void OnInvisibleWall(EntityUid uid, MimePowersComponent component, InvisibleWallActionEvent args)
{
if (!component.Enabled)
Expand Down Expand Up @@ -104,9 +98,9 @@ private void OnInvisibleWall(EntityUid uid, MimePowersComponent component, Invis
return;
}
}
if (TryComp<PsionicComponent>(uid, out var psionic))
_psionics.LogPowerUsed(uid, "invisible wall", psionic, 4, 6);

// Begin Nyano-code: mime powers are psionic.
_psionics.LogPowerUsed(uid, "invisible wall");
// End Nyano-code.
_popupSystem.PopupEntity(Loc.GetString("mime-invisible-wall-popup", ("mime", uid)), uid);
// Make sure we set the invisible wall to despawn properly
Spawn(component.WallPrototype, _turf.GetTileCenter(tile.Value));
Expand All @@ -132,14 +126,6 @@ public void BreakVow(EntityUid uid, MimePowersComponent? mimePowers = null)
_alertsSystem.ClearAlert(uid, AlertType.VowOfSilence);
_alertsSystem.ShowAlert(uid, AlertType.VowBroken);
_actionsSystem.RemoveAction(uid, mimePowers.InvisibleWallActionEntity);
if (TryComp<PsionicComponent>(uid, out var psionic))
{
psionic.TelepathicMute = false;
psionic.ActivePowers.Remove(mimePowers);
psionic.PsychicFeedback.Remove(mimePowers.MimeFeedback);
psionic.PsychicFeedback.Add(mimePowers.MimeBrokenFeedback);
psionic.Dampening -= 1f;
}
}

/// <summary>
Expand All @@ -163,14 +149,6 @@ public void RetakeVow(EntityUid uid, MimePowersComponent? mimePowers = null)
_alertsSystem.ClearAlert(uid, AlertType.VowBroken);
_alertsSystem.ShowAlert(uid, AlertType.VowOfSilence);
_actionsSystem.AddAction(uid, ref mimePowers.InvisibleWallActionEntity, mimePowers.InvisibleWallAction, uid);
if (TryComp<PsionicComponent>(uid, out var psionic))
{
psionic.TelepathicMute = true;
psionic.ActivePowers.Add(mimePowers);
psionic.PsychicFeedback.Add(mimePowers.MimeFeedback);
psionic.PsychicFeedback.Remove(mimePowers.MimeBrokenFeedback);
psionic.Dampening += 1f;
}
}
}
}
4 changes: 3 additions & 1 deletion Content.Server/Anomaly/AnomalySystem.Psionics.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Content.Server.Psionics.Abilities;
using Content.Server.Abilities.Psionics; //Nyano - Summary: the psniocs bin where dispel is located.
using Content.Shared.Anomaly;
using Content.Shared.Anomaly.Components;
using Robust.Shared.Random;
Expand All @@ -14,6 +14,8 @@ private void InitializePsionics()
{
SubscribeLocalEvent<AnomalyComponent, DispelledEvent>(OnDispelled);
}

//Nyano - Summary: gives dispellable behavior to Anomalies.
private void OnDispelled(EntityUid uid, AnomalyComponent component, DispelledEvent args)
{
_dispel.DealDispelDamage(uid);
Expand Down
4 changes: 3 additions & 1 deletion Content.Server/Atmos/Components/IgniteOnCollideComponent.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using Content.Server.Atmos.EntitySystems;

namespace Content.Server.Atmos.Components;

[RegisterComponent]
[RegisterComponent, Access(typeof(FlammableSystem))]
public sealed partial class IgniteOnCollideComponent : Component
{
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Chat/Systems/ChatSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using Content.Server.Speech;
using Content.Server.Speech.Components;
using Content.Server.Speech.EntitySystems;
using Content.Server.Psionics.Telepathy;
using Content.Server.Nyanotrasen.Chat;
using Content.Server.Speech.Components;
using Content.Server.Speech.EntitySystems;
using Content.Server.Station.Components;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private void OnClientTypingChanged(TypingChangedEvent ev, EntitySessionEventArgs
SetTypingIndicatorEnabled(uid.Value, ev.IsTyping);
}

public void SetTypingIndicatorEnabled(EntityUid uid, bool isEnabled, AppearanceComponent? appearance = null)
private void SetTypingIndicatorEnabled(EntityUid uid, bool isEnabled, AppearanceComponent? appearance = null)
{
if (!Resolve(uid, ref appearance, false))
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Content.Server.Psionics.Glimmer;
using Content.Server.StationEvents.Components;
using Content.Shared.Psionics.Glimmer;
using Content.Shared.Psionics.Abilities;
using Content.Shared.Abilities.Psionics;

namespace Content.Server.StationEvents.Events;

Expand Down
Loading

0 comments on commit d5a1296

Please sign in to comment.