[Trait] Wheelchair bound (#18785)

* Init commit

* move to shared and remove all from component

* maybe that

* Use SharedBuckleSystem

* Rename to WheelchairBound

* Move Carriage to prototype

* Update sprite to TG, add folded sprite, rename carriage to wheelchair

* Fix wheelchair rsi path

* Add stand & down for buckling

* Add wheelchair inhand sprites

* Move wheelchair down in file & fix fold sprite & add suffix Vehicle

* Use new wheelchair id

* Add standing & speed reset on component remove

* Split system to leg paralyzed and wheelchair bound

* Rename to LegsParalyzed

* Rename in prototype

* Move LegsParalyzed to shared

---------

Co-authored-by: Ray <vigersray@gmail.com>
This commit is contained in:
Morb
2023-08-08 03:28:59 +03:00
committed by GitHub
parent 38e7ce16af
commit 8187e00072
12 changed files with 179 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
using Content.Shared.Buckle;
using Content.Shared.Traits.Assorted;
namespace Content.Server.Traits.Assorted;
public sealed class WheelchairBoundSystem : EntitySystem
{
[Dependency] private readonly SharedBuckleSystem _buckleSystem = default!;
public override void Initialize()
{
SubscribeLocalEvent<WheelchairBoundComponent, ComponentStartup>(OnStartup);
}
private void OnStartup(EntityUid uid, WheelchairBoundComponent component, ComponentStartup args)
{
var wheelchair = Spawn(component.WheelchairPrototype, Transform(uid).Coordinates);
_buckleSystem.TryBuckle(uid, uid, wheelchair);
RemComp<WheelchairBoundComponent>(uid);
}
}