Rollerbed / foldable strap fixes. (#16106)
This commit is contained in:
@@ -14,6 +14,7 @@ public abstract partial class SharedBuckleSystem
|
||||
{
|
||||
private void InitializeStrap()
|
||||
{
|
||||
SubscribeLocalEvent<StrapComponent, ComponentStartup>(OnStrapStartup);
|
||||
SubscribeLocalEvent<StrapComponent, ComponentShutdown>(OnStrapShutdown);
|
||||
SubscribeLocalEvent<StrapComponent, ComponentRemove>((_, c, _) => StrapRemoveAll(c));
|
||||
|
||||
@@ -34,6 +35,11 @@ public abstract partial class SharedBuckleSystem
|
||||
SubscribeLocalEvent<StrapComponent, MoveEvent>(OnStrapMoveEvent);
|
||||
}
|
||||
|
||||
private void OnStrapStartup(EntityUid uid, StrapComponent component, ComponentStartup args)
|
||||
{
|
||||
AppearanceSystem.SetData(uid, StrapVisuals.State, component.BuckledEntities.Count != 0);
|
||||
}
|
||||
|
||||
private void OnStrapShutdown(EntityUid uid, StrapComponent component, ComponentShutdown args)
|
||||
{
|
||||
if (LifeStage(uid) > EntityLifeStage.MapInitialized)
|
||||
|
||||
Reference in New Issue
Block a user