implement BB challenge param commands

This commit is contained in:
Martin Michelsen
2023-11-08 22:08:59 -08:00
parent 3ea65ccc75
commit cabd03a82e
12 changed files with 224 additions and 86 deletions
+8 -1
View File
@@ -23,7 +23,7 @@ Lobby::Lobby(shared_ptr<ServerState> s, uint32_t id)
episode(Episode::NONE),
mode(GameMode::NORMAL),
difficulty(0),
exp_multiplier(1),
exp_multiplier(1.0f),
random_seed(random_object<uint32_t>()),
event(0),
block(0),
@@ -43,6 +43,13 @@ shared_ptr<ServerState> Lobby::require_server_state() const {
return s;
}
shared_ptr<Lobby::ChallengeParameters> Lobby::require_challenge_params() const {
if (!this->challenge_params) {
throw runtime_error("challenge params are missing");
}
return this->challenge_params;
}
void Lobby::create_item_creator() {
auto s = this->require_server_state();