basic stub of encounter human

This commit is contained in:
2023-02-27 20:22:36 -08:00
parent e3d022df68
commit 0c9bff9fc3
3 changed files with 64 additions and 7 deletions

View File

@@ -29,9 +29,12 @@ function prepare_gamestate() {
}
}
var bool_log_alt = false
function record_log(text) {
const div_logrow = document.createElement("div");
div_logrow.className = "log-line";
if (bool_log_alt) { div_logrow.className = "log-line"; }
else { div_logrow.className = "log-line-alt"; }
bool_log_alt = !bool_log_alt;
const div_logtick = document.createElement("div");
div_logtick.className = "log-tick"
@@ -74,14 +77,14 @@ async function game_tick() {
}
if (tickdata["event_type"] == 0) {
//sleep(12000);
//game_tick();
// pass
} else if (tickdata["event_type"] == 1) {
// Flavor event - no gameplay effect, but occasionally says something fun.
record_log(tickdata["log"]);
//await sleep(12000);
//game_tick();
}
} else if (tickdata["event_type"] == 10) {
// Human encounter. This is a stub.
record_log("You have encountered a human.");
}
// sanity check
if (!("autosave" in gamestate)) {