Assert that there are no disabled event handlers when saving

If there are still issues with this, it's better for the game to
complain about the problem loudly than sweep it under the carpet.
This commit is contained in:
Jyrki Vesterinen 2018-03-10 17:24:49 +02:00
parent 857f5a9e71
commit 7637a36c3f

View file

@ -135,7 +135,8 @@ void manager::add_events(const config::const_child_itors& cfgs, const std::strin
void manager::write_events(config& cfg) const
{
for(const handler_ptr& eh : event_handlers_->get_active()) {
if(eh && !eh->is_menu_item() && !eh->disabled()) {
if(eh && !eh->is_menu_item()) {
assert(!eh->disabled());
cfg.add_child("event", eh->get_config());;
}
}