interface/server: emit_event(type)
This commit is contained in:
parent
bba9dffb49
commit
470d77cb68
@ -208,7 +208,7 @@ struct Module: public interface::Module
|
||||
}
|
||||
});
|
||||
|
||||
m_server->emit_event(Event("worldgen:voxels_defined"));
|
||||
m_server->emit_event("worldgen:voxels_defined");
|
||||
}
|
||||
|
||||
void on_continue()
|
||||
|
@ -72,6 +72,10 @@ namespace interface
|
||||
|
||||
virtual void sub_event(struct Module *module, const Event::Type &type) = 0;
|
||||
virtual void emit_event(Event event) = 0;
|
||||
template<typename TypeT>
|
||||
void emit_event(const TypeT &type){
|
||||
emit_event(std::move(Event(type)));
|
||||
}
|
||||
template<typename TypeT, typename PrivateT>
|
||||
void emit_event(const TypeT &type, PrivateT *p){
|
||||
emit_event(std::move(Event(type, up_<Event::Private>(p))));
|
||||
|
Loading…
x
Reference in New Issue
Block a user