mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
add 'entity.despawn' command
This commit is contained in:
parent
c9958c9718
commit
41a22938d6
8 changed files with 41 additions and 5 deletions
|
|
@ -105,10 +105,10 @@ std::shared_ptr<UINode> create_debug_panel(
|
|||
}
|
||||
}));
|
||||
panel->add(create_label([=]() {
|
||||
const auto& selection = player->selection;
|
||||
if (selection.entity == ENTITY_NONE) {
|
||||
auto eid = player->getSelectedEntity();
|
||||
if (eid == ENTITY_NONE) {
|
||||
return std::wstring {L"entity: -"};
|
||||
} else if (auto entity = level->entities->get(selection.entity)) {
|
||||
} else if (auto entity = level->entities->get(eid)) {
|
||||
return L"entity: "+util::str2wstr_utf8(entity->getDef().name)+
|
||||
L" uid: "+std::to_wstring(entity->getUID());
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue