Allow to run user scenarios
This commit is contained in:
parent
0237933645
commit
3ed231e773
@ -1,4 +1,4 @@
|
|||||||
/* global rpyscript, TextUtils */
|
/* global rpyscript, TextUtils, userscenario */
|
||||||
|
|
||||||
var baseResDir = '/resources/es/';
|
var baseResDir = '/resources/es/';
|
||||||
var ViewActivity = null;
|
var ViewActivity = null;
|
||||||
@ -12,7 +12,7 @@ function run(data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
if ( (typeof rpyscript === 'undefined') || TextUtils.isEmpty(rpyscript)) {
|
if ( (typeof rpyscript === 'undefined') || TextUtils.isEmpty(rpyscript)) {
|
||||||
rpyscript = "undefined";
|
rpyscript = "undefined";
|
||||||
run('play music music_list["everlasting_summer"]\n' +
|
run('play music music_list["everlasting_summer"]\n' +
|
||||||
'scene bg ext_square_day\n' +
|
'scene bg ext_square_day\n' +
|
||||||
@ -25,6 +25,8 @@ $(document).ready(function() {
|
|||||||
'show un smile2 pioneer at center\n' +
|
'show un smile2 pioneer at center\n' +
|
||||||
'all "Приглашаем тебя в Бесконечное Лето!"');
|
'all "Приглашаем тебя в Бесконечное Лето!"');
|
||||||
} else {
|
} else {
|
||||||
$.get("/resources/es/scripts/" + rpyscript + ".rpy", run);
|
var scriptDir = (typeof userscenario === 'undefined' && userscenario)
|
||||||
|
? "scripts" : "userscenarios";
|
||||||
|
$.get("/resources/es/" + scriptDir + "/" + rpyscript + ".rpy", run);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user