Exemple #1
0
        public static int GetHashCode(StorytellerCompPropertiesStats s)
        {
            StringBuilder sb = new StringBuilder(GetLabel(s));

            s.allowedTargetTags?.ForEach(v => sb.Append(v.defName));
            return(sb.ToString().GetHashCode());
        }
Exemple #2
0
        public static string GetLabel(StorytellerCompPropertiesStats s)
        {
            StringBuilder       sb = new StringBuilder(GetType(s.compClass).ToString());
            IncidentCategoryDef cd = s.category?.Def;
            IncidentDef         id = s.incident?.Def;

            if (cd != null)
            {
                sb.Append(" - ");
                sb.Append(Util.GetLabel(cd));
            }
            if (id != null)
            {
                sb.Append(" - ");
                sb.Append(Util.GetLabel(id));
            }
            return(sb.ToString());
        }