diff --git a/.editorconfig b/.editorconfig index 625461baa..9b6d800e5 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,26 +1,26 @@ -# editorconfig.org -# Some editors do not have native support for EditorConfig and require a plugin. -# For a list of those editors and a plugin for them, see http://editorconfig.org/#download - -# Top-most EditorConfig file -root = true - -# Every file -[*] -# Soft tabs -indent_style = space -# 1 indent is 4 spaces -indent_size = 4 -# Windows-style newlines -end_of_line = crlf -# Set default character encoding -charset = utf-8 -# Remove any whitespace characters preceding newline characters -trim_trailing_whitespace = true -# A newline ending every file -insert_final_newline = true - -# Markdown files -[*.md] -# Do not remove any whitespace characters preceding newline characters -trim_trailing_whitespace = false +# editorconfig.org +# Some editors do not have native support for EditorConfig and require a plugin. +# For a list of those editors and a plugin for them, see http://editorconfig.org/#download + +# Top-most EditorConfig file +root = true + +# Every file +[*] +# Soft tabs +indent_style = space +# 1 indent is 4 spaces +indent_size = 4 +# Windows-style newlines +end_of_line = lf +# Set default character encoding +charset = utf-8 +# Remove any whitespace characters preceding newline characters +trim_trailing_whitespace = true +# A newline ending every file +insert_final_newline = true + +# Markdown files +[*.md] +# Do not remove any whitespace characters preceding newline characters +trim_trailing_whitespace = false diff --git a/life_server/Functions/Housing/fn_houseCleanup.sqf b/life_server/Functions/Housing/fn_houseCleanup.sqf index fc835445d..4fd3731a6 100644 --- a/life_server/Functions/Housing/fn_houseCleanup.sqf +++ b/life_server/Functions/Housing/fn_houseCleanup.sqf @@ -18,4 +18,9 @@ private _containers = [_query,2,true] call DB_fnc_asyncCall; { deleteVehicle _x; } forEach (nearestObjects[_pos,["Box_IND_Grenades_F","B_supplyCrate_F"],12]); -} forEach _containers; \ No newline at end of file + + private _house = nearestObject [_pos, "House"]; + if !(_house getVariable ["containers",[]] isEqualTo []) then { + _house setVariable ["containers",nil,true]; + }; +} forEach _containers; diff --git a/life_server/Functions/Systems/fn_clientDisconnect.sqf b/life_server/Functions/Systems/fn_clientDisconnect.sqf index f8edf4c17..e7b0db332 100644 --- a/life_server/Functions/Systems/fn_clientDisconnect.sqf +++ b/life_server/Functions/Systems/fn_clientDisconnect.sqf @@ -46,4 +46,4 @@ private _containers = nearestObjects[_unit,["WeaponHolderSimulated"],5]; {deleteVehicle _x} forEach _containers; deleteVehicle _unit; -[_uid] spawn TON_fnc_houseCleanup; +[_uid] call TON_fnc_houseCleanup;