mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
add dayOfWeek and updateMemory to Own File
Update some Comments Fixing Spelling Issue
This commit is contained in:
parent
183aac1911
commit
84685f4a84
@ -15,23 +15,6 @@ PREP(restoreUserData);
|
|||||||
PREP(storeUserData);
|
PREP(storeUserData);
|
||||||
PREP(updateDisplay);
|
PREP(updateDisplay);
|
||||||
PREP(updateImpellerState);
|
PREP(updateImpellerState);
|
||||||
|
PREP(updateMemory);
|
||||||
|
PREP(dayOfWeek)
|
||||||
ADDON = true;
|
ADDON = true;
|
||||||
|
|
||||||
FUNC(updateMemory) = {
|
|
||||||
params ["_slot", "_value"];
|
|
||||||
GVAR(MIN) set [_slot, (GVAR(MIN) select _slot) min _value];
|
|
||||||
GVAR(MAX) set [_slot, _value max (GVAR(MAX) select _slot)];
|
|
||||||
GVAR(TOTAL) set [_slot, (GVAR(TOTAL) select _slot) + _value];
|
|
||||||
};
|
|
||||||
|
|
||||||
FUNC(dayOfWeek) = {
|
|
||||||
private "_table";
|
|
||||||
params ["_year", "_month", "_day"];
|
|
||||||
|
|
||||||
_table = [0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4];
|
|
||||||
if (_month < 3) then {
|
|
||||||
_year = _year - 1;
|
|
||||||
};
|
|
||||||
(_year + floor(_year/4) - floor(_year/100) + floor(_year/400) + (_table select (_month - 1)) + _day) % 7
|
|
||||||
};
|
|
||||||
|
@ -6,9 +6,10 @@
|
|||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* Nothing
|
* None
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
|
* call ace_kestrel4500_fnc_createKestrelDialog
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
25
addons/kestrel4500/functions/fnc_dayOfWeek.sqf
Normal file
25
addons/kestrel4500/functions/fnc_dayOfWeek.sqf
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* Author: Ruthberg
|
||||||
|
* Calculate Current Day in the Week
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Year <NUMBER>
|
||||||
|
* 1: Month <NUMBER>
|
||||||
|
* 2: Day <NUMBER>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* Day of The Week <NUMBER>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [1995, 10, 21] call ace_kestrel4500_fnc_buttonPressed
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
private "_table";
|
||||||
|
params ["_year", "_month", "_day"];
|
||||||
|
|
||||||
|
_table = [0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4];
|
||||||
|
if (_month < 3) then {
|
||||||
|
_year = _year - 1;
|
||||||
|
};
|
||||||
|
(_year + floor(_year/4) - floor(_year/100) + floor(_year/400) + (_table select (_month - 1)) + _day) % 7
|
@ -6,10 +6,10 @@
|
|||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* Nothing
|
* None
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* call ace_kestrel4500_fnc_displayKestrell
|
* call ace_kestrel4500_fnc_displayKestrel
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
* 15: Center Line 6 <STRING>
|
* 15: Center Line 6 <STRING>
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* _var = call ace_kestrell4500_fnc_generateOutputData
|
* _var = call ace_kestrel4500_fnc_generateOutputData
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Author: Ruthberg
|
* Author: Ruthberg
|
||||||
* Called if Kestrell Dialog is closed
|
* Called if Kestrel Dialog is closed
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* None
|
* None
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Author: Ruthberg
|
* Author: Ruthberg
|
||||||
* Called if Kestrell Display is closed
|
* Called if Kestrel Display is closed
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* None
|
* None
|
||||||
|
20
addons/kestrel4500/functions/fnc_updateMemory.sqf
Normal file
20
addons/kestrel4500/functions/fnc_updateMemory.sqf
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
* Author: Ruthberg
|
||||||
|
* Update Memory of Kestrel
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Slot <NUMBER>
|
||||||
|
* 1: Value <STRING>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [1, "test"] call ace_kestrel4500_fnc_updateMemory
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
params ["_slot", "_value"];
|
||||||
|
GVAR(MIN) set [_slot, (GVAR(MIN) select _slot) min _value];
|
||||||
|
GVAR(MAX) set [_slot, _value max (GVAR(MAX) select _slot)];
|
||||||
|
GVAR(TOTAL) set [_slot, (GVAR(TOTAL) select _slot) + _value];
|
Loading…
x
Reference in New Issue
Block a user