Added method for accessing gem attribute selected flag

This commit is contained in:
Collin Smith
2020-09-06 00:18:03 -07:00
parent 49f293c494
commit 6f86f4048c

View File

@ -7,17 +7,23 @@ public class GemAttributes extends AggregateAttributes {
private static final Logger log = LogManager.getLogger(GemAttributes.class);
int selected = -1;
int flags = StatListFlags.FLAG_NONE;
public int selectedList() {
return selected;
}
public int selectedFlags() {
return flags;
}
public void select(int selected) {
if (this.selected >= 0 && selected != this.selected) {
log.warn("this.selected({}) already set", this.selected);
}
this.selected = selected;
this.flags = 1 << selected;
}
public StatListGetter selected() {