M crates/unified/src/shared/attachment.rs => crates/unified/src/shared/attachment.rs +4 -1
@@ 18,8 18,10 @@ use bevy::ecs::entity::MapEntities;
use crate::prelude::*;
use serde::{Deserialize, Serialize};
use std::ops::Deref;
+use bevy_replicon::shared::replication::Replicated;
#[derive(Component, Serialize, Deserialize)]
+#[require(Replicated)]
/// The primary component for a ship structure. Will be present on Hearty
pub struct Ship;
@@ 37,7 39,7 @@ pub struct Parts(#[entities] Vec<Entity>);
pub struct PartInShip(#[entities] pub Entity);
#[derive(Component, Serialize, Deserialize)]
-#[require(Transform)]
+#[require(Transform, Replicated)]
/// A `Joint` is a separate entity (child of a part) that represents a single possible attachment
/// point for that part.
pub struct Joint {
@@ 71,6 73,7 @@ impl Deref for Joints {
}
#[derive(Component, Serialize, Deserialize, MapEntities)]
+#[require(Replicated)]
#[relationship(relationship_target = Snaps)]
/// The `Part` that this Snap belongs to. A Snap is an internal entity used for snapping during
/// the attachment routine. Managed automatically.
M crates/unified/src/shared/ecs/thruster.rs => crates/unified/src/shared/ecs/thruster.rs +2 -0
@@ 4,6 4,7 @@ use bevy::math::Vec2;
use bevy::prelude::Bundle;
use serde::{Deserialize, Serialize};
use crate::prelude::{ChildOf, Component, Entity, Transform};
+use bevy_replicon::shared::replication::Replicated;
#[derive(Serialize, Deserialize, PartialEq, Eq, Clone)]
pub struct ThrusterId(pub String);
@@ 30,6 31,7 @@ impl Deref for PartThrusters {
pub struct ThrusterOfPart(#[entities] pub Entity);
#[derive(Component, Serialize, Deserialize)]
+#[require(Replicated)]
pub struct Thruster {
pub id: ThrusterId,
pub thrust_vector: Vec2,
M crates/xtask/src/unified.rs => crates/xtask/src/unified.rs +4 -4
@@ 14,12 14,12 @@ impl Task for RunServerNative {
fn run(&self, args: Vec<String>) {
let args = if args.is_empty() {
- "-b [::]:5151 -r 60 -c 10".to_string()
+ "--management-bind [::]:5151 --native-bind [::]:5152 --wt-bind [::]:5153".to_string()
} else {
args.join(" ")
};
set_current_dir(workspace_dir().join("crates/unified/")).unwrap();
- cargo(format!("run -F native -F native_dev -F server --package starkingdoms -- server {args}"));
+ cargo(format!("run -F native_dev --package starkingdoms -- server {args}"));
}
}
@@ 56,11 56,11 @@ impl Task for RunClientNative {
fn run(&self, args: Vec<String>) {
let args = if args.is_empty() {
- "-s [::]:5151".to_string()
+ "-s http://127.0.0.1:5151".to_string()
} else {
args.join(" ")
};
set_current_dir(workspace_dir().join("crates/unified/")).unwrap();
- cargo(format!("run -F native -F native_dev -F client --package starkingdoms -- client {args}"));
+ cargo(format!("run -F native_dev --package starkingdoms -- client {args}"));
}
}=
\ No newline at end of file