mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00:00
* Add set pose (#4682) Co-authored-by: Whisper <121047731+QuietlyWhisper@users.noreply.github.com> # Conflicts: # Resources/Prototypes/_RMC14/Entities/Mobs/Species/base.yml * hi * comment * uncommenting Co-authored-by: DisposableCrewmember42 <disposablecrewmember42@proton.me> Signed-off-by: keekee38 <iamabanana372456@gmail.com> * ok so riders still insistent about the adminlog thingy being weird but did it i think? i may be stupid * ty kotob <3 Co-authored-by: KOTOB <59124164+kotobdev@users.noreply.github.com> Signed-off-by: keekee38 <iamabanana372456@gmail.com> * ok ipcs should be able to now! --------- Signed-off-by: keekee38 <iamabanana372456@gmail.com> Co-authored-by: Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com> Co-authored-by: Whisper <121047731+QuietlyWhisper@users.noreply.github.com> Co-authored-by: DrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com> Co-authored-by: DisposableCrewmember42 <disposablecrewmember42@proton.me> Co-authored-by: KOTOB <59124164+kotobdev@users.noreply.github.com>
36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
using Content.Server.Administration;
|
|
using Content.Shared._RMC14.Examine.Pose;
|
|
using Content.Shared.Administration.Logs;
|
|
using Content.Shared.Database;
|
|
using Robust.Shared.Player;
|
|
|
|
namespace Content.Server._RMC14.Examine;
|
|
|
|
public sealed class RMCSetPoseSystem : SharedRMCSetPoseSystem
|
|
{
|
|
[Dependency] private readonly ISharedAdminLogManager _adminLog = default!;
|
|
[Dependency] private readonly QuickDialogSystem _quickDialog = default!;
|
|
|
|
protected override void SetPose(Entity<RMCSetPoseComponent> ent)
|
|
{
|
|
base.SetPose(ent);
|
|
|
|
if (!TryComp<ActorComponent>(ent, out var actor))
|
|
return;
|
|
|
|
var setPosePrompt = Loc.GetString("rmc-set-pose-dialog", ("ent", ent));
|
|
_quickDialog.OpenDialog(actor.PlayerSession,
|
|
Loc.GetString("rmc-set-pose-title"),
|
|
setPosePrompt,
|
|
(string pose) =>
|
|
{
|
|
if (pose.Length > 1000)
|
|
pose = pose[..999];
|
|
_adminLog.Add(LogType.RMCSetPose, $"{ToPrettyString(ent)} set their pose to {pose}");
|
|
ent.Comp.Pose = pose;
|
|
Dirty(ent);
|
|
}
|
|
);
|
|
}
|
|
}
|