Merge remote-tracking branch 'origin/development' into development

This commit is contained in:
KingRainbow44
2023-07-14 19:47:56 -04:00
Unverified
14 changed files with 393 additions and 447 deletions
@@ -99,7 +99,13 @@ public class SceneScriptManager {
}
public SceneConfig getConfig() {
return this.isInit ? this.meta.config : null;
for (int i = 0; i < 10; ++i) {
if (this.isInit) {
return this.meta.config;
}
Utils.sleep(100);
}
return null;
}
public Map<Integer, SceneBlock> getBlocks() {
@@ -244,12 +244,6 @@ public class ScriptLib {
Grasscutter.getLogger().warn("trying to get suite that doesn't exist: {} {}", groupId, suite);
return 1;
}
// avoid spawn wrong monster
if(getSceneScriptManager().getScene().getChallenge() != null)
if(!getSceneScriptManager().getScene().getChallenge().inProgress() ||
getSceneScriptManager().getScene().getChallenge().getGroup().id != groupId){
return 0;
}
this.getSceneScriptManager().addGroupSuite(groupInstance, suiteData);
return 0;