arma2-epoch-server/MPMissions/DayZ_Epoch_24.Napf/logistic/compiles.sqf

88 lines
2.7 KiB
Plaintext
Raw Normal View History

2022-04-21 16:15:41 +03:00
if (!isDedicated) then {
call compile preprocessFileLineNumbers "logistic\config.sqf";
call compile preprocessFileLineNumbers format ["logistic\lang\%1_lang.sqf", LOG_CFG_lANG];
MONI_OBJECT = compile preprocessFileLineNumbers "logistic\monitor\monitor_object.sqf";
MONI_ACTION = compile preprocessFileLineNumbers "logistic\monitor\monitor_action.sqf";
LOG_OBJ_INIT = compile preprocessFileLineNumbers "logistic\object\init.sqf";
LOG_LIFT_INIT = compile preprocessFileLineNumbers "logistic\lift\init.sqf";
LOG_TOW_INIT = compile preprocessFileLineNumbers "logistic\tow\init.sqf";
LOG_FNCT_DETACH_AND_SAVE = {
private ["_object"];
_object = (_this select 0);
_object setVelocity [0,0,0];
detach _object;
PVDZ_veh_Save = [_object,"position",true];
if (isServer) then {
PVDZ_veh_Save call server_updateObject;
} else {
publicVariableServer "PVDZ_veh_Save";
};
["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
player playActionNow "Medic";
[player,"repair",0,false,20] call dayz_zombieSpeak;
[player,20,true,(getPosATL player)] spawn player_alertZombies;
diag_log format [STR_LOG_UNTOWED, typeOf _object];
};
LOG_FNCT_LOCKED = {
private ["_return","_target"];
_target = (_this select 0);
_return = true;
if ( !(LOG_CFG_ALLOW_LOCKED) && (locked _target) ) then {
_return = false;
};
_return
};
LOG_FNCT_CHAINING = {
private ["_return","_target"];
_target = (_this select 0);
_return = true;
if !(LOG_CFG_ALLOW_CHAINING) then {
if ( ( (_this select 1) == 1 ) && !( isNull (_target getVariable "LOG_moves_by") || (!alive (_target getVariable "LOG_moves_by")) ) ) then {_return = false;};
if ( (_this select 1) == 2 && !isNull (_target getVariable "LOG_trailer") ) then { _return = false;};
};
_return
};
LOG_FNCT_GETPOS = {
private "_pos";
if (isNil {_this select 0}) exitWith {[0,0,0]};
_thingy = _this select 0;
_pos = getPosASL _thingy;
if !(surfaceIsWater _pos) then { _pos = ASLToATL _pos;};
_pos
};
LOG_OBJECT_MOVES = objNull;
LOG_OBJECT_SELECTION = objNull;
LOG_OBJECT_ADDACTION = objNull;
LOG_INPROGRESS = false;
LOG_LOAD_MOVES_VALID = false;
LOG_LOAD_SELECTION_VALID = false;
LOG_CONTENT_VALID = false;
LOG_TRAILER_MOVE_VALID = false;
LOG_TRAILER_SELECT_VALID = false;
LOG_HELI_LIFT_VALID = false;
LOG_HELI_DROP_VALID = false;
LOG_OBJECT_TRAILER_VALID = false;
LOG_DETACH_VALID = false;
COLOR_DEFAULT = [(51/255),(181/255),(229/255),1];
COLOR_SUCCESS = [(153/255),(204/255),0,1];
COLOR_ERROR = [1,(68/255),(68/255),1];
SAM_SAYS = {
private ["_message","_color"];
_message = _this select 0;
_color = _this select 1;
taskHint [format[_message], _color, "taskNew"];
_message call dayz_rollingMessages;
};
LOG_READY = true;
};