mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
make Spawn Entities tab in admin commands
This commit is contained in:
parent
f14d312ac3
commit
17cd291613
@ -203,7 +203,7 @@ lazy_static! {
|
||||
};
|
||||
|
||||
/// List of all entity configs. Useful for tab completing
|
||||
static ref ENTITY_CONFIGS: Vec<String> = {
|
||||
pub static ref ENTITY_CONFIGS: Vec<String> = {
|
||||
try_all_entity_configs()
|
||||
.unwrap_or_else(|e| {
|
||||
warn!(?e, "Failed to load entity configs");
|
||||
|
@ -13,6 +13,16 @@ lazy_static! {
|
||||
item_specs
|
||||
};
|
||||
}
|
||||
lazy_static! {
|
||||
static ref ITEM_CONFIGS: Vec<String> = {
|
||||
let mut item_configs = common::cmd::ITEM_CONFIGS
|
||||
.iter()
|
||||
.map(|entity_desc| entity_desc.replace("common.entity.", ""))
|
||||
.collect::<Vec<String>>();
|
||||
entity_configs.sort();
|
||||
entity_confifs
|
||||
};
|
||||
}
|
||||
|
||||
pub fn draw_admin_commands_window(
|
||||
ctx: &CtxRef,
|
||||
@ -37,6 +47,11 @@ pub fn draw_admin_commands_window(
|
||||
.show(ui, |ui| {
|
||||
draw_kits(ui, state, egui_actions);
|
||||
});
|
||||
CollapsingHeader::new("Spawn Entities")
|
||||
.default_open(false)
|
||||
.show(ui, |ui| {
|
||||
draw_spawn_entities(ui, state, egui_actions);
|
||||
})
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user