mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Remove level
from create_ship
and CreateShip
.
This commit is contained in:
parent
deb9358c3a
commit
75f1b0f5e0
@ -126,7 +126,6 @@ pub enum ServerEvent {
|
|||||||
CreateShip {
|
CreateShip {
|
||||||
pos: comp::Pos,
|
pos: comp::Pos,
|
||||||
ship: comp::ship::Body,
|
ship: comp::ship::Body,
|
||||||
level: u16,
|
|
||||||
mountable: bool,
|
mountable: bool,
|
||||||
agent: Option<comp::Agent>,
|
agent: Option<comp::Agent>,
|
||||||
rtsim_entity: Option<RtSimEntity>,
|
rtsim_entity: Option<RtSimEntity>,
|
||||||
|
@ -1008,7 +1008,7 @@ fn handle_spawn_airship(
|
|||||||
});
|
});
|
||||||
let mut builder = server
|
let mut builder = server
|
||||||
.state
|
.state
|
||||||
.create_ship(pos, comp::ship::Body::DefaultAirship, 1, true)
|
.create_ship(pos, comp::ship::Body::DefaultAirship, true)
|
||||||
.with(LightEmitter {
|
.with(LightEmitter {
|
||||||
col: Rgb::new(1.0, 0.65, 0.2),
|
col: Rgb::new(1.0, 0.65, 0.2),
|
||||||
strength: 2.0,
|
strength: 2.0,
|
||||||
|
@ -114,12 +114,11 @@ pub fn handle_create_ship(
|
|||||||
server: &mut Server,
|
server: &mut Server,
|
||||||
pos: comp::Pos,
|
pos: comp::Pos,
|
||||||
ship: comp::ship::Body,
|
ship: comp::ship::Body,
|
||||||
level: u16,
|
|
||||||
mountable: bool,
|
mountable: bool,
|
||||||
agent: Option<Agent>,
|
agent: Option<Agent>,
|
||||||
rtsim_entity: Option<RtSimEntity>,
|
rtsim_entity: Option<RtSimEntity>,
|
||||||
) {
|
) {
|
||||||
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 {
|
if let Some(agent) = agent {
|
||||||
entity = entity.with(agent);
|
entity = entity.with(agent);
|
||||||
}
|
}
|
||||||
|
@ -165,11 +165,10 @@ impl Server {
|
|||||||
ServerEvent::CreateShip {
|
ServerEvent::CreateShip {
|
||||||
pos,
|
pos,
|
||||||
ship,
|
ship,
|
||||||
level,
|
|
||||||
mountable,
|
mountable,
|
||||||
agent,
|
agent,
|
||||||
rtsim_entity,
|
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::CreateWaypoint(pos) => handle_create_waypoint(self, pos),
|
||||||
ServerEvent::ClientDisconnect(entity) => {
|
ServerEvent::ClientDisconnect(entity) => {
|
||||||
frontend_events.push(handle_client_disconnect(self, entity))
|
frontend_events.push(handle_client_disconnect(self, entity))
|
||||||
|
@ -115,7 +115,6 @@ impl<'a> System<'a> for Sys {
|
|||||||
comp::Body::Ship(ship) => ServerEvent::CreateShip {
|
comp::Body::Ship(ship) => ServerEvent::CreateShip {
|
||||||
pos,
|
pos,
|
||||||
ship,
|
ship,
|
||||||
level: 1,
|
|
||||||
mountable: false,
|
mountable: false,
|
||||||
agent,
|
agent,
|
||||||
rtsim_entity,
|
rtsim_entity,
|
||||||
|
@ -46,7 +46,6 @@ pub trait StateExt {
|
|||||||
&mut self,
|
&mut self,
|
||||||
pos: comp::Pos,
|
pos: comp::Pos,
|
||||||
ship: comp::ship::Body,
|
ship: comp::ship::Body,
|
||||||
level: u16,
|
|
||||||
mountable: bool,
|
mountable: bool,
|
||||||
) -> EcsEntityBuilder;
|
) -> EcsEntityBuilder;
|
||||||
/// Build a projectile
|
/// Build a projectile
|
||||||
@ -231,7 +230,6 @@ impl StateExt for State {
|
|||||||
&mut self,
|
&mut self,
|
||||||
pos: comp::Pos,
|
pos: comp::Pos,
|
||||||
ship: comp::ship::Body,
|
ship: comp::ship::Body,
|
||||||
level: u16,
|
|
||||||
mountable: bool,
|
mountable: bool,
|
||||||
) -> EcsEntityBuilder {
|
) -> EcsEntityBuilder {
|
||||||
let mut builder = self
|
let mut builder = self
|
||||||
@ -252,10 +250,8 @@ impl StateExt for State {
|
|||||||
.with(comp::CharacterState::default())
|
.with(comp::CharacterState::default())
|
||||||
// TODO: some of these are required in order for the character_behavior system to
|
// 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()`
|
// recognize a possesed airship; that system should be refactored to use `.maybe()`
|
||||||
.with(comp::Energy::new(ship.into(), level))
|
.with(comp::Energy::new(ship.into(), 0))
|
||||||
//.with(comp::Health::new(ship.into(), level))
|
|
||||||
.with(comp::Stats::new("Airship".to_string()))
|
.with(comp::Stats::new("Airship".to_string()))
|
||||||
.with(comp::Buffs::default())
|
|
||||||
.with(comp::Combo::default());
|
.with(comp::Combo::default());
|
||||||
|
|
||||||
if mountable {
|
if mountable {
|
||||||
|
Loading…
Reference in New Issue
Block a user