EVENT BASED WEIGHTLESSNESS (#37971)

* Init Commit

* Typos

* Commit 2

* Save Interaction Test Mob from failing

* ssss

* Confident I've gotten all the correct prototypes

* Whoops forgot to edit those

* aaaaa

* Better solution

* Test fail fixes

* Yaml fix

* THE FINAL TEST FIX

* Final fix(?)

* whoops

* Added a WeightlessnessChangedEvent

* Check out this diff

* Wait I'm dumb

* Final optimization and don't duplicate code

* Death to IsWeightless

* File scoped namespaces

* REVIEW

* Fix test fails

* FIX TEST FAILS REAL

* A

* Commit of doom

* borgar

* We don't need to specify on map init apparently

* Fuck it

* LOAD BEARING COMMENT

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
This commit is contained in:
Princess Cheeseballs
2025-08-19 11:35:09 -07:00
committed by GitHub
parent 5cd9ba6016
commit 9de76e70c7
31 changed files with 329 additions and 268 deletions

View File

@@ -1,34 +1,17 @@
using Content.Shared.Clothing;
using Content.Shared.Gravity;
using Content.Shared.Inventory;
using Robust.Shared.GameStates;
using Robust.Shared.Map;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Components;
using Robust.Shared.Serialization;
namespace Content.Shared.Movement.Components
{
/// <summary>
/// Ignores gravity entirely.
/// </summary>
[RegisterComponent, NetworkedComponent]
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class MovementIgnoreGravityComponent : Component
{
/// <summary>
/// Whether or not gravity is on or off for this object.
/// Whether gravity is on or off for this object. This will always override the current Gravity State.
/// </summary>
[DataField("gravityState")] public bool Weightless = false;
}
[NetSerializable, Serializable]
public sealed class MovementIgnoreGravityComponentState : ComponentState
{
[DataField, AutoNetworkedField]
public bool Weightless;
public MovementIgnoreGravityComponentState(MovementIgnoreGravityComponent component)
{
Weightless = component.Weightless;
}
}
}