diff --git a/common/src/event.rs b/common/src/event.rs index 265b6e6ba9..c146274846 100644 --- a/common/src/event.rs +++ b/common/src/event.rs @@ -126,7 +126,6 @@ pub enum ServerEvent { CreateShip { pos: comp::Pos, ship: comp::ship::Body, - level: u16, mountable: bool, agent: Option, rtsim_entity: Option, diff --git a/server/src/cmd.rs b/server/src/cmd.rs index 4c106cf43a..c74c4005fb 100644 --- a/server/src/cmd.rs +++ b/server/src/cmd.rs @@ -1008,7 +1008,7 @@ fn handle_spawn_airship( }); let mut builder = server .state - .create_ship(pos, comp::ship::Body::DefaultAirship, 1, true) + .create_ship(pos, comp::ship::Body::DefaultAirship, true) .with(LightEmitter { col: Rgb::new(1.0, 0.65, 0.2), strength: 2.0, diff --git a/server/src/events/entity_creation.rs b/server/src/events/entity_creation.rs index 9ce2a04f91..7fc859e3ef 100644 --- a/server/src/events/entity_creation.rs +++ b/server/src/events/entity_creation.rs @@ -114,12 +114,11 @@ pub fn handle_create_ship( server: &mut Server, pos: comp::Pos, ship: comp::ship::Body, - level: u16, mountable: bool, agent: Option, rtsim_entity: Option, ) { - let mut entity = server.state.create_ship(pos, ship, level, mountable); + let mut entity = server.state.create_ship(pos, ship, mountable); if let Some(agent) = agent { entity = entity.with(agent); } diff --git a/server/src/events/mod.rs b/server/src/events/mod.rs index 29c3ff7764..c5cf32c982 100644 --- a/server/src/events/mod.rs +++ b/server/src/events/mod.rs @@ -165,11 +165,10 @@ impl Server { ServerEvent::CreateShip { pos, ship, - level, mountable, agent, rtsim_entity, - } => handle_create_ship(self, pos, ship, level, mountable, agent, rtsim_entity), + } => handle_create_ship(self, pos, ship, mountable, agent, rtsim_entity), ServerEvent::CreateWaypoint(pos) => handle_create_waypoint(self, pos), ServerEvent::ClientDisconnect(entity) => { frontend_events.push(handle_client_disconnect(self, entity)) diff --git a/server/src/rtsim/tick.rs b/server/src/rtsim/tick.rs index 744c6b4185..238e921566 100644 --- a/server/src/rtsim/tick.rs +++ b/server/src/rtsim/tick.rs @@ -115,7 +115,6 @@ impl<'a> System<'a> for Sys { comp::Body::Ship(ship) => ServerEvent::CreateShip { pos, ship, - level: 1, mountable: false, agent, rtsim_entity, diff --git a/server/src/state_ext.rs b/server/src/state_ext.rs index 8e43dd5f93..3a3dd43a81 100644 --- a/server/src/state_ext.rs +++ b/server/src/state_ext.rs @@ -46,7 +46,6 @@ pub trait StateExt { &mut self, pos: comp::Pos, ship: comp::ship::Body, - level: u16, mountable: bool, ) -> EcsEntityBuilder; /// Build a projectile @@ -231,7 +230,6 @@ impl StateExt for State { &mut self, pos: comp::Pos, ship: comp::ship::Body, - level: u16, mountable: bool, ) -> EcsEntityBuilder { let mut builder = self @@ -252,10 +250,8 @@ impl StateExt for State { .with(comp::CharacterState::default()) // TODO: some of these are required in order for the character_behavior system to // recognize a possesed airship; that system should be refactored to use `.maybe()` - .with(comp::Energy::new(ship.into(), level)) - //.with(comp::Health::new(ship.into(), level)) + .with(comp::Energy::new(ship.into(), 0)) .with(comp::Stats::new("Airship".to_string())) - .with(comp::Buffs::default()) .with(comp::Combo::default()); if mountable {