Skip to content

Commit a33b419

Browse files
authored
fix: ZoneType not returning Pocket (#809)
1 parent 087bf2f commit a33b419

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

EXILED/Exiled.API/Features/Room.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -429,16 +429,16 @@ internal void InternalCreate()
429429
Identifier = gameObject.GetComponent<RoomIdentifier>();
430430
RoomIdentifierToRoom.Add(Identifier, this);
431431

432-
Zone = Identifier.Zone.GetZone();
433-
434-
if (Zone is ZoneType.Unspecified)
435-
Log.Warn($"[ZONETYPE UNKNOWN] {Identifier} Zone : {Identifier?.Zone}");
436-
437432
Type = FindType(gameObject);
438433

439434
if (Type is RoomType.Unknown)
440435
Log.Warn($"[ROOMTYPE UNKNOWN] {Identifier} Name : {gameObject?.name.RemoveBracketsOnEndOfName()} Shape : {Identifier?.Shape}");
441436

437+
Zone = Type is RoomType.Pocket ? ZoneType.Pocket : Identifier.Zone.GetZone();
438+
439+
if (Zone is ZoneType.Unspecified)
440+
Log.Warn($"[ZONETYPE UNKNOWN] {Identifier} Zone : {Identifier?.Zone}");
441+
442442
RoomLightControllers = RoomLightControllersValue.AsReadOnly();
443443

444444
GetComponentsInChildren<BreakableWindow>().ForEach(component =>

0 commit comments

Comments
 (0)