Browse Source

Get optional menus working. Made oral vore optional.

tags/v1.0.0
Fen Dweller 6 years ago
parent
commit
5dec6b9c12
3 changed files with 78 additions and 26 deletions
  1. +28
    -0
      features.js
  2. +48
    -24
      game.js
  3. +2
    -2
      stroll.html

+ 28
- 0
features.js View File

@@ -143,5 +143,33 @@ options = [
] ]
} }
] ]
},
{
"name": "Oral Vore",
"id": "oralVore",
"optional": true,
"entries":
[
{
"name": "Digestion time",
"id": "oralDigestTime",
"type": "float",
"default": "15"
}
]
},
{
"name": "Anal Vore",
"id": "analVore",
"optional": true,
"entries":
[
{
"name": "Digestion time",
"id": "analDigestTime",
"type": "float",
"default": "15"
}
]
} }
]; ];

+ 48
- 24
game.js View File

@@ -3399,8 +3399,11 @@ function gooButtons(molten) {
setButton("melt", !molten); setButton("melt", !molten);
setButton("solidify", molten); setButton("solidify", molten);
setButton("flood", molten); setButton("flood", molten);
setButton("goo_stomach_pull", molten);
setButton("goo_stomach_push", molten);

if (macro.oralVore) {
setButton("goo_stomach_pull", molten);
setButton("goo_stomach_push", molten);
}


if (macro.analVore) { if (macro.analVore) {
setButton("goo_bowels_pull", molten); setButton("goo_bowels_pull", molten);
@@ -4202,25 +4205,11 @@ function startGame(e) {
enable_panel("options"); enable_panel("options");


enable_panel("body"); enable_panel("body");
enable_button("feed");

if (macro.oralDigestTime == 0) {
enable_button("digest_stomach");
}

if (macro.cropEnabled) {
enable_button("crop_swallow");
}


enable_panel("paws"); enable_panel("paws");


enable_button("stomp"); enable_button("stomp");


if (macro.vomitEnabled) {
enable_button("vomit");
enable_victim("vomit");
}

if (macro.footType != "hoof") if (macro.footType != "hoof")
enable_button("flex_toes"); enable_button("flex_toes");


@@ -4233,8 +4222,6 @@ function startGame(e) {


if (macro.brutality > 0) { if (macro.brutality > 0) {
warns.push("Fatal actions are enabled."); warns.push("Fatal actions are enabled.");
enable_button("chew");
enable_victim("chew","Chewed");
} }


if (macro.droolEnabled) { if (macro.droolEnabled) {
@@ -4254,6 +4241,28 @@ function startGame(e) {
document.querySelector("#edgeMeter").style.display = 'inline-block'; document.querySelector("#edgeMeter").style.display = 'inline-block';
} }


if (macro.oralVore) {
enable_button("feed");

if (macro.brutality > 0) {
enable_button("chew");
enable_victim("chew","Chewed");
}

if (macro.oralDigestTime == 0) {
enable_button("digest_stomach");
}

if (macro.cropEnabled) {
enable_button("crop_swallow");
}

if (macro.vomitEnabled) {
enable_button("vomit");
enable_victim("vomit");
}
}

if (macro.analVore) { if (macro.analVore) {
enable_button("anal_vore"); enable_button("anal_vore");
enable_victim("anal-vore","Anal vore"); enable_victim("anal-vore","Anal vore");
@@ -4788,17 +4797,32 @@ function construct_options() {
let cat_div = document.createElement("div"); let cat_div = document.createElement("div");
cat_div.classList.add("custom-category"); cat_div.classList.add("custom-category");


let header_div = document.createElement("div");
let header;


if (category.optional) { if (category.optional) {
header_div.classList.add("custom-header");
header = document.createElement("label");
let input = document.createElement("input");
input.classList.add("custom-header-checkbox");
input.setAttribute("type", "checkbox");
input.id = category.id;
input.name = category.id;

cat_div.appendChild(input);

header.classList.add("custom-header");
header.setAttribute("for", category.id);
} else { } else {
header_div.classList.add("custom-header-static");
header = document.createElement("div");
header.classList.add("custom-header-static");
} }


header_div.innerText = name;
header.innerText = name;


let options_div = document.createElement("div");
let options_div = document.createElement("div")

if (category.optional) {
options_div.classList.add("reveal-if-active");
}


category.entries.forEach(function(option) { category.entries.forEach(function(option) {
let li = document.createElement("li"); let li = document.createElement("li");
@@ -4934,7 +4958,7 @@ function construct_options() {


}); });


cat_div.appendChild(header_div);
cat_div.appendChild(header);
cat_div.appendChild(options_div); cat_div.appendChild(options_div);
root.appendChild(cat_div); root.appendChild(cat_div);
}); });


+ 2
- 2
stroll.html View File

@@ -569,7 +569,7 @@
</li> </li>
</div> </div>
</div> </div>
<!--
<div class="custom-category"> <div class="custom-category">
<input autocomplete="off" class="custom-header-checkbox" type="checkbox" id="analVore" name="analVore" /> <input autocomplete="off" class="custom-header-checkbox" type="checkbox" id="analVore" name="analVore" />
<label class="custom-header" for="analVore">Anal Vore</label> <label class="custom-header" for="analVore">Anal Vore</label>
@@ -589,7 +589,7 @@
</li> </li>
</div> </div>
</div> </div>
-->
<div class="custom-category"> <div class="custom-category">
<input autocomplete="off" class="custom-header-checkbox" type="checkbox" id="arousalEnabled" name="arousalEnabled" /> <input autocomplete="off" class="custom-header-checkbox" type="checkbox" id="arousalEnabled" name="arousalEnabled" />
<label class="custom-header" for="arousalEnabled">Arousal</label> <label class="custom-header" for="arousalEnabled">Arousal</label>


Loading…
Cancel
Save