Updated script to not kick off until the entire preload is complete.

This commit is contained in:
Cekis
2019-02-23 18:48:07 -05:00
parent 1b2050aacd
commit ef2bdb40f4

View File

@@ -18,6 +18,7 @@ public class gcw_spawner extends script.base_script
{
attachScript(self, "systems.gcw.gcw_data_updater");
}
requestPreloadCompleteTrigger(self);
return SCRIPT_CONTINUE;
}
public int OnHearSpeech(obj_id self, obj_id speaker, String strText) throws InterruptedException
@@ -31,8 +32,11 @@ public class gcw_spawner extends script.base_script
}
return SCRIPT_CONTINUE;
}
public int OnInitialize(obj_id self) throws InterruptedException
{
public int OnInitialize(obj_id self) throws InterruptedException {
requestPreloadCompleteTrigger(self);
return SCRIPT_CONTINUE;
}
public int OnPreloadComplete(obj_id self) throws InterruptedException {
location here = getLocation(self);
String planet = here.area;
String city = locations.getCityName(here);