mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Formating and Headers
This commit is contained in:
parent
8ceb2aabc1
commit
fa002b4db6
@ -1 +1 @@
|
|||||||
z\ace\Addons\laser
|
z\ace\Addons\attach
|
@ -1,7 +1,8 @@
|
|||||||
ace_attach
|
ace_attach
|
||||||
==========
|
==========
|
||||||
|
|
||||||
Introducing the ability to attach various throwables to yourself to mark your position and assist in IFF.
|
Introducing the ability to attach various throwables to yourself or vehicles, to mark your position and assist in IFF.
|
||||||
|
Adds item `ACE_IR_Strobe_Item`.
|
||||||
|
|
||||||
|
|
||||||
## Maintainers
|
## Maintainers
|
||||||
@ -11,3 +12,4 @@ The people responsible for merging changes to this component or answering potent
|
|||||||
- [esteldunedain](https://github.com/esteldunedain)
|
- [esteldunedain](https://github.com/esteldunedain)
|
||||||
- [bux578](https://github.com/bux578)
|
- [bux578](https://github.com/bux578)
|
||||||
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
|
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
|
||||||
|
- [PabstMirror](https://github.com/PabstMirror)
|
||||||
|
@ -1,18 +1,21 @@
|
|||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Author: eRazeri and CAA-Picard
|
* Author: eRazeri and CAA-Picard
|
||||||
|
* Attach an item to the unit
|
||||||
Attach an item to the unit
|
*
|
||||||
|
* Arguments:
|
||||||
Arguments:
|
* 0: unit doing the attach (player) <OBJECT>
|
||||||
0: OBJECT - unit doing the attaching (player)
|
* 1: vehicle that it will be attached to (player or vehicle) <OBJECT>
|
||||||
1: OBJECT - vehicle that it will be attached to (player or vehicle)
|
* 2: Name of the attachable item <STRING>
|
||||||
2: STRING - classname of attached item (from CfgMagazines or CfgWeapons)
|
*
|
||||||
|
* Return Value:
|
||||||
Return Value:
|
* Nothing
|
||||||
none
|
*
|
||||||
*/
|
* Example:
|
||||||
|
* Nothing
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_3(_unit,_attachToVehicle,_itemName);
|
PARAMS_3(_unit,_attachToVehicle,_itemName);
|
||||||
|
|
||||||
|
@ -1,17 +1,21 @@
|
|||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Author: commy2
|
* Author: commy2
|
||||||
*
|
|
||||||
* Check if a unit can attach a specific item.
|
* Check if a unit can attach a specific item.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Arguments:
|
||||||
* 0: Unit that wants to attach the object (Object)
|
* 0: unit doing the attach (player) <OBJECT>
|
||||||
* 1: Name of the attachable item (String)
|
* 1: vehicle that it will be attached to (player or vehicle) <OBJECT>
|
||||||
|
* 2: Name of the attachable item <STRING>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return Value:
|
||||||
* Boolean (Bool)
|
* Boolean <BOOL>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* Nothing
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_3(_unit,_attachToVehicle,_item);
|
PARAMS_3(_unit,_attachToVehicle,_item);
|
||||||
|
|
||||||
|
@ -1,16 +1,20 @@
|
|||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Author: commy2
|
* Author: commy2
|
||||||
*
|
* Check if a unit has an item attached and if it can remove that item.
|
||||||
* Check if a unit has an item attached and if it can remove that item.
|
*
|
||||||
*
|
* Arguments:
|
||||||
* Argument:
|
* 0: unit doing the detaching (player) <STRING>
|
||||||
* 0: Unit that wants to detach something (Object)
|
* 1: vehicle that it will be detached from (player or vehicle) <OBJECT>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return Value:
|
||||||
* Boolean (Bool)
|
* Boolean <BOOL>
|
||||||
*/
|
*
|
||||||
|
* Example:
|
||||||
|
* Nothing
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_attachedObjects", "_inRange", "_unitPos", "_objectPos"];
|
private ["_attachedObjects", "_inRange", "_unitPos", "_objectPos"];
|
||||||
|
|
||||||
|
@ -1,17 +1,20 @@
|
|||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Author: eRazeri and CAA-Picard
|
* Author: eRazeri and CAA-Picard
|
||||||
|
* Detach an item from a unit
|
||||||
Detach an item from a unit
|
*
|
||||||
|
* Arguments:
|
||||||
Arguments:
|
* 0: unit doing the attaching (player) <STRING>
|
||||||
0: OBJECT - unit doing the attaching (player)
|
* 1: vehicle that it will be detached from (player or vehicle) <OBJECT>
|
||||||
1: OBJECT - vehicle that it will be detached from (player or vehicle)
|
*
|
||||||
|
* Return Value:
|
||||||
Return Value:
|
* Nothing
|
||||||
none
|
*
|
||||||
*/
|
* Example:
|
||||||
|
* Nothing
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_itemName", "_count", "_attachedItem", "_fnc_detachDelay"];
|
private ["_itemName", "_count", "_attachedItem", "_fnc_detachDelay"];
|
||||||
|
|
||||||
@ -71,13 +74,13 @@ _attachToVehicle setVariable ["ACE_AttachedItemNames", _attachedItemsArray, true
|
|||||||
|
|
||||||
// Display message
|
// Display message
|
||||||
switch true do {
|
switch true do {
|
||||||
case (_itemName == "ACE_IR_Strobe_Item") : {
|
case (_itemName == "ACE_IR_Strobe_Item") : {
|
||||||
[localize "STR_ACE_Attach_IrStrobe_Detached"] call EFUNC(common,displayTextStructured);
|
[localize "STR_ACE_Attach_IrStrobe_Detached"] call EFUNC(common,displayTextStructured);
|
||||||
};
|
};
|
||||||
case (_itemName == "B_IR_Grenade" or _itemName == "O_IR_Grenade" or _itemName == "I_IR_Grenade") : {
|
case (_itemName == "B_IR_Grenade" or _itemName == "O_IR_Grenade" or _itemName == "I_IR_Grenade") : {
|
||||||
[localize "STR_ACE_Attach_IrGrenade_Detached"] call EFUNC(common,displayTextStructured);
|
[localize "STR_ACE_Attach_IrGrenade_Detached"] call EFUNC(common,displayTextStructured);
|
||||||
};
|
};
|
||||||
case (_itemName == "Chemlight_blue" or {_itemName == "Chemlight_green"} or {_itemName == "Chemlight_red"} or {_itemName == "Chemlight_yellow"}) : {
|
case (_itemName == "Chemlight_blue" or {_itemName == "Chemlight_green"} or {_itemName == "Chemlight_red"} or {_itemName == "Chemlight_yellow"}) : {
|
||||||
[localize "STR_ACE_Attach_Chemlight_Detached"] call EFUNC(common,displayTextStructured);
|
[localize "STR_ACE_Attach_Chemlight_Detached"] call EFUNC(common,displayTextStructured);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* Author: Garth de Wet (LH)
|
||||||
|
* Opens the UI for attaching objects.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: unit <STRING>
|
||||||
|
* 1: target <OBJECT>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* Nothing
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* Nothing
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
/*
|
|
||||||
Author: Garth de Wet (LH)
|
|
||||||
|
|
||||||
Description:
|
|
||||||
Opens the UI for attaching objects.
|
|
||||||
|
|
||||||
Parameters:
|
|
||||||
0: OBJECT - unit
|
|
||||||
1: OBJECT - target
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
Nothing
|
|
||||||
|
|
||||||
Example:
|
|
||||||
[player] call ACE_Attach_fnc_openAttachUI;
|
|
||||||
*/
|
|
||||||
private ["_actions", "_attachables", "_item"];
|
private ["_actions", "_attachables", "_item"];
|
||||||
|
|
||||||
PARAMS_2(_unit,_target);
|
PARAMS_2(_unit,_target);
|
||||||
@ -55,13 +55,13 @@ _attachables = items _unit;
|
|||||||
} forEach _attachables;
|
} forEach _attachables;
|
||||||
|
|
||||||
[
|
[
|
||||||
_actions,
|
_actions,
|
||||||
{
|
{
|
||||||
[ACE_player, GVAR(attachTarget), _this] call FUNC(attach);
|
[ACE_player, GVAR(attachTarget), _this] call FUNC(attach);
|
||||||
call EFUNC(interaction,hideMenu);
|
call EFUNC(interaction,hideMenu);
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
call EFUNC(interaction,hideMenu);
|
call EFUNC(interaction,hideMenu);
|
||||||
if !(profileNamespace getVariable [QEGVAR(interaction,AutoCloseMenu), false]) then {"Default" call EFUNC(interaction,openMenuSelf)};
|
if !(profileNamespace getVariable [QEGVAR(interaction,AutoCloseMenu), false]) then {"Default" call EFUNC(interaction,openMenuSelf)};
|
||||||
}
|
}
|
||||||
] call EFUNC(interaction,openSelectMenu);
|
] call EFUNC(interaction,openSelectMenu);
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
Name: FUNC(placeApprove)
|
* Author: Pabst Mirror (based on Explosive attach by Garth de Wet (LH))
|
||||||
Author(s):
|
* Approves placement of the lightObject, scans for an appropriate location and attaches
|
||||||
Pabst Mirror (based on Explosive attach by Garth de Wet (LH))
|
*
|
||||||
Description:
|
* Arguments:
|
||||||
Approves placement of the lightObject, releases the placement object for it to settle in a location
|
* Nothing
|
||||||
Parameters:
|
*
|
||||||
Nothing
|
* Return Value:
|
||||||
Returns:
|
* Nothing
|
||||||
Nothing
|
*
|
||||||
Example:
|
* Example:
|
||||||
call FUNC(placeApprove);
|
* Nothing
|
||||||
*/
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_setupObject", "_setupClassname", "_itemClassname", "_placementText", "_attachToVehicle", "_placer", "_startingPosition", "_startingOffset", "_distanceFromCenter", "_closeInUnitVector", "_keepGoingCloser", "_closeInDistance", "_endPosTestOffset", "_endPosTest", "_startingPosShifted", "_startASL", "_endPosShifted", "_endASL", "_attachedObject", "_currentObjects", "_currentItemNames"];
|
private ["_setupObject", "_setupClassname", "_itemClassname", "_placementText", "_attachToVehicle", "_placer", "_startingPosition", "_startingOffset", "_distanceFromCenter", "_closeInUnitVector", "_keepGoingCloser", "_closeInDistance", "_endPosTestOffset", "_endPosTest", "_startingPosShifted", "_startASL", "_endPosShifted", "_endASL", "_attachedObject", "_currentObjects", "_currentItemNames"];
|
||||||
|
@ -1,21 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
Name: FUNC(placeCancel)
|
* Author: Pabst Mirror (based on Explosive attach by Garth de Wet (LH))
|
||||||
|
* Cancels placement of the lightObject
|
||||||
Author(s):
|
*
|
||||||
Pabst Mirror (based on Explosive attach by Garth de Wet (LH))
|
* Arguments:
|
||||||
|
* Nothing
|
||||||
Description:
|
*
|
||||||
Cancels placement of the lightObject
|
* Return Value:
|
||||||
|
* Nothing
|
||||||
Parameters:
|
*
|
||||||
Nothing
|
* Example:
|
||||||
|
* Nothing
|
||||||
Returns:
|
*
|
||||||
Nothing
|
* Public: No
|
||||||
|
*/
|
||||||
Example:
|
|
||||||
call FUNC(placeCancel);
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
if (GVAR(pfeh_running)) then {
|
if (GVAR(pfeh_running)) then {
|
||||||
@ -25,11 +22,6 @@ if (GVAR(pfeh_running)) then {
|
|||||||
if (!isNull (GVAR(setupObject))) then {
|
if (!isNull (GVAR(setupObject))) then {
|
||||||
deleteVehicle GVAR(setupObject);
|
deleteVehicle GVAR(setupObject);
|
||||||
};
|
};
|
||||||
GVAR(SetupPlacmentItem) = "";
|
|
||||||
GVAR(SetupPlacmentText) = "";
|
|
||||||
GVAR(setupObject) = objNull;
|
|
||||||
GVAR(SetupAttachVehicle) = objNull;
|
|
||||||
|
|
||||||
|
|
||||||
[GVAR(placer), QGVAR(vehAttach), false] call EFUNC(common,setForceWalkStatus);
|
[GVAR(placer), QGVAR(vehAttach), false] call EFUNC(common,setForceWalkStatus);
|
||||||
call EFUNC(interaction,hideMouseHint);
|
call EFUNC(interaction,hideMouseHint);
|
||||||
@ -37,3 +29,7 @@ call EFUNC(interaction,hideMouseHint);
|
|||||||
[GVAR(placer), "MenuBack", GVAR(placer) getVariable [QGVAR(cancelActionEH), -1]] call EFUNC(common,removeActionEventHandler);
|
[GVAR(placer), "MenuBack", GVAR(placer) getVariable [QGVAR(cancelActionEH), -1]] call EFUNC(common,removeActionEventHandler);
|
||||||
|
|
||||||
GVAR(placer) = objNull;
|
GVAR(placer) = objNull;
|
||||||
|
GVAR(SetupPlacmentItem) = "";
|
||||||
|
GVAR(SetupPlacmentText) = "";
|
||||||
|
GVAR(setupObject) = objNull;
|
||||||
|
GVAR(SetupAttachVehicle) = objNull;
|
||||||
|
Loading…
Reference in New Issue
Block a user