Browse Source

more tech testing qol changes

techs
andy 4 years ago
parent
commit
513ee408f7
  1. 2
      src/bin/main.rs
  2. 10
      src/ship/map/area.rs
  3. 6
      src/ship/packet/handler/message.rs

2
src/bin/main.rs

@ -73,6 +73,8 @@ fn main() {
character.name = "ItemRefactor".into();
character.exp = 80000000;
character.meseta = 999999;
character.techs.set_tech(elseware::entity::item::tech::Technique::Shifta, elseware::entity::character::TechLevel(3));
character.techs.set_tech(elseware::entity::item::tech::Technique::Deband, elseware::entity::character::TechLevel(3));
let character = entity_gateway.create_character(character).await.unwrap();
for _ in 0..3 {

10
src/ship/map/area.rs

@ -284,6 +284,16 @@ impl MapAreaLookup {
Episode::Four => MapAreaLookup::default_ep4_maps(),
}
}
pub fn from_changed_floor(&self, floor: u8) -> Option<MapArea> {
match floor {
20 => Some(MapArea::Forest1),
30 => Some(MapArea::Caves1),
40 => Some(MapArea::Mines1),
48 => Some(MapArea::Ruins1),
_ => None,
}
}
}

6
src/ship/packet/handler/message.rs

@ -228,12 +228,14 @@ pub fn update_player_position(id: ClientId,
client.x = p.x;
client.y = p.y;
},
// GameMessage::PlayerChangedFloor(p) => {client.area = MapArea::from_value(&room.mode.episode(), p.map).ok();},
GameMessage::PlayerChangedFloor(p) => {
client.area = room.map_areas.from_changed_floor(p.data[0]);
},
GameMessage::InitializeSpeechNpc(p) => {
client.x = p.x;
client.z = p.z;
}
_ => {},
_ => {unreachable!()},
}
} else {}
let m = message.clone();

Loading…
Cancel
Save