mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
0.941
+ added 3d preview to placing vaults and well as a test to see if vaults can be placed in buildings.
This commit is contained in:
@@ -4,11 +4,16 @@ call gear_ui_init;
|
||||
_playerPos = getPosATL player;
|
||||
_item = _this;
|
||||
_hastentitem = _this in magazines player;
|
||||
_location = player modeltoworld [0,1,0];
|
||||
_location set [2,0];
|
||||
_building = nearestObject [(vehicle player), "HouseBase"];
|
||||
_isOk = [(vehicle player),_building] call fnc_isInsideBuilding;
|
||||
//_isOk = true;
|
||||
_offset_x = 0;
|
||||
_offset_y = 1.5;
|
||||
_offset_z = 0;
|
||||
_offset_z_attach = 0.5;
|
||||
|
||||
_location = player modeltoworld [_offset_x,_offset_y,_offset_z];
|
||||
// Allow placement anywhere.
|
||||
// _building = nearestObject [(vehicle player), "HouseBase"];
|
||||
//_isOk = [(vehicle player),_building] call fnc_isInsideBuilding;
|
||||
_isOk = true;
|
||||
|
||||
//diag_log ("Pitch Tent: " + str(_isok) );
|
||||
|
||||
@@ -18,7 +23,8 @@ _text = getText (_config >> "displayName");
|
||||
if (!_hastentitem) exitWith {cutText [format[(localize "str_player_31"),_text,"pitch"] , "PLAIN DOWN"]};
|
||||
|
||||
// blocked
|
||||
if (["concrete",dayz_surfaceType] call fnc_inString) then { _isOk = true; diag_log ("surface concrete"); };
|
||||
// Allow on concrete since we dont force to ground.
|
||||
// if (["concrete",dayz_surfaceType] call fnc_inString) then { _isOk = true; diag_log ("surface concrete"); };
|
||||
if (isOnRoad _playerPos) then { _isOk = true; diag_log ("surface is road"); };
|
||||
if(!placevault) then { _isOk = true; diag_log ("is trader city"); };
|
||||
|
||||
@@ -36,6 +42,53 @@ _objectsPond = nearestObjects [_playerPos, [], 10];
|
||||
|
||||
//diag_log ("Pitch Tent: " + str(_isok) );
|
||||
|
||||
|
||||
|
||||
// Start Preview loop
|
||||
_tmpvault = createVehicle ["VaultStorageLocked", _location, [], 0, "NONE"];
|
||||
_tmpvault setdir _dir;
|
||||
_tmpvault attachTo [player,[_offset_x,_offset_y,_offset_z_attach]];
|
||||
|
||||
_cancel = false;
|
||||
_counter = 0;
|
||||
|
||||
while {_isOk} do {
|
||||
|
||||
if(_counter == 0) then {
|
||||
|
||||
cutText ["Planning consruction stand still 5 seconds to build.", "PLAIN DOWN"];
|
||||
|
||||
|
||||
sleep 5;
|
||||
_location1 = player modeltoworld [_offset_x,_offset_y,_offset_z];
|
||||
|
||||
if(_location distance _location1 < 0.1) exitWith {
|
||||
_isOk = false;
|
||||
_location = _location1;
|
||||
};
|
||||
};
|
||||
if(_counter == 1) then {
|
||||
cutText ["Started consruction stand still 5 seconds to build.", "PLAIN DOWN"];
|
||||
|
||||
sleep 5;
|
||||
_location2 = player modeltoworld [_offset_x,_offset_y,_offset_z];
|
||||
|
||||
if(_location1 distance _location2 < 0.1) exitWith {
|
||||
_isOk = false;
|
||||
_location = _location2;
|
||||
};
|
||||
};
|
||||
if(_counter >= 2) exitWith {
|
||||
_isOk = false;
|
||||
_cancel = true;
|
||||
};
|
||||
_counter = _counter + 1;
|
||||
};
|
||||
|
||||
detach _tmpvault;
|
||||
deleteVehicle _tmpvault;
|
||||
|
||||
if(!_cancel) then {
|
||||
if (!_isOk) then {
|
||||
//remove tentbag
|
||||
player removeMagazine _item;
|
||||
@@ -67,3 +120,6 @@ if (!_isOk) then {
|
||||
cutText ["You cannot place a Vault here. The area must be flat, and free of other objects", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
cutText ["Canceled construction of vault.", "PLAIN DOWN"];
|
||||
};
|
||||
@@ -33,7 +33,7 @@ class CfgMods
|
||||
hidePicture = 0;
|
||||
hideName = 0;
|
||||
action = "http://www.dayzepoch.com";
|
||||
version = "0.94";
|
||||
version = "0.941";
|
||||
hiveVersion = 0.96; //0.93
|
||||
};
|
||||
};
|
||||
|
||||
@@ -87,7 +87,7 @@ class RscDisplayMain : RscStandardDisplay
|
||||
class DAYZ_Version : CA_Version
|
||||
{
|
||||
idc = -1;
|
||||
text = "DayZ Epoch 0.94 (1.7.5.1)";
|
||||
text = "DayZ Epoch 0.941 (1.7.5.1)";
|
||||
y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)";
|
||||
};
|
||||
class CA_TitleMainMenu;
|
||||
|
||||
@@ -1393,7 +1393,7 @@ class CfgMagazines
|
||||
scope = 2;
|
||||
count = 1;
|
||||
type = 256;
|
||||
displayName = "Gold";
|
||||
displayName = "10oz Gold";
|
||||
model = "\dayz_equip\models\gold_bar_10oz.p3d";
|
||||
picture = "\dayz_equip\textures\equip_bar_gold_CA.paa";
|
||||
descriptionShort = "10oz Gold Bar";
|
||||
@@ -1403,7 +1403,7 @@ class CfgMagazines
|
||||
{
|
||||
text = "Smelt 1oz bars";
|
||||
script = "spawn player_craftItem;";
|
||||
output[] = {"ItemGoldBar10oz"};
|
||||
output[] = {"ItemGoldBar"};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user