mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-14 12:12:56 +03:00
0.81
new vault texture, out of stock messaged added back, lowered armor on vault added damage handeler, Potential fix for for tag friendly option on vehicles w/ player. New custom death screen, bulk trades with custom supply crate model. Simlified dynamic vehicle system.
This commit is contained in:
Binary file not shown.
@@ -92,9 +92,9 @@ diag_log format["DEBUG Buy: %1", dayzTraderMenuResult];
|
|||||||
|
|
||||||
// trade_items.sqf | [part_out, part_in, qty_out, qty_in,_textPart,_textCurrency];
|
// trade_items.sqf | [part_out, part_in, qty_out, qty_in,_textPart,_textCurrency];
|
||||||
if(_qty <= 0) then {
|
if(_qty <= 0) then {
|
||||||
//_Display = format["Buy %1 (Out of Stock: %2)", _textPart, _qty];
|
_Display = format["Buy %1 (Out of Stock: %2)", _textPart, _qty];
|
||||||
//_part = player addAction [_Display, "\z\addons\dayz_code\actions\trade_cancel.sqf",[], 0, true, false, "",""];
|
_part = player addAction [_Display, "\z\addons\dayz_code\actions\trade_cancel.sqf",[], 0, true, false, "",""];
|
||||||
//_part = player addAction [_Display, _File,[_name,_bname,_out,_in,"buy",_textCurrency,_textPart,_header], _order, true, true, "",""];
|
_part = player addAction [_Display, _File,[_name,_bname,_out,_in,"buy",_textCurrency,_textPart,_header], _order, true, true, "",""];
|
||||||
} else {
|
} else {
|
||||||
_Display = format["Buy %1 (%2) for %3 %4 (Available: %5)", _textPart, _name, _in, _textCurrency, _qty];
|
_Display = format["Buy %1 (%2) for %3 %4 (Available: %5)", _textPart, _name, _in, _textCurrency, _qty];
|
||||||
_part = player addAction [_Display, _File,[_name,_bname,_out,_in,"buy",_textCurrency,_textPart,_header], _order, true, true, "",""];
|
_part = player addAction [_Display, _File,[_name,_bname,_out,_in,"buy",_textCurrency,_textPart,_header], _order, true, true, "",""];
|
||||||
|
|||||||
@@ -12,44 +12,76 @@ _textPartIn = (_this select 3) select 5;
|
|||||||
_textPartOut = (_this select 3) select 6;
|
_textPartOut = (_this select 3) select 6;
|
||||||
_traderID = (_this select 3) select 7;
|
_traderID = (_this select 3) select 7;
|
||||||
|
|
||||||
_qty = {_x == _part_in} count magazines player;
|
_bos = 0;
|
||||||
|
_bulkqty = 0;
|
||||||
|
|
||||||
if (_qty >= _qty_in) then {
|
if(_buy_o_sell == "sell") then {
|
||||||
|
|
||||||
_bos = 0;
|
// SELL ONLY check if item if bulk
|
||||||
if(_buy_o_sell == "sell") then {
|
_bulkItem = call compile format["bulk_%1;",_part_in];
|
||||||
_bos = 1;
|
_bulkqty = {_x == _bulkItem} count magazines player;
|
||||||
};
|
|
||||||
|
_bos = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_bulkqty >= 1) then {
|
||||||
|
|
||||||
|
// TODO: optimize for one db call only
|
||||||
|
|
||||||
|
// Find qty of box and
|
||||||
["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
_bulkqty = getNumber (configFile >> "CfgMagazines" >> _bulkItem >> "count");
|
||||||
|
|
||||||
diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject];
|
// increment trader for each
|
||||||
|
for "_x" from 1 to _bulkqty do {
|
||||||
|
["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
||||||
|
|
||||||
|
waitUntil {!isNil "dayzTradeResult"};
|
||||||
|
|
||||||
waitUntil {!isNil "dayzTradeResult"};
|
if(dayzTradeResult == "PASS") then {
|
||||||
|
diag_log format["DEBUG Complete Trade: %1", dayzTradeResult];
|
||||||
diag_log format["DEBUG Complete Trade: %1", dayzTradeResult];
|
|
||||||
|
|
||||||
if(dayzTradeResult == "PASS") then {
|
|
||||||
for "_x" from 1 to _qty_in do {
|
|
||||||
player removeMagazine _part_in;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
for "_x" from 1 to _qty_out do {
|
|
||||||
player addMagazine _part_out;
|
|
||||||
};
|
|
||||||
|
|
||||||
// [player,"repair",0,false] call dayz_zombieSpeak;
|
|
||||||
cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
|
||||||
} else {
|
|
||||||
cutText [format[("Insufficient Stock %1"),_textPartOut] , "PLAIN DOWN"];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
for "_x" from 1 to _qty_out do {
|
||||||
|
player addMagazine _part_out;
|
||||||
|
};
|
||||||
|
|
||||||
|
cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||||
|
|
||||||
dayzTradeResult = nil;
|
dayzTradeResult = nil;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
_needed = _qty_in - _qty;
|
|
||||||
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
|
_qty = {_x == _part_in} count magazines player;
|
||||||
|
|
||||||
|
if (_qty >= _qty_in) then {
|
||||||
|
|
||||||
|
["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
||||||
|
|
||||||
|
diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject];
|
||||||
|
|
||||||
|
waitUntil {!isNil "dayzTradeResult"};
|
||||||
|
|
||||||
|
if(dayzTradeResult == "PASS") then {
|
||||||
|
diag_log format["DEBUG Complete Trade: %1", dayzTradeResult];
|
||||||
|
for "_x" from 1 to _qty_in do {
|
||||||
|
player removeMagazine _part_in;
|
||||||
|
};
|
||||||
|
|
||||||
|
for "_x" from 1 to _qty_out do {
|
||||||
|
player addMagazine _part_out;
|
||||||
|
};
|
||||||
|
|
||||||
|
// [player,"repair",0,false] call dayz_zombieSpeak;
|
||||||
|
cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||||
|
} else {
|
||||||
|
cutText [format[("Insufficient Stock %1"),_textPartOut] , "PLAIN DOWN"];
|
||||||
|
};
|
||||||
|
dayzTradeResult = nil;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
_needed = _qty_in - _qty;
|
||||||
|
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
@@ -153,6 +153,15 @@ if (_hasPatient and !r_drag_sqf and !r_action and !_inVehicle and !r_player_unco
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
} forEach _magTypes;
|
} forEach _magTypes;
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// should only fire if cursor target is man and not vehicle
|
||||||
|
if ((isPlayer _unit) and !(_charID in _friendlies)) then {
|
||||||
|
r_action = true;
|
||||||
|
_action = _unit addAction ["Tag as friendly", "\z\addons\dayz_code\actions\player_tagFriendly.sqf", [], 0, false, true, "", ""];
|
||||||
|
r_player_actions set [count r_player_actions,_action];
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
//CAN CARRY BACKPACK
|
//CAN CARRY BACKPACK
|
||||||
if ((_type in USEC_PackableObjects) and (_classbag == "")) then {
|
if ((_type in USEC_PackableObjects) and (_classbag == "")) then {
|
||||||
@@ -188,12 +197,7 @@ if (_hasPatient and !r_drag_sqf and !r_action and !_inVehicle and !r_player_unco
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if ((isPlayer _unit) and !(_charID in _friendlies)) then {
|
|
||||||
r_action = true;
|
|
||||||
// TODO: prevent menu on vehicle, first attempt did not work "vehicle _unit == _unit"
|
|
||||||
_action = _unit addAction ["Tag as friendly", "\z\addons\dayz_code\actions\player_tagFriendly.sqf", [], 0, false, true, "", ""];
|
|
||||||
r_player_actions set [count r_player_actions,_action];
|
|
||||||
};
|
|
||||||
|
|
||||||
if (r_action) then {
|
if (r_action) then {
|
||||||
r_action_targets = r_action_targets + [_unit];
|
r_action_targets = r_action_targets + [_unit];
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
|||||||
// All Traders
|
// All Traders
|
||||||
if (_isMan and !_isPZombie and _traderType in serverTraders) then {
|
if (_isMan and !_isPZombie and _traderType in serverTraders) then {
|
||||||
|
|
||||||
if(!isNil "s_last_trader" and s_player_parts_crtl == 1) then {
|
if((!isNil "s_last_trader") and s_player_parts_crtl == 1) then {
|
||||||
if(s_last_trader != _traderType) then {
|
if(s_last_trader != _traderType) then {
|
||||||
s_player_parts_crtl -1;
|
s_player_parts_crtl -1;
|
||||||
};
|
};
|
||||||
@@ -281,7 +281,6 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
|||||||
|
|
||||||
//diag_log ("TRADER = " + str(serverTraders));
|
//diag_log ("TRADER = " + str(serverTraders));
|
||||||
|
|
||||||
|
|
||||||
_traderMenu = call compile format["menu_%1;",_traderType];
|
_traderMenu = call compile format["menu_%1;",_traderType];
|
||||||
|
|
||||||
diag_log ("TRADER = " + str(_traderMenu));
|
diag_log ("TRADER = " + str(_traderMenu));
|
||||||
|
|||||||
@@ -1478,6 +1478,24 @@ class CfgMagazines
|
|||||||
picture = "\dayz_equip\textures\equip_jerrycan_e_ca.paa";
|
picture = "\dayz_equip\textures\equip_jerrycan_e_ca.paa";
|
||||||
descriptionShort = "$STR_EQUIP_DESC_39";
|
descriptionShort = "$STR_EQUIP_DESC_39";
|
||||||
};
|
};
|
||||||
|
class bulk_NVGoggles: CA_Magazine
|
||||||
|
{
|
||||||
|
scope = 2;
|
||||||
|
count = 12;
|
||||||
|
type = "(256 * 6)";
|
||||||
|
model = "\dayz_equip\models\supply_crate.p3d";
|
||||||
|
picture = "\dayz_equip\textures\equip_wooden_crate_ca.paa";
|
||||||
|
descriptionShort = "12 x NV Goggles";
|
||||||
|
};
|
||||||
|
class bulk_30Rnd_9x19_MP5SD: CA_Magazine
|
||||||
|
{
|
||||||
|
scope = 2;
|
||||||
|
count = 12;
|
||||||
|
type = "(256 * 6)";
|
||||||
|
model = "\dayz_equip\models\supply_crate.p3d";
|
||||||
|
picture = "\dayz_equip\textures\equip_wooden_crate_ca.paa";
|
||||||
|
descriptionShort = "12 x 30Rnd_9x19_MP5SD rounds";
|
||||||
|
};
|
||||||
class ItemGenerator: CA_Magazine
|
class ItemGenerator: CA_Magazine
|
||||||
{
|
{
|
||||||
scope = 2;
|
scope = 2;
|
||||||
@@ -2000,7 +2018,7 @@ class CfgVehicles
|
|||||||
displayName = "Vault";
|
displayName = "Vault";
|
||||||
model = "\dayz_equip\models\safe1.p3d";
|
model = "\dayz_equip\models\safe1.p3d";
|
||||||
destrType = "DestructNo";
|
destrType = "DestructNo";
|
||||||
armor = 2000;
|
armor = 800;
|
||||||
transportMaxMagazines = 200;
|
transportMaxMagazines = 200;
|
||||||
transportMaxWeapons = 20;
|
transportMaxWeapons = 20;
|
||||||
transportMaxBackpacks = 10;
|
transportMaxBackpacks = 10;
|
||||||
@@ -2011,7 +2029,7 @@ class CfgVehicles
|
|||||||
displayName = "Locked Vault";
|
displayName = "Locked Vault";
|
||||||
model = "\dayz_equip\models\safe1.p3d";
|
model = "\dayz_equip\models\safe1.p3d";
|
||||||
destrType = "DestructNo";
|
destrType = "DestructNo";
|
||||||
armor = 2000;
|
armor = 800;
|
||||||
transportMaxMagazines = 0;
|
transportMaxMagazines = 0;
|
||||||
transportMaxWeapons = 0;
|
transportMaxWeapons = 0;
|
||||||
transportMaxBackpacks = 0;
|
transportMaxBackpacks = 0;
|
||||||
|
|||||||
BIN
dayz_equip/models/supply_crate.p3d
Normal file
BIN
dayz_equip/models/supply_crate.p3d
Normal file
Binary file not shown.
BIN
dayz_equip/textures/epoch-woodencrate1.paa
Normal file
BIN
dayz_equip/textures/epoch-woodencrate1.paa
Normal file
Binary file not shown.
BIN
dayz_equip/textures/equip_wooden_crate_ca.paa
Normal file
BIN
dayz_equip/textures/equip_wooden_crate_ca.paa
Normal file
Binary file not shown.
Binary file not shown.
@@ -2,13 +2,13 @@ ambient[]={1,1,1,1};
|
|||||||
diffuse[]={1,1,1,1};
|
diffuse[]={1,1,1,1};
|
||||||
forcedDiffuse[]={0,0,0,0};
|
forcedDiffuse[]={0,0,0,0};
|
||||||
emmisive[]={0,0,0,1};
|
emmisive[]={0,0,0,1};
|
||||||
specular[]={1,1,1,0.88};
|
specular[]={0,0,0,0.88};
|
||||||
specularPower=23.799999;
|
specularPower=0;
|
||||||
PixelShaderID="NormalMapSpecularMap";
|
PixelShaderID="Normal";
|
||||||
VertexShaderID="NormalMap";
|
VertexShaderID="Basic";
|
||||||
class Stage1
|
class Stage1
|
||||||
{
|
{
|
||||||
texture="dayz_equip\textures\safe1_NOHQ.paa";
|
texture="D:\GitHub Personal\DayZ-Epoch\dayz_equip\textures\safe1_NOHQ.paa";
|
||||||
uvSource="tex";
|
uvSource="tex";
|
||||||
class uvTransform
|
class uvTransform
|
||||||
{
|
{
|
||||||
@@ -20,7 +20,7 @@ class Stage1
|
|||||||
};
|
};
|
||||||
class Stage2
|
class Stage2
|
||||||
{
|
{
|
||||||
texture="dayz_equip\textures\safe1_SMDI.paa";
|
texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)";
|
||||||
uvSource="tex";
|
uvSource="tex";
|
||||||
class uvTransform
|
class uvTransform
|
||||||
{
|
{
|
||||||
@@ -30,3 +30,37 @@ class Stage2
|
|||||||
pos[]={0,0,0};
|
pos[]={0,0,0};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
class Stage3
|
||||||
|
{
|
||||||
|
texture="#(argb,8,8,3)color(0,0,0,0,MC)";
|
||||||
|
uvSource="tex";
|
||||||
|
class uvTransform
|
||||||
|
{
|
||||||
|
aside[]={1,0,0};
|
||||||
|
up[]={0,1,0};
|
||||||
|
dir[]={0,0,1};
|
||||||
|
pos[]={0,0,0};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Stage4
|
||||||
|
{
|
||||||
|
texture="D:\GitHub Personal\DayZ-Epoch\dayz_equip\textures\safe1_SMDI.paa";
|
||||||
|
uvSource="tex";
|
||||||
|
class uvTransform
|
||||||
|
{
|
||||||
|
aside[]={1,0,0};
|
||||||
|
up[]={0,1,0};
|
||||||
|
dir[]={0,0,1};
|
||||||
|
pos[]={0,0,0};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Stage5
|
||||||
|
{
|
||||||
|
texture="#(ai,64,64,1)fresnel(4.01,2.86)";
|
||||||
|
uvSource="none";
|
||||||
|
};
|
||||||
|
class Stage6
|
||||||
|
{
|
||||||
|
texture="ca\data\env_land_co.paa";
|
||||||
|
uvSource="none";
|
||||||
|
};
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
dayz_equip/textures/supply_crate.p3d
Normal file
BIN
dayz_equip/textures/supply_crate.p3d
Normal file
Binary file not shown.
@@ -147,19 +147,16 @@ spawn_vehicles = {
|
|||||||
if (isDedicated) then {
|
if (isDedicated) then {
|
||||||
waituntil {!isnil "fnc_buildWeightedArray"};
|
waituntil {!isnil "fnc_buildWeightedArray"};
|
||||||
|
|
||||||
_weights = [];
|
|
||||||
_weights = [AllowedVehiclesList,AllowedVehiclesChance] call fnc_buildWeightedArray;
|
|
||||||
|
|
||||||
_isOverLimit = true;
|
_isOverLimit = true;
|
||||||
_isAbort = false;
|
_isAbort = false;
|
||||||
_counter = 0;
|
_counter = 0;
|
||||||
while {_isOverLimit} do {
|
while {_isOverLimit} do {
|
||||||
|
|
||||||
waitUntil{!isNil "BIS_fnc_selectRandom"};
|
waitUntil{!isNil "BIS_fnc_selectRandom"};
|
||||||
_index = _weights call BIS_fnc_selectRandom;
|
_index = AllowedVehiclesList call BIS_fnc_selectRandom;
|
||||||
|
|
||||||
_vehicle = AllowedVehiclesList select _index;
|
_vehicle = _index select 0;
|
||||||
_velimit = AllowedVehiclesLimit select _index;
|
_velimit = _index select 1;
|
||||||
|
|
||||||
_qty = {_x == _vehicle} count serverVehicleCounter;
|
_qty = {_x == _vehicle} count serverVehicleCounter;
|
||||||
|
|
||||||
@@ -178,7 +175,7 @@ spawn_vehicles = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (_isAbort) then {
|
if (_isAbort) then {
|
||||||
diag_log("DEBUG: unable to find sutable vehicle");
|
diag_log("DEBUG: unable to find sutable vehicle to spawn");
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// add vehicle to counter for next pass
|
// add vehicle to counter for next pass
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ diag_log "HIVE: Starting";
|
|||||||
clearWeaponCargoGlobal _object;
|
clearWeaponCargoGlobal _object;
|
||||||
clearMagazineCargoGlobal _object;
|
clearMagazineCargoGlobal _object;
|
||||||
|
|
||||||
if (_object isKindOf "TentStorage") then {
|
if (_object isKindOf "TentStorage" or _object isKindOf "VaultStorageLocked") then {
|
||||||
_pos set [2,0];
|
_pos set [2,0];
|
||||||
_object setpos _pos;
|
_object setpos _pos;
|
||||||
_object addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
|
_object addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
|
||||||
|
|||||||
Reference in New Issue
Block a user