Skip to content

Commit

Permalink
Merge pull request #1468 from CBATeam/ReplaceCompilePPFLNWithCompileS…
Browse files Browse the repository at this point in the history
…cript

Replace some Compile preprocessFile/LineNumbers with compileScript
  • Loading branch information
PabstMirror authored Jun 27, 2021
2 parents a9f06df + 46de106 commit da45390
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion addons/diagnostic/fnc_initExtendedDebugConsole.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ _expression ctrlAddEventHandler ["KeyDown", {
[ctrlParent _buttonLocalExec, _buttonLocalExec],
"RscDisplayDebugPublic",
0
] call compile preprocessFileLineNumbers "\A3\Ui_f\scripts\GUI\RscDebugConsole.sqf";
] call compileScript ["\A3\Ui_f\scripts\GUI\RscDebugConsole.sqf"];

playSound "SoundClick";
};
Expand Down
6 changes: 3 additions & 3 deletions addons/ui/test_preload.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ isNil {
with uiNamespace do {
// 3DEN
AmmoBox_list = nil;
["onLoad", [controlNull]] call compile preprocessFile "\a3\3den\UI\Attributes\AmmoBox.sqf";
["onLoad", [controlNull]] call compileScript ["\a3\3den\UI\Attributes\AmmoBox.sqf"];
};
};

Expand Down Expand Up @@ -47,13 +47,13 @@ isNil {
_curator addCuratorAddons call EGVAR(common,addons);

missionNamespace setVariable ["RscAttrbuteInventory_weaponAddons", nil];
["onLoad", [displayNull], objNull] call compile preprocessFile "\a3\ui_f_curator\UI\RscCommon\RscAttributeInventory.sqf";
["onLoad", [displayNull], objNull] call compileScript ["\a3\ui_f_curator\UI\RscCommon\RscAttributeInventory.sqf"];
_vanilla = RscAttributeInventory_list;

GVAR(curatorItemCache) = nil;
call FUNC(preloadCurator);
missionNamespace setVariable ["RscAttrbuteInventory_weaponAddons", GVAR(curatorItemCache)];
["onLoad", [displayNull], objNull] call compile preprocessFile "\a3\ui_f_curator\UI\RscCommon\RscAttributeInventory.sqf";
["onLoad", [displayNull], objNull] call compileScript ["\a3\ui_f_curator\UI\RscCommon\RscAttributeInventory.sqf"];
_cba = RscAttributeInventory_list;

TEST_TRUE([_vanilla] isEqualTo [_cba],QFUNC(preloadCurator));
Expand Down
2 changes: 1 addition & 1 deletion addons/xeh/fnc_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SLX_XEH_DisableLogging = uiNamespace getVariable ["SLX_XEH_DisableLogging", fals
XEH_LOG("PreInit started. v" + getText (configFile >> "CfgPatches" >> "cba_common" >> "versionStr"));

SLX_XEH_STR = ""; // does nothing, never changes, backwards compatibility
SLX_XEH_COMPILE = compileFinal "diag_log text format ['[CBA-XEH] old SLX_XEH_COMPILE macro used on %1', _this]; compile preprocessFileLineNumbers _this"; //backwards compat
SLX_XEH_COMPILE = compileFinal "diag_log text format ['[CBA-XEH] old SLX_XEH_COMPILE macro used on %1', _this]; compileScript [_this]"; //backwards compat
SLX_XEH_COMPILE_NEW = CBA_fnc_compileFunction; //backwards comp
SLX_XEH_DUMMY = "Logic"; // backwards comp

Expand Down
2 changes: 1 addition & 1 deletion addons/xeh/fnc_preStart.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ with uiNamespace do {

XEH_LOG("PreStart started.");

SLX_XEH_COMPILE = compileFinal "diag_log text format ['[CBA-XEH] old SLX_XEH_COMPILE macro used on %1', _this]; compile preprocessFileLineNumbers _this"; //backwards compat
SLX_XEH_COMPILE = compileFinal "diag_log text format ['[CBA-XEH] old SLX_XEH_COMPILE macro used on %1', _this]; compileScript [_this]"; //backwards compat
SLX_XEH_COMPILE_NEW = CBA_fnc_compileFunction; //backwards comp

PREP(initDisplay3DEN);
Expand Down

0 comments on commit da45390

Please sign in to comment.