fix
This commit is contained in:
parent
123479def5
commit
8c51bed9d2
6
job.go
6
job.go
@ -2007,9 +2007,9 @@ func jobCraftAll(j Job) {
|
||||
muxObjItem.RUnlock()
|
||||
|
||||
for _, i := range p2.Vault {
|
||||
if item, ok := itemsParts[i.ItemID64]; ok {
|
||||
if item, ok := itemParts[i.ItemID64]; ok {
|
||||
totalParts[item] = i.Quantity
|
||||
} else if item, ok := itemsRecipes[i.ItemID64]; ok {
|
||||
} else if item, ok := itemRecipes[i.ItemID64]; ok {
|
||||
totalRecipes[item] = i.Quantity
|
||||
}
|
||||
}
|
||||
@ -2018,7 +2018,7 @@ func jobCraftAll(j Job) {
|
||||
recipes, _ := totalRecipes[k]
|
||||
parts, _ := totalParts[k]
|
||||
if (recipes > 0 && parts > (i-1)) || (parts >= i) {
|
||||
completeItems[k] = MinInt64(recipes*i, parts) / i
|
||||
completeItems[k] = float64(MinInt64(recipes*i, parts) / i)
|
||||
maxItems = MaxInt64(maxItems, int64(completeItems[k]))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user