Changes properties to use automatic property initializers

This commit is contained in:
Kamron Batman 2018-09-14 15:23:29 -07:00
parent f0a48ad431
commit 06fa31a7bf
623 changed files with 13072 additions and 19304 deletions

View file

@ -2,34 +2,26 @@ namespace Server.Ethics
{
public class EthicDefinition
{
private int m_PrimaryHue;
public int PrimaryHue { get; }
private TextDefinition m_Title;
private TextDefinition m_Adjunct;
public TextDefinition Title { get; }
private TextDefinition m_JoinPhrase;
public TextDefinition Adjunct { get; }
private Power[] m_Powers;
public TextDefinition JoinPhrase { get; }
public int PrimaryHue => m_PrimaryHue;
public TextDefinition Title => m_Title;
public TextDefinition Adjunct => m_Adjunct;
public TextDefinition JoinPhrase => m_JoinPhrase;
public Power[] Powers => m_Powers;
public Power[] Powers { get; }
public EthicDefinition( int primaryHue, TextDefinition title, TextDefinition adjunct, TextDefinition joinPhrase, Power[] powers )
{
m_PrimaryHue = primaryHue;
PrimaryHue = primaryHue;
m_Title = title;
m_Adjunct = adjunct;
Title = title;
Adjunct = adjunct;
m_JoinPhrase = joinPhrase;
JoinPhrase = joinPhrase;
m_Powers = powers;
Powers = powers;
}
}
}

View file

@ -2,25 +2,21 @@ namespace Server.Ethics
{
public class PowerDefinition
{
private int m_Power;
public int Power { get; }
private TextDefinition m_Name;
private TextDefinition m_Phrase;
private TextDefinition m_Description;
public TextDefinition Name { get; }
public int Power => m_Power;
public TextDefinition Phrase { get; }
public TextDefinition Name => m_Name;
public TextDefinition Phrase => m_Phrase;
public TextDefinition Description => m_Description;
public TextDefinition Description { get; }
public PowerDefinition( int power, TextDefinition name, TextDefinition phrase, TextDefinition description )
{
m_Power = power;
Power = power;
m_Name = name;
m_Phrase = phrase;
m_Description = description;
Name = name;
Phrase = phrase;
Description = description;
}
}
}