* #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:
@@ -7,6 +7,7 @@ using Content.Shared.Interaction;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
@@ -108,6 +109,9 @@ namespace Content.Server.Gravity
|
||||
{
|
||||
MakeOn();
|
||||
}
|
||||
|
||||
var msg = new GravityGeneratorUpdateEvent(Owner.Transform.GridID, Status);
|
||||
Owner.EntityManager.EventBus.RaiseLocalEvent(Owner.Uid, msg);
|
||||
}
|
||||
|
||||
private void HandleUIMessage(ServerBoundUserInterfaceMessage message)
|
||||
@@ -163,4 +167,16 @@ namespace Content.Server.Gravity
|
||||
_appearance?.SetData(GravityGeneratorVisuals.CoreVisible, true);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class GravityGeneratorUpdateEvent : EntityEventArgs
|
||||
{
|
||||
public GridId GridId { get; }
|
||||
public GravityGeneratorStatus Status { get; }
|
||||
|
||||
public GravityGeneratorUpdateEvent(GridId gridId, GravityGeneratorStatus status)
|
||||
{
|
||||
GridId = gridId;
|
||||
Status = status;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user