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:
@ -1421,11 +1421,20 @@ fn direct_use_goods() -> &'static [GoodIndex] {
|
|||||||
&*DIRECT_USE
|
&*DIRECT_USE
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default)]
|
|
||||||
pub struct GraphInfo {
|
pub struct GraphInfo {
|
||||||
dummy: Economy,
|
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 {
|
impl GraphInfo {
|
||||||
pub fn get_orders(&self) -> &'static LaborMap<Vec<(GoodIndex, f32)>> { self.dummy.get_orders() }
|
pub fn get_orders(&self) -> &'static LaborMap<Vec<(GoodIndex, f32)>> { self.dummy.get_orders() }
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user