Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ported the ACE2 Concertina Wire #1504

Merged
merged 5 commits into from
Jun 12, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions addons/apl/data/Jezek_kov.rvmat
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
ambient[]={1.000000,1.000000,1.000000,1.000000};
diffuse[]={1.000000,1.000000,1.000000,1.000000};
forcedDiffuse[]={0.000000,0.000000,0.000000,0.000000};
emmisive[]={0.000000,0.000000,0.000000,1.000000};
specular[]={1.000000,1.000000,1.000000,1.000000};
specularPower=83.900002;
PixelShaderID="Super";
VertexShaderID="Super";
class Stage1 {
texture="z\ace\addons\apl\data\jezek_texture_NOHQ.tga";
uvSource="tex";
class uvTransform {
aside[]={1.000000,0.000000,0.000000};
up[]={0.000000,1.000000,0.000000};
dir[]={0.000000,0.000000,0.000000};
pos[]={0.000000,0.000000,0.000000};
};
};
class Stage2 {
texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)";
uvSource="tex";
class uvTransform {
aside[]={1.000000,0.000000,0.000000};
up[]={0.000000,1.000000,0.000000};
dir[]={0.000000,0.000000,0.000000};
pos[]={0.000000,0.000000,0.000000};
};
};
class Stage3 {
texture="#(argb,8,8,3)color(0,0,0,0,MC)";
uvSource="tex";
class uvTransform {
aside[]={1.000000,0.000000,0.000000};
up[]={0.000000,1.000000,0.000000};
dir[]={0.000000,0.000000,0.000000};
pos[]={0.000000,0.000000,0.000000};
};
};
class Stage4 {
texture="#(argb,8,8,3)color(1,1,1,1,AS)";
uvSource="tex";
class uvTransform
{
aside[]={1.000000,0.000000,0.000000};
up[]={0.000000,1.000000,0.000000};
dir[]={0.000000,0.000000,0.000000};
pos[]={0.000000,0.000000,0.000000};
};
};
class Stage5 {
texture="z\ace\addons\apl\data\jezek_texture_SMDI.tga";
uvSource="tex";
class uvTransform {
aside[]={1.000000,0.000000,0.000000};
up[]={0.000000,1.000000,0.000000};
dir[]={0.000000,0.000000,0.000000};
pos[]={0.000000,0.000000,0.000000};
};
};
class Stage6 {
texture="#(ai,32,128,1)fresnel(1.85,0.64)";
uvSource="tex";
class uvTransform {
aside[]={1.000000,0.000000,0.000000};
up[]={0.000000,1.000000,0.000000};
dir[]={0.000000,0.000000,0.000000};
pos[]={0.000000,0.000000,0.000000};
};
};
class Stage7 {
texture="a3\data_f\env_land_co.paa";
uvSource="tex";
class uvTransform {
aside[]={1.000000,0.000000,0.000000};
up[]={0.000000,1.000000,0.000000};
dir[]={0.000000,0.000000,0.000000};
pos[]={0.000000,0.000000,0.000000};
};
};
Binary file added addons/apl/data/barbwire_a_co.paa
Binary file not shown.
Binary file added addons/apl/data/barbwire_a_nohq.paa
Binary file not shown.
78 changes: 78 additions & 0 deletions addons/apl/data/barbwire_a_ns.rvmat
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
ambient[]={1.000000,1.000000,1.000000,1.000000};
diffuse[]={1.000000,1.000000,1.000000,1.000000};
forcedDiffuse[]={0.000000,0.000000,0.000000,0.000000};
emmisive[]={0.000000,0.000000,0.000000,1.000000};
specular[]={1.000000,1.000000,1.000000,0.000000};
specularPower=16.000000;
PixelShaderID="Super";
VertexShaderID="Super";
class Stage1 {
texture="z\ace\addons\apl\data\BarbWire_A_NOHQ.tga";
uvSource="tex";
class uvTransform {
aside[]={1.000000,0.000000,0.000000};
up[]={0.000000,1.000000,0.000000};
dir[]={0.000000,0.000000,0.000000};
pos[]={0.000000,0.000000,0.000000};
};
};
class Stage2 {
texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)";
uvSource="tex";
class uvTransform {
aside[]={1.000000,0.000000,0.000000};
up[]={0.000000,1.000000,0.000000};
dir[]={0.000000,0.000000,0.000000};
pos[]={0.000000,0.000000,0.000000};
};
};
class Stage3 {
texture="#(argb,8,8,3)color(0,0,0,0,MC)";
uvSource="tex";
class uvTransform {
aside[]={1.000000,0.000000,0.000000};
up[]={0.000000,1.000000,0.000000};
dir[]={0.000000,0.000000,0.000000};
pos[]={0.000000,0.000000,0.000000};
};
};
class Stage4 {
texture="#(argb,8,8,3)color(1,1,1,1,AS)";
uvSource="tex";
class uvTransform {
aside[]={1.000000,0.000000,0.000000};
up[]={0.000000,1.000000,0.000000};
dir[]={0.000000,0.000000,0.000000};
pos[]={0.000000,0.000000,0.000000};
};
};
class Stage5 {
texture="#(argb,8,8,3)color(0,0,1,1,SMDI)";
uvSource="tex";
class uvTransform {
aside[]={1.000000,0.000000,0.000000};
up[]={0.000000,1.000000,0.000000};
dir[]={0.000000,0.000000,0.000000};
pos[]={0.000000,0.000000,0.000000};
};
};
class Stage6 {
texture="#(ai,32,128,1)fresnel(0.01,0.01)";
uvSource="tex";
class uvTransform {
aside[]={1.000000,0.000000,0.000000};
up[]={0.000000,1.000000,0.000000};
dir[]={0.000000,0.000000,0.000000};
pos[]={0.000000,0.000000,0.000000};
};
};
class Stage7 {
texture="#(argb,8,8,3)color(0,0,0,1,CO)";
uvSource="tex";
class uvTransform {
aside[]={1.000000,0.000000,0.000000};
up[]={0.000000,1.000000,0.000000};
dir[]={0.000000,0.000000,0.000000};
pos[]={0.000000,0.000000,0.000000};
};
};
Binary file added addons/apl/data/jezek_texture_co.paa
Binary file not shown.
Binary file added addons/apl/data/jezek_texture_nohq.paa
Binary file not shown.
Binary file added addons/apl/data/jezek_texture_smdi.paa
Binary file not shown.
1 change: 1 addition & 0 deletions addons/concertina_wire/$PBOPREFIX$
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
z\ace\addons\concertina_wire
44 changes: 44 additions & 0 deletions addons/concertina_wire/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
};
};

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

class Extended_Killed_EventHandlers {
// TODO: Probably needs handledamage eh for better tracking what killed the wire
// Also disallow wire becoming destroyed by small explosives e.g. 40mm
class ACE_ConcertinaWire {
class ADDON {
killed = QUOTE(call FUNC(handleKilled));
};
};
class Land_Razorwire_F {
class ADDON {
killed = QUOTE(call FUNC(handleKilled));
};
};
};

class Extended_Init_EventHandlers {
class ACE_ConcertinaWireCoil {
class ADDON {
init = QUOTE(_this call DEFUNC(dragging,initObject));
};
};
class ACE_ConcertinaWire {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_init));
};
};
class Land_Razorwire_F {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_init));
};
};
};
139 changes: 139 additions & 0 deletions addons/concertina_wire/CfgVehicles.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@

class CfgVehicles {
class Fence;
class thingX;
class NonStrategic;

class ACE_ConcertinaWireNoGeo: Fence {
XEH_ENABLED;
scope = 1;
displayName = "";
model = PATHTOF(data\ACE_ConcertinaWireNoGeo.p3d);
destrType = "DestructTent";
accuracy = 0.3;
mapSize = 2.8;
animated = 1;
autocenter = 0;
armor = 200;
class AnimationSources {
class fix1 {
source = "user";
animPeriod = 1e-007;
initPhase = 0;
};
class fix2: fix1 {};
class fix3: fix1 {};
class fix4: fix1 {};
class rotate {
source = "user";
animPeriod = 1e-007;
};
class wire_2 {
source = "user";
animPeriod = 1e-007;
};
class wire_3: wire_2{};
class wire_4: wire_2{};
class wire_5: wire_2{};
class wire_6: wire_2{};
class wire_7: wire_2{};
class wire_8: wire_2{};
class wire_9: wire_2{};
class wire_10: wire_2{};
class wire_11: wire_2{};
class wire_12: wire_2{};
class wire_13: wire_2{};
class wire_14: wire_2{};
class wire_15: wire_2{};
class wire_16: wire_2{};
class wire_17: wire_2{};
class wire_18: wire_2{};

class wire_2_1: wire_2 {
animPeriod = 8;
};
class wire_3_1: wire_2_1 {};
class wire_4_1: wire_2_1 {};
class wire_5_1: wire_2_1 {};
class wire_6_1: wire_2_1 {};
class wire_7_1: wire_2_1 {};
class wire_8_1: wire_2_1 {};
class wire_9_1: wire_2_1 {};
class wire_10_1: wire_2_1 {};
class wire_11_1: wire_2_1 {};
class wire_12_1: wire_2_1 {};
class wire_13_1: wire_2_1 {};
class wire_14_1: wire_2_1 {};
class wire_15_1: wire_2_1 {};
class wire_16_1: wire_2_1 {};
class wire_17_1: wire_2_1 {};
class wire_18_1: wire_2_1 {};
};
};
class ACE_ConcertinaWire: ACE_ConcertinaWireNoGeo {
scope = 2;
displayName = $STR_ACE_CONCERTINA_WIRE;
model = PATHTOF(data\ACE_ConcertinaWire.p3d);
class ACE_Actions {
class ACE_MainActions {
selection = "";
distance = 5;
condition = "true";
class ACE_Dismount {
selection = "";
displayName = "$STR_ACE_UNROLLWIRE";
distance = 5;
condition = "true";
statement = QUOTE([ARR_2(_target,_player)] call FUNC(dismount));
showDisabled = 0;
exceptions[] = {};
priority = 5;
icon = PATHTOF(UI\icon_sandbag_ca.paa);
};
};
};
};
class ACE_ConcertinaWireCoil: thingX {
XEH_ENABLED;
scope = 2;
displayName = $STR_ACE_CONCERTINA_WIRECOIL;
model = PATHTOF(data\ACE_ConcertinaWireCoil.p3d);
mapsize = 0.5;
animated = 0;
nameSound = "fence";
typicalCargo[] = {};
transportAmmo = 0;
transportRepair = 0;
transportFuel = 0;
cost = 0;
armor = 1000;
destrType = "DestructNo";
accuracy = 1000;
autocenter = 0;
EGVAR(dragging,canDrag) = 1;
EGVAR(dragging,dragPosition[]) = {0,0.5,0.5};
EGVAR(dragging,dragDirection) = 0;
class ACE_Actions {
class ACE_MainActions {
selection = "";
distance = 4;
condition = "true";
class ACE_Deploy {
selection = "";
displayName = "$STR_ACE_ROLLWIRE";
distance = 4;
condition = "true";
statement = QUOTE([ARR_2(_target,_player)] call FUNC(deploy));
showDisabled = 0;
exceptions[] = {};
priority = 5;
icon = PATHTOF(UI\icon_sandbag_ca.paa);
};
};
};
};

class Land_Razorwire_F: NonStrategic {
XEH_ENABLED;
};
};
10 changes: 10 additions & 0 deletions addons/concertina_wire/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ace_concertina_wire
===============

Adds concertina wire.

## Maintainers

The people responsible for merging changes to this component or answering potential questions.

- [Ruthberg] (http://github.com/Ulteq)
Binary file added addons/concertina_wire/UI/icon_sandbag_ca.paa
Binary file not shown.
4 changes: 4 additions & 0 deletions addons/concertina_wire/XEH_init.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#include "script_component.hpp"

PARAMS_1(_wire);
_wire addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}];
11 changes: 11 additions & 0 deletions addons/concertina_wire/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include "script_component.hpp"

GVAR(placer) = objNull;
GVAR(deployPFH) = -1;

// Deploy concertina wire if interact menu is opened
["interactMenuOpened", {
if (GVAR(deployPFH) != -1) then {
GVAR(placer) setVariable [QGVAR(wireDeployed), true];
};
}] call EFUNC(common,addEventHandler);
11 changes: 11 additions & 0 deletions addons/concertina_wire/XEH_preInit.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include "script_component.hpp"

ADDON = false;

PREP(deploy);
PREP(dismount);
PREP(dismountSuccess);
PREP(handleDamage);
PREP(handleKilled);

ADDON = true;
Loading