More removal of RwLocks and replace it with Atomics, to prevent locks.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -8,7 +8,7 @@ use pkmn_lib::dynamic_data::libraries::misc_library::Gen7MiscLibrary;
|
||||
use pkmn_lib::static_data::{
|
||||
Ability, AbilityLibrary, BattleItemCategory, DataLibrary, EffectParameter, Form, GrowthRateLibrary, Item,
|
||||
ItemLibrary, LearnableMoves, LibrarySettings, LookupGrowthRate, MoveData, MoveLibrary, Nature, NatureLibrary,
|
||||
SecondaryEffect, Species, StaticData, Statistic, StatisticSet, TypeLibrary,
|
||||
SecondaryEffect, Species, StaticData, StaticStatisticSet, Statistic, TypeLibrary,
|
||||
};
|
||||
use pkmn_lib::StringKey;
|
||||
use project_root::get_project_root;
|
||||
@@ -301,12 +301,12 @@ fn parse_form(name: StringKey, value: &Value, library: &mut StaticData) -> Form
|
||||
)
|
||||
}
|
||||
|
||||
fn parse_statistics<T>(value: &Value) -> StatisticSet<T>
|
||||
fn parse_statistics<T>(value: &Value) -> StaticStatisticSet<T>
|
||||
where
|
||||
T: PrimInt + TryFrom<u64>,
|
||||
<T as TryFrom<u64>>::Error: Debug,
|
||||
{
|
||||
StatisticSet::new(
|
||||
StaticStatisticSet::new(
|
||||
<T as TryFrom<u64>>::try_from(value.get("hp").unwrap_or(&Value::Number(0.into())).as_u64().unwrap()).unwrap(),
|
||||
<T as TryFrom<u64>>::try_from(
|
||||
value
|
||||
|
||||
@@ -49,7 +49,7 @@ impl TestStep {
|
||||
let mut used_move = None;
|
||||
let pokemon_guard = p.read();
|
||||
for learned_move in pokemon_guard.learned_moves().iter().flatten() {
|
||||
if learned_move.read().move_data().name() == &StringKey::new(use_move) {
|
||||
if learned_move.move_data().name() == &StringKey::new(use_move) {
|
||||
used_move = Some(learned_move.clone());
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user