Skip to content

Commit

Permalink
Psionics Registry Computer, PsiWatch, and Epi-Glasses/Epi-HUD (#1598)
Browse files Browse the repository at this point in the history
# Description
This adds the wonderful `Psionics Registry Computer` which allows you
to, just like Criminal Records, mark people that will show their icons
to other individuals wearing the appropriate gear, and will allow you to
keep track of such individuals in a similar way by making a `PsiWatch`
app that will show the reasons.

For the purposes of easement, I've left the fingerprints and DNA in
there, but individuals will not show up with it in the actual file. The
game would just crash when I removed the filters, so I left them in. The
dropdown also just looked cleaner when it was there instead of removing
it and replacing it with a label.

I've recolored the sprites for the sec-glasses and sec-HUD to make the
epi-glasses and epi-HUD using Epistemics colors.
I've recolored the sprite for the CriminalRecords computer to look
different and be cool.

---

# TODO
A list of things I've done split into categories.

### Spriting
- [x] (Recolor) Sprite the epi-glasses and epi-HUD.
- [x] Sprite the PsionicsRecords computer screen.
- [x] Sprite the Psionics Status icons.
- [x] Change the sprite for the Psionics Abusing (it is hard to tell any
difference from suspected right now).

### Records
- [x] Set up records XAML that basically duplicates the Criminal
Records.
- [x] Remove History (not necessary).
- [x] Change all the naming schema to match.
- [x] Change the categories and setup reason-requirement for each
submission type.
- [x] Change the "reason" to "psionics" so it is more intuitive.

### Computer Setup
- [x] Setup computer to show UI.
- [x] Setup system to report to report to Epistemics (Science) radio
when anything is changed.
- [x] Setup the system to only accept Epistemics (Research) access.
- [x] Setup the computer board.
- [x] Setup the sprites for the computers.

### Equipment and Icons
- [x] Create the icons and ensure the ShowPsionicsRecordIcons prototype
works.
- [x] Create the entity prototypes for the glasses and HUD in the game
to show textures.
- [x] Set it up so the glasses and HUD show the user the icons when
they're wearing them (having hard time fixing this at 06:00 in the
morning).

### PDA App
- [x] Setup the PDA app to mimic the SecWatch app as its own (PsiWatch).
- [x] Add the PDA app cartridge to Chaplain, Mantis, Cataloguer, and
Mystagogue.
- [x] Add cartridge to the Mystagogue locker (so they can give others
it).

### Loadouts
- [x] Add the epi-HUD to the Chaplain, Mantis, Cataloguer and
Mystagogue.
- [x] Add the epi-glasses to the Mystagogue.
- [x] Add the epi-glasses to Chaplain, Mantis, and Cataloguer (for 3
points).

### Mapping
- [x] Add the Psionics Registry Computer to every map.

### Miscellaneous Fixes/Changes
- [x] Make the computer only work for Chaplain (Chapel), Cataloguer
(Library), Mantis (Mantis), and Mystagogue (ResearchDirector).
- [x] Fix Chaplain PDA (did not have any programs installed
automatically, now it does).

---

# Media
I will add more media when I finish the rest. For now, it's just us.

<details><summary><h3>Registry Working</h3></summary>
<p>


https://github.com/user-attachments/assets/f534a1b6-6873-4bcd-9fe5-c7138069ecc0

</p>
</details>
<details><summary><h3>Loadouts and PsiWatch</h3></summary>
<p>

Cataloguer

![image](https://github.com/user-attachments/assets/3a5c3b2c-13e8-470f-8ea7-cff828f03e8d)
Chaplain

![image](https://github.com/user-attachments/assets/35a1255c-9447-4aeb-b200-48f2d00782e1)
Mantis

![image](https://github.com/user-attachments/assets/155ac859-10fd-4233-a84d-31f8f32b2f71)
Mystagogue

![image](https://github.com/user-attachments/assets/ddfd178f-2d79-4e1f-9226-51352eb8c0c9)

---

No Users in PsiWatch

![image](https://github.com/user-attachments/assets/63186e30-8c04-409b-8478-eb6bc9006f5f)
Suspected in PsiWatch

![image](https://github.com/user-attachments/assets/e9009714-0ed5-496f-a836-04f01f9e13e8)
Registered in PsiWatch

![image](https://github.com/user-attachments/assets/5f565ec6-4f5f-4303-89cc-f9201de01568)
Abusing in PsiWatch

![image](https://github.com/user-attachments/assets/d2f623b4-f2fa-419b-9b3e-a77001aff8ae)
PsiWatch in PDA

![image](https://github.com/user-attachments/assets/262ffd2e-f798-41db-8e45-4b64613aac0d)
Picture of the PDAs and PsiWatch Cartridge

![image](https://github.com/user-attachments/assets/ed334e8d-6236-4252-82b8-327f59609751)

---

Mystagogue Lockers with PsiWatch Cartridge

![image](https://github.com/user-attachments/assets/e56cef9c-2d9e-46bb-87ca-3e6cd2c85240)

</p>
</details>
<details><summary><h3>Mapping Locations</h3></summary>
<p>

Arena

![image](https://github.com/user-attachments/assets/b24e997d-051d-4def-a28c-dc1029566f0d)
Asterisk

![image](https://github.com/user-attachments/assets/6e2faf02-350e-4608-b629-c402d8c2a0fc)
Core

![image](https://github.com/user-attachments/assets/0d43e3a0-36c2-4c51-9745-d2a4e1d70217)
Edge

![image](https://github.com/user-attachments/assets/478180e2-e63a-4d9a-bf13-365b2648778b)
Europa

![image](https://github.com/user-attachments/assets/a385fc48-016e-40bd-8dbc-dc3904b62f05)
Gaxstation

![image](https://github.com/user-attachments/assets/207c267b-bf01-4ba5-b829-034ad26d48ef)
Glacier

![image](https://github.com/user-attachments/assets/2432840a-2ecc-4957-b82e-ed8406453fbc)
Hive

![image](https://github.com/user-attachments/assets/d03ec8a0-de82-4f0f-af90-3bb3e76c1ff7)
Lighthouse

![image](https://github.com/user-attachments/assets/3a6b8cc0-5692-4e12-a90f-8d0427469cd5)
Meta

![image](https://github.com/user-attachments/assets/c8092fd1-a2cb-4b07-966c-c13a673f16ac)
Pebble

![image](https://github.com/user-attachments/assets/084d76a1-b458-4693-a22e-3787a00f69fd)
Radstation

![image](https://github.com/user-attachments/assets/a98b48dc-70e3-429c-b2f5-99ba2a5f194a)
Saltern

![image](https://github.com/user-attachments/assets/b7e52f6f-8d55-476f-9991-de72c559fc16)
Shoukou

![image](https://github.com/user-attachments/assets/2495e13f-f07a-414d-993e-7e29e48c7f9c)
Submarine

![image](https://github.com/user-attachments/assets/08a92a84-513f-40d2-8ed3-313189805838)
Tortuga

![image](https://github.com/user-attachments/assets/0009b512-ff07-4d17-8825-71a182cb67dc)

</p>
</details>

---

# Changelog
:cl:
- add: Added Psionics Registry Computer. Now you can record Psionics
users in Epistemics.
- add: Added epi-glasses and epi-HUD to see Psionics Users icons.
(Chaplain, Cataloguer, Mantis, and Mystagogue have access in loadout).
- add: Added PsiWatch. Now you can see the Psionics Records data on your
PDA!
- fix: Fixed Chaplain not having any programs in their PDA on spawn.

---------

Signed-off-by: sleepyyapril <[email protected]>
Co-authored-by: sleepyyapril <[email protected]>
  • Loading branch information
CerberusWolfie and sleepyyapril authored Jan 20, 2025
1 parent 1909b3f commit fc7ecc4
Show file tree
Hide file tree
Showing 80 changed files with 1,901 additions and 56 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<BoxContainer xmlns="https://spacestation14.io"
xmlns:cartridges="clr-namespace:Content.Client.CartridgeLoader.Cartridges"
xmlns:customControls="clr-namespace:Content.Client.Administration.UI.CustomControls"
HorizontalExpand="True"
VerticalExpand="True"
Margin="5">
<!-- All labels populated in constructor -->
<BoxContainer Orientation="Horizontal" HorizontalAlignment="Left">
<BoxContainer Orientation="Vertical">
<Label Name="Status"/>
<Label Text="{Loc 'psionics-records-console-reason'}"/>
</BoxContainer>
<customControls:VSeparator StyleClasses="LowDivider" Margin="8 0"/>
<BoxContainer Orientation="Vertical">
<Label Name="Title"/>
<Label Name="Reason"/>
</BoxContainer>
</BoxContainer>
</BoxContainer>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using Content.Shared.CartridgeLoader.Cartridges;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;

/// <summary>
/// ADAPTED FROM SECWATCH - DELTAV
/// </summary>

namespace Content.Client.CartridgeLoader.Cartridges;

[GenerateTypedNameReferences]
public sealed partial class PsiWatchEntryControl : BoxContainer
{
public PsiWatchEntryControl(PsiWatchEntry entry)
{
RobustXamlLoader.Load(this);

Status.Text = Loc.GetString($"psionics-records-status-{entry.Status.ToString().ToLower()}");
Title.Text = Loc.GetString("psi-watch-entry", ("name", entry.Name), ("job", entry.Job));

Reason.Text = entry.Reason ?? Loc.GetString("psi-watch-no-reason");
}
}
31 changes: 31 additions & 0 deletions Content.Client/CartridgeLoader/Cartridges/PsiWatchUi.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using Content.Client.UserInterface.Fragments;
using Content.Shared.CartridgeLoader;
using Content.Shared.CartridgeLoader.Cartridges;
using Robust.Client.UserInterface;

/// <summary>
/// ADAPTED FROM SECWATCH - DELTAV
/// </summary>

namespace Content.Client.CartridgeLoader.Cartridges;

public sealed partial class PsiWatchUi : UIFragment
{
private PsiWatchUiFragment? _fragment;

public override Control GetUIFragmentRoot()
{
return _fragment!;
}

public override void Setup(BoundUserInterface ui, EntityUid? owner)
{
_fragment = new PsiWatchUiFragment();
}

public override void UpdateState(BoundUserInterfaceState state)
{
if (state is PsiWatchUiState cast)
_fragment?.UpdateState(cast);
}
}
13 changes: 13 additions & 0 deletions Content.Client/CartridgeLoader/Cartridges/PsiWatchUiFragment.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<cartridges:PsiWatchUiFragment xmlns="https://spacestation14.io"
xmlns:cartridges="clr-namespace:Content.Client.CartridgeLoader.Cartridges"
Margin="5"
VerticalExpand="True">
<BoxContainer Orientation="Vertical" HorizontalExpand="True" VerticalExpand="True">
<Label Text="{Loc 'psi-watch-title'}" HorizontalExpand="True" HorizontalAlignment="Center"/>
<Label Name="NoEntries" Text="{Loc 'psi-watch-no-entries'}" HorizontalExpand="True" HorizontalAlignment="Center" Visible="False"/>
<ScrollContainer HorizontalExpand="True" VerticalExpand="True">
<!-- Populated when state received -->
<BoxContainer Name="Entries" Orientation="Vertical" VerticalAlignment="Top"/>
</ScrollContainer>
</BoxContainer>
</cartridges:PsiWatchUiFragment>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using Content.Shared.CartridgeLoader.Cartridges;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;

/// <summary>
/// ADAPTED FROM SECWATCH - DELTAV
/// </summary>

namespace Content.Client.CartridgeLoader.Cartridges;

[GenerateTypedNameReferences]
public sealed partial class PsiWatchUiFragment : BoxContainer
{
public PsiWatchUiFragment()
{
RobustXamlLoader.Load(this);
}

public void UpdateState(PsiWatchUiState state)
{
NoEntries.Visible = state.Entries.Count == 0;
Entries.RemoveAllChildren();
foreach (var entry in state.Entries)
{
Entries.AddChild(new PsiWatchEntryControl(entry));
}
}
}
32 changes: 32 additions & 0 deletions Content.Client/Overlays/ShowPsionicsRecordIconsSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using Content.Shared.Overlays;
using Content.Shared.Psionics.Components;
using Content.Shared.StatusIcon;
using Content.Shared.StatusIcon.Components;
using Robust.Shared.Prototypes;

/// <summary>
/// EVERYTHING HERE IS A MODIFIED VERSION OF CRIMINAL RECORDS
/// </summary>

namespace Content.Client.Overlays;

public sealed class ShowPsionicsRecordIconsSystem : EquipmentHudSystem<ShowPsionicsRecordIconsComponent>
{
[Dependency] private readonly IPrototypeManager _prototype = default!;

public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<PsionicsRecordComponent, GetStatusIconsEvent>(OnGetStatusIconsEvent);
}

private void OnGetStatusIconsEvent(EntityUid uid, PsionicsRecordComponent component, ref GetStatusIconsEvent ev)
{
if (!IsActive)
return;

if (_prototype.TryIndex(component.StatusIcon, out var iconPrototype))
ev.StatusIcons.Add(iconPrototype);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Content.Shared.PsionicsRecords.Systems;

/// <summary>
/// EVERYTHING HERE IS A MODIFIED VERSION OF CRIMINAL RECORDS
/// </summary>

namespace Content.Client.PsionicsRecords.Systems;

public sealed class PsionicsRecordsConsoleSystem : SharedPsionicsRecordsConsoleSystem
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
using Content.Shared.Access.Systems;
using Content.Shared.PsionicsRecords;
using Content.Shared.PsionicsRecords.Components;
using Content.Shared.Psionics;
using Content.Shared.StationRecords;
using Robust.Client.Player;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;

/// <summary>
/// EVERYTHING HERE IS A MODIFIED VERSION OF CRIMINAL RECORDS
/// </summary>

namespace Content.Client.PsionicsRecords;

public sealed class PsionicsRecordsConsoleBoundUserInterface : BoundUserInterface
{
[Dependency] private readonly IPrototypeManager _proto = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
private readonly AccessReaderSystem _accessReader;

private PsionicsRecordsConsoleWindow? _window;

public PsionicsRecordsConsoleBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
{
_accessReader = EntMan.System<AccessReaderSystem>();
}

protected override void Open()
{
base.Open();

var comp = EntMan.GetComponent<PsionicsRecordsConsoleComponent>(Owner);

_window = new(Owner, comp.MaxStringLength, _playerManager, _proto, _random, _accessReader);
_window.OnKeySelected += key =>
SendMessage(new SelectStationRecord(key));
_window.OnFiltersChanged += (type, filterValue) =>
SendMessage(new SetStationRecordFilter(type, filterValue));
_window.OnStatusSelected += status =>
SendMessage(new PsionicsRecordChangeStatus(status, null));
_window.OnDialogConfirmed += (status, reason) =>
SendMessage(new PsionicsRecordChangeStatus(status, reason));
_window.OnClose += Close;
}

protected override void UpdateState(BoundUserInterfaceState state)
{
base.UpdateState(state);

if (state is not PsionicsRecordsConsoleState cast)
return;

_window?.UpdateState(cast);
}

protected override void Dispose(bool disposing)
{
base.Dispose(disposing);

_window?.Close();
}
}
35 changes: 35 additions & 0 deletions Content.Client/PsionicsRecords/PsionicsRecordsConsoleWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<controls:FancyWindow xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Title="{Loc 'psionics-records-console-window-title'}"
MinSize="660 400">
<BoxContainer Orientation="Vertical">
<!-- Record search bar
TODO: make this into a control shared with general records -->
<BoxContainer Margin="5 5 5 10" HorizontalExpand="true" VerticalAlignment="Center">
<OptionButton Name="FilterType" MinWidth="200" Margin="0 0 10 0"/> <!-- Populated in constructor -->
<LineEdit Name="FilterText" PlaceHolder="{Loc 'psionics-records-filter-placeholder'}" HorizontalExpand="True"/>
</BoxContainer>
<BoxContainer Orientation="Horizontal" VerticalExpand="True">
<!-- Record listing -->
<BoxContainer Orientation="Vertical" Margin="5" MinWidth="250" MaxWidth="250">
<Label Name="RecordListingTitle" Text="{Loc 'psionics-records-console-records-list-title'}" HorizontalExpand="True" Align="Center"/>
<Label Name="NoRecords" Text="{Loc 'psionics-records-console-no-records'}" HorizontalExpand="True" Align="Center" FontColorOverride="DarkGray"/>
<ScrollContainer VerticalExpand="True">
<ItemList Name="RecordListing"/> <!-- Populated when loading state -->
</ScrollContainer>
</BoxContainer>
<Label Name="RecordUnselected" Text="{Loc 'psionics-records-console-select-record-info'}" HorizontalExpand="True" Align="Center" FontColorOverride="DarkGray"/>
<!-- Selected record info -->
<BoxContainer Name="PersonContainer" Orientation="Vertical" Margin="5" Visible="False">
<Label Name="PersonName" StyleClasses="LabelBig"/>
<PanelContainer StyleClasses="LowDivider" Margin="0 5 0 5" />
<BoxContainer Orientation="Horizontal" Margin="5 5 5 5">
<Label Name="StatusLabel" Text="{Loc 'psionics-records-console-status'}" FontColorOverride="DarkGray"/>
<OptionButton Name="StatusOptionButton"/> <!-- Populated in constructor -->
</BoxContainer>
<RichTextLabel Name="PsionicsList" Visible="False"/>
</BoxContainer>
</BoxContainer>
</BoxContainer>
</controls:FancyWindow>

Loading

0 comments on commit fc7ecc4

Please sign in to comment.