Further massive amounts of work
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user