Add player slot to settings object
This commit is contained in:
@@ -59,6 +59,7 @@
|
||||
}
|
||||
|
||||
internal class IgnoreSettingAttribute : RandomizerSpecificAttribute {
|
||||
public IgnoreSettingAttribute() : base(null) { }
|
||||
public IgnoreSettingAttribute(params RandomizerInstance[] randomizers) : base(randomizers) { }
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var props = typeof(SeedSettings).GetProperties(BindingFlags.Instance | BindingFlags.Public);
|
||||
var starting = new List<string>();
|
||||
foreach (var prop in props) {
|
||||
if (prop.Name == nameof(SeedSettings.PlayerName)) {
|
||||
if (prop.GetCustomAttributes<IgnoreSettingAttribute>().Any(att => att.HasRandomizer(randomizer))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -19,10 +19,6 @@
|
||||
var fi = prop.PropertyType.GetField(valueFieldName, BindingFlags.Static | BindingFlags.Public)
|
||||
?? throw new SettingsLookupException("Could not get field info for value {0}.{1}", prop.PropertyType, valueFieldName);
|
||||
|
||||
if (prop.GetCustomAttributes<IgnoreSettingAttribute>().Any(att => att.HasRandomizer(randomizer))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!prop.GetCustomAttributes<NoSettingNameAttribute>().Any(att => att.HasRandomizer(randomizer))) {
|
||||
var settingName =
|
||||
prop.GetCustomAttributes<SettingNameAttribute>()
|
||||
|
||||
Reference in New Issue
Block a user