mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-15 14:12:27 +00:00
Eliminate duplicate rooms
This commit is contained in:
parent
5d6e339fa8
commit
be592bbacb
3 changed files with 27 additions and 7 deletions
|
@ -46,4 +46,17 @@ public class RoomVisualizerController : ControllerBase
|
|||
return this.Redirect("/debug/roomVisualizer");
|
||||
#endif
|
||||
}
|
||||
|
||||
[HttpGet("createRoomsWithDuplicatePlayers")]
|
||||
public async Task<IActionResult> CreateRoomsWithDuplicatePlayers()
|
||||
{
|
||||
#if !DEBUG
|
||||
return this.NotFound();
|
||||
#else
|
||||
List<int> users = await this.database.Users.OrderByDescending(_ => EF.Functions.Random()).Take(1).Select(u => u.UserId).ToListAsync();
|
||||
RoomHelper.CreateRoom(users, GameVersion.LittleBigPlanet2, Platform.PS3);
|
||||
RoomHelper.CreateRoom(users, GameVersion.LittleBigPlanet2, Platform.PS3);
|
||||
return this.Redirect("/debug/roomVisualizer");
|
||||
#endif
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue