mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
avoid economy of scale in economy_tree
This commit is contained in:
parent
5a965d21c7
commit
fca4372205
@ -1421,11 +1421,20 @@ fn direct_use_goods() -> &'static [GoodIndex] {
|
||||
&*DIRECT_USE
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct GraphInfo {
|
||||
dummy: Economy,
|
||||
}
|
||||
|
||||
impl Default for GraphInfo {
|
||||
fn default() -> Self {
|
||||
let mut dummy = Economy::default();
|
||||
// avoid economy of scale
|
||||
dummy.pop = 0.0;
|
||||
dummy.labors.iter_mut().for_each(|l| *l.1 = 0.0);
|
||||
Self { dummy }
|
||||
}
|
||||
}
|
||||
|
||||
impl GraphInfo {
|
||||
pub fn get_orders(&self) -> &'static LaborMap<Vec<(GoodIndex, f32)>> { self.dummy.get_orders() }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user