Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow extra items to be allowed for vehicle gear. #438

Open
Drofseh opened this issue Mar 30, 2022 · 1 comment
Open

Allow extra items to be allowed for vehicle gear. #438

Drofseh opened this issue Mar 30, 2022 · 1 comment

Comments

@Drofseh
Copy link
Contributor

Drofseh commented Mar 30, 2022

Issue:

At present to add an item to TMF Vehicle Gear the item has to be assigned to a unit loadout.

In some loadouts I am working on I am randomizing weapons that have incompatible magazines, and then adding the magazines via the code entry.
Example:

class rifleman : baseMan {
    displayName = "Rifleman";
    primaryWeapon[] = {
        LIST_6("CUP_arifle_AKM_Early"),
        LIST_2("CUP_arifle_AKMS_Early"),
        LIST_2("CUP_SKS")
    };
    magazines[] = {
        LIST_2("CUP_HandGrenade_RGD5"),
        LIST_2("ACE_HandFlare_White"),
        "ACE_HandFlare_Yellow",
        "ACE_HandFlare_Red",
        "ACE_HandFlare_Green"
    };
    code = "                                                                                                                              \
        private _primaryWeapon = primaryWeapon _this;                                                                                     \
        private _vest = vestContainer _this;                                                                                              \
        switch true do {                                                                                                                  \
            case (                                                                                                                        \
                _primaryWeapon isEqualTo 'CUP_arifle_AKM_Early'                                                                           \
                || {_primaryWeapon isEqualTo 'CUP_arifle_AKMS_Early'}                                                                     \
            ) : {_vest addItemCargoGlobal ['CUP_30Rnd_762x39_AK47_bakelite_M', 5]};                                                       \
            case (_primaryWeapon isEqualTo 'CUP_SKS') : {_vest addItemCargoGlobal ['CUP_10Rnd_762x39_SKS_M', 9]};                         \
            case (_primaryWeapon isEqualTo 'CUP_arifle_AKMS_Early') : {_vest addItemCargoGlobal ['CUP_30Rnd_762x39_AK47_bakelite_M', 5]}; \
        };                                                                                                                                \
    ";
};

Because the primary weapon magazines are added via the code entry, they do not show up in the TMF Vehicle Gear options for the faction.

Solution I'd like:

A way to allow a list of items per faction to allow in TMF Vehicle Gear, even if they are not assigned to a unit loadout.

Current workaround:

My current workaround is to have an item monkey loadout that is given one of each item.

Example:

class itemMonkey : baseMan {
    displayName = "Item Monkey (used to make extra items accessible in TMF Vehicle Gear)";
    magazines[] = {
        "CUP_30Rnd_762x39_AK47_bakelite_M",
        "CUP_10Rnd_762x39_SKS_M"
    };
};

This workaround could be the solution if there was a way to prevent the loadout from showing up in the eden loadout selection and the #loadout chat command menu

Example:

class itemMonkey : baseMan {
    displayLoadout = false;
    magazines[] = {
        "CUP_30Rnd_762x39_AK47_bakelite_M",
        "CUP_10Rnd_762x39_SKS_M"
    };
};
@Drofseh
Copy link
Contributor Author

Drofseh commented Mar 30, 2022

related issue #437

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant