2021-12-05 18:54:36 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
// Custom Classes
|
|
|
|
#include "CDTable.h"
|
|
|
|
|
|
|
|
struct CDLevelProgressionLookup {
|
2022-07-28 08:39:57 -05:00
|
|
|
unsigned int id; //!< The Level ID
|
|
|
|
unsigned int requiredUScore; //!< The required LEGO Score
|
|
|
|
std::string BehaviorEffect; //!< The behavior effect attached to this
|
2021-12-05 18:54:36 +01:00
|
|
|
};
|
|
|
|
|
2023-03-17 07:36:21 -07:00
|
|
|
class CDLevelProgressionLookupTable : public CDTable<CDLevelProgressionLookupTable> {
|
2021-12-05 18:54:36 +01:00
|
|
|
private:
|
2022-07-28 08:39:57 -05:00
|
|
|
std::vector<CDLevelProgressionLookup> entries;
|
|
|
|
|
2021-12-05 18:54:36 +01:00
|
|
|
public:
|
2023-08-10 21:27:40 -07:00
|
|
|
void LoadValuesFromDatabase();
|
|
|
|
|
2023-03-17 07:36:21 -07:00
|
|
|
// Queries the table with a custom "where" clause
|
2022-07-28 08:39:57 -05:00
|
|
|
std::vector<CDLevelProgressionLookup> Query(std::function<bool(CDLevelProgressionLookup)> predicate);
|
|
|
|
|
2023-08-10 21:27:40 -07:00
|
|
|
const std::vector<CDLevelProgressionLookup>& GetEntries() const;
|
2021-12-05 18:54:36 +01:00
|
|
|
};
|