mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 13:37:47 +03:00
* Fix wheelchair on cryo spawn. * Goob comment. (cherry picked from commit e5f567e3ff11cc1a5406b71bf0624a8b2e532f01)
21 lines
696 B
C#
21 lines
696 B
C#
using Content.Shared.Buckle;
|
|
|
|
namespace Content.Server.Traits.Assorted;
|
|
|
|
public sealed class BuckleOnMapInitSystem : EntitySystem
|
|
{
|
|
[Dependency] private readonly SharedBuckleSystem _buckleSystem = default!;
|
|
[Dependency] private readonly SharedTransformSystem _transform = default!; // Goobstation
|
|
|
|
public override void Initialize()
|
|
{
|
|
SubscribeLocalEvent<BuckleOnMapInitComponent, MapInitEvent>(OnMapInit);
|
|
}
|
|
|
|
private void OnMapInit(EntityUid uid, BuckleOnMapInitComponent component, MapInitEvent args)
|
|
{
|
|
var buckle = Spawn(component.Prototype, _transform.GetMapCoordinates(uid)); // Goob edit
|
|
_buckleSystem.TryBuckle(uid, uid, buckle);
|
|
}
|
|
}
|