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 specs::prelude::*;
|
||||
use std::collections::HashMap;
|
||||
|
||||
pub const CARRY_CAPACITY_PER_STRENGTH: i32 = 8;
|
||||
use crate::config::entity::CARRY_CAPACITY_PER_STRENGTH;
|
||||
|
||||
pub struct EncumbranceSystem {}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ pub use quip_system::QuipSystem;
|
|||
mod regen_system;
|
||||
pub use regen_system::RegenSystem;
|
||||
mod encumbrance_system;
|
||||
pub use encumbrance_system::{ EncumbranceSystem, CARRY_CAPACITY_PER_STRENGTH };
|
||||
pub use encumbrance_system::EncumbranceSystem;
|
||||
mod adjacent_ai_system;
|
||||
pub use adjacent_ai_system::AdjacentAI;
|
||||
mod visible_ai_system;
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ pub fn render_camera(ecs: &World, ctx: &mut Rltk) {
|
|||
if map.visible_tiles[idx] {
|
||||
draw = true;
|
||||
} 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.
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#[rustfmt::skip]
|
||||
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 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 colours;
|
||||
pub mod visuals;
|
||||
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 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
|
||||
pub const DEFAULT_BG_COLOUR: (u8, u8, u8) = (29, 50, 50);
|
||||
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 DEEP_WATER_COLOUR: (u8, u8, u8) = (18, 33, 63);
|
||||
pub const BARS_COLOUR: (u8, u8, u8) = (100, 100, 100);
|
||||
|
||||
// FOREST THEME
|
||||
pub const FOREST_WALL_COLOUR: (u8, u8, u8) = (0, 153, 0);
|
||||
|
|
@ -7,7 +7,6 @@ use std::sync::Mutex;
|
|||
|
||||
mod damage;
|
||||
mod hunger;
|
||||
mod messages;
|
||||
mod particles;
|
||||
mod targeting;
|
||||
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::{
|
||||
gamelog,
|
||||
gui::item_colour_ecs,
|
||||
|
|
@ -30,6 +30,7 @@ use crate::{
|
|||
SingleActivation,
|
||||
BUC,
|
||||
};
|
||||
use crate::config::messages::*;
|
||||
use rltk::prelude::*;
|
||||
use specs::prelude::*;
|
||||
pub fn item_trigger(source: Option<Entity>, item: Entity, target: &Targets, ecs: &mut World) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
use super::{
|
||||
ai::CARRY_CAPACITY_PER_STRENGTH,
|
||||
camera,
|
||||
gamelog,
|
||||
gamesystem,
|
||||
|
|
@ -34,6 +33,7 @@ use super::{
|
|||
Viewshed,
|
||||
BUC,
|
||||
};
|
||||
use crate::config::entity::CARRY_CAPACITY_PER_STRENGTH;
|
||||
use rltk::prelude::*;
|
||||
use specs::prelude::*;
|
||||
use std::collections::BTreeMap;
|
||||
|
|
|
|||
|
|
@ -40,9 +40,7 @@ mod spatial;
|
|||
extern crate lazy_static;
|
||||
|
||||
//Consts
|
||||
pub const SHOW_MAPGEN: bool = false;
|
||||
pub const LOG_SPAWNING: bool = true;
|
||||
pub const LOG_TICKS: bool = false;
|
||||
pub use config::{ SHOW_MAPGEN, LOG_SPAWNING, LOG_TICKS };
|
||||
|
||||
#[derive(PartialEq, Copy, Clone)]
|
||||
pub enum RunState {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use super::{ Map, Point, TileType };
|
||||
use crate::config::glyphs::*;
|
||||
use crate::config::colours::*;
|
||||
use crate::config::visuals::*;
|
||||
use rltk::prelude::*;
|
||||
use std::ops::{ Add, Mul };
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue