This commit corrects a typo in the cargo damage handler within `fnc_makeCargo.sqf`. The event handler name was misspelled as "Dammaged" instead of "Damaged". This has been corrected to ensure the event handler functions as intended. Additionally, the hint message displayed when cargo is severely damaged also had the same typo, which has been corrected.
This commit introduces a new "delivery" task type and enhances the task assignment process for various entities.
The following changes were made:
- Added `delivery` and `deliveryModule` to `XEH_PREP.hpp` for pre-processing.
- Added `GVAR(allCargo)` to `XEH_preInit.sqf` to track cargo objects.
- Implemented `delivery` case in `fnc_handler.sqf` to handle delivery tasks.
- Added `makeCargo` to `XEH_PREP.hpp` for pre-processing.
- Refactored `fnc_makeShooter.sqf`, `fnc_makeObject.sqf`, `fnc_makeTarget.sqf`, `fnc_makeHVT.sqf`, `fnc_makeHostage.sqf`, and `fnc_makeIED.sqf` to:
- Update descriptions to reflect assignment rather than registration.
- Add error handling for null entities and missing task IDs.
- Add diag_log messages for debugging.
- Standardize parameter handling.
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.
This commit refactors how organization funds and reputation are handled, updates task completion logic to use the new organization functions, and modifies player saving to include organization data. Additionally, it introduces string serialization/deserialization and fixes a player save loop.
* **Organization Funds and Reputation:** Replaces direct server calls for handling funds and reputation with calls to the new organization functions (`EFUNC(org,addFunds)` and `EFUNC(org,addReputation)`). This centralizes fund and reputation management within the organization store.
* **Task Completion Logic:** Updates task completion functions (`fnc_destroy.sqf`, `fnc_attack.sqf`, `fnc_hostage.sqf`, `fnc_hvt.sqf`, `fnc_defuse.sqf`) to use the new organization functions for adding funds and reputation upon task success or failure. Also adds notifications to inform the player of reputation and fund changes.
* **Player Saving:** Modifies the player saving function (`fnc_playerDBSave.sqf`) to include the player's organization ID in the saved data.
* **String Serialization/Deserialization:** Adds `serializeString` and `deserializeString` PREP macros to `XEH_PREP.hpp` and uses them in `fnc_handleOrgLoad.sqf` and `fnc_create.sqf` to handle special characters in organization and member names.
* **Player Save Loop Fix:** Removes unnecessary brackets from the `call FUNC(playerDBSave)` in `fnc_playerSaveLoop.sqf`.
* **Organization Purchase Verification:** Adds organization ownership verification to `fnc_handlePurchase.sqf` to ensure only the owner can make purchases using organization funds.
* **Player Initialization:** Updates `fnc_initPlayer.sqf` to retrieve and set the player's organization upon initialization.