Add nickname clearing for batch editor

.IsNicknamed=False
results in the species name being applied.
Closes #839
This commit is contained in:
Kurt
2017-02-09 20:52:24 -08:00
parent 2f76d83add
commit fa145ec510

View File

@@ -406,6 +406,8 @@ private static ModifyResult ProcessPKM(PKM PKM, IEnumerable<StringInstruction> F
setRandomIVs(PKM, cmd);
else if (cmd.Random)
ReflectUtil.SetValue(PKM, cmd.PropertyName, cmd.RandomValue);
else if (cmd.PropertyName == nameof(PKM.IsNicknamed) && cmd.PropertyValue.ToLower() == "false")
{ PKM.IsNicknamed = false; PKM.Nickname = PKX.getSpeciesName(PKM.Species, PKM.Language); }
else
ReflectUtil.SetValue(PKM, cmd.PropertyName, cmd.PropertyValue);