mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-18 14:07:53 +03:00
* Rework wheelchairbound Fixes the save/load bug and fixes it being a singleton. * weh (cherry picked from commit 243491dd596ffad3698d1d00a645195f2224386f)
20 lines
585 B
C#
20 lines
585 B
C#
using Content.Shared.Buckle;
|
|
|
|
namespace Content.Server.Traits.Assorted;
|
|
|
|
public sealed class BuckleOnMapInitSystem : EntitySystem
|
|
{
|
|
[Dependency] private readonly SharedBuckleSystem _buckleSystem = default!;
|
|
|
|
public override void Initialize()
|
|
{
|
|
SubscribeLocalEvent<BuckleOnMapInitComponent, MapInitEvent>(OnMapInit);
|
|
}
|
|
|
|
private void OnMapInit(EntityUid uid, BuckleOnMapInitComponent component, MapInitEvent args)
|
|
{
|
|
var buckle = Spawn(component.Prototype, Transform(uid).Coordinates);
|
|
_buckleSystem.TryBuckle(uid, uid, buckle);
|
|
}
|
|
}
|