Random station names! (#5548)
This commit is contained in:
@@ -4,6 +4,7 @@ using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using Content.Server.Chat.Managers;
|
||||
using Content.Shared.CCVar;
|
||||
using Robust.Server.Maps;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Configuration;
|
||||
using Robust.Shared.IoC;
|
||||
@@ -20,6 +21,7 @@ public class GameMapManager : IGameMapManager
|
||||
[Dependency] private readonly IPlayerManager _playerManager = default!;
|
||||
[Dependency] private readonly IRobustRandom _random = default!;
|
||||
[Dependency] private readonly IChatManager _chatManager = default!;
|
||||
[Dependency] private readonly IMapLoader _mapLoader = default!;
|
||||
|
||||
private GameMapPrototype _currentMap = default!;
|
||||
private bool _currentMapForced;
|
||||
@@ -116,4 +118,12 @@ public class GameMapManager : IGameMapManager
|
||||
{
|
||||
return _prototypeManager.TryIndex(gameMap, out map);
|
||||
}
|
||||
}
|
||||
|
||||
public string GenerateMapName(GameMapPrototype gameMap)
|
||||
{
|
||||
if (gameMap.NameGenerator is not null && gameMap.MapNameTemplate is not null)
|
||||
return gameMap.NameGenerator.FormatName(gameMap.MapNameTemplate);
|
||||
else
|
||||
return gameMap.MapName;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user