#include "beatlevelimpl.h" #include #include "beatset.h" namespace Beatsaber { BeatLevelImpl::BeatLevelImpl(std::weak_ptr p, const json& j) : parent(p), base(j) { dif = Difficulty::getByString(j.value("_difficulty", "")); diffRank = j.value("_difficultyRank", 0); filename = j.value("_beatmapFilename", ""); njs = j.value("_noteJumpMovementSpeed", -1); nso = j.value("_noteJumpStartBeatOffset", 0); //load level content if(!filename.empty()) { } } BeatLevelImpl::~BeatLevelImpl() {} Difficulty::Difficulty BeatLevelImpl::getDifficulty() const { return dif; } int32_t BeatLevelImpl::getDifficultyRank() const { return diffRank; } std::string BeatLevelImpl::getFilename() const { return filename; } double BeatLevelImpl::getNoteJumpSpeed() const { return njs; } double BeatLevelImpl::getNoteStartOffset() const { return nso; } std::string BeatLevelImpl::getCustomData() const { if(base.contains("_customData")) { return base["_customData"].dump(); } return ""; } std::shared_ptr BeatLevelImpl::getBeatSet() const { return parent.lock(); } std::shared_ptr BeatLevelImpl::getBeatMap() const { return parent.lock()->getBeatMap(); } }