mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Headers, Formatting
This commit is contained in:
parent
85f2f5a467
commit
1cdc341320
@ -1,13 +1,17 @@
|
|||||||
/*
|
/*
|
||||||
* Author: commy2
|
* Author: commy2
|
||||||
*
|
|
||||||
* Called on unit initialization. Adds earplugs if the unit is equipped with either a really loud primary weapon or a rocket launcher.
|
* Called on unit initialization. Adds earplugs if the unit is equipped with either a really loud primary weapon or a rocket launcher.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Arguments:
|
||||||
* 0: A Soldier (Object)
|
* 0: A Soldier <Object>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return Value:
|
||||||
* Nothing
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [guy] call ace_hearing_fnc_addEarPlugs
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
@ -1,13 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
* Author: KoffeinFlummi, commy2
|
* Author: KoffeinFlummi, commy2
|
||||||
*
|
|
||||||
* Creates ear ringing effect with set strength.
|
* Creates ear ringing effect with set strength.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: strength of ear ringing (Number between 0 and 1)
|
* 0: Unit (player) <OBJECT>
|
||||||
|
* 1: strength of ear ringing (Number between 0 and 1) <NUMBER>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* none
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [clientExplosionEvent] call ace_hearing_fnc_earRinging
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
@ -1,13 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
* Author: KoffeinFlummi, commy2
|
* Author: KoffeinFlummi, commy2
|
||||||
*
|
|
||||||
* Handles deafness due to explosions going off near the player.
|
* Handles deafness due to explosions going off near the player.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* -> Explosion Event Handler
|
* 0: vehicle - Object the event handler is assigned to (player) <OBJECT>
|
||||||
|
* 1: damage - Damage inflicted to the object <NUMBER>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* none
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [clientExplosionEvent] call ace_hearing_fnc_explosionNear
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
@ -1,13 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
* Author: KoffeinFlummi, commy2
|
* Author: KoffeinFlummi, commy2
|
||||||
*
|
|
||||||
* Handles deafness due to large-caliber weapons going off near the player.
|
* Handles deafness due to large-caliber weapons going off near the player.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* -> FiredNear Event Handler
|
* 0: Unit - Object the event handler is assigned to <OBJECT>
|
||||||
|
* 1: Firer: Object - Object which fires a weapon near the unit <OBJECT>
|
||||||
|
* 2: Distance - Distance in meters between the unit and firer <NUMBER>
|
||||||
|
* 3: weapon - Fired weapon <STRING>
|
||||||
|
* 4: muzzle - Muzzle that was used <STRING>
|
||||||
|
* 5: mod - Current mode of the fired weapon <STRING>
|
||||||
|
* 6: ammo - Ammo used <STRING>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* none
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [clientFiredNearEvent] call ace_hearing_fnc_firedNear
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
@ -25,9 +35,9 @@ if (_weapon in ["Throw", "Put"]) exitWith {};
|
|||||||
if (_unit != vehicle _unit && {!([_unit] call EFUNC(common,isTurnedOut))}) exitWith {};
|
if (_unit != vehicle _unit && {!([_unit] call EFUNC(common,isTurnedOut))}) exitWith {};
|
||||||
|
|
||||||
_silencer = switch (_weapon) do {
|
_silencer = switch (_weapon) do {
|
||||||
case (primaryWeapon _unit) : {primaryWeaponItems _unit select 0};
|
case (primaryWeapon _unit) : {primaryWeaponItems _unit select 0};
|
||||||
case (secondaryWeapon _unit) : {secondaryWeaponItems _unit select 0};
|
case (secondaryWeapon _unit) : {secondaryWeaponItems _unit select 0};
|
||||||
case (handgunWeapon _unit) : {handgunItems _unit select 0};
|
case (handgunWeapon _unit) : {handgunItems _unit select 0};
|
||||||
default {""};
|
default {""};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* Author: commy2
|
* Author: commy2
|
||||||
*
|
|
||||||
* Check if the unit has earplugs put in.
|
* Check if the unit has earplugs put in.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Arguments:
|
||||||
* A soldier (Object)
|
* 0:Unit (player) <OBJECT>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return Value:
|
||||||
* Boolean (Bool)
|
* Have Earplugs in <BOOL>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [ace_player] call ace_hearing_fnc_hasEarPlugsIn
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private "_unit";
|
PARAMS_1(_unit);
|
||||||
|
|
||||||
_unit = _this select 0;
|
|
||||||
|
|
||||||
_unit getVariable ["ACE_hasEarPlugsin", false]
|
_unit getVariable ["ACE_hasEarPlugsin", false]
|
||||||
|
@ -1,20 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Author: Hope Johnson
|
* Author: Hope Johnson and commy2
|
||||||
* Edited by commy2
|
* Puts in earplugs.
|
||||||
*
|
|
||||||
* Puts in / takes out earplugs.
|
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* none
|
* 0:Unit (player) <OBJECT>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* none
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [ace_player] call ace_hearing_fnc_putInEarplugs
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private "_player";
|
PARAMS_1(_player);
|
||||||
|
|
||||||
_player = _this select 0;
|
|
||||||
|
|
||||||
// Buds in inventory, putting them in
|
// Buds in inventory, putting them in
|
||||||
_player removeItem "ACE_EarBuds";
|
_player removeItem "ACE_EarBuds";
|
||||||
|
@ -1,20 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Author: Hope Johnson
|
* Author: Hope Johnson and commy2
|
||||||
* Edited by commy2
|
* Takes out earplugs.
|
||||||
*
|
|
||||||
* Puts in / takes out earplugs.
|
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* none
|
* 0:Unit (player) <OBJECT>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* none
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [ace_player] call ace_hearing_fnc_removeEarplugs
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private "_player";
|
PARAMS_1(_player);
|
||||||
|
|
||||||
_player = _this select 0;
|
|
||||||
|
|
||||||
if !(_player canAdd "ACE_EarBuds") exitWith { // inventory full
|
if !(_player canAdd "ACE_EarBuds") exitWith { // inventory full
|
||||||
[localize "STR_ACE_Hearing_Inventory_Full"] call EFUNC(common,displayTextStructured);
|
[localize "STR_ACE_Hearing_Inventory_Full"] call EFUNC(common,displayTextStructured);
|
||||||
|
@ -1,4 +1,18 @@
|
|||||||
// by commy2 and CAA-Picard
|
/*
|
||||||
|
* Author: commy2 and CAA-Picard
|
||||||
|
* Updates and applys the current deafness. Called every 0.1 sec from a PFEH.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [] call ace_hearing_fnc_updateVolume
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
#define STRENGHTODEAFNESS 3
|
#define STRENGHTODEAFNESS 3
|
||||||
|
Loading…
Reference in New Issue
Block a user