public static bool IsVisible(this LockState state, string propertyName) { switch (propertyName) { case nameof(LockState.locked): return(true); case nameof(LockState.mode): return(state.locked && !state.Private); case nameof(LockState.petDoor): return(state.locked); case nameof(LockState.pensDoor): return(true); case nameof(LockState.owners): return(state.locked); case nameof(LockState.allowAnimals): return(state.locked); case nameof(LockState.allowSlave): return(state.locked); default: return(true); } }
public void CopyFrom(LockState copy) { mode = copy.mode; locked = copy.locked; petDoor = copy.petDoor; owners.Clear(); owners.AddRange(copy.owners); }
public void CopyFrom(LockState copy) { mode = copy.mode; locked = copy.locked; petDoor = copy.petDoor; pensDoor = copy.pensDoor; owners.Clear(); owners.AddRange(copy.owners); allowSlave = copy.allowSlave; allowAnimals = copy.allowAnimals; }
public LockData() { CurrentState = new LockState(LockMode.Allies, true, false, new List <Pawn>()); WantedState = new LockState(LockMode.Allies, true, false, new List <Pawn>()); }