Merge pull request #612 from dayz10k/master

Update player_build.sqf
This commit is contained in:
vbawol
2013-10-21 13:33:04 -07:00
3 changed files with 16 additions and 12 deletions

View File

@@ -2,7 +2,7 @@
DayZ Base Building
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
*/
private ["_location","_dir","_classname","_item","_hasrequireditem","_missing","_hastoolweapon","_cancel","_reason","_started","_finished","_animState","_isMedic","_dis","_sfx","_hasbuilditem","_tmpbuilt","_onLadder","_isWater","_require","_text","_offset","_IsNearPlot","_isOk","_location1","_location2","_counter","_limit","_proceed","_num_removed","_position","_object","_canBuildOnPlot","_friendlies","_nearestPole","_ownerID","_findNearestPoles","_findNearestPole","_distance","_classnametmp","_ghost","_isPole","_needText","_lockable","_zheightchanged","_rotate","_combination_1","_combination_2","_combination_3","_combination_4","_combination","_combination_1_Display","_combinationDisplay","_zheightdirection","_abort","_isNear","_need","_objHupDiff","_objHdwnDiff","_needNear"];
private ["_location","_dir","_classname","_item","_hasrequireditem","_missing","_hastoolweapon","_cancel","_reason","_started","_finished","_animState","_isMedic","_dis","_sfx","_hasbuilditem","_tmpbuilt","_onLadder","_isWater","_require","_text","_offset","_IsNearPlot","_isOk","_location1","_location2","_counter","_limit","_proceed","_num_removed","_position","_object","_canBuildOnPlot","_friendlies","_nearestPole","_ownerID","_findNearestPoles","_findNearestPole","_distance","_classnametmp","_ghost","_isPole","_needText","_lockable","_zheightchanged","_rotate","_combination_1","_combination_2","_combination_3","_combination_4","_combination","_combination_1_Display","_combinationDisplay","_zheightdirection","_abort","_isNear","_need","_objHupDiff","_objHdwnDiff","_needNear","_vehicle","_inVehicle"];
if(TradeInprogress) exitWith { cutText ["\n\nBuilding already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true;
@@ -16,6 +16,9 @@ _cancel = false;
_reason = "";
_canBuildOnPlot = false;
_vehicle = vehicle player;
_inVehicle = (_vehicle != player);
DZE_Q = false;
DZE_Z = false;
@@ -35,6 +38,7 @@ call gear_ui_init;
closeDialog 1;
if(_isWater) exitWith {TradeInprogress = false; cutText [localize "str_player_26", "PLAIN DOWN"];};
if (_inVehicle) exitWith {TradeInprogress = false; cutText ["Cannot build while in a vehicle.", "PLAIN DOWN"];};
if(_onLadder) exitWith {TradeInprogress = false; cutText [localize "str_player_21", "PLAIN DOWN"];};
if(player getVariable["combattimeout", 0] >= time) exitWith {TradeInprogress = false; cutText ["Cannot build while in combat.", "PLAIN DOWN"];};

View File

@@ -11,7 +11,7 @@ _isOk = false;
if(!_isOk) then {
_isOk = _cTarget isKindOf _x;
};
} forEach ["LandVehicle","Air"];
} forEach ["LandVehicle","Air", "Ship"];
if((locked _cTarget) and _isOk and (((vehicle player) distance _cTarget) < 12)) then {
cutText ["Cannot access gear in a locked vehicle." , "PLAIN DOWN"];

View File

@@ -536,7 +536,7 @@ class CfgBuildingLoot {
{ "Colt1911","weapon" },
{ "ItemFlashlight","generic" },
{ "ItemKnife","generic" },
{ "ItemMatchbox","generic" },
{ "ItemMatchbox_DZE","generic" },
{ "","generic" },
{ "LeeEnfield","weapon" },
{ "revolver_EP1","weapon" },
@@ -591,7 +591,7 @@ class CfgBuildingLoot {
{ "Colt1911","weapon" },
{ "ItemFlashlight","weapon" },
{ "ItemKnife","weapon" },
{ "ItemMatchbox","weapon" },
{ "ItemMatchbox_DZE","weapon" },
{ "","generic" },
{ "revolver_EP1","weapon" },
{ "","military" },
@@ -637,7 +637,7 @@ class CfgBuildingLoot {
{ "Colt1911","weapon" },
{ "ItemFlashlight","generic" },
{ "ItemKnife","generic" },
{ "ItemMatchbox","generic" },
{ "ItemMatchbox_DZE","generic" },
{ "","generic" },
{ "LeeEnfield","weapon" },
{ "revolver_EP1","weapon" },
@@ -692,7 +692,7 @@ class CfgBuildingLoot {
{ "Colt1911","weapon" },
{ "ItemFlashlight","weapon" },
{ "ItemKnife","weapon" },
{ "ItemMatchbox","weapon" },
{ "ItemMatchbox_DZE","weapon" },
{ "","generic" },
{ "revolver_EP1","weapon" },
{ "","military" },
@@ -920,7 +920,7 @@ class CfgBuildingLoot {
{ "Colt1911","weapon" },
{ "ItemFlashlight","generic" },
{ "ItemKnife","generic" },
{ "ItemMatchbox","generic" },
{ "ItemMatchbox_DZE","generic" },
{ "","generic" },
{ "LeeEnfield","weapon" },
{ "revolver_EP1","weapon" },
@@ -967,7 +967,7 @@ class CfgBuildingLoot {
{ "Colt1911","weapon" },
{ "ItemFlashlight","weapon" },
{ "ItemKnife","weapon" },
{ "ItemMatchbox","weapon" },
{ "ItemMatchbox_DZE","weapon" },
{ "","generic" },
{ "revolver_EP1","weapon" },
{ "","food" },
@@ -1544,7 +1544,7 @@ class CfgBuildingLoot {
{"ItemMap","weapon"},
{"ItemFlashlight","generic"},
{"ItemKnife","generic"},
{"ItemMatchbox","generic"},
{"ItemMatchbox_DZE","generic"},
{"Crossbow_DZ","weapon"},
{"","military"},
{"WeaponHolder_ItemMachete", "object"},
@@ -1566,7 +1566,7 @@ class CfgBuildingLoot {
{"ItemMap","weapon"},
{"ItemFlashlight","weapon"},
{"ItemKnife","weapon"},
{"ItemMatchbox","weapon"},
{"ItemMatchbox_DZE","weapon"},
{"","military"},
{"","hunter"}
};
@@ -2332,7 +2332,7 @@ class CfgBuildingLoot {
{ "Colt1911","weapon" },
{ "ItemFlashlight","generic" },
{ "ItemKnife","generic" },
{ "ItemMatchbox","generic" },
{ "ItemMatchbox_DZE","generic" },
{ "ItemToolbox","weapon" },
{ "","generic" },
{ "","food" },
@@ -2382,7 +2382,7 @@ class CfgBuildingLoot {
{ "Colt1911","weapon" },
{ "ItemFlashlight","generic" },
{ "ItemKnife","generic" },
{ "ItemMatchbox","generic" },
{ "ItemMatchbox_DZE","generic" },
{ "ItemToolbox","weapon" },
{ "","generic" },
{ "","food" },