Compare commits
2 Commits
f16d160994
...
4f1c420348
Author | SHA1 | Date | |
---|---|---|---|
4f1c420348 | |||
98b0d46c76 |
38
.drone.yml
Normal file
38
.drone.yml
Normal 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}}
|
|
@ -32,7 +32,7 @@ coord_2d = "0.3"
|
|||
derive_more = "0.99"
|
||||
futures-lite = "1"
|
||||
gilrs = "0.8"
|
||||
mapgen = { git = "https://github.com/ndarilek/mapgen.rs" }
|
||||
here_be_dragons = "0.1"
|
||||
maze_generator = "1"
|
||||
once_cell = "1"
|
||||
pathfinding = "3"
|
||||
|
|
|
@ -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 {
|
||||
self.x as f32
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ use bevy_input_actionmap::InputMap;
|
|||
use bevy_rapier2d::prelude::*;
|
||||
use bevy_tts::Tts;
|
||||
use derive_more::{Deref, DerefMut};
|
||||
use mapgen::Tile;
|
||||
use here_be_dragons::Tile;
|
||||
|
||||
use crate::{
|
||||
core::{Coordinates, Player, PointLike},
|
||||
|
|
|
@ -15,9 +15,9 @@ pub mod error;
|
|||
pub mod exploration;
|
||||
pub use futures_lite;
|
||||
pub use gilrs;
|
||||
pub use here_be_dragons as mapgen;
|
||||
pub mod log;
|
||||
pub mod map;
|
||||
pub use mapgen;
|
||||
pub mod navigation;
|
||||
pub mod pathfinding;
|
||||
pub mod pitch_shift;
|
||||
|
|
12
src/map.rs
12
src/map.rs
|
@ -6,8 +6,8 @@ use std::{
|
|||
use bevy::prelude::*;
|
||||
use bevy_rapier2d::prelude::*;
|
||||
use derive_more::{Deref, DerefMut};
|
||||
pub use mapgen::Map as MapgenMap;
|
||||
use mapgen::{geometry::Rect as MRect, MapFilter, Tile};
|
||||
pub use here_be_dragons::Map as MapgenMap;
|
||||
use here_be_dragons::{geometry::Rect as MRect, MapFilter, Tile};
|
||||
use maze_generator::{prelude::*, recursive_backtracking::RbGenerator};
|
||||
use rand::prelude::StdRng;
|
||||
|
||||
|
@ -19,8 +19,8 @@ use crate::{
|
|||
visibility::Visible,
|
||||
};
|
||||
|
||||
impl From<mapgen::geometry::Point> for Coordinates {
|
||||
fn from(point: mapgen::geometry::Point) -> Self {
|
||||
impl From<here_be_dragons::geometry::Point> for Coordinates {
|
||||
fn from(point: here_be_dragons::geometry::Point) -> Self {
|
||||
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.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.y as usize) * self.room_height + half_height,
|
||||
));
|
||||
|
|
|
@ -12,7 +12,7 @@ use bevy_rapier2d::{
|
|||
};
|
||||
use derive_more::{Deref, DerefMut};
|
||||
use futures_lite::future;
|
||||
use mapgen::Tile;
|
||||
use here_be_dragons::Tile;
|
||||
use pathfinding::prelude::*;
|
||||
|
||||
use crate::{
|
||||
|
|
Loading…
Reference in New Issue
Block a user