Etterna 0.74.4
Loading...
Searching...
No Matches
FilterManager.h
1#ifndef FilterManager_H
2#define FilterManager_H
3#include "Etterna/Models/Misc/GameConstantsAndTypes.h"
4#include "Etterna/Models/Misc/PlayerNumber.h"
5#include <unordered_map>
6#include <array>
7
8class PlayerState;
10{
11 public:
14
15 // The skillsets, plus 2 more for Length and Clear%
16 constexpr static auto NUM_FILTERS = NUM_Skillset + 2;
17
18 std::array<float, NUM_FILTERS> FilterLowerBounds;
19 std::array<float, NUM_FILTERS> FilterUpperBounds;
20 /* Skill_Overall,
21 * Skill_Stream,
22 * Skill_Jumpstream,
23 * Skill_Handstream,
24 * Skill_Stamina,
25 * Skill_JackSpeed,
26 * Skill_Chordjack,
27 * Skill_Technical,
28 * Length, //REQUIRED in non-exclusive filter if set
29 * Clear % //REQUIRED in non-exclusive filter if set
30 */
31 float MaxFilterRate = 1.F;
32 float MinFilterRate = 1.F;
33 bool ExclusiveFilter = false; // if true the filter system will only match
34 // songs that meet all criteria rather than
35 // all that meet any - mina
36 auto GetFilter(Skillset ss, int bound) -> float;
37 void SetFilter(float v, Skillset ss, int bound);
38 void ResetSSFilters(); // reset button for filters
39 void ResetAllFilters();
40 bool HighestSkillsetsOnly = false;
41 // Skillset is highest of the chart's skillset
42 bool HighestDifficultyOnly = false;
43 // Chart's skillset's MSD is the highest of all the MSDS of that
44 // skillset for all charts for that song.
45
46 auto AnyActiveFilter() -> bool;
47
48 void savepos(std::string name, int x, int y);
49 auto loadpos(std::string name) -> std::pair<int, int>;
50
51 // not actually filter stuff! but this doesn't get enough love so i'm going
52 // to put it here until i make something for it -mina
53 int miniboarddockx = 0;
54 int miniboarddocky = 0;
55 bool galaxycollapsed = false;
56 std::unordered_map<std::string, std::pair<int, int>> watte;
57
58 // General boolean to see if we should be filtering common packs.
59 // It defaults to on just to help smooth the multiplayer experience. -poco
60 bool filteringCommonPacks = true;
61
62 // Lua
63 void PushSelf(lua_State* L);
64};
65
66extern FilterManager* FILTERMAN;
67
68#endif
Definition FilterManager.h:10
The player's indivdual state.
Definition PlayerState.h:30