From d6358310749c64f3a86f1837808e7d34ac1f9d1a Mon Sep 17 00:00:00 2001 From: vbawol Date: Thu, 11 Jul 2013 11:09:04 -0500 Subject: [PATCH] 1.0.1.5 RC5 + [CHANGED] Default construction count lowered from 5 to 3. + [FIXED] fixed tag friendly system and epoch aura. + [CHANGED] some recipes input and construction counts reduced. --- SQF/dayz_code/CfgMagazines.hpp | 14 +-- SQF/dayz_code/actions/player_build.sqf | 2 +- SQF/dayz_code/actions/remove.sqf | 4 +- SQF/dayz_code/cfgVehicles.hpp | 36 +++---- SQF/dayz_code/compile/fn_selfActions.sqf | 2 +- .../compile/player_friendliesCheck.sqf | 98 ++++++++++--------- SQF/dayz_code/init/variables.sqf | 1 + SQF/dayz_code/medical/setup_functions_med.sqf | 3 +- 8 files changed, 85 insertions(+), 75 deletions(-) diff --git a/SQF/dayz_code/CfgMagazines.hpp b/SQF/dayz_code/CfgMagazines.hpp index 638306a4e..aa1678eaf 100644 --- a/SQF/dayz_code/CfgMagazines.hpp +++ b/SQF/dayz_code/CfgMagazines.hpp @@ -828,7 +828,7 @@ class CfgMagazines { { text = "Craft Wooden Shed"; script = "spawn player_craftItem;"; - neednearby[] = {}; + neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemCrowbar"}; output[] = {{"wooden_shed_kit",1}}; input[] = {{"bulk_empty",1},{"ItemCorrugated",2},{"PartWoodPlywood",4},{"PartWoodLumber",4}}; @@ -837,19 +837,19 @@ class CfgMagazines { { text = "Craft Outhouse"; script = "spawn player_craftItem1;"; - neednearby[] = {}; + neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemCrowbar"}; output[] = {{"outhouse_kit",1}}; - input[] = {{"bulk_empty",1},{"ItemCorrugated",1},{"PartWoodPlywood",5},{"PartWoodLumber",3},{"ItemTrashToiletpaper",1}}; + input[] = {{"bulk_empty",1},{"ItemCorrugated",1},{"PartWoodPlywood",3},{"PartWoodLumber",3},{"ItemTrashToiletpaper",1}}; }; class Crafting2 { text = "Craft Storage Shed"; script = "spawn player_craftItem2;"; - neednearby[] = {}; + neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemCrowbar"}; output[] = {{"storage_shed_kit",1}}; - input[] = {{"bulk_empty",1},{"ItemCorrugated",5},{"PartWoodPlywood",2},{"PartWoodLumber",3}}; + input[] = {{"bulk_empty",1},{"ItemCorrugated",4},{"PartWoodPlywood",2},{"PartWoodLumber",2}}; }; }; }; @@ -879,7 +879,7 @@ class CfgMagazines { neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemCrowbar"}; output[] = {{"rusty_gate_kit",1}}; - input[] = {{"bulk_empty",1},{"ItemPole",6},{"PartGeneric",3},{"ItemTankTrap",1}}; + input[] = {{"bulk_empty",1},{"ItemPole",3},{"ItemTankTrap",1}}; }; class Crafting2 { @@ -1088,7 +1088,7 @@ class CfgMagazines { { text = "$STR_ACTIONS_BUILD"; script = "spawn player_build;"; - require[] = {"ItemEtool","ItemToolbox"}; + require[] = {"ItemToolbox"}; create = "WorkBench_DZ"; needNearby[] = {"none"}; }; diff --git a/SQF/dayz_code/actions/player_build.sqf b/SQF/dayz_code/actions/player_build.sqf index 5449079ca..705d54983 100644 --- a/SQF/dayz_code/actions/player_build.sqf +++ b/SQF/dayz_code/actions/player_build.sqf @@ -208,7 +208,7 @@ if (_hasrequireditem) then { cutText [format["Placing %1, move to cancel.",_text], "PLAIN DOWN"]; - _limit = 5; + _limit = 3; if(isNumber (configFile >> "CfgVehicles" >> _classname >> "constructioncount")) then { _limit = getNumber(configFile >> "CfgVehicles" >> _classname >> "constructioncount"); diff --git a/SQF/dayz_code/actions/remove.sqf b/SQF/dayz_code/actions/remove.sqf index 898d3ce7e..ab890ef91 100644 --- a/SQF/dayz_code/actions/remove.sqf +++ b/SQF/dayz_code/actions/remove.sqf @@ -23,7 +23,7 @@ _isDestructable = _obj isKindOf "BuiltItems"; _isWreck = _objType in DZE_isWreck; _isRemovable = _objType in DZE_isRemovable; -_limit = 5; +_limit = 3; if(isNumber (configFile >> "CfgVehicles" >> _objType >> "constructioncount")) then { _limit = getNumber(configFile >> "CfgVehicles" >> _objType >> "constructioncount"); }; @@ -133,7 +133,7 @@ if(_brokenTool) then { } else { _removeTool = ["ItemCrowbar","ItemToolbox"] call BIS_fnc_selectRandom; }; - if([player,_removeTool,1] call BIS_fnc_invRemove) then { + if(([player,_removeTool,1] call BIS_fnc_invRemove) > 0) then { cutText [format["Tool (%1) broke cannot remove %2.",_removeTool,_objType], "PLAIN DOWN"]; }; }; diff --git a/SQF/dayz_code/cfgVehicles.hpp b/SQF/dayz_code/cfgVehicles.hpp index c16ad0fde..e6aab9d0b 100644 --- a/SQF/dayz_code/cfgVehicles.hpp +++ b/SQF/dayz_code/cfgVehicles.hpp @@ -2044,7 +2044,7 @@ class Citizen1; // External class reference armor = 400; displayName = "Hedgehog (Steel)"; vehicleClass = "Fortifications"; - constructioncount = 5; + constructioncount = 3; removeoutput[] = {{"ItemTankTrap",1}}; }; // WorkBench_DZ @@ -2061,7 +2061,7 @@ class Citizen1; // External class reference displayName = "Workbench"; vehicleClass = "Fortifications"; constructioncount = 1; - removeoutput[] = {{"PartWoodLumber",5},{"PartWoodPlywood",3}}; + removeoutput[] = {{"PartWoodPlywood",1},{"PartWoodLumber",2}}; }; // belt buckle @@ -2071,8 +2071,8 @@ class Citizen1; // External class reference model = "\z\addons\dayz_epoch\models\skull.p3d"; displayName = "Belt Buckle"; accuracy = 1000; - hiddenSelections[] = {"camo"}; - hiddenSelectionsTextures[] = {"#(argb,8,8,3)color(1,0.5,0.5,0.5,ca)"}; + hiddenSelections[] = {"camo1"}; + hiddenSelectionsTextures[] = {"#(argb,8,8,3)color(1,0.5,0.5,0.5,ca)"}; }; // Metal Panel @@ -2081,14 +2081,14 @@ class Citizen1; // External class reference scope = 2; destrType = "DestructTree"; cost = 100; - offset[] = {0,1.5,0.5}; + offset[] = {0,2.5,0.5}; model = "\ca\structures\wall\wall_indcnc2_3.p3d"; icon = "\ca\data\data\Unknown_object.paa"; mapSize = 2; armor = 1000; displayName = "Metal Panel"; vehicleClass = "Fortifications"; - constructioncount = 10; + constructioncount = 6; removeoutput[] = {{"metal_panel_kit",1}}; }; class Generator_DZ: BuiltItems @@ -2103,7 +2103,7 @@ class Citizen1; // External class reference armor = 400; displayName = "Generator"; vehicleClass = "Fortifications"; - constructioncount = 5; + constructioncount = 1; removeoutput[] = {{"ItemGenerator",1}}; }; class FuelPump_DZ: BuiltItems @@ -2118,7 +2118,7 @@ class Citizen1; // External class reference armor = 400; displayName = "Fuel Pump"; vehicleClass = "Fortifications"; - constructioncount = 5; + constructioncount = 2; removeoutput[] = {{"ItemFuelPump",1}}; }; @@ -2149,7 +2149,7 @@ class Citizen1; // External class reference armor = 400; displayName = "Bag Fence"; vehicleClass = "Fortifications"; - constructioncount = 5; + constructioncount = 3; removeoutput[] = {{"ItemSandbag",1}}; }; @@ -2175,7 +2175,7 @@ class Citizen1; // External class reference mapSize = 2; displayName = "H-barrier cube"; GhostPreview = "Land_HBarrier1Preview"; - constructioncount = 10; + constructioncount = 4; removeoutput[] = {{"ItemSandbagLarge",1}}; }; @@ -2261,7 +2261,7 @@ class Citizen1; // External class reference class Land_Misc_deerstand; class DeerStand_DZ: Land_Misc_deerstand { - // armor = 300; + armor = 300; // destrType = "DestructNo"; scope = 2; offset[] = {0,5,0}; @@ -2310,9 +2310,9 @@ class Citizen1; // External class reference displayName = "Outhouse"; vehicleClass = "Fortifications"; transportMaxMagazines = 4; - transportMaxWeapons = 1; - transportMaxBackpacks = 1; - constructioncount = 5; + transportMaxWeapons = 4; + transportMaxBackpacks = 4; + constructioncount = 2; class transportmagazines { class _xx_ItemTrashToiletpaper @@ -2325,7 +2325,7 @@ class Citizen1; // External class reference class Land_Shed_M01; class StorageShed_DZ: Land_Shed_M01 { - armor = 400; + armor = 800; scope = 2; offset[] = {0,2.5,1}; displayName = "Storage Shed"; @@ -2333,7 +2333,7 @@ class Citizen1; // External class reference transportMaxMagazines = 400; transportMaxWeapons = 40; transportMaxBackpacks = 20; - constructioncount = 5; + constructioncount = 6; }; class Fence_corrugated_plate; class Fence_corrugated_DZ: Fence_corrugated_plate @@ -2352,7 +2352,7 @@ class Citizen1; // External class reference scope = 2; destrType = "DestructBuilding"; offset[] = {0,2.5,1.3}; - armor = 200; + armor = 400; displayName = "Wooden Shack"; vehicleClass = "Fortifications"; transportMaxMagazines = 100; @@ -2403,7 +2403,7 @@ class Citizen1; // External class reference model = "\ca\structures\Wall\Gate_wood2_5"; icon = "\ca\data\data\Unknown_object.paa"; mapSize = 2; - // armor = 100; + armor = 100; displayName = "Wood Panel"; vehicleClass = "Fortifications"; diff --git a/SQF/dayz_code/compile/fn_selfActions.sqf b/SQF/dayz_code/compile/fn_selfActions.sqf index 5aa5ff5dc..600e6cf51 100644 --- a/SQF/dayz_code/compile/fn_selfActions.sqf +++ b/SQF/dayz_code/compile/fn_selfActions.sqf @@ -97,7 +97,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu _isVehicle = _cursorTarget isKindOf "AllVehicles"; _isVehicletype = _typeOfCursorTarget in ["ATV_US_EP1","ATV_CZ_EP1"]; - _isnewstorage = _typeOfCursorTarget in ["VaultStorage","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ"]; + _isnewstorage = _typeOfCursorTarget in DZE_isNewStorage; // get items and magazines only once _magazinesPlayer = magazines player; diff --git a/SQF/dayz_code/compile/player_friendliesCheck.sqf b/SQF/dayz_code/compile/player_friendliesCheck.sqf index 973b69e22..a262558a9 100644 --- a/SQF/dayz_code/compile/player_friendliesCheck.sqf +++ b/SQF/dayz_code/compile/player_friendliesCheck.sqf @@ -16,7 +16,8 @@ _tagList = player getVariable ["tagList", []]; // Add sphere to everyone _position = [0,0,0]; - _tag = "Sign_sphere10cm_EP1" createVehicleLocal _position; + //_tag = "Sign_sphere10cm_EP1" createVehicleLocal _position; + _tag = "BeltBuckle_DZE" createVehicleLocal _position; _tag attachTo [_x,[0,0,0],"lwrist"]; // Pelvis _tag setVariable ["belongsTo", _rcharID]; @@ -32,6 +33,8 @@ _tagList = player getVariable ["tagList", []]; }; } forEach playableUnits; + + // keep track of tags created _newTagList = []; { @@ -44,56 +47,61 @@ _newTagList = []; // friendly player disconnected - if (!(isPlayer _player) or (vehicle _player != _player)) then { + if (!(isPlayer _player)) then { deleteVehicle _tag; } else { - if (_status != "green") then { - //diag_log format["CHECK IF FRIENDLY: %1", _player]; - _rcharID = _player getVariable ["characterID", "0"]; - _rfriendlies = _player getVariable ["friendlies", []]; - _rfriendlyTo = _player getVariable ["friendlyTo", []]; - - if ((_rcharID in _friendlies) and (_charID in _rfriendlies)) then { - if (!(_charID in _rfriendlyTo)) then { - - // diag_log format["IS FRIENDLY: %1", _player]; - - _rfriendlyTo set [count _rfriendlyTo, _charID]; - _player setVariable ["friendlyTo", _rfriendlyTo, true]; - titleText [format["You and %1 are now tagged as friendlies.", (name _player)], "PLAIN DOWN"]; - - _statusNew = "green"; - _tagColor = "#(argb,8,8,3)color(0,1,0,0.5,ca)"; - // light green #(argb,8,8,3)color(0.04,0.86,0.1,0.5,ca) - }; - - } else { - - // Get humanity - _humanity = _player getVariable ["humanity",0]; - - if(_humanity < -5000) then { - _statusNew = "red"; - _tagColor = "#(argb,8,8,3)color(1,0,0,0.5,ca)"; - } else { - if(_humanity > 5000) then { - _statusNew = "blue"; - _tagColor = "#(argb,8,8,3)color(0,0,1,0.5,ca)"; - }; - }; - - // diag_log format["CHECK HUMANITY: %1 %2", _player, _humanity]; + if(!(vehicle _player == _player)) then { + + if (_status != "vehicle") then { + _tag setobjecttexture [0,_tagColor]; + _status = "vehicle"; }; - - if(_statusNew != _status) then { - //diag_log format["STATUS CHANGED: %1 != %2", _statusNew, _status]; - // Set texture based on humanity or friendship status - _tag setobjecttexture [0,_tagColor]; - _status = _statusNew; - }; + } else { + if (_status != "green") then { + //diag_log format["CHECK IF FRIENDLY: %1", _player]; + _rcharID = _player getVariable ["characterID", "0"]; + _rfriendlies = _player getVariable ["friendlies", []]; + _rfriendlyTo = _player getVariable ["friendlyTo", []]; + + if ((_rcharID in _friendlies) and (_charID in _rfriendlies)) then { + if (!(_charID in _rfriendlyTo)) then { + // diag_log format["IS FRIENDLY: %1", _player]; + _rfriendlyTo set [count _rfriendlyTo, _charID]; + _player setVariable ["friendlyTo", _rfriendlyTo, true]; + titleText [format["You and %1 are now tagged as friendlies.", (name _player)], "PLAIN DOWN"]; + }; + + _statusNew = "green"; + _tagColor = "#(argb,8,8,3)color(0,1,0,0.5,ca)"; + + } else { + + // Get humanity + _humanity = _player getVariable ["humanity",0]; + + if(_humanity < -5000) then { + _statusNew = "red"; + _tagColor = "#(argb,8,8,3)color(1,0,0,0.5,ca)"; + } else { + if(_humanity > 5000) then { + _statusNew = "blue"; + _tagColor = "#(argb,8,8,3)color(0,0,1,0.5,ca)"; + }; + }; + + // diag_log format["CHECK HUMANITY: %1 %2", _player, _humanity]; + }; + + if(_statusNew != _status) then { + //diag_log format["STATUS CHANGED: %1 != %2", _statusNew, _status]; + // Set texture based on humanity or friendship status + _tag setobjecttexture [0,_tagColor]; + _status = _statusNew; + }; + }; }; // diag_log format["CHECK STATUS: %1 != %2", _statusNew, _status]; _newTagList set [count _newTagList, [_player, _tag, _status]]; diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf index f527c4572..8cb3915a3 100644 --- a/SQF/dayz_code/init/variables.sqf +++ b/SQF/dayz_code/init/variables.sqf @@ -446,6 +446,7 @@ dayz_allowedObjects = ["TentStorage","TentStorageDomed","TentStorageDomed2", "Va // List of removable items that require crowbar DZE_isRemovable = ["Fence_corrugated_DZ","M240Nest_DZ","ParkBench_DZ","SandNest_DZ","Plastic_Pole_EP1_DZ"]; DZE_isWreck = ["SKODAWreck","HMMWVWreck","UralWreck","datsun01Wreck","hiluxWreck","datsun02Wreck","UAZWreck","Land_Misc_Garb_Heap_EP1","Fort_Barricade_EP1","Rubbish2"]; +DZE_isNewStorage = ["VaultStorage","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ"]; // These work with just a running generator dayz_fuelpumparray = ["FuelPump_DZ","Land_A_FuelStation_Feed","Land_Ind_FuelStation_Feed_EP1","Land_FuelStation_Feed_PMC","FuelStation","Land_ibr_FuelStation_Feed","Land_fuelstation_army","Land_fuelstation","land_fuelstation_w","Land_benzina_schnell"]; diff --git a/SQF/dayz_code/medical/setup_functions_med.sqf b/SQF/dayz_code/medical/setup_functions_med.sqf index 28be814e2..a9e4dd9d9 100644 --- a/SQF/dayz_code/medical/setup_functions_med.sqf +++ b/SQF/dayz_code/medical/setup_functions_med.sqf @@ -254,5 +254,6 @@ fnc_usec_recoverUncons = { sleep 1; r_player_cardiac = false; r_player_handler1 = false; - // player switchMove "AmovPpneMstpSnonWnonDnon_healed"; + + player switchMove "AmovPpneMstpSnonWnonDnon_healed"; }; \ No newline at end of file