From 10088136800dfcdaa0fcbc07a8232bc8170eaa05 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Tue, 20 Nov 2007 00:14:41 +0000 Subject: 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 --- crawl-ref/source/item_use.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'crawl-ref/source/item_use.cc') 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 ); -- cgit v1.2.3-54-g00ecf