This commit is contained in:
Pfauenauge90 2020-04-08 18:20:49 +02:00
parent 85f9f80024
commit 0fb5b73606

View File

@ -369,40 +369,19 @@ impl CharSelectionUi {
}; };
Some(loadout) Some(loadout)
}, },
Mode::Create (characterdata) => Mode::Create { loadout, tool, .. } => {
let loadout = comp::Loadout { loadout.active_item = tool.map(|tool| comp::ItemConfig {
active_item: characterdata item: (*load_expect::<comp::Item>(tool)).clone(),
.as_ref()
.and_then(|d| d.tool.as_ref())
.map(|tool| comp::ItemConfig {
item: (*load_expect::<comp::Item>(&tool)).clone(),
ability1: None, ability1: None,
ability2: None, ability2: None,
ability3: None, ability3: None,
block_ability: None, block_ability: None,
dodge_ability: None, dodge_ability: None,
}), });
second_item: None, Some(loadout.clone())
shoulder: None,
chest: None,
belt: None,
hand: None,
pants: Some(assets::load_expect_cloned(
"common.items.armor.starter.rugged_pants",
)),
foot: Some(assets::load_expect_cloned(
"common.items.armor.starter.sandals_0",
)),
back: None,
ring: None,
neck: None,
lantern: None,
head: None,
tabard: None,
};
Some(loadout)
}, },
} }
}
// TODO: Split this into multiple modules or functions. // TODO: Split this into multiple modules or functions.
fn update_layout(&mut self, global_state: &mut GlobalState, client: &Client) -> Vec<Event> { fn update_layout(&mut self, global_state: &mut GlobalState, client: &Client) -> Vec<Event> {