break
This commit is contained in:
parent
09b1d46986
commit
a4b85df08f
|
@ -2186,9 +2186,14 @@ gameobject.clone("sprite", {
|
||||||
sprite: sprite.clone(),
|
sprite: sprite.clone(),
|
||||||
});
|
});
|
||||||
|
|
||||||
load("config.js");
|
|
||||||
|
|
||||||
var prototypes = JSON.parse(slurp("proto.json"));
|
if (IO.exists("config.js"))
|
||||||
|
load("config.js");
|
||||||
|
|
||||||
|
var prototypes = {};
|
||||||
|
if (IO.exists("proto.json"))
|
||||||
|
prototypes = JSON.parse(slurp("proto.json"));
|
||||||
|
|
||||||
for (var key in prototypes) {
|
for (var key in prototypes) {
|
||||||
if (key in gameobjects)
|
if (key in gameobjects)
|
||||||
dainty_assign(gameobjects[key], prototypes[key]);
|
dainty_assign(gameobjects[key], prototypes[key]);
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
if (load("game.js") === false) {
|
|
||||||
Log.error("No game.js. No game.");
|
|
||||||
quit();
|
|
||||||
}
|
|
||||||
|
|
||||||
sim_start();
|
sim_start();
|
||||||
|
|
||||||
|
if (!IO.exists("game.js"))
|
||||||
|
load("scripts/nogame.js");
|
||||||
|
else
|
||||||
|
load("game.js");
|
||||||
|
|
Loading…
Reference in a new issue