Browse Source

updated readme and reduced frequency of fantasy messsages

main
deicidus 3 years ago
parent
commit
7cde163a84
  1. 4
      README.md
  2. 7
      index.js
  3. 2
      scripts/util.js
  4. 5
      scripts/welcome.js

4
README.md

@ -27,7 +27,7 @@ These features work right now:
* `ao-cli` can self-update to the newest version
* Run AO unit tests to verify the up-to-spec functioning of the system's running AO API server
* Easily view installed/running status of optional AO features
* Add `ao` alias for `ao-cli` (under Features→ao-cli)
* Add `ao` alias for `ao-cli` (under `Features→ao-cli`)
* Detects your OS, with support for Debian/Ubuntu, Arch/Manjaro, and Fedora (MacOS planned)
## Upcoming Features
@ -46,6 +46,7 @@ These features are planned and many are mocked up in the menus:
* Full interactive wizard to walk you through setting up and connecting new AO hardware resources to your AO server
* Terminal spellbook to save and trade your favorite UNIX commands
* AO server using AO features via ao-cli command line switches (with optional sound notifications on server computer)
* Enchant your 'cd' command to narrate your travels through the UNIX filesystem (under `Features→ao-cli`) (less annoying than it sounds, easy to disable)
## Important Locations
@ -60,6 +61,7 @@ These features are planned and many are mocked up in the menus:
## Version History
* 0.1.3 Added fantasy hook feature to bring the AO MUD aesthetic into the terminal
* 0.1.2 Improved install wizard
* 0.1.1 AO install wizard partway done, reorganized project repos, 'Check AO install' feature works
* 0.1.0 View, create or recall, upboat and downboat priorities; partial AO install wizard

7
index.js

@ -13,7 +13,7 @@ import useAoMenu from './scripts/ao.js'
import aoInstallWizard, { chooseAoVersion, checkAo } from './scripts/wizard.js'
import testsMenu from './scripts/tests.js'
import { headerStyle } from './scripts/styles.js'
import { sleep } from './scripts/util.js'
import { sleep, randomInt } from './scripts/util.js'
import './scripts/strings.js'
// Import AO modular features
@ -161,7 +161,10 @@ async function handleArgs(args) {
return false
case '--interstitial':
case '-cd':
console.log(wander(args[1]))
// Don't say a message every time or it will annoy everybody
if(randomInt(0, 6) === 0) {
console.log(wander(args[1]))
}
return false
}
return true

2
scripts/util.js

@ -1,7 +1,7 @@
// General helper functions
// Returns a random int between min and max (inclusive)
function randomInt(min, max) {
export function randomInt(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min + 1)) + min;

5
scripts/welcome.js

@ -98,10 +98,6 @@ export function farewell() {
console.log(chalk.yellow.bold(selectRandom(farewellMessages)))
}
export function wander() {
//console.lo(selectRa))
}
// Asks the given yes or no answer returns true or false for their response
export async function yesOrNo(prompt = 'Yes or no?', defaultAnswer = true) {
const answer = await inquirer.prompt({
@ -124,4 +120,3 @@ export async function askQuestionText(prompt = 'Please enter a string:', promptO
const answer = await inquirer.prompt(options)
return answer.text
}

Loading…
Cancel
Save