Class LoadoutIdHelper
Helper functions for formatting and parsing loadout IDs.
public static class LoadoutIdHelper
- Inheritance
-
LoadoutIdHelper
- Inherited Members
Remarks
Loadout IDs are formatted with the following layout: Steam64_letters 7650000000000000_abc
Methods
GetLoadoutDefaultKitDisplayText(int)
Get a consistant display string for the default sign text of a loadout.
public static string GetLoadoutDefaultKitDisplayText(int loadoutId)
Parameters
loadoutIdint
Returns
GetLoadoutLetter(int)
Gets the letters of a loadout ID as a string.
public static string GetLoadoutLetter(int id)
Parameters
idint
Returns
Remarks
Indexed from 1.
GetLoadoutName(CSteamID, int)
Gets the full loadout ID for a as a string.
public static string GetLoadoutName(CSteamID player, int id)
Parameters
playerCSteamIDidint
Returns
Remarks
Indexed from 1.
GetLoadoutSignDisplayText(int)
Get a consistant display string for 'kit not found' when the kit is a target sign.
public static string GetLoadoutSignDisplayText(int signDataLoadoutNumber)
Parameters
signDataLoadoutNumberint
Returns
Parse(ReadOnlySpan<char>)
Parses the number and at the end of the loadout ID.
public static int Parse(ReadOnlySpan<char> kitId)
Parameters
kitIdReadOnlySpan<char>
Returns
- int
-1 if operation results in an overflow, the string is too short, or invalid characters are found, otherwise, the id of the loadout.
Parse(ReadOnlySpan<char>, out CSteamID)
Parses the number and at the end of the loadout ID and the player ID at the beginning.
public static int Parse(ReadOnlySpan<char> kitId, out CSteamID player)
Parameters
kitIdReadOnlySpan<char>playerCSteamID
Returns
- int
-1 if operation results in an overflow, the string is too short, or invalid characters are found, otherwise, the id of the loadout.
ParseNumber(ReadOnlySpan<char>)
Parses a excel column header style number into an integer. Note that chars should only be the section with the letters.
public static int ParseNumber(ReadOnlySpan<char> chars)
Parameters
charsReadOnlySpan<char>
Returns
- int
-1 if operation results in an overflow or invalid characters are found, otherwise, the id of the loadout.
Remarks
Indexed from 1.