Some small fixes and extra features, DV

This commit is contained in:
Bjanski 2016-07-27 00:59:10 +02:00
parent e30a439a2a
commit dc9d3ae6ee
3 changed files with 73 additions and 12 deletions

View File

@ -27,9 +27,8 @@ _vehObj call ExileServer_system_vehicleSaveQueue_removeVehicle;
_vehObj call ExileServer_system_simulationMonitor_removeVehicle; _vehObj call ExileServer_system_simulationMonitor_removeVehicle;
deleteVehicle _vehObj; deleteVehicle _vehObj;
_subClasses = (missionConfigfile >> "CfgXM8") call BIS_fnc_getCfgSubClasses;
{ {
if(getText(missionConfigFile >> "CfgXM8" >> _x "vehicleClass") == _vehClass)exitWith{ if(getText(missionConfigFile >> "CfgXM8" >> _x >> "vehicleClass") == _vehClass)exitWith{
_lootHolder = createVehicle ["LootWeaponHolder", _vehPos, [], 0, "CAN_COLLIDE"]; _lootHolder = createVehicle ["LootWeaponHolder", _vehPos, [], 0, "CAN_COLLIDE"];
_lootHolder setDir (random 360); _lootHolder setDir (random 360);
@ -38,7 +37,8 @@ _subClasses = (missionConfigfile >> "CfgXM8") call BIS_fnc_getCfgSubClasses;
{ {
_amount = if(count _x > 1)then{_x select 1}else{1}; _amount = if(count _x > 1)then{_x select 1}else{1};
if(_amount > 0)then{ if(_amount > 0)then{
_cargoType = (_x select 0) call ExileClient_util_cargo_getType; _itemClassName = _x select 0;
_cargoType = _itemClassName call ExileClient_util_cargo_getType;
switch (_cargoType) do switch (_cargoType) do
{ {
case 1: case 1:
@ -62,12 +62,12 @@ _subClasses = (missionConfigfile >> "CfgXM8") call BIS_fnc_getCfgSubClasses;
}; };
default default
{ {
_lootHolder addItemCargoGlobal [_itemClassName, _amount; _lootHolder addItemCargoGlobal [_itemClassName, _amount];
}; };
}; };
}; };
}forEach getArray(missionConfigFile >> CfgXM8 >> _x >> "recipe"); }forEach getArray(missionConfigFile >> "CfgXM8" >> _x >> "recipe");
}; };
}forEach _subClasses; }forEach ((missionConfigfile >> "CfgXM8") call BIS_fnc_getCfgSubClasses);
true true

View File

@ -47,8 +47,19 @@ ExAd_XM8_DV_fnc_canPack = {
}; };
ExAd_XM8_DV_fnc_pack = { ExAd_XM8_DV_fnc_pack = {
["despawnDeployableVehicle", [netId ExileClientInteractionObject]] call ExAd_fnc_serverDispatch; [ExileClientInteractionObject] spawn {
params["_obj"];
disableUserInput true;
player playActionNow "Medic";
uiSleep 3;
["despawnDeployableVehicle", [netId _obj]] call ExAd_fnc_serverDispatch;
uiSleep 1;
["SuccessTitleAndText", ["Vehicle Packed"]] call ExileClient_gui_toaster_addTemplateToast;
disableUserInput false;
};
}; };
ExAd_XM8_DV_fnc_spawnVehicle = { ExAd_XM8_DV_fnc_spawnVehicle = {

View File

@ -1,6 +1,6 @@
class CfgXM8 class CfgXM8
{ {
extraApps[] = {"ExAd_VG","ExAd_Info","ExAd_CHVD","ExAd_Journal"}; extraApps[] = {"ExAd_VG","ExAd_Info","ExAd_CHVD","ExAd_Journal","ExAd_Bike","ExAd_Quad"};
class ExAd_VG class ExAd_VG
{ {
@ -23,7 +23,7 @@ class CfgXM8
class ExAd_CHVD class ExAd_CHVD
{ {
title = "View Distance Settings"; title = "View Distance Settings";
controlID = 50200; //IDC:50200 -> 50250 || These need to be unique and out of range from each other controlID = 50200; //IDC:50200 -> 50102 || These need to be unique and out of range from each other
config = "ExadClient\XM8\Apps\CHVD\config.sqf"; config = "ExadClient\XM8\Apps\CHVD\config.sqf";
logo = "ExadClient\XM8\Apps\CHVD\Icon_CHVD.paa"; logo = "ExadClient\XM8\Apps\CHVD\Icon_CHVD.paa";
onLoad = "ExAdClient\XM8\Apps\CHVD\onLoad.sqf"; onLoad = "ExAdClient\XM8\Apps\CHVD\onLoad.sqf";
@ -40,6 +40,26 @@ class CfgXM8
onOpen = "ExAdClient\XM8\Apps\Journal\onOpen.sqf"; onOpen = "ExAdClient\XM8\Apps\Journal\onOpen.sqf";
onClose = "ExAdClient\XM8\Apps\Journal\onClose.sqf"; onClose = "ExAdClient\XM8\Apps\Journal\onClose.sqf";
}; };
class ExAd_Bike
{
title = "Deploy Bike";
config = "ExadClient\XM8\Apps\DeployVehicle\config.sqf";
bambiState = 0;
vehicleClass = "Exile_Bike_MountainBike";
recipe[] = {{"Exile_Item_ExtensionCord",-1}};
packable = 1;
autoCleanUp = 1;
quickFunction = "['ExAd_Bike'] call ExAd_XM8_DV_fnc_spawnVehicle";
};
class ExAd_Quad
{
title = "Deploy Quad";
bambiState = 0;
vehicleClass = "Exile_Bike_QuadBike_Fia";
recipe[] = {{"Exile_Item_ExtensionCord",1}};
packable = 1;
quickFunction = "['ExAd_Quad'] call ExAd_XM8_DV_fnc_spawnVehicle";
};
}; };
class CfgExileCustomCode class CfgExileCustomCode
@ -51,6 +71,36 @@ class CfgExileCustomCode
class CfgInteractionMenus class CfgInteractionMenus
{ {
class Car
{
targetType = 2;
target = "Car";
class Actions
{
class PackDeployedVehicle: ExileAbstractAction
{
title = "Pack Vehicle";
condition = "call ExAd_XM8_DV_fnc_canPack";
action = "call ExAd_XM8_DV_fnc_pack";
};
};
};
class Bikes
{
targetType = 2;
target = "Bicycle";
class Actions
{
class PackDeployedVehicle: ExileAbstractAction
{
title = "Pack Bike";
condition = "call ExAd_XM8_DV_fnc_canPack";
action = "call ExAd_XM8_DV_fnc_pack";
};
};
};
class Flag class Flag
{ {
targetType = 2; targetType = 2;