Gravity Generators cannot be unanchored while active (#41256)
* Add unanchor attempt check * Combine shared component and server component - Combines SharedGravityGeneratorComponent and GravityGeneratorComponent - AutoNetworked the GravityActiveBool * Remove SharedGravityGeneratorComponent * Update to SharedGravityGeneratorComponent * Fix to be a complete sentence * Dirty GravityActive whenever changed * Rename component and remove view variables * Update referenced component name * Move unanchor attempt to shared system * Add client system * Revert popup to PopupEntity * Fix popup to be PopupClient * Set access restriction on GravityActive
This commit is contained in:
@@ -12,14 +12,14 @@ public sealed partial class GravitySystem : SharedGravitySystem
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<SharedGravityGeneratorComponent, AppearanceChangeEvent>(OnAppearanceChange);
|
||||
SubscribeLocalEvent<GravityGeneratorComponent, AppearanceChangeEvent>(OnAppearanceChange);
|
||||
InitializeShake();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ensures that the visible state of gravity generators are synced with their sprites.
|
||||
/// </summary>
|
||||
private void OnAppearanceChange(EntityUid uid, SharedGravityGeneratorComponent comp, ref AppearanceChangeEvent args)
|
||||
private void OnAppearanceChange(EntityUid uid, GravityGeneratorComponent comp, ref AppearanceChangeEvent args)
|
||||
{
|
||||
if (args.Sprite == null)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user