From f460d5aa23ca1bd8227134af2c43184450b36b4f Mon Sep 17 00:00:00 2001 From: LinkIsGrim Date: Fri, 3 Nov 2023 09:56:07 -0400 Subject: [PATCH] won't work yet, pls no merge --- addons/artillerytables/functions/fnc_turretChanged.sqf | 2 +- addons/artillerytables/functions/fnc_turretPFEH.sqf | 2 +- addons/attach/functions/fnc_attach.sqf | 4 ++-- .../functions/fnc_addMapMarkerCreatedEventHandler.sqf | 2 +- addons/common/functions/fnc_checkPBOs.sqf | 4 +--- addons/common/functions/fnc_displayTextStructured.sqf | 2 +- addons/dogtags/functions/fnc_showDogtag.sqf | 4 ++-- addons/explosives/functions/fnc_setupExplosive.sqf | 4 ++-- addons/interaction/functions/fnc_hideMouseHint.sqf | 2 +- addons/interaction/functions/fnc_showMouseHint.sqf | 2 +- addons/laser/functions/fnc_showVehicleHud.sqf | 4 ++-- addons/microdagr/functions/fnc_openDisplay.sqf | 6 +++--- addons/nightvision/functions/fnc_setupDisplayEffects.sqf | 5 ++--- addons/scopes/XEH_postInit.sqf | 3 +-- addons/scopes/functions/fnc_showZeroing.sqf | 8 +++----- 15 files changed, 24 insertions(+), 30 deletions(-) diff --git a/addons/artillerytables/functions/fnc_turretChanged.sqf b/addons/artillerytables/functions/fnc_turretChanged.sqf index b2c6bafb65..3d45a451bb 100644 --- a/addons/artillerytables/functions/fnc_turretChanged.sqf +++ b/addons/artillerytables/functions/fnc_turretChanged.sqf @@ -34,7 +34,7 @@ if (GVAR(pfID) >= 0) then { [GVAR(pfID)] call CBA_fnc_removePerFrameHandler; GVAR(pfID) = -1; if (!isNull (uiNamespace getVariable [QGVAR(display), displayNull])) then { - ([QGVAR(modeDisplay)] call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; + QGVAR(modeDisplay) cutText ["", "PLAIN"]; }; }; diff --git a/addons/artillerytables/functions/fnc_turretPFEH.sqf b/addons/artillerytables/functions/fnc_turretPFEH.sqf index 9ad10de1aa..f94f34d308 100644 --- a/addons/artillerytables/functions/fnc_turretPFEH.sqf +++ b/addons/artillerytables/functions/fnc_turretPFEH.sqf @@ -26,7 +26,7 @@ if (shownArtilleryComputer && {GVAR(disableArtilleryComputer)}) then { // Restart display if null (not just at start, this will happen periodicly) if (isNull (uiNamespace getVariable [QGVAR(display), displayNull])) then { TRACE_1("creating display",_this); - ([QGVAR(modeDisplay)] call BIS_fnc_rscLayer) cutRsc [QGVAR(modeDisplay), "PLAIN", 1, false]; + QGVAR(modeDisplay) cutRsc [QGVAR(modeDisplay), "PLAIN", 1, false]; }; private _ctrlGroup = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl 1000; diff --git a/addons/attach/functions/fnc_attach.sqf b/addons/attach/functions/fnc_attach.sqf index e36f2ba316..f3037ab784 100644 --- a/addons/attach/functions/fnc_attach.sqf +++ b/addons/attach/functions/fnc_attach.sqf @@ -63,7 +63,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment }; //"\A3\Weapons_F\empty.p3d" is fine, but ctrlSetModel ""; - will crash game! if (_model == "") exitWith {ERROR("No Model");}; - (QGVAR(virtualAmmo) call BIS_fnc_rscLayer) cutRsc [QGVAR(virtualAmmo), "PLAIN", 0, false]; + QGVAR(virtualAmmo) cutRsc [QGVAR(virtualAmmo), "PLAIN", 0, false]; ((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlSetModel _model; [{ @@ -92,7 +92,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment [_unit, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler); _unit removeAction _actionID; - (QGVAR(virtualAmmo) call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; + QGVAR(virtualAmmo) cutText ["", "PLAIN"]; if (GVAR(placeAction) == PLACE_APPROVE) then { [_unit, _attachToVehicle, _itemClassname, _itemVehClass, _onAttachText, _virtualPos] call FUNC(placeApprove); diff --git a/addons/common/functions/fnc_addMapMarkerCreatedEventHandler.sqf b/addons/common/functions/fnc_addMapMarkerCreatedEventHandler.sqf index 3fe674afcc..795e9bdb79 100644 --- a/addons/common/functions/fnc_addMapMarkerCreatedEventHandler.sqf +++ b/addons/common/functions/fnc_addMapMarkerCreatedEventHandler.sqf @@ -29,7 +29,7 @@ _id = _id + 1; if (_id == 0) then { uiNamespace setVariable ["ACE_EventHandler_MapMarker", count allMapMarkers]; - ("ACE_EventHandlerHelper2" call BIS_fnc_rscLayer) cutRsc ["ACE_EventHandlerHelper2", "PLAIN"]; + "ACE_EventHandlerHelper2" cutRsc ["ACE_EventHandlerHelper2", "PLAIN"]; }; _actionIDs pushBack _id; diff --git a/addons/common/functions/fnc_checkPBOs.sqf b/addons/common/functions/fnc_checkPBOs.sqf index f69f486d5e..a7bfb39f3f 100644 --- a/addons/common/functions/fnc_checkPBOs.sqf +++ b/addons/common/functions/fnc_checkPBOs.sqf @@ -70,9 +70,7 @@ if (!isServer) then { if (_mode < 2) then { _text = composeText [lineBreak, parseText format ["%1", _text]]; - - private _rscLayer = "ACE_RscErrorHint" call BIS_fnc_rscLayer; - _rscLayer cutRsc ["ACE_RscErrorHint", "PLAIN", 0, true]; + "ACE_RscErrorHint" cutRsc ["ACE_RscErrorHint", "PLAIN", 0, true]; disableSerialization; private _ctrlHint = uiNamespace getVariable "ACE_ctrlErrorHint"; diff --git a/addons/common/functions/fnc_displayTextStructured.sqf b/addons/common/functions/fnc_displayTextStructured.sqf index a9376552a9..da0660603d 100644 --- a/addons/common/functions/fnc_displayTextStructured.sqf +++ b/addons/common/functions/fnc_displayTextStructured.sqf @@ -42,7 +42,7 @@ if (typeName _text != "TEXT") then { private _isShown = ctrlShown (uiNamespace getVariable ["ACE_ctrlHint", controlNull]); -("ACE_RscHint" call BIS_fnc_rscLayer) cutRsc ["ACE_RscHint", "PLAIN", 0, true]; +"ACE_RscHint" cutRsc ["ACE_RscHint", "PLAIN", 0, true]; disableSerialization; private _ctrlHint = uiNamespace getVariable "ACE_ctrlHint"; diff --git a/addons/dogtags/functions/fnc_showDogtag.sqf b/addons/dogtags/functions/fnc_showDogtag.sqf index 4865ff7de2..c0b36dcdd6 100644 --- a/addons/dogtags/functions/fnc_showDogtag.sqf +++ b/addons/dogtags/functions/fnc_showDogtag.sqf @@ -23,9 +23,9 @@ params ["_dogtagData", ["_doubleTags", false, [false]]]; if (!hasInterface || {_dogtagData isEqualTo []}) exitWith {}; if (_doubleTags) then { - (QGVAR(tag) call BIS_fnc_rscLayer) cutRsc [QGVAR(doubleTag), "PLAIN", 1, true]; + QGVAR(tag) cutRsc [QGVAR(doubleTag), "PLAIN", 1, true]; } else { - (QGVAR(tag) call BIS_fnc_rscLayer) cutRsc [QGVAR(singleTag), "PLAIN", 1, true]; + QGVAR(tag) cutRsc [QGVAR(singleTag), "PLAIN", 1, true]; }; private _display = uiNamespace getvariable [QGVAR(tag), displayNull]; if(isNull _display) exitWith {}; diff --git a/addons/explosives/functions/fnc_setupExplosive.sqf b/addons/explosives/functions/fnc_setupExplosive.sqf index 423e8932c3..b1cb3500db 100644 --- a/addons/explosives/functions/fnc_setupExplosive.sqf +++ b/addons/explosives/functions/fnc_setupExplosive.sqf @@ -38,7 +38,7 @@ _unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {true}, {GVAR( _unit setVariable [QGVAR(cancelActionEH), [_unit, "zoomtemp", {true}, {GVAR(placeAction) = PLACE_CANCEL;}] call EFUNC(common,AddActionEventHandler)]; //Display to show virtual object: -(QGVAR(virtualAmmo) call BIS_fnc_rscLayer) cutRsc [QGVAR(virtualAmmo), "PLAIN", 0, false]; +QGVAR(virtualAmmo) cutRsc [QGVAR(virtualAmmo), "PLAIN", 0, false]; ((uiNamespace getVariable [QGVAR(virtualAmmoDisplay), displayNull]) displayCtrl 800851) ctrlSetModel _p3dModel; //Make sure it has a trigger that works when attached (eg, no tripwires that only do pressurePlate) @@ -155,7 +155,7 @@ GVAR(TweakedAngle) = 0; [_unit, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler); [_unit, "zoomtemp", (_unit getVariable [QGVAR(cancelActionEH), -1])] call EFUNC(common,removeActionEventHandler); - (QGVAR(virtualAmmo) call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; + QGVAR(virtualAmmo) cutText ["", "PLAIN"]; if (GVAR(placeAction) == PLACE_APPROVE) then { private _placeAngle = 0; diff --git a/addons/interaction/functions/fnc_hideMouseHint.sqf b/addons/interaction/functions/fnc_hideMouseHint.sqf index b7f0420dc5..21bf241d4d 100644 --- a/addons/interaction/functions/fnc_hideMouseHint.sqf +++ b/addons/interaction/functions/fnc_hideMouseHint.sqf @@ -15,7 +15,7 @@ * Public: No */ -(QGVAR(RscMouseHint) call BIS_fnc_rscLayer) cutFadeOut 0.2; +QGVAR(RscMouseHint) cutFadeOut 0.2; // Re-enable action menu inGameUISetEventHandler ["PrevAction", "false"]; diff --git a/addons/interaction/functions/fnc_showMouseHint.sqf b/addons/interaction/functions/fnc_showMouseHint.sqf index 73567fa522..89538126e4 100644 --- a/addons/interaction/functions/fnc_showMouseHint.sqf +++ b/addons/interaction/functions/fnc_showMouseHint.sqf @@ -21,7 +21,7 @@ params ["_textLMB", "_textRMB", ["_textMMB", ""], ["_extraIconSets", []]]; -(QGVAR(RscMouseHint) call BIS_fnc_rscLayer) cutRsc [QGVAR(RscMouseHint), "PLAIN", -1, false]; +QGVAR(RscMouseHint) cutRsc [QGVAR(RscMouseHint), "PLAIN", -1, false]; private _display = uiNamespace getVariable [QGVAR(mouseHint), displayNull]; // Set text for buttons, hide if empty string diff --git a/addons/laser/functions/fnc_showVehicleHud.sqf b/addons/laser/functions/fnc_showVehicleHud.sqf index 778df61a6c..208b14a30e 100644 --- a/addons/laser/functions/fnc_showVehicleHud.sqf +++ b/addons/laser/functions/fnc_showVehicleHud.sqf @@ -40,7 +40,7 @@ if ((!_enabled) && (GVAR(pfID) < 0)) exitWith {TRACE_2("Disabled - No Change",_e TRACE_2("Cleaning up old pfeh and display",_enabled,GVAR(pfID)); [GVAR(pfID)] call CBA_fnc_removePerFrameHandler; if (!isNull (uiNamespace getVariable [QGVAR(display), displayNull])) then { - ([QGVAR(modeDisplay)] call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; + QGVAR(modeDisplay) cutText ["", "PLAIN"]; }; GVAR(pfID) = -1; @@ -64,7 +64,7 @@ GVAR(pfID) = [{ // Restart display if null (not just at start, this will happen periodicly) if (isNull (uiNamespace getVariable [QGVAR(display), displayNull])) then { TRACE_1("creating display",_this); - ([QGVAR(modeDisplay)] call BIS_fnc_rscLayer) cutRsc [QGVAR(modeDisplay), "PLAIN", 1, false]; + QGVAR(modeDisplay) cutRsc [QGVAR(modeDisplay), "PLAIN", 1, false]; if (_adjustDown) then { private _ctrl = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl IDC_MODECONTROLGROUP; private _pos = ctrlPosition _ctrl; diff --git a/addons/microdagr/functions/fnc_openDisplay.sqf b/addons/microdagr/functions/fnc_openDisplay.sqf index 56d404bf6f..e9f12f4846 100644 --- a/addons/microdagr/functions/fnc_openDisplay.sqf +++ b/addons/microdagr/functions/fnc_openDisplay.sqf @@ -43,7 +43,7 @@ if (_newDisplayShowMode in [DISPLAY_MODE_CLOSED, DISPLAY_MODE_HIDDEN]) then { }; //Close the display: - (QGVAR(TheRscTitleDisplay) call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; + QGVAR(TheRscTitleDisplay) cutText ["", "PLAIN"]; } else { if (_newDisplayShowMode == DISPLAY_MODE_DISPLAY) then { //If Dialog is open, back it up before closing: @@ -52,10 +52,10 @@ if (_newDisplayShowMode in [DISPLAY_MODE_CLOSED, DISPLAY_MODE_HIDDEN]) then { closeDialog 0; }; //Open the display: - (QGVAR(TheRscTitleDisplay) call BIS_fnc_rscLayer) cutRsc [QGVAR(TheRscTitleDisplay), "PLAIN", 0, true]; + QGVAR(TheRscTitleDisplay) cutRsc [QGVAR(TheRscTitleDisplay), "PLAIN", 0, true]; } else { //DISPLAY_MODE_DIALOG //Close the display: - (QGVAR(TheRscTitleDisplay) call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; + QGVAR(TheRscTitleDisplay) cutText ["", "PLAIN"]; //Open the dialog: createDialog QGVAR(TheDialog); }; diff --git a/addons/nightvision/functions/fnc_setupDisplayEffects.sqf b/addons/nightvision/functions/fnc_setupDisplayEffects.sqf index 5e30fa21ce..e1dfdb8f82 100644 --- a/addons/nightvision/functions/fnc_setupDisplayEffects.sqf +++ b/addons/nightvision/functions/fnc_setupDisplayEffects.sqf @@ -48,10 +48,9 @@ if (GVAR(fogScaling) > 0) then { }; }; -// Note: Using BIS_fnc_rscLayer because of bug with string syntax - https://feedback.bistudio.com/T120768 -(QGVAR(display) call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; // Cleanup Old Display +QGVAR(display) cutText ["", "PLAIN"]; // Cleanup Old Display if (_activated) then { // Create New Display - (QGVAR(display) call BIS_fnc_rscLayer) cutRsc [QGVAR(title), "PLAIN", 0, false]; + QGVAR(display) cutRsc [QGVAR(title), "PLAIN", 0, false]; }; // Cleanup Old PP Effects diff --git a/addons/scopes/XEH_postInit.sqf b/addons/scopes/XEH_postInit.sqf index 8c221a4651..1cf193f79c 100644 --- a/addons/scopes/XEH_postInit.sqf +++ b/addons/scopes/XEH_postInit.sqf @@ -31,8 +31,7 @@ GVAR(scopeAdjust) = [[[0,0],0,[0,0],0], [[0,0],0,[0,0],0], [[0,0],0,[0,0],0]]; params ["_player", "_newCameraView"]; if (_newCameraView == "GUNNER") then { - private _layer = [QGVAR(Zeroing)] call BIS_fnc_rscLayer; - _layer cutText ["", "PLAIN", 0]; + QGVAR(Zeroing) cutText ["", "PLAIN", 0]; if (!isNil QGVAR(fadePFH)) then { [GVAR(fadePFH)] call CBA_fnc_removePerFrameHandler; diff --git a/addons/scopes/functions/fnc_showZeroing.sqf b/addons/scopes/functions/fnc_showZeroing.sqf index 3deb1c4836..c8ac9a7b8e 100644 --- a/addons/scopes/functions/fnc_showZeroing.sqf +++ b/addons/scopes/functions/fnc_showZeroing.sqf @@ -23,8 +23,7 @@ if (_weaponIndex < 0) exitWith {}; private _adjustment = ACE_player getVariable [QGVAR(Adjustment), [[0, 0, 0], [0, 0, 0], [0, 0, 0]]]; // Display the adjustment knobs -private _layer = [QGVAR(Zeroing)] call BIS_fnc_rscLayer; -_layer cutRsc [QGVAR(Zeroing), "PLAIN", 0, false]; +QGVAR(Zeroing) cutRsc [QGVAR(Zeroing), "PLAIN", 0, false]; // Find the display private _display = uiNamespace getVariable [QGVAR(ZeroingDisplay), displayNull]; @@ -72,9 +71,8 @@ if (!isNil QGVAR(fadePFH)) exitWith {}; // Launch a PFH to wait and fade out the knobs GVAR(fadePFH) = [{ if (diag_tickTime >= GVAR(timeToHide)) exitWith { - private _pfhId = _this select 1; - private _layer = [QGVAR(Zeroing)] call BIS_fnc_rscLayer; - _layer cutFadeOut 2; + + QGVAR(Zeroing) cutFadeOut 2; GVAR(fadePFH) = nil; [_pfhId] call CBA_fnc_removePerFrameHandler;