]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
[Bugfix] Fix Cross Grid Magboots (#39910)
authorPrincess Cheeseballs <66055347+Princess-Cheeseballs@users.noreply.github.com>
Wed, 27 Aug 2025 14:26:32 +0000 (07:26 -0700)
committerGitHub <noreply@github.com>
Wed, 27 Aug 2025 14:26:32 +0000 (16:26 +0200)
* Augh

* Remove that

* ViewVariables property so it can be debugged at the very least.

* Remove

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
Content.Shared/Clothing/MagbootsSystem.cs
Content.Shared/Gravity/GravityAffectedComponent.cs
Content.Shared/Gravity/SharedGravitySystem.cs

index 58bc2f0796c9486aebdc98e6bcbe7b33b91212fe..d00211fa656073785fda06a1de9e67b74c1f3395 100644 (file)
@@ -52,7 +52,7 @@ public sealed class SharedMagbootsSystem : EntitySystem
         if (TryComp<MovedByPressureComponent>(user, out var moved))
             moved.Enabled = !state;
 
-        _gravity.RefreshWeightless(user, !state);
+        _gravity.RefreshWeightless(user);
 
         if (state)
             _alerts.ShowAlert(user, ent.Comp.MagbootsAlert);
index 2da7458b07083181cb51a6fc229ea7fcaf6add21..7991677759f1fce665ea2d7af2bea3b1e50f3ba2 100644 (file)
@@ -12,6 +12,6 @@ public sealed partial class GravityAffectedComponent : Component
     /// <summary>
     /// If true, this entity will be considered "weightless"
     /// </summary>
-    [DataField, AutoNetworkedField]
+    [ViewVariables, AutoNetworkedField]
     public bool Weightless = true;
 }
index b54f9b21c8ea4b3027657c2be3582b824cca9087..4ba312f4e08f7833960ed2ca5a171cfb0e580afa 100644 (file)
@@ -92,7 +92,8 @@ public abstract partial class SharedGravitySystem : EntitySystem
 
     /// <summary>
     /// Overload of <see cref="RefreshWeightless(Entity{GravityAffectedComponent?})"/> which also takes a bool for the weightlessness value we want to change to.
-    /// This method is LOAD BEARING for UninitializedSaveTest. DO NOT REMOVE IT.
+    /// This method should only be called if there is no chance something can override the weightless value you're trying to change to.
+    /// This is really only the case if you're applying a weightless value that overrides non-conditionally from events or are a grid with the gravity component.
     /// </summary>
     /// <param name="entity">The entity we are updating the weightless status of</param>
     /// <param name="weightless">The weightless value we are trying to change to, helps avoid needless networking</param>
@@ -142,7 +143,7 @@ public abstract partial class SharedGravitySystem : EntitySystem
         if (args.OldParent == args.Transform.GridUid)
             return;
 
-        RefreshWeightless((entity.Owner, entity.Comp), !EntityGridOrMapHaveGravity((entity, args.Transform)));
+        RefreshWeightless((entity.Owner, entity.Comp));
     }
 
     private void OnBodyTypeChanged(Entity<GravityAffectedComponent> entity, ref PhysicsBodyTypeChangedEvent args)