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

[Resupply Module] Handle disposable launchers gracefully #4

Open
hbjydev opened this issue Sep 7, 2024 · 0 comments
Open

[Resupply Module] Handle disposable launchers gracefully #4

hbjydev opened this issue Sep 7, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@hbjydev
Copy link
Collaborator

hbjydev commented Sep 7, 2024

Currently, if someone has a loaded disposable launcher, the resupply module will just drop the rockets themselves (i.e. the disposable launcher's ammo) into the crate. This is pointless and unhelpful.

We need to:

  1. Check if the launcher is disposable
  2. If it is disposable, put a new launcher in there
  3. If it's not, put the currently-loaded rounds in there

Quick fix would just be statically adding a number of AT4s into the crate, but I don't really like that idea. It should be clever enough to know how to do it.


Possible solutions:

  • Quick: Keep a set of RHS M136es in the box statically (or based on player count)
  • Hard: Maintain a list of class names for disposable launchers and check against that (will be a pain to maintain over time)
  • Annoying: Make a function that knows about a few mods' way of doing things (i.e. CBA and RHS) and uses those to determine if the launcher is disposable or not
    • RHS has RHS_isDisposable = 1 on all their disposable launcher weapon classes (configFile >> "CfgWeapons")
    • CBA stores a config containing disposable launchers called CBA_DisposableLaunchers (configFile >> "CBA_DisposableLaunchers").
@hbjydev hbjydev added enhancement New feature or request good first issue Good for newcomers labels Sep 7, 2024
@hbjydev hbjydev self-assigned this Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant