Mouse disposal nullable patch (#10185)

This commit is contained in:
wrexbe 2022-07-30 21:23:46 -07:00 committed by GitHub
parent 8000d31a62
commit b5de805083
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -189,7 +189,7 @@ namespace Content.Server.Disposal.Unit.EntitySystems
return;
else
unit.Container.Insert(toInsert);
AfterInsert(unit, toInsert);
}
@ -475,9 +475,9 @@ namespace Content.Server.Disposal.Unit.EntitySystems
if (!Resolve(unitId, ref unit))
return false;
if (!HasComp<SharedHandsComponent>(userId) && toInsertId != userId) // Mobs like mouse can Jump inside even with no hands
if (userId.HasValue && !HasComp<SharedHandsComponent>(userId) && toInsertId != userId) // Mobs like mouse can Jump inside even with no hands
{
_popupSystem.PopupEntity(Loc.GetString("disposal-unit-no-hands"), userId, Filter.Entities(userId), PopupType.SmallCaution);
_popupSystem.PopupEntity(Loc.GetString("disposal-unit-no-hands"), userId.Value, Filter.Entities(userId.Value), PopupType.SmallCaution);
return false;
}