- add: Changeling antagonist (#2)

* Changeling WIP

* UI

* Pointers fix

* Moved out abilities

* Regenerate ability

* Fixed Regenerate ability
Prevent ghosting while regenerating

* Cleanup

* Base lesser form

* Finished Lesser Form && Transform

* Transform Sting

* Blind Sting

* Mute Sting
Added OnExamine on absorbed human

* Hallucination Sting
Changeling Absorb and transfer absorbed entities to absorber

* Cryogenic Sting

* Adrenaline Sacs

* Transform now uses Polymorph

* Armblade, Shield, Armor

* Tentacle Arm ability
Tentacle Gun system

* WIP with bugs

* WiP bugs

* fix implant transfer

* Fixed bugs with shop transfer and actions transfer

* Just in case

* Vi sitter i ventrilo och spelar DotA

* Fixes and proper LesserForm tracking

* !!!!!

* Fixed empty buttons

* WIP Gamerule
Ready - shop

* nerf stun time cause its sucks

* cleaning

* just in case

* Absorb DNA Objective.

* Partial objectives with bugs

* fix

* fix pointer

* Changeling objectives

* Changeling objectives №2

* Admin verb, game rule

* Fixed empty list check
Icons for objectives

* Changeling chat, changeling names etc.

* fix some merge errors

* - fix: Fixed all bugs with changeling

---------

Co-authored-by: Y-Parvus <yevhen.parvus@gmail.com>
Co-authored-by: Y-Parvus <61109031+Y-Parvus@users.noreply.github.com>
Co-authored-by: HitPanda <104197232+EnefFlow@users.noreply.github.com>
Co-authored-by: EnefFlow <regeto90@mail.ru>
This commit is contained in:
rhailrake
2024-01-31 14:01:35 +00:00
committed by GitHub
parent 7872502bf8
commit aa8e31fa7e
127 changed files with 3747 additions and 33 deletions

View File

@@ -0,0 +1,43 @@
using Content.Server.Chat.Managers;
using Content.Server.Chat.Systems;
using Content.Shared.Administration;
using Content.Shared.Changeling;
using Robust.Shared.Console;
using Robust.Shared.Enums;
namespace Content.Server.Chat.Commands;
[AnyCommand]
internal sealed class ChangelingChatCommand : IConsoleCommand
{
public string Command => "gsay";
public string Description => "Send changeling Hive message";
public string Help => "gsay <text>";
public void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (shell.Player is not { } player)
{
shell.WriteError("This command cannot be run from the server.");
return;
}
if (player.AttachedEntity is not { Valid: true } entity)
return;
if (args.Length < 1)
return;
var entityManager = IoCManager.Resolve<IEntityManager>();
if (!entityManager.HasComponent<ChangelingComponent>(entity))
return;
var message = string.Join(" ", args).Trim();
if (string.IsNullOrEmpty(message))
return;
entityManager.System<ChatSystem>().TrySendInGameOOCMessage(entity, message,
InGameOOCChatType.Changeling, false, shell, player);
}
}

View File

@@ -1,5 +1,6 @@
using Content.Server.Administration.Logs;
using Content.Server.Popups;
using Content.Shared.Changeling;
using Content.Shared.Damage;
using Content.Shared.Damage.Prototypes;
using Content.Shared.Database;
@@ -31,6 +32,11 @@ namespace Content.Server.Chat
if (_tagSystem.HasTag(victim, "CannotSuicide"))
return false;
//Miracle edit
if (TryComp<ChangelingComponent>(victim, out var changeling) && changeling.IsRegenerating)
return false;
//Miracle edit end
// Checks to see if the player is dead.
if (!TryComp<MobStateComponent>(victim, out var mobState) || _mobState.IsDead(victim, mobState))
return false;

View File

@@ -14,6 +14,7 @@ using Content.Server._White.PandaSocket.Main;
using Content.Shared.ActionBlocker;
using Content.Shared.Administration;
using Content.Shared.CCVar;
using Content.Shared.Changeling;
using Content.Shared.Chat;
using Content.Shared.Database;
using Content.Shared.Decals;
@@ -357,6 +358,9 @@ public sealed partial class ChatSystem : SharedChatSystem
case InGameOOCChatType.Looc:
SendLOOC(source, player, message, hideChat);
break;
case InGameOOCChatType.Changeling:
SendChangelingChat(source, player, message, hideChat);
break;
case InGameOOCChatType.Cult:
SendCultChat(source, player, message, hideChat);
break;
@@ -767,6 +771,37 @@ public sealed partial class ChatSystem : SharedChatSystem
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"LOOC from {player:Player}: {message}");
}
private void SendChangelingChat(EntityUid source, ICommonSession player, string message, bool hideChat)
{
if (!TryComp<ChangelingComponent>(source, out var changeling))
return;
var clients = GetChangelingChatClients();
var playerName = changeling.HiveName;
message = $"{char.ToUpper(message[0])}{message[1..]}";
var wrappedMessage = Loc.GetString("chat-manager-send-changeling-chat-wrap-message",
("player", playerName),
("message", FormattedMessage.EscapeText(message)));
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Changeling chat from {player:Player}-({playerName}): {message}");
_chatManager.ChatMessageToMany(ChatChannel.Changeling, message, wrappedMessage, source,
hideChat, false, clients.ToList());
}
private IEnumerable<INetChannel> GetChangelingChatClients()
{
return Filter.Empty()
.AddWhereAttachedEntity(HasComp<GhostComponent>)
.AddWhereAttachedEntity(HasComp<ChangelingComponent>)
.Recipients
.Select(p => p.Channel);
}
// WD EDIT
private void SendCultChat(EntityUid source, ICommonSession player, string message, bool hideChat)
{
@@ -1243,6 +1278,7 @@ public enum InGameOOCChatType : byte
{
Looc,
Dead,
Changeling,
Cult
}