Add some logging and make moose more easy to play on. (#7168)

This commit is contained in:
Moony
2022-03-17 17:21:35 -05:00
committed by GitHub
parent d90fcaab08
commit 366503fc97
2 changed files with 9 additions and 2 deletions

View File

@@ -22,10 +22,15 @@ public sealed class GameMapManager : IGameMapManager
[Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly IChatManager _chatManager = default!; [Dependency] private readonly IChatManager _chatManager = default!;
[ViewVariables]
private readonly Queue<string> _previousMaps = new Queue<string>(); private readonly Queue<string> _previousMaps = new Queue<string>();
[ViewVariables]
private GameMapPrototype _currentMap = default!; private GameMapPrototype _currentMap = default!;
[ViewVariables]
private bool _currentMapForced; private bool _currentMapForced;
[ViewVariables]
private bool _mapRotationEnabled; private bool _mapRotationEnabled;
[ViewVariables]
private int _mapQueueDepth = 1; private int _mapQueueDepth = 1;
public void Initialize() public void Initialize()
@@ -170,10 +175,12 @@ public sealed class GameMapManager : IGameMapManager
public GameMapPrototype? SelectMapInQueue() public GameMapPrototype? SelectMapInQueue()
{ {
Logger.InfoS("mapsel", string.Join(", ", _previousMaps));
var eligible = CurrentlyEligibleMaps() var eligible = CurrentlyEligibleMaps()
.Where(x => x.Votable) .Where(x => x.Votable)
.Select(x => (proto: x, weight: GetMapQueuePriority(x.ID))) .Select(x => (proto: x, weight: GetMapQueuePriority(x.ID)))
.OrderByDescending(x => x.weight).ToArray(); .OrderByDescending(x => x.weight).ToArray();
Logger.InfoS("mapsel", string.Join(", ", eligible.Select(x => (x.proto.ID, x.weight))));
if (eligible.Length is 0) if (eligible.Length is 0)
return null; return null;

View File

@@ -6,7 +6,7 @@
!type:NanotrasenNameGenerator !type:NanotrasenNameGenerator
prefixCreator: '14' prefixCreator: '14'
mapPath: /Maps/moose.yml mapPath: /Maps/moose.yml
minPlayers: 18 minPlayers: 0
maxPlayers: 35 maxPlayers: 35
overflowJobs: overflowJobs:
- Assistant - Assistant
@@ -35,5 +35,5 @@
Librarian: [ 1, 1 ] Librarian: [ 1, 1 ]
Lawyer: [ 1, 1 ] Lawyer: [ 1, 1 ]
Quartermaster: [ 1, 1 ] Quartermaster: [ 1, 1 ]
SalvageSpecialist: [ 1, 2 ] SalvageSpecialist: [ 1, 2 ]
Musician: [ 1, 1 ] Musician: [ 1, 1 ]