-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial commit * adds astronav cartridge to QM locker * changes requested in review * fix merge conflicts * fixes the statuscontrol disappearing if you eject the cartridge but still have it installed * fix notificationsenabled on salv pda proto * fixes lingering statuscontrol on eject while held --------- Co-authored-by: archrbx <[email protected]>
- Loading branch information
Showing
14 changed files
with
99 additions
and
28 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
Content.Server/CartridgeLoader/Cartridges/AstroNavCartridgeComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using Content.Shared.CartridgeLoader.Cartridges; | ||
using Content.Shared.GPS; | ||
|
||
namespace Content.Server.CartridgeLoader.Cartridges; | ||
|
||
[RegisterComponent] | ||
public sealed partial class AstroNavCartridgeComponent : Component | ||
{ | ||
} |
32 changes: 32 additions & 0 deletions
32
Content.Server/CartridgeLoader/Cartridges/AstroNavCartridgeSystem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using Content.Shared.CartridgeLoader; | ||
using Content.Shared.CartridgeLoader.Cartridges; | ||
using Content.Shared.GPS.Components; | ||
|
||
namespace Content.Server.CartridgeLoader.Cartridges; | ||
|
||
public sealed class AstroNavCartridgeSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly CartridgeLoaderSystem _cartridgeLoaderSystem = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<AstroNavCartridgeComponent, CartridgeAddedEvent>(OnCartridgeAdded); | ||
SubscribeLocalEvent<AstroNavCartridgeComponent, CartridgeRemovedEvent>(OnCartridgeRemoved); | ||
} | ||
|
||
private void OnCartridgeAdded(Entity<AstroNavCartridgeComponent> ent, ref CartridgeAddedEvent args) | ||
{ | ||
EnsureComp<HandheldGPSComponent>(args.Loader); | ||
} | ||
|
||
private void OnCartridgeRemoved(Entity<AstroNavCartridgeComponent> ent, ref CartridgeRemovedEvent args) | ||
{ | ||
// only remove when the program itself is removed | ||
if (!_cartridgeLoaderSystem.HasProgram<AstroNavCartridgeComponent>(args.Loader)) | ||
{ | ||
RemComp<HandheldGPSComponent>(args.Loader); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using Robust.Shared.GameStates; | ||
|
||
namespace Content.Shared.GPS.Components; | ||
|
||
[RegisterComponent, NetworkedComponent] | ||
public sealed partial class HandheldGPSComponent : Component | ||
{ | ||
[DataField] | ||
public float UpdateRate = 1.5f; | ||
} |
9 changes: 0 additions & 9 deletions
9
Content.Shared/Tools/Components/SharedHandheldGPSComponent.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters