C# Класс Server.Items.CraftResources

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GetFromOreInfo ( OreInfo info ) : CraftResource

Returns the CraftResource value which represents 'info' -or- CraftResource.None if unable to convert.

GetFromOreInfo ( OreInfo info, ArmorMaterialType material ) : CraftResource

Returns the CraftResource value which represents 'info', using 'material' to help resolve leather OreInfo instances.

GetFromType ( Type resourceType ) : CraftResource

Returns the CraftResource value for which 'resourceType' uses -or- CraftResource.None if an unregistered type was specified.

GetHue ( CraftResource resource ) : int

Returns the CraftResourceInfo.Hue property of 'resource' -or- 0 if an invalid resource was specified.

GetIndex ( CraftResource resource ) : int

Returns the index of 'resource' in the seriest of resources for which it belongs.

GetInfo ( CraftResource resource ) : CraftResourceInfo

Returns a CraftResourceInfo instance describing 'resource' -or- null if an invalid resource was specified.

GetLocalizationNumber ( CraftResource resource ) : int

Returns the CraftResourceInfo.Number property of 'resource' -or- 0 if an invalid resource was specified.

GetName ( CraftResource resource ) : string

Returns the CraftResourceInfo.Name property of 'resource' -or- an empty string if the resource specified was invalid.

GetStart ( CraftResource resource ) : CraftResource

Returns the first CraftResource in the series of resources for which 'resource' belongs.

GetType ( CraftResource resource ) : CraftResourceType

Returns a CraftResourceType value indiciating the type of 'resource'.

IsStandard ( CraftResource resource ) : bool

Returns true if 'resource' is None, Iron, RegularLeather or RegularWood. False if otherwise.

RegisterType ( Type resourceType, CraftResource resource ) : void

Registers that 'resourceType' uses 'resource' so that it can later be queried by CraftResources.GetFromType

Описание методов

GetFromOreInfo() публичный статический Метод

Returns the CraftResource value which represents 'info' -or- CraftResource.None if unable to convert.
public static GetFromOreInfo ( OreInfo info ) : CraftResource
info OreInfo
Результат CraftResource

GetFromOreInfo() публичный статический Метод

Returns the CraftResource value which represents 'info', using 'material' to help resolve leather OreInfo instances.
public static GetFromOreInfo ( OreInfo info, ArmorMaterialType material ) : CraftResource
info OreInfo
material ArmorMaterialType
Результат CraftResource

GetFromType() публичный статический Метод

Returns the CraftResource value for which 'resourceType' uses -or- CraftResource.None if an unregistered type was specified.
public static GetFromType ( Type resourceType ) : CraftResource
resourceType System.Type
Результат CraftResource

GetHue() публичный статический Метод

Returns the CraftResourceInfo.Hue property of 'resource' -or- 0 if an invalid resource was specified.
public static GetHue ( CraftResource resource ) : int
resource CraftResource
Результат int

GetIndex() публичный статический Метод

Returns the index of 'resource' in the seriest of resources for which it belongs.
public static GetIndex ( CraftResource resource ) : int
resource CraftResource
Результат int

GetInfo() публичный статический Метод

Returns a CraftResourceInfo instance describing 'resource' -or- null if an invalid resource was specified.
public static GetInfo ( CraftResource resource ) : CraftResourceInfo
resource CraftResource
Результат CraftResourceInfo

GetLocalizationNumber() публичный статический Метод

Returns the CraftResourceInfo.Number property of 'resource' -or- 0 if an invalid resource was specified.
public static GetLocalizationNumber ( CraftResource resource ) : int
resource CraftResource
Результат int

GetName() публичный статический Метод

Returns the CraftResourceInfo.Name property of 'resource' -or- an empty string if the resource specified was invalid.
public static GetName ( CraftResource resource ) : string
resource CraftResource
Результат string

GetStart() публичный статический Метод

Returns the first CraftResource in the series of resources for which 'resource' belongs.
public static GetStart ( CraftResource resource ) : CraftResource
resource CraftResource
Результат CraftResource

GetType() публичный статический Метод

Returns a CraftResourceType value indiciating the type of 'resource'.
public static GetType ( CraftResource resource ) : CraftResourceType
resource CraftResource
Результат CraftResourceType

IsStandard() публичный статический Метод

Returns true if 'resource' is None, Iron, RegularLeather or RegularWood. False if otherwise.
public static IsStandard ( CraftResource resource ) : bool
resource CraftResource
Результат bool

RegisterType() публичный статический Метод

Registers that 'resourceType' uses 'resource' so that it can later be queried by CraftResources.GetFromType
public static RegisterType ( Type resourceType, CraftResource resource ) : void
resourceType System.Type
resource CraftResource
Результат void