osb/source/frontend/StarClientCommandProcessor.hpp

77 lines
2.4 KiB
C++
Raw Normal View History

2023-06-20 04:33:09 +00:00
#ifndef STAR_CLIENT_COMMAND_PROCESSOR_HPP
#define STAR_CLIENT_COMMAND_PROCESSOR_HPP
#include "StarShellParser.hpp"
#include "StarLuaComponents.hpp"
#include "StarLuaRoot.hpp"
#include "StarUniverseClient.hpp"
#include "StarQuestManager.hpp"
#include "StarCinematic.hpp"
#include "StarMainInterfaceTypes.hpp"
namespace Star {
class ClientCommandProcessor {
public:
ClientCommandProcessor(UniverseClientPtr universeClient, CinematicPtr cinematicOverlay,
MainInterfacePaneManager* paneManager, StringMap<StringList> macroCommands);
StringList handleCommand(String const& commandLine);
bool debugDisplayEnabled() const;
2023-07-03 18:42:16 +00:00
bool debugHudEnabled() const;
2023-06-20 04:33:09 +00:00
bool fixedCameraEnabled() const;
private:
bool adminCommandAllowed() const;
String previewQuestPane(StringList const& arguments, function<PanePtr(QuestPtr)> createPane);
String reload();
String whoami();
String gravity();
String debug(String const& argumentsString);
2023-06-20 04:33:09 +00:00
String boxes();
String fullbright();
String asyncLighting();
String setGravity(String const& argumentsString);
2023-06-20 04:33:09 +00:00
String resetGravity();
String fixedCamera();
String monochromeLighting();
String radioMessage(String const& argumentsString);
2023-06-20 04:33:09 +00:00
String clearRadioMessages();
String clearCinematics();
String startQuest(String const& argumentsString);
String completeQuest(String const& argumentsString);
String failQuest(String const& argumentsString);
String previewNewQuest(String const& argumentsString);
String previewQuestComplete(String const& argumentsString);
String previewQuestFailed(String const& argumentsString);
2023-06-20 04:33:09 +00:00
String clearScannedObjects();
String playTime();
String deathCount();
String cinema(String const& argumentsString);
2023-06-20 04:33:09 +00:00
String suicide();
String naked();
String resetAchievements();
String statistic(String const& argumentsString);
String giveEssentialItem(String const& argumentsString);
String makeTechAvailable(String const& argumentsString);
String enableTech(String const& argumentsString);
String upgradeShip(String const& argumentsString);
2023-06-20 04:33:09 +00:00
UniverseClientPtr m_universeClient;
CinematicPtr m_cinematicOverlay;
MainInterfacePaneManager* m_paneManager;
CaseInsensitiveStringMap<function<String(String const&)>> m_builtinCommands;
2023-06-20 04:33:09 +00:00
StringMap<StringList> m_macroCommands;
ShellParser m_parser;
LuaBaseComponent m_scriptComponent;
bool m_debugDisplayEnabled = false;
2023-07-03 18:42:16 +00:00
bool m_debugHudEnabled = true;
2023-06-20 04:33:09 +00:00
bool m_fixedCameraEnabled = false;
};
}
#endif