mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-18 14:07:53 +03:00
<!-- This is a semi-strict format, you can add/remove sections as needed but the order/format should be kept the same Remove these comments before submitting --> # Description <!-- Explain this PR in as much detail as applicable Some example prompts to consider: How might this affect the game? The codebase? What might be some alternatives to this? How/Who does this benefit/hurt [the game/codebase]? --> With protection against flashes a bit more easily obtainable than before (welding masks, sunglasses, engineering goggles, cyber eye traits, etc.) and having thought about this idea before, I'd like to do a quick poll on an idea I've had and would be willing to implement: Instead of a Flash, give HeadRevolutionaries a Manifesto. They use this (with a short doafter) on a person to convert them, spouting Rev Ideology at them as the doafter runs. This will only be blockable by * Mindshields * Not being an intelligent creature As a side-effect, Epistemics won't necessarily be the Prime First Target to Rev anymore. Unless they want more books and they're in the library. A head revolutionary will spawn with this book. It may also be found in maintenance or bookshelves, though this is not common. This is to ensure that _having_ the book does not immediately out you as a revolutionary. The book has no charges, as opposed to flashes. This is balanced out by the fact that you audibly spout revolutionary ideology and propaganda at a target and that it takes a few seconds to do the conversion. --- <!-- This is default collapsed, readers click to expand it and see all your media The PR media section can get very large at times, so this is a good way to keep it clean The title is written using HTML tags The title must be within the <summary> tags or you won't see it --> <details><summary><h1>Media</h1></summary> <p> https://github.com/user-attachments/assets/089d707b-9178-45b1-a38a-99f06ae5d9b1 </p> </details> --- # Changelog <!-- You can add an author after the `🆑` to change the name that appears in the changelog (ex: `🆑 Death`) Leaving it blank will default to your GitHub display name This includes all available types for the changelog --> 🆑 - tweak: Changed the way Revolutionaries convert people. Instead of flashes, they now use the Revolutionary Manifesto to 'persuade' new conspirators. This has a small delay (three seconds) and will make you speak propaganda at the target. Note that the book itself is not contraband, and may also be found in other places. Only a Head Revolutionary will be able to make use of its persuasive power, however... <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new in-game item—the Revolutionary Manifesto—which replaces previous flash-based conversion tools. It features distinctive visual design and sound effects. - Added a new method for sending in-game chat messages to all users, enhancing communication capabilities. - **Gameplay Updates** - Head Revolutionary roles now convert others using the manifesto, with updated narrative text, motivational speeches, and revised starting gear. - **Communication Enhancements** - Improved in-game messaging systems streamline chat interactions for a smoother experience. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Timfa <timfalken@hotmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: VMSolidus <evilexecutive@gmail.com> (cherry picked from commit 4f4c5be744332ba03245de0a5da8fd36255855f5)
114 lines
4.0 KiB
C#
114 lines
4.0 KiB
C#
using Content.Client.Administration.Managers;
|
|
using Content.Client.Ghost;
|
|
using Content.Shared.Administration;
|
|
using Content.Shared.Chat;
|
|
using Robust.Client.Console;
|
|
using Robust.Shared.Network;
|
|
using Robust.Shared.Utility;
|
|
|
|
namespace Content.Client.Chat.Managers
|
|
{
|
|
internal sealed class ChatManager : IChatManager
|
|
{
|
|
[Dependency] private readonly IClientConsoleHost _consoleHost = default!;
|
|
[Dependency] private readonly IClientAdminManager _adminMgr = default!;
|
|
[Dependency] private readonly IEntitySystemManager _systems = default!;
|
|
|
|
private ISawmill _sawmill = default!;
|
|
public event Action? PermissionsUpdated; //Nyano - Summary: need to be able to update perms for new psionics.
|
|
public void Initialize()
|
|
{
|
|
_sawmill = Logger.GetSawmill("chat");
|
|
_sawmill.Level = LogLevel.Info;
|
|
}
|
|
|
|
public void SendAdminAlert(string message)
|
|
{
|
|
// See server-side manager. This just exists for shared code.
|
|
}
|
|
|
|
public void SendAdminAlert(EntityUid player, string message)
|
|
{
|
|
// See server-side manager. This just exists for shared code.
|
|
}
|
|
|
|
public void ChatMessageToAll(
|
|
ChatChannel channel,
|
|
string message,
|
|
string wrappedMessage,
|
|
EntityUid source,
|
|
bool hideChat,
|
|
bool recordReplay,
|
|
Color? colorOverride = null,
|
|
string? audioPath = null,
|
|
float audioVolume = 0,
|
|
NetUserId? author = null,
|
|
bool ignoreChatStack = false
|
|
)
|
|
{
|
|
// See server-side code. This method only exists for shared.
|
|
}
|
|
|
|
public void SendMessage(string text, ChatSelectChannel channel)
|
|
{
|
|
var str = text.ToString();
|
|
switch (channel)
|
|
{
|
|
case ChatSelectChannel.Console:
|
|
// run locally
|
|
_consoleHost.ExecuteCommand(text);
|
|
break;
|
|
|
|
case ChatSelectChannel.LOOC:
|
|
_consoleHost.ExecuteCommand($"looc \"{CommandParsing.Escape(str)}\"");
|
|
break;
|
|
|
|
case ChatSelectChannel.OOC:
|
|
_consoleHost.ExecuteCommand($"ooc \"{CommandParsing.Escape(str)}\"");
|
|
break;
|
|
|
|
case ChatSelectChannel.Admin:
|
|
_consoleHost.ExecuteCommand($"asay \"{CommandParsing.Escape(str)}\"");
|
|
break;
|
|
|
|
case ChatSelectChannel.Emotes:
|
|
_consoleHost.ExecuteCommand($"me \"{CommandParsing.Escape(str)}\"");
|
|
break;
|
|
|
|
case ChatSelectChannel.Dead:
|
|
if (_systems.GetEntitySystemOrNull<GhostSystem>() is {IsGhost: true})
|
|
goto case ChatSelectChannel.Local;
|
|
|
|
if (_adminMgr.HasFlag(AdminFlags.Admin))
|
|
_consoleHost.ExecuteCommand($"dsay \"{CommandParsing.Escape(str)}\"");
|
|
else
|
|
_sawmill.Warning("Tried to speak on deadchat without being ghost or admin.");
|
|
break;
|
|
|
|
// TODO sepearate radio and say into separate commands.
|
|
case ChatSelectChannel.Radio:
|
|
case ChatSelectChannel.Local:
|
|
_consoleHost.ExecuteCommand($"say \"{CommandParsing.Escape(str)}\"");
|
|
break;
|
|
|
|
case ChatSelectChannel.Whisper:
|
|
_consoleHost.ExecuteCommand($"whisper \"{CommandParsing.Escape(str)}\"");
|
|
break;
|
|
|
|
//Nyano - Summary: sends the command for telepath communication.
|
|
case ChatSelectChannel.Telepathic:
|
|
_consoleHost.ExecuteCommand($"tsay \"{CommandParsing.Escape(str)}\"");
|
|
break;
|
|
|
|
default:
|
|
throw new ArgumentOutOfRangeException(nameof(channel), channel, null);
|
|
}
|
|
}
|
|
//Nyano - Summary: fires off the update permissions script.
|
|
public void UpdatePermissions()
|
|
{
|
|
PermissionsUpdated?.Invoke();
|
|
}
|
|
}
|
|
}
|