Checking if a client can access an item in the itemcomponent serialization methods
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user