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)
|
.get(entity)
|
||||||
.copied();
|
.copied();
|
||||||
if let Some(pos) = pos {
|
if let Some(pos) = pos {
|
||||||
server
|
let object_type = match objtype {
|
||||||
.create_object(pos, comp::object::Body::random())
|
"Tent" => comp::object::Body::Tent,
|
||||||
.build();
|
"Bomb" => comp::object::Body::Bomb,
|
||||||
|
"_" => None
|
||||||
|
};
|
||||||
|
server.create_object(pos, object_type).build()
|
||||||
server
|
server
|
||||||
.clients
|
.clients
|
||||||
.notify(entity, ServerMsg::Chat(format!("Spawned object.")));
|
.notify(entity, ServerMsg::Chat(format!("Spawned object.")));
|
||||||
|
Loading…
Reference in New Issue
Block a user