DMS_Exile/@ExileServer/addons/a3_dms/scripts/fn_CleanUpManager.sqf
eraser1 0544cfe9e7 Readme changes, new debug fnc, fixes, tweaks
Created disclaimer for DMS. Now mentioning that HC for DMS isn't that
good.
Some structure stuff in readme (let's see if it works lol)

* **NEW CONFIG VALUE: DMS_Use_Map_Config**
* You can now overwrite "main config values" with map-specific config
values located in the new "map_configs" folder. This should allow you to
use one DMS PBO if you have multiple servers with different maps.
Included examples for Altis, Bornholm, Esseker, and Tavi (Taviana).
* Because of the above implementation, DMS by default will not include
the salt flats blacklist for findSafePos. In addition, it is
preconfigured to the hilly terrains in Esseker and Taviana, as well as
reducing all of the blacklist distances due to the smaller map size in
Esseker.
* Created new function "DMS_fnc_DebugLog". All DMS files (that produced
debug logs) have been changed, including mission files. However,
updating them is not important (and completely pointless if you don't
even use DMS_DEBUG).
* Fixed a few locations where it said "sized" instead of "seized".
Thanks to [icomrade](https://github.com/icomrade) for pointing them out.
* DMS now utilizes the "ARMA_LOG" DLL (if it exists) by infiSTAR to
produce debug logs (if enabled). All debug logs now also include server
uptime (in seconds) and server FPS.
* The FSM no longer produces debug logs.
* AI Locality manager will now run every minute.
* Debug logs for "DMS_fnc_MissionsMonitor" will only output the mission
name and the position, instead of all of the parameters.
* "DMS_fnc_IsNearWater" will now check the provided position itself for
water.
* "DMS_fnc_IsValidPosition" will now do a surfaceNormal check within a 5
meter radius of the provided position as well.
* "_customGearSet" should now actually work for
"DMS_fnc_SpawnAISoldier", and the function title comment has been
updated for the slightly tweaked syntax.
2015-10-09 20:35:07 -05:00

47 lines
1.1 KiB
Plaintext

/*
DMS_fnc_CleanUpManager
Created by eraser1
Objects to be cleaned up together have an entry in "DMS_CleanUpList"
The list is formatted as:
[
[
_objectToClean1,
_objectToClean2,
...
_objectToCleanN
],
_timeAddedToList,
_timeUntilClean
]
A single object can also be used for (_this select 0)
*/
if (DMS_CleanUpList isEqualTo []) exitWith {}; // Empty array, no objects to clean :)
{
(format ["CleanUpManager :: Checking Cleaning Status for: %1",_x]) call DMS_fnc_DebugLog;
private ["_objs","_timeAddedToList","_timeUntilClean"];
_OK = _x params
[
["_objs",[objNull],[objNull,[],grpNull]],
["_timeAddedToList",diag_tickTime,[0]],
["_timeUntilClean",DMS_CompletedMissionCleanupTime,[0]]
];
if (!_OK) then
{
diag_log format ["DMS ERROR :: Invalid parameters for DMS_fnc_CleanUpManager: %1 replaced with %2",_x,[_objs,_timeAddedToList,_timeUntilClean]];
};
if ((diag_tickTime-_timeAddedToList)>=_timeUntilClean) then
{
_objs call DMS_fnc_CleanUp;
}
else
{
(format ["CleanUpManager :: %1 is not yet ready to clean!",_x]) call DMS_fnc_DebugLog;
};
} forEach DMS_CleanUpList;