Add repair command to repair using inventory item

This commit is contained in:
Marc Di Luzio 2020-06-27 01:35:09 +01:00
parent 7957454ec1
commit 693b8a54f1
7 changed files with 97 additions and 5 deletions

View file

@ -26,12 +26,16 @@ func printUsage() {
fmt.Fprintln(os.Stderr, "\nCommands")
fmt.Fprintln(os.Stderr, "\tstatus prints the server status")
fmt.Fprintln(os.Stderr, "\tregister NAME registers an account and stores it (use with -name)")
fmt.Fprintln(os.Stderr, "\tcommands COMMAND [VAL...] issues move command to rover")
fmt.Fprintln(os.Stderr, "\tcommands COMMAND [VAL...] issues move command to rover, see below")
fmt.Fprintln(os.Stderr, "\tradar gathers radar data for the current rover")
fmt.Fprintln(os.Stderr, "\trover gets data for current rover")
fmt.Fprintln(os.Stderr, "\tconfig [HOST] outputs the local config info, optionally sets host")
fmt.Fprintln(os.Stderr, "\thelp outputs this usage information")
fmt.Fprintln(os.Stderr, "\tversion outputs version info")
fmt.Fprintln(os.Stderr, "\nRover commands:")
fmt.Fprintln(os.Stderr, "\tmove BEARING moves the rover in the chosen direction")
fmt.Fprintln(os.Stderr, "\tstash stores the object at the rover location in the inventory")
fmt.Fprintln(os.Stderr, "\trepair uses an inventory object to repair the rover")
fmt.Fprintln(os.Stderr, "\nEnvironment")
fmt.Fprintln(os.Stderr, "\tROVE_USER_DATA path to user data, defaults to "+defaultDataPath)
}

View file

@ -52,6 +52,7 @@ func Test_InnerMain(t *testing.T) {
// Give it commands
assert.NoError(t, InnerMain("commands", "move", "N"))
assert.NoError(t, InnerMain("commands", "stash"))
assert.NoError(t, InnerMain("commands", "repair"))
// Give it malformed commands
assert.Error(t, InnerMain("commands", "move", "stash"))