Barotrauma Client Doc
Barotrauma.PriceInfo Class Reference

Public Member Functions

 PriceInfo (XElement element)
 Support for the old style of determining item prices when there were individual Price elements for each location type where the item was for sale. More...
 
 PriceInfo (int price, bool canBeBought, int minAmount=0, int maxAmount=0, bool canBeSpecial=true, int minLevelDifficulty=0, float buyingPriceMultiplier=1f, bool displayNonEmpty=false, bool requiresUnlock=false, string storeIdentifier=null)
 

Static Public Member Functions

static List< PriceInfoCreatePriceInfos (XElement element, out PriceInfo defaultPrice)
 

Static Public Attributes

const int DefaultAmount = 5
 Used when both MinAvailableAmount and MaxAvailableAmount are set to 0. More...
 

Properties

int Price [get]
 
bool CanBeBought [get]
 
int MinAvailableAmount [get]
 
int MaxAvailableAmount [get]
 
bool CanBeSpecial [get]
 Can the item be a Daily Special or a Requested Good More...
 
int MinLevelDifficulty [get]
 The item isn't available in stores unless the level's difficulty is above this value More...
 
float BuyingPriceMultiplier = 1f [get]
 The cost of item when sold by the store. Higher modifier means the item costs more to buy from the store. More...
 
bool DisplayNonEmpty = false [get]
 
Identifier StoreIdentifier [get]
 
bool RequiresUnlock [get]
 
IReadOnlyDictionary< Identifier, float > MinReputation [get]
 Minimum reputation needed to buy the item (Key = faction ID, Value = min rep) More...
 

Detailed Description

Definition at line 7 of file PriceInfo.cs.

Constructor & Destructor Documentation

◆ PriceInfo() [1/2]

Barotrauma.PriceInfo.PriceInfo ( XElement  element)

Support for the old style of determining item prices when there were individual Price elements for each location type where the item was for sale.

Definition at line 49 of file PriceInfo.cs.

◆ PriceInfo() [2/2]

Barotrauma.PriceInfo.PriceInfo ( int  price,
bool  canBeBought,
int  minAmount = 0,
int  maxAmount = 0,
bool  canBeSpecial = true,
int  minLevelDifficulty = 0,
float  buyingPriceMultiplier = 1f,
bool  displayNonEmpty = false,
bool  requiresUnlock = false,
string  storeIdentifier = null 
)

Definition at line 63 of file PriceInfo.cs.

Member Function Documentation

◆ CreatePriceInfos()

static List<PriceInfo> Barotrauma.PriceInfo.CreatePriceInfos ( XElement  element,
out PriceInfo  defaultPrice 
)
static

Definition at line 93 of file PriceInfo.cs.

Member Data Documentation

◆ DefaultAmount

const int Barotrauma.PriceInfo.DefaultAmount = 5
static

Used when both MinAvailableAmount and MaxAvailableAmount are set to 0.

Definition at line 35 of file PriceInfo.cs.

Property Documentation

◆ BuyingPriceMultiplier

float Barotrauma.PriceInfo.BuyingPriceMultiplier = 1f
get

The cost of item when sold by the store. Higher modifier means the item costs more to buy from the store.

Definition at line 26 of file PriceInfo.cs.

◆ CanBeBought

bool Barotrauma.PriceInfo.CanBeBought
get

Definition at line 10 of file PriceInfo.cs.

◆ CanBeSpecial

bool Barotrauma.PriceInfo.CanBeSpecial
get

Can the item be a Daily Special or a Requested Good

Definition at line 18 of file PriceInfo.cs.

◆ DisplayNonEmpty

bool Barotrauma.PriceInfo.DisplayNonEmpty = false
get

Definition at line 27 of file PriceInfo.cs.

◆ MaxAvailableAmount

int Barotrauma.PriceInfo.MaxAvailableAmount
get

Definition at line 14 of file PriceInfo.cs.

◆ MinAvailableAmount

int Barotrauma.PriceInfo.MinAvailableAmount
get

Definition at line 12 of file PriceInfo.cs.

◆ MinLevelDifficulty

int Barotrauma.PriceInfo.MinLevelDifficulty
get

The item isn't available in stores unless the level's difficulty is above this value

Definition at line 22 of file PriceInfo.cs.

◆ MinReputation

IReadOnlyDictionary<Identifier, float> Barotrauma.PriceInfo.MinReputation
get

Minimum reputation needed to buy the item (Key = faction ID, Value = min rep)

Definition at line 42 of file PriceInfo.cs.

◆ Price

int Barotrauma.PriceInfo.Price
get

Definition at line 9 of file PriceInfo.cs.

◆ RequiresUnlock

bool Barotrauma.PriceInfo.RequiresUnlock
get

Definition at line 30 of file PriceInfo.cs.

◆ StoreIdentifier

Identifier Barotrauma.PriceInfo.StoreIdentifier
get

Definition at line 28 of file PriceInfo.cs.