Files
wwdpublic/Content.Server/_Goobstation/Interaction/Systems/UseOnStationOnlySystem.cs
sleepyyapril fbc06d2bb4 Finish Command Jobs (#1495)
<!--
This is a semi-strict format, you can add/remove sections as needed but
the order/format should be kept the same
Remove these comments before submitting
-->

# Description

<!--
Explain this PR in as much detail as applicable

Some example prompts to consider:
How might this affect the game? The codebase?
What might be some alternatives to this?
How/Who does this benefit/hurt [the game/codebase]?
-->

Finishes BSO and Nanorep.

---

# TODO

- [x] Jobs
- [x] Clothing
- [x] BSO weapons
- [x] Loadouts
- [x] Mapping
- [x] Set map prototypes

---

# Changelog

<!--
You can add an author after the `🆑` to change the name that appears
in the changelog (ex: `🆑 Death`)
Leaving it blank will default to your GitHub display name
This includes all available types for the changelog
-->

🆑 sleepyapril, Goob Station contributors
- add: Added Nanotrasen Representative and Blueshield Officer
- add: Added Admin Assistant, Nanorep, and Blueshield Officer spawns to
all maps. BSO and Nanorep don't get an office, they get a unique
teleporter. (as of now) Ask your resident mapper to fix this.
- add: Added the loadout options for Nanotrasen Representative and
Blueshield Officer.

---------

Co-authored-by: Aidenkrz <aiden@djkraz.com>
Co-authored-by: Icepick <122653407+Icepicked@users.noreply.github.com>
Co-authored-by: Memeji <greyalphawolf7@gmail.com>
Co-authored-by: Theapug <159912420+Teapug@users.noreply.github.com>
Co-authored-by: DarkenedSynergy <70016079+DarkenedSynergy@users.noreply.github.com>
Co-authored-by: Solstice <solsticeofthewinter@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: BombasterDS <115770678+BombasterDS@users.noreply.github.com>
Co-authored-by: starch <starchpersonal@gmail.com>
Co-authored-by: BombasterDS2 <shvalovdenis.workmail@gmail.com>
Co-authored-by: BombasterDS <deniskaporoshok@gmail.com>
Co-authored-by: Piras314 <p1r4s@proton.me>

(cherry picked from commit a848973a49df8e84d23d13620f7599d2673ccbe7)
2025-01-14 02:21:27 +03:00

29 lines
933 B
C#

using Content.Server._Goobstation.Interaction.Components;
using Content.Server.Popups;
using Content.Server.Station.Systems;
using Content.Shared._Goobstation.Interaction;
namespace Content.Server._Goobstation.Interaction.Systems;
public sealed partial class UseOnStationOnlySystem : EntitySystem
{
[Dependency] private readonly StationSystem _station = default!;
[Dependency] private readonly PopupSystem _popup = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<UseOnStationOnlyComponent, UseInHandAttemptEvent>(OnUseAttempt);
}
private void OnUseAttempt(Entity<UseOnStationOnlyComponent> item, ref UseInHandAttemptEvent args)
{
if (_station.GetOwningStation(args.User) is not null)
return;
_popup.PopupEntity(Loc.GetString("use-on-station-only-not-on-station"), args.User, args.User);
args.Cancel();
}
}