Advanced trading tidying, spelling fixes, private fixes and string fixes (#1716)

* Advanced trading tidying, spelling fixes, private fixes and string fixes.

Fixes snap building issue with metal floors
Fixed spelling mistakes in various scripts
Fixed formatting uglyness in various scripts
Fixed invalid private lines in various scripts
Changed Advanced trading so buying worked more like selling, You can't
select backpack if you don't have a pack nor can you select a vehicle if
you don't have a vehicle.
Removed some redundant strings from Advanced trading and changed a few
of the strings to be more englishy
Removed the ability to buy a backpack into your backpack (You cant do
this anyway)
Fixed a bug where if you had nothing in your backpack it would break the
checkArrayInConfig script so the titlebar would not refresh correctly
Removed slot counts on no backpack and no vehicle (No need for it, just
clutter)
Moved backpack/vehicle checking to z_at_getContainer.sqf

* Last part of tidyness fixes

Last part of tidyness fixes

* Actual backpack fix

Lets actually fix the buying backpack into backpack or backpack when you
already have one.

* Missing from commit

Missing from commit
This commit is contained in:
oiad
2016-07-31 02:03:00 +12:00
committed by ebaydayz
parent 1d2fc3b266
commit 7c4d25ef1a
59 changed files with 536 additions and 538 deletions

View File

@@ -1,19 +1,18 @@
// Remove preview build by RimBlock (http://epochmod.com/forum/index.php?/user/12612-rimblock/)
private ["_location","_object","_objects","_i","_dir","_nearPlotPole","_validMarkers","_findNearestPoles","_poleinv","_IsNearPlot","_plotpole"];
private ["_distance","_plotPole","_findNearestPoles","_validMarkers","_isNearPlot","_poleInv"]
_distance = (DZE_PlotPole select 0) + 5;
// check for near plot
_plotpole = nearestobject [(vehicle player),"Plastic_Pole_EP1_DZ"];
_plotPole = nearestobject [(vehicle player),"Plastic_Pole_EP1_DZ"];
_findNearestPoles = (position _plotpole) nearEntities ["Land_coneLight", _distance];
_validMarkers = [];
_isnearplot = 0;
_isNearPlot = 0;
{
_poleinv = _x getVariable ["inventory",[]];
_poleInv = _x getVariable ["inventory",[]];
if (_poleinv select 0 == "PPMarker") then {
if (_poleInv select 0 == "PPMarker") then {
_validMarkers set [count _validMarkers,_x];
};
} count _findNearestPoles;
@@ -26,5 +25,4 @@ if (_IsNearPlot > 0) then{
diag_log format["Object remove plot radius: [Destroying object: %1]",_x];
deleteVehicle _x;
} count _validMarkers;
};
};

View File

@@ -1,11 +1,10 @@
// Build preview adopted from Axe Cop (@vos) Base Destruction Script
// Amended by RimBlock (http://epochmod.com/forum/index.php?/user/12612-rimblock/) to allow plot radius removal.
private ["_location","_object","_i","_dir","_nearPlotPole","_light","_lightlocationtemp","_lightlocation","_lightarray"];
private ["_location","_object","_i","_nearPlotPole","_lightArray","_BD_radius","_BD_center","_color"];
// global vars
_nearPlotPole = nearestObject [player, "Plastic_Pole_EP1_DZ"];
_lightarray = [];
_lightArray = [];
//"privatized" center variable
_BD_radius = DZE_PlotPole select 0;
@@ -21,6 +20,3 @@ for "_i" from 0 to 360 step (450 / _BD_radius) do {
_object setVariable ["Inventory", ["PPMarker"],true];
_object enableSimulation false;
_object setpos _location;
};

View File

@@ -23,7 +23,7 @@ if (_isowner select 0) then {
{
_object = _x;
_classname = typeOf _object;
if (_classname in DZE_plotTakeOwnershipItems)then {
if (_classname in DZE_plotTakeOwnershipItems) then {
_isowner = [player, _object] call FNC_check_access;
diag_log text "Plot Take Ownership: Object in DZE_plotTakeOwnershipItems";
@@ -44,9 +44,9 @@ if (_isowner select 0) then {
_object setvariable["ObjectID", "0"];
if (_classname in DZE_DoorsLocked) then {
_charID = _object getVariable ["characterID",dayz_characterID];
}else{
_charID = dayz_characterID;
_charID = _object getVariable ["characterID",dayz_characterID];
} else {
_charID = dayz_characterID;
};
_position = getPosATL _object;
@@ -56,25 +56,25 @@ if (_isowner select 0) then {
_invW = getWeaponCargo _object;
{
if ((count _x) != 0) then {_itemsExist = true;};
}foreach _invW;
} foreach _invW;
_invM = getMagazineCargo _object;
if !(_itemsExist) then{
if !(_itemsExist) then {
{
if ((count _x) != 0) then {_itemsExist = true;};
}foreach _invM;
};
_invB = getBackpackCargo _object;
if !(_itemsExist) then{
if !(_itemsExist) then {
{
if ((count _x) != 0) then {_itemsExist = true;};
}foreach _invB;
} foreach _invB;
};
if (_itemsExist) then{
if (_itemsExist) then {
_inventory = format["[%1,%2,%3]", _invW, _invM, _invB];
}else{
} else {
_inventory = "[]";
};
@@ -92,5 +92,4 @@ if (_isowner select 0) then {
};
} count _findNearestObjects;
format[localize "STR_EPOCH_APLOTFORLIFE_TAKE_OWNERSHIP",_changecount] call dayz_rollingMessages;
};