Skip to content

Commit

Permalink
Added combat support module
Browse files Browse the repository at this point in the history
  • Loading branch information
Giallustio committed Dec 24, 2016
1 parent 18d739b commit 755c85e
Show file tree
Hide file tree
Showing 14 changed files with 204 additions and 173 deletions.
48 changes: 46 additions & 2 deletions _A&S.Panovo/core/def/mission.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ switch (btc_enemy_ratio) do {
case 3: {btc_enemy_ratio_fant = 3};
};

btc_city_bonus = 500;
btc_loc_blacklist = [];
btc_money = 99999;
btc_bonus_city = 500;
btc_loc_blacklist = [];
//Var
if (isServer) then {

Expand Down Expand Up @@ -103,6 +104,49 @@ btc_arty_reloadTime = 300;
btc_arty_offsetX = 0;
btc_arty_offsetY = 0;

//Combat Support

btc_gearObjectType = "LIB_WeaponsBox_Big_GER";
btc_combatSupportObjectType = "LIB_Static_opelblitz_radio";
btc_combatSupport =
[
[
"Cars",
"Trucks",
"APC",
"Tanks"
],
[
[
//"Cars"
"LIB_Kfz1",100,
"LIB_Kfz1_MG42",100
],
[
//"Trucks"
"LIB_opelblitz_open_y_camo",100,
"LIB_opelblitz_tent_y_camo",100,
"LIB_opelblitz_ammo",100,
"LIB_opelblitz_fuel",100,
"LIB_opelblitz_parm",100
],
[
//"APC"
"LIB_SdKfz251",100,
"LIB_SdKfz_7",100,
"LIB_SdKfz_7_AA",100,
"LIB_SdKfz251_FFV",100

],
[
//"Tanks"
"LIB_PzKpfwIV_H",100,
"LIB_StuG_III_G",100,
"LIB_PzKpfwV",100
]
]
];

btc_enemy_men = "SoldierEB";
btc_friendly_men = "SoldierWB";
btc_flag_marker_type = "Faction_NATO_EP1";
Expand Down
61 changes: 61 additions & 0 deletions _A&S.Panovo/core/dlg/combatSupport.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@

class btc_combatSupport_dialog {
idd = -1;
movingEnable = 1;
objects[] = {};
class controlsBackground {};
class controls {
class IGUIBack_2200: IGUIBack
{
x = 0.314375 * safezoneW + safezoneX;
y = 0.324 * safezoneH + safezoneY;
w = 0.134062 * safezoneW;
h = 0.407 * safezoneH;
};
class RscCombo_2100: RscCombo
{
idc = 70;
x = 0.324687 * safezoneW + safezoneX;
y = 0.346 * safezoneH + safezoneY;
w = 0.113437 * safezoneW;
h = 0.022 * safezoneH;
onLBSelChanged = "3 call btc_fnc_cs_handle;";
};
class RscListbox_1500: RscListbox
{
idc = 71;
x = 0.324687 * safezoneW + safezoneX;
y = 0.379 * safezoneH + safezoneY;
w = 0.113437 * safezoneW;
h = 0.22 * safezoneH;
onLBSelChanged = "4 call btc_fnc_cs_handle;";
};
class RscText_1000: RscText
{
idc = 72;
text = "Your money:"; //--- ToDo: Localize;
x = 0.324687 * safezoneW + safezoneX;
y = 0.61 * safezoneH + safezoneY;
w = 0.113437 * safezoneW;
h = 0.022 * safezoneH;
};
class RscText_1001: RscText
{
idc = 73;
text = "Cost"; //--- ToDo: Localize;
x = 0.324687 * safezoneW + safezoneX;
y = 0.643 * safezoneH + safezoneY;
w = 0.103125 * safezoneW;
h = 0.022 * safezoneH;
};
class RscButton_1600: RscButton
{
x = 0.335 * safezoneW + safezoneX;
y = 0.676 * safezoneH + safezoneY;
w = 0.0876563 * safezoneW;
h = 0.033 * safezoneH;
text = "Confirm";
action = "1 call btc_fnc_cs_handle;";
};
};
};
6 changes: 6 additions & 0 deletions _A&S.Panovo/core/fnc/compile.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ if (isServer) then {
btc_fnc_ai_mortarFire = compile preprocessFile "core\fnc\ai\mortarFire.sqf";
btc_fnc_ai_setSkill = compile preprocessFile "core\fnc\ai\setSkill.sqf";
btc_fnc_ai_taskPatrol = compile preprocessFile "core\fnc\ai\taskPatrol.sqf";

btc_fnc_cs_create = compile preprocessFile "core\fnc\cs\create.sqf";

//MISC
btc_fnc_createMarker = compile preprocessFile "core\fnc\misc\createMarker.sqf";
Expand All @@ -34,6 +36,8 @@ if (isServer) then {
};
/////////////////////CLIENT AND SERVER\\\\\\\\\\\\\\\\\\\\\

btc_fnc_cs_addAction = compile preprocessFile "core\fnc\cs\addAction.sqf";

//COMMON
btc_fnc_addArsenal = compile preprocessFile "core\fnc\misc\addArsenal.sqf";

Expand All @@ -42,6 +46,8 @@ btc_fnc_addArsenal = compile preprocessFile "core\fnc\misc\addArsenal.sqf";
if (!isDedicated) then {
btc_fnc_actions_requestArtillery = compile preprocessFile "core\fnc\actions\requestArtillery.sqf";

btc_fnc_cs_handle = compile preprocessFile "core\fnc\cs\handle.sqf";

btc_fnc_mission_assignLocationNotification = compile preprocessFile "core\fnc\mission\assignLocationNotification.sqf";
btc_fnc_mission_locationCapturedNotification = compile preprocessFile "core\fnc\mission\locationCapturedNotification.sqf";
};
1 change: 1 addition & 0 deletions _A&S.Panovo/core/fnc/cs/addAction.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(_this select 0) addAction ["<t color='#ff1111'>Request vehicles</t>", "0 spawn btc_fnc_cs_handle;"];
48 changes: 13 additions & 35 deletions _A&S.Panovo/core/fnc/cs/create.sqf
Original file line number Diff line number Diff line change
@@ -1,35 +1,13 @@

closeDialog 0;

btc_log_create_obj = _this select 0;

if (count (nearestObjects [getpos btc_log_create_obj,["All"],5]) > 1) exitWith {hint "Clear the area before create another object!"};

disableSerialization;
closeDialog 0;
createDialog "btc_log_dlg_create";

waitUntil {dialog};

call btc_fnc_log_create_load;

//_class = lbText [72,lbCurSel 72];
_class = lbData [72, lbCurSel 72];
_selected = _class;
_new = _class createVehicleLocal [getpos btc_log_create_obj select 0,getpos btc_log_create_obj select 1,0];
while {dialog} do
{
//if (_class != lbData [72, 1]) then
if (_class != lbData [72, lbCurSel 72]) then
{
deleteVehicle _new; sleep 0.1;
_class = lbData [72, lbCurSel 72];
//_class = lbText [72,lbCurSel 72];
_selected = _class;
_new = _class createVehicleLocal [getpos btc_log_create_obj select 0,getpos btc_log_create_obj select 1,0];
_new setDir (getDir btc_log_create_obj);
_new setPos [getpos btc_log_create_obj select 0,getpos btc_log_create_obj select 1,0];
};
sleep 0.1;
};
deleteVehicle _new;
private ["_type","_pos","_dir","_cost"];

_type = _this select 0;
_pos = _this select 1;
_dir = _this select 2;
_cost = _this select 3;

if (btc_money >= _cost) then {
private "_obj";
btc_money = btc_money - _cost;publicVariable "btc_money";
_obj = _type createVehicle _pos;
_obj setDir _dir;
};
5 changes: 0 additions & 5 deletions _A&S.Panovo/core/fnc/cs/create_apply.sqf

This file was deleted.

16 changes: 0 additions & 16 deletions _A&S.Panovo/core/fnc/cs/create_change_target.sqf

This file was deleted.

21 changes: 0 additions & 21 deletions _A&S.Panovo/core/fnc/cs/create_load.sqf

This file was deleted.

4 changes: 0 additions & 4 deletions _A&S.Panovo/core/fnc/cs/create_s.sqf

This file was deleted.

50 changes: 0 additions & 50 deletions _A&S.Panovo/core/fnc/cs/dlg.hpp

This file was deleted.

Loading

0 comments on commit 755c85e

Please sign in to comment.