From a0b171d3f59aeb3cae9a4f525b8c3b8b996eaf50 Mon Sep 17 00:00:00 2001 From: dayz10k Date: Fri, 22 Nov 2013 17:43:53 -0500 Subject: [PATCH] #761 allow owner to remove modular(no refund, no rubble) --- SQF/dayz_code/actions/remove.sqf | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/SQF/dayz_code/actions/remove.sqf b/SQF/dayz_code/actions/remove.sqf index 3cd2cc9e0..c97d831ca 100644 --- a/SQF/dayz_code/actions/remove.sqf +++ b/SQF/dayz_code/actions/remove.sqf @@ -2,7 +2,7 @@ delete object from db with extra waiting by [VB]AWOL parameters: _obj */ -private ["_activatingPlayer","_obj","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_objType","_sfx","_dis","_itemOut","_countOut","_selectedRemoveOutput","_friendlies","_nearestPole","_ownerID","_refundpart","_isWreck","_findNearestPoles","_findNearestPole","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj","_preventRefund","_ipos","_item","_radius","_isWreckBuilding","_nameVehicle"]; +private ["_activatingPlayer","_obj","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_objType","_sfx","_dis","_itemOut","_countOut","_selectedRemoveOutput","_friendlies","_nearestPole","_ownerID","_refundpart","_isWreck","_findNearestPoles","_findNearestPole","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj","_preventRefund","_ipos","_item","_radius","_isWreckBuilding","_nameVehicle","_isModular"]; if(TradeInprogress) exitWith { cutText [(localize "str_epoch_player_88") , "PLAIN DOWN"]; }; TradeInprogress = true; @@ -31,6 +31,7 @@ _isDestructable = _obj isKindOf "BuiltItems"; _isWreck = _objType in DZE_isWreck; _isRemovable = _objType in DZE_isRemovable; _isWreckBuilding = _objType in DZE_isWreckBuilding; +_isModular = _objType isKindOf "Modular"; _limit = 3; if(isNumber (configFile >> "CfgVehicles" >> _objType >> "constructioncount")) then { @@ -65,6 +66,12 @@ _nameVehicle = getText(configFile >> "CfgVehicles" >> _objType >> "displayName") cutText [format[(localize "str_epoch_player_162"),_nameVehicle], "PLAIN DOWN"]; +if (_isModular) then { + //allow previous cutText to show, then show this if modular. + sleep 2; + {cutText [format["This will not refund any components."], "PLAIN"];}; +}; + // Alert zombies once. [player,50,true,(getPosATL player)] spawn player_alertZombies; @@ -225,4 +232,4 @@ if (_proceed) then { }; }; TradeInprogress = false; -s_player_deleteBuild = -1; \ No newline at end of file +s_player_deleteBuild = -1;