custom attributes added to loot scripts

loot scripts can now have custom attribute arrays for better
customization of drops
This commit is contained in:
CharonInferar
2014-06-05 15:20:28 +02:00
parent a4302bc25e
commit 9e1d19d525
4 changed files with 75 additions and 56 deletions
+16 -12
View File
@@ -192,27 +192,31 @@ public class TerrainService {
boolean loaded = config.loadConfigFile();
if (loaded && config.getInt("LOAD.SNAPSHOT_OBJECTS") > 0) {
try {
core.objectService.loadSnapshotObjects(planet);
} catch (Exception e) {
e.printStackTrace();
if (!core.getExcludedDevelopers().contains(System.getProperty("user.name"))){
try {
core.objectService.loadSnapshotObjects(planet);
} catch (Exception e) {
e.printStackTrace();
}
}
}
if (loaded && config.getInt("LOAD.BUILDOUT_OBJECTS") > 0) {
if (! config.keyExists("LOAD.BUILDOUT_ONLY_FOR")){
try {
core.objectService.loadBuildoutObjects(planet);
} catch (InstantiationException | IllegalAccessException e) {
e.printStackTrace();
}
} else {
if (planet.getName().equals(config.getString("LOAD.BUILDOUT_ONLY_FOR"))){
if (!core.getExcludedDevelopers().contains(System.getProperty("user.name"))){
if (! config.keyExists("LOAD.BUILDOUT_ONLY_FOR")){
try {
core.objectService.loadBuildoutObjects(planet);
} catch (InstantiationException | IllegalAccessException e) {
e.printStackTrace();
}
} else {
if (planet.getName().equals(config.getString("LOAD.BUILDOUT_ONLY_FOR"))){
try {
core.objectService.loadBuildoutObjects(planet);
} catch (InstantiationException | IllegalAccessException e) {
e.printStackTrace();
}
}
}
}
}