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

Add optional mod to skip missing Mod check #866

Merged
merged 5 commits into from
Apr 29, 2018
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
3 changes: 3 additions & 0 deletions addons/versioning/XEH_postInitServer.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ FUNC(paranoid) = {

QGVAR(versions_serv) addPublicVariableEventHandler { (_this select 1) call FUNC(paranoid) };

// Skip missing mod check if it is disabled.
if (isNumber (configFile >> "CBA_skipMissingModCheck") && {getNumber (configFile >> "CBA_skipMissingModCheck") == 1}) exitWith {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the isNumber check?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if the getNumber could cause errors. But as I am writing this right now I remember the talk from a couple days ago. Fix incoming


// Missing Modfolder check
FUNC(handleMismatch) = {
params ["_machine","_mod"];
Expand Down
1 change: 1 addition & 0 deletions optionals/no_missing_mod_check/$PBOPREFIX$
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
x\cba\addons\no_missing_mod_check
17 changes: 17 additions & 0 deletions optionals/no_missing_mod_check/config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include "script_component.hpp"

class CfgPatches {
class ADDON {
author = "$STR_CBA_Author";
name = ECSTRING(Optional,Component);
url = "$STR_CBA_URL";
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"CBA_Extended_EventHandlers", "CBA_Versioning"};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be lower-case really.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copied from cache disable

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figured, still wrong, components are all lower-case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uppercase CBA looks good to me tho. But the uppercase Versioning already looked weird when I wrote it.

Copy link
Member

@jonpas jonpas Dec 31, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it's still wrong, actual component is cba_versioning. ¯\_(ツ)_/¯
Doesn't matter with Arma though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess, bet there is a component that doesn't respect it. 😆

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

version = VERSION;
authors[] = {"Dedmen"};
};
};

CBA_skipMissingModCheck = 1;
16 changes: 16 additions & 0 deletions optionals/no_missing_mod_check/script_component.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#define COMPONENT no_missing_mod_check
#include "\x\cba\addons\main\script_mod.hpp"


#ifdef DEBUG_ENABLED_CACHE_DISABLE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be #ifdef DEBUG_ENABLED_NO_MISSING_MOD_CHECK.

#define DEBUG_MODE_FULL
#endif

#ifdef DEBUG_SETTINGS_CACHE_DISABLE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be #ifdef DEBUG_ENABLED_NO_MISSING_MOD_CHECK.

#define DEBUG_SETTINGS DEBUG_SETTINGS_CACHE_DISABLE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be #define DEBUG_SETTINGS DEBUG_SETTINGS_NO_MISSING_MOD_CHECK.

#endif

#undef REQUIRED_VERSION
#define REQUIRED_VERSION 1.00
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pointless, this optional requires 2 other components which have required version set from main\script_mod.hpp anyways.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for cache disable then


#include "\x\cba\addons\main\script_macros.hpp"