Example #1
0
    public override void OnSinkConnected(ISink s)
    {
        if (s.HasContainerFor(Matter.Water))
        {
            WaterSinks.Add(s);
        }

        if (s.HasContainerFor(Matter.Oxygen))
        {
            OxygenSinks.Add(s);
        }
    }
Example #2
0
 public override void OnSinkConnected(ISink s)
 {
     if (s.HasContainerFor(Matter.Oxygen))
     {
         OxygenIn = s;
         this.SyncStatusSprites();
     }
     else if (s.HasContainerFor(Matter.Water))
     {
         WaterIn = s;
         this.SyncStatusSprites();
     }
 }
Example #3
0
 public override void OnSinkConnected(ISink s)
 {
     if (s.HasContainerFor(Matter.Hydrogen))
     {
         HydrogenSource = s;
     }
     if (s.HasContainerFor(Matter.Methane))
     {
         MethaneOut = s;
     }
     if (s.HasContainerFor(Matter.Water))
     {
         WaterOut = s;
     }
 }
Example #4
0
 public override void OnSinkConnected(ISink s)
 {
     if (s.HasContainerFor(Matter.Hydrogen))
     {
         HydrogenOut = s;
     }
     if (s.HasContainerFor(Matter.Oxygen))
     {
         OxygenOut = s;
     }
     if (s.HasContainerFor(Matter.Water))
     {
         WaterIn = s;
     }
 }
Example #5
0
 public override void OnSinkConnected(ISink s)
 {
     if (s.HasContainerFor(RedHomestead.Simulation.Matter.CarbonDioxide))
     {
         co2Out = s.Get(RedHomestead.Simulation.Matter.CarbonDioxide);
     }
 }
Example #6
0
 public void AddSink(ISink sink, Matter type)
 {
     if (sink.HasContainerFor(type))
     {
         AddInput(sink.Get(type));
     }
 }
Example #7
0
    public override void OnSinkConnected(ISink s)
    {
        if (this.Data.Containers.Keys.Count == 0)
        {
            if (s is SingleResourceModuleGameplay)
            {
                this.Data.Containers.Add((s as SingleResourceModuleGameplay).Data.Container.MatterType, new ResourceContainer()
                {
                    MatterType    = (s as SingleResourceModuleGameplay).Data.Container.MatterType,
                    TotalCapacity = 1f
                });
            }

            RefreshValveTags();
        }
        else
        {
            if (s.HasContainerFor(this.SplitterMatterType) && s is ModuleGameplay)
            {
                if (OutputOne == null)
                {
                    OutputOne = s as ModuleGameplay;
                }
                else if (OutputTwo == null)
                {
                    OutputTwo = s as ModuleGameplay;
                }
            }
        }
    }
Example #8
0
        public override void OnSinkConnected(ISink s)
        {
            if (s.HasContainerFor(Matter.Water))
            {
                this.WaterIn = s;
            }

            this.RefreshIconsAndHandles();
        }