From 9d4ee25d97a2754c6c43655658a00b5bc74c5125 Mon Sep 17 00:00:00 2001 From: Ollie W Date: Wed, 25 Dec 2019 01:04:15 +0000 Subject: [PATCH] Reverse close/spawn order in houseMenu Attempt to address #584 #585 --- .../core/housing/fn_houseMenu.sqf | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Altis_Life.Altis/core/housing/fn_houseMenu.sqf b/Altis_Life.Altis/core/housing/fn_houseMenu.sqf index 12f56130c..d1b51cb15 100644 --- a/Altis_Life.Altis/core/housing/fn_houseMenu.sqf +++ b/Altis_Life.Altis/core/housing/fn_houseMenu.sqf @@ -54,11 +54,11 @@ if (_curTarget isKindOf "House_F" && playerSide isEqualTo west) exitWith { if ((nearestObject [_pos,"Land_Dome_Big_F"]) isEqualTo _curTarget || (nearestObject [_pos,_vaultHouse]) isEqualTo _curTarget) then { _Btn1 ctrlSetText localize "STR_pInAct_Repair"; - _Btn1 buttonSetAction "[life_pInact_curTarget] spawn life_fnc_repairDoor; closeDialog 0;"; + _Btn1 buttonSetAction "closeDialog 0; [life_pInact_curTarget] spawn life_fnc_repairDoor;"; _Btn1 ctrlShow true; _Btn2 ctrlSetText localize "STR_pInAct_CloseOpen"; - _Btn2 buttonSetAction "[life_pInact_curTarget] call life_fnc_doorAnimate; closeDialog 0;"; + _Btn2 buttonSetAction "closeDialog 0; [life_pInact_curTarget] call life_fnc_doorAnimate;"; _Btn2 ctrlShow true; } else { @@ -68,11 +68,11 @@ if (_curTarget isKindOf "House_F" && playerSide isEqualTo west) exitWith { _Btn1 ctrlShow true; _Btn2 ctrlSetText localize "STR_pInAct_BreakDown"; - _Btn2 buttonSetAction "[life_pInact_curTarget] spawn life_fnc_copBreakDoor; closeDialog 0;"; + _Btn2 buttonSetAction "closeDialog 0; [life_pInact_curTarget] spawn life_fnc_copBreakDoor;"; _Btn2 ctrlShow true; _Btn3 ctrlSetText localize "STR_pInAct_SearchHouse"; - _Btn3 buttonSetAction "[life_pInact_curTarget] spawn life_fnc_raidHouse; closeDialog 0;"; + _Btn3 buttonSetAction "closeDialog 0; [life_pInact_curTarget] spawn life_fnc_raidHouse;"; _Btn3 ctrlShow true; if (player distance _curTarget > 3.6) then { @@ -80,7 +80,7 @@ if (_curTarget isKindOf "House_F" && playerSide isEqualTo west) exitWith { }; _Btn4 ctrlSetText localize "STR_pInAct_LockHouse"; - _Btn4 buttonSetAction "[life_pInact_curTarget] spawn life_fnc_lockupHouse; closeDialog 0;"; + _Btn4 buttonSetAction "closeDialog 0; [life_pInact_curTarget] spawn life_fnc_lockupHouse;"; _Btn4 ctrlShow true; } else { closeDialog 0; @@ -96,7 +96,7 @@ if (!(_curTarget in life_vehicles) || isNil {_curTarget getVariable "house_owner ] select _isHouse; _Btn1 ctrlSetText localize _buildingPurchaseString; - _Btn1 buttonSetAction "[life_pInact_curTarget] spawn life_fnc_buyHouse; closeDialog 0"; + _Btn1 buttonSetAction "closeDialog 0; [life_pInact_curTarget] spawn life_fnc_buyHouse;"; _Btn1 ctrlShow true; if (!isNil {_curTarget getVariable "house_owner"}) then { @@ -114,7 +114,7 @@ if (!(_curTarget in life_vehicles) || isNil {_curTarget getVariable "house_owner } else { if (isClass (missionConfigFile >> "Garages" >> worldName >> (typeOf _curTarget))) then { _Btn1 ctrlSetText localize "STR_pInAct_SellGarage"; - _Btn1 buttonSetAction "[life_pInact_curTarget] spawn life_fnc_sellHouse; closeDialog 0;"; + _Btn1 buttonSetAction "closeDialog 0; [life_pInact_curTarget] spawn life_fnc_sellHouse;"; _Btn1 ctrlShow true; if !(((_curTarget getVariable "house_owner") select 0) isEqualTo getPlayerUID player) then { @@ -122,15 +122,15 @@ if (!(_curTarget in life_vehicles) || isNil {_curTarget getVariable "house_owner }; _Btn2 ctrlSetText localize "STR_pInAct_AccessGarage"; - _Btn2 buttonSetAction "[life_pInact_curTarget,""Car""] spawn life_fnc_vehicleGarage; closeDialog 0;"; + _Btn2 buttonSetAction "closeDialog 0; [life_pInact_curTarget,""Car""] spawn life_fnc_vehicleGarage;"; _Btn2 ctrlShow true; _Btn3 ctrlSetText localize "STR_pInAct_StoreVeh"; - _Btn3 buttonSetAction "[life_pInact_curTarget,player] spawn life_fnc_storeVehicle; closeDialog 0;"; + _Btn3 buttonSetAction "closeDialog 0; [life_pInact_curTarget,player] spawn life_fnc_storeVehicle;"; _Btn3 ctrlShow true; } else { _Btn1 ctrlSetText localize "STR_pInAct_SellHouse"; - _Btn1 buttonSetAction "[life_pInact_curTarget] spawn life_fnc_sellHouse; closeDialog 0;"; + _Btn1 buttonSetAction "closeDialog 0; [life_pInact_curTarget] spawn life_fnc_sellHouse;"; _Btn1 ctrlShow true; if (((_curTarget getVariable "house_owner") select 0) != (getPlayerUID player)) then { @@ -142,7 +142,7 @@ if (!(_curTarget in life_vehicles) || isNil {_curTarget getVariable "house_owner } else { _Btn2 ctrlSetText localize "STR_pInAct_LockStorage"; }; - _Btn2 buttonSetAction "[life_pInact_curTarget] call life_fnc_lockHouse; closeDialog 0;"; + _Btn2 buttonSetAction "closeDialog 0; [life_pInact_curTarget] call life_fnc_lockHouse;"; _Btn2 ctrlShow true; if (isNull (_curTarget getVariable ["lightSource",objNull])) then { @@ -150,13 +150,13 @@ if (!(_curTarget in life_vehicles) || isNil {_curTarget getVariable "house_owner } else { _Btn3 ctrlSetText localize "STR_pInAct_LightsOff"; }; - _Btn3 buttonSetAction "[life_pInact_curTarget] call life_fnc_lightHouseAction; closeDialog 0;"; + _Btn3 buttonSetAction "closeDialog 0; [life_pInact_curTarget] call life_fnc_lightHouseAction;"; _Btn3 ctrlShow true; if (getNumber (missionConfigFile >> "Housing" >> worldName >> (typeOf _curTarget) >> "canGarage") isEqualTo 1 && {!(_curTarget getVariable ["blacklistedGarage",false])}) then { if (_curTarget getVariable ["garageBought",false]) then { _Btn4 ctrlSetText localize "STR_pInAct_SellGarage"; - _Btn4 buttonSetAction "[life_pInact_curTarget] spawn life_fnc_sellHouseGarage; closeDialog 0;"; + _Btn4 buttonSetAction "closeDialog 0; [life_pInact_curTarget] spawn life_fnc_sellHouseGarage;"; _Btn4 ctrlShow true; if (((_curTarget getVariable "house_owner") select 0) != (getPlayerUID player)) then { @@ -164,15 +164,15 @@ if (!(_curTarget in life_vehicles) || isNil {_curTarget getVariable "house_owner }; _Btn5 ctrlSetText localize "STR_pInAct_AccessGarage"; - _Btn5 buttonSetAction "[life_pInact_curTarget,""Car""] spawn life_fnc_vehicleGarage; closeDialog 0;"; + _Btn5 buttonSetAction "closeDialog 0; [life_pInact_curTarget,""Car""] spawn life_fnc_vehicleGarage;"; _Btn5 ctrlShow true; _Btn6 ctrlSetText localize "STR_pInAct_StoreVeh"; - _Btn6 buttonSetAction "[life_pInact_curTarget,player] spawn life_fnc_storeVehicle; closeDialog 0;"; + _Btn6 buttonSetAction "closeDialog 0; [life_pInact_curTarget,player] spawn life_fnc_storeVehicle;"; _Btn6 ctrlShow true; } else { _Btn5 ctrlSetText localize "STR_pInAct_BuyGarage"; - _Btn5 buttonSetAction "[life_pInact_curTarget] spawn life_fnc_buyHouseGarage; closeDialog 0;"; + _Btn5 buttonSetAction "closeDialog 0; [life_pInact_curTarget] spawn life_fnc_buyHouseGarage;"; }; _Btn5 ctrlShow true;