StockResourceNamesGetResourceAbbreviation Method (Int32, Boolean) |
Returns a user friendly name of the resource bsort name (abbreviation).
Namespace:
KSPDev.ResourceUtils
Assembly:
KSPDev_Utils.1.2 (in KSPDev_Utils.1.2.dll) Version: 1.2 for KSP v1.6+
Syntaxpublic static string GetResourceAbbreviation(
int resourceId,
bool removeLingoonaTags = true
)
Request Example
View SourceParameters
- resourceId
- Type: SystemInt32
The resource ID. - removeLingoonaTags (Optional)
- Type: SystemBoolean
Specifies if any Lingoona tags on the name must be removed. Keep it default if the name is
intended to be used 'as-is". If the name is to be used as a parameter to localizable phrase,
then the tags should be kept.
Return Value
Type:
StringA user friendly string that identifies the resource.
Remarks
If the abbreviation is not set for the resource, then the first 3 letters of its display name
are returned. This could be a rather expensive call. Cach the result if the timing is
critical.
See Also