config stuff to config folder
This commit is contained in:
parent
705a6bb1fb
commit
424bf43ed5
12 changed files with 20 additions and 15 deletions
|
|
@ -1,8 +1,7 @@
|
||||||
use crate::{ gamelog, Attributes, Burden, EquipmentChanged, Equipped, InBackpack, Item, Pools };
|
use crate::{ gamelog, Attributes, Burden, EquipmentChanged, Equipped, InBackpack, Item, Pools };
|
||||||
use specs::prelude::*;
|
use specs::prelude::*;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
use crate::config::entity::CARRY_CAPACITY_PER_STRENGTH;
|
||||||
pub const CARRY_CAPACITY_PER_STRENGTH: i32 = 8;
|
|
||||||
|
|
||||||
pub struct EncumbranceSystem {}
|
pub struct EncumbranceSystem {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ pub use quip_system::QuipSystem;
|
||||||
mod regen_system;
|
mod regen_system;
|
||||||
pub use regen_system::RegenSystem;
|
pub use regen_system::RegenSystem;
|
||||||
mod encumbrance_system;
|
mod encumbrance_system;
|
||||||
pub use encumbrance_system::{ EncumbranceSystem, CARRY_CAPACITY_PER_STRENGTH };
|
pub use encumbrance_system::EncumbranceSystem;
|
||||||
mod adjacent_ai_system;
|
mod adjacent_ai_system;
|
||||||
pub use adjacent_ai_system::AdjacentAI;
|
pub use adjacent_ai_system::AdjacentAI;
|
||||||
mod visible_ai_system;
|
mod visible_ai_system;
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ pub fn render_camera(ecs: &World, ctx: &mut Rltk) {
|
||||||
if map.visible_tiles[idx] {
|
if map.visible_tiles[idx] {
|
||||||
draw = true;
|
draw = true;
|
||||||
} else {
|
} else {
|
||||||
fg = fg.mul(crate::config::colours::NON_VISIBLE_MULTIPLIER);
|
fg = fg.mul(crate::config::visuals::NON_VISIBLE_MULTIPLIER);
|
||||||
// We don't darken BG, because get_tile_renderables_for_id handles this.
|
// We don't darken BG, because get_tile_renderables_for_id handles this.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#[rustfmt::skip]
|
|
||||||
pub const DEFAULT_VIEWSHED_STANDARD: i32 = 16; // Standard viewshed radius for almost all entities.
|
pub const DEFAULT_VIEWSHED_STANDARD: i32 = 16; // Standard viewshed radius for almost all entities.
|
||||||
|
pub const CARRY_CAPACITY_PER_STRENGTH: i32 = 8;
|
||||||
|
|
||||||
pub const NORMAL_SPEED: i32 = 12; // Normal speed for almost all entities.
|
pub const NORMAL_SPEED: i32 = 12; // Normal speed for almost all entities.
|
||||||
pub const TURN_COST_MULTIPLIER: i32 = 4; // How many ticks per turn for an entity with NORMAL_SPEED.
|
pub const TURN_COST_MULTIPLIER: i32 = 4; // How many ticks per turn for an entity with NORMAL_SPEED.
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
pub mod entity;
|
pub mod entity;
|
||||||
pub mod colours;
|
pub mod visuals;
|
||||||
pub mod glyphs;
|
pub mod glyphs;
|
||||||
|
pub mod messages;
|
||||||
|
|
||||||
|
pub const SHOW_MAPGEN: bool = false;
|
||||||
|
pub const LOG_SPAWNING: bool = true;
|
||||||
|
pub const LOG_TICKS: bool = false;
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,12 @@ pub const MAX_DARKENING: f32 = 0.3;
|
||||||
pub const START_DARKEN_AT_N_TILES: f32 = 9.0;
|
pub const START_DARKEN_AT_N_TILES: f32 = 9.0;
|
||||||
pub const MAX_DARKEN_AT_N_TILES: f32 = 12.0;
|
pub const MAX_DARKEN_AT_N_TILES: f32 = 12.0;
|
||||||
|
|
||||||
pub const BLOODSTAIN_COLOUR: (u8, u8, u8) = (153, 0, 0);
|
pub const SHORT_PARTICLE_LIFETIME: f32 = 100.0;
|
||||||
|
pub const DEFAULT_PARTICLE_LIFETIME: f32 = 200.0;
|
||||||
|
pub const LONG_PARTICLE_LIFETIME: f32 = 300.0;
|
||||||
|
|
||||||
|
// THEMES
|
||||||
|
pub const BLOODSTAIN_COLOUR: (u8, u8, u8) = (153, 0, 0);
|
||||||
// DEFAULT THEME
|
// DEFAULT THEME
|
||||||
pub const DEFAULT_BG_COLOUR: (u8, u8, u8) = (29, 50, 50);
|
pub const DEFAULT_BG_COLOUR: (u8, u8, u8) = (29, 50, 50);
|
||||||
pub const WALL_COLOUR: (u8, u8, u8) = (229, 191, 94);
|
pub const WALL_COLOUR: (u8, u8, u8) = (229, 191, 94);
|
||||||
|
|
@ -23,6 +27,5 @@ pub const SAND_COLOUR: (u8, u8, u8) = (70, 70, 21);
|
||||||
pub const SHALLOW_WATER_COLOUR: (u8, u8, u8) = (24, 47, 99);
|
pub const SHALLOW_WATER_COLOUR: (u8, u8, u8) = (24, 47, 99);
|
||||||
pub const DEEP_WATER_COLOUR: (u8, u8, u8) = (18, 33, 63);
|
pub const DEEP_WATER_COLOUR: (u8, u8, u8) = (18, 33, 63);
|
||||||
pub const BARS_COLOUR: (u8, u8, u8) = (100, 100, 100);
|
pub const BARS_COLOUR: (u8, u8, u8) = (100, 100, 100);
|
||||||
|
|
||||||
// FOREST THEME
|
// FOREST THEME
|
||||||
pub const FOREST_WALL_COLOUR: (u8, u8, u8) = (0, 153, 0);
|
pub const FOREST_WALL_COLOUR: (u8, u8, u8) = (0, 153, 0);
|
||||||
|
|
@ -7,7 +7,6 @@ use std::sync::Mutex;
|
||||||
|
|
||||||
mod damage;
|
mod damage;
|
||||||
mod hunger;
|
mod hunger;
|
||||||
mod messages;
|
|
||||||
mod particles;
|
mod particles;
|
||||||
mod targeting;
|
mod targeting;
|
||||||
mod triggers;
|
mod triggers;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
use super::{ add_effect, get_noncursed, messages::*, particles, spatial, EffectType, Entity, Targets, World };
|
use super::{ add_effect, get_noncursed, particles, spatial, EffectType, Entity, Targets, World };
|
||||||
use crate::{
|
use crate::{
|
||||||
gamelog,
|
gamelog,
|
||||||
gui::item_colour_ecs,
|
gui::item_colour_ecs,
|
||||||
|
|
@ -30,6 +30,7 @@ use crate::{
|
||||||
SingleActivation,
|
SingleActivation,
|
||||||
BUC,
|
BUC,
|
||||||
};
|
};
|
||||||
|
use crate::config::messages::*;
|
||||||
use rltk::prelude::*;
|
use rltk::prelude::*;
|
||||||
use specs::prelude::*;
|
use specs::prelude::*;
|
||||||
pub fn item_trigger(source: Option<Entity>, item: Entity, target: &Targets, ecs: &mut World) {
|
pub fn item_trigger(source: Option<Entity>, item: Entity, target: &Targets, ecs: &mut World) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
use super::{
|
use super::{
|
||||||
ai::CARRY_CAPACITY_PER_STRENGTH,
|
|
||||||
camera,
|
camera,
|
||||||
gamelog,
|
gamelog,
|
||||||
gamesystem,
|
gamesystem,
|
||||||
|
|
@ -34,6 +33,7 @@ use super::{
|
||||||
Viewshed,
|
Viewshed,
|
||||||
BUC,
|
BUC,
|
||||||
};
|
};
|
||||||
|
use crate::config::entity::CARRY_CAPACITY_PER_STRENGTH;
|
||||||
use rltk::prelude::*;
|
use rltk::prelude::*;
|
||||||
use specs::prelude::*;
|
use specs::prelude::*;
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
|
|
|
||||||
|
|
@ -40,9 +40,7 @@ mod spatial;
|
||||||
extern crate lazy_static;
|
extern crate lazy_static;
|
||||||
|
|
||||||
//Consts
|
//Consts
|
||||||
pub const SHOW_MAPGEN: bool = false;
|
pub use config::{ SHOW_MAPGEN, LOG_SPAWNING, LOG_TICKS };
|
||||||
pub const LOG_SPAWNING: bool = true;
|
|
||||||
pub const LOG_TICKS: bool = false;
|
|
||||||
|
|
||||||
#[derive(PartialEq, Copy, Clone)]
|
#[derive(PartialEq, Copy, Clone)]
|
||||||
pub enum RunState {
|
pub enum RunState {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
use super::{ Map, Point, TileType };
|
use super::{ Map, Point, TileType };
|
||||||
use crate::config::glyphs::*;
|
use crate::config::glyphs::*;
|
||||||
use crate::config::colours::*;
|
use crate::config::visuals::*;
|
||||||
use rltk::prelude::*;
|
use rltk::prelude::*;
|
||||||
use std::ops::{ Add, Mul };
|
use std::ops::{ Add, Mul };
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue