server/addons/db/functions/fnc_loadFromMission.sqf
Jacob Schmidt bec0adcdbf feat: Update build environment and add XEH PREP
This commit includes the following changes:

-   Updates the build environment in the GitHub Actions workflow to use `ubuntu-latest` instead of `ubuntu-22.04`.
-   Adds `playerGroup2Server` to the XEH_PREP.hpp file.
-   Updates the picture path in CfgMods.hpp to include the file extension.
2025-03-28 09:46:08 -05:00

32 lines
689 B
Plaintext

#include "..\script_component.hpp"
/*
* Function: forge_server_db_fnc_loadFromMission
* Author: J. Schmidt
*
* Description:
* Loads data from mission namespace using the database interface
*
* Arguments:
* 0: _name - Store name <STRING>
* 1: _key - Key to retrieve <STRING>
* 2: _default - Default value if not found <ANY>
*
* Return Value:
* Retrieved data or default value
*/
params [
["_name", "", [""]],
["_key", "", [""]],
["_default", nil]
];
private _database = call FUNC(verifyDB);
private _store = _database call ["getStore", [_name]];
if (isNil "_store") exitWith {
_default
};
[_name, _key, _default, missionNamespace] call FUNC(getFromStore)