Skip to content

Commit

Permalink
Properly fixes comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
PHCodes committed Oct 5, 2023
1 parent 276dcb3 commit 6cc5a33
Show file tree
Hide file tree
Showing 52 changed files with 92 additions and 91 deletions.
6 changes: 3 additions & 3 deletions Content.Client/Chat/Managers/ChatManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal sealed class ChatManager : IChatManager
[Dependency] private readonly IEntitySystemManager _systems = default!;

private ISawmill _sawmill = default!;
public event Action? PermissionsUpdated; //Nyanotrasen code.
public event Action? PermissionsUpdated; //Nyano - Summary: need to be able to update perms for new psionics.
public void Initialize()
{
_sawmill = Logger.GetSawmill("chat");
Expand Down Expand Up @@ -67,7 +67,7 @@ public void SendMessage(string text, ChatSelectChannel channel)
_consoleHost.ExecuteCommand($"whisper \"{CommandParsing.Escape(str)}\"");
break;

//Nyanotrasen code.
//Nyano - Summary: sends the command for telepath communication.
case ChatSelectChannel.Telepathic:
_consoleHost.ExecuteCommand($"tsay \"{CommandParsing.Escape(str)}\"");
break;
Expand All @@ -76,7 +76,7 @@ public void SendMessage(string text, ChatSelectChannel channel)
throw new ArgumentOutOfRangeException(nameof(channel), channel, null);
}
}
//Nyanotrasen code.
//Nyano - Summary: fires off the update permissions script.
public void UpdatePermissions()
{
PermissionsUpdated?.Invoke();
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Chat/Managers/IChatManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public interface IChatManager
public void SendMessage(string text, ChatSelectChannel channel);

/// <summary>
/// Nyanotrasen code. Will refresh perms.
/// Nyano - Summary:. Will refresh perms.
/// </summary>
event Action PermissionsUpdated;
public void UpdatePermissions();
Expand Down
15 changes: 8 additions & 7 deletions Content.Client/UserInterface/Systems/Chat/ChatUIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
using Robust.Shared.Replays;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
using Content.Client.Nyanotrasen.Chat; //Nyanotrasen Code.
using Content.Client.Nyanotrasen.Chat; //Nyano - Summary: chat namespace.

namespace Content.Client.UserInterface.Systems.Chat;

Expand All @@ -57,7 +57,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!; //Nyanotrasen code.
[UISystemDependency] private readonly PsionicChatUpdateSystem? _psionic = default!; //Nyano - Summary: makes the psionic chat available.

private ISawmill _sawmill = default!;

Expand All @@ -73,7 +73,7 @@ public sealed class ChatUIController : UIController
{SharedChatSystem.AdminPrefix, ChatSelectChannel.Admin},
{SharedChatSystem.RadioCommonPrefix, ChatSelectChannel.Radio},
{SharedChatSystem.DeadPrefix, ChatSelectChannel.Dead},
{SharedChatSystem.TelepathicPrefix, ChatSelectChannel.Telepathic} //Nyanotrasen code.
{SharedChatSystem.TelepathicPrefix, ChatSelectChannel.Telepathic} //Nyano - Summary: adds the telepathic prefix =.
};

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

/// <summary>
Expand Down Expand Up @@ -167,7 +167,7 @@ public override void Initialize()
_sawmill = Logger.GetSawmill("chat");
_sawmill.Level = LogLevel.Info;
_admin.AdminStatusUpdated += UpdateChannelPermissions;
_manager.PermissionsUpdated += UpdateChannelPermissions; //Nyanotrasen code.
_manager.PermissionsUpdated += UpdateChannelPermissions; //Nyano - Summary: the event for when permissions are updated for psionics.
_player.LocalPlayerChanged += OnLocalPlayerChanged;
_state.OnStateChanged += StateChanged;
_net.RegisterNetMessage<MsgChatMessage>(OnChatMessage);
Expand Down Expand Up @@ -529,15 +529,16 @@ private void UpdateChannelPermissions()
FilterableChannels |= ChatChannel.AdminAlert;
FilterableChannels |= ChatChannel.AdminChat;
CanSendChannels |= ChatSelectChannel.Admin;
FilterableChannels |= ChatChannel.Telepathic; //Nyanotrasen Code.
FilterableChannels |= ChatChannel.Telepathic; //Nyano - Summary: makes admins able to see psionic chat.
}

// psionics - Nyanotrasen code.
// Nyano - Summary: - Begin modified code block to add telepathic as a channel for a psionic user.
if (_psionic != null && _psionic.IsPsionic)
{
FilterableChannels |= ChatChannel.Telepathic;
CanSendChannels |= ChatSelectChannel.Telepathic;
}
// /Nyano - End modified code block

SelectableChannels = CanSendChannels;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public sealed partial class ChannelFilterPopup : Popup
ChatChannel.Whisper,
ChatChannel.Emotes,
ChatChannel.Radio,
ChatChannel.Telepathic, //Nyanotrasen code.
ChatChannel.Telepathic, //Nyano - Summary: adds telepathic chat to where it belongs in order in the chat.
ChatChannel.LOOC,
ChatChannel.OOC,
ChatChannel.Dead,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public Color ChannelSelectColor(ChatSelectChannel channel)
ChatSelectChannel.OOC => Color.LightSkyBlue,
ChatSelectChannel.Dead => Color.MediumPurple,
ChatSelectChannel.Admin => Color.HotPink,
ChatSelectChannel.Telepathic => Color.PaleVioletRed, //Nyanotrasen code.
ChatSelectChannel.Telepathic => Color.PaleVioletRed, //Nyano - Summary: determines the color for the chat.
_ => Color.DarkGray
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public sealed class ChannelSelectorPopup : Popup
ChatSelectChannel.Whisper,
ChatSelectChannel.Emotes,
ChatSelectChannel.Radio,
ChatSelectChannel.Telepathic, //Nyanotrasen code.
ChatSelectChannel.Telepathic, //Nyano - Summary: determines the order in which telepathic shows.
ChatSelectChannel.LOOC,
ChatSelectChannel.OOC,
ChatSelectChannel.Dead,
Expand Down
4 changes: 2 additions & 2 deletions Content.Server/Anomaly/AnomalySystem.Psionics.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Content.Server.Abilities.Psionics; //Nyanotrasen code.
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 @@ -15,7 +15,7 @@ private void InitializePsionics()
SubscribeLocalEvent<AnomalyComponent, DispelledEvent>(OnDispelled);
}

//Nyanotrasen code.
//Nyano - Summary: gives dispellable behavior to Anomalies.
private void OnDispelled(EntityUid uid, AnomalyComponent component, DispelledEvent args)
{
_dispel.DealDispelDamage(uid);
Expand Down
4 changes: 2 additions & 2 deletions Content.Server/Anomaly/AnomalySystem.Vessel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ private void OnVesselInteractUsing(EntityUid uid, AnomalyVesselComponent compone
if (!TryComp<AnomalyComponent>(anomaly, out var anomalyComponent) || anomalyComponent.ConnectedVessel != null)
return;

// Begin Nyano-code: tie anomaly harvesting to glimmer rate.
// Nyano - Summary - Begin modified code block: tie anomaly harvesting to glimmer rate.
if (this.IsPowered(uid, EntityManager) &&
TryComp<GlimmerSourceComponent>(anomaly, out var glimmerSource))
{
glimmerSource.Active = true;
}
// End Nyano-code.
// Nyano - End modified code block.

component.Anomaly = scanner.ScannedAnomaly;
anomalyComponent.ConnectedVessel = uid;
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Anomaly/AnomalySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public override void Initialize()
SubscribeLocalEvent<AnomalyComponent, ComponentShutdown>(OnShutdown);
SubscribeLocalEvent<AnomalyComponent, StartCollideEvent>(OnStartCollide);

InitializePsionics(); //Nyanotrasen code.
InitializePsionics(); //Nyano - Summary: stats up psionic related behavior.
InitializeGenerator();
InitializeScanner();
InitializeVessel();
Expand Down
6 changes: 3 additions & 3 deletions Content.Server/Chat/Systems/ChatSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public sealed partial class ChatSystem : SharedChatSystem
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly SharedInteractionSystem _interactionSystem = default!;

//Nyanotrasen code.
//Nyano - Summary: pulls in the nyano chat system for psionics.
[Dependency] private readonly NyanoChatSystem _nyanoChatSystem = default!;

public const int VoiceRange = 10; // how far voice goes in world units
Expand Down Expand Up @@ -242,7 +242,7 @@ public void TrySendInGameICMessage(
case InGameICChatType.Emote:
SendEntityEmote(source, message, range, nameOverride, hideLog: hideLog, ignoreActionBlocker: ignoreActionBlocker);
break;
//Nyanotrasen code case.
//Nyano - Summary: case adds the telepathic chat sending ability.
case InGameICChatType.Telepathic:
_nyanoChatSystem.SendTelepathicChat(source, message, range == ChatTransmitRange.HideChat);
break;
Expand Down Expand Up @@ -876,7 +876,7 @@ public enum InGameICChatType : byte
Speak,
Emote,
Whisper,
Telepathic //Nyanotrasen code
Telepathic //Nyano - Summary: adds telepathic as a type of message users can receive.
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions Content.Server/Chemistry/ReagentEffects/MakeSentient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Mind.Components;
using Robust.Shared.Prototypes;
using Content.Server.Psionics; //Nyanotrasen Code.
using Content.Server.Psionics; //Nyano - Summary: pulls in the ability for the sentient creature to become psionic.

namespace Content.Server.Chemistry.ReagentEffects;

Expand Down Expand Up @@ -37,7 +37,7 @@ public override void Effect(ReagentEffectArgs args)

ghostRole = entityManager.AddComponent<GhostRoleComponent>(uid);
entityManager.EnsureComponent<GhostTakeoverAvailableComponent>(uid);
entityManager.EnsureComponent<PotentialPsionicComponent>(uid); //Nyanotrasen Code. Makes the animated body able to get psionics.
entityManager.EnsureComponent<PotentialPsionicComponent>(uid); //Nyano - Summary:. Makes the animated body able to get psionics.

var entityData = entityManager.GetComponent<MetaDataComponent>(uid);
ghostRole.RoleName = entityData.EntityName;
Expand Down
4 changes: 2 additions & 2 deletions Content.Server/Cloning/CloningSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
using Robust.Shared.Physics.Components;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Content.Server.Psionics; //Nyanotrasen code.
using Content.Server.Psionics; //Nyano - Summary: allows the potential psionic ability to be written to the character.

namespace Content.Server.Cloning
{
Expand Down Expand Up @@ -242,7 +242,7 @@ public bool TryCloning(EntityUid uid, EntityUid bodyToClone, MindComponent mind,
var mob = Spawn(speciesPrototype.Prototype, Transform(uid).MapPosition);
_humanoidSystem.CloneAppearance(bodyToClone, mob);

///Nyanotrasen code.
///Nyano - Summary: adds the potential psionic trait to the reanimated mob.
EnsureComp<PotentialPsionicComponent>(mob);

var ev = new CloningEvent(bodyToClone, mob);
Expand Down
4 changes: 2 additions & 2 deletions Content.Server/NPC/Components/NpcFactionMemberComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ public sealed partial class NpcFactionMemberComponent : Component
[ViewVariables]
public readonly HashSet<string> HostileFactions = new();

// Begin Nyano-code: support for specific entities to be friendly.
// Nyano - Summary - Begin modified code block: support for specific entities to be friendly.
/// <summary>
/// Permanently friendly specific entities. Our summoner, etc.
/// Would like to separate. Could I do that by extending this method, maybe?
/// </summary>
public HashSet<EntityUid> ExceptionalFriendlies = new();
// End Nyano-code.
// Nyano - End modified code block.
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
using Robust.Shared.Map.Components;
using Robust.Shared.Physics.Events;
using Robust.Shared.Timing;
using Content.Shared.Abilities.Psionics; //Nyanotrasen code.
using Content.Shared.Abilities.Psionics; //Nyano - Summary: for the telegnostic projection.

namespace Content.Server.Singularity.EntitySystems;

Expand All @@ -39,7 +39,7 @@ public override void Initialize()

SubscribeLocalEvent<MapGridComponent, EventHorizonAttemptConsumeEntityEvent>(PreventConsume);
SubscribeLocalEvent<GhostComponent, EventHorizonAttemptConsumeEntityEvent>(PreventConsume);
SubscribeLocalEvent<TelegnosticProjectionComponent, EventHorizonAttemptConsumeEntityEvent>(PreventConsume); ///Nyanotrasen code.
SubscribeLocalEvent<TelegnosticProjectionComponent, EventHorizonAttemptConsumeEntityEvent>(PreventConsume); ///Nyano - Summary: the telegnositic projection has the same trait as ghosts.
SubscribeLocalEvent<StationDataComponent, EventHorizonAttemptConsumeEntityEvent>(PreventConsume);
SubscribeLocalEvent<EventHorizonComponent, MapInitEvent>(OnHorizonMapInit);
SubscribeLocalEvent<EventHorizonComponent, EntityUnpausedEvent>(OnHorizonUnpaused);
Expand Down
6 changes: 3 additions & 3 deletions Content.Server/StationEvents/EventManagerSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public sealed class EventManagerSystem : EntitySystem
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly IPrototypeManager _prototype = default!;
[Dependency] public readonly GameTicker GameTicker = default!;
[Dependency] private readonly GlimmerSystem _glimmerSystem = default!; //Nyanotrasen code.
[Dependency] private readonly GlimmerSystem _glimmerSystem = default!; //Nyano - Summary: pulls in the glimmer system.

private ISawmill _sawmill = default!;

Expand Down Expand Up @@ -206,7 +206,7 @@ private bool CanRun(EntityPrototype prototype, StationEventComponent stationEven
return false;
}

// Begin Nyano-code: check for glimmer events.
// Nyano - Summary: - Begin modified code block: check for glimmer events.
// This could not be cleanly done anywhere else.
if (_configurationManager.GetCVar(CCVars.GlimmerEnabled) &&
prototype.TryGetComponent<GlimmerEventComponent>(out var glimmerEvent) &&
Expand All @@ -215,7 +215,7 @@ private bool CanRun(EntityPrototype prototype, StationEventComponent stationEven
{
return false;
}
// End Nyano-code.
// Nyano - End modified code block.

return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public sealed partial class ArtifactAnalyzerComponent : Component
[ViewVariables(VVAccess.ReadWrite)]
public float AnalysisDurationMulitplier = 1;

// Begin Nyano-code: tie artifacts to glimmer.
// Nyano - Summary - Begin modified code block: tie artifacts to glimmer.
/// <summary>
/// Ratio of research points to glimmer.
/// Each is 150 and added to this, so
Expand All @@ -44,7 +44,7 @@ public sealed partial class ArtifactAnalyzerComponent : Component
/// How many points per glimmer are added to the sacrifice ratio per tier.
/// </summary>
public int PartRatingExtractRatioMultiplier = 150;
// End Nyano-code.
// Nyano - End modified code block.

/// <summary>
/// The machine part that modifies analysis duration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
using Content.Shared.Psionics.Glimmer; //Nyanotrasen code.
using Content.Shared.Psionics.Glimmer; //Nyano - Summary:.

namespace Content.Server.Xenoarchaeology.Equipment.Systems;

Expand All @@ -42,7 +42,7 @@ public sealed class ArtifactAnalyzerSystem : EntitySystem
[Dependency] private readonly PaperSystem _paper = default!;
[Dependency] private readonly ResearchSystem _research = default!;
[Dependency] private readonly MetaDataSystem _metaSystem = default!;
[Dependency] private readonly GlimmerSystem _glimmerSystem = default!; //Nyanotrasen code.
[Dependency] private readonly GlimmerSystem _glimmerSystem = default!; //Nyano - Summary: pulls in the glimmer system.

/// <inheritdoc/>
public override void Initialize()
Expand Down Expand Up @@ -363,13 +363,13 @@ private void OnExtractButton(EntityUid uid, AnalysisConsoleComponent component,
_research.ModifyServerPoints(server.Value, pointValue, serverComponent);
_artifact.AdjustConsumedPoints(artifact.Value, pointValue);

// Begin Nyano-code: tie artifacts to glimmer.
// Nyano - Summary - Begin modified code block: tie artifacts to glimmer.
if (TryComp<ArtifactAnalyzerComponent>(component.AnalyzerEntity.Value, out var analyzer) &&
analyzer != null)
{
_glimmerSystem.Glimmer += (int) pointValue / analyzer.ExtractRatio;
}
// End Nyano-code.
// Nyano - End modified code block.

_audio.PlayPvs(component.ExtractSound, component.AnalyzerEntity.Value, AudioParams.Default.WithVolume(2f));

Expand Down Expand Up @@ -434,11 +434,11 @@ private void OnRefreshParts(EntityUid uid, ArtifactAnalyzerComponent component,

component.AnalysisDurationMulitplier = MathF.Pow(component.PartRatingAnalysisDurationMultiplier, analysisRating - 1);

// Begin Nyano-code: tie artifacts to glimmer.
// Nyano - Summary - Begin modified code block: tie artifacts to glimmer.
var extractRating = args.PartRatings[component.MachinePartExtractRatio];

component.ExtractRatio = (400 + (int) (extractRating * component.PartRatingExtractRatioMultiplier));
// End Nyano-code.
// Nyano - End modified code block.
}

private void OnUpgradeExamine(EntityUid uid, ArtifactAnalyzerComponent component, UpgradeExamineEvent args)
Expand Down
4 changes: 2 additions & 2 deletions Content.Shared.Database/LogType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ public enum LogType
ItemConfigure = 84,
DeviceLinking = 85,
Tile = 86,
BagOfHolding = 420, //Nyanotrasen code.
Psionics = 421, //Nyanotrasen code.
BagOfHolding = 420, //Nyano - Summary: adds bag of holding.
Psionics = 421, //Nyano - Summary: ads psionic as a log type.
}
4 changes: 2 additions & 2 deletions Content.Shared/Chat/ChatChannel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ public enum ChatChannel : ushort
Unspecified = 1 << 13,

/// <summary>
/// Nyanotrasen Code: Telepathic channel for all psionic entities.
/// Nyano - Summary:: Telepathic channel for all psionic entities.
/// </summary>
Telepathic = 1 << 14,

/// <summary>
/// Channels considered to be IC.
/// </summary>
IC = Local | Whisper | Radio | Dead | Emotes | Damage | Visual | Telepathic, //Telepathic is Nyanotrasen code.
IC = Local | Whisper | Radio | Dead | Emotes | Damage | Visual | Telepathic, //Nyano - Summary: Adds telepathic as an 'IC' labelled chat..

AdminRelated = Admin | AdminAlert | AdminChat,
}
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Chat/ChatSelectChannel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public enum ChatSelectChannel : ushort
Admin = ChatChannel.AdminChat,

/// <summary>
/// Nyanotrasen code. Telepathic channel for all psionic entities.
/// Nyano - Summary:. Telepathic channel for all psionic entities.
/// </summary>
Telepathic = ChatChannel.Telepathic,

Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Chat/SharedChatSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public abstract class SharedChatSystem : EntitySystem
public const char EmotesAltPrefix = '*';
public const char AdminPrefix = ']';
public const char WhisperPrefix = ',';
public const char TelepathicPrefix = '='; //Nyanotrasen code.
public const char TelepathicPrefix = '='; //Nyano - Summary: Adds the telepathic channel's prefix.
public const char DefaultChannelKey = 'h';

[ValidatePrototypeId<RadioChannelPrototype>]
Expand Down
Loading

0 comments on commit 6cc5a33

Please sign in to comment.