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

Feature request: add an option to "remove other weapons" #57

Open
Tiagoquix opened this issue Nov 2, 2023 · 1 comment
Open

Feature request: add an option to "remove other weapons" #57

Tiagoquix opened this issue Nov 2, 2023 · 1 comment
Labels
enhancement New feature or request wontfix-community This will not be worked on, but is open for the community

Comments

@Tiagoquix
Copy link

Tiagoquix commented Nov 2, 2023

One interesting thing that could be added to the plugin is an option called "remove other weapons" (with the default value of zero) when using a custom weapon.

It works exactly the way you think: when such a custom weapon is used, all other weapons will be removed from the player's loadout.

One exception could be made to the Engineer's melee weapons to not make them delete his PDAs, and another could be made for the Spy's disguise kit (these two exceptions would also be options, with both having the default value of zero).

@nosoop nosoop added the enhancement New feature or request label Nov 2, 2023
@nosoop
Copy link
Owner

nosoop commented Nov 23, 2023

I imagine this would be useful for something like Saxton Hale's fists.

One could probably create this at the native attribute level:

  1. Implement a disallows_weapon_slots attribute with value_is_or to indicate a bitset of items to remove.
  2. In a post-hook on CTFPlayer::ValidateWeapons, calculate the attribute result and remove / switch items accordingly.
  3. Prevent players from picking up items that occupy those slots.

I don't think this is something that should be implemented at the CWX level; even if it had first-class support for recognizing that functionality, there would be no way to communicate this in the game client's loadout menu.

Should someone implement a native attribute for this, it's likely that there would need to be changes in CWX to ensure its items are ready by the time the removal checks are performed.

I'll leave this open for now pending further evaluation.

@nosoop nosoop added the wontfix-community This will not be worked on, but is open for the community label Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix-community This will not be worked on, but is open for the community
Projects
None yet
Development

No branches or pull requests

2 participants