Scripts/Misc/ResourceInfo.cs
/// <summary>
/// Returns the <see cref="CraftResource"/> value which represents '<paramref name="info"/>' -or- CraftResource.None if unable to convert.
/// </summary>
Returns the  value which represents '' -or- CraftResource.None if unable to convert.
Returns the value which represents ' ' - or - CraftResource . None if unable to convert .
public static CraftResource GetFromOreInfo(OreInfo info)
        {
            if (info.Name.IndexOf("Spined") >= 0)
                return CraftResource.SpinedLeather;
            else if (info.Name.IndexOf("Horned") >= 0)
                return CraftResource.HornedLeather;
            else if (info.Name.IndexOf("Barbed") >= 0)
                return CraftResource.BarbedLeather;
            else if (info.Name.IndexOf("Leather") >= 0)
                return CraftResource.RegularLeather;
            else if (info.Name.IndexOf("Daemon") >= 0)
                return CraftResource.DaemonLeather;
            if (info.Level == 0)
                return CraftResource.MIron;
            else if (info.Level == 1)
                return CraftResource.MBronze;
            else if (info.Level == 2)
                return CraftResource.MGold;
            else if (info.Level == 3)
                return CraftResource.MCopper;
            else if (info.Level == 4)
                return CraftResource.MOldcopper;
            else if (info.Level == 5)
                return CraftResource.MDullcopper;
            else if (info.Level == 6)
                return CraftResource.MSilver;
            else if (info.Level == 7)
                return CraftResource.MShadow;
            else if (info.Level == 8)
                return CraftResource.MBloodrock;
            else if (info.Level == 9)
                return CraftResource.MBlackrock;
            else if (info.Level == 10)
                return CraftResource.MMytheril;
            else if (info.Level == 11)
                return CraftResource.MRose;
            else if (info.Level == 12)
                return CraftResource.MVerite;
            else if (info.Level == 13)
                return CraftResource.MAgapite;
            else if (info.Level == 14)
                return CraftResource.MRusty;
            else if (info.Level == 15)
                return CraftResource.MValorite;
            else if (info.Level == 16)
                return CraftResource.MDragon;
            else if (info.Level == 17)
                return CraftResource.MTitan;
            else if (info.Level == 18)
                return CraftResource.MCrystaline;
            else if (info.Level == 19)
                return CraftResource.MKrynite;
            else if (info.Level == 20)
                return CraftResource.MVulcan;
            else if (info.Level == 21)
                return CraftResource.MBloodcrest;
            else if (info.Level == 22)
                return CraftResource.MElvin;
            else if (info.Level == 23)
                return CraftResource.MAcid;
            else if (info.Level == 24)
                return CraftResource.MAqua;
            else if (info.Level == 25)
                return CraftResource.MEldar;
            else if (info.Level == 26)
                return CraftResource.MGlowing;
            else if (info.Level == 27)
                return CraftResource.MGorgan;
            else if (info.Level == 28)
                return CraftResource.MSandrock;
            else if (info.Level == 29)
                return CraftResource.MSteel;
            return CraftResource.None;
        }
public static CraftResource GetFromOreInfo ( OreInfo info ) { if ( info . Name . IndexOf ( " " ) >= 0 ) return CraftResource . SpinedLeather ; else if ( info . Name . IndexOf ( " " ) >= 0 ) return CraftResource . HornedLeather ; else if ( info . Name . IndexOf ( " " ) >= 0 ) return CraftResource . BarbedLeather ; else if ( info . Name . IndexOf ( " " ) >= 0 ) return CraftResource . RegularLeather ; else if ( info . Name . IndexOf ( " " ) >= 0 ) return CraftResource . DaemonLeather ; if ( info . Level == 0 ) return CraftResource . MIron ; else if ( info . Level == 1 ) return CraftResource . MBronze ; else if ( info . Level == 2 ) return CraftResource . MGold ; else if ( info . Level == 3 ) return CraftResource . MCopper ; else if ( info . Level == 4 ) return CraftResource . MOldcopper ; else if ( info . Level == 5 ) return CraftResource . MDullcopper ; else if ( info . Level == 6 ) return CraftResource . MSilver ; else if ( info . Level == 7 ) return CraftResource . MShadow ; else if ( info . Level == 8 ) return CraftResource . MBloodrock ; else if ( info . Level == 9 ) return CraftResource . MBlackrock ; else if ( info . Level == 10 ) return CraftResource . MMytheril ; else if ( info . Level == 11 ) return CraftResource . MRose ; else if ( info . Level == 12 ) return CraftResource . MVerite ; else if ( info . Level == 13 ) return CraftResource . MAgapite ; else if ( info . Level == 14 ) return CraftResource . MRusty ; else if ( info . Level == 15 ) return CraftResource . MValorite ; else if ( info . Level == 16 ) return CraftResource . MDragon ; else if ( info . Level == 17 ) return CraftResource . MTitan ; else if ( info . Level == 18 ) return CraftResource . MCrystaline ; else if ( info . Level == 19 ) return CraftResource . MKrynite ; else if ( info . Level == 20 ) return CraftResource . MVulcan ; else if ( info . Level == 21 ) return CraftResource . MBloodcrest ; else if ( info . Level == 22 ) return CraftResource . MElvin ; else if ( info . Level == 23 ) return CraftResource . MAcid ; else if ( info . Level == 24 ) return CraftResource . MAqua ; else if ( info . Level == 25 ) return CraftResource . MEldar ; else if ( info . Level == 26 ) return CraftResource . MGlowing ; else if ( info . Level == 27 ) return CraftResource . MGorgan ; else if ( info . Level == 28 ) return CraftResource . MSandrock ; else if ( info . Level == 29 ) return CraftResource . MSteel ; return CraftResource . None ; }
Returns the  value which represents '' -or- CraftResource.None if unable to convert.
Returns the value which represents ' ' - or - CraftResource . None if unable to convert .
info
OreInfo