IDI-Systems / acre2

Advanced Combat Radio Environment 2 (ACRE2) for Arma 3
https://acre2.idi-systems.com
GNU General Public License v3.0
205 stars 117 forks source link

Add new Optional to fit AN/PRC-117F into Contact Radiopacks #1261

Closed mrschick closed 1 year ago

mrschick commented 1 year ago

As explained in #854, this PR implements this config in a new Optional, overriding the max load of Radiopacks added by the Contact DLC and allowing them to carry an AN/PRC-117F with room to spare.

jonpas commented 1 year ago

setMaxLoad exists now, which allows you to do it all in a mission or some framework someone is possibly using. This is ultimately easier to implement and use as needed.

// initPlayerLocal.sqf
["loadout", {
    params ["_unit"];
    if (backpack _unit == "B_RadioBag_01_base_F") then {
        ["tag_setMaxLoad", [backpackContainer _unit, 150]] call CBA_fnc_serverEvent;
    };
}, true] call CBA_fnc_addPlayerEventHandler;

// initServer.sqf
["tag_setMaxLoad", {(_this select 0) setMaxLoad (_this select 1)}] call CBA_fnc_addEventHandler;

If we still want a solution in ACRE, we should implement it as an API function, but I really don't see the point when it's that simple and would possibly want to be further modified for a specific use case.

mrschick commented 1 year ago

Thanks for the info, I didn't know about setMaxLoad and presumed that packaging the Config override detailed by Brett as its own mod and running it on every client was the best available way to increase radiopack volume. I agree that the short script is more user friendly than an Optional would be, no real need for an in-ACRE solution 👍🏻