#pragma once

#define autocvar_g_maplist cvar_string("g_maplist")
bool autocvar_g_maplist_check_waypoints;
int autocvar_g_maplist_index;
string autocvar_g_maplist_mostrecent;
int autocvar_g_maplist_mostrecent_count;
bool autocvar_g_maplist_selectrandom;
float autocvar_g_maplist_shuffle;
#define autocvar_g_maplist_votable cvar("g_maplist_votable")
bool autocvar_g_maplist_votable_abstain;
bool autocvar_g_maplist_votable_show_suggester;
float autocvar_g_maplist_votable_reduce_time;
int autocvar_g_maplist_votable_reduce_count;
int autocvar_g_maplist_votable_detail;
string autocvar_g_maplist_votable_screenshot_dir;
bool autocvar_g_maplist_votable_suggestions;
bool autocvar_g_maplist_votable_suggestions_override_mostrecent;
float autocvar_g_maplist_votable_timeout;
bool autocvar_g_maplist_ignore_sizes;
bool autocvar_g_maplist_sizes_count_maxplayers = true;
bool autocvar_g_maplist_sizes_count_bots = true;
int autocvar_rescan_pending;
bool autocvar_sv_vote_gametype;
float autocvar_sv_vote_gametype_timeout;
string autocvar_sv_vote_gametype_options;
float autocvar_sv_vote_gametype_reduce_time;
int autocvar_sv_vote_gametype_reduce_count;
int autocvar_sv_vote_gametype_detail;
bool autocvar_sv_vote_gametype_default_current;
bool autocvar_sv_vote_gametype_maplist_reset = true;

// definitions for functions used outside mapvoting.qc
void MapVote_Start();
void MapVote_Spawn();
void MapVote_Think();
void MapVote_SendPicture(entity to, int id);
// FIXME can't use Gametype type because Gitlab compilation unit test fails
bool GameTypeVote_SetGametype(entity type, string gametype_string, bool call_hooks);
float GameTypeVote_Start();
float GameTypeVote_Finished(int pos);
string GameTypeVote_MapInfo_FixName(string m);

bool gametypevote;
string getmapname_stored;
float mapvote_initialized;
