mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-01 00:27:59 +00:00
* initial visual nubody * oops overlay * im so pheeming rn * conversion... * tests * comeback of the underwear * oops eyes * blabbl * zeds * yaml linted * search and visible count constraints * reordering * preserve previously selected markings colors * fix test * some ui niceties * ordering * make DB changes backwards-compatible/downgrade-friendly * fix things again * fix migration * vulpkanin markings limit increase * wrapping * code cleanup and more code cleanup and more code cleanup and more code cleanup and * fix slop ports * better sampling API * make filter work + use the method i made for its intended purpose * fix test fails real quick * magic mirror cleanup, remove TODO * don't 0-init the organ profile data * remove deltastates --------- Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com> # Conflicts: # Content.Server/Humanoid/Components/RandomHumanoidAppearanceComponent.cs # Content.Server/Humanoid/Systems/RandomHumanoidAppearanceSystem.cs # Conflicts: # Resources/Prototypes/Species/diona.yml # Conflicts: # Content.Server/Zombies/ZombieSystem.Transform.cs
84 lines
2.5 KiB
C#
84 lines
2.5 KiB
C#
using Content.Server.Administration;
|
|
using Content.Server.Humanoid;
|
|
using Content.Shared.Administration;
|
|
using Content.Shared.Body;
|
|
using Content.Shared.Cloning;
|
|
using Content.Shared.Inventory;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Toolshed;
|
|
|
|
namespace Content.Server.Cloning.Commands;
|
|
|
|
[ToolshedCommand, AdminCommand(AdminFlags.Fun)]
|
|
public sealed class CloneCommand : ToolshedCommand
|
|
{
|
|
private SharedVisualBodySystem? _visualBody;
|
|
private CloningSystem? _cloning;
|
|
private MetaDataSystem? _metadata;
|
|
|
|
[CommandImplementation("humanoidappearance")]
|
|
public IEnumerable<EntityUid> HumanoidAppearance([PipedArgument] IEnumerable<EntityUid> targets, EntityUid source, bool rename)
|
|
{
|
|
_visualBody ??= GetSys<SharedVisualBodySystem>();
|
|
_metadata ??= GetSys<MetaDataSystem>();
|
|
|
|
foreach (var ent in targets)
|
|
{
|
|
_visualBody.CopyAppearanceFrom(source, ent);
|
|
|
|
if (rename)
|
|
_metadata.SetEntityName(ent, MetaData(source).EntityName, raiseEvents: true);
|
|
|
|
yield return ent;
|
|
}
|
|
}
|
|
|
|
[CommandImplementation("comps")]
|
|
public IEnumerable<EntityUid> Comps([PipedArgument] IEnumerable<EntityUid> targets, EntityUid source, ProtoId<CloningSettingsPrototype> settings)
|
|
{
|
|
_cloning ??= GetSys<CloningSystem>();
|
|
|
|
foreach (var ent in targets)
|
|
{
|
|
_cloning.CloneComponents(source, ent, settings);
|
|
yield return ent;
|
|
}
|
|
}
|
|
|
|
[CommandImplementation("equipment")]
|
|
public IEnumerable<EntityUid> Equipment([PipedArgument] IEnumerable<EntityUid> targets, EntityUid source, SlotFlags flags)
|
|
{
|
|
_cloning ??= GetSys<CloningSystem>();
|
|
|
|
foreach (var ent in targets)
|
|
{
|
|
_cloning.CopyEquipment(source, ent, flags);
|
|
yield return ent;
|
|
}
|
|
}
|
|
|
|
[CommandImplementation("implants")]
|
|
public IEnumerable<EntityUid> Implants([PipedArgument] IEnumerable<EntityUid> targets, EntityUid source, bool copyStorage)
|
|
{
|
|
_cloning ??= GetSys<CloningSystem>();
|
|
|
|
foreach (var ent in targets)
|
|
{
|
|
_cloning.CopyImplants(source, ent, copyStorage);
|
|
yield return ent;
|
|
}
|
|
}
|
|
|
|
[CommandImplementation("storage")]
|
|
public IEnumerable<EntityUid> InternalStorage([PipedArgument] IEnumerable<EntityUid> targets, EntityUid source)
|
|
{
|
|
_cloning ??= GetSys<CloningSystem>();
|
|
|
|
foreach (var ent in targets)
|
|
{
|
|
_cloning.CopyStorage(source, ent);
|
|
yield return ent;
|
|
}
|
|
}
|
|
}
|