Removed the old menu system (/menu and /choose) entirely
This commit is contained in:
@@ -222,7 +222,6 @@ enum DrvAction {
|
||||
PLAY_NOTIFY_ACCEPT,
|
||||
PLAY_CALL_EVENT_UPDATE,
|
||||
PLAY_INVOKE_PLAYER,
|
||||
PLAY_INVOKE_CHOOSE,
|
||||
PLAY_INVOKE_LUA_SOURCE,
|
||||
PLAY_RELEASE,
|
||||
};
|
||||
@@ -237,7 +236,6 @@ inline static const char *action_string(DrvAction act) {
|
||||
case PLAY_NOTIFY_ACCEPT: return "PLAY_NOTIFY_ACCEPT";
|
||||
case PLAY_CALL_EVENT_UPDATE: return "PLAY_CALL_EVENT_UPDATE";
|
||||
case PLAY_INVOKE_PLAYER: return "PLAY_INVOKE_PLAYER";
|
||||
case PLAY_INVOKE_CHOOSE: return "PLAY_INVOKE_CHOOSE";
|
||||
case PLAY_INVOKE_LUA_SOURCE: return "PLAY_INVOKE_LUA_SOURCE";
|
||||
case PLAY_RELEASE: return "PLAY_RELEASE";
|
||||
default: return "unknown";
|
||||
@@ -490,11 +488,6 @@ void DrivenEngine::drv_invoke_engio(int64_t place, uint32_t datapklen, const cha
|
||||
queued_invocations_.emplace_back(inv);
|
||||
}
|
||||
|
||||
void DrivenEngine::drv_invoke_choose(int64_t place, uint32_t datapklen, const char *datapk) {
|
||||
Invocation *inv = new Invocation(Invocation::KIND_CHOOSE, visible_actor_id_, place, std::string_view(datapk, datapklen));
|
||||
queued_invocations_.emplace_back(inv);
|
||||
}
|
||||
|
||||
void DrivenEngine::drv_invoke_lua_source(uint32_t srcpklen, const char *srcpk) {
|
||||
Invocation *inv = new Invocation(Invocation::KIND_LUA_SOURCE, visible_actor_id_, visible_actor_id_, std::string_view(srcpk, srcpklen));
|
||||
queued_invocations_.emplace_back(inv);
|
||||
@@ -851,32 +844,6 @@ void replay_invoke_engio(EngineWrapper *w) {
|
||||
////////////////////////
|
||||
|
||||
|
||||
void play_invoke_choose(EngineWrapper *w, int64_t place, uint32_t datapklen, const char *datapk) {
|
||||
assert(w->rlog == nullptr);
|
||||
if (w->wlog != nullptr) {
|
||||
w->wlog->write_cmd_hash(PLAY_INVOKE_CHOOSE, eng::memhash());
|
||||
w->wlog->write_int64(place);
|
||||
w->wlog->write_string(std::string_view(datapk, datapklen));
|
||||
w->wlog->flush();
|
||||
}
|
||||
|
||||
w->engine->drv_invoke_choose(place, datapklen, datapk);
|
||||
}
|
||||
|
||||
void replay_invoke_choose(EngineWrapper *w) {
|
||||
int64_t place = w->rlog->read_int64();
|
||||
std::string srcpack = w->rlog->read_string();
|
||||
if (!w->rlog->good()) {
|
||||
return reset_wrapper(w, "replay log corrupt in replay_invoke_choose");
|
||||
}
|
||||
|
||||
w->engine->drv_invoke_choose(place, srcpack.size(), srcpack.c_str());
|
||||
}
|
||||
|
||||
|
||||
////////////////////////
|
||||
|
||||
|
||||
void play_invoke_lua_source(EngineWrapper *w, uint32_t srcpklen, const char *srcpk) {
|
||||
assert(w->rlog == nullptr);
|
||||
if (w->wlog != nullptr) {
|
||||
@@ -966,7 +933,6 @@ static void replaycore_step(EngineWrapper *w) {
|
||||
case PLAY_NOTIFY_ACCEPT: replay_notify_accept(w); return;
|
||||
case PLAY_CALL_EVENT_UPDATE: replay_invoke_event_update(w); return;
|
||||
case PLAY_INVOKE_PLAYER: replay_invoke_lua_source(w); return;
|
||||
case PLAY_INVOKE_CHOOSE: replay_invoke_lua_source(w); return;
|
||||
case PLAY_INVOKE_LUA_SOURCE: replay_invoke_lua_source(w); return;
|
||||
case PLAY_RELEASE: release(w); return;
|
||||
default: return reset_wrapper(w, "Replay log corrupt in command dispatcher");
|
||||
@@ -1029,7 +995,6 @@ static void init_engine_wrapper_helper(EngineWrapper *w) {
|
||||
w->play_notify_accept = play_notify_accept;
|
||||
w->play_invoke_event_update = play_invoke_event_update;
|
||||
w->play_invoke_engio = play_invoke_engio;
|
||||
w->play_invoke_choose = play_invoke_choose;
|
||||
w->play_invoke_lua_source = play_invoke_lua_source;
|
||||
|
||||
w->replay_initialize = replaycore_initialize;
|
||||
|
||||
Reference in New Issue
Block a user