Selaa lähdekoodia

Rearrange the biome settings; allow for labels in the character creation

screen
tags/v1.1.0
Fen Dweller 5 vuotta sitten
vanhempi
commit
a3a4125a13
3 muutettua tiedostoa jossa 56 lisäystä ja 38 poistoa
  1. +35
    -38
      features.js
  2. +13
    -0
      game.js
  3. +8
    -0
      style.css

+ 35
- 38
features.js Näytä tiedosto

@@ -656,6 +656,12 @@ options = [
}
]
},
{
"name": "Scale growth with size",
"id": "growthScaleWithSize",
"type": "checkbox",
"tooltip": "If you're ten times bigger than normal, you gain ten times as much mass when digesting prey"
},
{
"name": "Automatic Growth",
"id": "automaticGrowth",
@@ -728,46 +734,37 @@ options = [
]
},
{
"name": "Available Biomes",
"id": "biomes",
"type": "subcategory",
"entries":
[
{
"name": "City",
"id": "cityEnabled",
"type": "checkbox",
"default": true,
"tooltip": "The normal city enviroment you are used to.",
},
{
"name": "Downtown",
"id": "downtownEnabled",
"type": "checkbox",
"default": true,
"tooltip": "A dense city center.",
},
{
"name": "Suburb",
"id": "suburbEnabled",
"type": "checkbox",
"default": true,
"tooltip": "The perfect place to start a family, or eat one.",
},
{
"name": "Rural",
"id": "ruralEnabled",
"type": "checkbox",
"default": true,
"tooltip": "Is that a cow?",
}
]
"name": "Enabled biomes:",
"id": "",
"type": "label",
},
{
"name": "City",
"id": "cityEnabled",
"type": "checkbox",
"default": true,
"tooltip": "The normal city enviroment you are used to.",
},
{
"name": "Scale growth with size",
"id": "growthScaleWithSize",
"type": "checkbox",
"tooltip": "If you're ten times bigger than normal, you gain ten times as much mass when digesting prey"
"name": "Downtown",
"id": "downtownEnabled",
"type": "checkbox",
"default": true,
"tooltip": "A dense city center.",
},
{
"name": "Suburb",
"id": "suburbEnabled",
"type": "checkbox",
"default": true,
"tooltip": "The perfect place to start a family, or eat one.",
},
{
"name": "Rural",
"id": "ruralEnabled",
"type": "checkbox",
"default": true,
"tooltip": "Is that a cow?",
}
]
},


+ 13
- 0
game.js Näytä tiedosto

@@ -5640,6 +5640,15 @@ function render_subcategory_option(li, option) {
li.appendChild(sub_div);
}

function render_label(li, option) {
let div = document.createElement("div");
div.classList.add("custom-label");

div.textContent = option.name;

li.appendChild(div);
}

function render_option(root_div, li, option) {
if (option.type == "text") {
render_text_option(li, option);
@@ -5671,6 +5680,10 @@ function render_option(root_div, li, option) {
render_subcategory_option(li, option);
}

if (option.type == "label") {
render_label(li, option);
}

root_div.appendChild(li);
}



+ 8
- 0
style.css Näytä tiedosto

@@ -793,3 +793,11 @@ body.dark .meterLabel {
.log::-webkit-scrollbar-corner {
background: transparent;
}

.custom-label {
text-align: center;
font-size: 30px;
width: 100%;
padding-top: 6px;
padding-bottom: 6px;
}

Loading…
Peruuta
Tallenna