From 8a504d20b9992fea2daac06faa6ca5559ca63ae0 Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Tue, 29 Dec 2009 22:43:19 -0800 Subject: Give move/copy_item_to_grid responsibility for hazardous terrain We now have much less duplication of logic, yay. --- crawl-ref/source/wiz-item.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crawl-ref/source/wiz-item.cc') diff --git a/crawl-ref/source/wiz-item.cc b/crawl-ref/source/wiz-item.cc index 6fa4b411b0..1bdce290dd 100644 --- a/crawl-ref/source/wiz-item.cc +++ b/crawl-ref/source/wiz-item.cc @@ -50,6 +50,9 @@ static void _make_all_books() move_item_to_grid(&thing, you.pos()); + if (thing == NON_ITEM) + continue; + item_def book(mitm[thing]); mark_had_book(book); -- cgit v1.2.3-54-g00ecf