Rollerbed / foldable strap fixes. (#16106)
This commit is contained in:
@@ -169,6 +169,7 @@ public abstract partial class SharedBuckleSystem
|
||||
/// <param name="strapComp"> strap component of the thing we are strapping to </param>
|
||||
private void UpdateBuckleStatus(EntityUid uid, BuckleComponent buckleComp, StrapComponent? strapComp = null)
|
||||
{
|
||||
AppearanceSystem.SetData(uid, StrapVisuals.State, buckleComp.Buckled);
|
||||
if (buckleComp.BuckledTo != null)
|
||||
{
|
||||
if (!Resolve(buckleComp.BuckledTo.Value, ref strapComp))
|
||||
@@ -471,8 +472,6 @@ public abstract partial class SharedBuckleSystem
|
||||
{
|
||||
_standingSystem.Down(buckleUid);
|
||||
}
|
||||
// Sync StrapComponent data
|
||||
AppearanceSystem.SetData(strapUid, StrapVisuals.State, false);
|
||||
if (strapComp.BuckledEntities.Remove(buckleUid))
|
||||
{
|
||||
strapComp.OccupiedSize -= buckleComp.Size;
|
||||
@@ -480,6 +479,7 @@ public abstract partial class SharedBuckleSystem
|
||||
Dirty(strapComp);
|
||||
}
|
||||
|
||||
AppearanceSystem.SetData(strapUid, StrapVisuals.State, strapComp.BuckledEntities.Count != 0);
|
||||
_audioSystem.PlayPredicted(strapComp.UnbuckleSound, strapUid, buckleUid);
|
||||
|
||||
var ev = new BuckleChangeEvent(strapUid, buckleUid, false);
|
||||
|
||||
Reference in New Issue
Block a user