2021-12-05 17:54:36 +00:00
|
|
|
/*
|
|
|
|
* Darkflame Universe
|
|
|
|
* Copyright 2018
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SLASHCOMMANDHANDLER_H
|
|
|
|
#define SLASHCOMMANDHANDLER_H
|
|
|
|
|
|
|
|
#include "RakNetTypes.h"
|
2024-03-25 12:10:22 +00:00
|
|
|
#include "eGameMasterLevel.h"
|
2021-12-05 17:54:36 +00:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
class Entity;
|
|
|
|
|
2024-03-25 12:10:22 +00:00
|
|
|
struct Command {
|
|
|
|
std::string description = "Default Command Description";
|
|
|
|
std::string help = "Default Command Help Text";
|
|
|
|
eGameMasterLevel requiredLevel = eGameMasterLevel::DEVELOPER;
|
|
|
|
std::function<void(Entity*,const std::string)> handle;
|
|
|
|
};
|
|
|
|
|
2021-12-05 17:54:36 +00:00
|
|
|
namespace SlashCommandHandler {
|
2024-03-25 12:10:22 +00:00
|
|
|
void Startup();
|
2021-12-05 17:54:36 +00:00
|
|
|
void HandleChatCommand(const std::u16string& command, Entity* entity, const SystemAddress& sysAddr);
|
|
|
|
void SendAnnouncement(const std::string& title, const std::string& message);
|
2024-03-25 12:10:22 +00:00
|
|
|
void RegisterCommand(Command info, std::string command);
|
2021-12-05 17:54:36 +00:00
|
|
|
};
|
|
|
|
|
2024-03-25 12:10:22 +00:00
|
|
|
namespace DEVGMCommands {
|
|
|
|
void SetGMLevel(Entity* entity, const std::string args);
|
|
|
|
void ToggleNameplate(Entity* entity, const std::string args);
|
|
|
|
void ToggleSkipCinematics(Entity* entity, const std::string args);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace GMZeroCommands {
|
|
|
|
void Help(Entity* entity, const std::string args);
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace GreaterThanZeroCommands {
|
|
|
|
}
|
|
|
|
|
2021-12-05 17:54:36 +00:00
|
|
|
#endif // SLASHCOMMANDHANDLER_H
|