mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Apply suggestion
- Remove default value for CharacterAbility - Put back accidentally removed comment
This commit is contained in:
parent
ce9d706ed4
commit
1c4e334cd4
@ -17,7 +17,6 @@ use serde::{Deserialize, Serialize};
|
||||
use specs::{Component, FlaggedStorage};
|
||||
use specs_idvs::IdvStorage;
|
||||
use std::time::Duration;
|
||||
use tracing::error;
|
||||
use vek::Vec3;
|
||||
|
||||
#[derive(Copy, Clone, Hash, Eq, PartialEq, Debug, Serialize, Deserialize)]
|
||||
@ -242,16 +241,6 @@ impl Asset for CharacterAbility {
|
||||
type Loader = assets::RonLoader;
|
||||
|
||||
const EXTENSION: &'static str = "ron";
|
||||
|
||||
fn default_value(specifier: &str, err: assets::Error) -> Result<Self, assets::Error> {
|
||||
error!(
|
||||
?err,
|
||||
"Error loading CharacterAbility: {} for the ability map: replacing with default",
|
||||
specifier
|
||||
);
|
||||
|
||||
Ok(CharacterAbility::default())
|
||||
}
|
||||
}
|
||||
|
||||
impl CharacterAbility {
|
||||
|
@ -171,6 +171,11 @@ impl assets::Compound for ItemDef {
|
||||
kind,
|
||||
quality,
|
||||
} = raw;
|
||||
|
||||
// Some commands like /give_item provide the asset specifier separated with \
|
||||
// instead of .
|
||||
//
|
||||
// TODO: This probably does not belong here
|
||||
let item_definition_id = specifier.replace('\\', ".");
|
||||
|
||||
Ok(ItemDef {
|
||||
|
Loading…
Reference in New Issue
Block a user