diff options
author | nfogravity <nfogravity@hotmail.com> | 2012-03-08 18:10:09 -0500 |
---|---|---|
committer | Michael Gagno <evilmike@gmail.com> | 2012-03-08 16:23:13 -0800 |
commit | 5fa2bd8180092219525aa9d5df3d404d02d7dd37 (patch) | |
tree | 172340dfe3dee3f24ed8914900231c8fe7ac266d /crawl-ref/source/dbg-util.cc | |
parent | e025ad37a0e6ea43dcec3d09d420ee52df1256da (diff) | |
download | crawl-ref-5fa2bd8180092219525aa9d5df3d404d02d7dd37.tar.gz crawl-ref-5fa2bd8180092219525aa9d5df3d404d02d7dd37.zip |
added a wizard mode function, wizard_file_input(), that takes a morgue file by name and changes skill levels and base stats to the morgue file's levels
Diffstat (limited to 'crawl-ref/source/dbg-util.cc')
-rw-r--r-- | crawl-ref/source/dbg-util.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/crawl-ref/source/dbg-util.cc b/crawl-ref/source/dbg-util.cc index a31b26cd10..bc7bf12057 100644 --- a/crawl-ref/source/dbg-util.cc +++ b/crawl-ref/source/dbg-util.cc @@ -358,20 +358,20 @@ void debug_dump_mon(const monster* mon, bool recurse) } } -//--------------------------------------------------------------- -// -// debug_prompt_for_skill -// -//--------------------------------------------------------------- -skill_type debug_prompt_for_skill(const char *prompt) +skill_type debug_prompt_for_skill(const char *prompt, bool fileinput) { - char specs[80]; + std::string spec; - msgwin_get_line_autohist(prompt, specs, sizeof(specs)); - - if (specs[0] == '\0') - return (SK_NONE); - std::string spec = lowercase_string(specs); + if(!fileinput) + { + char specs[80]; + msgwin_get_line_autohist(prompt, specs, sizeof(specs)); + if (specs[0] == '\0') + return (SK_NONE); + spec = lowercase_string(specs); + } + else + spec = lowercase_string(prompt); skill_type skill = SK_NONE; |