예제 #1
0
 public override float GetValueUnfinalized(StatRequest req, bool applyPostProcess = true)
 {
     if (req.Thing == null)
     {
         Log.Error("Getting " + this.GetType().FullName + " for " + req.Def.defName + " without concrete thing. This always returns 1. This is a bug. Contact the dev.");
         return(1);
     }
     return(RWHS_PowerPlantSteam.GetHeatPushedPerSecond(req, applyPostProcess));
 }
예제 #2
0
        public override string GetExplanationUnfinalized(StatRequest req, ToStringNumberSense numberSense)
        {
            float     heatPerSecond = RWHS_PowerPlantSteam.GetHeatPerSecond();
            float     surface       = 25;
            RoomGroup roomGroup     = req.Thing.Position.GetRoomGroup(req.Thing.Map);

            if (roomGroup != null)
            {
                surface = roomGroup.CellCount; // TODO DEBUG THIS LINE
            }
            float heatPushedPerSecond = heatPerSecond / surface;

            SEB seb = new SEB("StatsReport_RWHS");

            seb.Simple("HeatPushedPerSecond", heatPerSecond);
            seb.Simple("RoomSurface", surface);
            seb.Full("HeatOutputPerSecond", heatPushedPerSecond, heatPerSecond, surface);

            return(seb.ToString());
        }