Files
Delta-v/Content.Shared/Gravity/FloatingVisualsComponent.cs
T
Princess CheeseballsandPrincess Cheeseballs 94e398b071 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>
2025-11-23 15:22:27 -06:00

28 lines
837 B
C#

using System.Numerics;
using Robust.Shared.GameStates;
namespace Content.Shared.Gravity;
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(SharedFloatingVisualizerSystem))]
public sealed partial class FloatingVisualsComponent : Component
{
/// <summary>
/// How long it takes to go from the bottom of the animation to the top.
/// </summary>
[DataField, AutoNetworkedField]
public float AnimationTime = 2f;
/// <summary>
/// How far it goes in any direction.
/// </summary>
[DataField, AutoNetworkedField]
public Vector2 Offset = new(0, 0.2f);
[DataField, AutoNetworkedField]
public bool CanFloat;
[DataField] // imp. made this a read/write datafield instead of readonly to fix a bug with anomalites.
public string AnimationKey = "gravity";
}