-
Notifications
You must be signed in to change notification settings - Fork 150
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 Target Debug run with addon config #724
Conversation
What about the new array syntax: Honestly I'd like an option to just have it the same as the vanilla debug console, so we don't have to write things twice all the time. |
So Debug console checks steam IDs if they exists. Why do you need to define different ways for both consoles? If you insist I can implement it. |
Oh right, never mind! :P |
addons/diagnostic/XEH_preInit.sqf
Outdated
@@ -18,7 +18,8 @@ GVAR(projectileTrackedUnits) = []; | |||
|
|||
ADDON = true; | |||
|
|||
if (getMissionConfigValue ["EnableTargetDebug", 0] isEqualTo 1) then { | |||
private _cfg = configFile >> "EnableTargetDebug"; | |||
if (1 isEqualTo ([getMissionConfigValue ["EnableTargetDebug", 0], getNumber _cfg] select isNumber _cfg)) then { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be:
getMissionConfigValue ["EnableTargetDebug", getNumber (configFile >> "EnableTargetDebug")] isEqualTo 1
imo. There is no reason for an addon to overwrite the mission if the mission sets the value explicitly.
@@ -17,7 +17,8 @@ Author: | |||
|
|||
#define COUNT_WATCH_BOXES 8 | |||
|
|||
if (!((getMissionConfigValue ["EnableTargetDebug", 0]) isEqualTo 1)) exitWith {}; | |||
private _cfg = configFile >> "EnableTargetDebug"; | |||
if !(1 isEqualTo ([getMissionConfigValue ["EnableTargetDebug", 0], getNumber _cfg] select isNumber _cfg)) exitWith {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
Why? Nowhere else is that the case. |
Target Debug is server admin/developer tool disabled by default. Security questions are solved with vanilla |
I personally don't agree with this. |
What purpose can it be? As server admin and addon tester/developer I can't agree. You should understand that Target Debug is not user feature like |
It should work the same way as vanilla does described here: #712 |
|
So mission config beats addon config. Just like everything else. It's a good rule to go by. It seems to me like this PR does it the opposite way though. |
I sort of don't see the point in an addon being able to enable the debug console if the mission can just override it anyway 🤔 (More of a comment on the vanilla behaviour than anything else) |
I guess it's more convenient to be able to change the default behavior by addon. |
Yeah, I'd say if either one explicitly disables, then it should be disabled
|
So nobody answered my question about mission maker purpose to disable Target Debug. I gave 2 arguments for addon priority and nobody said anything against. About |
I think there is no good reason for overruling the missionmakers decision. If you have the permission of the missioncreator, you could modify the missionfile very easily. If not, you should respect the decision. I don't see a reason to make the behavior different from the vanilla behavior. This makes things much more complicated. I must add, that we are talking about a very few cases. I think, there will almost never be someone allowing the debug console, but disallowing the target debugging. |
We have this in vanilla 1.76:
Mission value has priority only if > 0. |
BIS_fnc_isDebugConsoleAllowed is a mess now. |
updates on this? |
Fixes #712.
Addon config has a greater priority than mission one.Also function description fixed.