Adds even more smites and a bunch of tools. (#9825)
* Adds three new smites, headstand, locker stuff, and reptilian species swap. * Localize all the smites. * save work * More smites... * Final tweaks. * oops * !PLEH * Adds disarm prone and improved hand removal options. * fix chances. * take out the trash. * Add some admin TRICKS instead of more smites. * oop * Implements the admin test arena and associated trick. * Tricks for granting/revoking access. * e * mfw * Implement quick dialogs, for when you don't want to spend 20 minutes writing a simple dialog prompt. * Forgot the rejuv icon. * E * docs * augh * Add rename/redescribe buttons. * Adds objects menu, implements a couple tricks for stations. * 1984 * Adds a trick for effectively infinite power. * fixes some icon uggo. * a * HALT! * Pause/unpause buttons. * Forgor the textures. * they broke every bone in their body. * i added more * more battery actions, touch up battery icon. * Address reviews.
This commit is contained in:
47
Content.Client/Administration/Systems/KillSignSystem.cs
Normal file
47
Content.Client/Administration/Systems/KillSignSystem.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using Content.Client.Administration.Components;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Client.Administration.Systems;
|
||||
|
||||
public sealed class KillSignSystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
SubscribeLocalEvent<KillSignComponent, ComponentStartup>(KillSignAdded);
|
||||
SubscribeLocalEvent<KillSignComponent, ComponentShutdown>(KillSignRemoved);
|
||||
}
|
||||
|
||||
private void KillSignRemoved(EntityUid uid, KillSignComponent component, ComponentShutdown args)
|
||||
{
|
||||
if (!TryComp<SpriteComponent>(uid, out var sprite))
|
||||
return;
|
||||
|
||||
if (!sprite.LayerMapTryGet(KillSignKey.Key, out var layer))
|
||||
return;
|
||||
|
||||
sprite.RemoveLayer(layer);
|
||||
}
|
||||
|
||||
private void KillSignAdded(EntityUid uid, KillSignComponent component, ComponentStartup args)
|
||||
{
|
||||
if (!TryComp<SpriteComponent>(uid, out var sprite))
|
||||
return;
|
||||
|
||||
if (sprite.LayerMapTryGet(KillSignKey.Key, out var _))
|
||||
return;
|
||||
|
||||
var adj = sprite.Bounds.Height / 2 + ((1.0f/32) * 6.0f);
|
||||
|
||||
var layer = sprite.AddLayer(new SpriteSpecifier.Rsi(new ResourcePath("Objects/Misc/killsign.rsi"), "sign"));
|
||||
sprite.LayerMapSet(KillSignKey.Key, layer);
|
||||
|
||||
sprite.LayerSetOffset(layer, new Vector2(0.0f, adj));
|
||||
sprite.LayerSetShader(layer, "unshaded");
|
||||
}
|
||||
|
||||
private enum KillSignKey
|
||||
{
|
||||
Key,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user