public static string ToolStatDrawEntry(ThingWithComps tool, ToolType toolType, float value, ThingDef stuffDef = null) { var stat = StatDefOf.ToolEffectivenessFactor; var builder = new StringBuilder(stat.description); var statReq = tool == null?Patch_StatRequest_For.For(toolType, stuffDef) : Patch_StatRequest_For.For(tool, toolType); builder.AppendLine("\n\n" + stat.Worker.GetExplanationFull(statReq, stat.toStringNumberSense, value)); return(builder.ToString()); }
public static float GetValue(this StatWorker statWorker, ThingWithComps tool, ToolType toolType, bool applyPostProcess = true) { return(statWorker.GetValue(Patch_StatRequest_For.For(tool, toolType), applyPostProcess)); }