/// The export registry module deals with registering all functions we require in WebAssembly. mod export_registry; /// A hacky extern ref implementation to ensure the client does not do things it is not allowed to do. pub(crate) mod extern_ref; /// The script module deals with the actual running of WASM functions. pub mod script; /// A cache of all script functions for easy calls mod script_function_cache; /// The script resolver deals with the loading of scripts. pub mod script_resolver; /// A small simple allocator for use for rapid short lived WASM allocations. mod temp_wasm_allocator; /// The WebAssemblyScriptCapabilities define which functions are implemented on a script. This allows /// us to not call a function if we do not need to. #[derive(Debug, Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash)] #[allow(missing_docs)] #[allow(clippy::missing_docs_in_private_items)] pub enum WebAssemblyScriptCapabilities { None = 0, Initialize = 1, OnStack, OnRemove, OnBeforeTurn, ChangeAttack, ModifyNumberOfHits, PreventAttack, FailAttack, StopBeforeAttack, OnBeforeAttack, FailIncomingAttack, IsInvulnerable, OnAttackMiss, ChangeAttackType, ChangeEffectiveness, BlockCritical, OnIncomingHit, OnFaintingOpponent, PreventStatBoostChange, ModifyStatBoostChange, PreventSecondaryEffects, OnSecondaryEffect, OnAfterHits, PreventSelfSwitch, ModifyEffectChance, ModifyIncomingEffectChance, OverrideBasePower, ChangeDamageStatsUser, BypassDefensiveStat, BypassOffensiveStat, ModifyStatModifier, ModifyDamageModifier, OverrideDamage, OverrideIncomingDamage, ChangeSpeed, ChangePriority, OnFail, OnOpponentFail, PreventRunAway, PreventOpponentRunAway, PreventOpponentSwitch, OnEndTurn, OnDamage, OnFaint, OnAfterHeldItemConsume, PreventIncomingCritical, ModifyCriticalStage, OverrideCriticalModifier, OverrideSTABModifier, ModifyExperienceGain, DoesShareExperience, BlockWeather, OnSwitchIn, ModifyOffensiveStatValue, ModifyDefensiveStatValue, }