aboutsummaryrefslogtreecommitdiff
path: root/src/aoapplication.h
diff options
context:
space:
mode:
authorTrickyLeifa <date.epoch@gmail.com>2024-05-17 19:19:04 +0200
committerTrickyLeifa <date.epoch@gmail.com>2024-05-17 19:19:04 +0200
commitfefaad53943d8b542bd8f288dae7d15e08c67b32 (patch)
tree37a27a49e48af87ff0ea00cd0556cb367c3562b2 /src/aoapplication.h
parent1ef96383c8f7ed136a0e028aef0835b4838b5e95 (diff)
parent469e293a1885e49f1d5994d41ac7cfc9f4666952 (diff)
Merge branch 'master' into kaleidoscope
Diffstat (limited to 'src/aoapplication.h')
-rw-r--r--src/aoapplication.h60
1 files changed, 15 insertions, 45 deletions
diff --git a/src/aoapplication.h b/src/aoapplication.h
index c8c24441..cd9265b3 100644
--- a/src/aoapplication.h
+++ b/src/aoapplication.h
@@ -4,6 +4,7 @@
#include "datatypes.h"
#include "demoserver.h"
#include "discord_rich_presence.h"
+#include "serverdata.h"
#include "widgets/aooptionsdialog.h"
#include "bass.h"
@@ -84,48 +85,31 @@ public:
qint64 latency = 0;
QString window_title;
- /////////////////server metadata//////////////////
-
- bool yellow_text_supported = false;
- bool prezoom_supported = false;
- bool flipping_supported = false;
- bool custom_objection_supported = false;
- bool desk_mod_supported = false;
- bool evidence_supported = false;
- bool cccc_ic_supported = false;
- bool arup_supported = false;
- bool casing_alerts_supported = false;
- bool modcall_reason_supported = false;
- bool looping_sfx_supported = false;
- bool additive_supported = false;
- bool effects_supported = false;
- bool y_offset_supported = false;
- bool expanded_desk_mods_supported = false;
- bool auth_packet_supported = false;
- bool custom_blips_supported = false;
+ /// Stores everything related to the server the client is connected to, if
+ /// any.
+ server::ServerData m_serverdata;
///////////////loading info///////////////////
// client ID. Not useful, to be removed eventually
int client_id = 0;
- QString server_software;
-
- int char_list_size = 0;
- int loaded_chars = 0;
+ /// Used for a fancy loading bar upon joining a server.
int generated_chars = 0;
- int evidence_list_size = 0;
- int loaded_evidence = 0;
- int music_list_size = 0;
- int loaded_music = 0;
bool courtroom_loaded = false;
- //////////////////versioning///////////////
-
- QString get_version_string();
+ /**
+ * @brief Returns the version string of the software.
+ *
+ * @return The string "X.Y.Z", where X is the release of the software (usually
+ * '2'), Y is the major version, and Z is the minor version.
+ */
+ static QString get_version_string();
- ///////////////////////////////////////////
+ static const int RELEASE = 2;
+ static const int MAJOR_VERSION = 10;
+ static const int MINOR_VERSION = 1;
void set_server_list(QVector<ServerInfo> &servers) { server_list = servers; }
QVector<ServerInfo> &get_server_list() { return server_list; }
@@ -335,16 +319,6 @@ public:
// The file name of the log file in base/logs.
QString log_filename;
- /**
- * @brief A QString of an URL that defines the content repository
- * send by the server.
- *
- * @details Introduced in Version 2.9.2.
- * Addresses the issue of contenturl devlivery for WebAO
- * without relying on someone adding the link manually.
- */
- QString asset_url;
-
void initBASS();
static void load_bass_plugins();
static void CALLBACK BASSreset(HSTREAM handle, DWORD channel, DWORD data, void *user);
@@ -354,10 +328,6 @@ public:
DemoServer *demo_server = nullptr;
private:
- const int RELEASE = 2;
- const int MAJOR_VERSION = 11;
- const int MINOR_VERSION = 0;
-
QVector<ServerInfo> server_list;
QHash<uint, QString> asset_lookup_cache;
QHash<uint, QString> dir_listing_cache;