This commit is contained in:
@@ -22,7 +22,7 @@ pub fn register(module: &mut rune::Module) -> anyhow::Result<()> {
|
||||
}
|
||||
|
||||
#[derive(Debug, Any)]
|
||||
pub struct RuneForm(Arc<dyn Form>);
|
||||
pub struct RuneForm(pub Arc<dyn Form>);
|
||||
|
||||
impl_rune_wrapper!(&Arc<dyn Form>, RuneForm);
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ pub fn register(module: &mut rune::Module) -> anyhow::Result<()> {
|
||||
}
|
||||
|
||||
#[derive(Debug, Any)]
|
||||
pub struct RuneItem(Arc<dyn Item>);
|
||||
pub struct RuneItem(pub Arc<dyn Item>);
|
||||
|
||||
impl_rune_wrapper!(&Arc<dyn Item>, RuneItem);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
mod growth_rate_library;
|
||||
mod library_settings;
|
||||
mod nature_library;
|
||||
mod static_data;
|
||||
pub mod static_data;
|
||||
mod type_library;
|
||||
|
||||
use crate::script_implementations::rune::wrappers::{impl_rune_wrapper, RuneStringKey, RuneWrapper};
|
||||
|
||||
@@ -17,7 +17,7 @@ pub fn register(module: &mut rune::Module) -> anyhow::Result<()> {
|
||||
}
|
||||
|
||||
#[derive(Debug, rune::Any)]
|
||||
struct RuneStaticData(Arc<dyn StaticData>);
|
||||
pub struct RuneStaticData(pub Arc<dyn StaticData>);
|
||||
|
||||
impl_rune_wrapper!(&Arc<dyn StaticData>, RuneStaticData);
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
mod ability;
|
||||
mod form;
|
||||
pub mod form;
|
||||
mod growth_rate;
|
||||
mod item;
|
||||
pub mod item;
|
||||
mod learnable_moves;
|
||||
mod libraries;
|
||||
pub mod libraries;
|
||||
mod move_data;
|
||||
mod nature;
|
||||
mod species;
|
||||
|
||||
@@ -4,15 +4,15 @@ use rune::Any;
|
||||
use std::sync::Arc;
|
||||
|
||||
pub fn register(module: &mut rune::Module) -> anyhow::Result<()> {
|
||||
module.ty::<RuneStatisticSet>()?;
|
||||
module.function_meta(RuneStatisticSet::get)?;
|
||||
module.function_meta(RuneStatisticSet::set)?;
|
||||
module.function_meta(RuneStatisticSet::hp)?;
|
||||
module.function_meta(RuneStatisticSet::attack)?;
|
||||
module.function_meta(RuneStatisticSet::defense)?;
|
||||
module.function_meta(RuneStatisticSet::special_attack)?;
|
||||
module.function_meta(RuneStatisticSet::special_defense)?;
|
||||
module.function_meta(RuneStatisticSet::speed)?;
|
||||
module.ty::<RuneU32StatisticSet>()?;
|
||||
module.function_meta(RuneU32StatisticSet::get)?;
|
||||
module.function_meta(RuneU32StatisticSet::set)?;
|
||||
module.function_meta(RuneU32StatisticSet::hp)?;
|
||||
module.function_meta(RuneU32StatisticSet::attack)?;
|
||||
module.function_meta(RuneU32StatisticSet::defense)?;
|
||||
module.function_meta(RuneU32StatisticSet::special_attack)?;
|
||||
module.function_meta(RuneU32StatisticSet::special_defense)?;
|
||||
module.function_meta(RuneU32StatisticSet::speed)?;
|
||||
|
||||
module.ty::<RuneStaticStatisticSet>()?;
|
||||
module.function_meta(RuneStaticStatisticSet::get)?;
|
||||
@@ -27,10 +27,10 @@ pub fn register(module: &mut rune::Module) -> anyhow::Result<()> {
|
||||
}
|
||||
|
||||
#[derive(Debug, Any)]
|
||||
pub struct RuneStatisticSet(Arc<StatisticSet<u32>>);
|
||||
pub struct RuneU32StatisticSet(Arc<StatisticSet<u32>>);
|
||||
|
||||
impl_rune_wrapper!(&Arc<StatisticSet<u32>>, RuneStatisticSet);
|
||||
impl RuneStatisticSet {
|
||||
impl_rune_wrapper!(&Arc<StatisticSet<u32>>, RuneU32StatisticSet);
|
||||
impl RuneU32StatisticSet {
|
||||
#[rune::function]
|
||||
fn get(&self, stat: Statistic) -> u32 { self.0.get_stat(stat) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user