Add some logging and make moose more easy to play on. (#7168)
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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 ]
|
||||||
|
|||||||
Reference in New Issue
Block a user