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

Arsenal - Reuse current inventory containers when importing invalid loadouts #10364

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mrschick
Copy link
Contributor

@mrschick mrschick commented Oct 5, 2024

When merged this pull request will:

  • When importing a stored loadout which has a uniform/vest/backpack that is missing or from an unloaded mod, retain the currently equipped container and fill it with available items from the stored loadout.

The use case for this change is missions in which the arsenal is restricted to clothing from a specific faction, but still contains all the usual medical and other specialized equipment for a given role.
Previously, even if one had saved a very similar loadout, but with a different camo, it was impossible to load it without losing all clothing items. Forcing one to redo the entire loadout from scratch.
With this change, it will be possible to import such a loadout, so that the numerous equipment items will be placed in already worn clothing of the specific faction, saving time.

If "" is given as a container, an error is thrown, therefore, filter out all unavailable/null containers

I realize that this was part of optimization work in #9316. Since it hinders this implementation, I removed that check. I have not found it causing errors when importing loadouts.

@LinkIsGrim
Copy link
Contributor

LinkIsGrim commented Oct 16, 2024

I realize that this was part of optimization work in #9316.

I think loadout validation is spread out over multiple frames now so it doesn't matter as much

Just for confirmation's sake: does this only apply if the class doesn't exist, or also for items that aren't available in the arsenal as well?

Not the problem if the latter, it opens up an interesting possibility (layered loadouts)

@mrschick
Copy link
Contributor Author

does this only apply if the class doesn't exist, or also for items that aren't available in the arsenal as well?

It applies whenever fnc_verifyLoadout.sqf returns an inventory container's config name as "", which happens in both cases.

@LinkIsGrim LinkIsGrim added the kind/change Release Notes: **CHANGED:** label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/change Release Notes: **CHANGED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants