mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Split adjusted_by_skills by toolkind
This commit is contained in:
parent
a2e0426d45
commit
81bbc8c31f
File diff suppressed because it is too large
Load Diff
@ -956,6 +956,15 @@ impl SkillSet {
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the level of the skill or passed value as default
|
||||
pub fn skill_level_or(&self, skill: Skill, default: u16) -> u16 {
|
||||
if let Ok(Some(level)) = self.skill_level(skill) {
|
||||
level
|
||||
} else {
|
||||
default
|
||||
}
|
||||
}
|
||||
|
||||
/// Checks the next level of a skill
|
||||
fn next_skill_level(&self, skill: Skill) -> Option<u16> {
|
||||
if let Ok(level) = self.skill_level(skill) {
|
||||
|
Loading…
Reference in New Issue
Block a user