CompletelyOptional/OptionInterface_DataAPI.cs
/// <summary>
/// Reverse helper for getting the slugcat of a given text name
/// </summary>
Reverse helper for getting the slugcat of a given text name
Reverse helper for getting the slugcat of a given text name
public static int GetSlugcatOfName(string name)
        {
            if (string.IsNullOrEmpty(name)) return -1;
            if (name == "White") return 0;
            if (name == "Yellow") return 1;
            if (name == "Red") return 2;
            if (OptionScript.SlugBaseExists && IsSlugBaseName(name)) { return GetSlugBaseSlugcatOfName(name); }
            return (int)Enum.Parse(typeof(SlugcatStats.Name), name);
        }
public static int GetSlugcatOfName ( string name ) { if ( string . IsNullOrEmpty ( name ) ) return - 1 ; if ( name == " " ) return 0 ; if ( name == " " ) return 1 ; if ( name == " " ) return 2 ; if ( OptionScript . SlugBaseExists && IsSlugBaseName ( name ) ) { return GetSlugBaseSlugcatOfName ( name ) ; } return ( int ) Enum . Parse ( typeof ( SlugcatStats . Name ) , name ) ; }
Reverse helper for getting the slugcat of a given text name
Reverse helper for getting the slugcat of a given text name
// I tried to keep the same order as GetSlugcatName but...
name
string