Multi-map and multi-station gameticker loading (#6167)

This commit is contained in:
mirrorcult
2022-01-15 15:43:14 -07:00
committed by GitHub
parent 89db6ea339
commit e3be84b5f8
10 changed files with 137 additions and 16 deletions

View File

@@ -0,0 +1,21 @@
using Content.Server.GameTicking;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Server.Station;
/// <summary>
/// Added to grids saved in maps to designate that they are the 'main station' grid.
/// </summary>
[RegisterComponent, ComponentProtoName("BecomesStation")]
[Friend(typeof(GameTicker))]
public class BecomesStationComponent : Component
{
/// <summary>
/// Mapping only. Should use StationIds in all other
/// scenarios.
/// </summary>
[DataField("id", required: true)]
public string Id = default!;
}

View File

@@ -0,0 +1,18 @@
using Content.Server.GameTicking;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Server.Station;
/// <summary>
/// Added to grids saved in maps to designate them as 'part of a station' and not main grids. I.e. ancillary
/// shuttles for multi-grid stations.
/// </summary>
[RegisterComponent, ComponentProtoName("PartOfStation")]
[Friend(typeof(GameTicker))]
public class PartOfStationComponent : Component
{
[DataField("id", required: true)] // does yamllinter even lint maps for required fields?
public string Id = default!;
}

View File

@@ -0,0 +1,13 @@
using Content.Shared.Station;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
namespace Content.Server.Station;
[RegisterComponent, Friend(typeof(StationSystem))]
public class StationComponent : Component
{
public override string Name => "Station";
public StationId Station = StationId.Invalid;
}