use rhai::{plugin::*, Dynamic, Module}; #[export_module] #[allow(non_snake_case)] #[allow(non_upper_case_globals)] pub mod player_directive_module { use galactica_system::PlayerDirective; pub const None: PlayerDirective = PlayerDirective::None; pub const Land: PlayerDirective = PlayerDirective::Land; pub const UnLand: PlayerDirective = PlayerDirective::UnLand; pub fn Engine(state: bool) -> PlayerDirective { PlayerDirective::Engine(state) } pub fn TurnLeft(state: bool) -> PlayerDirective { PlayerDirective::TurnLeft(state) } pub fn TurnRight(state: bool) -> PlayerDirective { PlayerDirective::TurnRight(state) } pub fn Guns(state: bool) -> PlayerDirective { PlayerDirective::Guns(state) } }