Skip to content

Commit

Permalink
Adding a nullcheck because pietro's server did a weird.
Browse files Browse the repository at this point in the history
  • Loading branch information
joker-119 committed Mar 2, 2021
1 parent 32e8dc9 commit f9aa53d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions CustomItems/Items/EmpGrenade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,10 @@ private void OnExplodingGrenade(ExplodingGrenadeEventArgs ev)

foreach (DoorVariant door in room.Doors)
{
if (BlacklistedDoorNames.Contains(door.GetNametag()))
continue;

if (door.NetworkActiveLocks > 0 && !OpenLockedDoors)
continue;

if (door.RequiredPermissions.RequiredPermissions != KeycardPermissions.None && !OpenKeycardDoors)
if (door == null ||
(!string.IsNullOrEmpty(door.GetNametag()) && BlacklistedDoorNames.Contains(door.GetNametag())) ||
(door.NetworkActiveLocks > 0 && !OpenLockedDoors) ||
(door.RequiredPermissions.RequiredPermissions != KeycardPermissions.None && !OpenKeycardDoors))
continue;

Log.Debug("Opening a door!", CustomItems.Instance.Config.IsDebugEnabled);
Expand Down
2 changes: 1 addition & 1 deletion CustomItems/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.1.0.0")]
[assembly: AssemblyVersion("2.1.1.0")]
[assembly: AssemblyFileVersion("2.0.0.0")]

0 comments on commit f9aa53d

Please sign in to comment.