mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Advanced trading modifications, maintain_area modifications (#1780)
* Advanced trading modifications, maintain_area modifications
This lot of changes brings forth the following:
Sets up a "default" set of compiles that are the minimum needed for
maintain_area.sqf and custom scripts to utilize the gem based currency
that @icomrade added.
maintain_area.sqf: This will now utilize the gem based currency system.
Removed the redundant Z_Vehicle and replaced it with the Epoch built in
DZE_myVehicle
z_at_buyItems: Code tidying and optimization
z_at_checkCloseVehicle: Tidied up the code since removing Z_Vehicle
allowed us to remove some now useless code.
z_at_getVehicleItems: Removed the nearestObjects check for your vehicle
since we now do z_checkCloseVehicle on Advanced trading start up.
* Advanced trading missed redundant variables
As per description
* Advanced trading rework
We don't need to check for close vehicle anymore now for backpack money
since we've made z_vehicle redundant.
* Revert "Advanced trading rework"
This reverts commit a589bd19b9.
* Advanced trading rework
We don't need to check for close vehicle anymore now for backpack money
since we've made z_vehicle redundant.
* Advanced trading rework
More rework
* Remove single currency add/remove coins functions
at request of @ebaydayz.
This commit is contained in:
@@ -19,8 +19,8 @@ _vehTrade = false;
|
||||
_vehUpgraded = "";
|
||||
|
||||
if (false call Z_checkCloseVehicle) then {
|
||||
_vehUpgraded = getText (configFile >> 'CfgVehicles' >> typeOf (Z_vehicle) >> 'original');
|
||||
_all = _weaps + _mags + _bags + [(typeOf Z_vehicle)];
|
||||
_vehUpgraded = getText (configFile >> 'CfgVehicles' >> typeOf (DZE_myVehicle) >> 'original');
|
||||
_all = _weaps + _mags + _bags + [(typeOf DZE_myVehicle)];
|
||||
_vehTrade = true;
|
||||
} else {
|
||||
_all = _weaps + _mags + _bags;
|
||||
@@ -56,7 +56,7 @@ _totalPrice = 0;
|
||||
if (isNumber (missionConfigFile >> "CfgTraderCategory" >> _cat >> "duplicate")) then {
|
||||
_cat = format["Category_%1",getNumber (missionConfigFile >> "CfgTraderCategory" >> _cat >> "duplicate")];
|
||||
};
|
||||
if (_vehUpgraded != "" && _y == (typeOf Z_vehicle)) then { _y = _vehUpgraded; };
|
||||
if (_vehUpgraded != "" && _y == (typeOf DZE_myVehicle)) then { _y = _vehUpgraded; };
|
||||
_exists = isClass(missionConfigFile >> "CfgTraderCategory" >> _cat >> _y);
|
||||
if (_exists) exitWith {
|
||||
_pic = "";
|
||||
@@ -84,9 +84,9 @@ _totalPrice = 0;
|
||||
|
||||
if (isNil '_text') then { _text = _y; };
|
||||
_HasKey = true;
|
||||
if (_vehTrade && {(typeOf Z_vehicle) == _y}) then {
|
||||
if (_vehTrade && {(typeOf DZE_myVehicle) == _y}) then {
|
||||
if (!(_type in DZE_tradeVehicleKeyless) && DZE_SaleRequiresKey) then {
|
||||
_HasKey = [Z_vehicle, _all] call _HasKeyCheck;
|
||||
_HasKey = [DZE_myVehicle, _all] call _HasKeyCheck;
|
||||
};
|
||||
};
|
||||
if (!_HasKey) exitWith {};
|
||||
|
||||
Reference in New Issue
Block a user