Преглед на файлове

Added menu options for victim types; removed location chooser

tags/v0.7.0
Fen Dweller преди 7 години
родител
ревизия
2a3dc6695d
променени са 2 файла, в които са добавени 38 реда и са изтрити 32 реда
  1. +6
    -18
      game.js
  2. +32
    -14
      stroll.html

+ 6
- 18
game.js Целия файл

@@ -1,6 +1,7 @@
"use strict";

/*jshint browser: true*/
/*jshint devel: true*/

let errored = false;

@@ -12,7 +13,7 @@ window.onerror = function(msg, source, lineno, colno, error) {

console.log(navigator.userAgent);
}
}
};

// do da dark mode

@@ -48,7 +49,7 @@ let numbers = "full";

let verbose = true;

let biome = "suburb";
let biome = "city";

let newline = " ";

@@ -116,7 +117,7 @@ let macro =
break;
case "avian":
result = plural ? "talons" : "talon";
breka;
break;
}
return capital ? result.charAt(0).toUpperCase() + result.slice(1) : result;
},
@@ -969,18 +970,6 @@ function toggle_auto()
update(["You stop walking.",newline]);
}

function change_location()
{
switch(biome) {
case "suburb": biome = "city"; break;
case "city": biome = "downtown"; break;
case "downtown": biome = "rural"; break;
case "rural": biome = "suburb"; break;
}

document.getElementById("button-location").innerHTML = "Location: " + biome.charAt(0).toUpperCase() + biome.slice(1);
}

function toggle_units()
{
switch(unit) {
@@ -2190,7 +2179,7 @@ function pouch_rub()

let line = describe("pouch-rub", prey, macro, verbose);
let linesummary = summarize(prey.sum(), false);
update([line,linesummary,newline])
update([line,linesummary,newline]);
}

function pouch_eat()
@@ -2569,7 +2558,7 @@ function saveSettings() {
let form = document.forms.namedItem("custom-species-form");

for (let i=0; i<form.length; i++) {
let value = form[i].value == "" ? form[i].placeholder : form[i].value
let value = form[i].value == "" ? form[i].placeholder : form[i].value;
if (form[i].type == "text")
settings[form[i].name] = value;
else if (form[i].type == "number")
@@ -2935,7 +2924,6 @@ window.addEventListener('load', function(event) {

document.getElementById("button-look").addEventListener("click",look);
document.getElementById("button-stroll").addEventListener("click",toggle_auto);
document.getElementById("button-location").addEventListener("click",change_location);
document.getElementById("button-numbers").addEventListener("click",toggle_numbers);
document.getElementById("button-units").addEventListener("click",toggle_units);
document.getElementById("button-verbose").addEventListener("click",toggle_verbose);


+ 32
- 14
stroll.html Целия файл

@@ -194,32 +194,49 @@
<div class="custom-category">
<div class="custom-header">Brutality</div>
<div>
<ul>
<li>
<input type="radio" name="brutality" id="brutality-0">
<label for="brutality-0">Non-fatal</label>
</li>
<ul>
<li>
<input type="radio" name="brutality" id="brutality-0">
<label for="brutality-0">Non-fatal</label>
</li>
<li>
<input type="radio" name="brutality" checked="true" id="brutality-1">
<label for="brutality-1">Fatal, no gore</label>
</li>
<li>
<input type="radio" name="brutality" id="brutality-2">
<label for="brutality-2">Gory</label>
</li>
<li>
<input type="radio" name="brutality" id="brutality-3" disabled="disableD">
<label for="brutality-3">Sadistic (not implemented)</label>
</li>
</ul>
</div>
</div>
<div class="custom-category">
<div class="custom-header">Victims</div>
<div>
<li>
<input type="radio" name="brutality" checked="true" id="brutality-1">
<label for="brutality-1">Fatal, no gore</label>
<label for="military">Military</label>
<input type="checkbox" name="victimsMilitary" id="victimsMilitary"/>
</li>
<li>
<input type="radio" name="brutality" id="brutality-2">
<label for="brutality-2">Gory</label>
<label for="macros">Smaller macros</label>
<input type="checkbox" name="victimsMacros" id="victimsMacros"/>
</li>
<li>
<input type="radio" name="brutality" id="brutality-3" disabled="disableD">
<label for="brutality-3">Sadistic (not implemented)</label>
<label for="micros">Micros</label>
<input type="checkbox" name="victimsMicros" id="victimsMicros"/>
</li>
</ul>
</div>
</div>
</div>
<div class="custom-category">
<div class="custom-header">Misc</div>
<div>
<li>
<label for="humanMode">Human victims</label>
<input type="checkbox" name="humanMode" id="humanMode">
<input type="checkbox" name="humanMode" id="humanMode"/>
</li>
<li>
<label class="has-tooltip" for="sameSizeVore" title="Can you eat people your own size?">Same-size predator</label>
@@ -241,6 +258,7 @@
<option value="foot">Human</option>
<option value="avian">Avian</option>
</select>
</li>
</div>
</div>
<div class="custom-category">


Loading…
Отказ
Запис