File tree Expand file tree Collapse file tree
addons/overthrow_main/functions/save Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,7 +28,10 @@ private _cc = 0;
2828
2929sleep 0.3 ;
3030
31+
3132// now do everything else
33+ private _buildableHouses = [];
34+ private _hasList_buildableHouses = false ;
3235{
3336 _x params [" _key" ," _val" ];
3437
@@ -198,9 +201,17 @@ sleep 0.3;
198201 };
199202 };
200203
204+ // Fetch the list of buildable houses
205+ if (! _hasList_buildableHouses ) then {
206+ if (! isNil " OT_Buildables" ) then {
207+ _buildableHouses = (OT_Buildables param [9 , []]) param [2 , []];
208+ _hasList_buildableHouses = true ;
209+ };
210+ };
211+
201212 // If the object is a player-built house, fetch its variables
202213 private _houseParams = _x param [8 , []];
203- if ! (_houseParams isEqualTo []) then {
214+ if ( ! (_houseParams isEqualTo []) or { _type in _buildableHouses } ) then {
204215 _veh setVariable [" OT_house_isPlayerBuilt" , true , true ];
205216
206217 private _isLeased = _houseParams param [0 , false ];
You can’t perform that action at this time.
0 commit comments