public string Examine(Vector3 worldPos = default) { if (!UseStandardExamine) return null; var fillPercent = GetFillPercent(); if (fillPercent <= 0f) return "It's empty."; var fillDesc = ChemistryUtils.GetFillDescription(fillPercent); var stateDesc = ChemistryUtils.GetMixStateDescription(CurrentReagentMix); var color = CurrentReagentMix.MixColor; var colorDesc = TextUtils.ColorToString(color); var units = Mathf.RoundToInt(ReagentMixTotal); var name = CurrentReagentMix.MixName; if (ExamineAmount == ExamineAmountMode.APROXIMATE_AMOUNT) { if (ExamineContent == ExamineContentMode.NONE) { return $"It's {fillDesc}"; } else if (ExamineContent == ExamineContentMode.COLOR_AND_STUCTURE) { return $"It's {fillDesc}. There is {colorDesc} {stateDesc} inside"; } else if (ExamineContent == ExamineContentMode.ACTUAL_CONTENTS) { return $"It's {fillDesc}. It seems to mostly contain {name}."; } } else if (ExamineAmount == ExamineAmountMode.EXACT_AMOUNT) { if (ExamineContent == ExamineContentMode.NONE) { return $"It's {fillDesc}. There are {units} units of something inside"; } else if (ExamineContent == ExamineContentMode.COLOR_AND_STUCTURE) { return $"It's {fillDesc}. There are {units} units of {colorDesc} {stateDesc} inside"; } else if (ExamineContent == ExamineContentMode.ACTUAL_CONTENTS) { return $"It's {fillDesc}. It contains {units} units, mostly of {name}."; } } else if (ExamineAmount == ExamineAmountMode.UNKNOWN_AMOUNT) { var output = $"It's a pool of {colorDesc} {stateDesc}"; if (stateDesc == "powder") { output = $"It's a pile of {colorDesc} {stateDesc}"; } return output; } return null; }
public string Examine(Vector3 worldPos = default) { if (!UseStandardExamine) { return(null); } var fillPercent = GetFillPercent(); if (fillPercent <= 0f) { return("It's empty."); } var fillDesc = ChemistryUtils.GetFillDescription(fillPercent); var stateDesc = ChemistryUtils.GetMixStateDescription(ReagentMix); var color = ReagentMix.MixColor; var colorDesc = TextUtils.ColorToString(color); var units = Mathf.RoundToInt(maxCapacity * fillPercent); if (ExamineAmount == ExamineAmountMode.APROXIMATE_AMOUNT) { if (ExamineContent == ExamineContentMode.NONE) { return($"It's {fillDesc}"); } else if (ExamineContent == ExamineContentMode.COLOR_AND_STUCTURE) { return($"It's {fillDesc}. There is {colorDesc} {stateDesc} inside"); } } else if (ExamineAmount == ExamineAmountMode.EXACT_AMOUNT) { if (ExamineContent == ExamineContentMode.NONE) { return($"It's {fillDesc}. There are {units} units of something inside"); } else if (ExamineContent == ExamineContentMode.COLOR_AND_STUCTURE) { return($"It's {fillDesc}. There are {units} units of {colorDesc} {stateDesc} inside"); } } return(null); }