Rename to GameDB and GameDB::Level.
This commit is contained in:
parent
c46927ea10
commit
a20d701096
23 changed files with 142 additions and 151 deletions
|
@ -74,7 +74,7 @@ namespace gui {
|
|||
}
|
||||
|
||||
void StatusUI::update() {
|
||||
auto world = Game::current_world();
|
||||
auto world = GameDB::current_world();
|
||||
auto player = world->get_the<components::Player>();
|
||||
auto& inventory = world->get<inventory::Model>(player.entity);
|
||||
|
||||
|
@ -112,7 +112,7 @@ namespace gui {
|
|||
}
|
||||
|
||||
bool StatusUI::place_slot(guecs::Entity gui_id, DinkyECS::Entity world_entity) {
|
||||
auto& level = Game::current();
|
||||
auto& level = GameDB::current();
|
||||
auto& slot_name = $gui.name_for(gui_id);
|
||||
auto& inventory = level.world->get<inventory::Model>(level.player);
|
||||
|
||||
|
@ -133,7 +133,7 @@ namespace gui {
|
|||
|
||||
// NOTE: do I need this or how does it relate to drop_item?
|
||||
void StatusUI::remove_slot(guecs::Entity slot_id) {
|
||||
auto player = Game::the_player();
|
||||
auto player = GameDB::the_player();
|
||||
auto& slot_name = $gui.name_for(slot_id);
|
||||
System::remove_from_container(player, slot_name);
|
||||
update();
|
||||
|
@ -141,7 +141,7 @@ namespace gui {
|
|||
|
||||
void StatusUI::swap(guecs::Entity gui_a, guecs::Entity gui_b) {
|
||||
if(gui_a != gui_b) {
|
||||
auto player = Game::the_player();
|
||||
auto player = GameDB::the_player();
|
||||
auto& a_name = $gui.name_for(gui_a);
|
||||
auto& b_name = $gui.name_for(gui_b);
|
||||
System::inventory_swap(player, a_name, b_name);
|
||||
|
@ -151,7 +151,7 @@ namespace gui {
|
|||
}
|
||||
|
||||
bool StatusUI::occupied(guecs::Entity slot) {
|
||||
auto player = Game::the_player();
|
||||
auto player = GameDB::the_player();
|
||||
return System::inventory_occupied(player, $gui.name_for(slot));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue