mirror of
https://github.com/indig0fox/Arma3-AttendanceTracker.git/
synced 2025-12-08 09:51:47 -06:00
some timezone corrections to UTC, write readme
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -55,6 +55,15 @@ addMissionEventHandler ["ExtensionCallback", {
|
||||
]
|
||||
];
|
||||
|
||||
missionNamespace setVariable ["AttendanceTracker_DBConnected", true];
|
||||
};
|
||||
};
|
||||
case "writeWorldInfo": {
|
||||
if (_response#0 == "WORLD_ID") then {
|
||||
AttendanceTracker_worldId = _response#1;
|
||||
|
||||
// world info written. mission info depends on that, so now we'll write it
|
||||
|
||||
// log mission info and get back the row Id to send with future messages
|
||||
private _response = "AttendanceTracker" callExtension [
|
||||
"logMission",
|
||||
@@ -62,12 +71,11 @@ addMissionEventHandler ["ExtensionCallback", {
|
||||
[AttendanceTracker getVariable ["missionContext", createHashMap]] call CBA_fnc_encodeJSON
|
||||
]
|
||||
];
|
||||
|
||||
missionNamespace setVariable ["AttendanceTracker_DBConnected", true];
|
||||
};
|
||||
};
|
||||
case "writeMission": {
|
||||
if (_response#0 == "MISSION_ID") then {
|
||||
// mission has written so lets finish out init and set missionId for the returned PK, activating the ability for attendance records to send.
|
||||
AttendanceTracker_missionId = _response#1;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -40,6 +40,19 @@ AttendanceTracker setVariable ["missionContext", createHashMapFromArray [
|
||||
AttendanceTracker setVariable ["allUsers", createHashMap];
|
||||
AttendanceTracker setVariable ["rowIds", createHashMap];
|
||||
|
||||
// update the extension with the current server time to identify restarts
|
||||
[
|
||||
{
|
||||
'AttendanceTracker' callExtension [
|
||||
"updateServerTime",
|
||||
[
|
||||
round(diag_tickTime)
|
||||
]
|
||||
]
|
||||
},
|
||||
30
|
||||
] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
{
|
||||
if (!isServer) exitWith {};
|
||||
_x params ["_ehName", "_code"];
|
||||
|
||||
@@ -13,7 +13,7 @@ systemTimeUTC apply {if (_x < 10) then {"0" + str _x} else {str _x}} params [
|
||||
];
|
||||
|
||||
format[
|
||||
"%1-%2-%3 %4:%5:%6",
|
||||
"%1-%2-%3T%4:%5:%6.000Z",
|
||||
_year,
|
||||
_month,
|
||||
_day,
|
||||
|
||||
@@ -19,7 +19,10 @@ _hash set ["isJIP", _isJIP];
|
||||
_hash set ["roleDescription", _roleDescription];
|
||||
|
||||
[
|
||||
{missionNamespace getVariable ["AttendanceTracker_DBConnected", false]},
|
||||
{
|
||||
missionNamespace getVariable ["AttendanceTracker_DBConnected", false] &&
|
||||
missionNamespace getVariable ["AttendanceTracker_missionId", -1] > 0
|
||||
},
|
||||
{"AttendanceTracker" callExtension ["writeAttendance", [[_this] call CBA_fnc_encodeJSON]]},
|
||||
_hash, // args
|
||||
30 // timeout in seconds. if DB never connects, we don't want these building up
|
||||
|
||||
@@ -19,7 +19,10 @@ _hash set ["isJIP", _isJIP];
|
||||
_hash set ["roleDescription", _roleDescription];
|
||||
|
||||
[
|
||||
{missionNamespace getVariable ["AttendanceTracker_DBConnected", false]},
|
||||
{
|
||||
missionNamespace getVariable ["AttendanceTracker_DBConnected", false] &&
|
||||
missionNamespace getVariable ["AttendanceTracker_missionId", -1] > 0
|
||||
},
|
||||
{"AttendanceTracker" callExtension ["writeDisconnectEvent", [[_this] call CBA_fnc_encodeJSON]]},
|
||||
_hash, // args
|
||||
30 // timeout in seconds. if DB never connects, we don't want these building up
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
},
|
||||
"armaConfig": {
|
||||
"dbUpdateIntervalSeconds": 90,
|
||||
"serverEventFillNullMinutes": 90,
|
||||
"missionEventFillNullMinutes": 15,
|
||||
"debug": false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user