Refactor stations to properly use entity prototypes. (stationsv3) (#16570)
* Update StationSpawningSystem.cs Web-edit to allow feeding in an existing entity. * Update StationSpawningSystem.cs value type moment * Update StationSpawningSystem.cs * Oh goddamnit this is a refactor now. * awawawa * aaaaaaaaaaa * ee * forgot records. * no records? no records. * What's in a name? * Sloth forcing me to do the refactor properly smh. * e * optional evac in test. * tests pls work * awa --------- Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com>
This commit is contained in:
@@ -52,23 +52,22 @@ namespace Content.Server.GameTicking
|
||||
var playerCount = $"{_playerManager.PlayerCount}";
|
||||
var readyCount = _playerGameStatuses.Values.Count(x => x == PlayerGameStatus.ReadyToPlay);
|
||||
|
||||
StringBuilder stationNames = new StringBuilder();
|
||||
if (_stationSystem.Stations.Count != 0)
|
||||
{
|
||||
foreach (EntityUid entUID in _stationSystem.Stations)
|
||||
{
|
||||
StationDataComponent? stationData = null;
|
||||
MetaDataComponent? metaData = null;
|
||||
if (Resolve(entUID, ref stationData, ref metaData, logMissing: true))
|
||||
{
|
||||
if (stationNames.Length > 0)
|
||||
stationNames.Append('\n');
|
||||
var stationNames = new StringBuilder();
|
||||
var query =
|
||||
EntityQueryEnumerator<StationJobsComponent, StationSpawningComponent, MetaDataComponent>();
|
||||
|
||||
stationNames.Append(metaData.EntityName);
|
||||
}
|
||||
}
|
||||
var foundOne = false;
|
||||
|
||||
while (query.MoveNext(out _, out _, out var meta))
|
||||
{
|
||||
foundOne = true;
|
||||
if (stationNames.Length > 0)
|
||||
stationNames.Append('\n');
|
||||
|
||||
stationNames.Append(meta.EntityName);
|
||||
}
|
||||
else
|
||||
|
||||
if (!foundOne)
|
||||
{
|
||||
stationNames.Append(Loc.GetString("game-ticker-no-map-selected"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user