summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dungeon.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2014-05-11 18:41:57 -0600
committerSteve Melenchuk <smelenchuk@gmail.com>2014-05-11 18:47:32 -0600
commit0fb9ce809de201a9b98bcab123a90a3d44ddef56 (patch)
tree0cc6eb544da7ff3b285137a1e248d64501afb6ef /crawl-ref/source/dungeon.cc
parent8dfefae69642d95eb191729af4910d69ac9c357d (diff)
downloadcrawl-ref-0fb9ce809de201a9b98bcab123a90a3d44ddef56.tar.gz
crawl-ref-0fb9ce809de201a9b98bcab123a90a3d44ddef56.zip
Refactor / remove some less important / unnecessary Gozag code.
In particular, the potion and shop lists don't need to be generated in advance of using the ability altogether; they only last as long as the ability menu is present (thus they're still stored, as if you get a HUP in the middle of it we want to present the same choices). Since shop prices no longer depend on the generated shops, item generation for the shops is left to the shops. (If we want to preserve their item quality, we'll need a level_number paramter in shop specs, but I doubt players will notice the difference at all.) RIP item_def::to_spec; you will not be missed.
Diffstat (limited to 'crawl-ref/source/dungeon.cc')
-rw-r--r--crawl-ref/source/dungeon.cc13
1 files changed, 1 insertions, 12 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index 3885020cb3..8a382c322d 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -3348,18 +3348,7 @@ static void _place_gozag_shop(dungeon_feature_type stair)
keyed_mapspec kmspec;
kmspec.set_feat(you.props[key].get_string(), false);
if (!kmspec.get_feat().shop.get())
- {
- mprf(MSGCH_ERROR, "Tried to place an invalid shop spec!");
- mprf(MSGCH_ERROR, "Spec is, \"%s\"", spec.c_str());
- mprf(MSGCH_ERROR, "Please show someone this spec so the underlying "
- "bug can be fixed!");
- mprf(MSGCH_ERROR, "Falling back to just name and type...");
- vector<string> parts = split_string(";", spec);
- ASSERT(parts.size() > 0);
- kmspec.set_feat(parts[0], false);
- if (!kmspec.get_feat().shop.get())
- die("Invalid shop spec?");
- }
+ die("Invalid shop spec?");
place_spec_shop(*shop_place, kmspec.get_feat().shop.get());
shop_struct *shop = get_shop(*shop_place);