update display for shops

This commit is contained in:
shoopea 2020-02-14 10:58:48 +08:00
parent 2c30cd80e4
commit 874a6c1a53

7
job.go
View File

@ -2274,7 +2274,12 @@ func jobShops(j Job) {
if cwm.Mana < cwm.ManaTotal {
t := (cwm.ManaTotal - cwm.Mana) / ((cwm.ManaTotal / 250) + 1)
d := time.Duration(t) * time.Minute
out = fmt.Sprintf("%s %s\n", out, d.String())
if d.Hours() > 0 {
out = fmt.Sprintf("%s%dh\n", out, d.Hours)
}
if d.Minutes() > 0 {
out = fmt.Sprintf("%s%dm\n", out, d.Minutes)
}
} else {
out = fmt.Sprintf("%s\n", out)
}