mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Cleanup Undefined Functions
This commit is contained in:
parent
10950d5fab
commit
c75d219b65
@ -1,22 +1,24 @@
|
|||||||
/*
|
/*
|
||||||
* Author: ?
|
* Author: ?
|
||||||
* ?
|
* Dumps an array to the RPT, showing the depth of each element.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Array to be dumped <ARRAY>
|
* 0: Array to be dumped <ARRAY>
|
||||||
* 1: Depth <NUMBER>
|
* 1: Depth <NUMBER><OPTIONAL>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
|
* Example:
|
||||||
|
* [[0, [1,2], [[3]]]] call ace_common_fnc_dumpArray
|
||||||
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_var", "_depth"];
|
params ["_var", ["_depth", 0, [0]]];
|
||||||
|
|
||||||
private "_pad";
|
local _pad = "";
|
||||||
_pad = "";
|
|
||||||
|
|
||||||
for "_i" from 0 to _depth do {
|
for "_i" from 0 to _depth do {
|
||||||
_pad = _pad + toString [9];
|
_pad = _pad + toString [9];
|
||||||
@ -38,5 +40,5 @@ if (IS_ARRAY(_var)) then {
|
|||||||
diag_log text format ["%1],", _pad];
|
diag_log text format ["%1],", _pad];
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
diag_log text format ["%1%2", _pad, [_var] call FUNC(formatVar)];
|
diag_log text format ["%1%2", _pad, _var];
|
||||||
};
|
};
|
||||||
|
@ -20,11 +20,10 @@
|
|||||||
GVAR(remoteFnc) = _this;
|
GVAR(remoteFnc) = _this;
|
||||||
|
|
||||||
params ["_arguments", "_function", "_unit", "_name"];
|
params ["_arguments", "_function", "_unit", "_name"];
|
||||||
|
TRACE_4("params", _arguments, _function, _unit, _name);
|
||||||
|
|
||||||
_function = call compile _function;
|
_function = call compile _function;
|
||||||
|
|
||||||
//["Remote", [_arguments, _this select 1, _name], {format ["%1 call %2 id: %3", _this select 0, _this select 1, _this select 2]}, false] call FUNC(log);
|
|
||||||
|
|
||||||
// execute function on every currently connected machine
|
// execute function on every currently connected machine
|
||||||
[[_arguments, _unit], _this select 1, 2] call FUNC(execRemoteFnc);
|
[[_arguments, _unit], _this select 1, 2] call FUNC(execRemoteFnc);
|
||||||
|
|
||||||
|
@ -23,11 +23,10 @@
|
|||||||
GVAR(remoteFnc) = _this;
|
GVAR(remoteFnc) = _this;
|
||||||
|
|
||||||
params ["_arguments", "_function", ["_unit", 2]];
|
params ["_arguments", "_function", ["_unit", 2]];
|
||||||
|
TRACE_3("params", _arguments, _function, _unit);
|
||||||
|
|
||||||
_function = call compile _function;
|
_function = call compile _function;
|
||||||
|
|
||||||
//["Remote", [_arguments, _this select 1, _unit], {format ["%1 call %2 to: %3", _this select 0, _this select 1, _this select 2]}, false] call FUNC(log);
|
|
||||||
|
|
||||||
if (typeName _unit == "SCALAR") exitWith {
|
if (typeName _unit == "SCALAR") exitWith {
|
||||||
switch (_unit) do {
|
switch (_unit) do {
|
||||||
case 0 : {
|
case 0 : {
|
||||||
|
@ -21,7 +21,7 @@ private ["_vehicle", "_loadcar", "_loadair", "_loadtank", "_loadboat"];
|
|||||||
|
|
||||||
_vehicle = objNull;
|
_vehicle = objNull;
|
||||||
|
|
||||||
if (!([_caller] call FUNC(canInteract)) || {_caller == _unit}) exitwith {_vehicle};
|
if (!([_caller, _unit, ["isNotDragging", "isNotCarrying"]] call FUNC(canInteractWith)) || {_caller == _unit}) exitwith {_vehicle};
|
||||||
|
|
||||||
_loadcar = nearestObject [_unit, "Car"];
|
_loadcar = nearestObject [_unit, "Car"];
|
||||||
|
|
||||||
|
@ -1,53 +0,0 @@
|
|||||||
/*
|
|
||||||
* Author: Glowbal
|
|
||||||
* Sends a display information hint to a receiver
|
|
||||||
*
|
|
||||||
* Arguments:
|
|
||||||
* 0: receiver <OBJECT>
|
|
||||||
* 1: title <STRING>
|
|
||||||
* 2: content <ARRAY>
|
|
||||||
* 3: type (optional) <NUMBER>
|
|
||||||
*
|
|
||||||
* Return Value:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Public: Yes
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
params [["_reciever", objNull], ["_title", ""], ["_content", ""], ["_type", 0], ["_parameters", []]];
|
|
||||||
|
|
||||||
if (isPlayer _reciever) then {
|
|
||||||
if (!local _reciever) then {
|
|
||||||
[_this, QFUNC(sendDisplayInformationTo), _reciever, false] call FUNC(execRemoteFnc);
|
|
||||||
} else {
|
|
||||||
if (isLocalized _title) then {
|
|
||||||
_title = localize _title;
|
|
||||||
};
|
|
||||||
|
|
||||||
private "_localizationArray";
|
|
||||||
_localizationArray = [_title];
|
|
||||||
|
|
||||||
{
|
|
||||||
_localizationArray pushback _x;
|
|
||||||
false
|
|
||||||
} count _parameters;
|
|
||||||
|
|
||||||
_title = format _localizationArray;
|
|
||||||
|
|
||||||
{
|
|
||||||
if (isLocalized _x) then {
|
|
||||||
_localizationArray = [localize _x];
|
|
||||||
|
|
||||||
{
|
|
||||||
_localizationArray pushBack _x;
|
|
||||||
false
|
|
||||||
} count _parameters;
|
|
||||||
|
|
||||||
_content set [_forEachIndex, format _localizationArray];
|
|
||||||
};
|
|
||||||
} forEach _content;
|
|
||||||
|
|
||||||
[_title, _content, _type] call FUNC(displayInformation);
|
|
||||||
};
|
|
||||||
};
|
|
@ -1,53 +0,0 @@
|
|||||||
/*
|
|
||||||
* Author: Glowbal
|
|
||||||
* Displays a message on locality of receiver
|
|
||||||
*
|
|
||||||
* Arguments:
|
|
||||||
* 0: receiver <OBJECT>
|
|
||||||
* 1: title <STRING>
|
|
||||||
* 2: content <ARRAY>
|
|
||||||
* 3: type (optional) <NUMBER>
|
|
||||||
*
|
|
||||||
* Return Value:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Public: Yes
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
params [["_reciever", objNull], ["_title", ""], ["_content", ""], ["_type", 0], ["_parameters", []]];
|
|
||||||
|
|
||||||
if (isPlayer _reciever) then {
|
|
||||||
if (!local _reciever) then {
|
|
||||||
[_this, QFUNC(sendDisplayMessageTo), _reciever, false] call FUNC(execRemoteFnc);
|
|
||||||
} else {
|
|
||||||
if (isLocalized _title) then {
|
|
||||||
_title = localize _title;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (isLocalized _content) then {
|
|
||||||
_content = localize _content;
|
|
||||||
};
|
|
||||||
|
|
||||||
private "_localizationArray";
|
|
||||||
_localizationArray = [_title];
|
|
||||||
|
|
||||||
{
|
|
||||||
_localizationArray pushBack _x;
|
|
||||||
false
|
|
||||||
} count _parameters;
|
|
||||||
|
|
||||||
_title = format _localizationArray;
|
|
||||||
|
|
||||||
_localizationArray = [_content];
|
|
||||||
|
|
||||||
{
|
|
||||||
_localizationArray pushBack _x;
|
|
||||||
false
|
|
||||||
} count _parameters;
|
|
||||||
|
|
||||||
_content = format _localizationArray;
|
|
||||||
|
|
||||||
[_title, _content, _type] call FUNC(displayMessage);
|
|
||||||
};
|
|
||||||
};
|
|
Loading…
Reference in New Issue
Block a user