Class FactionInfo
[CannotApplyEqualityOperator]
public class FactionInfo : ICloneable, ITranslationArgument, IEquatable<FactionInfo>
- Inheritance
-
FactionInfo
- Implements
- Inherited Members
- Extension Methods
Constructors
FactionInfo()
public FactionInfo()
FactionInfo(string, string, string, string?, Color, uint?, string, string)
public FactionInfo(string factionId, string name, string abbreviation, string? shortName, Color color, uint? unarmedKit, string kitPrefix, string flagImage = "https://i.imgur.com/z0HE5P3.png")
Parameters
factionIdstringnamestringabbreviationstringshortNamestringcolorColorunarmedKituint?kitPrefixstringflagImagestring
FactionInfo(Faction)
public FactionInfo(Faction model)
Parameters
modelFaction
Fields
Admins
public const string Admins = "admins"
Field Value
Canada
public const string Canada = "canada"
Field Value
China
public const string China = "china"
Field Value
FactionAbbreviationMaxCharLimit
public const int FactionAbbreviationMaxCharLimit = 6
Field Value
FactionIDMaxCharLimit
public const int FactionIDMaxCharLimit = 16
Field Value
FactionImageLinkMaxCharLimit
public const int FactionImageLinkMaxCharLimit = 128
Field Value
FactionNameMaxCharLimit
public const int FactionNameMaxCharLimit = 32
Field Value
FactionShortNameMaxCharLimit
public const int FactionShortNameMaxCharLimit = 24
Field Value
FormatAbbreviation
public static readonly SpecialFormat FormatAbbreviation
Field Value
FormatColorAbbreviation
public static readonly SpecialFormat FormatColorAbbreviation
Field Value
FormatColorDisplayName
public static readonly SpecialFormat FormatColorDisplayName
Field Value
FormatColorShortName
public static readonly SpecialFormat FormatColorShortName
Field Value
FormatDisplayName
public static readonly SpecialFormat FormatDisplayName
Field Value
FormatShortName
public static readonly SpecialFormat FormatShortName
Field Value
France
public const string France = "france"
Field Value
Germany
public const string Germany = "germany"
Field Value
Israel
public const string Israel = "israel"
Field Value
LegacyAfrica
[Obsolete("Africa was split into individual countries.")]
public const string LegacyAfrica = "africa"
Field Value
MEC
public const string MEC = "mec"
Field Value
Militia
public const string Militia = "militia"
Field Value
Mozambique
public const string Mozambique = "mozambique"
Field Value
NoFaction
public static readonly FactionInfo NoFaction
Field Value
Poland
public const string Poland = "poland"
Field Value
Russia
public const string Russia = "russia"
Field Value
SouthAfrica
public const string SouthAfrica = "southafrica"
Field Value
Soviet
public const string Soviet = "soviet"
Field Value
USA
public const string USA = "usa"
Field Value
USMC
public const string USMC = "usmc"
Field Value
UnknownTeamImgURL
public const string UnknownTeamImgURL = "https://i.imgur.com/z0HE5P3.png"
Field Value
Properties
Abbreviation
[JsonPropertyName("abbreviation")]
public string Abbreviation { get; set; }
Property Value
AbbreviationTranslations
[JsonPropertyName("abbreviationLocalization")]
public TranslationList AbbreviationTranslations { get; set; }
Property Value
Ammo
[JsonPropertyName("ammoSupplies")]
public IAssetLink<ItemAsset>? Ammo { get; set; }
Property Value
- IAssetLink<ItemAsset>
Backpacks
[JsonPropertyName("backpacks")]
public AssetVariantDictionary<ItemBackpackAsset> Backpacks { get; set; }
Property Value
- AssetVariantDictionary<ItemBackpackAsset>
Build
[JsonPropertyName("buildingSupplies")]
public IAssetLink<ItemAsset>? Build { get; set; }
Property Value
- IAssetLink<ItemAsset>
Color
[JsonPropertyName("color")]
public Color Color { get; set; }
Property Value
- Color
Emoji
[JsonPropertyName("emoji")]
public string? Emoji { get; set; }
Property Value
FOBRadio
[JsonPropertyName("radio")]
public IAssetLink<ItemBarricadeAsset>? FOBRadio { get; set; }
Property Value
- IAssetLink<ItemBarricadeAsset>
FactionId
[JsonPropertyName("factionId")]
public string FactionId { get; set; }
Property Value
FlagImageURL
[JsonPropertyName("flagImg")]
public string FlagImageURL { get; set; }
Property Value
Glasses
[JsonPropertyName("glasses")]
public AssetVariantDictionary<ItemGlassesAsset> Glasses { get; set; }
Property Value
- AssetVariantDictionary<ItemGlassesAsset>
Hats
[JsonPropertyName("hats")]
public AssetVariantDictionary<ItemHatAsset> Hats { get; set; }
Property Value
- AssetVariantDictionary<ItemHatAsset>
IsDefaultFaction
[JsonIgnore]
public bool IsDefaultFaction { get; }
Property Value
KitPrefix
[JsonPropertyName("kitPrefix")]
public string KitPrefix { get; set; }
Property Value
MapTackFlag
[JsonPropertyName("maptackflag")]
public IAssetLink<ItemPlaceableAsset>? MapTackFlag { get; set; }
Property Value
- IAssetLink<ItemPlaceableAsset>
Masks
[JsonPropertyName("masks")]
public AssetVariantDictionary<ItemMaskAsset> Masks { get; set; }
Property Value
- AssetVariantDictionary<ItemMaskAsset>
Name
[JsonPropertyName("displayName")]
public string Name { get; set; }
Property Value
NameTranslations
[JsonPropertyName("nameLocalization")]
public TranslationList NameTranslations { get; set; }
Property Value
Pants
[JsonPropertyName("pants")]
public AssetVariantDictionary<ItemPantsAsset> Pants { get; set; }
Property Value
- AssetVariantDictionary<ItemPantsAsset>
PrimaryKey
[JsonIgnore]
public uint PrimaryKey { get; set; }
Property Value
RallyPoint
[JsonPropertyName("rallyPoint")]
public IAssetLink<ItemBarricadeAsset>? RallyPoint { get; set; }
Property Value
- IAssetLink<ItemBarricadeAsset>
Shirts
[JsonPropertyName("shirts")]
public AssetVariantDictionary<ItemShirtAsset> Shirts { get; set; }
Property Value
- AssetVariantDictionary<ItemShirtAsset>
ShortName
[JsonPropertyName("shortName")]
public string? ShortName { get; set; }
Property Value
ShortNameTranslations
[JsonPropertyName("shortNameLocalization")]
public TranslationList ShortNameTranslations { get; set; }
Property Value
Sprite
[JsonIgnore]
public string Sprite { get; }
Property Value
TMProSpriteIndex
[JsonPropertyName("tmProSpriteIndex")]
public int? TMProSpriteIndex { get; set; }
Property Value
- int?
UnarmedKit
[JsonPropertyName("unarmed")]
public uint? UnarmedKit { get; set; }
Property Value
- uint?
Vests
[JsonPropertyName("vests")]
public AssetVariantDictionary<ItemVestAsset> Vests { get; set; }
Property Value
- AssetVariantDictionary<ItemVestAsset>
Methods
ApplyAssets(Faction)
public void ApplyAssets(Faction model)
Parameters
modelFaction
ApplyTranslations(Faction)
public void ApplyTranslations(Faction model)
Parameters
modelFaction
Clone()
Creates a new object that is a copy of the current instance.
public object Clone()
Returns
- object
A new object that is a copy of this instance.
CloneFrom(FactionInfo)
public void CloneFrom(FactionInfo model)
Parameters
modelFactionInfo
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
Equals(FactionInfo?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(FactionInfo? faction)
Parameters
factionFactionInfo
Returns
GetAbbreviation(LanguageInfo?)
public string GetAbbreviation(LanguageInfo? language)
Parameters
languageLanguageInfo
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
GetName(LanguageInfo?)
public string GetName(LanguageInfo? language)
Parameters
languageLanguageInfo
Returns
GetShortName(LanguageInfo?)
public string GetShortName(LanguageInfo? language)
Parameters
languageLanguageInfo
Returns
NullIfDefault()
public FactionInfo? NullIfDefault()
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Translate(ITranslationValueFormatter, in ValueFormatParameters)
Allows objects to define how they're translated in their own definition instead of creating a value converter.
public string Translate(ITranslationValueFormatter formatter, in ValueFormatParameters parameters)
Parameters
formatterITranslationValueFormatterparametersValueFormatParameters