diff --git a/features.js b/features.js index 368df7c..04e3aba 100644 --- a/features.js +++ b/features.js @@ -511,7 +511,8 @@ options = [ "name": "Scale", "id": "scale", "type": "float", - "default": "1" + "default": "1", + "tooltip": "You start out this many times larger than normal. A good way to build a macro character is to design them at normal size, then adjust the scale to get them to the right height." }, { "name": "Height", @@ -875,7 +876,7 @@ options = [ { "name": "Number of tails", "id": "tailCount", - "type": "float", + "type": "int", "default": "1" }, { @@ -1050,7 +1051,8 @@ options = [ { "name": "Scale cum with size", "id": "cumScaleWithSize", - "type": "checkbox" + "type": "checkbox", + "tooltip": "If you're ten times bigger than normal, you produce ten times as much cum when digesting prey" } ] }, @@ -1190,7 +1192,8 @@ options = [ { "name": "Scale femcum with size", "id": "femcumScaleWithSize", - "type": "checkbox" + "type": "checkbox", + "tooltip": "If you're ten times bigger than normal, you produce ten times as much femcum when digesting prey" } ] }, @@ -1295,7 +1298,8 @@ options = [ { "name": "Scale milk with size", "id": "milkScaleWithSize", - "type": "checkbox" + "type": "checkbox", + "tooltip": "If you're ten times bigger than normal, you produce ten times as much milk when digesting prey" } ] } @@ -1377,7 +1381,8 @@ options = [ { "name": "Scale gas with size", "id": "gasScaleWithSize", - "type": "checkbox" + "type": "checkbox", + "tooltip": "If you're ten times bigger than normal, you produce ten times as much gas when digesting prey" } ] }, @@ -1494,7 +1499,8 @@ options = [ { "name": "Scale piss with size", "id": "pissScaleWithSize", - "type": "checkbox" + "type": "checkbox", + "tooltip": "If you're ten times bigger than normal, you produce ten times as much piss when digesting prey" } ] } @@ -1532,7 +1538,8 @@ options = [ { "name": "Scale scat with size", "id": "scatScaleWithSize", - "type": "checkbox" + "type": "checkbox", + "tooltip": "If you're ten times bigger than normal, you produce ten times as much scat when digesting prey" } ] }, diff --git a/game.js b/game.js index b3fdee2..d0ba4ea 100644 --- a/game.js +++ b/game.js @@ -4290,16 +4290,13 @@ function grabFormData(form, warnings, panels, buttons, stats, parts) { { let sib = parent.previousSibling.previousSibling; - if (!sib.checked) { - console.log("aborting " + form.id); + if (!sib.checked && form.id == "") { return; } - } parent = parent.parentElement; - } if (form.hasAttribute("data-warning")) { @@ -4955,13 +4952,20 @@ function render_text_option(li, option) { li.appendChild(input); } -function render_float_option(li, option) { +function render_number_option(li, option, type) { let input = document.createElement("input"); input.setAttribute("autocomplete", "off"); input.setAttribute("id", option.id); input.setAttribute("name", option.id); input.setAttribute("type", "number"); - input.setAttribute("step", "any"); + + if (type == "int") { + input.setAttribute("step", "1"); + input.setAttribute("pattern", "\\d*"); + } else if (type == "float") { + input.setAttribute("step", "any"); + } + if (option.default) { input.setAttribute("placeholder", option.default); @@ -4972,6 +4976,11 @@ function render_float_option(li, option) { label.setAttribute("for", option.id); label.innerText = option.name; + if (option.tooltip != undefined) { + label.classList.add("has-tooltip"); + label.setAttribute("title", option.tooltip); + } + li.appendChild(label); li.appendChild(input); @@ -4986,6 +4995,14 @@ function render_float_option(li, option) { } } +function render_float_option(li, option) { + render_number_option(li, option, "float"); +} + +function render_int_option(li, option) { + render_number_option(li, option, "int"); +} + function render_radio_option(options_div, option) { option.choices.forEach(function(choice) { let li = document.createElement("li"); @@ -5032,6 +5049,11 @@ function render_checkbox_option(li, option) { attach_form_data(input, option); + if (option.tooltip != undefined) { + label.classList.add("has-tooltip"); + label.setAttribute("title", option.tooltip); + } + li.appendChild(input); li.appendChild(label); } @@ -5052,6 +5074,11 @@ function render_select_option(li, option) { select.appendChild(sub_option); }); + if (option.tooltip != undefined) { + label.classList.add("has-tooltip"); + label.setAttribute("title", option.tooltip); + } + li.appendChild(label); li.appendChild(select); } @@ -5106,6 +5133,10 @@ function render_option(root_div, li, option) { render_float_option(li, option); } + if (option.type == "int") { + render_int_option(li, option); + } + if (option.type == "radio") { render_radio_option(root_div, option); // we added n li elements; we need to skip the default one diff --git a/stroll.html b/stroll.html index bf0c400..a422372 100644 --- a/stroll.html +++ b/stroll.html @@ -206,21 +206,22 @@
-

Welcome to Stroll

-

-

This game features 18+ content

-

Changelog - Telegram - Discord

+
+

Welcome to Stroll

+

+

This game features 18+ content

+

Changelog - Telegram - Discord

-

Stroll is a text-based macro game. Stomp things, eat things, abuse things - then grow larger and do it all over again.

+

Stroll is a text-based macro game. Stomp things, eat things, abuse things - then grow larger and do it all over again.

-

Stroll is designed for modern browsers. Chrome, Firefox, or Edge are suggested. Older browsers will likely fail to run the game. Mobile should work fine.

+

Stroll is designed for modern browsers. Chrome, Firefox, or Edge are suggested. Older browsers will likely fail to run the game. Mobile should work fine.

-
- -

Leave a box empty for a sane default value

-

Lengths in meters, areas in square meters, masses in kilograms, times in seconds

-

(but you can preview the customary value)

-

Click on boxed titles to enable and disable features.

+

Leave a box empty for a sane default value

+

Lengths in meters, areas in square meters, masses in kilograms, times in seconds

+

(but you can preview the customary value)

+

Click on boxed titles to enable and disable features.

+

Underlined options have tooltips

+
diff --git a/style.css b/style.css index 018a5af..862c6c5 100644 --- a/style.css +++ b/style.css @@ -88,10 +88,14 @@ body.dark div { #log { overflow: auto; + padding: 25px; + box-sizing: border-box; } #react-log { overflow: auto; + padding: 25px; + box-sizing: border-box; } body.light #react-log { @@ -187,6 +191,7 @@ progress { text-align: right; min-width: 250px; flex: 1; + padding: 25px; } .preset-selector { @@ -699,3 +704,7 @@ body.dark .meterLabel { #custom-characters { font-size: 24px; } + +.intro-text { + font-size: 18px; +}