Reactions, remote kick and better protections (#807)

* feat(Scripts): Complete GlobalPlayerBD
* feat(Scripts): add GPBD_Kicking
* feat(Scripts): start work on GPBD_FM_3
* feat(Scripts): add more to GPBD_FM_3
* feat(Scripts): complete GPBD_FM_3
* feat(Scripts): start work on GPBD_FM
* feat(Scripts): improve GPBD_FM
* feat(Scripts): complete GPBD_FM
* feat(Reactions): Add reactions
* feat(Protections): Improve protections
* feat(RemoteKick): Add remote kick
* feat(Stats): add KillsOnPlayers and DeathsByPlayers
* fix(Classes): Fix compiler warnings
This commit is contained in:
maybegreat48
2023-01-03 16:48:32 +00:00
committed by GitHub
parent 858b4d6b9f
commit 13ff1be75a
62 changed files with 1039 additions and 882 deletions

View File

@ -1,6 +1,11 @@
#include "views/view.hpp"
#include "services/player_database/player_database_service.hpp"
#include "core/data/command_access_levels.hpp"
#include "core/scr_globals.hpp"
#include "core/data/language_codes.hpp"
#include <script/globals/GlobalPlayerBD.hpp>
#include <script/globals/GPBD_FM_3.hpp>
#include <script/globals/GPBD_FM.hpp>
namespace big
{
@ -119,6 +124,35 @@ namespace big
net_player_data->m_external_port).data());
}
ImGui::Separator();
auto id = g_player_service->get_selected()->id();
if (id != -1)
{
auto& stats = scr_globals::gpbd_fm_1.as<GPBD_FM*>()->Entries[id].PlayerStats;
auto& boss_goon = scr_globals::gpbd_fm_3.as<GPBD_FM_3*>()->Entries[id].BossGoon;
if (boss_goon.Language >= 0 && boss_goon.Language < 13)
ImGui::Text("Language: %s", languages[boss_goon.Language].name);
ImGui::Text("CEO Name: %s", boss_goon.GangName);
ImGui::Text("MC Name: %s", boss_goon.MCName);
ImGui::Text("Money In Wallet: %d", stats.WalletBalance);
ImGui::Text("Money In Bank: %d", stats.Money - stats.WalletBalance);
ImGui::Text("Total Money: %d", stats.Money);
ImGui::Text("Rank: %d (RP %d)", stats.Rank, stats.RP);
ImGui::Text("K/D Ratio: %f", stats.KdRatio);
ImGui::Text("Kills On Players: %d", stats.KillsOnPlayers);
ImGui::Text("Deaths By Players: %d", stats.DeathsByPlayers);
ImGui::Text("Prostitutes Frequented: %d", stats.ProstitutesFrequented);
ImGui::Text("Lap Dances Bought: %d", stats.LapDancesBought);
ImGui::Text("Missions Created: %d", stats.MissionsCreated);
ImGui::Text("Meltdown Complete: %s", scr_globals::gpbd_fm_1.as<GPBD_FM*>()->Entries[id].MeltdownComplete ? "Yes" : "No"); // curious to see if anyone has actually played singleplayer
ImGui::Separator();
}
if (ImGui::BeginCombo("Chat Command Permissions", COMMAND_ACCESS_LEVELS[g_player_service->get_selected()->command_access_level.value_or(g.session.chat_command_default_access_level)]))
{
for (const auto& [type, name] : COMMAND_ACCESS_LEVELS)