Checking if a client can access an item in the itemcomponent serialization methods

This commit is contained in:
Regalis
2016-12-09 16:56:17 +02:00
parent bea523187b
commit fa712e0102
5 changed files with 33 additions and 8 deletions
+5
View File
@@ -1356,6 +1356,11 @@ namespace Barotrauma
return Vector2.Distance(WorldPosition, worldPosition) < PickDistance;
}
public bool CanClientAccess(Client c)
{
return c != null && c.Character != null && c.Character.CanAccessItem(this);
}
public bool Pick(Character picker, bool ignoreRequiredItems=false, bool forceSelectKey=false, bool forceActionKey=false)
{
bool hasRequiredSkills = true;