summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-17 12:35:36 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-17 12:35:36 +0000
commit7a0cf4fa055dbebc676db78dde82881be8a6e6af (patch)
tree27b003fb1ae2982e2886f1a31975ab7a3be749cf /crawl-ref
parentab86f8464ed1b3f73f2e19e01a63089777d91c23 (diff)
downloadcrawl-ref-7a0cf4fa055dbebc676db78dde82881be8a6e6af.tar.gz
crawl-ref-7a0cf4fa055dbebc676db78dde82881be8a6e6af.zip
Fix 1931767: sort_menus not working for pickup menu
FR 1943597: Auto-inscribe god gifts with {god gift} including Xom gifts. These inscriptions do not (yet?) get cleared when the item is identified. Also, if it's not yet possible, menu_colour should work for the pickup menu, and init.txt should include a line colouring "god gift". git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4286 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/effects.cc2
-rw-r--r--crawl-ref/source/initfile.cc9
-rw-r--r--crawl-ref/source/religion.cc6
-rw-r--r--crawl-ref/source/xom.cc1
4 files changed, 16 insertions, 2 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 245e65548e..a245da13a2 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -1705,6 +1705,8 @@ bool acquirement(object_class_type class_wanted, int agent,
}
}
+ if (agent == you.religion)
+ thing.inscription = "god gift";
move_item_to_grid( &thing_created, you.x_pos, you.y_pos );
// This should never actually be NON_ITEM because of the way
diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc
index 05babe80c1..d9a8d3603e 100644
--- a/crawl-ref/source/initfile.cc
+++ b/crawl-ref/source/initfile.cc
@@ -1532,6 +1532,15 @@ void game_options::set_menu_sort(std::string field)
return;
menu_sort_condition cond(field);
+ // Override existing values, if necessary.
+ for (unsigned int i = 0; i < sort_menus.size(); i++)
+ if (sort_menus[i].mtype == cond.mtype)
+ {
+ sort_menus[i].sort = cond.sort;
+ sort_menus[i].cmp = cond.cmp;
+ return;
+ }
+
sort_menus.push_back(cond);
}
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 218b315ab0..21e92080ec 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -758,6 +758,7 @@ static void _give_nemelex_gift()
deck.special = rarity;
deck.colour = deck_rarity_to_color(rarity);
+ deck.inscription = "god gift";
move_item_to_grid( &thing_created, you.x_pos, you.y_pos );
origin_acquired(deck, you.religion);
@@ -783,8 +784,8 @@ bool is_tso_follower(const monsters* mon)
bool is_orcish_follower(const monsters* mon)
{
return (mon->alive() && mons_species(mon->type) == MONS_ORC
- && mon->attitude == ATT_FRIENDLY
- && (mon->flags & MF_GOD_GIFT));
+ && mon->attitude == ATT_FRIENDLY
+ && (mon->flags & MF_GOD_GIFT));
}
bool is_follower(const monsters* mon)
@@ -1401,6 +1402,7 @@ static void _do_god_gift(bool prayed_for)
if (thing_created != NON_ITEM)
{
success = true;
+ mitm[thing_created].inscription = "god gift";
origin_acquired(mitm[thing_created], you.religion);
}
}
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc
index fc7cb320c8..91ee3abbd9 100644
--- a/crawl-ref/source/xom.cc
+++ b/crawl-ref/source/xom.cc
@@ -220,6 +220,7 @@ static void xom_make_item(object_class_type base,
god_acting gdact(GOD_XOM);
move_item_to_grid( &thing_created, you.x_pos, you.y_pos );
+ mitm[thing_created].inscription = "god gift";
canned_msg(MSG_SOMETHING_APPEARS);
stop_running();