Esempio n. 1
0
        public override void DrawGhost(ThingDef def, IntVec3 center, Rot4 rot, Color ghostCol)
        {
            Map             currentMap           = Find.CurrentMap;
            List <Building> allBuildingsColonist = currentMap.listerBuildings.allBuildingsColonist;

            for (int i = 0; i < allBuildingsColonist.Count; i++)
            {
                Building building = allBuildingsColonist[i];
                if (building.def.building.hasFuelingPort && !Find.Selector.IsSelected(building) && FuelingPortUtility.GetFuelingPortCell(building).Standable(currentMap))
                {
                    PlaceWorker_FuelingPort.DrawFuelingPortCell(building.Position, building.Rotation);
                }
            }
        }
 public static Building FuelingPortGiverAtFuelingPortCell(IntVec3 c, Map map)
 {
     for (int i = 0; i < 4; i++)
     {
         IntVec3 c2 = c + GenAdj.CardinalDirections[i];
         if (c2.InBounds(map))
         {
             List <Thing> thingList = c2.GetThingList(map);
             for (int j = 0; j < thingList.Count; j++)
             {
                 Building building = thingList[j] as Building;
                 if (building != null && building.def.building.hasFuelingPort && FuelingPortUtility.GetFuelingPortCell(building) == c)
                 {
                     return(building);
                 }
             }
         }
     }
     return(null);
 }
 public static IntVec3 GetFuelingPortCell(Building podLauncher)
 {
     return(FuelingPortUtility.GetFuelingPortCell(podLauncher.Position, podLauncher.Rotation));
 }
Esempio n. 4
0
        public static void DrawFuelingPortCell(IntVec3 center, Rot4 rot)
        {
            Vector3 position = FuelingPortUtility.GetFuelingPortCell(center, rot).ToVector3ShiftedWithAltitude(AltitudeLayer.MetaOverlays);

            Graphics.DrawMesh(MeshPool.plane10, position, Quaternion.identity, FuelingPortCellMaterial, 0);
        }