Struct eos_rs::api::dungeon_mode::LogMessageBuilder
source · pub struct LogMessageBuilder<'a> { /* private fields */ }
Expand description
Builder for creating dungeon message log messages.
By default message will be shown ‘quiet’, meaning there will be no popup
shown when the message is logged. You can force a popup to be shown with Self::popup
,
but please also note that with some configurations, a popup will always be displayed, even
if Self::popup
is not called. See the implementation for more details.
Also see crate::api::messages::GameStringBuilder
; this is using pretty much the same
principles for building the actual message strings.
Implementations§
source§impl<'a> LogMessageBuilder<'a>
impl<'a> LogMessageBuilder<'a>
sourcepub fn check_user_fainted(&'a mut self) -> &'a mut Self
pub fn check_user_fainted(&'a mut self) -> &'a mut Self
Do not show the message if the user is fainted.
Note
Self::target_check_fainted
will take precedence over this, both can not be active
at the same time.
pub fn target_check_fainted( &'a mut self, target: &'a DungeonEntity ) -> &'a mut Self
sourcepub fn string(&mut self, string_id: u16, entity: &DungeonEntity) -> &mut Self
pub fn string(&mut self, string_id: u16, entity: &DungeonEntity) -> &mut Self
Replaces instances of a given placeholder tag by the string representation of the given entity.
Concretely this means that any occurrences of \[string:<string_id>\]
will be replaced by the
name of the given entity.
Example: If use pass string_id
with 1, it will replace all occurrences of \[string:1\]
.
Note
As a performance optimization this will immediately reserve that string with the game when called. This can have weird effects if you expect to show the message built by this builder at a later time.
sourcepub fn log_msg(&mut self, user: &DungeonEntity, message_id: i32)
pub fn log_msg(&mut self, user: &DungeonEntity, message_id: i32)
Writes a log entry using the message with the given message ID.