public void CanStore(UnityAction onFailed, Socketable socketable, Socket socket) { //filter out what can and can't be socketed if (AllowedIds != null && AllowedIds.Length > 0) { var type = socketable.GetComponent <SocketableType>(); if (type == null || HashedString.DoNotContain(AllowedIds, type.TypeName.Hash)) { //let the inventory know that things are not well onFailed(); return; } } }
bool TestFilter(PGISlotItem item) { //filter out what can and can't be stored if (AllowedIds != null && AllowedIds.Length > 0) { var type = item.GetComponent <ItemType>(); if (type == null) { return(false); } if (HashedString.DoNotContain(AllowedIds, type.TypeName.Hash)) { return(false); } } return(true); }