From 41ff819f132640f80981367868631e2b62f3eb3b Mon Sep 17 00:00:00 2001 From: icomrade Date: Fri, 18 Dec 2015 13:16:10 -0500 Subject: [PATCH] Remove Fixed Files --- .../system/ca/functions/fn_initCounter.sqf | 45 ------- SQF/dayz_code/system/ca/functions/init.sqf | 114 ------------------ 2 files changed, 159 deletions(-) delete mode 100644 SQF/dayz_code/system/ca/functions/fn_initCounter.sqf delete mode 100644 SQF/dayz_code/system/ca/functions/init.sqf diff --git a/SQF/dayz_code/system/ca/functions/fn_initCounter.sqf b/SQF/dayz_code/system/ca/functions/fn_initCounter.sqf deleted file mode 100644 index 8a24663d1..000000000 --- a/SQF/dayz_code/system/ca/functions/fn_initCounter.sqf +++ /dev/null @@ -1,45 +0,0 @@ -private ["_mode", "_activationCount", "_maxCount", "_timesActivated", "_keyString"]; -_mode = _this; -_activationCount = 4; -_maxCount = 25; -_timesActivated = 1; -_keyString = "BIS_IAmBeingNaughty"; - -for "_i" from 1 to (_maxCount - 1) do -{ - if (isKeyActive (_keyString + (str _i))) then - { - _timesActivated = _timesActivated + 1 - }; -}; - -if (_mode) then -{ - if (_timesActivated <= _maxCount) then - { - activateKey (_keyString + (str _timesActivated)); - }; - - if (_timesActivated >= _activationCount) then - { - private ["_handle"]; - _handle = [_timesActivated] execVM "ca\modules\functions\systems\fn_enableSystem.sqf"; - - if ((random 5) < 1) then - { - _handle = [_timesActivated] execVM "ca\modules\functions\systems\fn_enableAnotherSystem.sqf"; - }; - }; -} -else -{ - if ((configName (configFile >> "CfgPatches" >> "CA_E")) != "") then - { - for "_i" from 1 to (_timesActivated - 1) do - { - call (compile "deactivateKey (_keyString + (str _i))"); - }; - }; -}; - -true \ No newline at end of file diff --git a/SQF/dayz_code/system/ca/functions/init.sqf b/SQF/dayz_code/system/ca/functions/init.sqf deleted file mode 100644 index 96f92a0b3..000000000 --- a/SQF/dayz_code/system/ca/functions/init.sqf +++ /dev/null @@ -1,114 +0,0 @@ -scriptName "Functions\init.sqf"; -textLogFormat ["PRELOAD_ Functions\init.sqf %1", _this]; -/* - File: init.sqf - Author: Karel Moricky - - Description: - Function library initialization. - All files have to start with 'fn_' prefix && they name have to be same as name of function. - Don't forget to exclude comma after last item in array! - - Caution: - Do not execute this init directly - there is dependency with MPF && need to run on all machines. - - Parameter(s): - _this select 0: 'Function manager' logic - - Returns: - Nothing -*/ - -if (!isServer) then {textLogFormat ["MPF_Client FUNCTIONS init.sqf ..."];}; - -private ["_recompile"]; -_recompile = (count _this) > 0; - -//--- Functions are already running -if ((!isNil "BIS_fnc_init") && !_recompile) exitwith {textLogFormat["PRELOAD_ Functions already running."];}; -textLogFormat ["Log: [Functions] Init script executed at %1",time]; - - -//-------------------------------------------------------------------------------------------------------- -//--- PREPROCESS ----------------------------------------------------------------------------------------- -//-------------------------------------------------------------------------------------------------------- - -//--- Create variables for all functions (&& preprocess them after first call) -for "_t" from 0 to 2 do { - _pathConfig = [configfile,campaignconfigfile,missionconfigfile] select _t; - _pathFile = ["ca\modules\functions","functions","functions"] select _t; - - _cfgFunctions = (_pathConfig >> "cfgfunctions"); - for "_c" from 0 to (count _cfgFunctions - 1) do { - _currentTag = _cfgFunctions select _c; - - //--- Is Tag - if (isclass _currentTag) then { - _tagName = configname _currentTag; - _itemPathTag = gettext (_currentTag >> "file"); - - for "_i" from 0 to (count _currentTag - 1) do { - _currentCategory = _currentTag select _i; - - //--- Is Category - if (isclass _currentCategory) then { - _categoryName = configname _currentCategory; - _itemPathCat = gettext (_currentCategory >> "file"); - - for "_n" from 0 to (count _currentCategory - 1) do { - _currentItem = _currentCategory select _n; - - //--- Is Item - if (isclass _currentItem) then { - - _itemName = configname _currentItem; - _itemPathItem = gettext (_currentItem >> "file"); - _itemPath = if (_itemPathItem != "") then {_itemPathItem} else { - if (_itemPathCat != "") then {_itemPathCat + "\fn_" + _itemName + ".sqf"} else { - if (_itemPathTag != "") then {_itemPathTag + "\fn_" + _itemName + ".sqf"} else {""}; - }; - }; - _itemPath = if (_itemPath == "") then {_pathFile + "\" + _categoryName + "\fn_" + _itemName + ".sqf"} else {_itemPath}; - call compile format [" - if (isnil '%2_fnc_%3' || %4) then { - %2_fnc_%3 = { - if (!%4) then {debuglog ('Log: [Functions] %2_fnc_%3 loaded (%1)')}; - %2_fnc_%3 = compile preprocessFileLineNumbers '%1'; - _this call %2_fnc_%3; - }; - %2_fnc_%3_path = '%1'; - }; - ",_itemPath,_tagName,_itemName,_recompile]; - }; - }; - }; - }; - }; - }; -}; - -//" - -private ["_test", "_test2"]; -_test = (_this select 0) setPos (getPos (_this select 0)); if (isnil "_test") then {_test = false}; -_test2 = (_this select 0) playMove ""; if (isnil "_test2") then {_test2 = false}; -_testvar = getText (configFile >> "CfgMissions" >> "Missions" >> "SP_BearRising" >> "directory"); -if (_testvar != "") then { - (_test || _test2) call (compile (preprocessFileLineNumbers "\z\addons\dayz_code\system\ca\functions\fn_initCounter.sqf")); -} else { // Player has A2 Free - if (_test || _test2) then {0 call (compile (preprocessFileLineNumbers "ca\modules\functions\misc\fn_initCounter.sqf"))}; -}; - -//-------------------------------------------------------------------------------------------------------- -//--- INIT COMPLETE -------------------------------------------------------------------------------------- -//-------------------------------------------------------------------------------------------------------- - -waitUntil {!isNil "BIS_MPF_InitDone"}; //functions init must be after MPF init -BIS_fnc_init = true; - - -//if ((missionStart select 0) != 0) then {endLoadingScreen;textLogFormat["PRELOAD_ HACK isServer %1 endLoadingScreen (init functions EH)", isServer];}; //TODO:FIXME:HACK: - in multiplayer game freezes because init.sqf is not launched in MP preload - - - -textLogFormat ["Log: [Functions] Init script terminated at %1",time]; \ No newline at end of file