use of main.content.enums.entity.SkillEnums.MASTERY in project Eidolons by IDemiurge.
the class UnitLevelManager method getRandomParameter.
private PARAMETER getRandomParameter(boolean attrs, Entity newType) {
PARAMETER param;
if (attrs) {
ATTRIBUTE a = new RandomWizard<ATTRIBUTE>().getObjectByWeight(newType.getProperty(PROPS.ATTRIBUTE_PROGRESSION), ATTRIBUTE.class);
param = ContentManager.getBaseAttribute(ContentManager.getPARAM(a.toString()));
} else {
MASTERY mstr = new RandomWizard<MASTERY>().getObjectByWeight(newType.getProperty(PROPS.MASTERY_PROGRESSION), MASTERY.class);
if (mstr == null) {
return null;
}
// TODO complete the ENUM!!!
param = ContentManager.getPARAM(mstr.toString());
if (param == null) {
param = ContentManager.findPARAM(mstr.toString());
}
}
return param;
}
use of main.content.enums.entity.SkillEnums.MASTERY in project Eidolons by IDemiurge.
the class TreeControlPanel method handleControl.
public void handleControl(TREE_CONTROLS c, boolean alt) {
ObjType selectedType = view.getTree().getSelectedType();
switch(c) {
case TEST:
AutoTestMaster.testType(selectedType);
break;
case WS_CYCLE:
workspaceCycle(alt);
break;
case WS_TOGGLE:
if (alt) {
if (view instanceof SkillTreeView) {
SkillTreeView skillTreeView = (SkillTreeView) view;
String enums = new ListChooser(SELECTION_MODE.MULTIPLE, MASTERY.class).choose();
if (StringMaster.isEmpty(enums)) {
return;
}
List<MASTERY> list = new EnumMaster<MASTERY>().getEnumList(MASTERY.class, enums);
skillTreeView.setWorkspace(list.toArray(new MASTERY[list.size()]));
view.setWorkspaceMode(true);
view.refresh();
return;
}
}
view.setWorkspaceMode(!view.isWorkspaceMode());
view.refresh();
break;
case LINK:
view.adjustLink(null, HC_Master.getSelectedTreeNode());
break;
// break;
case OFFSET_X:
view.adjustOffset(alt, true, HC_Master.getSelectedTreeNode());
break;
case OFFSET_Y:
view.adjustOffset(alt, false, HC_Master.getSelectedTreeNode());
break;
case REBUILD:
view.rebuildAndSetTree();
break;
case ALT_BASE:
if (alt) {
view.editAltBaseLink(selectedType);
break;
}
view.addAltBase(selectedType);
break;
case SET:
setProp(alt, selectedType);
view.rebuildAndSetTree();
break;
default:
break;
}
}
Aggregations