diff --git a/SQF/dayz_code/Configs/CfgVehicles/DZE/Doors.hpp b/SQF/dayz_code/Configs/CfgVehicles/DZE/Doors.hpp index 13fead832..9b3ef222b 100644 --- a/SQF/dayz_code/Configs/CfgVehicles/DZE/Doors.hpp +++ b/SQF/dayz_code/Configs/CfgVehicles/DZE/Doors.hpp @@ -189,35 +189,47 @@ class Land_wood_wreck_frame : ruins { scope = 1; model = "\z\addons\dayz_epoch\models\wood_wreck_frame.p3d"; displayName = "Wood Wall ruins"; + removeoutput[] = {{"PartPlywoodPack",1},{"PartPlankPack",1}}; }; class Land_wood_wreck_third : ruins { scope = 1; model = "\z\addons\dayz_epoch\models\wood_wreck_third.p3d"; displayName = "Wood Wall 1/3 ruins"; + removeoutput[] = {{"PartWoodPlywood",1},{"PartWoodLumber",1}}; }; class Land_wood_wreck_half : ruins { scope = 1; model = "\z\addons\dayz_epoch\models\wood_wreck_half.p3d"; displayName = "Wood Floor 1/2 ruins"; + removeoutput[] = {{"PartWoodPlywood",1},{"PartWoodLumber",1}}; }; class Land_wood_wreck_floor : ruins { scope = 1; model = "\z\addons\dayz_epoch\models\wood_wreck_floor.p3d"; displayName = "Wood Floor ruins"; + removeoutput[] = {{"PartPlywoodPack",1},{"PartPlankPack",1}}; }; class Land_wood_wreck_quarter : ruins { scope = 1; model = "\z\addons\dayz_epoch\models\wood_wreck_quarter.p3d"; displayName = "Wood Floor 1/4 ruins"; + removeoutput[] = {{"PartWoodPlywood",1},{"PartWoodLumber",1}}; }; class Land_wreck_cinder: ruins { scope = 1; model = "\z\addons\dayz_epoch\models\wreck_cinder.p3d"; displayName = "Cinder wall ruins"; + removeoutput[] = {{"CinderBlocks",1}}; +}; +class Land_wreck_metal_floor: ruins { + scope = 1; + model = "\z\addons\dayz_epoch\models\wreck_metal_floor.p3d"; + displayName = "Metal Floor ruins"; + removeoutput[] = {{"ItemCorrugated",1},{"ItemPole",2},{"ItemTankTrap",1}}; }; diff --git a/SQF/dayz_code/Configs/cfgVehicles.hpp b/SQF/dayz_code/Configs/cfgVehicles.hpp index a5f789165..cca6aa10c 100644 --- a/SQF/dayz_code/Configs/cfgVehicles.hpp +++ b/SQF/dayz_code/Configs/cfgVehicles.hpp @@ -1616,6 +1616,32 @@ class CfgVehicles { displayName = "Metal Floor"; vehicleClass = "Fortifications"; GhostPreview = "MetalFloor_Preview_DZ"; + class DestructionEffects : DestructionEffects + { + class Ruin1 + { + simulation = "ruin"; + type = "\z\addons\dayz_epoch\models\wreck_metal_floor.p3d"; + position = ""; + intensity = 1; + interval = 1; + lifeTime = 1; + }; + }; + }; + class WoodRamp_DZ: ModularItems + { + scope = 2; + destrType = "DestructBuilding"; + cost = 100; + offset[] = {0,4,0}; + model="\z\addons\dayz_epoch\models\Wood_Ramp.p3d"; + icon = "\ca\data\data\Unknown_object.paa"; + mapSize = 2; + armor = 500; + displayName = "Wood Ramp"; + vehicleClass = "Fortifications"; + // GhostPreview = "MetalFloor_Preview_DZ"; }; class CinderWallHalf_DZ: ModularItems { diff --git a/SQF/dayz_code/actions/player_build.sqf b/SQF/dayz_code/actions/player_build.sqf index d7a2d453c..f610dc2fc 100644 --- a/SQF/dayz_code/actions/player_build.sqf +++ b/SQF/dayz_code/actions/player_build.sqf @@ -26,7 +26,7 @@ closeDialog 1; if(_isWater) exitWith {TradeInprogress = false; cutText [localize "str_player_26", "PLAIN DOWN"];}; if(_onLadder) exitWith {TradeInprogress = false; cutText [localize "str_player_21", "PLAIN DOWN"];}; -if(player getVariable["combattimeout", 0] >= time) exitWith {TradeInprogress = false; cutText ["\n\nCannot build while in combat.", "PLAIN DOWN"];}; +if(player getVariable["combattimeout", 0] >= time) exitWith {TradeInprogress = false; cutText ["Cannot build while in combat.", "PLAIN DOWN"];}; _item = _this; _classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create"); @@ -64,7 +64,7 @@ _findNearestPole = []; _IsNearPlot = count (_findNearestPole); // If item is plot pole and another one exists within 45m -if(_isPole and _IsNearPlot > 0) exitWith { TradeInprogress = false; cutText ["\n\nCannot build plot pole within 45m of an existing plot." , "PLAIN DOWN"]; }; +if(_isPole and _IsNearPlot > 0) exitWith { TradeInprogress = false; cutText ["Cannot build plot pole within 45m of an existing plot." , "PLAIN DOWN"]; }; if(_IsNearPlot == 0) then { _canBuildOnPlot = true; @@ -91,7 +91,7 @@ if(_IsNearPlot == 0) then { }; // _message -if(!_canBuildOnPlot) exitWith { TradeInprogress = false; cutText [format["\n\nUnable to build %1 nearby.",_needText,_distance] , "PLAIN DOWN"]; }; +if(!_canBuildOnPlot) exitWith { TradeInprogress = false; cutText [format["Unable to build %1 nearby.",_needText,_distance] , "PLAIN DOWN"]; }; _missing = ""; _hasrequireditem = true; @@ -103,7 +103,7 @@ _hasrequireditem = true; _hasbuilditem = _this in magazines player; if (!_hasbuilditem) exitWith {TradeInprogress = false; cutText [format[(localize "str_player_31"),_text,"build"] , "PLAIN DOWN"]; }; -if (!_hasrequireditem) exitWith {TradeInprogress = false; cutText [format["\n\nMissing tool %1",_missing] , "PLAIN DOWN"]; }; +if (!_hasrequireditem) exitWith {TradeInprogress = false; cutText [format["Missing tool %1",_missing] , "PLAIN DOWN"]; }; if (_hasrequireditem) then { _location = [0,0,0]; @@ -178,7 +178,7 @@ if (_hasrequireditem) then { _object attachTo [player]; }; - cutText ["\n\nPlanning construction: PgUp = raise, PgDn = lower, Q or E = flip 180, and Space-Bar to start building.", "PLAIN DOWN"]; + cutText ["Planning construction: PgUp = raise, PgDn = lower, Q or E = flip 180, and Space-Bar to build.", "PLAIN DOWN"]; sleep 1; @@ -253,7 +253,7 @@ if (_hasrequireditem) then { if(!_cancel) then { - cutText [format["\n\nPlacing %1, move to cancel.",_text], "PLAIN DOWN"]; + cutText [format["Placing %1, move to cancel.",_text], "PLAIN DOWN"]; _limit = 3; @@ -310,7 +310,7 @@ if (_hasrequireditem) then { _counter = _counter + 1; }; - cutText [format["\n\nConstructing %1 stage %2 of %3, move to cancel.",_text, _counter,_limit], "PLAIN DOWN"]; + cutText [format["Constructing %1 stage %2 of %3, move to cancel.",_text, _counter,_limit], "PLAIN DOWN"]; if(_counter == _limit) exitWith { _isOk = false; @@ -376,7 +376,7 @@ if (_hasrequireditem) then { dayzPublishObj = [_combination,_tmpbuilt,[_dir,_location],_classname]; publicVariableServer "dayzPublishObj"; - cutText [format["\n\nYou have setup your %2. Combination is %1",_combinationDisplay,_text], "PLAIN DOWN", 5]; + cutText [format["You have setup your %2. Combination is %1",_combinationDisplay,_text], "PLAIN DOWN", 5]; } else { @@ -389,7 +389,7 @@ if (_hasrequireditem) then { } else { deleteVehicle _tmpbuilt; - cutText ["\n\nCanceled building." , "PLAIN DOWN"]; + cutText ["Canceled building." , "PLAIN DOWN"]; }; } else { @@ -401,12 +401,12 @@ if (_hasrequireditem) then { deleteVehicle _tmpbuilt; - cutText ["\n\nCanceled building." , "PLAIN DOWN"]; + cutText ["Canceled building." , "PLAIN DOWN"]; }; } else { deleteVehicle _tmpbuilt; - cutText [format["\n\nCanceled construction of %1 %2.",_text,_reason], "PLAIN DOWN"]; + cutText [format["Canceled construction of %1 %2.",_text,_reason], "PLAIN DOWN"]; }; }; diff --git a/SQF/dayz_code/actions/remove.sqf b/SQF/dayz_code/actions/remove.sqf index 62b1096e5..7dfc4eb6c 100644 --- a/SQF/dayz_code/actions/remove.sqf +++ b/SQF/dayz_code/actions/remove.sqf @@ -28,6 +28,7 @@ _objType = typeOf _obj; _isDestructable = _obj isKindOf "BuiltItems"; _isWreck = _objType in DZE_isWreck; _isRemovable = _objType in DZE_isRemovable; +_isWreckBuilding = _objType in DZE_isWreckBuilding; _limit = 3; if(isNumber (configFile >> "CfgVehicles" >> _objType >> "constructioncount")) then { @@ -167,11 +168,19 @@ if (_proceed) then { _refundpart = ["PartEngine","PartGeneric","PartFueltank","PartWheel","PartGlass","ItemJerrycan"] call BIS_fnc_selectRandom; _selectedRemoveOutput set [count _selectedRemoveOutput,[_refundpart,1]]; } else { - _selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput"); - _preventRefund = (_objectID == "0" && _objectUID == "0"); + if(_isWreckBuilding) then { + _selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput"); + } else { + _selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput"); + _preventRefund = (_objectID == "0" && _objectUID == "0"); + }; }; + if((count _selectedRemoveOutput) <= 0) then { + cutText ["No parts found.", "PLAIN DOWN"]; + }; + // give refund items if((count _selectedRemoveOutput) > 0 and !_preventRefund) then { // Put itemsg diff --git a/SQF/dayz_code/compile/fn_selfActions.sqf b/SQF/dayz_code/compile/fn_selfActions.sqf index 8a4c3da03..bbfbed587 100644 --- a/SQF/dayz_code/compile/fn_selfActions.sqf +++ b/SQF/dayz_code/compile/fn_selfActions.sqf @@ -4,7 +4,7 @@ scriptName "Functions\misc\fn_selfActions.sqf"; - Function - [] call fnc_usec_selfActions; ************************************************************/ -private ["_temp_keys","_magazinesPlayer","_isPZombie","_vehicle","_inVehicle","_hasFuelE","_hasRawMeat","_hasKnife","_hasToolbox","_onLadder","_nearLight","_canPickLight","_canDo","_text","_isHarvested","_isVehicle","_isVehicletype","_isMan","_traderType","_ownerID","_isAnimal","_isDog","_isZombie","_isDestructable","_isTent","_isFuel","_isAlive","_Unlock","_lock","_buy","_dogHandle","_lieDown","_warn","_hastinitem","_allowedDistance","_menu","_menu1","_humanity_logic","_low_high","_cancel","_metals_trader","_traderMenu","_isWreck","_isRemovable","_isDisallowRepair","_rawmeat","_humanity","_speed","_dog","_hasbottleitem","_isAir","_isShip","_playersNear","_findNearestGens","_findNearestGen","_IsNearRunningGen","_cursorTarget","_isnewstorage","_itemsPlayer","_ownerKeyId","_typeOfCursorTarget","_hasKey","_oldOwner","_combi","_key_colors","_player_deleteBuild","_player_flipveh","_player_lockUnlock_crtl","_player_butcher","_player_studybody","_player_cook","_player_boil","_hasFuelBarrelE"]; +private ["_isWreckBuilding","_temp_keys","_magazinesPlayer","_isPZombie","_vehicle","_inVehicle","_hasFuelE","_hasRawMeat","_hasKnife","_hasToolbox","_onLadder","_nearLight","_canPickLight","_canDo","_text","_isHarvested","_isVehicle","_isVehicletype","_isMan","_traderType","_ownerID","_isAnimal","_isDog","_isZombie","_isDestructable","_isTent","_isFuel","_isAlive","_Unlock","_lock","_buy","_dogHandle","_lieDown","_warn","_hastinitem","_allowedDistance","_menu","_menu1","_humanity_logic","_low_high","_cancel","_metals_trader","_traderMenu","_isWreck","_isRemovable","_isDisallowRepair","_rawmeat","_humanity","_speed","_dog","_hasbottleitem","_isAir","_isShip","_playersNear","_findNearestGens","_findNearestGen","_IsNearRunningGen","_cursorTarget","_isnewstorage","_itemsPlayer","_ownerKeyId","_typeOfCursorTarget","_hasKey","_oldOwner","_combi","_key_colors","_player_deleteBuild","_player_flipveh","_player_lockUnlock_crtl","_player_butcher","_player_studybody","_player_cook","_player_boil","_hasFuelBarrelE"]; if (TradeInprogress) exitWith {}; // Do not allow if any script is running. @@ -83,6 +83,8 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu // get typeof cursortarget once _typeOfCursorTarget = typeOf _cursorTarget; + // hintsilent _typeOfCursorTarget; + _isVehicle = _cursorTarget isKindOf "AllVehicles"; _isVehicletype = _typeOfCursorTarget in ["ATV_US_EP1","ATV_CZ_EP1"]; _isnewstorage = _typeOfCursorTarget in DZE_isNewStorage; @@ -124,6 +126,8 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu _isZombie = _cursorTarget isKindOf "zZombie_base"; _isDestructable = _cursorTarget isKindOf "BuiltItems"; _isWreck = _typeOfCursorTarget in DZE_isWreck; + _isWreckBuilding = _typeOfCursorTarget in DZE_isWreckBuilding; + _isRemovable = _typeOfCursorTarget in DZE_isRemovable; _isDisallowRepair = _typeOfCursorTarget in ["M240Nest_DZ"]; @@ -159,7 +163,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu if(_isAlive) then { //Allow player to delete objects - if(_isDestructable or _isWreck or _isRemovable) then { + if(_isDestructable or _isWreck or _isRemovable or _isWreckBuilding) then { if(_hasToolbox and "ItemCrowbar" in _itemsPlayer) then { _player_deleteBuild = true; }; diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf index 48427167c..5ba5451c2 100644 --- a/SQF/dayz_code/init/variables.sqf +++ b/SQF/dayz_code/init/variables.sqf @@ -463,6 +463,7 @@ DZE_UnLockedStorage = ["VaultStorage","LockboxStorage"]; // List of removable items that require crowbar DZE_isRemovable = ["Fence_corrugated_DZ","M240Nest_DZ","ParkBench_DZ","Plastic_Pole_EP1_DZ"]; DZE_isWreck = ["SKODAWreck","HMMWVWreck","UralWreck","datsun01Wreck","hiluxWreck","datsun02Wreck","UAZWreck","Land_Misc_Garb_Heap_EP1","Fort_Barricade_EP1","Rubbish2"]; +DZE_isWreckBuilding = ["Land_wreck_cinder","Land_wood_wreck_quarter","Land_wood_wreck_floor","Land_wood_wreck_third","Land_wood_wreck_frame"]; DZE_isNewStorage = ["VaultStorage","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ"]; // These work with just a running generator diff --git a/SQF/dayz_epoch/models/Wood_Ramp.p3d b/SQF/dayz_epoch/models/Wood_Ramp.p3d new file mode 100644 index 000000000..546579cf5 Binary files /dev/null and b/SQF/dayz_epoch/models/Wood_Ramp.p3d differ diff --git a/SQF/dayz_epoch/models/metal_floor.p3d b/SQF/dayz_epoch/models/metal_floor.p3d index abe11ba0e..904308fb3 100644 Binary files a/SQF/dayz_epoch/models/metal_floor.p3d and b/SQF/dayz_epoch/models/metal_floor.p3d differ diff --git a/SQF/dayz_epoch/models/metal_floor_ghost.p3d b/SQF/dayz_epoch/models/metal_floor_ghost.p3d index 15bd3f794..43a76fc1a 100644 Binary files a/SQF/dayz_epoch/models/metal_floor_ghost.p3d and b/SQF/dayz_epoch/models/metal_floor_ghost.p3d differ diff --git a/SQF/dayz_epoch/models/wood_wreck_floor.p3d b/SQF/dayz_epoch/models/wood_wreck_floor.p3d index 59418c042..801826487 100644 Binary files a/SQF/dayz_epoch/models/wood_wreck_floor.p3d and b/SQF/dayz_epoch/models/wood_wreck_floor.p3d differ diff --git a/SQF/dayz_epoch/models/wood_wreck_frame.p3d b/SQF/dayz_epoch/models/wood_wreck_frame.p3d index dff642a50..9f1d443ad 100644 Binary files a/SQF/dayz_epoch/models/wood_wreck_frame.p3d and b/SQF/dayz_epoch/models/wood_wreck_frame.p3d differ diff --git a/SQF/dayz_epoch/models/wreck_metal_floor.p3d b/SQF/dayz_epoch/models/wreck_metal_floor.p3d new file mode 100644 index 000000000..00482c193 Binary files /dev/null and b/SQF/dayz_epoch/models/wreck_metal_floor.p3d differ diff --git a/SQF/dayz_epoch/textures/metal_plates.rvmat b/SQF/dayz_epoch/textures/metal_plates.rvmat index 6b695b0c4..1ff827de9 100644 --- a/SQF/dayz_epoch/textures/metal_plates.rvmat +++ b/SQF/dayz_epoch/textures/metal_plates.rvmat @@ -1,8 +1,8 @@ -ambient[]={0.67843139,0.67843139,0.67843139,0.76999998}; -diffuse[]={0.67843139,0.67843139,0.67843139,0.76899999}; +ambient[]={0.67843139,0.67843139,0.67843139,0.15000001}; +diffuse[]={0.67843139,0.67843139,0.67843139,0.15000001}; forcedDiffuse[]={0,0,0,1}; emmisive[]={0,0,0,1}; -specular[]={0.74509805,0.74509805,0.74509805,0.77999997}; +specular[]={0.29019609,0.29019609,0.29019609,0.77999997}; specularPower=100; PixelShaderID="Super"; VertexShaderID="Super"; @@ -78,3 +78,8 @@ class Stage6 pos[]={0,0,0}; }; }; +class Stage7 +{ + texture="CA\data\env_land_co.paa"; + uvSource="none"; +}; diff --git a/SQF/dayz_epoch/textures/mf_ghost_ca.paa b/SQF/dayz_epoch/textures/mf_ghost_ca.paa index 7e296629e..9d597ac9c 100644 Binary files a/SQF/dayz_epoch/textures/mf_ghost_ca.paa and b/SQF/dayz_epoch/textures/mf_ghost_ca.paa differ