Skip to content

Commit

Permalink
fixes the statuscontrol disappearing if you eject the cartridge but s…
Browse files Browse the repository at this point in the history
…till have it installed
  • Loading branch information
archrbx committed Sep 19, 2024
1 parent 807d60b commit f66026c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Content.Server.CartridgeLoader.Cartridges;

public sealed class AstroNavCartridgeSystem : EntitySystem
{
[Dependency] private readonly CartridgeLoaderSystem? _cartridgeLoaderSystem = default!;
[Dependency] private readonly CartridgeLoaderSystem _cartridgeLoaderSystem = default!;

public override void Initialize()
{
Expand All @@ -23,6 +23,10 @@ private void OnCartridgeAdded(Entity<AstroNavCartridgeComponent> ent, ref Cartri

private void OnCartridgeRemoved(Entity<AstroNavCartridgeComponent> ent, ref CartridgeRemovedEvent args)
{
RemComp<HandheldGPSComponent>(args.Loader);
// only remove when the program itself is removed
if (!_cartridgeLoaderSystem.HasProgram<AstroNavCartridgeComponent>(args.Loader))
{
RemComp<HandheldGPSComponent>(args.Loader);
}
}
}
3 changes: 0 additions & 3 deletions Resources/Textures/Objects/Devices/cartridge.rsi/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@
{
"name": "cart-y"
},
{
"name": "cart-sec"
},
{
"name": "insert_overlay"
}
Expand Down

0 comments on commit f66026c

Please sign in to comment.