
All checks were successful
Build / Build (push) Successful in 28s
This commit refactors several client-side functions to improve code consistency and readability. - Standardizes function descriptions by removing redundant "Function: forge_client..." prefixes and "[Description]" sections, focusing on concise descriptions of the function's purpose. - Updates variable handling in arsenal functions to use GVAR and EGVARS for default values, improving consistency and reducing code duplication. - Removes the bank init function as it is no longer needed. - Adds a done variable to the preinit file.
39 lines
973 B
Plaintext
39 lines
973 B
Plaintext
#include "..\script_component.hpp"
|
|
|
|
/*
|
|
* Author: IDSolutions
|
|
* Submits the timesheet
|
|
*
|
|
* Arguments:
|
|
* None
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Examples:
|
|
* None
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
|
|
private _payMultiplyer = "MULTIPLYR" call BFUNC(getParamValue);
|
|
private _plyscore = rating player; //TODO: Implement rating from server
|
|
private _multiplyer = _plyscore * _payMultiplyer;
|
|
|
|
_bank = _bank + _multiplyer;
|
|
|
|
private _formattedRating = _bank call EFUNC(misc,formatNumber);
|
|
private _messageData = createHashMapFromArray [
|
|
["event", "SUBMIT::TIMESHEET"],
|
|
["data", []]
|
|
];
|
|
|
|
private _response = ["forge_client_bank_handleEvents", (toJSON _messageData)] call CFUNC(localEvent);
|
|
|
|
if (_response) then {
|
|
[format ["Submitted timesheet! Received $%1 based on rating of %2", _formattedRating, _plyscore], "info", 3, "right"] call EFUNC(misc,notify);
|
|
} else {
|
|
[format ["Timesheet submission failed"], "warning", 3, "right"] call EFUNC(misc,notify);
|
|
};
|
|
|
|
[] call FUNC(refresh); |