コード例 #1
0
        internal static bool CheckCatcherLocks(Identifiable.Id id, SiloCatcher catcher)
        {
            if (!STORAGE_LOCKS.ContainsKey(id))
            {
                return(true);
            }

            foreach (CatcherLocker locker in CATCHER_LOCKS[id])
            {
                if (!locker.IsUnlocked(id, catcher))
                {
                    return(false);
                }
            }

            return(true);
        }
コード例 #2
0
        internal static bool CheckStorageLocks(Identifiable.Id id, SiloStorage storage)
        {
            if (!STORAGE_LOCKS.ContainsKey(id))
            {
                return(true);
            }

            foreach (StorageLocker locker in STORAGE_LOCKS[id])
            {
                if (!locker.IsUnlocked(id, storage))
                {
                    return(false);
                }
            }

            return(true);
        }