diff --git a/RJWSexperience/IdeologyAddon/Ideology/PreceptComp_SelftTookThoughtExtended.cs b/RJWSexperience/IdeologyAddon/Ideology/PreceptComp_SelftTookThoughtExtended.cs index 560a202..9c02795 100644 --- a/RJWSexperience/IdeologyAddon/Ideology/PreceptComp_SelftTookThoughtExtended.cs +++ b/RJWSexperience/IdeologyAddon/Ideology/PreceptComp_SelftTookThoughtExtended.cs @@ -1,4 +1,5 @@ using RimWorld; +using System.Diagnostics.CodeAnalysis; using Verse; namespace RJWSexperience.Ideology @@ -22,7 +23,9 @@ namespace RJWSexperience.Ideology public class PreceptComp_SelfTookThoughtTagged : PreceptComp_SelfTookMemoryThought { + [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")] public string tag; + [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")] public bool exclusive = false; public PreceptComp_SelfTookThoughtTagged() { } @@ -57,22 +60,18 @@ namespace RJWSexperience.Ideology } Pawn arg = ev.args.GetArg(HistoryEventArgsNames.Doer); Pawn partner = ev.args.GetArg(HistoryEventArgsNamesCustom.Partner); - if (arg.needs != null && arg.needs.mood != null && (!this.onlyForNonSlaves || !arg.IsSlave)) + if (arg.needs?.mood != null && (!this.onlyForNonSlaves || !arg.IsSlave)) { if (this.thought.minExpectationForNegativeThought != null && ExpectationsUtility.CurrentExpectationFor(arg).order < this.thought.minExpectationForNegativeThought.order) { return; } Thought_Memory thought_Memory = ThoughtMaker.MakeThought(this.thought, precept); - Thought_KilledInnocentAnimal thought_KilledInnocentAnimal; - Pawn animal; - if ((thought_KilledInnocentAnimal = (thought_Memory as Thought_KilledInnocentAnimal)) != null && ev.args.TryGetArg(HistoryEventArgsNames.Victim, out animal)) + if (thought_Memory is Thought_KilledInnocentAnimal thought_KilledInnocentAnimal && ev.args.TryGetArg(HistoryEventArgsNames.Victim, out Pawn animal)) { thought_KilledInnocentAnimal.SetAnimal(animal); } - Thought_MemoryObservation thought_MemoryObservation; - Corpse target; - if ((thought_MemoryObservation = (thought_Memory as Thought_MemoryObservation)) != null && ev.args.TryGetArg(HistoryEventArgsNames.Subject, out target)) + if (thought_Memory is Thought_MemoryObservation thought_MemoryObservation && ev.args.TryGetArg(HistoryEventArgsNames.Subject, out Corpse target)) { thought_MemoryObservation.Target = target; } @@ -83,20 +82,20 @@ namespace RJWSexperience.Ideology public class PreceptComp_KnowsMemoryThoughtTagged : PreceptComp_KnowsMemoryThought { + [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")] public string tag; + [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")] public bool exclusive = false; + [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")] public bool applyonpartner = false; public PreceptComp_KnowsMemoryThoughtTagged() { } public override void Notify_MemberWitnessedAction(HistoryEvent ev, Precept precept, Pawn member) { - if (!applyonpartner) + if (!applyonpartner && ev.args.TryGetArg(HistoryEventArgsNamesCustom.Partner, out Pawn pawn) && pawn == member) { - if (ev.args.TryGetArg(HistoryEventArgsNamesCustom.Partner, out Pawn pawn)) - { - if (pawn == member) return; - } + return; } if (tag != null) { diff --git a/RJWSexperience/IdeologyAddon/Ideology/PreceptDef_RequirementExtended.cs b/RJWSexperience/IdeologyAddon/Ideology/PreceptDef_RequirementExtended.cs index 62e4321..ae38abe 100644 --- a/RJWSexperience/IdeologyAddon/Ideology/PreceptDef_RequirementExtended.cs +++ b/RJWSexperience/IdeologyAddon/Ideology/PreceptDef_RequirementExtended.cs @@ -1,19 +1,12 @@ -using System; +using RimWorld; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using RimWorld; -using Verse; - - +using System.Diagnostics.CodeAnalysis; namespace RJWSexperience.Ideology { - public class PreceptDef_RequirementExtended : PreceptDef - { - public List requiredAllMemes = new List(); - } - - + public class PreceptDef_RequirementExtended : PreceptDef + { + [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")] + public List requiredAllMemes = new List(); + } } diff --git a/RJWSexperience/IdeologyAddon/Ideology/Rimworld_Patch.cs b/RJWSexperience/IdeologyAddon/Ideology/Rimworld_Patch.cs index dc286f6..ba2f1fd 100644 --- a/RJWSexperience/IdeologyAddon/Ideology/Rimworld_Patch.cs +++ b/RJWSexperience/IdeologyAddon/Ideology/Rimworld_Patch.cs @@ -25,12 +25,9 @@ namespace RJWSexperience.Ideology public static void Postfix(Pawn otherPawn, Pawn ___pawn, ref float __result) { Ideo ideo = ___pawn.Ideo; - if (ideo != null) + if (ideo?.HasPrecept(VariousDefOf.Incestuos_IncestOnly) == true && IdeoUtility.IsIncest(___pawn, otherPawn)) { - if (ideo.HasPrecept(VariousDefOf.Incestuos_IncestOnly) && IdeoUtility.IsIncest(___pawn, otherPawn)) - { - __result *= 8f; - } + __result *= 8f; } } } @@ -51,21 +48,17 @@ namespace RJWSexperience.Ideology { public static void Postfix(PreceptDef precept, bool checkDuplicates, ref IdeoFoundation __instance, ref AcceptanceReport __result) { - if (precept is PreceptDef_RequirementExtended) + if (precept is PreceptDef_RequirementExtended def && !def.requiredAllMemes.NullOrEmpty()) { - PreceptDef_RequirementExtended def = precept as PreceptDef_RequirementExtended; - if (!def.requiredAllMemes.NullOrEmpty()) + for (int i = 0; i < def.requiredAllMemes.Count; i++) { - for (int i = 0; i < def.requiredAllMemes.Count; i++) + if (!__instance.ideo.memes.Contains(def.requiredAllMemes[i])) { - if (!__instance.ideo.memes.Contains(def.requiredAllMemes[i])) - { - List report = new List(); - foreach (MemeDef meme in def.requiredAllMemes) report.Add(meme.LabelCap); + List report = new List(); + foreach (MemeDef meme in def.requiredAllMemes) report.Add(meme.LabelCap); - __result = new AcceptanceReport("RequiresMeme".Translate() + ": " + report.ToCommaList()); - return; - } + __result = new AcceptanceReport("RequiresMeme".Translate() + ": " + report.ToCommaList()); + return; } } } diff --git a/RJWSexperience/IdeologyAddon/Ideology/Rituals/JobGiver_GangbangConsensual.cs b/RJWSexperience/IdeologyAddon/Ideology/Rituals/JobGiver_GangbangConsensual.cs index dfb8ec8..dc6dc15 100644 --- a/RJWSexperience/IdeologyAddon/Ideology/Rituals/JobGiver_GangbangConsensual.cs +++ b/RJWSexperience/IdeologyAddon/Ideology/Rituals/JobGiver_GangbangConsensual.cs @@ -124,9 +124,8 @@ namespace RJWSexperience.Ideology }; get_banged.tickAction = delegate { - if ((parteners.Count > 0) && (pawn.IsHashIntervalTick(ticks_between_hearts / parteners.Count))) - if (pawn.IsHashIntervalTick(ticks_between_hearts)) - ThrowMetaIconF(pawn.Position, pawn.Map, FleckDefOf.Heart); + if ((parteners.Count > 0) && pawn.IsHashIntervalTick(ticks_between_hearts / parteners.Count) && pawn.IsHashIntervalTick(ticks_between_hearts)) + ThrowMetaIconF(pawn.Position, pawn.Map, FleckDefOf.Heart); }; get_banged.AddEndCondition(new Func(() => { diff --git a/RJWSexperience/IdeologyAddon/Ideology/Rituals/RitualOutcomeComps.cs b/RJWSexperience/IdeologyAddon/Ideology/Rituals/RitualOutcomeComps.cs index 15650f8..b03416f 100644 --- a/RJWSexperience/IdeologyAddon/Ideology/Rituals/RitualOutcomeComps.cs +++ b/RJWSexperience/IdeologyAddon/Ideology/Rituals/RitualOutcomeComps.cs @@ -1,45 +1,40 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using RimWorld; +using RimWorld; +using System.Diagnostics.CodeAnalysis; using Verse; -using rjw; - namespace RJWSexperience.Ideology { - public class RitualOutcomeComp_HediffBased : RitualOutcomeComp_QualitySingleOffset - { - HediffDef hediffDef = null; - float minSeverity = 0; - string roleId = ""; + public class RitualOutcomeComp_HediffBased : RitualOutcomeComp_QualitySingleOffset + { + [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")] + public HediffDef hediffDef = null; + [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")] + public float minSeverity = 0; + [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")] + public string roleId = ""; - protected override string LabelForDesc => label; - public override bool DataRequired => false; + protected override string LabelForDesc => label; + public override bool DataRequired => false; public override bool Applies(LordJob_Ritual ritual) { Pawn victim = null; - foreach(RitualRole ritualRole in ritual.assignments.AllRolesForReading) - { - if (ritualRole != null && ritualRole.id.Contains(roleId)) + foreach (RitualRole ritualRole in ritual.assignments.AllRolesForReading) + { + if (ritualRole?.id.Contains(roleId) == true) { victim = ritual.assignments.FirstAssignedPawn(ritualRole); } } if (victim != null && hediffDef != null) - { + { Hediff hediff = victim.health.hediffSet.GetFirstHediffOfDef(hediffDef); if (hediff?.Severity >= minSeverity) - { + { return true; - } - } + } + } return false; } - - public override ExpectedOutcomeDesc GetExpectedOutcomeDesc(Precept_Ritual ritual, TargetInfo ritualTarget, RitualObligation obligation, RitualRoleAssignments assignments, RitualOutcomeComp_Data data) { @@ -53,13 +48,14 @@ namespace RJWSexperience.Ideology positive = true }; } - } public class RitualOutcomeComp_NeedBased : RitualOutcomeComp_QualitySingleOffset { - NeedDef needDef = null; - float minAvgNeed = 0; + [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")] + public NeedDef needDef = null; + [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")] + public float minAvgNeed = 0; protected override string LabelForDesc => label; public override bool DataRequired => false; @@ -71,9 +67,7 @@ namespace RJWSexperience.Ideology avgNeed += pawn.needs?.TryGetNeed(needDef)?.CurLevel ?? 0f; } avgNeed /= ritual.assignments.AllPawns.Count; - if (avgNeed >= minAvgNeed) return true; - - return false; + return avgNeed >= minAvgNeed; } public override ExpectedOutcomeDesc GetExpectedOutcomeDesc(Precept_Ritual ritual, TargetInfo ritualTarget, RitualObligation obligation, RitualRoleAssignments assignments, RitualOutcomeComp_Data data) @@ -89,7 +83,4 @@ namespace RJWSexperience.Ideology }; } } - - - } diff --git a/RJWSexperience/IdeologyAddon/Ideology/StatParts.cs b/RJWSexperience/IdeologyAddon/Ideology/StatParts.cs index 5651e23..a01b214 100644 --- a/RJWSexperience/IdeologyAddon/Ideology/StatParts.cs +++ b/RJWSexperience/IdeologyAddon/Ideology/StatParts.cs @@ -1,66 +1,69 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using rjw; -using RimWorld; +using RimWorld; +using System; +using System.Diagnostics.CodeAnalysis; using Verse; - namespace RJWSexperience.Ideology { - public class StatPart_GenderPrimacy : StatPart - { - public float modifier; + public class StatPart_GenderPrimacy : StatPart + { + [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")] + public float modifier; - public override string ExplanationPart(StatRequest req) - { - Pawn pawn = req.Thing as Pawn; - Ideo ideo = null; - if (pawn != null) ideo = pawn.Ideo; - float fact = 1f; - if (ideo != null && !ideo.memes.NullOrEmpty()) for (int i = 0; i < ideo.memes.Count; i++) - { - if (ideo.memes[i] == MemeDefOf.MaleSupremacy) - { - if (pawn.gender == Gender.Male) fact = modifier; - else if (pawn.gender == Gender.Female) fact = 1/modifier; - break; - } - else if (ideo.memes[i] == MemeDefOf.FemaleSupremacy) - { - if (pawn.gender == Gender.Male) fact = 1/modifier; - else if (pawn.gender == Gender.Female) fact = modifier; - break; - } - } - return Keyed.MemeStatFactor(String.Format("{0:0.##}", fact * 100)); - } + public override string ExplanationPart(StatRequest req) + { + if (!req.HasThing || !(req.Thing is Pawn pawn)) + return null; - public override void TransformValue(StatRequest req, ref float val) - { - Pawn pawn = req.Thing as Pawn; - Ideo ideo = null; - if (pawn != null) ideo = pawn.Ideo; - if (ideo != null && !ideo.memes.NullOrEmpty()) for(int i=0; i< ideo.memes.Count; i++) - { - if (ideo.memes[i] == MemeDefOf.MaleSupremacy) - { - if (pawn.gender == Gender.Male) val *= modifier; - else if (pawn.gender == Gender.Female) val /= modifier; - break; - } - else if(ideo.memes[i] == MemeDefOf.FemaleSupremacy) - { - if (pawn.gender == Gender.Male) val /= modifier; - else if (pawn.gender == Gender.Female) val *= modifier; - break; - } - } - - } - } + Ideo ideo = pawn.Ideo; + float fact = 1f; + if (ideo?.memes.NullOrEmpty() == false) + { + for (int i = 0; i < ideo.memes.Count; i++) + { + if (ideo.memes[i] == MemeDefOf.MaleSupremacy) + { + if (pawn.gender == Gender.Male) fact = modifier; + else if (pawn.gender == Gender.Female) fact = 1 / modifier; + break; + } + else if (ideo.memes[i] == MemeDefOf.FemaleSupremacy) + { + if (pawn.gender == Gender.Male) fact = 1 / modifier; + else if (pawn.gender == Gender.Female) fact = modifier; + break; + } + } + } + return Keyed.MemeStatFactor(String.Format("{0:0.##}", fact * 100)); + } + public override void TransformValue(StatRequest req, ref float val) + { + if (!req.HasThing || !(req.Thing is Pawn pawn)) + return; + + Ideo ideo = pawn.Ideo; + + if (ideo?.memes.NullOrEmpty() == false) + { + for (int i = 0; i < ideo.memes.Count; i++) + { + if (ideo.memes[i] == MemeDefOf.MaleSupremacy) + { + if (pawn.gender == Gender.Male) val *= modifier; + else if (pawn.gender == Gender.Female) val /= modifier; + break; + } + else if (ideo.memes[i] == MemeDefOf.FemaleSupremacy) + { + if (pawn.gender == Gender.Male) val /= modifier; + else if (pawn.gender == Gender.Female) val *= modifier; + break; + } + } + } + } + } } diff --git a/RJWSexperience/IdeologyAddon/Ideology/Thought_IncreaseRecord.cs b/RJWSexperience/IdeologyAddon/Ideology/Thought_IncreaseRecord.cs index 62f31c7..d50eb50 100644 --- a/RJWSexperience/IdeologyAddon/Ideology/Thought_IncreaseRecord.cs +++ b/RJWSexperience/IdeologyAddon/Ideology/Thought_IncreaseRecord.cs @@ -18,7 +18,7 @@ namespace RJWSexperience.Ideology base.ThoughtInterval(); if (recordIncrement != 0) { - pawn.records.AddTo(recordDef, recordIncrement); + pawn.records.AddTo(RecordDef, recordIncrement); recordIncrement = 0; } } diff --git a/RJWSexperience/IdeologyAddon/Ideology/Thought_Opinionbased.cs b/RJWSexperience/IdeologyAddon/Ideology/Thought_Opinionbased.cs index 4b6d30e..16a83b4 100644 --- a/RJWSexperience/IdeologyAddon/Ideology/Thought_Opinionbased.cs +++ b/RJWSexperience/IdeologyAddon/Ideology/Thought_Opinionbased.cs @@ -1,5 +1,6 @@ using RimWorld; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; namespace RJWSexperience.Ideology { @@ -8,6 +9,7 @@ namespace RJWSexperience.Ideology /// public class ThoughtDef_Opinionbased : ThoughtDef { + [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")] public List minimumValueforStage = new List(); } @@ -17,7 +19,7 @@ namespace RJWSexperience.Ideology public class Thought_Opinionbased : Thought_Memory { protected ThoughtDef_Opinionbased Def => (ThoughtDef_Opinionbased)def; - protected List minimumValueforStage => Def.minimumValueforStage; + protected List MinimumValueforStage => Def.minimumValueforStage; public override int CurStageIndex { @@ -25,9 +27,9 @@ namespace RJWSexperience.Ideology { float value = 0f; if (otherPawn != null) value = pawn.relations?.OpinionOf(otherPawn) ?? 0f; - for (int i = minimumValueforStage.Count - 1; i > 0; i--) + for (int i = MinimumValueforStage.Count - 1; i > 0; i--) { - if (minimumValueforStage[i] < value) return i; + if (MinimumValueforStage[i] < value) return i; } return 0; } diff --git a/RJWSexperience/IdeologyAddon/Ideology/Thought_Recordbased.cs b/RJWSexperience/IdeologyAddon/Ideology/Thought_Recordbased.cs index 6af7950..8c4f5e7 100644 --- a/RJWSexperience/IdeologyAddon/Ideology/Thought_Recordbased.cs +++ b/RJWSexperience/IdeologyAddon/Ideology/Thought_Recordbased.cs @@ -1,5 +1,6 @@ using RimWorld; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; namespace RJWSexperience.Ideology { @@ -8,8 +9,11 @@ namespace RJWSexperience.Ideology /// public class ThoughtDef_Recordbased : ThoughtDef { + [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")] public RecordDef recordDef; + [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")] public List minimumValueforStage = new List(); + [SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")] public float increment; } @@ -19,17 +23,17 @@ namespace RJWSexperience.Ideology public class Thought_Recordbased : Thought_Memory { protected ThoughtDef_Recordbased Def => (ThoughtDef_Recordbased)def; - protected RecordDef recordDef => Def.recordDef; - protected List minimumValueforStage => Def.minimumValueforStage; + protected RecordDef RecordDef => Def.recordDef; + protected List MinimumValueforStage => Def.minimumValueforStage; public override int CurStageIndex { get { - float value = pawn?.records?.GetValue(recordDef) ?? 0f; - for (int i = minimumValueforStage.Count - 1; i > 0; i--) + float value = pawn?.records?.GetValue(RecordDef) ?? 0f; + for (int i = MinimumValueforStage.Count - 1; i > 0; i--) { - if (minimumValueforStage[i] < value) return i + 1; + if (MinimumValueforStage[i] < value) return i + 1; } return 0; } diff --git a/RJWSexperience/RJWSexperience/UI/RJWUIUtility.cs b/RJWSexperience/RJWSexperience/UI/RJWUIUtility.cs index 94e219b..70c52b5 100644 --- a/RJWSexperience/RJWSexperience/UI/RJWUIUtility.cs +++ b/RJWSexperience/RJWSexperience/UI/RJWUIUtility.cs @@ -1,35 +1,31 @@ -using System; +using RimWorld; +using rjw; using System.Collections.Generic; using System.Linq; using System.Text; -using System.Threading.Tasks; -using Verse; -using RimWorld; using UnityEngine; -using rjw; - +using Verse; namespace RJWSexperience.UI { - public static class RJWUIUtility + public static class RJWUIUtility { public const float FONTHEIGHT = 22f; public const float CARDHEIGHT = 110f; public const float LISTPAWNSIZE = 100f; public const float BASESAT = 0.40f; public const float ICONSIZE = 30f; - public static void DrawQuirk(this Rect rect, Pawn pawn) - { - List quirks = Quirk.All.FindAll(x => pawn.Has(x)); - string quirkstr = quirks.Select(x => x.Key).ToCommaList(); + { + List quirks = Quirk.All.FindAll(x => pawn.Has(x)); + string quirkstr = quirks.Select(x => x.Key).ToCommaList(); string tooltip = ""; Widgets.Label(rect, "Quirks".Translate() + quirkstr); if (Mouse.IsOver(rect)) - { + { if (quirks.NullOrEmpty()) { tooltip = "NoQuirks".Translate(); @@ -47,52 +43,50 @@ namespace RJWSexperience.UI } Widgets.DrawHighlight(rect); } - + TooltipHandler.TipRegion(rect, tooltip); - } + } public static void DrawSexuality(this Rect rect, CompRJW comp) - { + { if (comp != null) - { + { string sexuality = Keyed.Sexuality[(int)comp.orientation]; Widgets.Label(rect, Keyed.RS_Sexuality + ": " + sexuality); Widgets.DrawHighlightIfMouseover(rect); } - } + } public static string GetRelationsString(this Pawn pawn, Pawn otherpawn) - { + { if (otherpawn != null) - { + { IEnumerable relations = pawn.GetRelations(otherpawn); if (!relations.EnumerableNullOrEmpty()) return relations.Select(x => x.GetGenderSpecificLabel(otherpawn)).ToCommaList().CapitalizeFirst(); - } + } return ""; - } - + } + public static void DrawBorder(this Rect rect, Texture border, float thickness = 1f) - { - GUI.DrawTexture(new Rect(rect.x,rect.y,rect.width, thickness), border); - GUI.DrawTexture(new Rect(rect.x+rect.width-thickness,rect.y, thickness, rect.height), border); - GUI.DrawTexture(new Rect(rect.x,rect.y+rect.height - thickness,rect.width, thickness), border); + { + GUI.DrawTexture(new Rect(rect.x, rect.y, rect.width, thickness), border); + GUI.DrawTexture(new Rect(rect.x + rect.width - thickness, rect.y, thickness, rect.height), border); + GUI.DrawTexture(new Rect(rect.x, rect.y + rect.height - thickness, rect.width, thickness), border); GUI.DrawTexture(new Rect(rect.x, rect.y, thickness, rect.height), border); } public static string GetStatExplanation(Pawn pawn, StatDef stat, float val) - { + { if (!pawn.Dead) - return stat.description + "\n" + - stat.Worker.GetExplanationFull(StatRequest.For(pawn), ToStringNumberSense.Undefined, val); + return stat.description + "\n" + stat.Worker.GetExplanationFull(StatRequest.For(pawn), ToStringNumberSense.Undefined, val); return "Dead".Translate(); - } + } public static string GetSexDays(int absticks, bool printUnknown = false) - { + { if (absticks != 0) return GenDate.ToStringTicksToDays(GenTicks.TicksAbs - absticks) + " " + Keyed.RS_Ago; else if (printUnknown) return Keyed.Unknown; else return ""; } - - } + } }