test
This commit is contained in:
parent
0f3b39295d
commit
9b43ca47bb
21
job.go
21
job.go
@ -1862,6 +1862,27 @@ func jobCraftItem(j Job) {
|
||||
|
||||
/* we can finish the job */
|
||||
|
||||
out := fmt.Sprintf("Summary for <b>%s</b>\n", item.Name[0])
|
||||
out = fmt.Sprint("%s<code> Mana : %d</code>\n", out, totalMana)
|
||||
out = fmt.Sprint("%s<pre> Items :</pre>\n", out)
|
||||
for k, v := range requiredItems {
|
||||
obj, _ := getObjItem(getObjItemId(k))
|
||||
ava, _ := availableItems[k]
|
||||
out = fmt.Sprintf("%s<code> [%s] %s : %d (%d)</code>\n", out, obj.Code, obj.Name[0], v, ava)
|
||||
}
|
||||
out = fmt.Sprint("%s<pre> Missing :</pre>\n", out)
|
||||
for k, v := range missingItems {
|
||||
obj, _ := getObjItem(getObjItemId(k))
|
||||
out = fmt.Sprintf("%s<code> [%s] %s : %d</code>\n", out, obj.Code, obj.Name[0], v)
|
||||
}
|
||||
out = fmt.Sprint("%s<pre> To craft :</pre>\n", out)
|
||||
for k, v := range craftItems {
|
||||
obj, _ := getObjItem(getObjItemId(k))
|
||||
out = fmt.Sprintf("%s<code> [%s] %s : %d</code>\n", out, obj.Code, obj.Name[0], v)
|
||||
}
|
||||
|
||||
log.Printf("jobCraftItem[%s] : Output :\n%s\n", item.Code, out)
|
||||
|
||||
err = setJobDone(j.ID64)
|
||||
logOnError(err, "jobCraftItem : setJobDone")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user