m_server->setAsyncFatalError("Lua: finishGen" + std::string(e.what()));
}
+ /*
+ Clear generate notifier events
+ */
+ Mapgen *mg = m_emerge->getCurrentMapgen();
+ mg->gennotify.clearEvents();
+
EMERGE_DBG_OUT("ended up with: " << analyze_block(block));
/*
void GenerateNotifier::getEvents(
- std::map<std::string, std::vector<v3s16> > &event_map,
- bool peek_events)
+ std::map<std::string, std::vector<v3s16> > &event_map)
{
std::list<GenNotifyEvent>::iterator it;
event_map[name].push_back(gn.pos);
}
+}
+
- if (!peek_events)
- m_notify_events.clear();
+void GenerateNotifier::clearEvents()
+{
+ m_notify_events.clear();
}
void setNotifyOnDecoIds(std::set<u32> *notify_on_deco_ids);
bool addEvent(GenNotifyType type, v3s16 pos, u32 id=0);
- void getEvents(std::map<std::string, std::vector<v3s16> > &event_map,
- bool peek_events=false);
+ void getEvents(std::map<std::string, std::vector<v3s16> > &event_map);
+ void clearEvents();
private:
u32 m_notify_on = 0;