Added import loading to Orb

This commit is contained in:
Francesco Macagno 2015-08-23 14:49:12 -07:00
parent f22eeaea53
commit 5abfa54809

View file

@ -11,8 +11,8 @@ import org.w3c.dom.NodeList;
import cr0s.warpdrive.WarpDrive;
import cr0s.warpdrive.conf.InvalidXmlException;
import cr0s.warpdrive.conf.MetaBlock;
import cr0s.warpdrive.conf.XmlRepresentable;
import cr0s.warpdrive.conf.filler.FillerManager;
import cr0s.warpdrive.conf.filler.FillerSet;
import cr0s.warpdrive.world.EntitySphereGen;
@ -125,6 +125,13 @@ public abstract class Orb extends DeployableStructure implements XmlRepresentabl
super.loadFromXmlElement(e);
if (e.hasAttribute("fillerSets")) {
String[] imports = e.getAttribute("fillerSets").split(",");
for (String imp : imports) {
super.loadFrom(FillerManager.getFillerSet(imp));
}
}
thickness = Integer.parseInt(e.getAttribute("thicknessMin"));
//TODO: Implement random thickness