/// <summary>
        /// Get the Type of Air as String. Hot Cold Frozen etc.
        /// </summary>
        /// <param name="type">Enum for AirFlow Type</param>
        /// <returns>Translated String</returns>
        protected string GetAirTypeString(AirFlowType type)
        {
            string res = "";

            switch (type)
            {
            case AirFlowType.Cold:
                res += AirTypeKey.Translate(ColdAirKey.Translate());
                break;

            case AirFlowType.Hot:
                res += AirTypeKey.Translate(HotAirKey.Translate());
                break;

            case AirFlowType.Frozen:
                res += AirTypeKey.Translate(FrozenAirKey.Translate());
                break;

            default:
                res += AirTypeKey.Translate("Unknown");
                break;
            }

            return(res);
        }
        /// <summary>
        /// Print the Component for Overlay Grid
        /// </summary>
        /// <param name="layer">Section Layer that is being Printed</param>
        /// <param name="type">AirFlow Type</param>
        public void PrintForGrid(SectionLayer layer, AirFlowType type)
        {
            switch (type)
            {
            case AirFlowType.Hot:
                GraphicsLoader.GraphicHotPipeOverlay.Print(layer, parent);
                break;

            case AirFlowType.Cold:
                GraphicsLoader.GraphicColdPipeOverlay.Print(layer, parent);
                break;

            case AirFlowType.Frozen:
                GraphicsLoader.GraphicFrozenPipeOverlay.Print(layer, parent);
                break;

            case AirFlowType.Any:
                break;
            }
        }
Exemple #3
0
 /// <summary>
 /// Graphic for Overlay Pipes Constructor
 /// </summary>
 /// <param name="subGraphic">Color Specific Overlay</param>
 /// <param name="anyGraphic">Any Pipe Overlay Graphic</param>
 /// <param name="type">Flow Type of the Atlas</param>
 public GraphicPipe_Overlay(Graphic subGraphic, Graphic anyGraphic, AirFlowType type) : base(subGraphic)
 {
     FlowType     = type;
     _anyGraphic  = anyGraphic;
     _flowGraphic = subGraphic;
 }
Exemple #4
0
 /// <summary>
 /// Graphic for Overlay Pipes Constructor. Defaults to Red Pipe as FlowType.
 /// </summary>
 /// <param name="subGraphic">Color Specific Overlay</param>
 /// <param name="anyGraphic">Any Pipe Overlay Graphic</param>
 public GraphicPipe_Overlay(Graphic subGraphic, Graphic anyGraphic) : base(subGraphic)
 {
     FlowType     = AirFlowType.Hot;
     _anyGraphic  = anyGraphic;
     _flowGraphic = subGraphic;
 }
 /// <summary>
 /// Graphic for Pipes Constructor with Defaulted Red Pipe
 /// </summary>
 /// <param name="graphic">Multi Graphic Object</param>
 public GraphicPipe(Graphic graphic)
 {
     subGraphic = graphic;
     FlowType   = AirFlowType.Hot;
 }
 /// <summary>
 /// Graphic for Pipes Constructor
 /// </summary>
 /// <param name="graphic">Multi Graphic Object</param>
 /// <param name="flowType">Type of Pipe</param>
 public GraphicPipe(Graphic graphic, AirFlowType flowType)
 {
     subGraphic = graphic;
     FlowType   = flowType;
 }
 /// <summary>
 /// Same as ZoneAt but also checks for the GridID in the Pipe Matrix
 /// </summary>
 /// <param name="pos">Position of the cell</param>
 /// <param name="flowType">Airflow type</param>
 /// <param name="id">GridID to check for</param>
 /// <returns>Boolean result if perfect pipe exists at cell or not</returns>
 public bool PerfectMatch(IntVec3 pos, AirFlowType flowType, int id)
 {
     return(PipeGrid[(int)flowType, map.cellIndices.CellToIndex(pos)] == id);
 }
        // ? Why are those two methods even here? IsDirty is public, so why raise further calls? --Brain

        /// <summary>
        /// Dirty the flag for reconstruction
        /// </summary>

        /* public void DirtyPipeGrid()
         * {
         *  IsDirty = true;
         * } */

        /// <summary>
        /// Dirty the flag for reconstruction
        /// </summary>

        /* public void DirtyPipeWholeGrid()
         * {
         *  IsDirty = true;
         * } */

        /// <summary>
        /// Check if that Zone in the Pipe Matrix has a Pipe of some sort or not.
        /// </summary>
        /// <param name="pos">Position of the cell</param>
        /// <param name="flowType">Airflow type</param>
        /// <returns>Boolean result if pipe exists at cell or not</returns>
        public bool ZoneAt(IntVec3 pos, AirFlowType flowType)
        {
            return(PipeGrid[(int)flowType, map.cellIndices.CellToIndex(pos)] != RebuildValue);
        }
Exemple #9
0
 /// <summary>
 /// Cyan Pipe Overlay Section Layer
 /// </summary>
 /// <param name="section">Section of the Map</param>
 public SectionLayer_FrozenAirPipe(Section section) : base(section)
 {
     FlowType            = AirFlowType.Frozen;
     requireAddToMapMesh = false;
     relevantChangeTypes = (MapMeshFlag)4;
 }