mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-16 18:31:32 +00:00
Default [object] silent= to true if no description is provided
Code snippet by shadowm
This commit is contained in:
parent
079692d424
commit
e9d70dbc1e
@ -855,7 +855,10 @@ WML_HANDLER_FUNCTION(object, event_info, cfg)
|
||||
command_type = "else";
|
||||
}
|
||||
|
||||
if (!cfg["silent"].to_bool())
|
||||
// Default to silent if object has no description
|
||||
const bool silent = cfg.has_attribute("silent") ? cfg["silent"].to_bool() : !cfg.has_attribute("description");
|
||||
|
||||
if (!silent)
|
||||
{
|
||||
// Redraw the unit, with its new stats
|
||||
resources::screen->draw();
|
||||
|
Loading…
x
Reference in New Issue
Block a user