#1462 extracted MapGrid's HasGravity property to separate Content com… (#4200)

* #1462 extracted MapGrid's HasGravity property to separate Content component

* #1462 - PR suggestions

* Merge to master

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Galactic Chimp
2021-06-27 07:43:39 +02:00
committed by GitHub
parent 3cb627531f
commit afb5f5c8eb
10 changed files with 192 additions and 39 deletions

View File

@@ -1,4 +1,4 @@
#nullable enable
#nullable enable
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
@@ -6,13 +6,14 @@ namespace Content.Shared.Gravity
{
public class GravityChangedMessage : EntityEventArgs
{
public GravityChangedMessage(IMapGrid grid)
public GravityChangedMessage(GridId changedGridIndex, bool newGravityState)
{
Grid = grid;
HasGravity = newGravityState;
ChangedGridIndex = changedGridIndex;
}
public IMapGrid Grid { get; }
public GridId ChangedGridIndex { get; }
public bool HasGravity => Grid.HasGravity;
public bool HasGravity { get; }
}
}