mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
mid name parts
This commit is contained in:
parent
60f8a29530
commit
ab2c0ad085
@ -104,7 +104,7 @@ impl<'a> Widget for MiniMap<'a> {
|
||||
|
||||
// Title
|
||||
// TODO: Make it display the actual location.
|
||||
Text::new("Uncanny Valley")
|
||||
Text::new("Region Name")
|
||||
.mid_top_with_margin_on(state.ids.mmap_frame, 3.0)
|
||||
.font_size(14)
|
||||
.color(TEXT_COLOR)
|
||||
|
@ -36,7 +36,7 @@ impl Location {
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Kingdom {
|
||||
name: String,
|
||||
region_name: String,
|
||||
}
|
||||
|
||||
fn generate_name<R: Rng>(rng: &mut R) -> String {
|
||||
@ -45,7 +45,7 @@ fn generate_name<R: Rng>(rng: &mut R) -> String {
|
||||
"East", "North", "South", "Ray", "Eri", "Dal", "Som", "Black", "Iron", "Grey", "Hel",
|
||||
"Gal", "Mor", "Lo", "Nil", "Mana", "Gar", "Mountain",
|
||||
];
|
||||
let mid = ["o", "oa", "au", "e", "ea", "u", "a", "i", "ie"];
|
||||
let mid = ["ka", "se", "au", "da", "di", "u"];
|
||||
let tails = [
|
||||
"mill", "ben", "sel", "dori", "theas", "dar", "bur", "to", "vis", "ten", "stone", "tiva",
|
||||
"id", "and", "or", "el", "ond", "ia", "eld", "ald", "aft", "ift", "ity", "well", "oll",
|
||||
@ -55,12 +55,14 @@ fn generate_name<R: Rng>(rng: &mut R) -> String {
|
||||
];
|
||||
|
||||
let mut name = String::new();
|
||||
/*for i in 0..rng.gen::<u32>() % 1 {
|
||||
if rand::random() {
|
||||
name += rng.choose(&firstsyl).unwrap();
|
||||
}*/
|
||||
name += rng.choose(&firstsyl).unwrap();
|
||||
//name += rng.choose(&mid).unwrap();
|
||||
name += rng.choose(&tails).unwrap();
|
||||
|
||||
name
|
||||
name += rng.choose(&mid).unwrap();
|
||||
name += rng.choose(&tails).unwrap();
|
||||
name
|
||||
} else {
|
||||
name += rng.choose(&firstsyl).unwrap();
|
||||
name += rng.choose(&tails).unwrap();
|
||||
name
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user