basic stub of encounter human
This commit is contained in:
@@ -32,6 +32,12 @@ div#main-content {
|
||||
|
||||
padding-left: 5px;
|
||||
}
|
||||
div#main-day-stats {
|
||||
min-height: 100px;
|
||||
vertical-align: middle;
|
||||
|
||||
border-bottom: 0.125em solid rgb(192,192,192);
|
||||
}
|
||||
|
||||
div#main-log {
|
||||
display: flex;
|
||||
@@ -41,6 +47,21 @@ div#main-log {
|
||||
div.log-line {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
vertical-align: top;
|
||||
width: 100%;
|
||||
min-height: 1.5em;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
div.log-line-alt {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
vertical-align: top;
|
||||
width: 100%;
|
||||
min-height: 1.5em;
|
||||
padding-top: 5px;
|
||||
|
||||
background-color: rgb(192, 192, 192);
|
||||
}
|
||||
|
||||
div.log-tick {
|
||||
|
@@ -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)) {
|
||||
|
Reference in New Issue
Block a user