(where, name, amount)
| 216 | } |
| 217 | |
| 218 | async function putInFurnace (where, name, amount) { |
| 219 | const item = itemByName(furnace.items(), name) |
| 220 | if (item) { |
| 221 | const fn = { |
| 222 | input: furnace.putInput, |
| 223 | fuel: furnace.putFuel |
| 224 | }[where] |
| 225 | try { |
| 226 | await fn.call(furnace, item.type, null, amount) |
| 227 | bot.chat(`put ${amount} ${item.name}`) |
| 228 | } catch (err) { |
| 229 | bot.chat(`unable to put ${amount} ${item.name}`) |
| 230 | } |
| 231 | } else { |
| 232 | bot.chat(`unknown item ${name}`) |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | async function takeFromFurnace (what) { |
| 237 | const fn = { |
no test coverage detected
searching dependent graphs…