private void Refresh(List <MinionAssignablesProxy> identities, bool rebuild)
    {
        Rotatable component = target.GetComponent <Rotatable>();
        bool      rotated   = (UnityEngine.Object)component != (UnityEngine.Object)null && component.IsRotated;

        defaultsRow.SetRotated(rotated);
        defaultsRow.SetContent(target.DefaultPermission, OnDefaultPermissionChanged);
        if (rebuild)
        {
            ClearContent();
        }
        foreach (MinionAssignablesProxy identity in identities)
        {
            AccessControlSideScreenRow accessControlSideScreenRow;
            if (rebuild)
            {
                accessControlSideScreenRow = rowPool.GetFreeElement(rowGroup, true);
                identityRowMap.Add(identity, accessControlSideScreenRow);
            }
            else
            {
                accessControlSideScreenRow = identityRowMap[identity];
            }
            AccessControl.Permission setPermission = target.GetSetPermission(identity);
            bool isDefault = target.IsDefaultPermission(identity);
            accessControlSideScreenRow.SetRotated(rotated);
            accessControlSideScreenRow.SetMinionContent(identity, setPermission, isDefault, OnPermissionChanged, OnPermissionDefault);
        }
        RefreshOnline();
        ContentContainer.SetActive(target.controlEnabled);
    }
 public override void SetTarget(GameObject target)
 {
     if ((UnityEngine.Object) this.target != (UnityEngine.Object)null)
     {
         ClearTarget();
     }
     this.target = target.GetComponent <AccessControl>();
     doorTarget  = target.GetComponent <Door>();
     if (!((UnityEngine.Object) this.target == (UnityEngine.Object)null))
     {
         target.Subscribe(1734268753, OnDoorStateChanged);
         target.Subscribe(-1525636549, OnAccessControlChanged);
         if (rowPool == null)
         {
             rowPool = new UIPool <AccessControlSideScreenRow>(rowPrefab);
         }
         base.gameObject.SetActive(true);
         identityList = new List <MinionAssignablesProxy>(Components.MinionAssignablesProxy.Items);
         Refresh(identityList, true);
     }
 }