wicked-waifus-rs/wicked-waifus-game-server/src/logic/components/concomitant.rs
xavo95 ab868a158a 2.2.2 (#3)
Ongoing changes for 2.2.2

Reviewed-on: WutheringSlaves/wicked-waifus-rs#3
2025-03-09 09:10:08 +00:00

22 lines
No EOL
771 B
Rust

use wicked_waifus_protocol::{ConcomitantsComponentPb, EntityComponentPb};
use wicked_waifus_protocol::entity_component_pb::ComponentPb;
use crate::logic::ecs::component::Component;
pub struct Concomitant {
pub vision_entity_id: i64,
pub custom_entity_ids: Vec<i64>,
pub phantom_role_id: i64,
}
impl Component for Concomitant {
fn set_pb_data(&self, pb: &mut wicked_waifus_protocol::EntityPb) {
pb.component_pbs.push(EntityComponentPb {
component_pb: Some(ComponentPb::ConcomitantsComponentPb(ConcomitantsComponentPb {
vision_entity_id: self.vision_entity_id,
custom_entity_ids: self.custom_entity_ids.clone(),
phantom_role_id: self.phantom_role_id,
})),
})
}
}