Skip to content

Commit

Permalink
can move during transmission
Browse files Browse the repository at this point in the history
  • Loading branch information
simonschmidt-idealo committed Jan 7, 2019
1 parent 8c858c8 commit 4ab0d3f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
1 change: 1 addition & 0 deletions BC_buyables/factions/russiaTank.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class RussiaTank {
driverGps = "true";
crewHelmet = "rhs_tsh4";
disableTIEquipment = "true";
canMoveDuringTransmission = "true";

class rhs_sprut_vdv {
condition = "true";
Expand Down
5 changes: 3 additions & 2 deletions BC_buymenu/functions/fn_buyComplete.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,12 @@ for "_i" from _emptyIndex to ((count _closestRoads) - 1) do {
"_magazineCargo",
"_trackCargo",
"_wheelCargo",
"_removeMagazines"
"_removeMagazines",
"_canMoveDuringTransmission"
];

if (!_isSpecial) then {
[_unit, _unit, 0, _code, _baseConfigName, _categoryConfigName, _itemConfigName, _roadPos, _roadDir, _driverGPS, _crew, _crewHelmet, _disableTIEquipment, _itemCargo, _magazineCargo, _trackCargo, _wheelCargo, _removeMagazines] call BC_buymenu_fnc_buyVehicle;
[_unit, _unit, 0, _code, _baseConfigName, _categoryConfigName, _itemConfigName, _roadPos, _roadDir, _driverGPS, _crew, _crewHelmet, _disableTIEquipment, _itemCargo, _magazineCargo, _trackCargo, _wheelCargo, _removeMagazines, _canMoveDuringTransmission] call BC_buymenu_fnc_buyVehicle;
} else {
[_startVehicle, _code] call BC_buymenu_fnc_buySpecials;
};
Expand Down
4 changes: 3 additions & 1 deletion BC_buymenu/functions/fn_buyVehicle.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* ripoff from grad-lbm, tweaked to prefer roads
*/

params ["_buyer","_account","_price","_code","_baseConfigName","_categoryConfigName","_itemConfigName","_spawnPosition", "_spawnDir", "_driverGPS", "_crew", "_crewHelmet", "_disableTIEquipment", "_itemCargo", "_magazineCargo", "_trackCargo", "_wheelCargo", "_removeMagazines"];
params ["_buyer","_account","_price","_code","_baseConfigName","_categoryConfigName","_itemConfigName","_spawnPosition", "_spawnDir", "_driverGPS", "_crew", "_crewHelmet", "_disableTIEquipment", "_itemCargo", "_magazineCargo", "_trackCargo", "_wheelCargo", "_removeMagazines", "_canMoveDuringTransmission"];

diag_log format ["%1 - %2 - %3", _crewHelmet, _crew, _removeMagazines];

Expand Down Expand Up @@ -77,6 +77,8 @@ if (_wheelCargo > 0) then {
['AddCargoByClass', ['ACE_wheel', _vehicle, _wheelCargo], _vehicle] call CBA_fnc_targetEvent;
};


_vehicle setVariable ["BC_canMoveDuringTransmission", _canMoveDuringTransmission, true];
_vehicle setVariable ["ace_vehiclelock_lockSide", _sideBuyer, true];


Expand Down
5 changes: 3 additions & 2 deletions BC_buymenu/functions/fn_createGUI.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ private _categoriesExtracted = [];
private _driverGPS = [(_config >> "driverGPS"), "text", "true"] call CBA_fnc_getConfigEntry isEqualTo "true";
private _crewHelmet = [(_config >> "crewHelmet"), "text", ""] call CBA_fnc_getConfigEntry;
private _disableTIEquipment = [(_config >> "disableTIEquipment"), "text", "true"] call CBA_fnc_getConfigEntry;

private _canMoveDuringTransmission = [(_config >> "canMoveDuringTransmission"), "text", "false"] call CBA_fnc_getConfigEntry isEqualTo "true";

///////
private _allItems = "true" configClasses (missionConfigFile >> "CfgGradBuymenu" >> _baseConfigName >> _configName);
_listIndex = 0;
Expand Down Expand Up @@ -64,7 +65,7 @@ private _categoriesExtracted = [];
_picturePath = getText (configfile >> "CfgVehicles" >> _itemConfigName >> "editorPreview");
};

_allItemsExtracted pushBack [_displayName, _stock, _description, _code, _picturePath, _crew, _cargo, _speed, _baseConfigName, _categoryName, _itemConfigName, _isSpecial, _driverGPS, _crewHelmet, _disableTIEquipment, _itemCargo, _magazineCargo, _trackCargo, _wheelCargo, _removeMagazines];
_allItemsExtracted pushBack [_displayName, _stock, _description, _code, _picturePath, _crew, _cargo, _speed, _baseConfigName, _categoryName, _itemConfigName, _isSpecial, _driverGPS, _crewHelmet, _disableTIEquipment, _itemCargo, _magazineCargo, _trackCargo, _wheelCargo, _removeMagazines, _canMoveDuringTransmission];
// diag_log str (_allItemsExtracted);
// copyToClipboard str (_allItemsExtracted);

Expand Down
5 changes: 5 additions & 0 deletions grad_tracking/functions/server/fn_radioTruckDeploy.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ _radiotruck setVariable ["GRAD_isAnimating", true, true];

private _fuel = fuel _radiotruck;
private _owner = owner _radiotruck;
private _canMove = _radiotruck getVariable ["BC_canMoveDuringTransmission", false];

_radiotruck setVariable ["GRAD_fuel", _fuel, true];
[_radiotruck, 0] remoteExec ["setFuel", _owner];
Expand All @@ -22,4 +23,8 @@ if (count _antennaOffset > 0) then {
private _antenna = "Land_SatelliteAntenna_01_F" createVehicle [0,0,0];
_antenna attachTo [_radiotruck, _antennaOffset];
_radiotruck setVariable ["BC_antennaObj", _antenna, true];
};

if (_canMove) then {
[_radiotruck, _fuel] remoteExec ["setFuel", _owner];
};

0 comments on commit 4ab0d3f

Please sign in to comment.