scripts/lever: allow commands without calling "list" first

develop
jj 2014-03-24 17:48:53 +01:00
parent 9c0fb61fd1
commit 47ccecc7dc
1 changed files with 4 additions and 0 deletions

@ -75,6 +75,9 @@ def lever_list
} }
end end
@lever_list ||= []
case $script_args[0] case $script_args[0]
when 'pull' when 'pull'
cheat = $script_args.delete('--cheat') || $script_args.delete('--now') cheat = $script_args.delete('--cheat') || $script_args.delete('--now')
@ -102,6 +105,7 @@ when /^\d+$/
puts lever_descr(bld) puts lever_descr(bld)
else else
puts <<EOS puts <<EOS
Lever control from the dfhack console Lever control from the dfhack console