feat(maps): add Acheron, Debenter, Uruk, Ferea (maps 83-86)
Same pattern as Arkania: terrain resources Terrain84-87.att, map initializer classes, registration, and update-plugin (v97) that creates each map + spawn gate + /move warp AND assigns it to the game server configuration so it is hosted. Also fix the Arkania update-plugin to assign the game server config (was missing). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -41,20 +41,31 @@ public class AddArkaniaMapUpdateSeason6 : UpdatePlugInBase
|
||||
public override DateTime CreatedAt => new(2026, 07, 19, 12, 0, 0, DateTimeKind.Utc);
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override ValueTask ApplyAsync(IContext context, GameConfiguration gameConfiguration)
|
||||
protected override async ValueTask ApplyAsync(IContext context, GameConfiguration gameConfiguration)
|
||||
{
|
||||
// Idempotency guard: skip if Arkania (83) already exists.
|
||||
// Idempotency guard: skip if Arkania (82) already exists.
|
||||
if (gameConfiguration.Maps.Any(m => m.Number == Arkania.Number))
|
||||
{
|
||||
return default;
|
||||
return;
|
||||
}
|
||||
|
||||
var initializer = new Arkania(context, gameConfiguration);
|
||||
initializer.Initialize(); // creates map 83 + loads terrain from Terrain84.att
|
||||
initializer.Initialize(); // creates map 82 + loads terrain from Terrain83.att
|
||||
initializer.SetSafezoneMap();
|
||||
|
||||
var arkania = gameConfiguration.Maps.First(m => m.Number == Arkania.Number);
|
||||
|
||||
// Host the map on every game server configuration (fresh seeds do this
|
||||
// automatically, but existing databases need it added explicitly).
|
||||
var serverConfigs = await context.GetAsync<GameServerConfiguration>().ConfigureAwait(false);
|
||||
foreach (var serverConfig in serverConfigs)
|
||||
{
|
||||
if (serverConfig.Maps.All(m => m.Number != Arkania.Number))
|
||||
{
|
||||
serverConfig.Maps.Add(arkania);
|
||||
}
|
||||
}
|
||||
|
||||
// Spawn gate on a walkable tile (center of the map; attr 0x00, verified walkable).
|
||||
var spawnGate = context.CreateNew<ExitGate>();
|
||||
arkania.ExitGates.Add(spawnGate);
|
||||
@@ -76,7 +87,5 @@ public class AddArkaniaMapUpdateSeason6 : UpdatePlugInBase
|
||||
warp.LevelRequirement = 10;
|
||||
warp.Gate = spawnGate;
|
||||
}
|
||||
|
||||
return default;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user