Further massive amounts of work

This commit is contained in:
2022-06-06 13:54:59 +02:00
parent df662ce6b5
commit ce33ec0649
33 changed files with 848 additions and 80 deletions

View File

@@ -2,7 +2,7 @@ use self::super::form::Form;
use crate::static_data::species_data::gender::Gender;
use crate::utils::random::Random;
use derive_getters::Getters;
use std::collections::{HashMap, HashSet};
use hashbrown::{HashMap, HashSet};
#[derive(Debug, Getters)]
pub struct Species<'a> {
@@ -25,15 +25,15 @@ impl<'a> Species<'a> {
default_form: Form<'a>,
flags: HashSet<String>,
) -> Species<'a> {
let mut forms = HashMap::with_capacity(1);
forms.insert("default".to_string(), default_form);
Species {
id,
name: name.to_string(),
gender_rate,
growth_rate: growth_rate.to_string(),
capture_rate,
forms: hashmap! {
"default".to_string() => default_form,
},
forms,
flags,
}
}