Move unused functions to another folder

This commit is contained in:
AirwavesMan
2020-06-10 17:03:31 +02:00
parent 11f10829cb
commit ac79d91ca0
37 changed files with 185 additions and 250 deletions

View File

@@ -1,126 +0,0 @@
#include "scheduler.hpp"
sched_achievement_init = {
private ["_timewasterCounter","_buildingList","_buildingCounter"];
//following achievements are monitored in this task
achievement_LitterCount = 0;
achievement_Gut = false;
// following achievements are monitored and saved elsewhere
achievement_Raw = false;
achievement_Fire = false;
achievement_SteadyAim = false;
achievement_Marksman = false;
achievement_Sniper = false;
// variables for the monitoring
_timewasterCounter = diag_ticktime;
_buildingList = [];
_buildingCounter = [0,0,0,0,0,0,0,0,0];
[_timewasterCounter, _buildingList, _buildingCounter]
};
sched_achievement = {
HIDE_FSM_VARS
private ["_timewasterCounter","_buildingList","_buildingCounter","_buildingAchivement","_buildingType","_buildingLimit","_building","_matchType","_count", "_o"];
_timewasterCounter = _this select 0;
_buildingList = _this select 1;
_buildingCounter = _this select 2;
_buildingAchivement = [
[""], // Achievement #2
["Land_A_GeneralStore_01a","Land_A_GeneralStore_01"], // Achievement #3 (5 stores)
["Land_A_GeneralStore_01a","Land_A_GeneralStore_01"], // Achievement #4 (10 stores)
["Land_A_Hospital"], // Achievement #5
["Land_A_Office01"], // Achievement #6
["Land_a_stationhouse"], // Achievement #7
["Land_A_Pub_01"], // Achievement #8
["Land_Mil_ControlTower"], // Achievement #9
["Land_Church_03"] // Achievement #10
];
_buildingLimit = [ 1, 5, 10, 4, 3, 4, 8, 3, 3 ];
// 0 = Time Waster - have been playing for over _timeWasterValue second in a single session
if (dayz_playerAchievements select 0 < 1) then {
if (diag_ticktime - _timewasterCounter >= 3600) then {
_timewasterCounter = -1; // stop checking
dayz_playerAchievements set [0,1];
achievement = [0, player, dayz_characterID];
publicVariableServer "achievement";
};
};
// 1 = High Flyer - find yourself over 500m ATL
if (dayz_playerAchievements select 1 < 1) then {
if (visiblePosition player select 2 > 500) then {
dayz_playerAchievements set [1,1];
achievement = [1, player, dayz_characterID];
publicVariableServer "achievement";
};
};
// 2 = near mass grave
if (dayz_playerAchievements select 2 < 1) then {
_o = (visiblePositionASL player) nearestObject "Mass_grave";
if ((!isNull _o) and {(_o distance player < 3)}) then {
dayz_playerAchievements set [2,1];
achievement = [2, player, dayz_characterID];
publicVariableServer "achievement";
};
};
// 3-10 = Building checker - counts the number of unique buildings (of a certain type) you visit
_building = nearestBuilding visiblePositionASL player; // gives nearest enterable building within 50 meters
if(!isNull _building) then {
if (!(_building in _buildingList)) then {
_buildingType = typeOf _building;
if ((player distance _building < 0.5 * sizeof _buildingType) and {([player,_building] call fnc_isInsideBuilding)}) then {
_matchType = false;
{
if (_buildingType in _x) then {
_matchType = true;
_count = _buildingCounter select _forEachIndex;
_count = _count +1;
_buildingCounter set [_forEachIndex, _count ];
if ((_count >= _buildingLimit select _forEachIndex) and (dayz_playerAchievements select (_forEachIndex + 3) < 1)) then {
dayz_playerAchievements set [ _forEachIndex + 3, 1];
achievement = [_forEachIndex + 3, player, dayz_characterID];
publicVariableServer "achievement";
};
};
} forEach _buildingAchivement;
if (_matchType) then {
_buildingList set [ count _buildingList, _building ];
};
};
};
};
// 11 = LitterCount
if (dayz_playerAchievements select 11 < 1) then {
if (achievement_LitterCount == 5) then {
achievement_LitterCount = -1; //???
dayz_playerAchievements set [11,1];
achievement = [11, player, dayz_characterID];
publicVariableServer "achievement";
};
};
// 12 = ??????
// 13 = Gutting
if (dayz_playerAchievements select 13 < 1) then {
if (achievement_Gut) then {
dayz_playerAchievements set [13,1];
achievement = [13, player, dayz_characterID];
publicVariableServer "achievement";
};
};
[_timewasterCounter, _buildingList, _buildingCounter]
};

View File

@@ -1,18 +0,0 @@
#include "scheduler.hpp"
sched_humanityChange = {
HIDE_FSM_VARS
_startcombattimer = player getVariable["startcombattimer", 0];
//If player is not in combat and humanity differs from the last time it ran run humanityCheck(skin change check)
if (_startcombattimer == 0) then {
_playerHumanity = player getVariable ["humanity",0];
if ((_playerHumanity != playerHumanityCHK) and (vehicle player == player)) then {
[_playerHumanity] call player_humanityCheck;
playerHumanityCHK = _playerHumanity;
};
};
objNull
};

View File

@@ -11,7 +11,6 @@ call compile preprocessFileLineNumbers (_base+"sched_spawnCheck.sqf");
call compile preprocessFileLineNumbers (_base+"sched_playerActions.sqf");
call compile preprocessFileLineNumbers (_base+"sched_medical.sqf");
call compile preprocessFileLineNumbers (_base+"sched_gui.sqf");
//call compile preprocessFileLineNumbers (_base+"sched_achievement.sqf");
if (dayz_bleedingeffect != 2) then {
call compile preprocessFileLineNumbers (_base+"sched_bloodstains.sqf");
@@ -41,7 +40,6 @@ if (count _list == 0) then {
[ 6, 24.18, sched_spawnCheck ],
[ 1, 0.63, sched_throwable, sched_throwable_init ],
[ 1, 0.33, sched_medical, sched_medical_init ],
//[ 3, 2.70, sched_achievement, sched_achievement_init ],
[ 60, 10.44, sched_animals ],
[ 10, 5.44, sched_medical_slow ],
[ 60, 20.44, sched_newDay ],