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

@ -32,20 +32,17 @@ namespace Server {
}
private sealed class WeightedItem {
private int _weight;
private Type _type;
public int Weight { get; }
public int Weight => _weight;
public Type Type => _type;
public Type Type { get; }
public WeightedItem( int weight, Type type ) {
_weight = weight;
_type = type;
Weight = weight;
Type = type;
}
public Item Construct() {
return Activator.CreateInstance( _type ) as Item;
return Activator.CreateInstance( Type ) as Item;
}
}