-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NFSD Criminal Records Fix + Shipyard Fax Records System #1578
Changes from 16 commits
dcc6418
32c844f
7d0b1fe
79aa222
6935ef9
8a35e77
26b2d48
28d683b
4575b92
ea5f81b
0e405ee
f90ef86
5ddb0e4
c7eab94
723c064
e465e45
cb0cce2
0fa617a
9260aab
f72e196
a5b1456
7c3f280
354d0b1
3183dd0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,13 +1,15 @@ | ||||||||||||||||||||||||||||||||||||||||||||||
using System.Diagnostics.CodeAnalysis; | ||||||||||||||||||||||||||||||||||||||||||||||
using Content.Server.Forensics; | ||||||||||||||||||||||||||||||||||||||||||||||
using Content.Server.GameTicking; | ||||||||||||||||||||||||||||||||||||||||||||||
using Content.Server.Station.Components; | ||||||||||||||||||||||||||||||||||||||||||||||
using Content.Shared.Inventory; | ||||||||||||||||||||||||||||||||||||||||||||||
using Content.Shared.PDA; | ||||||||||||||||||||||||||||||||||||||||||||||
using Content.Shared.Preferences; | ||||||||||||||||||||||||||||||||||||||||||||||
using Content.Shared.Roles; | ||||||||||||||||||||||||||||||||||||||||||||||
using Content.Shared.StationRecords; | ||||||||||||||||||||||||||||||||||||||||||||||
using Robust.Shared.Enums; | ||||||||||||||||||||||||||||||||||||||||||||||
using Robust.Shared.Prototypes; | ||||||||||||||||||||||||||||||||||||||||||||||
using Robust.Shared.Random; //Frontier modification | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
namespace Content.Server.StationRecords.Systems; | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -35,6 +37,7 @@ public sealed class StationRecordsSystem : SharedStationRecordsSystem | |||||||||||||||||||||||||||||||||||||||||||||
[Dependency] private readonly InventorySystem _inventory = default!; | ||||||||||||||||||||||||||||||||||||||||||||||
[Dependency] private readonly StationRecordKeyStorageSystem _keyStorage = default!; | ||||||||||||||||||||||||||||||||||||||||||||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!; | ||||||||||||||||||||||||||||||||||||||||||||||
[Dependency] private readonly IRobustRandom _robustRandom = default!; | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
public override void Initialize() | ||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -49,6 +52,28 @@ private void OnPlayerSpawn(PlayerSpawnCompleteEvent args) | |||||||||||||||||||||||||||||||||||||||||||||
return; | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
CreateGeneralRecord(args.Station, args.Mob, args.Profile, args.JobId, stationRecords); | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
/*var query = EntityQueryEnumerator<SectorStationRecordComponent>(); | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
while (query.MoveNext(out var stationGridUid, out var comp)) | ||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||
if (TryComp<StationMemberComponent>(stationGridUid, out var stationMemberComponent)) | ||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||
var stationEntityUid = stationMemberComponent.Station; | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
CreateGeneralRecord(stationEntityUid, args.Mob, args.Profile, args.JobId, stationRecords); | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
/* | ||||||||||||||||||||||||||||||||||||||||||||||
if (TryComp<StationRecordKeyStorageComponent>(targetId, out var keyStorage) | ||||||||||||||||||||||||||||||||||||||||||||||
&& stationEntityUid != null | ||||||||||||||||||||||||||||||||||||||||||||||
&& keyStorage.Key != null) | ||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||
if (!TryGetRecord<GeneralStationRecord>(Key.Value, out var record)) | ||||||||||||||||||||||||||||||||||||||||||||||
continue; | ||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
}*/ | ||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+60
to
+81
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this here for a reason?
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With it I believe initially reason for leaving it was to make it easier to in future to upstream merges. Though there is chance that the idea behind the commented out block has changed |
||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
private void CreateGeneralRecord(EntityUid station, EntityUid player, HumanoidCharacterProfile profile, | ||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -66,6 +91,58 @@ private void CreateGeneralRecord(EntityUid station, EntityUid player, HumanoidCh | |||||||||||||||||||||||||||||||||||||||||||||
TryComp<DnaComponent>(player, out var dnaComponent); | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
CreateGeneralRecord(station, idUid.Value, profile.Name, profile.Age, profile.Species, profile.Gender, jobId, fingerprintComponent?.Fingerprint, dnaComponent?.DNA, profile, records); | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
var query = EntityQueryEnumerator<SectorStationRecordComponent>(); | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
while (query.MoveNext(out var stationEntityUid, out var comp)) | ||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||
if (!TryComp<IgnoreSectorStationRecordComponent>(player, out var playerComp)) | ||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+128
to
+129
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If statement avoids the entire while body. Push to the outside. |
||||||||||||||||||||||||||||||||||||||||||||||
var stationList = EntityQueryEnumerator<StationRecordsComponent>(); | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
while (stationList.MoveNext(out var stationUid, out var stationRecComp)) | ||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||
if (TryComp<StationRecordKeyStorageComponent>(idUid.Value, out var keyStorage) | ||||||||||||||||||||||||||||||||||||||||||||||
&& stationEntityUid != null | ||||||||||||||||||||||||||||||||||||||||||||||
&& keyStorage.Key != null) | ||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||
if (!TryGetRecord<GeneralStationRecord>(keyStorage.Key.Value, out var record)) | ||||||||||||||||||||||||||||||||||||||||||||||
continue; | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
AddRecordEntry((EntityUid) stationEntityUid, record); | ||||||||||||||||||||||||||||||||||||||||||||||
break; | ||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+132
to
+144
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the purpose of this loop? Neither stationUid and stationRecComp are used. Why would the global/sector record set need two separate station records, one for each station? Might be missing something, but I don't quite get it. If you want all of the criminal records computers to work on a global database, I think this needs a few changes in order to work, and at that point the access to the computer should probably be locked behind access groups. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have utilised code from the Shipyard that created new record. Basically wanted to allow another station [NFSD Outpost in current state] to posses these records WITHOUT messing up other aspects like latejoining. As the current station crew records are very one station heavy at moment codewise |
||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
TryComp<StationRecordsComponent>(stationEntityUid, out var stationRec); | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
//Checks if certain information should be faked, is yes then will randomise it | ||||||||||||||||||||||||||||||||||||||||||||||
string playerJob = jobId; | ||||||||||||||||||||||||||||||||||||||||||||||
if(TryComp<FakeSectorStationRecordComponent>(player, out var playerComponent)) | ||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||
// Randomises job | ||||||||||||||||||||||||||||||||||||||||||||||
var random = _robustRandom.Next(1, 3); | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
switch(random) | ||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||
case 1: | ||||||||||||||||||||||||||||||||||||||||||||||
playerJob = "Contractor"; | ||||||||||||||||||||||||||||||||||||||||||||||
break; | ||||||||||||||||||||||||||||||||||||||||||||||
case 2: | ||||||||||||||||||||||||||||||||||||||||||||||
playerJob = "Pilot"; | ||||||||||||||||||||||||||||||||||||||||||||||
break; | ||||||||||||||||||||||||||||||||||||||||||||||
case 3: | ||||||||||||||||||||||||||||||||||||||||||||||
playerJob = "Mercenary"; | ||||||||||||||||||||||||||||||||||||||||||||||
break; | ||||||||||||||||||||||||||||||||||||||||||||||
default: | ||||||||||||||||||||||||||||||||||||||||||||||
//Do nothing, when real job is visible that means something bad happened | ||||||||||||||||||||||||||||||||||||||||||||||
break; | ||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+152
to
+169
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
CreateGeneralRecord(stationEntityUid, idUid.Value, profile.Name, profile.Age, profile.Species, profile.Gender, playerJob, fingerprintComponent?.Fingerprint, dnaComponent?.DNA, profile, stationRec!); | ||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using Content.Server.StationRecords.Systems; | ||
|
||
namespace Content.Server.StationRecords; | ||
|
||
[Access(typeof(StationRecordsSystem))] | ||
[RegisterComponent] | ||
public sealed partial class FakeSectorStationRecordComponent : Component | ||
{ | ||
// Makes it so that a person with this will create additional records BUT the job is gonna be random between 3 most common types | ||
// Mainly used for antags like pirates where they won't be outed immiedietly, but can still try to effectively hide within | ||
// Most commonly used on Pirates | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using Content.Server.StationRecords.Systems; | ||
|
||
namespace Content.Server.StationRecords; | ||
|
||
[Access(typeof(StationRecordsSystem))] | ||
[RegisterComponent] | ||
public sealed partial class IgnoreSectorStationRecordComponent : Component | ||
{ | ||
// Makes it so that a person with this won't create additional records in other places | ||
// Mainly used for antags syndicates so that they aren't suddenly in NFSD records and outed the minute they exist | ||
// Most commonly used on Syndicate | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using Content.Server.StationRecords.Systems; | ||
|
||
namespace Content.Server.StationRecords; | ||
|
||
[Access(typeof(StationRecordsSystem))] | ||
[RegisterComponent] | ||
public sealed partial class SectorStationRecordComponent : Component | ||
{ | ||
// Determines if station should receive additional copy of records | ||
// Mainly used for places which require accurate records of every single player | ||
// Most commonly at NFSD outpost, possibly at coming Prison POI or even in Hospital POI if needed | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using Content.Shared.Fax.Components; | ||
|
||
namespace Content.Server.Fax | ||
{ | ||
/// <summary> | ||
/// Paper with a written description of vessel owner. | ||
/// Can be used in mapping or admins spawn. | ||
/// </summary> | ||
[RegisterComponent] | ||
public sealed partial class ShipyardRecordPaperComponent : Component | ||
{ | ||
|
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,196 @@ | ||
using System.Diagnostics.CodeAnalysis; | ||
using Content.Server.Chat.Systems; | ||
using Content.Server.Fax; | ||
using Content.Server.Paper; | ||
using Content.Server.Station.Components; | ||
using Content.Server.Station.Systems; | ||
using Content.Shared.Paper; | ||
using Robust.Shared.Random; | ||
using Robust.Shared.Utility; | ||
using Robust.Shared.Timing; | ||
using Robust.Shared.Enums; | ||
using Content.Shared.Fax.Components; | ||
using Microsoft.CodeAnalysis.CSharp.Syntax; | ||
using Content.Shared.Preferences; | ||
using Content.Shared.Shipyard.Prototypes; | ||
using Robust.Shared.Prototypes; | ||
using System.Net.NetworkInformation; | ||
|
||
namespace Content.Server.Fax; | ||
|
||
public sealed class ShipyardRecordPaperSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly PaperSystem _paper = default!; | ||
[Dependency] private readonly FaxSystem _faxSystem = default!; | ||
|
||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!; | ||
[Dependency] private readonly IGameTiming _gameTiming = default!; | ||
|
||
[Dependency] private readonly IRobustRandom _robustRandom = default!; | ||
|
||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
//SubscribeLocalEvent<ShipyardRecordPaperComponent, MapInitEvent>(OnMapInit); | ||
SubscribeLocalEvent<ShipyardRecordPaperComponent, ShipyardRecordPaperTransmitEvent>(SendShuttleRecords); | ||
} | ||
|
||
/*private void OnMapInit(EntityUid uid, ShipyardRecordPaperComponent component, MapInitEvent args) | ||
{ | ||
SetupPaper(uid, component); | ||
}*/ | ||
|
||
private void SetupPaper(EntityUid uid, ShipyardRecordPaperComponent? component = null, EntityUid? station = null) | ||
{ | ||
if (!Resolve(uid, ref component)) | ||
return; | ||
|
||
|
||
_paper.SetContent(uid, "paperContent"); | ||
|
||
} | ||
|
||
/// <summary> | ||
/// Send a fax to each fax machine with details regarding purchase and ownership of a vessel | ||
/// </summary> | ||
private void SendShuttleRecords(EntityUid faxEnt, ShipyardRecordPaperComponent recordPaper, ShipyardRecordPaperTransmitEvent args) | ||
{ | ||
var currentTime = _gameTiming.RealTime.ToString(@"hh\:mm\:ss"); | ||
|
||
//Sets record paper type based on vessel's class | ||
var shipyardRecordPaperPrototype = "PaperShipyardRecordBase"; | ||
switch(args.VesselClass) | ||
{ | ||
case "Undetermined": | ||
shipyardRecordPaperPrototype = "PaperShipyardRecordBase"; | ||
break; | ||
case "Civilian": | ||
shipyardRecordPaperPrototype = "PaperShipyardRecordCivilian"; | ||
break; | ||
case "Expedition": | ||
shipyardRecordPaperPrototype = "PaperShipyardRecordExpedition"; | ||
break; | ||
case "Medical": | ||
shipyardRecordPaperPrototype = "PaperShipyardRecordMedical"; | ||
break; | ||
case "Blackmarket": | ||
shipyardRecordPaperPrototype = "PaperShipyardRecordBlackmarket"; | ||
break; | ||
case "NFSD": | ||
shipyardRecordPaperPrototype = "PaperShipyardRecordNFSD"; | ||
break; | ||
case "Scrap": | ||
shipyardRecordPaperPrototype = "PaperShipyardRecordScrap"; | ||
break; | ||
case "Science": | ||
shipyardRecordPaperPrototype = "PaperShipyardRecordScience"; | ||
break; | ||
case "Service": | ||
shipyardRecordPaperPrototype = "PaperShipyardRecordService"; | ||
break; | ||
case "Engineering": | ||
shipyardRecordPaperPrototype = "PaperShipyardRecordEngineering"; | ||
break; | ||
case "Syndicate": | ||
shipyardRecordPaperPrototype = "PaperShipyardRecordSyndicate"; | ||
break; | ||
case "Cargo": | ||
shipyardRecordPaperPrototype = "PaperShipyardRecordCargo"; | ||
break; | ||
case "Salvage": | ||
shipyardRecordPaperPrototype = "PaperShipyardRecordSalvage"; | ||
break; | ||
default: | ||
shipyardRecordPaperPrototype = "PaperShipyardRecordBase"; | ||
break; | ||
} | ||
|
||
//check if vessel's class is Blackmarket or Syndicate, If yes then scramble | ||
if(args.VesselClass == "Blackmarket" || args.VesselClass == "Syndicate") | ||
{ | ||
//generate random person | ||
HumanoidCharacterProfile fakeOwner = HumanoidCharacterProfile.Random(); | ||
|
||
|
||
//Gets information from all vessels into lists | ||
List<string> vesselNameList = new List<string>(); | ||
List<string> vesselCategoryList = new List<string>(); | ||
List<string> vesselDescriptionList = new List<string>(); | ||
List<string> vesselPriceList = new List<string>(); | ||
foreach (var vessel in _prototypeManager.EnumeratePrototypes<VesselPrototype>()) | ||
{ | ||
//Saves information into lists | ||
vesselNameList.Add(vessel.Name); | ||
vesselCategoryList.Add(vessel.Category); | ||
vesselDescriptionList.Add(vessel.Description); | ||
vesselPriceList.Add(vessel.Price.ToString()); | ||
} | ||
//Converts lists into arrays | ||
string[] vesselName = vesselNameList.ToArray(); | ||
string[] vesselCategory = vesselCategoryList.ToArray(); | ||
string[] vesselDescription = vesselDescriptionList.ToArray(); | ||
string[] vesselPrice = vesselPriceList.ToArray(); | ||
|
||
//Chooses random vessel which information will be utilised | ||
var ran_int = _robustRandom.Next(0, vesselName.Length); | ||
|
||
//Combines real and fake information to then scramble it | ||
string scramVesselOwnerName = args.VesselOwnerName + fakeOwner.Name; | ||
string scramVesselOwnerSpecies = args.VesselOwnerSpecies + fakeOwner.Species; | ||
|
||
string scramVesselName = args.VesselName + vesselName[ran_int]; | ||
string scramVesselCategory = args.VesselCategory + vesselCategory[ran_int]; | ||
string scramVesselDescription = args.VesselDescription + vesselDescription[ran_int]; | ||
|
||
//Given with just two prices it was too easy for players to metagame, additional 2 numbers will be added to make it bit harder | ||
int randPriceValue = _robustRandom.Next(10, 99); | ||
string scramVesselPrice = args.VesselPrice + randPriceValue + vesselPrice[ran_int]; | ||
|
||
//save elements that can be properly scrambled | ||
string[] elements = {scramVesselName, scramVesselOwnerName, scramVesselOwnerSpecies, args.VesselOwnerFingerprints, args.VesselOwnerDNA, scramVesselCategory, scramVesselDescription, scramVesselPrice}; | ||
|
||
//Scrambles each element | ||
for(int ii = 0; ii < elements.Length; ii++) | ||
{ | ||
string input = elements[ii]; | ||
char[] chars = input.ToCharArray(); | ||
for (int i = 0; i < chars.Length; i++) | ||
{ | ||
int randomIndex = _robustRandom.Next(0, chars.Length); | ||
char temp = chars[randomIndex]; | ||
chars[randomIndex] = chars[i]; | ||
chars[i] = temp; | ||
} | ||
string scrambled = new string(chars); | ||
elements[ii] = scrambled; | ||
} | ||
|
||
|
||
TryComp<FaxMachineComponent>(faxEnt, out var fax); | ||
var printout = new FaxPrintout( | ||
Loc.GetString("shipyard-record-paper-content", ("vessel_name", elements[0]), ("vessel_owner_name", elements[1]), ("vessel_owner_species", elements[2]), ("vessel_owner_gender", fakeOwner.Gender), ("vessel_owner_age", fakeOwner.Age), ("vessel_owner_fingerprints", elements[3]), ("vessel_owner_dna", elements[4]), ("time", currentTime), ("vessel_category", elements[5]), ("vessel_class", args.VesselClass), ("vessel_group", args.VesselGroup), ("vessel_price", elements[7]), ("vessel_description", elements[6])), | ||
Loc.GetString("shipyard-record-paper-name", ("vessel_name", elements[0]), ("time", currentTime)), | ||
null, | ||
shipyardRecordPaperPrototype, | ||
null); | ||
_faxSystem.Receive(faxEnt, printout, null, fax); | ||
|
||
|
||
} else { | ||
|
||
TryComp<FaxMachineComponent>(faxEnt, out var fax); | ||
var printout = new FaxPrintout( | ||
Loc.GetString("shipyard-record-paper-content", ("vessel_name", args.VesselName), ("vessel_owner_name", args.VesselOwnerName), ("vessel_owner_species", args.VesselOwnerSpecies), ("vessel_owner_gender", args.VesselOwnerGender), ("vessel_owner_age", args.VesselOwnerAge), ("vessel_owner_fingerprints", args.VesselOwnerFingerprints), ("vessel_owner_dna", args.VesselOwnerDNA), ("time", currentTime), ("vessel_category", args.VesselCategory), ("vessel_class", args.VesselClass), ("vessel_group", args.VesselGroup), ("vessel_price", args.VesselPrice), ("vessel_description", args.VesselDescription) ), | ||
Loc.GetString("shipyard-record-paper-name", ("vessel_name", args.VesselName), ("time", currentTime)), | ||
null, | ||
shipyardRecordPaperPrototype, | ||
null); | ||
_faxSystem.Receive(faxEnt, printout, null, fax); | ||
} | ||
} | ||
|
||
} | ||
|
||
[ByRefEvent] | ||
public readonly record struct ShipyardRecordPaperTransmitEvent(string VesselName, string VesselOwnerName, string VesselOwnerSpecies, Gender VesselOwnerGender, int VesselOwnerAge, string VesselOwnerFingerprints, string VesselOwnerDNA, string VesselCategory, string VesselClass, string VesselGroup, int VesselPrice, string VesselDescription); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does a broadcast event work here instead?