Fixed dungeon challenge scoreboard and implement dungeon drops

Also fixed a few dungeon script handlers
This commit is contained in:
Melledy
2022-05-03 23:13:42 -07:00
parent ae31e4fd98
commit 1b97b4afa0
15 changed files with 298 additions and 24 deletions

View File

@@ -49,6 +49,7 @@ public class Scene {
private final Set<SceneBlock> loadedBlocks;
private boolean dontDestroyWhenEmpty;
private int autoCloseTime;
private int time;
private ClimateType climate;
private int weather;
@@ -107,6 +108,20 @@ public class Scene {
return this.entities.get(id);
}
/**
* @return the autoCloseTime
*/
public int getAutoCloseTime() {
return autoCloseTime;
}
/**
* @param autoCloseTime the autoCloseTime to set
*/
public void setAutoCloseTime(int autoCloseTime) {
this.autoCloseTime = autoCloseTime;
}
public int getTime() {
return time;
}
@@ -520,8 +535,22 @@ public class Scene {
}
// Spawn gadgets AFTER triggers are added
// TODO
for (SceneGroup group : block.groups) {
this.getScriptManager().spawnGadgetsInGroup(group);
if (group.init_config == null) {
continue;
}
int suite = group.init_config.suite;
if (suite == 0) {
continue;
}
do {
this.getScriptManager().spawnGadgetsInGroup(group, suite);
suite++;
} while (suite < group.init_config.end_suite);
}
}