diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-20 00:14:41 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-20 00:14:41 +0000 |
commit | 10088136800dfcdaa0fcbc07a8232bc8170eaa05 (patch) | |
tree | 0dcb14e24cb544995d0283f56737d0186f9347a9 /crawl-ref/source | |
parent | 9cce2935d8da7147bebe3d4aeb4a4283b779f798 (diff) | |
download | crawl-ref-10088136800dfcdaa0fcbc07a8232bc8170eaa05.tar.gz crawl-ref-10088136800dfcdaa0fcbc07a8232bc8170eaa05.zip |
Clean-up of options in init.txt and crawl_options.txt
courtesy of maiermirk (1829976, 1831190).
This includes a lot of spacing changes, updates of
some examples and moving around some options into more
sensible groupings.
Highlights:
* add returning weapons to fire_order list
and allow fire_order to use += on new lines
(This should solve the second part of 1829475.)
* heap_brand now defaults to "reverse"
* detected_item_colour defaults to green
Also s/artifact/artefact.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2874 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/chardump.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/effects.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/externs.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/initfile.cc | 20 | ||||
-rw-r--r-- | crawl-ref/source/item_use.cc | 9 | ||||
-rw-r--r-- | crawl-ref/source/item_use.h | 23 | ||||
-rw-r--r-- | crawl-ref/source/items.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/mstuff2.cc | 2 |
8 files changed, 38 insertions, 24 deletions
diff --git a/crawl-ref/source/chardump.h b/crawl-ref/source/chardump.h index b6ce4b9fd0..93bcd29a15 100644 --- a/crawl-ref/source/chardump.h +++ b/crawl-ref/source/chardump.h @@ -8,7 +8,7 @@ * Change History (most recent first): * * <1> 4/20/99 JDJ Reformatted, uses string objects, split out - * 7 functions from dump_char, dumps artifact info. + * 7 functions from dump_char, dumps artefact info. */ diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 008146258f..cfbe5395e2 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -1864,7 +1864,7 @@ bool forget_inventory(bool quiet) break; } } - // Non-jewellery artifacts can easily be re-identified by + // Non-jewellery artefacts can easily be re-identified by // equipping them. else if (item.base_type != OBJ_JEWELLERY) unset_ident_flags(item, ISFLAG_KNOW_TYPE | ISFLAG_KNOW_PROPERTIES); diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index 582d77e898..eefc257348 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -1757,7 +1757,7 @@ private: const std::string &interrupt_names, bool append_interrupts, bool remove_interrupts); - void set_fire_order(const std::string &full); + void set_fire_order(const std::string &full, bool add); void add_fire_order_slot(const std::string &s); void set_menu_sort(std::string field); void new_dump_fields(const std::string &text, bool add = true); diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index e52f81bd13..31a3aff78a 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -275,6 +275,8 @@ static fire_type str_to_fire_types( const std::string &str ) return (FIRE_JAVELIN); else if (str == "net") return (FIRE_NET); + else if (str == "return" || str == "returning") + return (FIRE_RETURNING); return (FIRE_NONE); } @@ -642,7 +644,7 @@ void game_options::reset_options() item_colour = true; // [ds] Default to jazzy colours. - detected_item_colour = LIGHTGREEN; + detected_item_colour = GREEN; detected_monster_colour= LIGHTRED; classic_item_colours = false; @@ -698,8 +700,9 @@ void game_options::reset_options() fire_items_start = 2; // start at slot 'c' // Clear fire_order and set up the defaults. - set_fire_order("launcher, " - "javelin / dart / stone / rock / spear / net / handaxe"); + set_fire_order("launcher, return, " + "javelin / dart / stone / rock / spear / net / handaxe", + false); item_stack_summary_minimum = 5; @@ -717,16 +720,16 @@ void game_options::reset_options() sc_format = -1; friend_brand = CHATTR_NORMAL; - heap_brand = CHATTR_NORMAL; stab_brand = CHATTR_NORMAL; may_stab_brand = CHATTR_NORMAL; + heap_brand = CHATTR_REVERSE; stair_item_brand = CHATTR_REVERSE; trap_item_brand = CHATTR_NORMAL; no_dark_brand = true; #ifdef WIZARD - wiz_mode = WIZ_NO; + wiz_mode = WIZ_NO; #endif // map each colour to itself as default @@ -821,9 +824,10 @@ static unsigned read_symbol(std::string s) return (strtoul(s.c_str(), &tail, base)); } -void game_options::set_fire_order(const std::string &s) +void game_options::set_fire_order(const std::string &s, bool add) { - fire_order.clear(); + if (!add) + fire_order.clear(); std::vector<std::string> slots = split_string(",", s); for (int i = 0, size = slots.size(); i < size; ++i) add_fire_order_slot(slots[i]); @@ -1866,7 +1870,7 @@ void game_options::read_option_line(const std::string &str, bool runscript) } else if (key == "fire_order") { - set_fire_order(field); + set_fire_order(field, plus_equal); } else if (key == "random_pick") { diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 3e048b4b97..6920fdf814 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -1241,6 +1241,11 @@ static bool fire_item_matches(const item_def &item, unsigned fire_type) else if (item.base_type == OBJ_WEAPONS && is_throwable(item, you.body_size())) { + if ((fire_type & FIRE_RETURNING) && item.special == SPWPN_RETURNING + && item_ident(item, ISFLAG_KNOW_TYPE)) + { + return (true); + } if ((fire_type & FIRE_DAGGER) && item.sub_type == WPN_DAGGER) return (true); if ((fire_type & FIRE_SPEAR) && item.sub_type == WPN_SPEAR) @@ -2337,6 +2342,10 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus, msg::stream << item.name(DESC_CAP_THE) << " returns to your pack!" << std::endl; + + // Player saw the item return + if (!is_artefact(you.inv[throw_2])) + set_ident_flags(you.inv[throw_2], ISFLAG_KNOW_TYPE); } else dec_inv_item_quantity( throw_2, 1 ); diff --git a/crawl-ref/source/item_use.h b/crawl-ref/source/item_use.h index 1fe300ed7b..cc514d17d1 100644 --- a/crawl-ref/source/item_use.h +++ b/crawl-ref/source/item_use.h @@ -28,17 +28,18 @@ enum enchant_stat_type enum fire_type { - FIRE_NONE = 0x0000, - FIRE_LAUNCHER = 0x0001, - FIRE_DART = 0x0002, - FIRE_STONE = 0x0004, - FIRE_DAGGER = 0x0008, - FIRE_JAVELIN = 0x0010, - FIRE_SPEAR = 0x0020, - FIRE_HAND_AXE = 0x0040, - FIRE_CLUB = 0x0080, - FIRE_ROCK = 0x0100, - FIRE_NET = 0x0200 + FIRE_NONE = 0x0000, + FIRE_LAUNCHER = 0x0001, + FIRE_DART = 0x0002, + FIRE_STONE = 0x0004, + FIRE_DAGGER = 0x0008, + FIRE_JAVELIN = 0x0010, + FIRE_SPEAR = 0x0020, + FIRE_HAND_AXE = 0x0040, + FIRE_CLUB = 0x0080, + FIRE_ROCK = 0x0100, + FIRE_NET = 0x0200, + FIRE_RETURNING = 0x0400 }; struct bolt; diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index ebab0feb0a..a54bf66b49 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -673,7 +673,7 @@ void request_autopickup(bool do_pickup) will_autopickup = do_pickup; } -// 2 - artifact, 1 - glowing/runed, 0 - mundane +// 2 - artefact, 1 - glowing/runed, 0 - mundane static int item_name_specialness(const item_def& item) { // All jewellery is worth looking at. diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc index e895d2fae1..e2cd4e7828 100644 --- a/crawl-ref/source/mstuff2.cc +++ b/crawl-ref/source/mstuff2.cc @@ -1429,7 +1429,7 @@ bool mons_throw(struct monsters *monster, struct bolt &pbolt, int hand_used) << "!" << std::endl; // Player saw the item return - if (!is_artefact(mitm[hand_used])) + if (!is_artefact(item)) set_ident_flags(mitm[hand_used], ISFLAG_KNOW_TYPE); } |