mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-19 10:02:02 +03:00
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.
This commit is contained in:
@@ -1,25 +1,17 @@
|
||||
private ["_vehicle","_list","_result","_pos"];
|
||||
private ["_list","_result","_pos"];
|
||||
|
||||
Z_vehicle = objNull;
|
||||
_vehicle = objNull;
|
||||
_result = false;
|
||||
_pos = [player] call FNC_GetPos;
|
||||
_list = nearestObjects [_pos, ["Air","LandVehicle","Ship"], Z_VehicleDistance];
|
||||
|
||||
if (!isNull DZE_myVehicle && local DZE_myVehicle && alive DZE_myVehicle && DZE_myVehicle in _list) then {
|
||||
_vehicle = DZE_myVehicle;
|
||||
};
|
||||
|
||||
_result = false;
|
||||
|
||||
if (!isNull _vehicle) then {
|
||||
Z_vehicle = _vehicle;
|
||||
if (!isNull DZE_myVehicle && {local DZE_myVehicle} && {alive DZE_myVehicle} && {DZE_myVehicle in _list}) then {
|
||||
_result = true;
|
||||
if (_this) then { // Set trade title, don't set on menu start up since gear is selected initially.
|
||||
systemChat format[localize "STR_EPOCH_TRADE_SELECTED",typeOf Z_vehicle];
|
||||
systemChat format[localize "STR_EPOCH_TRADE_SELECTED",typeOf DZE_myVehicle];
|
||||
if (Z_Selling) then {
|
||||
[format[localize "STR_EPOCH_TRADE_SELLING_FROM", typeOf Z_vehicle]] call Z_fillTradeTitle;
|
||||
[format[localize "STR_EPOCH_TRADE_SELLING_FROM", typeOf DZE_myVehicle]] call Z_fillTradeTitle;
|
||||
} else {
|
||||
[format[localize "STR_EPOCH_TRADE_BUYING_IN", typeOf Z_vehicle]] call Z_fillTradeTitle;
|
||||
[format[localize "STR_EPOCH_TRADE_BUYING_IN", typeOf DZE_myVehicle]] call Z_fillTradeTitle;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user