* Performance: memory usage optimization for deck editor (removed bloated usage of ManaCosts -> ManaColor objects, see #7515);

This commit is contained in:
Oleg Agafonov 2021-02-12 14:08:17 +04:00
parent c3d55ea12a
commit 275e996c08
23 changed files with 170 additions and 143 deletions

View file

@ -44,8 +44,8 @@ public class StackAbilityView extends CardView {
this.subTypes = ability.getSubtype(game);
this.superTypes = ability.getSuperType();
this.color = ability.getColor(game);
this.manaCostLeft = ability.getManaCost().getSymbols();
this.manaCostRight = new ArrayList<>();
this.manaCostLeftStr = String.join("", ability.getManaCost().getSymbols());
this.manaCostRightStr = "";
this.cardTypes = ability.getCardType();
this.subTypes = ability.getSubtype(game);
this.superTypes = ability.getSuperType();
@ -60,8 +60,8 @@ public class StackAbilityView extends CardView {
tmpSourceCard.subTypes.clear();
tmpSourceCard.cardTypes.clear();
tmpSourceCard.cardTypes.add(CardType.CREATURE);
tmpSourceCard.manaCostLeft.clear();
tmpSourceCard.manaCostRight.clear();
tmpSourceCard.manaCostLeftStr = "";
tmpSourceCard.manaCostRightStr = "";
tmpSourceCard.power = "2";
tmpSourceCard.toughness = "2";
nameToShow = "creature without name";