* 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>
22 lines
697 B
C#
22 lines
697 B
C#
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);
|
|
}
|
|
}
|