feat: Implement adjustable room capacity and quest team size

- Added MaxCapacity property to RoomEntity and updated related controllers to utilize it.
- Modified RoomsController to set MaxPlayers based on room's MaxCapacity.
- Introduced QuestTeamSize class to dynamically adjust quest party sizes beyond the default limit.
- Updated DevMenu to include options for debugging and managing room settings.
- Created UI elements for adjusting MaxCapacity in the admin interface.
- Added configuration file for DevMenu with default settings.
This commit is contained in:
Alexa
2026-06-08 01:27:30 +03:00
parent 64746cdaa2
commit 482c73e1bc
15 changed files with 661 additions and 57 deletions
@@ -1026,6 +1026,7 @@ public class GoToController(
// baked-in DormRoom mapping for unknown names.
long roomId;
string locationId;
var maxCapacity = 8; // admin-adjustable per-room cap; 8 = default/fallback
if (roomName.Equals("DormRoom", StringComparison.OrdinalIgnoreCase))
{
// Each player has their own dorm row (created at signup,
@@ -1038,6 +1039,7 @@ public class GoToController(
var personal = await rooms.EnsurePersonalDormAsync(callerPid);
roomId = personal.Id;
locationId = personal.LocationReplicationId;
maxCapacity = personal.MaxCapacity;
}
else
{
@@ -1055,6 +1057,7 @@ public class GoToController(
{
roomId = room.Id;
locationId = room.LocationReplicationId;
maxCapacity = room.MaxCapacity;
}
else
{
@@ -1103,7 +1106,7 @@ public class GoToController(
PhotonRegionId = photonRegion,
PhotonRoomId = photonRoom,
Name = dormInstanceName,
MaxCapacity = 8,
MaxCapacity = maxCapacity,
IsFull = false,
IsPrivate = false,
IsInProgress = true,