re-export modules for better ergonomics

This commit is contained in:
Max Bradbury 2020-10-09 11:57:02 +01:00
parent 575ad442d8
commit c79d33ddf2
19 changed files with 49 additions and 50 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "bitsy-parser"
version = "0.72.1"
version = "0.72.2"
authors = ["Max Bradbury <max@tinybird.info>"]
edition = "2018"
description = "A parser and utilities for working with Bitsy game data"

View File

@ -1,4 +1,4 @@
use bitsy_parser::game::Game;
use bitsy_parser::Game;
use std::{env, fs};
const SYNTAX_ERROR: &str = "No game data specified. Usage: `bitsy-dedupe input.bitsy output.bitsy`";

View File

@ -1,4 +1,4 @@
use bitsy_parser::game::Game;
use bitsy_parser::Game;
use std::{env, fs};
const SYNTAX_ERROR: &str = "No main game specified. Usage: `bitsy-merge main.bitsy additional.bitsy output.bitsy`";

View File

@ -1,4 +1,4 @@
use bitsy_parser::game::Game;
use bitsy_parser::Game;
use std::{env, fs};
const SYNTAX_ERROR: &str = "Usage: `bitsy-parse input.bitsy output.bitsy`";

View File

@ -1,4 +1,4 @@
use bitsy_parser::game::Game;
use bitsy_parser::Game;
use std::{env, fs};
const SYNTAX_ERROR: &str = "No input path specified. Usage: `bitsy-validate filepath`";

View File

@ -32,7 +32,7 @@ impl ToString for Colour {
#[cfg(test)]
mod test {
use crate::colour::Colour;
use crate::Colour;
#[test]
fn colour_from_string() {

View File

@ -38,7 +38,7 @@ impl ToString for Dialogue {
#[cfg(test)]
mod test {
use crate::dialogue::Dialogue;
use crate::Dialogue;
#[test]
fn dialogue_from_string() {

View File

@ -31,7 +31,7 @@ impl fmt::Display for Ending {
#[cfg(test)]
mod test {
use crate::ending::Ending;
use crate::Ending;
use std::str::FromStr;
#[test]

View File

@ -98,8 +98,7 @@ impl fmt::Display for Exit {
#[cfg(test)]
mod test {
use crate::exit::{Transition, Exit};
use crate::position::Position;
use crate::{Transition, Exit, Position};
use std::str::FromStr;
#[test]

View File

@ -1,9 +1,10 @@
use crate::{Dialogue, Ending, Font, Item, Palette, Room, Sprite, TextDirection, Tile, Variable, transform_line_endings, segments_from_string, new_unique_id, try_id, Instance};
use crate::{Dialogue, Ending, Font, Image, Item, Palette, Room, Sprite, TextDirection, Tile, Variable, transform_line_endings, segments_from_string, new_unique_id, try_id, Instance};
use loe::TransformMode;
use std::str::FromStr;
use std::collections::HashMap;
use std::borrow::BorrowMut;
use crate::image::Image;
use std::fmt;
use std::fmt::Display;
@ -857,10 +858,7 @@ impl Game {
#[cfg(test)]
mod test {
use crate::game::{Version, Game, NotFound};
use crate::text::{TextDirection, Font};
use crate::tile::Tile;
use crate::image::Image;
use crate::{TextDirection, Font, Version, Game, NotFound, Tile, Image};
#[test]
fn game_from_string() {

View File

@ -77,8 +77,7 @@ impl ToString for Item {
#[cfg(test)]
mod test {
use crate::item::Item;
use crate::mock;
use crate::{Item, mock};
#[test]
fn item_from_string() {

View File

@ -1,6 +1,8 @@
extern crate loe;
use std::fmt::Display;
use std::io::Cursor;
use radix_fmt::radix_36;
use loe::{process, Config, TransformMode};
@ -20,23 +22,22 @@ pub mod text;
pub mod tile;
pub mod variable;
// pub mod test_omnibus;
pub mod test_omnibus;
use colour::Colour;
use dialogue::Dialogue;
use ending::Ending;
use exit::{Exit, Transition};
use game::{Game, Version};
use image::Image;
use item::Item;
use palette::Palette;
use position::Position;
use room::Room;
use sprite::Sprite;
use std::fmt::Display;
use text::{Font, TextDirection};
use tile::Tile;
use variable::Variable;
pub use colour::Colour;
pub use dialogue::Dialogue;
pub use ending::Ending;
pub use exit::*;
pub use game::*;
pub use image::Image;
pub use item::Item;
pub use palette::Palette;
pub use position::Position;
pub use room::Room;
pub use sprite::Sprite;
pub use text::*;
pub use tile::Tile;
pub use variable::Variable;
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct Instance {

View File

@ -185,8 +185,7 @@ pub fn sprite() -> Sprite {
}
pub mod item {
use crate::item::Item;
use crate::image::Image;
use crate::{Image, Item};
pub fn key() -> Item {
Item {

View File

@ -49,8 +49,7 @@ impl ToString for Palette {
#[cfg(test)]
mod test {
use crate::colour::Colour;
use crate::palette::Palette;
use crate::{Colour, Palette};
#[test]
fn palette_from_string() {

View File

@ -38,7 +38,7 @@ impl fmt::Display for Position {
#[cfg(test)]
mod test {
use crate::position::Position;
use crate::Position;
use std::str::FromStr;
#[test]

View File

@ -1,6 +1,14 @@
use crate::{optional_data_line, Exit, ExitInstance, Instance, Position};
use crate::game::{RoomType, RoomFormat};
use crate::exit::Transition;
use crate::{
optional_data_line,
Exit,
ExitInstance,
Instance,
Position,
RoomType,
RoomFormat,
Transition
};
use std::str::FromStr;
use std::collections::HashMap;
@ -230,8 +238,7 @@ impl Room {
#[cfg(test)]
mod test {
use crate::room::Room;
use crate::game::{RoomType, RoomFormat};
use crate::{Room, RoomType, RoomFormat};
#[test]
fn room_from_string() {

View File

@ -128,8 +128,7 @@ impl ToString for Sprite {
#[cfg(test)]
mod test {
use crate::mock;
use crate::sprite::Sprite;
use crate::{mock, Sprite};
#[test]
fn sprite_from_string() {

View File

@ -132,9 +132,7 @@ impl ToString for Tile {
#[cfg(test)]
mod test {
use crate::tile::Tile;
use crate::image::Image;
use crate::mock;
use crate::{Image, Tile, mock};
#[test]
fn tile_from_string() {

View File

@ -27,7 +27,7 @@ impl ToString for Variable {
#[cfg(test)]
mod test {
use crate::variable::Variable;
use crate::Variable;
#[test]
fn variable_from_string() {