From 16bcc2ca6cad44e8f7a3f9008a7abdc065b339c8 Mon Sep 17 00:00:00 2001 From: Le~Kat Date: Sat, 25 Feb 2023 23:28:28 -0500 Subject: [PATCH] OH GOD IT FINALLY F*CKING WORKS --- apps/multidice/ChangeLog | 1 + apps/multidice/README.md | 7 +++---- apps/multidice/app.js | 3 ++- apps/multidice/metadata.json | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/multidice/ChangeLog b/apps/multidice/ChangeLog index d139f16c5..55ed99b4f 100644 --- a/apps/multidice/ChangeLog +++ b/apps/multidice/ChangeLog @@ -26,3 +26,4 @@ 1.24: fixed dumb errors 1.25: god I hope this works 1.26: trying to add timeout after it's done buzzing... again +1.27: OH GOD IT FINALLY WORKS diff --git a/apps/multidice/README.md b/apps/multidice/README.md index d80ed7ef1..43c3fb0b3 100644 --- a/apps/multidice/README.md +++ b/apps/multidice/README.md @@ -5,8 +5,8 @@ roll anywhere from 1-8 dice at the same time. ## Usage -On the menu screen: tap on the dice to change what variant is selected, & press the button to roll the dice -On the dice screen: tap anywhere on the screen to go back to the menu, or press the button to roll the dice +On the menu screen: tap on the dice to change what variant is selected, & shake/or press BTN to roll the dice +On the dice screen: tap anywhere on the screen to go back to the menu, or shake/or press BTN to roll the dice ## Features @@ -14,5 +14,4 @@ roll anywhere from 1-8 dice (d4, d6, d8, d10, d12, d20, & d percentile). You can ## Controls -App uses touchscreen to cycle through different dice, and BTN to roll them -(W.I.P. using acceleration to roll dice) +App uses touchscreen to cycle through different dice, and accelerometer/BTN to roll them diff --git a/apps/multidice/app.js b/apps/multidice/app.js index c4597cdaf..474d8fb7c 100644 --- a/apps/multidice/app.js +++ b/apps/multidice/app.js @@ -81,7 +81,7 @@ function touchHandler (button, xy) { function accelHandler (xyz) { - if (xyz.diff >= 0.4) { + if (xyz.diff >= 0.3) { menu = false; mutex (rollDice); @@ -158,6 +158,7 @@ function vibrate() { }); } +// returns a integer [1, max] function random (max) { return Math.round (Math.random() * (max - 1) + 1); diff --git a/apps/multidice/metadata.json b/apps/multidice/metadata.json index e5d555fa8..f77e5fab8 100644 --- a/apps/multidice/metadata.json +++ b/apps/multidice/metadata.json @@ -1,7 +1,7 @@ { "id": "multidice", "name": "multiple dice roller", "shortName":"multidice", - "version":"1.26", + "version":"1.27", "description": "roll anywhere from 1-8 dice at the same time", "icon": "app.png", "tags": "tool,game",