public static bool CanBeClosed(this Essence _essence, LiveMapCell _cell, Creature _creature) { if (!(_essence is Thing)) { return(false); } if (_essence.IsFake()) { _essence = _cell.ResolveFakeThing(_creature); } return(_essence is ICanbeClosed && ((ICanbeClosed)_essence).ELockType == ELockType.OPEN); }
public static bool IsLockedFor(this Essence _essence, LiveMapCell _cell, Creature _creature) { if (_essence == null) { return(false); } if (_essence.IsFake()) { _essence = _cell.ResolveFakeThing(_creature); } return(_essence is ICanbeOpened && ((ICanbeOpened)_essence).ELockType != ELockType.OPEN); }