Compare commits

..

2 Commits

Author SHA1 Message Date
4f1c420348 Switch to here_be_dragons.
Some checks failed
continuous-integration/drone/push Build is failing
2022-03-18 15:58:27 -05:00
98b0d46c76 Add Drone configuration. 2022-03-18 15:46:42 -05:00
7 changed files with 49 additions and 11 deletions

38
.drone.yml Normal file
View File

@ -0,0 +1,38 @@
kind: pipeline
type: docker
name: default
steps:
- name: test
image: rust
commands:
- rustup component add clippy rustfmt
- cargo fmt --check
- cargo build --all
- cargo build --examples --all
- cargo test --verbose --all
- cargo clippy
- name: release
image: rust
commands:
- cargo publish
when:
event:
- tag
environment:
CARGO_REGISTRY_TOKEN:
from_secret: cargo_registry_token
- name: discord notification
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
tts: true
message: >
{{#success build.status}}
{{repo.name}} build {{build.number}} succeeded. <{{build.link}}>
{{else}}
{{repo.name}} build {{build.number}} failed. <{{build.link}}>
{{/success}}

View File

@ -32,7 +32,7 @@ coord_2d = "0.3"
derive_more = "0.99" derive_more = "0.99"
futures-lite = "1" futures-lite = "1"
gilrs = "0.8" gilrs = "0.8"
mapgen = { git = "https://github.com/ndarilek/mapgen.rs" } here_be_dragons = "0.1"
maze_generator = "1" maze_generator = "1"
once_cell = "1" once_cell = "1"
pathfinding = "3" pathfinding = "3"

View File

@ -518,7 +518,7 @@ impl PointLike for &Coordinates {
} }
} }
impl PointLike for mapgen::geometry::Point { impl PointLike for here_be_dragons::geometry::Point {
fn x(&self) -> f32 { fn x(&self) -> f32 {
self.x as f32 self.x as f32
} }

View File

@ -5,7 +5,7 @@ use bevy_input_actionmap::InputMap;
use bevy_rapier2d::prelude::*; use bevy_rapier2d::prelude::*;
use bevy_tts::Tts; use bevy_tts::Tts;
use derive_more::{Deref, DerefMut}; use derive_more::{Deref, DerefMut};
use mapgen::Tile; use here_be_dragons::Tile;
use crate::{ use crate::{
core::{Coordinates, Player, PointLike}, core::{Coordinates, Player, PointLike},

View File

@ -15,9 +15,9 @@ pub mod error;
pub mod exploration; pub mod exploration;
pub use futures_lite; pub use futures_lite;
pub use gilrs; pub use gilrs;
pub use here_be_dragons as mapgen;
pub mod log; pub mod log;
pub mod map; pub mod map;
pub use mapgen;
pub mod navigation; pub mod navigation;
pub mod pathfinding; pub mod pathfinding;
pub mod pitch_shift; pub mod pitch_shift;

View File

@ -6,8 +6,8 @@ use std::{
use bevy::prelude::*; use bevy::prelude::*;
use bevy_rapier2d::prelude::*; use bevy_rapier2d::prelude::*;
use derive_more::{Deref, DerefMut}; use derive_more::{Deref, DerefMut};
pub use mapgen::Map as MapgenMap; pub use here_be_dragons::Map as MapgenMap;
use mapgen::{geometry::Rect as MRect, MapFilter, Tile}; use here_be_dragons::{geometry::Rect as MRect, MapFilter, Tile};
use maze_generator::{prelude::*, recursive_backtracking::RbGenerator}; use maze_generator::{prelude::*, recursive_backtracking::RbGenerator};
use rand::prelude::StdRng; use rand::prelude::StdRng;
@ -19,8 +19,8 @@ use crate::{
visibility::Visible, visibility::Visible,
}; };
impl From<mapgen::geometry::Point> for Coordinates { impl From<here_be_dragons::geometry::Point> for Coordinates {
fn from(point: mapgen::geometry::Point) -> Self { fn from(point: here_be_dragons::geometry::Point) -> Self {
Self((point.x as f32, point.y as f32)) Self((point.x as f32, point.y as f32))
} }
} }
@ -215,11 +215,11 @@ impl<D: Clone + Default> MapFilter<D> for GridBuilder {
} }
} }
} }
map.starting_point = Some(mapgen::geometry::Point::new( map.starting_point = Some(here_be_dragons::geometry::Point::new(
maze.start.x as usize + 1, maze.start.x as usize + 1,
maze.start.y as usize + 1, maze.start.y as usize + 1,
)); ));
map.exit_point = Some(mapgen::geometry::Point::new( map.exit_point = Some(here_be_dragons::geometry::Point::new(
(maze.goal.x as usize) * self.room_width + half_width, (maze.goal.x as usize) * self.room_width + half_width,
(maze.goal.y as usize) * self.room_height + half_height, (maze.goal.y as usize) * self.room_height + half_height,
)); ));

View File

@ -12,7 +12,7 @@ use bevy_rapier2d::{
}; };
use derive_more::{Deref, DerefMut}; use derive_more::{Deref, DerefMut};
use futures_lite::future; use futures_lite::future;
use mapgen::Tile; use here_be_dragons::Tile;
use pathfinding::prelude::*; use pathfinding::prelude::*;
use crate::{ use crate::{