Skip to content

Commit

Permalink
[minecraft-onedrive] Add defaults to link choice prompts; add prompts…
Browse files Browse the repository at this point in the history
… for mods and Xaero folders; remove old maps script
  • Loading branch information
scottdotweb committed Jan 11, 2024
1 parent 58738ac commit 0beb265
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 64 deletions.
24 changes: 13 additions & 11 deletions minecraft-onedrive/Linker.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@ function Get-Path-Prompt {
return "Enter the path to the $DirectoryType folder within your OneDrive folder, not including the path to OneDrive itself (eg. Games\Minecraft\$DirectoryType)"
}

# ---------------------------------------------------------------------------

function Make-Link {
Param($LinkType)

Expand All @@ -154,29 +152,33 @@ function Make-Link {
}

function Prompt-Link-Type {
Param($LinkType)
Param($LinkType, $DefaultChoice)

Write-Host "Do you want to link your $LinkType folder? [y/n]"
Write-Host "Do you want to link your $LinkType folder? [y/n] [default: $DefaultChoice]"

$DoLink = (Read-Host).ToLower()

if ($DoLink -eq "") { $DoLink = $DefaultChoice }

switch ($DoLink) {
"y" {
Make-Link $LinkType
$global:MadeLinks = $true
}

"n" { return }

default {
Write-Host "Please make a choice."
Prompt-Link-Type $LinkType
}
}
}

Prompt-Link-Type "saves"
Prompt-Link-Type "screenshots"
# ----------------------------------------------------------------------------

# TODO: hash(?) of folder names with labels for nicer phrasing

Prompt-Link-Type "mods" "y"
Prompt-Link-Type "saves" "y"
Prompt-Link-Type "screenshots" "y"
Prompt-Link-Type "XaeroWaypoints" "n"
Prompt-Link-Type "XaeroWorldMap" "n"

if ($MadeLinks) {
$ExitMessage = "Done. IMPORTANT: Make sure the folders in your OneDrive are set to 'always keep on this device'."
Expand Down
53 changes: 0 additions & 53 deletions minecraft-onedrive/XaeroMapsLinker.bat

This file was deleted.

0 comments on commit 0beb265

Please sign in to comment.