mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-25 23:18:44 -07:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user