Barotrauma Client Doc
Barotrauma.Reputation Class Reference

Public Member Functions

void SetReputation (float newReputation)
 
float GetReputationChangeMultiplier (float reputationChange)
 
void AddReputation (float reputationChange, float maxReputationChangePerRound=float.MaxValue)
 
 Reputation (CampaignMetadata metadata, Location location, Identifier identifier, int minReputation, int maxReputation, int initialReputation)
 
 Reputation (CampaignMetadata metadata, Faction faction, int minReputation, int maxReputation, int initialReputation)
 
LocalizedString GetReputationName ()
 
LocalizedString GetFormattedReputationText (bool addColorTags=false)
 

Static Public Member Functions

static LocalizedString GetReputationName (float normalizedValue)
 
static Color GetReputationColor (float normalizedValue)
 
static LocalizedString GetFormattedReputationText (float normalizedValue, float value, bool addColorTags=false)
 

Public Attributes

readonly NamedEvent< ReputationOnReputationValueChanged = new NamedEvent<Reputation>()
 
readonly Faction Faction
 
readonly Location Location
 

Static Public Attributes

const float HostileThreshold = 0.2f
 
const float ReputationLossPerNPCDamage = 0.025f
 
const float ReputationLossPerWallDamage = 0.025f
 
const float ReputationLossPerStolenItemPrice = 0.0025f
 
const float MinReputationLossPerStolenItem = 0.025f
 
const float MaxReputationLossPerStolenItem = 0.5f
 
const float MaxReputationLossFromNPCDamage = 20.0f
 Maximum amount of reputation loss you can get from damaging outpost NPCs per round More...
 
const float MaxReputationLossFromWallDamage = 10.0f
 Maximum amount of reputation loss you can get from damaging outpost walls per round More...
 
static readonly NamedEvent< ReputationOnAnyReputationValueChanged = new NamedEvent<Reputation>()
 

Properties

Identifier Identifier [get]
 
int MinReputation [get]
 
int MaxReputation [get]
 
int InitialReputation [get]
 
CampaignMetadata Metadata [get]
 
float ReputationAtRoundStart [get, set]
 
float NormalizedValue [get]
 Reputation value normalized to the range of 0-1 More...
 
float??????? Value [get]
 

Detailed Description

Definition at line 7 of file Reputation.cs.

Constructor & Destructor Documentation

◆ Reputation() [1/2]

Barotrauma.Reputation.Reputation ( CampaignMetadata  metadata,
Location  location,
Identifier  identifier,
int  minReputation,
int  maxReputation,
int  initialReputation 
)

Definition at line 128 of file Reputation.cs.

◆ Reputation() [2/2]

Barotrauma.Reputation.Reputation ( CampaignMetadata  metadata,
Faction  faction,
int  minReputation,
int  maxReputation,
int  initialReputation 
)

Definition at line 133 of file Reputation.cs.

Member Function Documentation

◆ AddReputation()

void Barotrauma.Reputation.AddReputation ( float  reputationChange,
float  maxReputationChangePerRound = float.MaxValue 
)

Definition at line 95 of file Reputation.cs.

◆ GetFormattedReputationText() [1/2]

LocalizedString Barotrauma.Reputation.GetFormattedReputationText ( bool  addColorTags = false)

Definition at line 199 of file Reputation.cs.

◆ GetFormattedReputationText() [2/2]

static LocalizedString Barotrauma.Reputation.GetFormattedReputationText ( float  normalizedValue,
float  value,
bool  addColorTags = false 
)
static

Definition at line 204 of file Reputation.cs.

◆ GetReputationChangeMultiplier()

float Barotrauma.Reputation.GetReputationChangeMultiplier ( float  reputationChange)

Definition at line 73 of file Reputation.cs.

◆ GetReputationColor()

static Color Barotrauma.Reputation.GetReputationColor ( float  normalizedValue)
static

Definition at line 179 of file Reputation.cs.

◆ GetReputationName() [1/2]

LocalizedString Barotrauma.Reputation.GetReputationName ( )

Definition at line 152 of file Reputation.cs.

◆ GetReputationName() [2/2]

static LocalizedString Barotrauma.Reputation.GetReputationName ( float  normalizedValue)
static

Definition at line 157 of file Reputation.cs.

◆ SetReputation()

void Barotrauma.Reputation.SetReputation ( float  newReputation)

Definition at line 68 of file Reputation.cs.

Member Data Documentation

◆ Faction

readonly Faction Barotrauma.Reputation.Faction

Definition at line 124 of file Reputation.cs.

◆ HostileThreshold

const float Barotrauma.Reputation.HostileThreshold = 0.2f
static

Definition at line 9 of file Reputation.cs.

◆ Location

readonly Location Barotrauma.Reputation.Location

Definition at line 125 of file Reputation.cs.

◆ MaxReputationLossFromNPCDamage

const float Barotrauma.Reputation.MaxReputationLossFromNPCDamage = 20.0f
static

Maximum amount of reputation loss you can get from damaging outpost NPCs per round

Definition at line 19 of file Reputation.cs.

◆ MaxReputationLossFromWallDamage

const float Barotrauma.Reputation.MaxReputationLossFromWallDamage = 10.0f
static

Maximum amount of reputation loss you can get from damaging outpost walls per round

Definition at line 23 of file Reputation.cs.

◆ MaxReputationLossPerStolenItem

const float Barotrauma.Reputation.MaxReputationLossPerStolenItem = 0.5f
static

Definition at line 14 of file Reputation.cs.

◆ MinReputationLossPerStolenItem

const float Barotrauma.Reputation.MinReputationLossPerStolenItem = 0.025f
static

Definition at line 13 of file Reputation.cs.

◆ OnAnyReputationValueChanged

readonly NamedEvent<Reputation> Barotrauma.Reputation.OnAnyReputationValueChanged = new NamedEvent<Reputation>()
static

Definition at line 122 of file Reputation.cs.

◆ OnReputationValueChanged

readonly NamedEvent<Reputation> Barotrauma.Reputation.OnReputationValueChanged = new NamedEvent<Reputation>()

Definition at line 121 of file Reputation.cs.

◆ ReputationLossPerNPCDamage

const float Barotrauma.Reputation.ReputationLossPerNPCDamage = 0.025f
static

Definition at line 10 of file Reputation.cs.

◆ ReputationLossPerStolenItemPrice

const float Barotrauma.Reputation.ReputationLossPerStolenItemPrice = 0.0025f
static

Definition at line 12 of file Reputation.cs.

◆ ReputationLossPerWallDamage

const float Barotrauma.Reputation.ReputationLossPerWallDamage = 0.025f
static

Definition at line 11 of file Reputation.cs.

Property Documentation

◆ Identifier

Identifier Barotrauma.Reputation.Identifier
get

Definition at line 25 of file Reputation.cs.

◆ InitialReputation

int Barotrauma.Reputation.InitialReputation
get

Definition at line 28 of file Reputation.cs.

◆ MaxReputation

int Barotrauma.Reputation.MaxReputation
get

Definition at line 27 of file Reputation.cs.

◆ Metadata

CampaignMetadata Barotrauma.Reputation.Metadata
get

Definition at line 29 of file Reputation.cs.

◆ MinReputation

int Barotrauma.Reputation.MinReputation
get

Definition at line 26 of file Reputation.cs.

◆ NormalizedValue

float Barotrauma.Reputation.NormalizedValue
get

Reputation value normalized to the range of 0-1

Definition at line 38 of file Reputation.cs.

◆ ReputationAtRoundStart

float Barotrauma.Reputation.ReputationAtRoundStart
getset

Definition at line 31 of file Reputation.cs.

◆ Value

float??????? Barotrauma.Reputation.Value
get

Definition at line 43 of file Reputation.cs.