Skip to content

Commit

Permalink
Add aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
Wieku committed May 25, 2019
1 parent 6d4ba6f commit 46393a7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ danser <arguments>
```

#### Arguments
* `-artist="NOMA"`
* `-title="Brain Power"`
* `-difficulty="Overdrive"`
* `-creator="Skystar"`
* `-artist="NOMA"` or `-a="NOMA"`
* `-title="Brain Power"` or `-t="Brain Power"`
* `-difficulty="Overdrive"` or `-d="Overdrive"`
* `-creator="Skystar"` or `-c="Skystar"`
* `-cursors=2` - number of cursors used in mirror collage
* `-tag=2` - number of TAG cursors
* `-speed=1.5` - music speed. Value of 1.5 equals to osu!'s DoubleTime
Expand Down
15 changes: 13 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,17 @@ func run() {
mainthread.Call(func() {

artist := flag.String("artist", "", "")
artistS := flag.String("a", "", "")

title := flag.String("title", "", "")
titleS := flag.String("t", "", "")

difficulty := flag.String("difficulty", "", "")
difficultyS := flag.String("d", "", "")

creator := flag.String("creator", "", "")
creatorS := flag.String("c", "", "")

settingsVersion := flag.Int("settings", 0, "")
cursors := flag.Int("cursors", 2, "")
tag := flag.Int("tag", 1, "")
Expand All @@ -53,7 +61,7 @@ func run() {

flag.Parse()

if (*artist + *title + *difficulty + *creator) == "" {
if (*artist + *title + *difficulty + *creator + *artistS + *titleS + *difficultyS + *creatorS) == "" {
log.Println("No beatmap specified, closing...")
os.Exit(0)
}
Expand All @@ -79,7 +87,10 @@ func run() {
beatmaps := database.LoadBeatmaps()

for _, b := range beatmaps {
if (*artist == "" || *artist == b.Artist) && (*title == "" || *title == b.Name) && (*difficulty == "" || *difficulty == b.Difficulty) && (*creator == "" || *creator == b.Creator) {
if (*artist == "" || *artist == b.Artist) && (*artistS == "" || *artistS == b.Artist) &&
(*title == "" || *title == b.Name) && (*titleS == "" || *titleS == b.Name) &&
(*difficulty == "" || *difficulty == b.Difficulty) && (*difficultyS == "" || *difficultyS == b.Difficulty) &&
(*creator == "" || *creator == b.Creator) && (*creatorS == "" || *creatorS == b.Creator) {
beatMap = b
beatMap.UpdatePlayStats()
database.UpdatePlayStats(beatMap)
Expand Down

0 comments on commit 46393a7

Please sign in to comment.