Skip to content

Commit

Permalink
Merge pull request #1 from usecforce/wiki-wording
Browse files Browse the repository at this point in the history
Wiki wording
  • Loading branch information
Tourorist committed Apr 17, 2015
2 parents b94b6fa + 2d5b10f commit 61d0234
Show file tree
Hide file tree
Showing 44 changed files with 287 additions and 143 deletions.
6 changes: 3 additions & 3 deletions addons/aircraft/CfgAmmo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
class CfgAmmo {
class BulletBase;
class B_20mm : BulletBase {
hit = 80;
hit = 80;
indirectHit = 12;
indirectHitRange = 2; //2;
caliber = 1.4;
Expand All @@ -13,7 +13,7 @@ class CfgAmmo {
tracerEndTime = 3.5;

CraterEffects = "ExploAmmoCrater";
explosionEffects = "ExploAmmoExplosion";
explosionEffects = "ExploAmmoExplosion";
model = "\A3\Weapons_f\Data\bullettracer\tracer_red";
};
class ACE_20mm_HE : B_20mm {};
Expand All @@ -23,7 +23,7 @@ class CfgAmmo {
indirectHitRange = 0.3; //2;
explosive = 0;
CraterEffects = "";
explosionEffects = "";
explosionEffects = "";
};

// adjust minigun caliber and deflection to other ammo
Expand Down
8 changes: 4 additions & 4 deletions addons/aircraft/Heli_Attack_01_base_F.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ class Heli_Attack_01_base_F: Helicopter_Base_F {
thermalMode[] = {0,1};
gunnerOpticsColor[] = {0,0,0,1};
directionStabilized = 1;
horizontallyStabilized = 1;
horizontallyStabilized = 1;
gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_wide_F";
};
class Medium: Wide
Expand All @@ -918,7 +918,7 @@ class Heli_Attack_01_base_F: Helicopter_Base_F {
maxFov = 0.093;
gunnerOpticsColor[] = {0,0,0,1};
directionStabilized = 1;
horizontallyStabilized = 1;
horizontallyStabilized = 1;
gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_medium_F";
};
class Narrow: Wide
Expand All @@ -929,7 +929,7 @@ class Heli_Attack_01_base_F: Helicopter_Base_F {
maxFov = 0.029;
gunnerOpticsColor[] = {0,0,0,1};
directionStabilized = 1;
horizontallyStabilized = 1;
horizontallyStabilized = 1;
gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_narrow_F";

};
Expand All @@ -941,7 +941,7 @@ class Heli_Attack_01_base_F: Helicopter_Base_F {
maxFov = 0.01;
gunnerOpticsColor[] = {0,0,0,1};
directionStabilized = 1;
horizontallyStabilized = 1;
horizontallyStabilized = 1;
gunnerOpticsModel = "\A3\Weapons_F_Beta\Reticle\Heli_Attack_01_Optics_Gunner_narrow_F";

};
Expand Down
4 changes: 2 additions & 2 deletions addons/captives/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<Portuguese>Algema Plástica</Portuguese>
<Italian>Fascietta</Italian>
<Hungarian>Gyorskötöző</Hungarian>
<Russian>Пластиковые наручники</Russian>
<Russian>Кабельная стяжка</Russian>
</Key>
<Key ID="STR_ACE_Captives_CableTieDescription">
<English>Cable ties that allow you to restrain prisoners.</English>
Expand All @@ -107,7 +107,7 @@
<Portuguese>A algema plástica permite que você contenha prisioneiros.</Portuguese>
<Italian>Fascietta che ti consente di arrestare i prigionieri.</Italian>
<Hungarian>Gyorskötöző, emberek foglyulejtéséhez használható.</Hungarian>
<Russian>Пластиковые наручники позволяют связывать пленников.</Russian>
<Russian>Кабельные стяжки позволяют связывать пленников.</Russian>
</Key>
<Key ID="STR_ACE_Captives_FriskMenuHeader">
<English>Inventory of frisked person</English>
Expand Down
33 changes: 19 additions & 14 deletions addons/common/ProgressScreen.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class GVAR(ProgressBar_Dialog) {
idd = -1;
movingEnable = false;
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBar)),(_this select 0) displayCtrl 1)]; uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBarTitle)),(_this select 0) displayCtrl 2)];);
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBG)),(_this select 0) displayCtrl 1)]; uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBar)),(_this select 0) displayCtrl 2)]; uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBarTitle)),(_this select 0) displayCtrl 3)];);
objects[] = {};

class controlsBackground {
Expand All @@ -23,26 +23,31 @@ class GVAR(ProgressBar_Dialog) {
w = "safezoneW";
h = "safezoneH";
};
class Progress: ACE_gui_RscProgress {
class TitleBackground: ACE_gui_staticBase {
idc = 1;
x = "1.2 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "0.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "37.8 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = ".8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
colorFrame[] = {0,0,0,0.0};
colorBar[] = {0.27,0.5,0.31,0.8};
texture = "#(argb,8,8,3)color(1,1,1,0.7)";
};
class Title_Bar : ACE_gui_staticBase {
idc = 2;
style = 0x22;
colorBackground[] = {0, 0, 0, 0};
style = ST_CENTER;
sizeEx = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
colorBackground[] = {0, 0, 0, 0.5};
colorText[] = {1, 1, 1, 1};
x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "0 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
class Progress: ACE_gui_RscProgress {
idc = 2;
x = "1.2 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "0.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
colorFrame[] = {1,1,1,0.5};
colorBar[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.77])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.51])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.08])","(profilenamespace getvariable ['GUI_BCG_RGB_A',0.8])"};
texture = "#(argb,8,8,3)color(1,1,1,0.7)";
};
class TitleText: TitleBackground {
idc = 3;
colorBackground[] = {0, 0, 0, 0};
};
};
};

Expand Down
10 changes: 6 additions & 4 deletions addons/common/functions/fnc_progressBar.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@ createDialog QGVAR(ProgressBar_Dialog);
//Adjust position based on user setting:
_ctrlPos = ctrlPosition (uiNamespace getVariable QGVAR(ctrlProgressBarTitle));
_ctrlPos set [1, ((0 + 29 * GVAR(SettingProgressBarLocation)) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))];
(uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlSetPosition _ctrlPos;
(uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlCommit 0;
_ctrlPos = ctrlPosition (uiNamespace getVariable QGVAR(ctrlProgressBar));
_ctrlPos set [1, ((0.1 + 29 * GVAR(SettingProgressBarLocation)) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))];

(uiNamespace getVariable QGVAR(ctrlProgressBG)) ctrlSetPosition _ctrlPos;
(uiNamespace getVariable QGVAR(ctrlProgressBG)) ctrlCommit 0;
(uiNamespace getVariable QGVAR(ctrlProgressBar)) ctrlSetPosition _ctrlPos;
(uiNamespace getVariable QGVAR(ctrlProgressBar)) ctrlCommit 0;
(uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlSetPosition _ctrlPos;
(uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlCommit 0;



_perFrameFunction = {
Expand Down
26 changes: 5 additions & 21 deletions addons/disposable/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,44 +1,28 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};

class Extended_PostInit_EventHandlers {
class ADDON {
clientInit = QUOTE( call COMPILE_FILE(XEH_postInitClient) );
init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};

class Extended_FiredBIS_EventHandlers {
class CAManBase {
class ADDON {
firedBIS = QUOTE( _this call FUNC(replaceATWeapon) );
firedBIS = QUOTE(_this call FUNC(replaceATWeapon));
};
};
};

// handle preloaded missile
class Extended_Init_EventHandlers {
class Extended_InitPost_EventHandlers {
class CAManBase {
class ADDON {
init = QUOTE( _this call FUNC(takeLoadedATWeapon) );
};
};
};

class Extended_Take_EventHandlers {
class CAManBase {
class ADDON {
take = QUOTE( _this call FUNC(takeLoadedATWeapon); [_this select 0] call FUNC(updateInventoryDisplay); );
};
};
};

class Extended_Put_EventHandlers {
class CAManBase {
class ADDON {
put = QUOTE( [_this select 0] call FUNC(updateInventoryDisplay); );
init = QUOTE([ARR_2(_this select 0, secondaryWeapon (_this select 0))] call FUNC(takeLoadedATWeapon); systemChat str [ARR_2(_this select 0, secondaryWeapon (_this select 0))]);
};
};
};
1 change: 1 addition & 0 deletions addons/disposable/CfgMagazines.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ class CfgMagazines {
class ACE_PreloadedMissileDummy: NLAW_F { // The dummy magazine
author = "$STR_ACE_Common_ACETeam";
scope = 1;
scopeArsenal = 1;
displayName = "$STR_ACE_Disposable_PreloadedMissileDummy";
picture = PATHTOEF(common,UI\blank_CO.paa);
weaponPoolAvailable = 0;
Expand Down
10 changes: 10 additions & 0 deletions addons/disposable/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// by commy2
#include "script_component.hpp"

if (!hasInterface) exitWith {};

["inventoryDisplayLoaded", {[ACE_player, _this select 0] call FUNC(updateInventoryDisplay)}] call EFUNC(common,addEventHandler);
["playerInventoryChanged", {
[_this select 0, _this select 1 select 11] call FUNC(takeLoadedATWeapon);
[_this select 0] call FUNC(updateInventoryDisplay);
}] call EFUNC(common,addEventHandler);
10 changes: 0 additions & 10 deletions addons/disposable/XEH_postInitClient.sqf

This file was deleted.

1 change: 0 additions & 1 deletion addons/logistics_wirecutter/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
Expand Down
12 changes: 0 additions & 12 deletions addons/logistics_wirecutter/CfgSounds.hpp

This file was deleted.

8 changes: 8 additions & 0 deletions addons/logistics_wirecutter/CfgVehicles.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class CfgVehicles {
class Box_NATO_Support_F;
class ACE_Box_Misc: Box_NATO_Support_F {
class TransportItems {
MACRO_ADDITEM(ACE_wirecutter,4);
};
};
};
24 changes: 12 additions & 12 deletions addons/logistics_wirecutter/CfgWeapons.hpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
class CfgWeapons {
class InventoryItem_Base_F;
class ACE_ItemCore;
class InventoryItem_Base_F;
class ACE_ItemCore;

class ACE_wirecutter: ACE_ItemCore {
author = "$STR_ACE_Common_ACETeam";
displayName = "$STR_ACE_logistics_wirecutter_wirecutterName";
descriptionShort = "$STR_ACE_logistics_wirecutter_wirecutterDescription";
model = "\A3\weapons_F\ammo\mag_univ.p3d";
picture = QUOTE(PATHTOF(ui\item_wirecutter_ca.paa));
scope = 2;
class ItemInfo: InventoryItem_Base_F {
mass = 100;
class ACE_wirecutter: ACE_ItemCore {
author = "$STR_ACE_Common_ACETeam";
displayName = "$STR_ACE_logistics_wirecutter_wirecutterName";
descriptionShort = "$STR_ACE_logistics_wirecutter_wirecutterDescription";
model = "\A3\weapons_F\ammo\mag_univ.p3d";
picture = QUOTE(PATHTOF(ui\item_wirecutter_ca.paa));
scope = 2;
class ItemInfo: InventoryItem_Base_F {
mass = 100;
};
};
};
};
4 changes: 2 additions & 2 deletions addons/logistics_wirecutter/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class CfgPatches {
class ADDON {
units[] = {};
weapons[] = {};
weapons[] = {"ACE_wirecutter"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
author[] = {"gpgpgpgp", "PabstMirror"};
Expand All @@ -13,5 +13,5 @@ class CfgPatches {
};

#include "CfgEventHandlers.hpp"
#include "CfgSounds.hpp"
#include "CfgWeapons.hpp"
#include "CfgVehicles.hpp"
19 changes: 13 additions & 6 deletions addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,26 @@
*/
#include "script_component.hpp"

#define SOUND_CLIP_TIME_SPACEING 1.5
private ["_timeToCut"];

PARAMS_2(_unit,_fenceObject);
if (_unit != ACE_player) exitWith {};

_timeToCut = if ([ACE_player] call EFUNC(common,isEngineer)) then {5} else {10};
_timeToCut = if ([ACE_player] call EFUNC(common,isEngineer)) then {7.5} else {11};

[ACE_player, "AinvPknlMstpSnonWnonDr_medic5", 0] call EFUNC(common,doAnimation);

if (_timeToCut > 5) then {
playSound "ACE_wirecutter_sound_long";
} else {
playSound "ACE_wirecutter_sound";
_progressCheck = {
PARAMS_2(_args,_passedTime);
EXPLODE_2_PVT(_args,_fenceObject,_lastSoundEffectTime);
if (_passedTime > (_lastSoundEffectTime + SOUND_CLIP_TIME_SPACEING)) then {
// playSound "ACE_wirecutter_sound";
playSound3D [QUOTE(PATHTO_R(sound\wirecut.ogg)), objNull, false, (getPosASL ACE_player), 3, 1, 10];
_args set [1, _passedTime];
};

((!isNull _fenceObject) && {(damage _fenceObject) < 1} && {("ACE_wirecutter" in (items ACE_player))})
};

[_timeToCut, [_fenceObject], {(_this select 0) call FUNC(cutDownFenceCallback)}, {(_this select 0) call FUNC(cutDownFenceAbort)}, localize "STR_ACE_logistics_wirecutter_CuttingFence"] call EFUNC(common,progressBar);
[_timeToCut, [_fenceObject,0], {(_this select 0) call FUNC(cutDownFenceCallback)}, {(_this select 0) call FUNC(cutDownFenceAbort)}, localize "STR_ACE_logistics_wirecutter_CuttingFence", _progressCheck] call EFUNC(common,progressBar);
6 changes: 3 additions & 3 deletions addons/logistics_wirecutter/functions/fnc_getNearestFence.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ PARAMS_1(_unit);

_nearestFence = objNull;
{
if ((isNull _nearestFence) && {[_x] call FUNC(isFence)}) then {
_nearestFence = _x;
};
if ((isNull _nearestFence) && {[_x] call FUNC(isFence)}) then {
_nearestFence = _x;
};
} forEach nearestObjects [_unit, [], 15];

_nearestFence
2 changes: 1 addition & 1 deletion addons/logistics_wirecutter/functions/fnc_interactEH.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if (!("ACE_wirecutter" in (items ace_player))) exitWith {};
} else {
// Prevent Rare Error when ending mission with interact key down:
if (isNull ace_player) exitWith {};

//If player moved >5 meters from last pos, then rescan
if (((getPosASL ace_player) distance _setPosition) > 5) then {

Expand Down
13 changes: 6 additions & 7 deletions addons/logistics_wirecutter/functions/fnc_isFence.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@
#include "script_component.hpp"

//find is case sensitive, so keep everything lowercase
#define FENCE_A3_TYPENAMES ["land_net_fence_4m_f", "land_net_fence_8m_f", "land_net_fenced_8m_f", "land_new_wiredfence_5m_f", "land_new_wiredfence_10m_dam_f", "land_new_wiredfence_10m_f", "land_pipe_fence_4m_f", "land_pipe_fence_4mnolc_f", "land_sportground_fence_f", "land_wired_fence_4m_f", "land_wired_fence_4md_f", "land_wired_fence_8m_f", "land_wired_fence_8md_f", "land_razorwire_f"]
#define FENCE_A3_P3DS ["mil_wiredfence_f.p3d"]
#define FENCE_TYPENAMES ["land_net_fence_4m_f", "land_net_fence_8m_f", "land_net_fenced_8m_f", "land_new_wiredfence_5m_f", "land_new_wiredfence_10m_dam_f", "land_new_wiredfence_10m_f", "land_pipe_fence_4m_f", "land_pipe_fence_4mnolc_f", "land_sportground_fence_f", "land_wired_fence_4m_f", "land_wired_fence_4md_f", "land_wired_fence_8m_f", "land_wired_fence_8md_f", "land_razorwire_f"]

#define FENCE_AIA_TYPENAMES []
#define FENCE_AIA_P3DS ["wall_indfnc_3.p3d", "wall_indfnc_9.p3d", "wall_indfnc_corner.p3d", "pletivo_wired.p3d", "wall_fen1_5.p3d"]
#define FENCE_P3DS ["mil_wiredfence_f.p3d","wall_indfnc_3.p3d", "wall_indfnc_9.p3d", "wall_indfnc_corner.p3d", "pletivo_wired.p3d", "wall_fen1_5.p3d"]

private ["_typeOf", "_returnValue"];
PARAMS_1(_object);
Expand All @@ -30,14 +28,15 @@ _typeOf = toLower (typeOf _object);
_returnValue = false;

if (_typeOf != "") then {
_returnValue = _typeOf in (FENCE_A3_TYPENAMES + FENCE_AIA_TYPENAMES);
//If the fence has configEntry we can check it directly
_returnValue = _typeOf in FENCE_TYPENAMES;
} else {
_typeOf = toLower (str _object); //something like "123201: wall_indfnc_9.p3d"
{
if ((_typeOf find _x) != -1) then {
if ((_typeOf find _x) != -1) exitWith {
_returnValue = true;
};
} forEach (FENCE_A3_P3DS + FENCE_AIA_P3DS);
} forEach FENCE_P3DS;
};

_returnValue
Loading

0 comments on commit 61d0234

Please sign in to comment.