Update vanilla building

Vanilla commits:

2ee56936be

8497b42d3f

eb234f8b06
This commit is contained in:
ebaydayz
2017-01-22 14:41:53 -05:00
parent f8047167d8
commit ff6463473f
6 changed files with 48 additions and 15 deletions

View File

@@ -40,6 +40,9 @@ _upgrade = typeOf _cursorTarget;
_entry = configFile >> "CfgVehicles" >> _upgrade;
r_interrupt = false;
_disassemblyParts = [] + (getArray (_entry >> "Disassembly" >> "removedParts"));
_disassemblyReturnChance = [] + (getNumber (_entry >> "Disassembly" >> "removedChance"));
for "_i" from 1 to 20 do {
_parent = inheritsFrom _entry;
_requiredParts = [] + (getArray (_parent >> "Upgrade" >> "requiredParts"));
@@ -71,9 +74,7 @@ for "_i" from 1 to 20 do {
_cursorTarget = objNull;
if (_realObjectStillThere) then { // send to server the destroy request
_realObjectStillThere = false;
_activatingPlayer = player;
PVDZ_obj_Destroy = [_objectID,_objectUID, _activatingPlayer];
PVDZ_obj_Destroy = [_objectID,_objectUID,player];
publicVariableServer "PVDZ_obj_Destroy";
diag_log [diag_ticktime, __FILE__, "Networked object, request to destroy", PVDZ_obj_Destroy];
};
@@ -92,9 +93,15 @@ for "_i" from 1 to 20 do {
_wh setDir (30*_i);
_wh setPosATL _whpos;
{
//Never return _disassemblyParts_.
if (!(_x in _disassemblyParts)) then {
//Random other returned items.
if ([_disassemblyReturnChance] call fn_chance) then {
if (isClass (configFile >> "CfgMagazines" >> _x))
then { _wh addMagazineCargoGlobal [_x, 1]; }
else { _wh addWeaponCargoGlobal [_x, 1]; };
};
};
} forEach _requiredParts;
diag_log [diag_ticktime, __FILE__, "Pile created with:", _requiredParts];

View File

@@ -2,8 +2,15 @@
//#define HAS_TOOLBOX ("ItemToolbox" in items player)
#define IN_VEHICLE (vehicle player != player)
#define IS_ALIVE (damage _object < 1)
//#define IS_DAMAGED (damage _object > 0)
#define IS_PZOMBIE (player isKindOf "PZombie_VB")
/*
(['StudyBody',this] call userActionConditions)
Return - must be true for action to show.
*/
private ["_action","_object","_show"];
_action = _this select 0;
@@ -16,6 +23,10 @@ _show = switch _action do {
case "PushPlane": {IS_ALIVE && !IN_VEHICLE && CAN_DO && count crew _object == 0 && !isEngineOn _object && !IS_PZOMBIE};
//case "Repair": {IS_ALIVE && !IN_VEHICLE && CAN_DO && _object != dayz_myCursorTarget && HAS_TOOLBOX};
//case "Salvage": {IS_ALIVE && !IN_VEHICLE && CAN_DO && _object != dayz_myCursorTarget && HAS_TOOLBOX && (DZE_salvageLocked or !locked _object)};
//Built Items (Fence,Gates)
//case "ObjectUpgrade": {!(_object getVariable['BuildLock',false])};
//case "ObjectMaintenance": {!(_object getVariable['Maintenance',false]) OR IS_DAMAGED};
//case "ObjectDisassembly": {((getPlayerUID player) in _object getVariable ["ownerArray",[]]) && (isClass (configFile >> "CfgVehicles" >> (typeof _object) >> "Disassembly")) && HAS_TOOLBOX};
default {false};
};

View File

@@ -55,8 +55,6 @@ if (!isNull _cursorTarget and !_inVehicle and (player distance _cursorTarget < 4
player removeAction s_player_maintenance;
s_player_maintenance = -1;
};
*/
if ((((getPlayerUID player) in _ownerArray) or (count _ownerArray == 0) or ((typeof _cursorTarget) in ["WoodenFence_1_foundation","WoodenGate_foundation"])) and !_ownerBuildLock) then {
if (s_player_disassembly < 0) then {
@@ -68,6 +66,7 @@ if (!isNull _cursorTarget and !_inVehicle and (player distance _cursorTarget < 4
player removeAction s_player_disassembly;
s_player_disassembly = -1;
};
*/
} else {
call dayz_resetUpgradeActions;
};

View File

@@ -5,10 +5,26 @@ private ["_vehicle","_position","_unit","_buildables"];
_vehicle = _this select 0;
_position = _this select 1;
_unit = _this select 2;
/*
_fencesArray = ["WoodenFence_1","WoodenFence_2","WoodenFence_3","WoodenFence_4","WoodenFence_5","WoodenFence_6","WoodenFence_7","WoodenGate_1","WoodenGate_2","WoodenGate_3","WoodenGate_4"];
//Hopefully returns the xyz of the vehicle seat pos.
_exitPosition = _vehicle modelToWorld (_vehicle selectionPosition ("pos " + _position));
*/
if (_unit == player) then {
//if (dayz_soundMuted) then {call player_toggleSoundMute;}; // Auto disable mute on vehicle exit (not a good idea without a sleep since rotor can be very loud when spinning down)
_buildables = count ((getposATL _vehicle) nearObjects ["DZ_buildables", 3]);
/*
//_buildables = count (_exitPosition nearObjects ["DZ_buildables", 3]);
//Check player location to exit location
_intersectsWith = lineIntersectsWith [[_position select 0, _position select 1, 0], [_exitPosition select 0, _exitPosition select 1, 0],_unit,_vehicle,true];
//_buildables = count ((getposATL _vehicle) nearObjects ["DZ_buildables", 3]);
_buildables = false;
//Scan all intersected items for base items return with true false
{
` _buildables = if (_x in _fencesArray) exitWith {true};
} count _intersectsWith;
//if intersects find builditem make player reenter vehicel
if (_buildables > 0) then {
switch _position do {
@@ -26,7 +42,7 @@ if (_unit == player) then {
localize "str_actions_exitBlocked" call dayz_rollingMessages;
};
*/
_vehicle call player_antiWall;
//Lets make sure we can process some dmg from ejecting from the vehicle even traveling at lower speeds.

View File

@@ -53,8 +53,6 @@ Dayz_attachment_array = ["Attachment_ACG","Attachment_AIM"];
DayZ_Backpacks = ["DZ_Patrol_Pack_EP1","DZ_Assault_Pack_EP1","DZ_Czech_Vest_Pouch","DZ_ALICE_Pack_EP1","DZ_TK_Assault_Pack_EP1","DZ_British_ACU","DZ_CivilBackpack_EP1","DZ_Backpack_EP1","DZ_TerminalPack_EP1","DZ_CompactPack_EP1","DZ_GunBag_EP1","DZ_LargeGunBag_EP1"];
Dayz_Gutting = ["ItemKnife","ItemKnife5","ItemKnife4","ItemKnife3","ItemKnife2","ItemKnife1","ItemKnifeBlunt"];
DayZ_Ignitors = ["ItemMatchbox","Item5Matchbox","Item4Matchbox","Item3Matchbox","Item2Matchbox","Item1Matchbox"];
DayZ_fuelCans = ["ItemJerrycan","ItemFuelcan","ItemFuelBarrel"];
DayZ_fuelCansEmpty = ["ItemJerrycanEmpty","ItemFuelcanEmpty","ItemFuelBarrelEmpty"];
DayZ_traps = ["Trap_Cans","TrapTripwireFlare","TrapBearTrapSmoke","TrapTripwireGrenade","TrapTripwireSmoke","TrapBearTrapFlare"];
DayZ_ViralZeds = ["z_new_villager2","z_new_villager3","z_new_villager4","z_new_worker2","z_new_worker3","z_new_worker4"];
DayZ_SafeObjects = ["Base_Fire_DZ","WoodenGate_1","WoodenGate_2","WoodenGate_3","WoodenGate_4","Land_Fire_DZ","TentStorage","TentStorage0","TentStorage1","TentStorage2","TentStorage3","TentStorage4","StashSmall","StashSmall1","StashSmall2","StashSmall3","StashSmall4","StashMedium","StashMedium1","StashMedium2","StashMedium3","StashMedium4","Wire_cat1","Sandbag1_DZ","Fence_DZ","Generator_DZ","Hedgehog_DZ","BearTrap_DZ","DomeTentStorage","DomeTentStorage0","DomeTentStorage1","DomeTentStorage2","DomeTentStorage3","DomeTentStorage4","CamoNet_DZ","Trap_Cans","TrapTripwireFlare","TrapBearTrapSmoke","TrapTripwireGrenade","TrapTripwireSmoke","TrapBearTrapFlare","TentStorageDomed","VaultStorageLocked","BagFenceRound_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Land_HBarrier5_DZ","Fence_corrugated_DZ","M240Nest_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","Plastic_Pole_EP1_DZ","StickFence_DZ","LightPole_DZ","FuelPump_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","SandNest_DZ","DeerStand_DZ","MetalPanel_DZ","WorkBench_DZ","WoodFloor_DZ","WoodLargeWall_DZ","WoodLargeWallDoor_DZ","WoodLargeWallWin_DZ","WoodSmallWall_DZ","WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","LockboxStorageLocked","WoodFloorHalf_DZ","WoodFloorQuarter_DZ","WoodStairs_DZ","WoodStairsSans_DZ","WoodStairsRails_DZ","WoodSmallWallThird_DZ","WoodLadder_DZ","Land_DZE_GarageWoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_WoodDoor","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallHalf_DZ","CinderWall_DZ","CinderWallDoorway_DZ","CinderWallDoor_DZ","CinderWallDoorLocked_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorSmall_DZ","CinderWallDoorSmallLocked_DZ","MetalFloor_DZ","WoodRamp_DZ","GunRack_DZ","FireBarrel_DZ","WoodCrate_DZ","Scaffolding_DZ","DesertTentStorage","DesertTentStorage0","DesertTentStorage1","DesertTentStorage2","DesertTentStorage3","DesertTentStorage4"];
@@ -514,8 +512,6 @@ dayz_combination = "";
dayz_disallowedVault = ["TentStorage","BuiltItems","ModularItems","DZE_Base_Object","Generator_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_smd_fuelstation_army","Land_fuelstation","land_fuelstation_w","Land_benzina_schnell"];
// Standard Fuel sources
dayz_fuelsources = ["Land_Ind_TankSmall","Land_fuel_tank_big","Land_fuel_tank_stairs","Land_fuel_tank_stairs_ep1","Land_wagon_tanker","Land_fuelstation","Land_fuelstation_army","Land_smd_fuelstation_army","land_fuelstation_w","Land_benzina_schnell"];
dayz_humanitytarget = "";
dayz_selectedVault = objNull;
dayz_selectedDoor = objNull;
@@ -598,6 +594,9 @@ if (isServer) then {
if (!isDedicated) then {
dayz_buildingBubbleMonitor = [];
DayZ_fuelCans = ["ItemJerrycan","ItemFuelcan","ItemFuelBarrel"];
DayZ_fuelCansEmpty = ["ItemJerrycanEmpty","ItemFuelcanEmpty","ItemFuelBarrelEmpty"];
DayZ_fuelSources = ["Land_Ind_TankSmall","Land_fuel_tank_big","Land_fuel_tank_stairs","Land_fuel_tank_stairs_ep1","Land_wagon_tanker","Land_fuelstation","Land_fuelstation_army","Land_smd_fuelstation_army","land_fuelstation_w","Land_benzina_schnell"];
//temperature variables
dayz_temperatur = 36; //TeeChange

View File

@@ -134,4 +134,5 @@ switch (_variable) do {
};
} forEach playableUnits;
};
default { diag_log format ["%1, %2, %3, %4", _unit, _variable, _arraytosend, _owner]; };
};