commit
be591207ec
|
@ -1880,11 +1880,17 @@ export class Game extends Uninstantable {
|
||||||
help: help,
|
help: help,
|
||||||
config: objectConfig
|
config: objectConfig
|
||||||
}
|
}
|
||||||
if (precontent) {
|
try{
|
||||||
_status.extension = name;
|
if (precontent) {
|
||||||
await (gnc.is.generatorFunc(precontent) ? gnc.of(precontent) : precontent).call(object, config);
|
_status.extension = name;
|
||||||
delete _status.extension;
|
|
||||||
|
await (gnc.is.generatorFunc(precontent) ? gnc.of(precontent) : precontent).call(object, config);
|
||||||
|
delete _status.extension;
|
||||||
|
}
|
||||||
|
}catch(e1){
|
||||||
|
alert(`扩展${name}载入失败\nprecontentError\n${decodeURI(e1.stack)}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (content) lib.extensions.push([name, content, config, _status.evaluatingExtension, objectPackage || {}]);
|
if (content) lib.extensions.push([name, content, config, _status.evaluatingExtension, objectPackage || {}]);
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
|
|
|
@ -587,7 +587,11 @@ export async function onload(resetGameTimeout) {
|
||||||
_status.extension = lib.extensions[i][0];
|
_status.extension = lib.extensions[i][0];
|
||||||
_status.evaluatingExtension = lib.extensions[i][3];
|
_status.evaluatingExtension = lib.extensions[i][3];
|
||||||
if (typeof lib.extensions[i][1] == "function")
|
if (typeof lib.extensions[i][1] == "function")
|
||||||
await (gnc.is.coroutine(lib.extensions[i][1]) ? gnc.of(lib.extensions[i][1]) : lib.extensions[i][1]).call(lib.extensions[i], lib.extensions[i][2], lib.extensions[i][4]);
|
try{
|
||||||
|
await (gnc.is.coroutine(lib.extensions[i][1]) ? gnc.of(lib.extensions[i][1]) : lib.extensions[i][1]).call(lib.extensions[i], lib.extensions[i][2], lib.extensions[i][4]);
|
||||||
|
}catch(e){
|
||||||
|
alert(`扩展${lib.extensions[i][0]}载入失败\ncontentError\n${decodeURI(e.stack)}`);
|
||||||
|
}
|
||||||
if (lib.extensions[i][4]) {
|
if (lib.extensions[i][4]) {
|
||||||
if (lib.extensions[i][4].character) {
|
if (lib.extensions[i][4].character) {
|
||||||
for (var j in lib.extensions[i][4].character.character) {
|
for (var j in lib.extensions[i][4].character.character) {
|
||||||
|
|
Loading…
Reference in New Issue