start of persistence support (#20770)

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-12-17 03:55:19 +00:00
committed by GitHub
parent 8c1eecffd4
commit cce7aa777c
7 changed files with 118 additions and 11 deletions

View File

@@ -40,4 +40,18 @@ public sealed partial class GameMapPrototype : IPrototype
/// The stations this map contains. The names should match with the BecomesStation components.
/// </summary>
public IReadOnlyDictionary<string, StationConfig> Stations => _stations;
/// <summary>
/// Performs a shallow clone of this map prototype, replacing <c>MapPath</c> with the argument.
/// </summary>
public GameMapPrototype Persistence(ResPath mapPath)
{
return new()
{
ID = ID,
MapName = MapName,
MapPath = mapPath,
_stations = _stations
};
}
}