浏览代码

Put the growth parts into a select box

tags/v1.1.2
Fen Dweller 5 年前
父节点
当前提交
1eaa0660a3
共有 2 个文件被更改,包括 16 次插入15 次删除
  1. +5
    -6
      game.js
  2. +11
    -9
      stroll.html

+ 5
- 6
game.js 查看文件

@@ -4507,9 +4507,8 @@ function grow_part_pick(id) {
} }


function grow_pick(times) { function grow_pick(times) {

let button = document.querySelector(".growth-part-active");

const select = document.querySelector("#growth-part-select");
const chosenPart = select.value;
if (macro.difficulty > 0 && macro.growthPoints < (times - 1) * 10) { if (macro.difficulty > 0 && macro.growthPoints < (times - 1) * 10) {
update(["You need " + times*10 + " growth points to grow that much.",newline]); update(["You need " + times*10 + " growth points to grow that much.",newline]);
} else { } else {
@@ -4519,7 +4518,7 @@ function grow_pick(times) {


times /= 10; times /= 10;


switch (button.id.replace("button-growth-", "")) {
switch (chosenPart) {
case "body": grow(times); break; case "body": grow(times); break;
case "paws": grow_paws(times); break; case "paws": grow_paws(times); break;
case "tail": grow_tail(times); break; case "tail": grow_tail(times); break;
@@ -5074,7 +5073,7 @@ function enable_stat(name) {
} }


function enable_growth_part(name) { function enable_growth_part(name) {
document.querySelector("#button-growth-" + name).style.display = 'block';
document.querySelector("#option-growth-" + name).style.display = 'block';
} }


function disable_button(name) { function disable_button(name) {
@@ -5482,7 +5481,7 @@ window.addEventListener('load', function(event) {


document.getElementById("button-dark-mode-options").addEventListener("click",toggleDarkMode); document.getElementById("button-dark-mode-options").addEventListener("click",toggleDarkMode);
document.querySelectorAll(".growth-part").forEach(function (button) { document.querySelectorAll(".growth-part").forEach(function (button) {
button.addEventListener("click", function() { grow_part_pick(button.id); });
button.addEventListener("select", function() { grow_part_pick(button.id); });
}); });


document.getElementById("button-growth-1.1").addEventListener("click",function() { grow_pick(11); }); document.getElementById("button-growth-1.1").addEventListener("click",function() { grow_pick(11); });


+ 11
- 9
stroll.html 查看文件

@@ -170,15 +170,17 @@


<div class="growth-box"> <div class="growth-box">
<div id="growth-box-left"> <div id="growth-box-left">
<button class="growth-part growth-part-active" id="button-growth-body">Body</button>
<button class="growth-part" id="button-growth-paws">Paws</button>
<button class="growth-part" id="button-growth-tail">Tail</button>
<button class="growth-part" id="button-growth-ass">Ass</button>
<button class="growth-part" id="button-growth-dick">Cock</button>
<button class="growth-part" id="button-growth-balls">Balls</button>
<button class="growth-part" id="button-growth-slit">Slit</button>
<button class="growth-part" id="button-growth-womb">Womb</button>
<button class="growth-part" id="button-growth-breasts">Breasts</button>
<select id="growth-part-select">
<option class="growth-part growth-part-active" id="option-growth-body" value="body" >Body</option>
<option class="growth-part" id="option-growth-paws" value="paws">Paws</option>
<option class="growth-part" id="option-growth-tail" value="tail">Tail</option>
<option class="growth-part" id="option-growth-ass" value="ass">Ass</option>
<option class="growth-part" id="option-growth-dick" value="dick">Cock</option>
<option class="growth-part" id="option-growth-balls" value="balls">Balls</option>
<option class="growth-part" id="option-growth-slit" value="slit">Slit</option>
<option class="growth-part" id="option-growth-womb" value="womb">Womb</option>
<option class="growth-part" id="option-growth-breasts" value="breasts">Breasts</option>
</select>
</div> </div>
<div id="growth-box-right"> <div id="growth-box-right">
<button class="growth-amount" id="button-growth-1.1">1.1x</button> <button class="growth-amount" id="button-growth-1.1">1.1x</button>


正在加载...
取消
保存