Skip to content

Commit

Permalink
Revert shop menu changes
Browse files Browse the repository at this point in the history
Extremely broken in webtiles.

"things that work: selecting items for purchase, hitting esc to exit.
things that are completely broken: purchasing, shopping lists.
things that are half-broken: changing the sorting (works but doesn't
refresh)
bonus brokenness: claims you can hit r-click to exit."

This reverts commit 171f012.

This reverts commit f46c1db.
  • Loading branch information
PleasingFungus committed Dec 31, 2015
1 parent 4b97851 commit 5edc98f
Show file tree
Hide file tree
Showing 13 changed files with 1,513 additions and 860 deletions.
2 changes: 1 addition & 1 deletion crawl-ref/source/directn.cc
Expand Up @@ -3015,7 +3015,7 @@ string feature_description_at(const coord_def& where, bool covering,
return thing_do_grammar(dtype, add_stop, false, "an abandoned shop");

case DNGN_ENTER_SHOP:
return shop_name(*shop_at(where)) + (add_stop ? "." : "");
return shop_name(where, add_stop);

#if TAG_MAJOR_VERSION == 34
case DNGN_ENTER_PORTAL_VAULT:
Expand Down
2 changes: 1 addition & 1 deletion crawl-ref/source/hints.cc
Expand Up @@ -1662,7 +1662,7 @@ void learned_something_new(hints_event_type seen_what, coord_def gc)
case HINT_SEEN_SHOP:
#ifdef USE_TILE
tiles.place_cursor(CURSOR_TUTORIAL, gc);
tiles.add_text_tag(TAG_TUTORIAL, shop_name(*shop_at(gc)), gc);
tiles.add_text_tag(TAG_TUTORIAL, shop_name(gc), gc);
#else
// Is a monster blocking the view?
if (monster_at(gc))
Expand Down
2 changes: 1 addition & 1 deletion crawl-ref/source/invent.cc
Expand Up @@ -152,7 +152,7 @@ bool InvEntry::is_art() const

bool InvEntry::is_equipped() const
{
if (item->link == -1 || item->pos != ITEM_IN_INVENTORY)
if (item->link == -1 || item->pos.x != -1 || item->pos.y != -1)
return false;

for (int i = 0; i < NUM_EQUIP; i++)
Expand Down
14 changes: 8 additions & 6 deletions crawl-ref/source/menu.cc
Expand Up @@ -125,7 +125,6 @@ void MenuDisplayText::draw_more()
{
cgotoxy(1, m_menu->get_y_offset() + m_menu->get_pagesize() -
count_linebreaks(m_menu->get_more()));
textcolour(LIGHTGREY);
m_menu->get_more().display();
}

Expand Down Expand Up @@ -666,15 +665,18 @@ bool Menu::process_key(int keyin)
if (!isadigit(keyin))
num = -1;

if (nav && repaint || always_redraw())
if (nav)
{
if (repaint)
{
#ifdef USE_TILE_WEB
webtiles_update_scroll_pos();
webtiles_update_scroll_pos();
#endif
draw_menu();
draw_menu();
}
else if (allow_easy_exit() && is_set(MF_EASY_EXIT))
return false;
}
else if (nav && allow_easy_exit() && is_set(MF_EASY_EXIT))
return false;
return true;
}

Expand Down
1 change: 0 additions & 1 deletion crawl-ref/source/menu.h
Expand Up @@ -489,7 +489,6 @@ class Menu
virtual bool allow_easy_exit() const;

virtual string help_key() const { return ""; }
virtual bool always_redraw() const { return false; }
};

/// Allows toggling by specific keys.
Expand Down

0 comments on commit 5edc98f

Please sign in to comment.