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 = 5.0;
6pub const MAX_NPCINTERACT_RANGE: f32 = 8.0;
7pub const MAX_INTERACT_RANGE: f32 = 5.0;
8pub const MAX_WAYPOINT_RANGE: f32 = 4.0;
9// Player-imperceptible offset to ensure campfire healing is always
10// within waypoint range (may not be necessary if floating point handling is
11// reliable)
12pub const MAX_CAMPFIRE_RANGE: f32 = MAX_WAYPOINT_RANGE - 0.001;
13
14pub const GRAVITY: f32 = 25.0;
15pub const FRIC_GROUND: f32 = 0.15;
16
17// Values for air taken from http://www-mdp.eng.cam.ac.uk/web/library/enginfo/aerothermal_dvd_only/aero/atmos/atmos.html
18// Values below are for dry air at 15°C, sea level, 1 standard atmosphere
19
20// pub const ATMOSPHERE: f32 = 101325.0; // Pa
21
22// kg/m³
23pub const AIR_DENSITY: f32 = 1.225;
24pub const WATER_DENSITY: f32 = 999.1026;
25// LAVA_DENSITY is unsourced, estimated as "roughly three times higher" than
26// water
27pub const LAVA_DENSITY: f32 = 3000.0;
28pub const IRON_DENSITY: f32 = 7870.0;
29// pub const HUMAN_DENSITY: f32 = 1010.0; // real value
30pub const HUMAN_DENSITY: f32 = 990.0; // value we use to make humanoids gently float
31// 1 thread might be used for long-running cpu intensive tasks, like chunk
32// generation. having at least 2 helps not blocking in the main tick here
33
34pub const MIN_RECOMMENDED_RAYON_THREADS: usize = 2;
35pub const MIN_RECOMMENDED_TOKIO_THREADS: usize = 2;
36
37pub const SOUND_TRAVEL_DIST_PER_VOLUME: f32 = 3.0;
38
39pub const TELEPORTER_RADIUS: f32 = 3.;
40
41// Map settings
42pub const DAY_LENGTH_DEFAULT: f64 = 30.0;