Saltern Update 2.91 (#7665)

* Saltern Update 2.91

* Fix LoadSaveTicksSaveSaltern test

* God help me

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Emisse
2022-04-20 06:09:50 -06:00
committed by GitHub
parent 5b79348b6e
commit 80138a5a13
2 changed files with 543 additions and 411 deletions

View File

@@ -2,8 +2,10 @@ using System.IO;
using System.Linq;
using System.Threading.Tasks;
using NUnit.Framework;
using Robust.Server;
using Robust.Server.Maps;
using Robust.Shared.ContentPack;
using Robust.Shared.Log;
using Robust.Shared.Map;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
@@ -78,21 +80,25 @@ namespace Content.IntegrationTests.Tests
[Test]
public async Task LoadSaveTicksSaveSaltern()
{
var server = StartServerDummyTicker();
var server = StartServerDummyTicker(new ServerIntegrationOptions()
{
// Don't blame me look at SaveLoadMultiGridMap
FailureLogLevel = LogLevel.Error,
});
await server.WaitIdleAsync();
var mapLoader = server.ResolveDependency<IMapLoader>();
var mapManager = server.ResolveDependency<IMapManager>();
GridId? grid = default;
MapId mapId = default;
// Load saltern.yml as uninitialized map, and save it to ensure it's up to date.
server.Post(() =>
{
var mapId = mapManager.CreateMap();
mapId = mapManager.CreateMap();
mapManager.AddUninitializedMap(mapId);
mapManager.SetMapPaused(mapId, true);
grid = mapLoader.LoadBlueprint(mapId, "Maps/saltern.yml").gridId;
mapLoader.SaveBlueprint(grid!.Value, "load save ticks save 1.yml");
mapLoader.LoadMap(mapId, "Maps/saltern.yml");
mapLoader.SaveMap(mapId, "load save ticks save 1.yml");
});
// Run 5 ticks.
@@ -100,7 +106,7 @@ namespace Content.IntegrationTests.Tests
server.Post(() =>
{
mapLoader.SaveBlueprint(grid!.Value, "/load save ticks save 2.yml");
mapLoader.SaveMap(mapId, "/load save ticks save 2.yml");
});
await server.WaitIdleAsync();