Changes properties to use automatic property initializers
This commit is contained in:
parent
f0a48ad431
commit
06fa31a7bf
623 changed files with 13072 additions and 19304 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue