Minor cleanup

master
Mark 2024-02-03 07:57:46 -08:00
parent 91b82fbe3d
commit 7c8407f966
Signed by: Mark
GPG Key ID: C6D63995FE72FD80
3 changed files with 31 additions and 28 deletions

View File

@ -1,12 +1,23 @@
mod color; mod color;
mod radialbuilder; mod radialbuilder;
mod rect; mod rect;
mod sceneaction;
mod sprite; mod sprite;
mod spritebuilder; mod spritebuilder;
mod state; mod state;
mod textboxbuilder; mod textboxbuilder;
mod util; mod util;
pub use color::*;
pub use radialbuilder::*;
pub use rect::*;
pub use sceneaction::*;
pub use sprite::*;
pub use spritebuilder::*;
pub use state::*;
pub use textboxbuilder::*;
pub use util::*;
use rhai::{exported_module, Engine}; use rhai::{exported_module, Engine};
pub fn register_into_engine(engine: &mut Engine) { pub fn register_into_engine(engine: &mut Engine) {
@ -33,12 +44,3 @@ pub fn register_into_engine(engine: &mut Engine) {
.register_type_with_name::<SceneAction>("SceneAction") .register_type_with_name::<SceneAction>("SceneAction")
.register_static_module("SceneAction", exported_module!(sceneaction_mod).into()); .register_static_module("SceneAction", exported_module!(sceneaction_mod).into());
} }
pub use color::*;
pub use radialbuilder::*;
pub use rect::*;
pub use sprite::*;
pub use spritebuilder::*;
pub use state::*;
pub use textboxbuilder::*;
pub use util::*;

View File

@ -0,0 +1,20 @@
use rhai::plugin::*;
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
pub enum SceneAction {
None,
SceneOutfitter,
SceneLanded,
}
#[export_module]
pub mod sceneaction_mod {
#[allow(non_upper_case_globals)]
pub const None: SceneAction = SceneAction::None;
#[allow(non_upper_case_globals)]
pub const SceneOutfitter: SceneAction = SceneAction::SceneOutfitter;
#[allow(non_upper_case_globals)]
pub const SceneLanded: SceneAction = SceneAction::SceneLanded;
}

View File

@ -60,22 +60,3 @@ pub mod textboxjustify_mod {
#[allow(non_upper_case_globals)] #[allow(non_upper_case_globals)]
pub const Left: TextBoxJustify = TextBoxJustify::Left; pub const Left: TextBoxJustify = TextBoxJustify::Left;
} }
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
pub enum SceneAction {
None,
SceneOutfitter,
SceneLanded,
}
#[export_module]
pub mod sceneaction_mod {
#[allow(non_upper_case_globals)]
pub const None: SceneAction = SceneAction::None;
#[allow(non_upper_case_globals)]
pub const SceneOutfitter: SceneAction = SceneAction::SceneOutfitter;
#[allow(non_upper_case_globals)]
pub const SceneLanded: SceneAction = SceneAction::SceneLanded;
}