Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/(0.0.6)'
Browse files Browse the repository at this point in the history
  • Loading branch information
Kexanone committed Mar 8, 2017
2 parents 1812790 + b91e595 commit 40519b0
Show file tree
Hide file tree
Showing 128 changed files with 4,481 additions and 616 deletions.
Binary file modified @AresModAchillesExpansion/addons/data_f_achilles.pbo
Binary file not shown.
Binary file not shown.
Binary file not shown.
89 changes: 4 additions & 85 deletions @AresModAchillesExpansion/addons/data_f_achilles/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ class CfgPatches

units[] = {};

requiredAddons[] = {"A3_Structures_F","A3_Structures_F_Mil"};
requiredAddons[] = {"A3_Structures_F"};

// this prevents any patched class from requiring this addon
addonRootClass = "A3_Structures_F";
};
};

Expand All @@ -24,90 +27,6 @@ class CfgVehicles
{
scopeCurator = 2;
};
class RoadBarrier_small_F : RoadCone_L_F
{
scopeCurator = 2;
};

class Static : All {};

class HBarrier_base_F : Static {};
class Land_HBarrierTower_F : HBarrier_base_F
{
scopeCurator = 2;
};
class Land_HBarrier_1_F : HBarrier_base_F
{
scopeCurator = 2;
};
class Land_HBarrierWall_corridor_F : HBarrier_base_F
{
scopeCurator = 2;
};
class Land_HBarrierWall6_F : HBarrier_base_F
{
scopeCurator = 2;
};
class Land_HBarrierWall_corner_F : HBarrier_base_F
{
scopeCurator = 2;
};
class Land_HBarrierBig_F : HBarrier_base_F {};
class Land_HBarrier_Big_F : Land_HBarrierBig_F
{
scopeCurator = 2;
};
class Land_HBarrier_3_F : HBarrier_base_F
{
scopeCurator = 2;
};
class Land_HBarrier_5_F : HBarrier_base_F
{
scopeCurator = 2;
};
class Land_HBarrierWall4_F : HBarrier_base_F
{
scopeCurator = 2;
};

class BagFence_base_F : Static {};
class Land_BagFence_Short_F : BagFence_base_F
{
scopeCurator = 2;
};
class Land_BagFence_Round_F : BagFence_base_F
{
scopeCurator = 2;
};
class Land_BagFence_Long_F : BagFence_base_F
{
scopeCurator = 2;
};
class Land_BagFence_End_F : BagFence_base_F
{
scopeCurator = 2;
};
class Land_BagFence_Corner_F : BagFence_base_F
{
scopeCurator = 2;
};
};


















#include "cfgMusic.hpp"
Binary file modified @AresModAchillesExpansion/addons/data_f_ares.pbo
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified @AresModAchillesExpansion/addons/functions_f_achilles.pbo
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@ class CfgFunctions
class HigherConfigHierarchyLevel;
class ClassNamesWhichInheritsFromCfgClass;
class getAllTurretConfig;
class weaponsAllTurrets;
class getVehicleAmmoDef;
class getUnitAmmoDef;
class setUnitAmmoDef;
class checkLineOfFire2D;
class matrixTranspose;
class vectorMap;
class dikToLetter;
class getCuratorSelected;
};

class functions_f_features
Expand All @@ -54,19 +57,23 @@ class CfgFunctions
class ungroupObjects;
class setCuratorVisionModes;
class damageBuildings;
class vehicleArsenal;
class preplaceMode;
};
};
class A3_Functions_F_Curator
{
class Curator
{
delete showCuratorAttributes;
delete curatorObjectPlaced;
};
class Achilles
{
file = "\achilles\functions_f_achilles\functions\replacement";

class showCuratorAttributes;
class curatorObjectPlaced;
};
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include "\a3\editor_f\Data\Scripts\dikCodes.h"

#define DIK_LETTERS [DIK_A, DIK_B, DIK_C, DIK_D, DIK_E, DIK_F, DIK_G, DIK_H, DIK_I, DIK_J, DIK_K, DIK_L, DIK_M, DIK_N, DIK_O, DIK_P, DIK_Q, DIK_R, DIK_S, DIK_T, DIK_U, DIK_V, DIK_W, DIK_X, DIK_Y, DIK_Z, DIK_0, DIK_1, DIK_2, DIK_3, DIK_4, DIK_5, DIK_6, DIK_7, DIK_8, DIK_9]
#define STR_LETTERS [ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]

params ["_dikKey"];

_index = DIK_LETTERS find _dikKey;

if (_index == -1) then
{
""
} else
{
STR_LETTERS select _index
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// AUTHOR: Kex
// DATE: 2/26/17
// VERSION: 1.0
// DESCRIPTION: Get current selected units, vehicles , waypoints or groups by curator
//
// ARGUMENTS:
// _this select 0: STRING - either "man" (units including crew), "vehicle" (vehicles), "cargo" (any object that can store items), "group" (groups), "wp" (waypoints)
//
// RETURNS:
// _this: ARRAY - array of selected objects, waypoints or groups
//
// Example:
// ["man"] call Achilles_fnc_getCuratorSelected;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

private ["_unaddedCrew","_intersection"];
private _mode = toLower param [0, "man",[""]];
private _selected = [];

switch (_mode) do
{
case "man":
{
{
if (_x isKindOf "Man") then
{
_selected pushBack _x;
} else
{
if (_x isKindOf "LandVehicle" or _x isKindOf "Air" or _x isKindOf "Ship") then
{
_unaddedCrew = (crew _x) select {not (_x in _selected)};
_selected append _unaddedCrew;
};
};
} forEach (curatorSelected select 0);
};
case "vehicle":
{
{
if (_x isKindOf "LandVehicle" or _x isKindOf "Air" or _x isKindOf "Ship") then
{
_selected pushBack _x;
};
} forEach (curatorSelected select 0);
};
case "cargo":
{
{
if (getNumber (configfile >> "CfgVehicles" >> typeOf _x >> "transportMaxMagazines") > 0) then
{
_selected pushBack _x;
};
} forEach (curatorSelected select 0);
};
case "group":
{
_selected = (curatorSelected select 1);
};
case "wp":
{
_selected = (curatorSelected select 2);
};
};
_selected;
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// AUTHOR: Kex
// DATE: 8/3/16
// VERSION: 1.0
// DESCRIPTION: Returns all weapons of a vehicle (including turrets)
//
// ARGUMENTS:
// _this select 0: OBJECT - vehicle for which all turret weapons shall be found
// _this select 1: BOOL - (default: false) if true, empty weapons are not considered
//
// RETURNS:
// _this: ARRAY - array weapon classes (string)
//
// Example:
// _weapons = [_vehicle] call Achilles_fnc_weaponsAllTurrets;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

private ["_path","_weapon","_cfgMagazines"];
private _vehicle = param [0, objNull, [objNull]];
private _non_empty_only = param [1, false, [false]];
private _weapons = [];
private _magazinesAllTurrets = [];
{
if (_x select 2 > 0) then
{
_magazinesAllTurrets pushBack (_x select 0);
};
} forEach (magazinesAllTurrets _vehicle);

{
_path = _x;
{
_weapon = _x;
if (_non_empty_only) then
{
_cfgMagazines = getArray (configfile >> "CfgWeapons" >> _weapon >> "magazines");
{
if (_x in _cfgMagazines) exitWith
{
_weapons pushBack _weapon;
};
} forEach _magazinesAllTurrets;
} else
{
_weapons pushBack _weapon;
};
} forEach (_vehicle weaponsTurret _path);
} forEach ([[-1]] + allTurrets _vehicle);
_weapons;
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// AUTHOR: Kex
// DATE: 18/2/17
// VERSION: 1.0
// DESCRIPTION: Define position for object in advance
//
// ARGUMENTS:
// _this select 0: OBJECT - Object that shall be placed
//
// RETURNS:
// _this: ARRAY - New world position coordinates
// NIL - If mode was cancled
//
// Example:
// _position = [_object] call Achilles_fnc_PreplaceMode;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#include "\A3\ui_f_curator\ui\defineResinclDesign.inc"

private ["_center_object", "_objects_list","_pos"];
_entity = param [0, objNull, [objNull, grpNull]];
if (isNull _entity) exitWith {};

if (typeName _entity == typeName grpNull) then
{
_center_object = leader _entity;
_objects_list = units _entity;
} else
{
_center_object = _entity;
_objects_list = [_entity];
};

private _center_pos = position _center_object;
private _pos_list = [];
{
_pos = (position _x) vectorDiff _center_pos;
_pos_list pushBack _pos;
_x enableSimulation false;
_x setPos [0,0,0];
} forEach _objects_list;

private _logic_group = createGroup sideLogic;
private _logic = _logic_group createUnit ["Module_f", _center_pos, [], 0, "NONE"];
[[_logic], true] call Ares_fnc_AddUnitsToCurator;

disableSerialization;
private _display = finddisplay IDD_RSCDISPLAYCURATOR;
private _ctrlMessage = _display displayctrl IDC_RSCDISPLAYCURATOR_FEEDBACKMESSAGE;

Achilles_var_submit_selection = nil;

// Inform curator what he has to do
playSound "FD_Finish_F";
//[["Ares","SelectionOption"]] call BIS_fnc_advHint;

_ctrlMessage ctrlsettext (localize "STR_MOVE_SPAWN_POSITION_AND_PRESS_ENTER");
_ctrlMessage ctrlsetfade 1;
_ctrlMessage ctrlcommit 0;
_ctrlMessage ctrlsetfade 0;
_ctrlMessage ctrlcommit 0.1;

// Add key event handler
_handler_id = _display displayAddEventHandler ["KeyDown",
{
_key = _this select 1;
if (_key == 28) then {Achilles_var_submit_selection = true; true} else {false};
if (_key == 1) then {Achilles_var_submit_selection = false; true} else {false};
}];

// executed when the choice is submitted or cancled
WaitUntil {!isNil "Achilles_var_submit_selection"};

// remove the key handler and the message
_display displayRemoveEventHandler ["KeyDown", _handler_id];
_ctrlMessage ctrlsetfade 1;
_ctrlMessage ctrlcommit 0.5;

// if escape was pressed
if (! Achilles_var_submit_selection) exitWith
{
[localize "STR_SELECTION_CANCLED"] call Ares_fnc_ShowZeusMessage;
playSound "FD_Start_F";
deleteVehicle _logic;
deleteGroup _logic_group;
{
{deleteVehicle _x} forEach (crew _x);
deleteVehicle _x;
} forEach _objects_list;
nil
};

// if enter was pressed
[localize "STR_SELECTION_SUBMITTED"] call Ares_fnc_ShowZeusMessage;

_center_pos = position _logic;
{
_x setPos ((_pos_list select _forEachIndex) vectorAdd _center_pos);
_x enableSimulation true;
} forEach _objects_list;
deleteVehicle _logic;
deleteGroup _logic_group;
_center_pos;
Loading

0 comments on commit 40519b0

Please sign in to comment.