mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-09 12:35:20 -05:00
Condense some more expressions
This commit is contained in:
parent
080f6f827d
commit
fb008be6a6
|
|
@ -126,11 +126,11 @@ private static bool IsDeferredSlot(EncounterSlotGO slot, PKM pk)
|
|||
|
||||
return slot.Species switch
|
||||
{
|
||||
(int) Core.Species.Yamask when pk.Species != slot.Species && slot.Form == 1 && pk is IFormArgument f => f.FormArgument == 0,
|
||||
(int) Core.Species.Milcery when pk.Species != slot.Species && pk is IFormArgument f => f.FormArgument == 0,
|
||||
(int) Core.Species.Yamask when pk.Species != slot.Species && slot.Form == 1 => pk is IFormArgument {FormArgument: 0},
|
||||
(int) Core.Species.Milcery when pk.Species != slot.Species => pk is IFormArgument {FormArgument: 0},
|
||||
|
||||
(int) Core.Species.Runerigus when pk is IFormArgument f && f.FormArgument != 0 => true,
|
||||
(int) Core.Species.Alcremie when pk is IFormArgument f && f.FormArgument != 0 => true,
|
||||
(int) Core.Species.Runerigus => pk is IFormArgument {FormArgument: not 0},
|
||||
(int) Core.Species.Alcremie => pk is IFormArgument {FormArgument: not 0},
|
||||
|
||||
_ => false,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1892,7 +1892,7 @@ private void LoadShowdownSetDefault(IBattleTemplate Set)
|
|||
|
||||
private void CB_BattleVersion_SelectedValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
PB_BattleVersion.Image = GetMarkSprite(PB_BattleVersion, Entity is IBattleVersion b && b.BattleVersion != 0);
|
||||
PB_BattleVersion.Image = GetMarkSprite(PB_BattleVersion, Entity is IBattleVersion {BattleVersion: not 0});
|
||||
}
|
||||
|
||||
private static Image GetMarkSprite(PictureBox p, bool opaque, double trans = 0.175)
|
||||
|
|
@ -1976,7 +1976,7 @@ private void PopulateFilteredDataSources(ITrainerInfo sav, bool force = false)
|
|||
|
||||
var game = source.Games;
|
||||
var gamesWith0 = new List<ComboItem>(1 + game.Count) {GameInfo.Sources.Empty};
|
||||
gamesWith0.AddRange(lang);
|
||||
gamesWith0.AddRange(game);
|
||||
SetIfDifferentCount(gamesWith0, CB_BattleVersion, force);
|
||||
}
|
||||
SetIfDifferentCount(source.Species, CB_Species, force);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user