veloren_common/
consts.rs

1// The limit on distance between the entity and a collectible (squared)
2pub const MAX_PICKUP_RANGE: f32 = 5.0;
3pub const MAX_MOUNT_RANGE: f32 = 5.0;
4pub const MAX_SPRITE_MOUNT_RANGE: f32 = 2.0;
5pub const MAX_TRADE_RANGE: f32 = 20.0;
6pub const MAX_NPCINTERACT_RANGE: f32 = 30.0;
7pub const MAX_INTERACT_RANGE: f32 = 5.0;
8
9pub const GRAVITY: f32 = 25.0;
10pub const FRIC_GROUND: f32 = 0.15;
11
12// Values for air taken from http://www-mdp.eng.cam.ac.uk/web/library/enginfo/aerothermal_dvd_only/aero/atmos/atmos.html
13// Values below are for dry air at 15°C, sea level, 1 standard atmosphere
14
15// pub const ATMOSPHERE: f32 = 101325.0; // Pa
16
17// kg/m³
18pub const AIR_DENSITY: f32 = 1.225;
19pub const WATER_DENSITY: f32 = 999.1026;
20// LAVA_DENSITY is unsourced, estimated as "roughly three times higher" than
21// water
22pub const LAVA_DENSITY: f32 = 3000.0;
23pub const IRON_DENSITY: f32 = 7870.0;
24// pub const HUMAN_DENSITY: f32 = 1010.0; // real value
25pub const HUMAN_DENSITY: f32 = 990.0; // value we use to make humanoids gently float
26// 1 thread might be used for long-running cpu intensive tasks, like chunk
27// generation. having at least 2 helps not blocking in the main tick here
28
29pub const MIN_RECOMMENDED_RAYON_THREADS: usize = 2;
30pub const MIN_RECOMMENDED_TOKIO_THREADS: usize = 2;
31
32pub const SOUND_TRAVEL_DIST_PER_VOLUME: f32 = 3.0;
33
34pub const TELEPORTER_RADIUS: f32 = 3.;
35
36// Map settings
37pub const DAY_LENGTH_DEFAULT: f64 = 30.0;