Skip to content

Commit 9d4ee25

Browse files
authored
Reverse close/spawn order in houseMenu
Attempt to address #584 #585
1 parent ba41b90 commit 9d4ee25

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

Altis_Life.Altis/core/housing/fn_houseMenu.sqf

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ if (_curTarget isKindOf "House_F" && playerSide isEqualTo west) exitWith {
5454
if ((nearestObject [_pos,"Land_Dome_Big_F"]) isEqualTo _curTarget || (nearestObject [_pos,_vaultHouse]) isEqualTo _curTarget) then {
5555

5656
_Btn1 ctrlSetText localize "STR_pInAct_Repair";
57-
_Btn1 buttonSetAction "[life_pInact_curTarget] spawn life_fnc_repairDoor; closeDialog 0;";
57+
_Btn1 buttonSetAction "closeDialog 0; [life_pInact_curTarget] spawn life_fnc_repairDoor;";
5858
_Btn1 ctrlShow true;
5959

6060
_Btn2 ctrlSetText localize "STR_pInAct_CloseOpen";
61-
_Btn2 buttonSetAction "[life_pInact_curTarget] call life_fnc_doorAnimate; closeDialog 0;";
61+
_Btn2 buttonSetAction "closeDialog 0; [life_pInact_curTarget] call life_fnc_doorAnimate;";
6262
_Btn2 ctrlShow true;
6363

6464
} else {
@@ -68,19 +68,19 @@ if (_curTarget isKindOf "House_F" && playerSide isEqualTo west) exitWith {
6868
_Btn1 ctrlShow true;
6969

7070
_Btn2 ctrlSetText localize "STR_pInAct_BreakDown";
71-
_Btn2 buttonSetAction "[life_pInact_curTarget] spawn life_fnc_copBreakDoor; closeDialog 0;";
71+
_Btn2 buttonSetAction "closeDialog 0; [life_pInact_curTarget] spawn life_fnc_copBreakDoor;";
7272
_Btn2 ctrlShow true;
7373

7474
_Btn3 ctrlSetText localize "STR_pInAct_SearchHouse";
75-
_Btn3 buttonSetAction "[life_pInact_curTarget] spawn life_fnc_raidHouse; closeDialog 0;";
75+
_Btn3 buttonSetAction "closeDialog 0; [life_pInact_curTarget] spawn life_fnc_raidHouse;";
7676
_Btn3 ctrlShow true;
7777

7878
if (player distance _curTarget > 3.6) then {
7979
_Btn3 ctrlEnable false;
8080
};
8181

8282
_Btn4 ctrlSetText localize "STR_pInAct_LockHouse";
83-
_Btn4 buttonSetAction "[life_pInact_curTarget] spawn life_fnc_lockupHouse; closeDialog 0;";
83+
_Btn4 buttonSetAction "closeDialog 0; [life_pInact_curTarget] spawn life_fnc_lockupHouse;";
8484
_Btn4 ctrlShow true;
8585
} else {
8686
closeDialog 0;
@@ -96,7 +96,7 @@ if (!(_curTarget in life_vehicles) || isNil {_curTarget getVariable "house_owner
9696
] select _isHouse;
9797

9898
_Btn1 ctrlSetText localize _buildingPurchaseString;
99-
_Btn1 buttonSetAction "[life_pInact_curTarget] spawn life_fnc_buyHouse; closeDialog 0";
99+
_Btn1 buttonSetAction "closeDialog 0; [life_pInact_curTarget] spawn life_fnc_buyHouse;";
100100
_Btn1 ctrlShow true;
101101

102102
if (!isNil {_curTarget getVariable "house_owner"}) then {
@@ -114,23 +114,23 @@ if (!(_curTarget in life_vehicles) || isNil {_curTarget getVariable "house_owner
114114
} else {
115115
if (isClass (missionConfigFile >> "Garages" >> worldName >> (typeOf _curTarget))) then {
116116
_Btn1 ctrlSetText localize "STR_pInAct_SellGarage";
117-
_Btn1 buttonSetAction "[life_pInact_curTarget] spawn life_fnc_sellHouse; closeDialog 0;";
117+
_Btn1 buttonSetAction "closeDialog 0; [life_pInact_curTarget] spawn life_fnc_sellHouse;";
118118
_Btn1 ctrlShow true;
119119

120120
if !(((_curTarget getVariable "house_owner") select 0) isEqualTo getPlayerUID player) then {
121121
_Btn1 ctrlEnable false;
122122
};
123123

124124
_Btn2 ctrlSetText localize "STR_pInAct_AccessGarage";
125-
_Btn2 buttonSetAction "[life_pInact_curTarget,""Car""] spawn life_fnc_vehicleGarage; closeDialog 0;";
125+
_Btn2 buttonSetAction "closeDialog 0; [life_pInact_curTarget,""Car""] spawn life_fnc_vehicleGarage;";
126126
_Btn2 ctrlShow true;
127127

128128
_Btn3 ctrlSetText localize "STR_pInAct_StoreVeh";
129-
_Btn3 buttonSetAction "[life_pInact_curTarget,player] spawn life_fnc_storeVehicle; closeDialog 0;";
129+
_Btn3 buttonSetAction "closeDialog 0; [life_pInact_curTarget,player] spawn life_fnc_storeVehicle;";
130130
_Btn3 ctrlShow true;
131131
} else {
132132
_Btn1 ctrlSetText localize "STR_pInAct_SellHouse";
133-
_Btn1 buttonSetAction "[life_pInact_curTarget] spawn life_fnc_sellHouse; closeDialog 0;";
133+
_Btn1 buttonSetAction "closeDialog 0; [life_pInact_curTarget] spawn life_fnc_sellHouse;";
134134
_Btn1 ctrlShow true;
135135

136136
if (((_curTarget getVariable "house_owner") select 0) != (getPlayerUID player)) then {
@@ -142,37 +142,37 @@ if (!(_curTarget in life_vehicles) || isNil {_curTarget getVariable "house_owner
142142
} else {
143143
_Btn2 ctrlSetText localize "STR_pInAct_LockStorage";
144144
};
145-
_Btn2 buttonSetAction "[life_pInact_curTarget] call life_fnc_lockHouse; closeDialog 0;";
145+
_Btn2 buttonSetAction "closeDialog 0; [life_pInact_curTarget] call life_fnc_lockHouse;";
146146
_Btn2 ctrlShow true;
147147

148148
if (isNull (_curTarget getVariable ["lightSource",objNull])) then {
149149
_Btn3 ctrlSetText localize "STR_pInAct_LightsOn";
150150
} else {
151151
_Btn3 ctrlSetText localize "STR_pInAct_LightsOff";
152152
};
153-
_Btn3 buttonSetAction "[life_pInact_curTarget] call life_fnc_lightHouseAction; closeDialog 0;";
153+
_Btn3 buttonSetAction "closeDialog 0; [life_pInact_curTarget] call life_fnc_lightHouseAction;";
154154
_Btn3 ctrlShow true;
155155

156156
if (getNumber (missionConfigFile >> "Housing" >> worldName >> (typeOf _curTarget) >> "canGarage") isEqualTo 1 && {!(_curTarget getVariable ["blacklistedGarage",false])}) then {
157157
if (_curTarget getVariable ["garageBought",false]) then {
158158
_Btn4 ctrlSetText localize "STR_pInAct_SellGarage";
159-
_Btn4 buttonSetAction "[life_pInact_curTarget] spawn life_fnc_sellHouseGarage; closeDialog 0;";
159+
_Btn4 buttonSetAction "closeDialog 0; [life_pInact_curTarget] spawn life_fnc_sellHouseGarage;";
160160
_Btn4 ctrlShow true;
161161

162162
if (((_curTarget getVariable "house_owner") select 0) != (getPlayerUID player)) then {
163163
_Btn4 ctrlEnable false;
164164
};
165165

166166
_Btn5 ctrlSetText localize "STR_pInAct_AccessGarage";
167-
_Btn5 buttonSetAction "[life_pInact_curTarget,""Car""] spawn life_fnc_vehicleGarage; closeDialog 0;";
167+
_Btn5 buttonSetAction "closeDialog 0; [life_pInact_curTarget,""Car""] spawn life_fnc_vehicleGarage;";
168168
_Btn5 ctrlShow true;
169169

170170
_Btn6 ctrlSetText localize "STR_pInAct_StoreVeh";
171-
_Btn6 buttonSetAction "[life_pInact_curTarget,player] spawn life_fnc_storeVehicle; closeDialog 0;";
171+
_Btn6 buttonSetAction "closeDialog 0; [life_pInact_curTarget,player] spawn life_fnc_storeVehicle;";
172172
_Btn6 ctrlShow true;
173173
} else {
174174
_Btn5 ctrlSetText localize "STR_pInAct_BuyGarage";
175-
_Btn5 buttonSetAction "[life_pInact_curTarget] spawn life_fnc_buyHouseGarage; closeDialog 0;";
175+
_Btn5 buttonSetAction "closeDialog 0; [life_pInact_curTarget] spawn life_fnc_buyHouseGarage;";
176176
};
177177

178178
_Btn5 ctrlShow true;

0 commit comments

Comments
 (0)