diff --git a/gui/fsm.cpp b/gui/fsm.cpp index aa77969..d02dbff 100644 --- a/gui/fsm.cpp +++ b/gui/fsm.cpp @@ -334,6 +334,8 @@ namespace gui { autowalking = true; break; case KEY::L: + $loot_ui.set_target($temp_loot); + $loot_ui.update(); event(Event::LOOT_OPEN); break; case KEY::X: @@ -468,6 +470,8 @@ namespace gui { } break; case eGUI::LOOT_CONTAINER: { dbc::log("YEP container works."); + $loot_ui.set_target($temp_loot); + $loot_ui.update(); event(Event::LOOT_OPEN); } break; case eGUI::HP_STATUS: diff --git a/gui/loot_ui.cpp b/gui/loot_ui.cpp index 46830df..47644cd 100644 --- a/gui/loot_ui.cpp +++ b/gui/loot_ui.cpp @@ -58,7 +58,10 @@ namespace gui { } void LootUI::update() { - if(!$level.world->has($target)) return; + if(!$level.world->has($target)) { + dbc::log("NO INV MODEL?!"); + return; + } auto& contents = $level.world->get($target);