From c72c51aca0b60962d463b55d28e59a97800d00e4 Mon Sep 17 00:00:00 2001 From: jodav Date: Mon, 12 Jan 2015 11:24:58 +0100 Subject: [PATCH] add script_component.hpp include, add file header --- .../functions/fnc_canMoveRallypoint.sqf | 19 +++++++++++- addons/respawn/functions/fnc_getAllGear.sqf | 25 +++++++++------ addons/respawn/functions/fnc_handleKilled.sqf | 2 ++ .../respawn/functions/fnc_handleRespawn.sqf | 4 ++- .../respawn/functions/fnc_initRallypoint.sqf | 18 ++++++++++- addons/respawn/functions/fnc_module.sqf | 31 ++++++++++++------- .../functions/fnc_moduleFriendlyFire.sqf | 28 +++++++++++------ .../functions/fnc_moduleRallypoint.sqf | 28 +++++++++++------ .../respawn/functions/fnc_moveRallypoint.sqf | 19 +++++++++++- addons/respawn/functions/fnc_removeBody.sqf | 27 ++++++++++------ .../fnc_removeDisconnectedPlayer.sqf | 18 ++++++++++- addons/respawn/functions/fnc_restoreGear.sqf | 26 ++++++++++------ .../functions/fnc_showFriendlyFireMessage.sqf | 19 +++++++++++- .../functions/fnc_teleportToRallypoint.sqf | 20 +++++++++++- 14 files changed, 216 insertions(+), 68 deletions(-) diff --git a/addons/respawn/functions/fnc_canMoveRallypoint.sqf b/addons/respawn/functions/fnc_canMoveRallypoint.sqf index d4607e9912..67a0ea859e 100644 --- a/addons/respawn/functions/fnc_canMoveRallypoint.sqf +++ b/addons/respawn/functions/fnc_canMoveRallypoint.sqf @@ -1,4 +1,21 @@ -// by commy2 +/* + Name: ACE_Respawn_fnc_canMoveRallypoint + + Author(s): + commy2 + + Description: + checks if a unit can move a rally point + + Parameters: + 0: OBJECT - unit + 1: OBJECT - side + + Returns: + BOOLEAN +*/ + +#include "script_component.hpp" private ["_unit", "_side"]; diff --git a/addons/respawn/functions/fnc_getAllGear.sqf b/addons/respawn/functions/fnc_getAllGear.sqf index 5368dbdd35..d9f3e16b70 100644 --- a/addons/respawn/functions/fnc_getAllGear.sqf +++ b/addons/respawn/functions/fnc_getAllGear.sqf @@ -1,16 +1,21 @@ /* -Author: bux578 - -Description: -Returns an array containing all items of a given unit - -Arguments: -A player object - -Return value: -An array containing all inventory items + Name: ACE_Respawn_fnc_getAllGear + + Author(s): + bux578 + + Description: + returns an array containing all items of a given unit + + Parameters: + 0: OBJECT - unit + + Returns: + ARRAY */ +#include "script_component.hpp" + private ["_unit", "_allGear"]; _unit = _this select 0; diff --git a/addons/respawn/functions/fnc_handleKilled.sqf b/addons/respawn/functions/fnc_handleKilled.sqf index d37dccf691..7c6bffcceb 100644 --- a/addons/respawn/functions/fnc_handleKilled.sqf +++ b/addons/respawn/functions/fnc_handleKilled.sqf @@ -15,6 +15,8 @@ VOID */ +#include "script_component.hpp" + private ["_killedUnit"]; _killedUnit = _this select 0; diff --git a/addons/respawn/functions/fnc_handleRespawn.sqf b/addons/respawn/functions/fnc_handleRespawn.sqf index 83490eb7f3..9157576fb4 100644 --- a/addons/respawn/functions/fnc_handleRespawn.sqf +++ b/addons/respawn/functions/fnc_handleRespawn.sqf @@ -1,5 +1,5 @@ /* - Name: AGM_Respawn_fnc_handleRespawn + Name: ACE_Respawn_fnc_handleRespawn Author(s): bux578 @@ -15,6 +15,8 @@ VOID */ +#include "script_component.hpp" + private ["_respawnedUnit"]; _respawnedUnit = _this select 0; diff --git a/addons/respawn/functions/fnc_initRallypoint.sqf b/addons/respawn/functions/fnc_initRallypoint.sqf index 492e426113..295c9b00ff 100644 --- a/addons/respawn/functions/fnc_initRallypoint.sqf +++ b/addons/respawn/functions/fnc_initRallypoint.sqf @@ -1,4 +1,20 @@ -// by commy2 +/* + Name: ACE_Respawn_fnc_initRallypoint + + Author(s): + commy2 + + Description: + init code for rally points + + Parameters: + 0: OBJECT - rally + + Returns: + VOID +*/ + +#include "script_component.hpp" private ["_rallypoint", "_name"]; diff --git a/addons/respawn/functions/fnc_module.sqf b/addons/respawn/functions/fnc_module.sqf index bc957c0609..f7d1277d72 100644 --- a/addons/respawn/functions/fnc_module.sqf +++ b/addons/respawn/functions/fnc_module.sqf @@ -1,14 +1,23 @@ -/* - * Author: KoffeinFlummi, bux578, CAA-Picard, commy2 - * - * Initializes the respawn module. - * - * Arguments: - * Whatever the module provides. (I dunno.) - * - * Return Value: - * None - */ + /* + Name: ACE_Respawn_fnc_module + + Author(s): + KoffeinFlummi, bux578, CAA-Picard, commy2 + + Description: + initializes the respawn module + + Parameters: + 0: OBJECT - logic + 1: ARRAY - synced units + 2: BOOLEAN - activated + + Returns: + VOID +*/ + +#include "script_component.hpp" + if !(isServer) exitWith {}; _logic = _this select 0; diff --git a/addons/respawn/functions/fnc_moduleFriendlyFire.sqf b/addons/respawn/functions/fnc_moduleFriendlyFire.sqf index b274ed2706..a7d6ca7e72 100644 --- a/addons/respawn/functions/fnc_moduleFriendlyFire.sqf +++ b/addons/respawn/functions/fnc_moduleFriendlyFire.sqf @@ -1,14 +1,22 @@ /* - * Author: commy2 - * - * Initializes the Friendly Fire Messages module. - * - * Arguments: - * Whatever the module provides. (I dunno.) - * - * Return Value: - * None - */ + Name: ACE_Respawn_fnc_moduleFriendlyFire + + Author(s): + commy2 + + Description: + initializes the Friendly Fire Messages module + + Parameters: + 0: OBJECT - logic + 1: ARRAY - synced units + 2: BOOLEAN - activated + + Returns: + VOID +*/ + +#include "script_component.hpp" _this spawn { _logic = _this select 0; diff --git a/addons/respawn/functions/fnc_moduleRallypoint.sqf b/addons/respawn/functions/fnc_moduleRallypoint.sqf index 62f36fc754..8ec9efbd09 100644 --- a/addons/respawn/functions/fnc_moduleRallypoint.sqf +++ b/addons/respawn/functions/fnc_moduleRallypoint.sqf @@ -1,15 +1,23 @@ /* - * Author: commy2 - * - * Initializes the Rallypoint module. - * - * Arguments: - * Whatever the module provides. (I dunno.) - * - * Return Value: - * None - */ + Name: ACE_Respawn_fnc_moduleRallypoint + + Author(s): + commy2 + + Description: + initializes the Rallypoint module + + Parameters: + 0: OBJECT - logic + 1: ARRAY - synced units + 2: BOOLEAN - activated + + Returns: + VOID +*/ + #include "script_component.hpp" + _logic = _this select 0; _units = _this select 1; _activated = _this select 2; diff --git a/addons/respawn/functions/fnc_moveRallypoint.sqf b/addons/respawn/functions/fnc_moveRallypoint.sqf index 5466528282..427668bfd0 100644 --- a/addons/respawn/functions/fnc_moveRallypoint.sqf +++ b/addons/respawn/functions/fnc_moveRallypoint.sqf @@ -1,4 +1,21 @@ -// by commy2 +/* + Name: ACE_Respawn_fnc_moveRallypoint + + Author(s): + commy2 + + Description: + Moves a rallypoint to the player's location + + Parameters: + 0: OBJECT - unit + 1: OBJECT - side + + Returns: + VOID +*/ + +#include "script_component.hpp" _this spawn { _unit = _this select 0; diff --git a/addons/respawn/functions/fnc_removeBody.sqf b/addons/respawn/functions/fnc_removeBody.sqf index c8aaacd444..80f0b314f0 100644 --- a/addons/respawn/functions/fnc_removeBody.sqf +++ b/addons/respawn/functions/fnc_removeBody.sqf @@ -1,15 +1,22 @@ /* - * Author: bux578 - * - * removes the body - * - * Arguments: - * The body - * - * Return Value: - * None - */ + Name: ACE_Respawn_fnc_removeBody + + Author(s): + bux578 + + Description: + removes a given body + + Parameters: + 0: OBJECT - body + 1: BOOLEAN - forceRemove // not used atm + + Returns: + VOID +*/ +#include "script_component.hpp" + private ["_body", "_forceRemove", "_bodyRemoveTimer"]; _body = _this select 0; diff --git a/addons/respawn/functions/fnc_removeDisconnectedPlayer.sqf b/addons/respawn/functions/fnc_removeDisconnectedPlayer.sqf index 2ba44ef92c..a700e5c257 100644 --- a/addons/respawn/functions/fnc_removeDisconnectedPlayer.sqf +++ b/addons/respawn/functions/fnc_removeDisconnectedPlayer.sqf @@ -1,4 +1,20 @@ -// by commy2 +/* + Name: ACE_Respawn_fnc_removeDisconnectedPlayer + + Author(s): + commy2 + + Description: + handles the disconnected event + + Parameters: + 0: BOOLEAN - forceRemove // not used atm + + Returns: + VOID +*/ + +#include "script_component.hpp" private ["_forceRemove", "_body"]; diff --git a/addons/respawn/functions/fnc_restoreGear.sqf b/addons/respawn/functions/fnc_restoreGear.sqf index f724e31af1..d6b3062011 100644 --- a/addons/respawn/functions/fnc_restoreGear.sqf +++ b/addons/respawn/functions/fnc_restoreGear.sqf @@ -1,16 +1,22 @@ /* -Author: bux578 - -Description: -Restores previously saved gear - -Arguments: -A player object, an array containing all gear - -Return value: -An array containing all inventory items + Name: ACE_Respawn_fnc_removeBody + + Author(s): + bux578 + + Description: + Restores previously saved gear + + Parameters: + 0: OBJECT - unit + 1: ARRAY - Array containing all gear + + Returns: + VOID */ +#include "script_component.hpp" + private ["_unit", "_allGear", "_headgear", "_goggles", "_uniform", "_uniformitems", "_vest", "_vestitems", "_backpack", "_backpackitems", "_primaryweapon", "_primaryweaponitems", "_primaryweaponmagazine", "_handgunweapon", "_handgunweaponitems", "_handgunweaponmagazine", "_assigneditems", "_binocular"]; diff --git a/addons/respawn/functions/fnc_showFriendlyFireMessage.sqf b/addons/respawn/functions/fnc_showFriendlyFireMessage.sqf index e5b8a19217..94d30628e4 100644 --- a/addons/respawn/functions/fnc_showFriendlyFireMessage.sqf +++ b/addons/respawn/functions/fnc_showFriendlyFireMessage.sqf @@ -1,4 +1,21 @@ -// by commy2 +/* + Name: ACE_Respawn_fnc_showFriendlyFireMessages + + Author(s): + commy2 + + Description: + shows a message in system chat of who killed who + + Parameters: + 0: OBJECT - unit + 1: OBJECT - killer + + Returns: + VOID +*/ + +#include "script_component.hpp" private ["_unit", "_killer"]; diff --git a/addons/respawn/functions/fnc_teleportToRallypoint.sqf b/addons/respawn/functions/fnc_teleportToRallypoint.sqf index 420865949b..cc2a727271 100644 --- a/addons/respawn/functions/fnc_teleportToRallypoint.sqf +++ b/addons/respawn/functions/fnc_teleportToRallypoint.sqf @@ -1,4 +1,22 @@ -// by commy2 +/* + Name: ACE_Respawn_fnc_teleportToRallypoint + + Author(s): + commy2 + + Description: + teleports a unit to a rallypoint + + Parameters: + 0: OBJECT - unit + 1: OBJECT - side + 2: BOOLEAN - teleport to base + + Returns: + VOID +*/ + +#include "script_component.hpp" private ["_unit", "_side", "_toBase", "_rallypoint"];