port: IAA Endround Report (#5997)
* it breathes * probably okay * Create station-report.ftl thing miwssing * IAA store update * guidebook * update on things * revert robusttoolbox * make it fit into folders and clipboards * update on the styling of paper
This commit is contained in:
parent
206bde288e
commit
376ed6a5b4
|
|
@ -5,6 +5,7 @@ using Content.Client.UserInterface.RichText; // DeltaV - Limit what tags can be
|
|||
using Content.Shared.GameTicking;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.CustomControls;
|
||||
using Content.Shared._Goobstation.StationReport; // Goob
|
||||
using Robust.Client.UserInterface.RichText; // DeltaV - Limit what tags can be used in custom objective summaries
|
||||
using Robust.Shared.Utility;
|
||||
using static Robust.Client.UserInterface.Controls.BoxContainer;
|
||||
|
|
@ -35,6 +36,7 @@ namespace Content.Client.RoundEnd
|
|||
var roundEndTabs = new TabContainer();
|
||||
roundEndTabs.AddChild(MakeRoundEndSummaryTab(gm, roundEnd, roundTimeSpan, roundId));
|
||||
roundEndTabs.AddChild(MakePlayerManifestTab(info));
|
||||
roundEndTabs.AddChild(MakeStationReportTab()); //goob
|
||||
|
||||
ContentsContainer.AddChild(roundEndTabs);
|
||||
|
||||
|
|
@ -181,6 +183,38 @@ namespace Content.Client.RoundEnd
|
|||
|
||||
return playerManifestTab;
|
||||
}
|
||||
private BoxContainer MakeStationReportTab() //Goob edit start
|
||||
{
|
||||
//gets the stationreport varibible and sets the station report tab text to it if the map doesn't have a tablet will say No station report submitted
|
||||
var stationReportSystem = _entityManager.System<StationReportSystem>();
|
||||
string stationReportText = stationReportSystem.StationReportText ?? Loc.GetString("no-station-report-summited");
|
||||
var stationReportTab = new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Vertical,
|
||||
Name = Loc.GetString("round-end-summary-window-station-report-tab-title")
|
||||
};
|
||||
var StationReportContainerScrollbox = new ScrollContainer
|
||||
{
|
||||
VerticalExpand = true,
|
||||
Margin = new Thickness(10),
|
||||
HScrollEnabled = false,
|
||||
};
|
||||
var StationReportContainer = new BoxContainer
|
||||
{
|
||||
Orientation = LayoutOrientation.Vertical
|
||||
};
|
||||
var StationReportLabel = new RichTextLabel();
|
||||
var StationReportmessage = new FormattedMessage();
|
||||
StationReportmessage.AddMarkupOrThrow(stationReportText);
|
||||
StationReportLabel.SetMessage(StationReportmessage);
|
||||
StationReportContainer.AddChild(StationReportLabel);
|
||||
|
||||
|
||||
StationReportContainerScrollbox.AddChild(StationReportContainer);
|
||||
stationReportTab.AddChild(StationReportContainerScrollbox);
|
||||
return stationReportTab;
|
||||
}
|
||||
//Goob edit end
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,53 @@
|
|||
using Content.Server.GameTicking;
|
||||
using Content.Shared._Goobstation.StationReport;
|
||||
using Content.Shared.Paper;
|
||||
using Robust.Shared.GameObjects;
|
||||
using System.Text;
|
||||
|
||||
namespace Content.Server._Goobstation.StationReportSystem;
|
||||
|
||||
public sealed class StationReportSystem : EntitySystem
|
||||
{
|
||||
|
||||
//this is shitcode?
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
//subscribes to the endroundevent
|
||||
SubscribeLocalEvent<RoundEndTextAppendEvent>(OnRoundEndTextAppend);
|
||||
}
|
||||
|
||||
private void OnRoundEndTextAppend(RoundEndTextAppendEvent args)
|
||||
{
|
||||
//locates the first entity with StationReportComponent and combines them
|
||||
var stationReports = new StringBuilder();
|
||||
var reportNumber = 1;
|
||||
|
||||
var query = EntityQueryEnumerator<StationReportComponent>();
|
||||
while (query.MoveNext(out var uid, out _)) // finds every entity with StationReportComponent
|
||||
{
|
||||
if (!TryComp<PaperComponent>(uid, out var paper))
|
||||
continue;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(paper.Content))
|
||||
continue;
|
||||
|
||||
stationReports.AppendLine($"[bold]Station Report #{reportNumber}[/bold]");
|
||||
stationReports.AppendLine(paper.Content);
|
||||
stationReports.AppendLine();
|
||||
|
||||
reportNumber++;
|
||||
}
|
||||
var stationReportText = stationReports.Length > 0
|
||||
? stationReports.ToString()
|
||||
: null;
|
||||
BroadcastStationReport(stationReportText);
|
||||
}
|
||||
|
||||
//sends a networkevent to tell the client to update the stationreporttext when recived
|
||||
public void BroadcastStationReport(string? stationReportText)
|
||||
{
|
||||
RaiseNetworkEvent(new StationReportEvent(stationReportText));//to send to client
|
||||
RaiseLocalEvent(new StationReportEvent(stationReportText));//to send to discord intergration
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
namespace Content.Shared._Goobstation.StationReport;
|
||||
/// <summary>
|
||||
/// This component is only used to locate the station report paper
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class StationReportComponent : Component;
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
using Content.Shared._Goobstation.StationReport;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Shared._Goobstation.StationReport;
|
||||
|
||||
public sealed class StationReportSystem : EntitySystem
|
||||
{
|
||||
//stores the last received station report
|
||||
public string? StationReportText { get; private set; } = null;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeNetworkEvent<StationReportEvent>(OnStationReportReceived);
|
||||
}
|
||||
|
||||
private void OnStationReportReceived(StationReportEvent ev)
|
||||
{
|
||||
//Save the received message in the variable
|
||||
StationReportText = ev.StationReportText;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared._Goobstation.StationReport;
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class StationReportEvent : EntityEventArgs
|
||||
{
|
||||
//This is where the stationreport is stored so the client can access it
|
||||
public string? StationReportText { get; }
|
||||
public StationReportEvent(string? text)
|
||||
{
|
||||
StationReportText = text;
|
||||
}
|
||||
}
|
||||
|
|
@ -30,3 +30,5 @@ nanolink-ntstamp-name = IA rubber stamp
|
|||
nanolink-ntstamp-desc = A rubber stamp with Internal Affairs print. Scare the station by showing that CC is always watching.
|
||||
nanolink-epistol-name = PDW-9 Energy Pistol
|
||||
nanolink-epistol-desc = Lethally or non-lethally take down your foes with this military grade energy pistol.
|
||||
nanolink-stationreportpaper-name = Station Report Paper
|
||||
nanolink-stationreportpaper-desc = A golden paper to write your investigations in. Contents of it appear in post-shift station reports.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
station-report-text =
|
||||
═══════════════════════════════════════
|
||||
[bold][color=DarkOliveGreen]GLORY TO NANOTRASEN[/color][/bold]
|
||||
|
||||
[mono]Agent Name:
|
||||
[/mono]
|
||||
[color=Gray]Report on your investigative activities below. Due to the nature of bluespace communications, do not sign or stamp this document as such markings will be lost.[/color]
|
||||
═══════════════════════════════════════
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
═══════════════════════════════════════
|
||||
[bold][color=DarkOliveGreen]GLORY TO NANOTRASEN[/color][/bold]
|
||||
|
|
@ -6,3 +6,5 @@ round-end-summary-window-gamemode-name-label = The game mode was [color=white]{$
|
|||
round-end-summary-window-duration-label = It lasted for [color=yellow]{$hours} hours, {$minutes} minutes, and {$seconds} seconds.
|
||||
round-end-summary-window-player-info-if-observer-text = [color=gray]{$playerOOCName}[/color] was [color=lightblue]{$playerICName}[/color], an observer.
|
||||
round-end-summary-window-player-info-if-not-observer-text = [color=gray]{$playerOOCName}[/color] was [color={$icNameColor}]{$playerICName}[/color] playing role of [color=orange]{$playerRole}[/color].
|
||||
round-end-summary-window-station-report-tab-title = Station Report
|
||||
no-station-report-summited = No station report submitted, either there were no Internal Affair Agents or none of them were bothered to write one. Probably for the best.
|
||||
|
|
|
|||
|
|
@ -74,6 +74,20 @@
|
|||
- NanolinkDeception
|
||||
|
||||
#Surveillance
|
||||
|
||||
- type: listing
|
||||
id: NanolinkStationReportsPaper
|
||||
name: nanolink-stationreportpaper-name
|
||||
description: nanolink-stationreportpaper-desc
|
||||
productEntity: NanoRepStationReport
|
||||
icon:
|
||||
entity: NanoRepStationReport
|
||||
categories:
|
||||
- NanolinkSurveillance
|
||||
conditions:
|
||||
- !type:ListingLimitedStockCondition
|
||||
stock: 1
|
||||
|
||||
- type: listing
|
||||
id: SpyCrewMonitor
|
||||
name: nanolink-spy-monitor-name
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
- type: entity
|
||||
parent: BaseItem
|
||||
name: station report paper
|
||||
id: NanoRepStationReport
|
||||
description: The document is made out of gold, but somehow you are still able to write on it.
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: _Goobstation/Objects/Misc/bureaucracy.rsi
|
||||
layers:
|
||||
- state: station-report-paper
|
||||
- type: StationReport
|
||||
- type: Paper
|
||||
content: station-report-text
|
||||
- type: PaperLabelType
|
||||
- type: ActivatableUI
|
||||
key: enum.PaperUiKey.Key
|
||||
requiresComplex: false
|
||||
- type: UserInterface
|
||||
interfaces:
|
||||
enum.PaperUiKey.Key:
|
||||
type: PaperBoundUserInterface
|
||||
- type: Tag
|
||||
tags:
|
||||
- Document
|
||||
|
|
@ -45,8 +45,12 @@
|
|||
##Auditing a Department
|
||||
[italic]NanoTrasen needs you to check how their valued departments operate.[/italic]
|
||||
|
||||
|
||||
Auditing a department is a very open-ended objective. How it's done, and how much is done, is entirely up to you, [bold]but Central Command needs that report from you.[/bold]
|
||||
|
||||
You should probably write your report on a [bolditalic]station report paper[/bolditalic], available through your NanoLink! [italic]Anything written on it will appear in the “Station Report” tab on the round-end screen.[/italic]
|
||||
<GuideEntityEmbed Entity="NanoRepStationReport" Caption="Station Report Paper"/>
|
||||
|
||||
- Inspect your chosen department! You might find certain infractions or SOP breaches.
|
||||
- Test the department's reaction time. Breaking into bridge and seeing how fast Security can escort you out will work. Cutting power to Logistics just to see how long it takes Engineering to figure out the problem also helps.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"version": 1,
|
||||
"license": "CC-BY-SA-3.0",
|
||||
"copyright": " Pen_Future Made by BombasterDS - https://github.com/MetalSage/space-stories-archive/commit/26812e79c19c5f998bcbc445afbdceea625bc887, Pen_Devil by SolsticeOfTheWinter",
|
||||
"copyright": " Pen_Future Made by BombasterDS - https://github.com/MetalSage/space-stories-archive/commit/26812e79c19c5f998bcbc445afbdceea625bc887, Pen_Devil by SolsticeOfTheWinter, station-report-paper by johnjjohn (GitHub)",
|
||||
"size": {
|
||||
"x": 32,
|
||||
"y": 32
|
||||
|
|
@ -17,6 +17,9 @@
|
|||
"name": "pen_devil-inhand-left",
|
||||
"directions": 4
|
||||
},
|
||||
{
|
||||
"name": "station-report-paper"
|
||||
},
|
||||
{
|
||||
"name": "pen_devil-inhand-right",
|
||||
"directions": 4
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 301 B |
Loading…
Reference in New Issue