Rename reparent_entity
to reparent_entities
.
This commit is contained in:
parent
43d195869f
commit
1317c8691a
@ -49,8 +49,8 @@ pub const BRP_REMOVE_COMPONENTS_METHOD: &str = "world.remove_components";
|
|||||||
/// The method path for a `world.despawn_entity` request.
|
/// The method path for a `world.despawn_entity` request.
|
||||||
pub const BRP_DESPAWN_COMPONENTS_METHOD: &str = "world.despawn_entity";
|
pub const BRP_DESPAWN_COMPONENTS_METHOD: &str = "world.despawn_entity";
|
||||||
|
|
||||||
/// The method path for a `world.reparent_entity` request.
|
/// The method path for a `world.reparent_entities` request.
|
||||||
pub const BRP_REPARENT_ENTITY_METHOD: &str = "world.reparent_entity";
|
pub const BRP_REPARENT_ENTITIES_METHOD: &str = "world.reparent_entities";
|
||||||
|
|
||||||
/// The method path for a `world.list_components` request.
|
/// The method path for a `world.list_components` request.
|
||||||
pub const BRP_LIST_COMPONENTS_METHOD: &str = "world.list_components";
|
pub const BRP_LIST_COMPONENTS_METHOD: &str = "world.list_components";
|
||||||
@ -227,11 +227,11 @@ pub struct BrpInsertResourcesParams {
|
|||||||
pub value: Value,
|
pub value: Value,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// `world.reparent_entity`: Assign a new parent to one or more entities.
|
/// `world.reparent_entities`: Assign a new parent to one or more entities.
|
||||||
///
|
///
|
||||||
/// The server responds with a null.
|
/// The server responds with a null.
|
||||||
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
|
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
|
||||||
pub struct BrpReparentEntityParams {
|
pub struct BrpReparentEntitiesParams {
|
||||||
/// The IDs of the entities that are to become the new children of the
|
/// The IDs of the entities that are to become the new children of the
|
||||||
/// `parent`.
|
/// `parent`.
|
||||||
pub entities: Vec<Entity>,
|
pub entities: Vec<Entity>,
|
||||||
@ -1090,12 +1090,12 @@ pub fn process_remote_despawn_entity_request(
|
|||||||
Ok(Value::Null)
|
Ok(Value::Null)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Handles a `world.reparent_entity` request coming from a client.
|
/// Handles a `world.reparent_entities` request coming from a client.
|
||||||
pub fn process_remote_reparent_entity_request(
|
pub fn process_remote_reparent_entities_request(
|
||||||
In(params): In<Option<Value>>,
|
In(params): In<Option<Value>>,
|
||||||
world: &mut World,
|
world: &mut World,
|
||||||
) -> BrpResult {
|
) -> BrpResult {
|
||||||
let BrpReparentEntityParams {
|
let BrpReparentEntitiesParams {
|
||||||
entities,
|
entities,
|
||||||
parent: maybe_parent,
|
parent: maybe_parent,
|
||||||
} = parse_some(params)?;
|
} = parse_some(params)?;
|
||||||
|
@ -206,7 +206,7 @@
|
|||||||
//!
|
//!
|
||||||
//! `result`: null.
|
//! `result`: null.
|
||||||
//!
|
//!
|
||||||
//! ### `world.reparent_entity`
|
//! ### `world.reparent_entities`
|
||||||
//!
|
//!
|
||||||
//! Assign a new parent to one or more entities.
|
//! Assign a new parent to one or more entities.
|
||||||
//!
|
//!
|
||||||
@ -463,8 +463,8 @@ impl Default for RemotePlugin {
|
|||||||
builtin_methods::process_remote_despawn_entity_request,
|
builtin_methods::process_remote_despawn_entity_request,
|
||||||
)
|
)
|
||||||
.with_method(
|
.with_method(
|
||||||
builtin_methods::BRP_REPARENT_ENTITY_METHOD,
|
builtin_methods::BRP_REPARENT_ENTITIES_METHOD,
|
||||||
builtin_methods::process_remote_reparent_entity_request,
|
builtin_methods::process_remote_reparent_entities_request,
|
||||||
)
|
)
|
||||||
.with_method(
|
.with_method(
|
||||||
builtin_methods::BRP_LIST_COMPONENTS_METHOD,
|
builtin_methods::BRP_LIST_COMPONENTS_METHOD,
|
||||||
|
@ -11,7 +11,7 @@ The word `destroy` has also been replaced with `despawn` to match the rest of th
|
|||||||
| `bevy/query` | `world.query` |
|
| `bevy/query` | `world.query` |
|
||||||
| `bevy/spawn` | `world.spawn_entity` |
|
| `bevy/spawn` | `world.spawn_entity` |
|
||||||
| `bevy/destroy` | `world.despawn_entity` |
|
| `bevy/destroy` | `world.despawn_entity` |
|
||||||
| `bevy/reparent` | `world.reparent_entity` |
|
| `bevy/reparent` | `world.reparent_entities` |
|
||||||
| `bevy/get` | `world.get_components` |
|
| `bevy/get` | `world.get_components` |
|
||||||
| `bevy/insert` | `world.insert_components` |
|
| `bevy/insert` | `world.insert_components` |
|
||||||
| `bevy/remove` | `world.remove_components` |
|
| `bevy/remove` | `world.remove_components` |
|
||||||
|
Loading…
Reference in New Issue
Block a user