mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-18 09:35:50 +00:00
protocols/unreal2: Only compile game impl macros when needed
Unreal2 hadn't been added when #144 was merged so this got missed out.
This commit is contained in:
parent
529abe9d76
commit
1d7cb31bc4
1 changed files with 4 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ pub use types::*;
|
|||
/// * `pretty_name` - The full name of the game, will be used as the
|
||||
/// documentation for the created module.
|
||||
/// * `default_port` - Passed through to [game_query_fn].
|
||||
#[cfg(feature = "games")]
|
||||
macro_rules! game_query_mod {
|
||||
($mod_name: ident, $pretty_name: expr, $default_port: literal) => {
|
||||
#[doc = $pretty_name]
|
||||
|
|
@ -22,6 +23,7 @@ macro_rules! game_query_mod {
|
|||
};
|
||||
}
|
||||
|
||||
#[cfg(feature = "games")]
|
||||
pub(crate) use game_query_mod;
|
||||
|
||||
// Allow generating doc comments:
|
||||
|
|
@ -29,6 +31,7 @@ pub(crate) use game_query_mod;
|
|||
/// Generate a query function for a valve game.
|
||||
///
|
||||
/// * `default_port` - The default port the game uses.
|
||||
#[cfg(feature = "games")]
|
||||
macro_rules! game_query_fn {
|
||||
($default_port: literal) => {
|
||||
crate::protocols::unreal2::game_query_fn! {@gen $default_port, concat!(
|
||||
|
|
@ -51,4 +54,5 @@ macro_rules! game_query_fn {
|
|||
};
|
||||
}
|
||||
|
||||
#[cfg(feature = "games")]
|
||||
pub(crate) use game_query_fn;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue