Kaynağa Gözat

Group the features up and allow them to be enabled/disabled

tags/v1.1.2
Fen Dweller 6 yıl önce
ebeveyn
işleme
25aad9f4e4
Veri tabanında bu imza için bilinen anahtar bulunamadı GPG Anahtar Kimliği: E80B35A6F11C3656
4 değiştirilmiş dosya ile 113 ekleme ve 6 silme
  1. +29
    -1
      features.js
  2. +48
    -4
      game.js
  3. +7
    -0
      stroll.html
  4. +29
    -1
      style.css

+ 29
- 1
features.js Dosyayı Görüntüle

@@ -1,4 +1,6 @@
panels = {
const groups = ["body-part", "nsfw", "alt-vore", "gross"];

const panels = {
"body": { "body": {
"name": "Body", "name": "Body",
"buttons": [ "buttons": [
@@ -505,6 +507,7 @@ options = [
{ {
"name": "Basics", "name": "Basics",
"optional": false, "optional": false,
"group": "main",
"entries": [ "entries": [
{ {
"name": "Name", "name": "Name",
@@ -585,6 +588,7 @@ options = [
{ {
"name": "Body Details", "name": "Body Details",
"optional": false, "optional": false,
"group": "main",
"entries": "entries":
[ [
{ {
@@ -640,6 +644,7 @@ options = [
{ {
"name": "Gameplay", "name": "Gameplay",
"optional": false, "optional": false,
"group": "main",
"entries": "entries":
[ [
{ {
@@ -770,6 +775,7 @@ options = [
{ {
"name": "Brutality", "name": "Brutality",
"optional": false, "optional": false,
"group": "main",
"entries": "entries":
[ [
{ {
@@ -808,6 +814,7 @@ options = [
{ {
"name": "Victims", "name": "Victims",
"optional": false, "optional": false,
"group": "main",
"entries": "entries":
[ [
{ {
@@ -837,6 +844,7 @@ options = [
{ {
"name": "Oral Vore", "name": "Oral Vore",
"id": "oralVore", "id": "oralVore",
"group": "main",
"optional": true, "optional": true,
"buttons": [ "buttons": [
"feed", "chew" "feed", "chew"
@@ -883,6 +891,7 @@ options = [
"name": "Anal Vore", "name": "Anal Vore",
"id": "analVore", "id": "analVore",
"optional": true, "optional": true,
"group": "alt-vore",
"buttons": ["anal_vore"], "buttons": ["anal_vore"],
"entries": "entries":
[ [
@@ -938,6 +947,7 @@ options = [
{ {
"name": "Footwear", "name": "Footwear",
"id": "footWear", "id": "footWear",
"group": "main",
"optional": true, "optional": true,
"panels": ["shoes"], "panels": ["shoes"],
"entries": "entries":
@@ -1015,6 +1025,7 @@ options = [
{ {
"name": "Arousal", "name": "Arousal",
"id": "arousalEnabled", "id": "arousalEnabled",
"group": "nsfw",
"optional": true, "optional": true,
"warning": "Arousal is enabled", "warning": "Arousal is enabled",
"entries": "entries":
@@ -1044,6 +1055,7 @@ options = [
{ {
"name": "Tail", "name": "Tail",
"id": "hasTail", "id": "hasTail",
"group": "body-part",
"optional": true, "optional": true,
"parts": ["tail"], "parts": ["tail"],
"panels": ["tails"], "panels": ["tails"],
@@ -1135,6 +1147,7 @@ options = [
{ {
"name": "Pouch", "name": "Pouch",
"id": "hasPouch", "id": "hasPouch",
"group": "body-part",
"optional": true, "optional": true,
"panels": ["misc"], "panels": ["misc"],
"buttons": ["pouch_stuff", "pouch_rub"], "buttons": ["pouch_stuff", "pouch_rub"],
@@ -1151,6 +1164,7 @@ options = [
{ {
"name": "Male Genitals", "name": "Male Genitals",
"id": "maleParts", "id": "maleParts",
"group": "nsfw",
"optional": true, "optional": true,
"stats": ["cum"], "stats": ["cum"],
"parts": ["dick", "balls"], "parts": ["dick", "balls"],
@@ -1326,6 +1340,7 @@ options = [
{ {
"name": "Female Genitals", "name": "Female Genitals",
"id": "femaleParts", "id": "femaleParts",
"group": "nsfw",
"optional": true, "optional": true,
"stats": ["femcum"], "stats": ["femcum"],
"parts": ["slit", "womb"], "parts": ["slit", "womb"],
@@ -1464,6 +1479,7 @@ options = [
{ {
"name": "Breasts", "name": "Breasts",
"id": "hasBreasts", "id": "hasBreasts",
"group": "body-part",
"optional": true, "optional": true,
"panels": ["breasts"], "panels": ["breasts"],
"parts": ["breasts"], "parts": ["breasts"],
@@ -1574,6 +1590,7 @@ options = [
{ {
"name": "Stench", "name": "Stench",
"id": "stenchEnabled", "id": "stenchEnabled",
"group": "gross",
"optional": true, "optional": true,
"warning": "Stench is enabled", "warning": "Stench is enabled",
"parts": ["stench"], "parts": ["stench"],
@@ -1608,6 +1625,7 @@ options = [
{ {
"name": "Gas", "name": "Gas",
"id": "gasEnabled", "id": "gasEnabled",
"group": "gross",
"optional": true, "optional": true,
"stats": ["gas"], "stats": ["gas"],
"panels": ["waste"], "panels": ["waste"],
@@ -1657,6 +1675,7 @@ options = [
{ {
"name": "Soul Vore", "name": "Soul Vore",
"id": "soulVoreEnabled", "id": "soulVoreEnabled",
"group": "alt-vore",
"optional": true, "optional": true,
"panels": ["souls"], "panels": ["souls"],
"buttons": ["soul_vore", "soul_absorb_paw"], "buttons": ["soul_vore", "soul_absorb_paw"],
@@ -1718,6 +1737,7 @@ options = [
{ {
"name": "Piss", "name": "Piss",
"id": "pissEnabled", "id": "pissEnabled",
"group": "gross",
"optional": true, "optional": true,
"stats": ["piss"], "stats": ["piss"],
"panels": ["waste"], "panels": ["waste"],
@@ -1805,6 +1825,7 @@ options = [
{ {
"name": "Scat", "name": "Scat",
"id": "scatEnabled", "id": "scatEnabled",
"group": "gross",
"optional": true, "optional": true,
"stats": ["scat"], "stats": ["scat"],
"panels": ["waste"], "panels": ["waste"],
@@ -1843,6 +1864,7 @@ options = [
{ {
"name": "Goo", "name": "Goo",
"id": "gooEnabled", "id": "gooEnabled",
"group": "body-part",
"optional": true, "optional": true,
"panels": ["goo"], "panels": ["goo"],
"buttons": ["melt"], "buttons": ["melt"],
@@ -1889,6 +1911,7 @@ options = [
{ {
"name": "Paw Vore", "name": "Paw Vore",
"id": "pawVoreEnabled", "id": "pawVoreEnabled",
"group": "alt-vore",
"optional": true, "optional": true,
"buttons": ["paw_vore"], "buttons": ["paw_vore"],
"entries": "entries":
@@ -1933,6 +1956,7 @@ options = [
{ {
"name": "Crop", "name": "Crop",
"id": "cropEnabled", "id": "cropEnabled",
"group": "alt-vore",
"optional": true, "optional": true,
"buttons": ["crop_swallow"], "buttons": ["crop_swallow"],
"entries": "entries":
@@ -1957,6 +1981,7 @@ options = [
{ {
"name": "Breath", "name": "Breath",
"id": "breathEnabled", "id": "breathEnabled",
"group": "main",
"optional": true, "optional": true,
"panels": ["breath"], "panels": ["breath"],
"buttons": ["breath_line", "breath_cone"], "buttons": ["breath_line", "breath_cone"],
@@ -2010,6 +2035,7 @@ options = [
{ {
"name": "Drool", "name": "Drool",
"id": "droolEnabled", "id": "droolEnabled",
"group": "gross",
"optional": true, "optional": true,
"buttons": ["drool"], "buttons": ["drool"],
"entries": "entries":
@@ -2026,6 +2052,7 @@ options = [
{ {
"name": "Magic", "name": "Magic",
"id": "magicEnabled", "id": "magicEnabled",
"group": "main",
"optional": true, "optional": true,
"panels": ["magic"], "panels": ["magic"],
"entries": "entries":
@@ -2051,6 +2078,7 @@ options = [
{ {
"name": "Wings", "name": "Wings",
"id": "hasWings", "id": "hasWings",
"group": "body-part",
"optional": true, "optional": true,
"panels": ["misc"], "panels": ["misc"],
"parts": ["wings"], "parts": ["wings"],


+ 48
- 4
game.js Dosyayı Görüntüle

@@ -5571,6 +5571,28 @@ window.addEventListener('load', function(event) {
list.appendChild(opt); list.appendChild(opt);
} }


register_buttons();
update_visible_groups();

setTimeout(pick_move, 2000);
});

function update_visible_groups() {

groups.forEach(group => {
const state = document.querySelector("#group-toggle-" + group).checked;
console.log(state);
document.querySelectorAll(".sheet-group-" + group).forEach(category => {
if (state)
category.style.display = "";
else
category.style.display = "none";
});
});
}

function register_buttons() {

document.querySelectorAll(".action-part-button").forEach(function (element) { document.querySelectorAll(".action-part-button").forEach(function (element) {
element.addEventListener("click",actionTab); element.addEventListener("click",actionTab);
}); });
@@ -5608,10 +5630,7 @@ window.addEventListener('load', function(event) {
document.getElementById("button-save-custom").addEventListener("click", function() { saveSettings(); }); document.getElementById("button-save-custom").addEventListener("click", function() { saveSettings(); });
document.getElementById("button-delete-custom").addEventListener("click", function() { deleteSettings(); }); document.getElementById("button-delete-custom").addEventListener("click", function() { deleteSettings(); });
document.getElementById("button-start").addEventListener("click", startGame); document.getElementById("button-start").addEventListener("click", startGame);

setTimeout(pick_move, 2000);
});

}
function render_text_option(li, option) { function render_text_option(li, option) {
let input = document.createElement("input"); let input = document.createElement("input");
input.setAttribute("autocomplete", "off"); input.setAttribute("autocomplete", "off");
@@ -5905,6 +5924,10 @@ function render_category(root, category) {
header.classList.add("custom-header-static"); header.classList.add("custom-header-static");
} }


if (category.group) {
cat_div.classList.add("sheet-group-" + category.group);
}

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


let options_div = document.createElement("div") let options_div = document.createElement("div")
@@ -5925,6 +5948,27 @@ function render_category(root, category) {
} }


function construct_options() { function construct_options() {
let group_holder = document.getElementById("group-button-holder");

groups.forEach(group => {
const label = document.createElement("label");

const input = document.createElement("input");
input.setAttribute("autocomplete", "off");
input.setAttribute("id", "group-toggle-" + group);
input.setAttribute("name", "group-toggle-" + group);
input.setAttribute("type", "checkbox");

label.setAttribute("for", "group-toggle-" + group);
label.innerText = group;
input.addEventListener("input", update_visible_groups);

label.classList.add("solo");
group_holder.appendChild(input);
group_holder.appendChild(label);

})
let root = document.getElementById("character-flex-outer"); let root = document.getElementById("character-flex-outer");


options.forEach(function(category) { options.forEach(function(category) {


+ 7
- 0
stroll.html Dosyayı Görüntüle

@@ -292,6 +292,13 @@
<p><input autocomplete="off" type="text" id="export-area" placeholder="Paste character data here..."></p> <p><input autocomplete="off" type="text" id="export-area" placeholder="Paste character data here..."></p>
</div> </div>
</div> </div>

<div class="custom-category">
<p>Enable/disable categories of character features here.</p>
<div id="group-button-holder">

</div>
</div>
</ul> </ul>
<form id="custom-species-form" name="custom-species-form"> <form id="custom-species-form" name="custom-species-form">
<ul class="flex-outer" id="character-flex-outer"> <ul class="flex-outer" id="character-flex-outer">


+ 29
- 1
style.css Dosyayı Görüntüle

@@ -886,4 +886,32 @@ body.dark .meterLabel {
opacity: 0; opacity: 0;
height: 0; height: 0;
} }
}
}

body {
--main-order: 1;
--body-part-order: 2;
--nsfw-order: 3;
--alt-vore-order: 4;
--gross-order: 5;
}

.sheet-group-main {
order: var(--main-order);
}

.sheet-group-body-part {
order: var(--body-part-order);
}

.sheet-group-alt-vore {
order: var(--alt-vore-order);
}

.sheet-group-gross {
order: var(--gross-order);
}

.sheet-group-nsfw {
order: var(--nsfw-order);
}

Yükleniyor…
İptal
Kaydet