コード例 #1
0
    private bool OutputPipeIsEmpty()
    {
        if (ignoreFullPipe)
        {
            return(true);
        }
        bool result = true;

        if (connected)
        {
            IConduitFlow conduitFlow = GetConduitFlow();
            result = conduitFlow.IsConduitEmpty(utilityCell);
        }
        return(result);
    }
コード例 #2
0
ファイル: OutputPort.cs プロジェクト: mwillia95/Game-Mods
        private void UpdateConduitBlockedStatus(bool force = false)
        {
            IConduitFlow flowManager = this.GetConduitManager();
            bool         isEmpty     = flowManager.IsConduitEmpty(portCell);

            if (force || isEmpty != PreviouslyEmpty)
            {
                operational.SetFlag(outputEmptyFlag, isEmpty);
                PreviouslyEmpty = isEmpty;
                StatusItem conduitBlockedMultiples = Db.Get().BuildingStatusItems.ConduitBlockedMultiples;
                bool       guidExists = ConduitBlockedStatusItemGuid != Guid.Empty;
                if (isEmpty == guidExists)
                {
                    ConduitBlockedStatusItemGuid = selectable.ToggleStatusItem(conduitBlockedMultiples, ConduitBlockedStatusItemGuid, !isEmpty);
                }
            }
        }