mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
Move unused functions to another folder
This commit is contained in:
@@ -23,7 +23,7 @@ class WildZombie_Base : Zed_Base {
|
||||
forcedSpeed = 6;
|
||||
|
||||
class Eventhandlers {
|
||||
init = "_this execFSM ""\z\AddOns\dayz_code\system\zombie_wildagent.fsm""";
|
||||
init = "_this execFSM ""\z\AddOns\dayz_code\old\zombie_wildagent.fsm""";
|
||||
local = "_z = _this select 0; if (!(_this select 1)) exitWith {}; if (isServer) exitWith { _z call sched_co_deleteVehicle; }; [_z,true] execFSM '\z\AddOns\dayz_code\system\zombie_wildagent.fsm';";
|
||||
HandleDamage = "_this call local_zombieDamage;";
|
||||
Killed = "[_this,'zombieKills'] call local_eventKill;";
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
if (isServer) then {
|
||||
call compile preprocessFileLineNumbers "\z\addons\dayz_server\init\server_functions.sqf";
|
||||
fnc_veh_setFixServer = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\veh_setFixServer.sqf"; //process the hit as a NORMAL damage (useful for persistent vehicles)
|
||||
pvs_processSetAccessCode = compile preprocessFile "\z\addons\dayz_code\eventHandlers\processSetAccessCode.sqf";
|
||||
pvs_processAccessCode = compile preprocessFile "\z\addons\dayz_code\eventHandlers\processAccessCode.sqf";
|
||||
server_spawnTraders = compile preprocessFile "\z\addons\dayz_server\compile\server_spawnTraders.sqf";
|
||||
server_updateGroup = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\server_updateGroup.sqf";
|
||||
};
|
||||
@@ -36,8 +34,7 @@ if (!isDedicated) then {
|
||||
player_temp_calculation = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_temperatur.sqf"; //Temperatur System //TeeChange
|
||||
player_weaponFiredNear = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_weaponFiredNear.sqf";
|
||||
player_spawnCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_spawnCheck.sqf";
|
||||
building_spawnLoot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\building_spawnLoot.sqf";
|
||||
//player_taskHint = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_taskHint.sqf";
|
||||
building_spawnLoot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\building_spawnLoot.sqf";
|
||||
building_spawnZombies = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\building_spawnZombies.sqf";
|
||||
player_fired = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_fired.sqf"; //Runs when player fires. Alerts nearby Zeds depending on calibre and audial rating
|
||||
player_packTent = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_packTent.sqf";
|
||||
@@ -56,21 +53,15 @@ if (!isDedicated) then {
|
||||
player_countMagazines = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_countMagazines.sqf";
|
||||
player_countMagazinesWBackpack = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_countMagazinesWBackpack.sqf";
|
||||
player_forceSave = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_forceSave.sqf";
|
||||
//player_destroyTent = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_destroyTent.sqf";
|
||||
vehicle_getOut = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\vehicle_getOut.sqf";
|
||||
|
||||
//Objects
|
||||
object_setpitchbank = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_setpitchbank.sqf";
|
||||
object_monitorGear = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_monitorGear.sqf";
|
||||
|
||||
//Collisions
|
||||
//fn_collisions = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_collisions.sqf";
|
||||
|
||||
//Zombies
|
||||
zombie_findTargetAgent = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\zombie_findTargetAgent.sqf";
|
||||
zombie_loiter = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\zombie_loiter.sqf"; //Server compile, used for loiter behaviour
|
||||
zombie_generate = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\zombie_generate.sqf"; //Server compile, used for loiter behaviours
|
||||
//zombie_generateSwarm = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\swarm_generate.sqf";
|
||||
//player_zombieSwarmAttack = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_zombieSwarmAttack.sqf";
|
||||
zombie_generate = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\zombie_generate.sqf"; //Server compile, used for loiter behaviours
|
||||
|
||||
// Medical
|
||||
player_medBandage = compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\publicEH\medBandaged.sqf";
|
||||
@@ -118,21 +109,7 @@ if (!isDedicated) then {
|
||||
player_tearClothes = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_tearClothes.sqf";
|
||||
player_sharpen = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_sharpen.sqf";
|
||||
player_butcher = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\gather_meat.sqf";
|
||||
player_pushPlane = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_pushPlane.sqf";
|
||||
|
||||
//player_fixHatchet = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_fixTools.sqf";
|
||||
//player_repairVehicle = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\repair_vehicle.sqf";
|
||||
//player_salvageVehicle = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\salvage_vehicle.sqf";
|
||||
//player_makeFire = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_makefire.sqf";
|
||||
//player_buildVanilla = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_buildVanilla.sqf";
|
||||
//player_buildPlaceables = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_buildPlaceables.sqf";
|
||||
//fn_buildCamera = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_buildCamera.sqf";
|
||||
//object_build = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\object_build.sqf";
|
||||
//object_upgradeFireplace = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\object_upgradeFireplace.sqf";
|
||||
//player_sleep = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_sleep.sqf";
|
||||
//player_takearrow = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_takeArrow.sqf";
|
||||
//player_goFishing = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_goFishing.sqf";
|
||||
//object_remove = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\remove.sqf";
|
||||
player_pushPlane = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_pushPlane.sqf";
|
||||
|
||||
//ui
|
||||
player_toggleSoundMute = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_toggleSoundMute.sqf";
|
||||
@@ -158,10 +135,6 @@ if (!isDedicated) then {
|
||||
|
||||
//Crafting
|
||||
player_craftItem = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItem.sqf";
|
||||
//fn_updateCraftUI = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_updateCraftUI.sqf";
|
||||
//player_craftItemVanilla = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItemVanilla.sqf";
|
||||
//player_craftItemGUI = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItemGUI.sqf";
|
||||
//player_checkRecipe = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_checkRecipe.sqf";
|
||||
|
||||
// EPOCH ADDITIONS
|
||||
dayz_autoRunOff = {dayz_autoRun = false; terminate dayz_autoRunThread; if (speed player > 0) then {player playActionNow "Stop"};};
|
||||
@@ -718,7 +691,7 @@ fnc_spawnObjects = compile preprocessFileLineNumbers "\z\addons\dayz_code\compil
|
||||
object_getHit = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_getHit.sqf"; //gets the hit value for a HitPoint (i.e. HitLegs) against the selection (i.e. "legs"), returns the value
|
||||
object_setHit = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_setHit.sqf"; //process the hit as a NORMAL damage (useful for persistent vehicles)
|
||||
object_processHit = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_processHit.sqf"; //process the hit in the REVO damage system (records and sets hit)
|
||||
//object_cargoCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_cargoCheck.sqf"; //Run by the player or server to monitor changes in cargo contents
|
||||
|
||||
// Vehicle damage fix
|
||||
fnc_veh_handleDam = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\veh_handleDam.sqf";
|
||||
fnc_veh_handleKilled = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\veh_handleKilled.sqf";
|
||||
@@ -732,8 +705,6 @@ local_gutObject = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile
|
||||
local_zombieDamage = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandlerZ.sqf"; //Generated by the client who created a zombie to track damage
|
||||
local_setFuel = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_setFuel.sqf"; //Generated when someone refuels a vehicle
|
||||
local_eventKill = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_eventKill.sqf"; //Generated when something is killed
|
||||
//player_weaponCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_weaponCheck.sqf"; //Run by the player or server to monitor whether they have picked up a new weapon
|
||||
//curTimeStr = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_curTimeStr.sqf";
|
||||
player_humanityChange = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_humanityChange.sqf"; //New
|
||||
player_humanityCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_humanityCheck.sqf"; //Old
|
||||
player_projectileNear = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_projectileNear.sqf";
|
||||
@@ -742,13 +713,11 @@ fn_selectRandomLocation = compile preprocessFileLineNumbers "\z\addons\dayz_code
|
||||
fn_addCargo = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_addCargo.sqf";
|
||||
fn_chance = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_selectRandomChance.sqf";
|
||||
fn_getModelName = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_getModelName.sqf";
|
||||
//fn_niceSpot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_niceSpot.sqf";
|
||||
fnc_Obj_FenceHandleDam = {};
|
||||
object_roadFlare = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_roadFlare.sqf";
|
||||
fn_shuffleArray = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_shuffleArray.sqf";
|
||||
zombie_initialize = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\zombie_initialize.sqf";
|
||||
call compile preprocessFileLineNumbers "\z\addons\dayz_code\traps\init.sqf";
|
||||
//call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\achievements_init.sqf"; //start achievements_init
|
||||
fnc_fieldOfView = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_fieldOfView.sqf";
|
||||
//object_pickupAction and object_BackpackAction needs to be compiled for server too, since backpacks and weaponholders can be spawned from the server
|
||||
object_pickupAction = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\pickupActions\object_pickupAction.sqf";
|
||||
|
||||
26
SQF/dayz_code/old/Readme.txt
Normal file
26
SQF/dayz_code/old/Readme.txt
Normal file
@@ -0,0 +1,26 @@
|
||||
Folder for old scripts that are no longer used by epoch. All scripts can still be used without moving it to the missionfile.
|
||||
|
||||
//fn_collisions = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\fn_collisions.sqf";
|
||||
//zombie_generateSwarm = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\swarm_generate.sqf";
|
||||
//player_zombieSwarmAttack = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\player_zombieSwarmAttack.sqf";
|
||||
//player_fixHatchet = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\player_fixTools.sqf";
|
||||
//player_makeFire = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\player_makefire.sqf";
|
||||
//player_buildVanilla = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\player_buildVanilla.sqf";
|
||||
//player_buildPlaceables = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\player_buildPlaceables.sqf";
|
||||
//fn_buildCamera = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\fn_buildCamera.sqf";
|
||||
//object_build = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\object_build.sqf";
|
||||
//object_upgradeFireplace = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\object_upgradeFireplace.sqf";
|
||||
//player_takearrow = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\player_takeArrow.sqf";
|
||||
//fn_updateCraftUI = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\fn_updateCraftUI.sqf";
|
||||
//player_craftItemVanilla = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\player_craftItemVanilla.sqf";
|
||||
//player_craftItemGUI = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\player_craftItemGUI.sqf";
|
||||
//player_checkRecipe = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\player_checkRecipe.sqf";
|
||||
//pvs_processSetAccessCode = compile preprocessFile "\z\addons\dayz_code\old\processSetAccessCode.sqf";
|
||||
//pvs_processAccessCode = compile preprocessFile "\z\addons\dayz_code\old\processAccessCode.sqf";
|
||||
//player_taskHint = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\player_taskHint.sqf";
|
||||
//object_cargoCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\object_cargoCheck.sqf";
|
||||
//player_weaponCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\player_weaponCheck.sqf";
|
||||
//curTimeStr = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\fn_curTimeStr.sqf";
|
||||
//fn_niceSpot = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\fn_niceSpot.sqf";
|
||||
//call compile preprocessFileLineNumbers "\z\addons\dayz_code\old\achievements_init.sqf";
|
||||
//fnc_Obj_FenceHandleDam = compile preprocessFileLineNumbers "\z\addons\dayz_code\old\fence_handleDam.sqf";
|
||||
@@ -3,19 +3,19 @@ if (isDedicated) then {
|
||||
|
||||
achievementNewDB = true; // true = object_data table (1.8.x), false = instance_deployable table (1.7.x)
|
||||
|
||||
call compile preprocessFileLineNumbers "\z\addons\dayz_code\achievements\achievementsServer.sqf";
|
||||
call compile preprocessFileLineNumbers "\z\addons\dayz_code\old\achievements\achievementsServer.sqf";
|
||||
"achievement" addPublicVariableEventHandler {[_this select 1] call achievementServer};
|
||||
};
|
||||
|
||||
// Client only
|
||||
if (!isDedicated) then {
|
||||
call compile preprocessFileLineNumbers "\z\addons\dayz_code\achievements\achievements.sqf";
|
||||
call compile preprocessFileLineNumbers "\z\addons\dayz_code\old\achievements\achievements.sqf";
|
||||
|
||||
// Allow server events to trigger the OSD
|
||||
"achievementClientPV" addPublicVariableEventHandler {[_this select 1] call achievementClientMsg};
|
||||
|
||||
// Start the mustyMonitor
|
||||
[] execVM "\z\addons\dayz_code\achievements\achievementsMonitor.sqf";
|
||||
[] execVM "\z\addons\dayz_code\old\achievements\achievementsMonitor.sqf";
|
||||
};
|
||||
|
||||
|
||||
@@ -260,8 +260,8 @@ while {Dayz_constructionContext select 4} do {
|
||||
_sfx = if (_object isKindOf "Land_A_tent") then {"tentunpack"} else {"repair"};
|
||||
|
||||
// placement is fine, enable "Build" in the menu
|
||||
_actionBuild = player addAction [localize "str_player_build_complete", "\z\addons\dayz_code\actions\object_build.sqf", [_object, _requiredParts , _classname, _text, true, 20, _sfx], 1, true, true, "", "0 != count Dayz_constructionContext"];
|
||||
_actionCancel = player addAction [localize "str_player_build_cancel", "\z\addons\dayz_code\actions\object_build.sqf", [_object, _requiredParts , _classname, _text, false, 0, "none"], 1, true, true, "", "0 != count Dayz_constructionContext"];
|
||||
_actionBuild = player addAction [localize "str_player_build_complete", "\z\addons\dayz_code\old\object_build.sqf", [_object, _requiredParts , _classname, _text, true, 20, _sfx], 1, true, true, "", "0 != count Dayz_constructionContext"];
|
||||
_actionCancel = player addAction [localize "str_player_build_cancel", "\z\addons\dayz_code\old\object_build.sqf", [_object, _requiredParts , _classname, _text, false, 0, "none"], 1, true, true, "", "0 != count Dayz_constructionContext"];
|
||||
};
|
||||
} else {
|
||||
if (!_actionBuildHidden) then {
|
||||
@@ -359,8 +359,8 @@ while {Dayz_constructionContext select 4} do {
|
||||
_actionBuildHidden = false;
|
||||
player removeAction _actionCancel;
|
||||
_sfx = if (_object isKindOf "Land_A_tent") then {"tentunpack"} else {"repair"};
|
||||
_actionBuild = player addAction [localize "str_player_build_complete", "\z\addons\dayz_code\actions\object_build.sqf", [_object, _requiredParts , _classname, _text, true, 20, _sfx], 1, true, true, "", "0 != count Dayz_constructionContext"];
|
||||
_actionCancel = player addAction [localize "str_player_build_cancel", "\z\addons\dayz_code\actions\object_build.sqf", [_object, _requiredParts , _classname, _text, false, 0, "none"], 1, true, true, "", "0 != count Dayz_constructionContext"];
|
||||
_actionBuild = player addAction [localize "str_player_build_complete", "\z\addons\dayz_code\old\object_build.sqf", [_object, _requiredParts , _classname, _text, true, 20, _sfx], 1, true, true, "", "0 != count Dayz_constructionContext"];
|
||||
_actionCancel = player addAction [localize "str_player_build_cancel", "\z\addons\dayz_code\old\object_build.sqf", [_object, _requiredParts , _classname, _text, false, 0, "none"], 1, true, true, "", "0 != count Dayz_constructionContext"];
|
||||
};
|
||||
} else {
|
||||
if (!_actionBuildHidden) then {
|
||||
47
SQF/dayz_code/old/player_fixTools.sqf
Normal file
47
SQF/dayz_code/old/player_fixTools.sqf
Normal file
@@ -0,0 +1,47 @@
|
||||
//fixHatchet old file
|
||||
private ["_tool","_tape","_fixedItem","_config","_dName","_handle","_finished"];
|
||||
|
||||
_tool = _this;
|
||||
_config = configFile >> "CfgWeapons" >> _tool;
|
||||
_fixedItem = getText(_config >> "fixedTool");
|
||||
|
||||
_dName = getText(configFile >> "CfgWeapons" >> _fixedItem >> "displayName");
|
||||
|
||||
//Used for Grip
|
||||
_tape = "equip_duct_tape";
|
||||
//Handle
|
||||
_handle = "equip_lever";
|
||||
|
||||
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
call gear_ui_init;
|
||||
closeDialog 0;
|
||||
|
||||
// Check if the player has the tape
|
||||
if ((_tape in magazines player) && (_handle in magazines player) && (_tool in items player)) then {
|
||||
[player,"bandage",0,false] call dayz_zombieSpeak;
|
||||
_finished = ["Medic",1] call fn_loopAction;
|
||||
if (!_finished) exitWith {};
|
||||
|
||||
// Check again to make sure player didn't drop item
|
||||
if ((_tape in magazines player) && (_handle in magazines player) && (_tool in items player)) then {
|
||||
player removeWeapon _tool;
|
||||
player removeMagazine _tape;
|
||||
player removeMagazine _handle;
|
||||
player addWeapon _fixedItem;
|
||||
format[localize "str_fixToolSuccess", _dName] call dayz_rollingMessages;
|
||||
};
|
||||
} else { //If the player doesn't have the mats.
|
||||
if (!(_tape in magazines player)) then {
|
||||
if (!(_handle in magazines player)) then {
|
||||
localize "str_fixToolFail" call dayz_rollingMessages;
|
||||
} else {
|
||||
localize "str_fixtoolMissingTape" call dayz_rollingMessages;
|
||||
};
|
||||
} else {
|
||||
localize "str_fixtoolMissingHandle" call dayz_rollingMessages;
|
||||
};
|
||||
};
|
||||
|
||||
dayz_actionInProgress = false;
|
||||
97
SQF/dayz_code/old/player_makefire.sqf
Normal file
97
SQF/dayz_code/old/player_makefire.sqf
Normal file
@@ -0,0 +1,97 @@
|
||||
private ["_item","_config","_exit","_text","_booleans","_worldspace","_dir","_location","_fire","_tool","_itemPile","_posASL","_testSea","_finished"];
|
||||
|
||||
_tool = _this;
|
||||
call gear_ui_init;
|
||||
closeDialog 0;
|
||||
|
||||
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
_item = "ItemLog";
|
||||
_itemPile = "PartWoodPile";
|
||||
_config = configFile >> "CfgMagazines" >> _item;
|
||||
_text = getText (_config >> "displayName");
|
||||
_exit = false;
|
||||
|
||||
if (_tool == "PartWoodPile") then {
|
||||
_exit = true;
|
||||
{if (_x in DayZ_Ignitors) exitWith {_exit = false};} forEach (items player);
|
||||
};
|
||||
if (_exit) exitWith {
|
||||
localize "str_fireplace_noMatches" call dayz_rollingMessages;
|
||||
dayz_actionInProgress = false;
|
||||
};
|
||||
|
||||
// item is missing or tools are missing
|
||||
if (!(_item in magazines player) && !(_itemPile in magazines player)) exitWith {
|
||||
localize "str_player_22" call dayz_rollingMessages;
|
||||
dayz_actionInProgress = false;
|
||||
};
|
||||
|
||||
_booleans = []; //testonLadder, testSea, testPond, testBuilding, testSlope, testDistance
|
||||
_worldspace = ["Land_Fire_DZ", player, _booleans] call fn_niceSpot;
|
||||
|
||||
// player on ladder or in a vehicle
|
||||
if (_booleans select 0) exitWith {
|
||||
localize "str_player_21" call dayz_rollingMessages;
|
||||
dayz_actionInProgress = false;
|
||||
};
|
||||
|
||||
_testSea = true;
|
||||
_posASL = getPosASL player;
|
||||
if ((_booleans select 1) && _posASL select 2 > 2) then {
|
||||
//Allow building on raised platform 2m+ ASL (like docks)
|
||||
_testSea = false;
|
||||
_worldspace = [0,_posASL];
|
||||
};
|
||||
|
||||
// object would be in the water (pool or sea)
|
||||
if ((_booleans select 1 && _testSea) OR (_booleans select 2)) exitWith {
|
||||
localize "str_player_26" call dayz_rollingMessages;
|
||||
dayz_actionInProgress = false;
|
||||
};
|
||||
|
||||
if ((count _worldspace) == 2) then {
|
||||
[player,20,true,(getPosATL player)] call player_alertZombies;
|
||||
|
||||
_finished = ["Medic",1] call fn_loopAction;
|
||||
if (!_finished or (!(_item in magazines player) && !(_itemPile in magazines player))) exitWith {};
|
||||
|
||||
if (_item in magazines player) then {
|
||||
player removeMagazine _item;
|
||||
} else {
|
||||
player removeMagazine _itemPile;
|
||||
};
|
||||
_dir = _worldspace select 0;
|
||||
_location = _worldspace select 1;
|
||||
|
||||
// fireplace location may not be in front of player (but in 99% time it should)
|
||||
player setDir _dir;
|
||||
player setPosATL (getPosATL player);
|
||||
|
||||
// Added Nutrition-Factor for work
|
||||
["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
|
||||
|
||||
_fire = createVehicle ["Land_Fire_DZ", [0,0,0], [], 0, "CAN_COLLIDE"];
|
||||
_fire setDir _dir;
|
||||
if (_testSea) then {
|
||||
_fire setPos _location; // follow terrain slope
|
||||
} else {
|
||||
_fire setPosASL _location;
|
||||
};
|
||||
player reveal _fire;
|
||||
[_fire,true] call dayz_inflame;
|
||||
_fire spawn player_fireMonitor;
|
||||
|
||||
/*if (dayz_playerAchievements select 14 < 1) then {
|
||||
// Firestarter
|
||||
dayz_playerAchievements set [14,1];
|
||||
achievement = [14, player, dayz_characterID];
|
||||
publicVariableServer "achievement";
|
||||
};*/
|
||||
localize "str_fireplace_01" call dayz_rollingMessages;
|
||||
} else {
|
||||
localize "str_fireplace_02" call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
dayz_actionInProgress = false;
|
||||
@@ -39,5 +39,5 @@ while {_counter < _amount} do {
|
||||
//[_agent, _position] call zombie_loiter;
|
||||
|
||||
//Start behavior
|
||||
_id = [_position,_agent,player] execFSM "\z\AddOns\dayz_code\system\fn_swarmagent.fsm";
|
||||
_id = [_position,_agent,player] execFSM "\z\AddOns\dayz_code\old\fn_swarmagent.fsm";
|
||||
};
|
||||
@@ -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 ],
|
||||
|
||||
Reference in New Issue
Block a user