Table of Contents

Class FactionInfo

Namespace
Uncreated.Warfare.Teams
Assembly
Uncreated.Warfare.dll
[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

factionId string
name string
abbreviation string
shortName string
color Color
unarmedKit uint?
kitPrefix string
flagImage string

FactionInfo(Faction)

public FactionInfo(Faction model)

Parameters

model Faction

Fields

Admins

public const string Admins = "admins"

Field Value

string

Canada

public const string Canada = "canada"

Field Value

string

China

public const string China = "china"

Field Value

string

FactionAbbreviationMaxCharLimit

public const int FactionAbbreviationMaxCharLimit = 6

Field Value

int

FactionIDMaxCharLimit

public const int FactionIDMaxCharLimit = 16

Field Value

int

FactionImageLinkMaxCharLimit

public const int FactionImageLinkMaxCharLimit = 128

Field Value

int

FactionNameMaxCharLimit

public const int FactionNameMaxCharLimit = 32

Field Value

int

FactionShortNameMaxCharLimit

public const int FactionShortNameMaxCharLimit = 24

Field Value

int

FormatAbbreviation

public static readonly SpecialFormat FormatAbbreviation

Field Value

SpecialFormat

FormatColorAbbreviation

public static readonly SpecialFormat FormatColorAbbreviation

Field Value

SpecialFormat

FormatColorDisplayName

public static readonly SpecialFormat FormatColorDisplayName

Field Value

SpecialFormat

FormatColorShortName

public static readonly SpecialFormat FormatColorShortName

Field Value

SpecialFormat

FormatDisplayName

public static readonly SpecialFormat FormatDisplayName

Field Value

SpecialFormat

FormatShortName

public static readonly SpecialFormat FormatShortName

Field Value

SpecialFormat

France

public const string France = "france"

Field Value

string

Germany

public const string Germany = "germany"

Field Value

string

Israel

public const string Israel = "israel"

Field Value

string

LegacyAfrica

[Obsolete("Africa was split into individual countries.")]
public const string LegacyAfrica = "africa"

Field Value

string

MEC

public const string MEC = "mec"

Field Value

string

Militia

public const string Militia = "militia"

Field Value

string

Mozambique

public const string Mozambique = "mozambique"

Field Value

string

NoFaction

public static readonly FactionInfo NoFaction

Field Value

FactionInfo

Poland

public const string Poland = "poland"

Field Value

string

Russia

public const string Russia = "russia"

Field Value

string

SouthAfrica

public const string SouthAfrica = "southafrica"

Field Value

string

Soviet

public const string Soviet = "soviet"

Field Value

string

USA

public const string USA = "usa"

Field Value

string

USMC

public const string USMC = "usmc"

Field Value

string

UnknownTeamImgURL

public const string UnknownTeamImgURL = "https://i.imgur.com/z0HE5P3.png"

Field Value

string

Properties

Abbreviation

[JsonPropertyName("abbreviation")]
public string Abbreviation { get; set; }

Property Value

string

AbbreviationTranslations

[JsonPropertyName("abbreviationLocalization")]
public TranslationList AbbreviationTranslations { get; set; }

Property Value

TranslationList

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

string

FOBRadio

[JsonPropertyName("radio")]
public IAssetLink<ItemBarricadeAsset>? FOBRadio { get; set; }

Property Value

IAssetLink<ItemBarricadeAsset>

FactionId

[JsonPropertyName("factionId")]
public string FactionId { get; set; }

Property Value

string

FlagImageURL

[JsonPropertyName("flagImg")]
public string FlagImageURL { get; set; }

Property Value

string

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

bool

KitPrefix

[JsonPropertyName("kitPrefix")]
public string KitPrefix { get; set; }

Property Value

string

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

string

NameTranslations

[JsonPropertyName("nameLocalization")]
public TranslationList NameTranslations { get; set; }

Property Value

TranslationList

Pants

[JsonPropertyName("pants")]
public AssetVariantDictionary<ItemPantsAsset> Pants { get; set; }

Property Value

AssetVariantDictionary<ItemPantsAsset>

PrimaryKey

[JsonIgnore]
public uint PrimaryKey { get; set; }

Property Value

uint

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

string

ShortNameTranslations

[JsonPropertyName("shortNameLocalization")]
public TranslationList ShortNameTranslations { get; set; }

Property Value

TranslationList

Sprite

[JsonIgnore]
public string Sprite { get; }

Property Value

string

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

model Faction

ApplyTranslations(Faction)

public void ApplyTranslations(Faction model)

Parameters

model Faction

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

model FactionInfo

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Equals(FactionInfo?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(FactionInfo? faction)

Parameters

faction FactionInfo

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetAbbreviation(LanguageInfo?)

public string GetAbbreviation(LanguageInfo? language)

Parameters

language LanguageInfo

Returns

string

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

language LanguageInfo

Returns

string

GetShortName(LanguageInfo?)

public string GetShortName(LanguageInfo? language)

Parameters

language LanguageInfo

Returns

string

NullIfDefault()

public FactionInfo? NullIfDefault()

Returns

FactionInfo

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

formatter ITranslationValueFormatter
parameters ValueFormatParameters

Returns

string