ashscript_types/constants/
general.rs

1use enum_map::{enum_map, EnumMap};
2use hashbrown::HashSet;
3use lazy_static::lazy_static;
4
5use crate::{resource::Resource, unit::UnitPart};
6
7lazy_static! {
8    pub static ref RESOURCE_INPUTS: EnumMap<Resource, HashSet<Resource>> = enum_map! {
9        Resource::Metal => HashSet::from([Resource::Coal, Resource::Minerals]),
10        Resource::Energy => HashSet::new(),
11        Resource::Coal => HashSet::new(),
12        Resource::Scrap => HashSet::new(),
13        Resource::Minerals => HashSet::new(),
14    };
15    pub static ref UNIT_PART_WEIGHTS: EnumMap<UnitPart, u32> = enum_map! {
16        UnitPart::Ranged => 5,
17        UnitPart::Generate => 2,
18        UnitPart::Battery => 4,
19        UnitPart::Harvest => 2,
20        _ => 1,
21    };
22}