mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
- Changed addExtrinsicKeyword in Card.java, this means many keywords will stack (did this to fix Sidewinder Sliver).
- The "30 second per action" slowdown bug turned out to be due to caching, for now I disabled this: the game should run much smoother now... I do not know whether this will help with heap space problems or not.
This commit is contained in:
@@ -979,14 +979,14 @@ public class Card extends MyObservable
|
||||
public ArrayList<String> getExtrinsicKeyword() {return new ArrayList<String>(extrinsicKeyword);}
|
||||
public void setExtrinsicKeyword(ArrayList<String> a) {extrinsicKeyword = new ArrayList<String>(a); this.updateObservers();}
|
||||
public void addExtrinsicKeyword(String s) {
|
||||
if(!getKeyword().contains(s)){
|
||||
//if(!getKeyword().contains(s)){
|
||||
if (s.startsWith("tap: add")) manaAbility.add(new Ability_Mana(this, s)
|
||||
{
|
||||
private static final long serialVersionUID = 221124403788942412L;
|
||||
});
|
||||
else extrinsicKeyword.add(s);
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
public void removeExtrinsicKeyword(String s) {extrinsicKeyword.remove(s); this.updateObservers();}
|
||||
public int getExtrinsicKeywordSize() {return extrinsicKeyword.size(); }
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import java.awt.Image;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
//import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
@@ -86,6 +86,8 @@ public class ImageCache implements NewConstants {
|
||||
* Put to cache.
|
||||
*/
|
||||
|
||||
//currently doesn't work:
|
||||
/*
|
||||
if (cache.size() >= 35) {
|
||||
int count = 10;
|
||||
ArrayList<String> imgNames = new ArrayList<String>(count);
|
||||
@@ -98,6 +100,7 @@ public class ImageCache implements NewConstants {
|
||||
for (String imgName : imgNames)
|
||||
cache.remove(imgName);
|
||||
}
|
||||
*/
|
||||
|
||||
cache.put(name, resized);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user