Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The most important change in mankind's history #1

Merged
merged 3 commits into from
Jan 15, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required (VERSION 3.6)
#----Make changes here

#This is your project name. And also the filename of the resulting plugin.
project (grad_me)
project (grad_meh)

#This setting enables the use of the engine string type instead of converting to std::string.
#Enabling this results in better performance when handling strings to SQF commands.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# grad_me
# grad_meh
6 changes: 3 additions & 3 deletions addons/me/config.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class CfgPatches {
class grad_me { //Change this
class grad_meh { //Change this
name = "Gruppe Adler Map Exporter"; //Change this
units[] = {};
weapons[] = {};
Expand All @@ -15,8 +15,8 @@ class CfgPatches {
};
class Intercept {
class Willard { //Change this. It's either the name of your project if you have more than one plugin. Or just your name.
class grad_me { //Change this.
pluginName = "grad_me"; //Change this.
class grad_meh { //Change this.
pluginName = "grad_meh"; //Change this.
};
};
};
16 changes: 8 additions & 8 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#error Only Windows is supported
#endif // _WIN32

#define GRAD_ME_VERSION 0.1
#define GRAD_MEH_VERSION 0.1

using namespace intercept;
using namespace OpenImageIO_v2_1;
Expand Down Expand Up @@ -134,7 +134,7 @@ void populateMap() {
catch (std::exception &ex) {
client::invoker_lock threadLock;
std::stringstream errorStream;
errorStream << "[grad_me] Couldn't open PBO: " << p.string() << " error msg: " << ex.what();
errorStream << "[grad_meh] Couldn't open PBO: " << p.string() << " error msg: " << ex.what();
sqf::diag_log(errorStream.str());
threadLock.unlock();
}
Expand Down Expand Up @@ -176,7 +176,7 @@ void writeMeta(const std::string& worldName, std::filesystem::path& basePath)
client::invoker_lock threadLock;
auto mapConfig = sqf::config_entry(sqf::config_file()) >> "CfgWorlds" >> worldName;
nl::json meta;
meta["version"] = GRAD_ME_VERSION;
meta["version"] = GRAD_MEH_VERSION;
meta["worldName"] = sqf::world_name();
meta["worldSize"] = sqf::world_size();
meta["displayName"] = sqf::get_text(mapConfig >> "description");
Expand Down Expand Up @@ -435,9 +435,9 @@ void writeSatImages(grad_aff::Wrp& wrp, const int32_t& worldSize, std::filesyste

void extractMap(const std::string& worldName, const std::string& worldPath, const int32_t& worldSize) {

auto basePath = fs::path("grad_me") / worldName;
auto basePathGeojson = fs::path("grad_me") / worldName / "geojson";
auto basePathSat = fs::path("grad_me") / worldName / "sat";
auto basePath = fs::path("grad_meh") / worldName;
auto basePathGeojson = fs::path("grad_meh") / worldName / "geojson";
auto basePathSat = fs::path("grad_meh") / worldName / "sat";

if (!fs::exists(basePath)) {
fs::create_directories(basePath);
Expand Down Expand Up @@ -510,10 +510,10 @@ game_value exportMapCommand(game_state& gs, SQFPar rightArg) {
}

void intercept::pre_start() {
static auto grad_me_export_map =
static auto grad_meh_export_map =
client::host::register_sqf_command("gradMeExportMap", "Exports the given map", exportMapCommand, game_data_type::BOOL, game_data_type::STRING);
DerZade marked this conversation as resolved.
Show resolved Hide resolved
}

void intercept::pre_init() {
intercept::sqf::system_chat("The grad_me plugin is running!");
intercept::sqf::system_chat("The grad_meh plugin is running!");
}