Kind of jank but the old functionality is back, and now needs to move to loot ui dealing with any container.

master
Zed A. Shaw 5 days ago
parent 812407c3df
commit 2c6565c40a
  1. 4
      gui/fsm.cpp
  2. 5
      gui/loot_ui.cpp

@ -334,6 +334,8 @@ namespace gui {
autowalking = true; autowalking = true;
break; break;
case KEY::L: case KEY::L:
$loot_ui.set_target($temp_loot);
$loot_ui.update();
event(Event::LOOT_OPEN); event(Event::LOOT_OPEN);
break; break;
case KEY::X: case KEY::X:
@ -468,6 +470,8 @@ namespace gui {
} break; } break;
case eGUI::LOOT_CONTAINER: { case eGUI::LOOT_CONTAINER: {
dbc::log("YEP container works."); dbc::log("YEP container works.");
$loot_ui.set_target($temp_loot);
$loot_ui.update();
event(Event::LOOT_OPEN); event(Event::LOOT_OPEN);
} break; } break;
case eGUI::HP_STATUS: case eGUI::HP_STATUS:

@ -58,7 +58,10 @@ namespace gui {
} }
void LootUI::update() { void LootUI::update() {
if(!$level.world->has<inventory::Model>($target)) return; if(!$level.world->has<inventory::Model>($target)) {
dbc::log("NO INV MODEL?!");
return;
}
auto& contents = $level.world->get<inventory::Model>($target); auto& contents = $level.world->get<inventory::Model>($target);

Loading…
Cancel
Save