Dev console refuses buildable piece materials; loose piece grains cleared on load (t97)
This commit is contained in:
@@ -73,6 +73,19 @@ with launch() as (browser, page, url):
|
||||
check('Ctrl+L clears output and keeps console focus', page.evaluate("$('dev-output').children.length === 0 && document.activeElement === $('dev-input')"))
|
||||
page.wait_for_timeout(100)
|
||||
check('Tab, arrows and Ctrl+L leave bot and game controls alone', page.evaluate("[bot.x, bot.y, bot.lamp, GAME.tool, $('bagpanel').hidden]") == position and page.evaluate('keys.size === 0 && !GAME.ctrl'))
|
||||
command('give saw 3')
|
||||
check('giving a saw explains building and leaves it out of the bag',
|
||||
'Saw is built from the build menu, not given.' in page.inner_text('#dev-output')
|
||||
and page.evaluate('bag[SAWB] === 0'))
|
||||
page.fill('#dev-input', 'give saw'); page.keyboard.press('Tab')
|
||||
check('Tab never offers the saw', page.input_value('#dev-input') == 'give saw')
|
||||
command('materials saw')
|
||||
check('material discovery omits construction pieces', 'No matching materials.' in page.inner_text('#dev-output'))
|
||||
command('give sand 7'); command('give copper bar 2'); command('give gate 3')
|
||||
check('ordinary grains and bars still arrive while gates are refused',
|
||||
page.evaluate('bag[SAND] === 7 && bag[BARCU] === 2 && bag[GATE] === 0'))
|
||||
page.screenshot(path=str(SHOTS / 't97-console.png'))
|
||||
command('clear')
|
||||
command('materials copperore')
|
||||
command('help give')
|
||||
command('give coperore')
|
||||
|
||||
Reference in New Issue
Block a user