mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Comand for specific model spawning part I
This commit is contained in:
parent
f3c5ece983
commit
f6e24d8161
@ -458,9 +458,12 @@ fn handle_object(server: &mut Server, entity: EcsEntity, _args: String, _action:
|
||||
.get(entity)
|
||||
.copied();
|
||||
if let Some(pos) = pos {
|
||||
server
|
||||
.create_object(pos, comp::object::Body::random())
|
||||
.build();
|
||||
let object_type = match objtype {
|
||||
"Tent" => comp::object::Body::Tent,
|
||||
"Bomb" => comp::object::Body::Bomb,
|
||||
"_" => None
|
||||
};
|
||||
server.create_object(pos, object_type).build()
|
||||
server
|
||||
.clients
|
||||
.notify(entity, ServerMsg::Chat(format!("Spawned object.")));
|
||||
|
Loading…
Reference in New Issue
Block a user