mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Ported the ACE2 sandbags
This commit is contained in:
parent
cf0b2c2a52
commit
d733527f71
1
addons/sandbag/$PBOPREFIX$
Normal file
1
addons/sandbag/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
z\ace\addons\sandbag
|
19
addons/sandbag/CfgEventHandlers.hpp
Normal file
19
addons/sandbag/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,19 @@
|
||||
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_Init_EventHandlers {
|
||||
class ACE_SandbagObject {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DEFUNC(dragging,initObject));
|
||||
};
|
||||
};
|
||||
};
|
84
addons/sandbag/CfgVehicles.hpp
Normal file
84
addons/sandbag/CfgVehicles.hpp
Normal file
@ -0,0 +1,84 @@
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
class ACE_Sandbags {
|
||||
displayName = $STR_ACE_AC_BUILD;
|
||||
condition = QUOTE(call FUNC(canDeploy));
|
||||
statement = QUOTE(call FUNC(deploy));
|
||||
exceptions[] = {"isNotSwimming", "isNotInside"};
|
||||
showDisabled = 1;
|
||||
priority = 4;
|
||||
icon = PATHTOF(UI\icon_sandbag_ca.paa);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Item_Base_F;
|
||||
class ACE_Item_Sandbag_empty: Item_Base_F {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
scope = 2;
|
||||
scopeCurator = 2;
|
||||
displayName = "$STR_ACE_M_SBEMPTY";
|
||||
vehicleClass = "Items";
|
||||
class TransportItems {
|
||||
class ACE_Sandbag_empty {
|
||||
name = "ACE_Sandbag_empty";
|
||||
count = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
/*
|
||||
class ACE_Item_Sandbag: Item_Base_F {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
scope = 2;
|
||||
scopeCurator = 2;
|
||||
displayName = "$STR_ACE_Sandbag";
|
||||
vehicleClass = "Items";
|
||||
class TransportItems {
|
||||
class ACE_Sandbag {
|
||||
name = "ACE_Sandbag";
|
||||
count = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
*/
|
||||
class thingX;
|
||||
class ACE_SandbagObject: thingX {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
XEH_ENABLED;
|
||||
scope = 1;
|
||||
side = -1;
|
||||
model = PATHTOF(data\ace_sandbag_build.p3d);
|
||||
icon = "";
|
||||
displayName = $STR_ACE_Sandbag;
|
||||
EGVAR(dragging,canDrag) = 1;
|
||||
EGVAR(dragging,dragPosition[]) = {0,0.8,0};
|
||||
EGVAR(dragging,dragDirection) = 0;
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
selection = "";
|
||||
distance = 5;
|
||||
condition = "true";
|
||||
class ACE_PickUp {
|
||||
selection = "";
|
||||
displayName = "$STR_ACE_AC_PICKUPSB";
|
||||
distance = 4;
|
||||
condition = QUOTE(!(_player getVariable [ARR_2('ace_sandbag_usingSandbag',false)]));
|
||||
statement = QUOTE([ARR_2(_target,_player)] call FUNC(pickup));
|
||||
showDisabled = 0;
|
||||
exceptions[] = {};
|
||||
priority = 5;
|
||||
icon = PATHTOF(UI\icon_sandbag_ca.paa);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Box_NATO_Support_F;
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_Sandbag_empty,50);
|
||||
};
|
||||
};
|
||||
};
|
30
addons/sandbag/CfgWeapons.hpp
Normal file
30
addons/sandbag/CfgWeapons.hpp
Normal file
@ -0,0 +1,30 @@
|
||||
|
||||
class CfgWeapons {
|
||||
class ACE_ItemCore;
|
||||
class InventoryItem_Base_F;
|
||||
|
||||
class ACE_Sandbag_empty: ACE_ItemCore {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
scope = 2;
|
||||
displayName = "$STR_ACE_M_SBEMPTY";
|
||||
model = PATHTOF(data\ace_sandbag_m.p3d);
|
||||
picture = PATHTOF(data\m_sandbag_ca.paa);
|
||||
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 8;
|
||||
};
|
||||
};
|
||||
/*
|
||||
class ACE_Sandbag: ACE_ItemCore {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
scope = 2;
|
||||
displayName = "$STR_ACE_Sandbag";
|
||||
model = PATHTOF(data\ace_sandbag_build.p3d);
|
||||
picture = PATHTOF(data\m_sandbag_ca.paa);
|
||||
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 160;
|
||||
};
|
||||
};
|
||||
*/
|
||||
};
|
10
addons/sandbag/README.md
Normal file
10
addons/sandbag/README.md
Normal file
@ -0,0 +1,10 @@
|
||||
ace_sandbag
|
||||
===============
|
||||
|
||||
Stackable sandbags.
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [Ruthberg] (http://github.com/Ulteq)
|
BIN
addons/sandbag/UI/icon_sandbag_ca.paa
Normal file
BIN
addons/sandbag/UI/icon_sandbag_ca.paa
Normal file
Binary file not shown.
8
addons/sandbag/XEH_postInit.sqf
Normal file
8
addons/sandbag/XEH_postInit.sqf
Normal file
@ -0,0 +1,8 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
GVAR(placer) = objNull;
|
||||
GVAR(sandBag) = objNull;
|
||||
GVAR(deployPFH) = -1;
|
||||
GVAR(deployDirection) = 0;
|
||||
|
||||
[{_this call DFUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler);
|
12
addons/sandbag/XEH_preInit.sqf
Normal file
12
addons/sandbag/XEH_preInit.sqf
Normal file
@ -0,0 +1,12 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP(canDeploy);
|
||||
PREP(deploy);
|
||||
PREP(deployCancle);
|
||||
PREP(deployConfirm);
|
||||
PREP(handleScrollWheel);
|
||||
PREP(pickup);
|
||||
|
||||
ADDON = true;
|
16
addons/sandbag/config.cpp
Normal file
16
addons/sandbag/config.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {"ACE_Item_Sandbag", "ACE_Item_Sandbag_empty"};
|
||||
weapons[] = {"ACE_Sandbag", "ACE_Sandbag_empty"};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_interaction"};
|
||||
author[] = {"Rocko", "Ruthberg"};
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWeapons.hpp"
|
BIN
addons/sandbag/data/ace_sandbag_build.p3d
Normal file
BIN
addons/sandbag/data/ace_sandbag_build.p3d
Normal file
Binary file not shown.
BIN
addons/sandbag/data/ace_sandbag_m.p3d
Normal file
BIN
addons/sandbag/data/ace_sandbag_m.p3d
Normal file
Binary file not shown.
BIN
addons/sandbag/data/ace_sandbag_nogeo.p3d
Normal file
BIN
addons/sandbag/data/ace_sandbag_nogeo.p3d
Normal file
Binary file not shown.
132
addons/sandbag/data/bag.rvmat
Normal file
132
addons/sandbag/data/bag.rvmat
Normal file
@ -0,0 +1,132 @@
|
||||
/*
|
||||
ambient[]={0.992157,0.992157,0.992157,1.000000};
|
||||
diffuse[]={0.992157,0.992157,0.992157,1.000000};
|
||||
forcedDiffuse[]={0.000000,0.000000,0.000000,0.000000};
|
||||
emmisive[]={0.000000,0.000000,0.000000,1.000000};
|
||||
specular[]={0.000000,0.000000,0.000000,1.000000};
|
||||
specularPower=40.000000;
|
||||
*/
|
||||
|
||||
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[]={0.250000,0.250000,0.250000,0.250000};
|
||||
specularPower=30.000000;
|
||||
PixelShaderID="NormalMapSpecularDIMap";
|
||||
VertexShaderID="NormalMap";
|
||||
class Stage1 {
|
||||
texture="z\ace\addons\sandbag\data\bag_nohq.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};
|
||||
};
|
||||
};
|
||||
class Stage2 {
|
||||
texture="z\ace\addons\sandbag\data\bag_smdi.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};
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
ambient[]={1.0, 1.0, 1.0, 1.0};
|
||||
diffuse[]={1.0, 1.0, 1.0, 1.0};
|
||||
forcedDiffuse[]={0.0, 0.0, 0.0, 0.0};
|
||||
emmisive[]={0.0, 0.0, 0.0, 0.0};
|
||||
specular[]={0.93, 0.93, 0.93, 0.0};
|
||||
specularPower=400.0;
|
||||
PixelShaderID="Super";
|
||||
VertexShaderID="Super";
|
||||
|
||||
class Stage1 {
|
||||
texture="z\ace\addons\sandbag\data\bag_nohq.paa";
|
||||
uvSource="tex";
|
||||
|
||||
class uvTransform {
|
||||
aside[]={1.0, 0.0, 0.0};
|
||||
up[]={0.0, 1.0, 0.0};
|
||||
dir[]={0.0, 0.0, 0.0};
|
||||
pos[]={0.0, 0.0, 0.0};
|
||||
};
|
||||
};
|
||||
|
||||
class Stage2 {
|
||||
texture="a3\weapons_f\data\detailmaps\metal_detail_dt.paa";
|
||||
uvSource="tex";
|
||||
|
||||
class uvTransform {
|
||||
aside[]={6.0, 0.0, 0.0};
|
||||
up[]={0.0, 3.0, 0.0};
|
||||
dir[]={0.0, 0.0, 0.0};
|
||||
pos[]={0.0, 0.0, 0.0};
|
||||
};
|
||||
};
|
||||
|
||||
class Stage3 {
|
||||
texture="#(argb,8,8,3)color(0,0,0,0,MC)";
|
||||
uvSource="tex";
|
||||
|
||||
class uvTransform {
|
||||
aside[]={1.0, 0.0, 0.0};
|
||||
up[]={0.0, 1.0, 0.0};
|
||||
dir[]={0.0, 0.0, 0.0};
|
||||
pos[]={0.0, 0.0, 0.0};
|
||||
};
|
||||
};
|
||||
|
||||
class Stage4 {
|
||||
texture="#(argb,8,8,3)color(0.8,0,0,1,AS)";
|
||||
uvSource="tex";
|
||||
|
||||
class uvTransform {
|
||||
aside[]={1.0, 0.0, 0.0};
|
||||
up[]={0.0, 1.0, 0.0};
|
||||
dir[]={0.0, 0.0, 0.0};
|
||||
pos[]={0.0, 0.0, 0.0};
|
||||
};
|
||||
};
|
||||
|
||||
class Stage5 {
|
||||
texture="z\ace\addons\sandbag\data\bag_smdi.paa";
|
||||
uvSource="tex";
|
||||
|
||||
class uvTransform {
|
||||
aside[]={1.0, 0.0, 0.0};
|
||||
up[]={0.0, 1.0, 0.0};
|
||||
dir[]={0.0, 0.0, 0.0};
|
||||
pos[]={0.0, 0.0, 0.0};
|
||||
};
|
||||
};
|
||||
|
||||
class Stage6 {
|
||||
texture="#(ai,64,64,1)fresnel(1.29,0.5)";
|
||||
uvSource="tex";
|
||||
|
||||
class uvTransform {
|
||||
aside[]={1.0, 0.0, 0.0};
|
||||
up[]={0.0, 1.0, 0.0};
|
||||
dir[]={0.0, 0.0, 0.0};
|
||||
pos[]={0.0, 0.0, 0.0};
|
||||
};
|
||||
};
|
||||
|
||||
class Stage7 {
|
||||
texture="a3\data_f\env_land_co.paa";
|
||||
uvSource="tex";
|
||||
|
||||
class uvTransform {
|
||||
aside[]={1.0, 0.0, 0.0};
|
||||
up[]={0.0, 1.0, 0.0};
|
||||
dir[]={0.0, 0.0, 0.0};
|
||||
pos[]={0.0, 0.0, 0.0};
|
||||
};
|
||||
};
|
||||
*/
|
BIN
addons/sandbag/data/bag_co.paa
Normal file
BIN
addons/sandbag/data/bag_co.paa
Normal file
Binary file not shown.
48
addons/sandbag/data/bag_destruct.rvmat
Normal file
48
addons/sandbag/data/bag_destruct.rvmat
Normal file
@ -0,0 +1,48 @@
|
||||
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[]={0.250000,0.250000,0.250000,0.250000};
|
||||
specularPower=30.000000;
|
||||
PixelShaderID="NormalMapSpecularDIMap";
|
||||
VertexShaderID="NormalMap";
|
||||
class Stage1 {
|
||||
texture="z\ace\addons\sandbag\data\bag_nohq.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};
|
||||
};
|
||||
};
|
||||
class Stage2 {
|
||||
texture="ca\data\destruct\vehicle_destr1024_1024_mc.paa";
|
||||
uvSource="tex";
|
||||
class uvTransform {
|
||||
aside[]={1.000000,0.000000,0.000000};
|
||||
up[]={0.000000,1.000000,0.000000};
|
||||
dir[]={0.200000,0.000000,0.000000};
|
||||
pos[]={0.200000,0.000000,0.000000};
|
||||
};
|
||||
};
|
||||
class Stage3 {
|
||||
texture="#(argb,8,8,3)color(1,1,1,0.3)";
|
||||
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="ca\data\destruct\vehicle_destr1024_1024_smdi.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};
|
||||
};
|
||||
};
|
BIN
addons/sandbag/data/bag_nohq.paa
Normal file
BIN
addons/sandbag/data/bag_nohq.paa
Normal file
Binary file not shown.
BIN
addons/sandbag/data/bag_smdi.paa
Normal file
BIN
addons/sandbag/data/bag_smdi.paa
Normal file
Binary file not shown.
BIN
addons/sandbag/data/m_sandbag_ca.paa
Normal file
BIN
addons/sandbag/data/m_sandbag_ca.paa
Normal file
Binary file not shown.
18
addons/sandbag/functions/fnc_canDeploy.sqf
Normal file
18
addons/sandbag/functions/fnc_canDeploy.sqf
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
* Checks if the player can deploy a sandbag
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* can deploy? <BOOLEAN>
|
||||
*
|
||||
* Example:
|
||||
* call ace_sandbag_fnc_canDeploy;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
(([ACE_player, "ACE_Sandbag_empty"] call EFUNC(common,hasItem)) && !(ACE_player getVariable [QGVAR(usingSandbag), false]))
|
47
addons/sandbag/functions/fnc_deploy.sqf
Normal file
47
addons/sandbag/functions/fnc_deploy.sqf
Normal file
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Author: Garth 'L-H' de Wet, Ruthberg
|
||||
* Starts the deploy process for sandbags.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* call ace_sandbag_fnc_deploy;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
closeDialog 0;
|
||||
|
||||
GVAR(placer) = ACE_player;
|
||||
|
||||
[GVAR(placer), "ACE_Sandbag", true] call EFUNC(common,setForceWalkStatus);
|
||||
|
||||
GVAR(sandBag) = createVehicle ["ACE_SandbagObject", [0,0,0], [], 0, "NONE"];
|
||||
GVAR(sandBag) enableSimulationGlobal false;
|
||||
|
||||
GVAR(deployPFH) = [{
|
||||
if (GVAR(placer) != ACE_player) exitWith {
|
||||
call FUNC(deployCancle);
|
||||
};
|
||||
GVAR(sandBag) setPosASL ((eyePos ACE_player) vectorAdd (positionCameraToWorld [0,0,1] vectorDiff positionCameraToWorld [0,0,0]));
|
||||
GVAR(sandBag) setDir (GVAR(deployDirection) + getDir ACE_player);
|
||||
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
[localize "STR_ACE_AC_CONF", localize "STR_ACE_AC_CANCEL", localize "STR_ACE_Sandbag_ScrollAction"] call EFUNC(interaction,showMouseHint);
|
||||
|
||||
GVAR(placer) setVariable [QGVAR(Deploy),
|
||||
[GVAR(placer), "DefaultAction",
|
||||
{GVAR(deployPFH) != -1 && !isNull (GVAR(sandBag))},
|
||||
{call FUNC(deployConfirm);}
|
||||
] call EFUNC(common,AddActionEventHandler)];
|
||||
|
||||
GVAR(placer) setVariable [QGVAR(Cancel),
|
||||
[GVAR(placer), "zoomtemp",
|
||||
{GVAR(deployPFH) != -1 && !isNull (GVAR(sandBag))},
|
||||
{call FUNC(deployCancle);}
|
||||
] call EFUNC(common,AddActionEventHandler)];
|
34
addons/sandbag/functions/fnc_deployCancle.sqf
Normal file
34
addons/sandbag/functions/fnc_deployCancle.sqf
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Author: Garth 'L-H' de Wet, Ruthberg
|
||||
* Cancels sandbag deployment
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* call ace_sandbag_fnc_deployCancle;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (isNull GVAR(placer)) exitWith {};
|
||||
|
||||
[GVAR(deployPFH)] call cba_fnc_removePerFrameHandler;
|
||||
|
||||
if (!isNull (GVAR(sandBag))) then {
|
||||
deleteVehicle GVAR(sandBag);
|
||||
GVAR(sandBag) = objNull;
|
||||
};
|
||||
|
||||
[GVAR(placer), "ACE_Explosives", false] call EFUNC(Common,setForceWalkStatus);
|
||||
|
||||
GVAR(sandBag) = objNull;
|
||||
GVAR(placer) = objNull;
|
||||
|
||||
call EFUNC(interaction,hideMouseHint);
|
||||
[GVAR(placer), "DefaultAction", GVAR(placer) getVariable [QGVAR(Deploy), -1]] call EFUNC(Common,removeActionEventHandler);
|
||||
[GVAR(placer), "zoomtemp", GVAR(placer) getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler);
|
42
addons/sandbag/functions/fnc_deployConfirm.sqf
Normal file
42
addons/sandbag/functions/fnc_deployConfirm.sqf
Normal file
@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Author: Garth 'L-H' de Wet, Ruthberg
|
||||
* Confirms sandbag deployment
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* call ace_sandbag_fnc_deployConfirm;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (isNull GVAR(sandBag) || isNull GVAR(placer)) exitWith {};
|
||||
|
||||
[GVAR(deployPFH)] call cba_fnc_removePerFrameHandler;
|
||||
|
||||
[GVAR(placer), "ACE_Sandbag", false] call EFUNC(Common,setForceWalkStatus);
|
||||
[GVAR(placer), "DefaultAction", GVAR(placer) getVariable [QGVAR(Deploy), -1]] call EFUNC(Common,removeActionEventHandler);
|
||||
[GVAR(placer), "zoomtemp", GVAR(placer) getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler);
|
||||
|
||||
call EFUNC(interaction,hideMouseHint);
|
||||
|
||||
GVAR(placer) playActionNow "PutDown";
|
||||
|
||||
GVAR(placer) setVariable [QGVAR(usingSandbag), true];
|
||||
[{
|
||||
_this setVariable [QGVAR(usingSandbag), false];
|
||||
}, GVAR(placer), 1.5, 0.5] call EFUNC(common,waitAndExecute);
|
||||
|
||||
[{
|
||||
GVAR(sandBag) enableSimulationGlobal true;
|
||||
GVAR(placer) removeItem "ACE_Sandbag_empty";
|
||||
|
||||
GVAR(sandBag) = objNull;
|
||||
GVAR(placer) = objNull;
|
||||
|
||||
}, GVAR(placer), 1.0, 0.5] call EFUNC(common,waitAndExecute);
|
24
addons/sandbag/functions/fnc_handleScrollWheel.sqf
Normal file
24
addons/sandbag/functions/fnc_handleScrollWheel.sqf
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Author: Garth 'L-H' de Wet, Ruthberg
|
||||
* Handles sandbag rotation
|
||||
*
|
||||
* Arguments:
|
||||
* 0: scroll amount <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* handled <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* 1.2 call ace_sandbag_fnc_handleScrollWheel;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_scroll);
|
||||
|
||||
if (GETMVAR(ACE_Modifier,0) == 0 || GVAR(deployPFH) == -1) exitWith { false };
|
||||
|
||||
GVAR(deployDirection) = GVAR(deployDirection) + (_scroll * 5);
|
||||
|
||||
true
|
29
addons/sandbag/functions/fnc_pickup.sqf
Normal file
29
addons/sandbag/functions/fnc_pickup.sqf
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
* Pick up sandbag
|
||||
*
|
||||
* Arguments:
|
||||
* 0: sandbag <OBJECT>
|
||||
* 1: unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [_sandbag, _unit] call ace_sandbag_fnc_pickup;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_sandbag,_unit);
|
||||
|
||||
_unit playActionNow "PutDown";
|
||||
|
||||
_unit setVariable [QGVAR(usingSandbag), true];
|
||||
[{
|
||||
PARAMS_2(_sandbag,_unit);
|
||||
_unit setVariable [QGVAR(usingSandbag), false];
|
||||
deletevehicle _sandbag;
|
||||
[_unit, "ACE_Sandbag_empty"] call EFUNC(common,addToInventory);
|
||||
}, [_sandbag, _unit], 1.5, 0.5] call EFUNC(common,waitAndExecute);
|
1
addons/sandbag/functions/script_component.hpp
Normal file
1
addons/sandbag/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\sandbag\script_component.hpp"
|
12
addons/sandbag/script_component.hpp
Normal file
12
addons/sandbag/script_component.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
#define COMPONENT sandbag
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_SANDBAG
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_SANDBAG
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_SANDBAG
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
149
addons/sandbag/stringtable.xml
Normal file
149
addons/sandbag/stringtable.xml
Normal file
@ -0,0 +1,149 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project name="ACE">
|
||||
<Package name="sandbag">
|
||||
<Key ID="STR_ACE_Sandbag">
|
||||
<English>Sandbag</English>
|
||||
<German>Sandsack</German>
|
||||
<Russian>Мешок с песком</Russian>
|
||||
<Polish>Worek z piaskiem</Polish>
|
||||
<Spanish>Sandbag</Spanish>
|
||||
<French>Sac de sable</French>
|
||||
<Czech>Pytel s pískem</Czech>
|
||||
<Italian>Sacco di Sabbia</Italian>
|
||||
<Hungarian>Homokzsák</Hungarian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_M_SBEMPTY">
|
||||
<English>Sandbag (empty)</English>
|
||||
<German>Sandsack (leer)</German>
|
||||
<Russian>Мешок с песком (пустой)</Russian>
|
||||
<Polish>Worek na piasek</Polish>
|
||||
<Spanish>Sandbag (empty)</Spanish>
|
||||
<French>Sac de sable (vide)</French>
|
||||
<Czech>Pytel na písek (prázdný)</Czech>
|
||||
<Italian>Sacco di Sabbia (Vuoto)</Italian>
|
||||
<Hungarian>Homokzsák (üres)</Hungarian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_CANNOTSB">
|
||||
<English>Cannot build here</English>
|
||||
<German>Nicht möglich</German>
|
||||
<Russian>Установка на этом месте невозможна</Russian>
|
||||
<Polish>Nie można tu budować</Polish>
|
||||
<Spanish>Cannot build here</Spanish>
|
||||
<French>Impossible de construire ici</French>
|
||||
<Czech>Zde nelze postavit</Czech>
|
||||
<Italian>Impossibile costruire qui</Italian>
|
||||
<Hungarian>Nem teheted ide</Hungarian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AC_PICKUPSB">
|
||||
<English>Pick up sandbag</English>
|
||||
<German>Sandsack abbauen</German>
|
||||
<Russian>Взять мешок с песком</Russian>
|
||||
<Polish>Zabierz worek</Polish>
|
||||
<Spanish>Pick up sandbag</Spanish>
|
||||
<French>Prendre sac de sable</French>
|
||||
<Czech>Zvednout pytel</Czech>
|
||||
<Italian>Prendi Sacco di Sabbia</Italian>
|
||||
<Hungarian>Homokzsák felvétele</Hungarian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AC_CARRYSB">
|
||||
<English>Carry sandbag</English>
|
||||
<German>Sandsack tragen</German>
|
||||
<Russian>Нести мешок с песком</Russian>
|
||||
<Polish>Przenieś worek</Polish>
|
||||
<Spanish>Carry sandbag</Spanish>
|
||||
<French>Porter sac de sable</French>
|
||||
<Czech>Nést pytel</Czech>
|
||||
<Italian>Trasporta Sacco di Sabbia</Italian>
|
||||
<Hungarian>Homokzsák cipelése</Hungarian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AC_ENDCARRYSB">
|
||||
<English>End carrying</English>
|
||||
<German>Tragen beenden</German>
|
||||
<Russian>Завершить переноску</Russian>
|
||||
<Polish>Zostaw worek</Polish>
|
||||
<Spanish>End carrying</Spanish>
|
||||
<French>Arreter de porter</French>
|
||||
<Czech>Položit</Czech>
|
||||
<Italian>Fine Trasporto</Italian>
|
||||
<Hungarian>Cipelés abbahagyása</Hungarian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AC_DROP">
|
||||
<English>Drop sandbag</English>
|
||||
<German>Sandsack ablegen</German>
|
||||
<Russian>Положить мешок</Russian>
|
||||
<Polish>Upuść worek</Polish>
|
||||
<Spanish>Drop sandbag</Spanish>
|
||||
<French>Lacher sac de sable</French>
|
||||
<Czech>Odložit pytel</Czech>
|
||||
<Italian>Lascia Sacco di Sabbia</Italian>
|
||||
<Hungarian>Homokzsák eldobása</Hungarian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AC_CONF">
|
||||
<English>Confirm Deployment</English>
|
||||
<German>Aufbauen</German>
|
||||
<Russian>Подтвердить установку</Russian>
|
||||
<Polish>Potwierdź rozłożenie</Polish>
|
||||
<Spanish>Confirm Deployment</Spanish>
|
||||
<French>Confirmer Déploiement</French>
|
||||
<Czech>Potvrdit Položení</Czech>
|
||||
<Italian>Conferma Posizionamento</Italian>
|
||||
<Hungarian>Lerak</Hungarian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AC_CANCEL">
|
||||
<English>Cancel Deployment</English>
|
||||
<German>Abbrechen</German>
|
||||
<Russian>Отменить установку</Russian>
|
||||
<Polish>Anuluj rozłożenie</Polish>
|
||||
<Spanish>Cancel Deployment</Spanish>
|
||||
<French>Annuler Déploiement</French>
|
||||
<Czech>Zrušit Položení</Czech>
|
||||
<Italian>Cancella Posizionamento</Italian>
|
||||
<Hungarian>Visszavonás</Hungarian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_AC_BUILD">
|
||||
<English>Deploy sandbag</English>
|
||||
<German>Sandsack aufbauen</German>
|
||||
<Russian>Установить мешок с песком</Russian>
|
||||
<Polish>Rozłóż worek z piaskiem</Polish>
|
||||
<Spanish>Deploy sandbag</Spanish>
|
||||
<French>Deployer sac de sable</French>
|
||||
<Czech>Umístit pytel</Czech>
|
||||
<Italian>Posiziona Sacco di Sabbia</Italian>
|
||||
<Hungarian>Homokzsák lerakása</Hungarian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_V_SANDBOX">
|
||||
<English>Sandbag box</English>
|
||||
<German>Sandsack Kiste</German>
|
||||
<Russian>Ящик мешков с песком</Russian>
|
||||
<Polish>Skrzynia worków na piasek</Polish>
|
||||
<Spanish>Sandbag box</Spanish>
|
||||
<French>Caisse de sacs de sable</French>
|
||||
<Czech>Bedna na pytle s pískem</Czech>
|
||||
<Italian>Contenitore Sacchi di Sabbia</Italian>
|
||||
<Hungarian>Homokzsákos láda</Hungarian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_NOSAND">
|
||||
<English>Here is no sand</English>
|
||||
<German>Hier gibt es keinen Sand</German>
|
||||
<Russian>Здесь нет песка</Russian>
|
||||
<Polish>Tu nie ma piasku</Polish>
|
||||
<Spanish>Here is no sand</Spanish>
|
||||
<French>Pas de sable ici</French>
|
||||
<Czech>Tady není písek</Czech>
|
||||
<Italian>Qui non cè Sabbia</Italian>
|
||||
<Hungarian>Itt nincs homok</Hungarian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Sandbag_ScrollAction">
|
||||
<English>+ Modifier, rotates</English>
|
||||
<German>+ Modifikator, drehen</German>
|
||||
<Spanish>+ Modificador, girar</Spanish>
|
||||
<French>+ Modificateur, tourner</French>
|
||||
<Italian>+ Modificatore, rotazione</Italian>
|
||||
<Czech>+ Modifikátor, otočit</Czech>
|
||||
<Hungarian>+ Változtatás, forgatás</Hungarian>
|
||||
<Polish>+ Modyfikator, obrót</Polish>
|
||||
<Portuguese>+ Modificador, rotaciona</Portuguese>
|
||||
<Russian>+ Bращать</Russian>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user