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

feat: Configurable consumption of raid item #128

Merged
merged 2 commits into from
Aug 27, 2023

Conversation

WLVF
Copy link
Contributor

@WLVF WLVF commented Aug 22, 2023

Overview

This PR allows server owners and developers to either utilize the script's item removal system when executing a raid.

Details

In the config, I have provided a new config value that will allow server owners and developers to configure whether or not they prefer to consume the raid item upon use. I have left it disabled by default to prevent frustration from individuals that like to skim through configs or drag and drop without even looking at it.

UI Changes / Functionality

The shared/config.lua file has been adjusted to include a new field ConsumeRaidItem that determines whether or not server/sv_property.lua will fully consume the item upon use. There is also a small tip that will let server owners and developers know that it's encouraged to use ox_inventory's supported consumption feature because it will make the item have durability instead.

Testing Steps

Perform a raid on a property.
If you have Config.ConsumeRaidItem's value as true, it should consume the raid item that's been set as Config.RaidItem's value.
If you have Config.ConsumeRaidItem's value as false, the code will not automatically remove the raid item that's been set as Config.RaidItem's value.

  • [YES] Did you test the changes you made?
  • [YES] Did you test core functionality of the script to ensure your changes do not regress other areas?
  • [YES] Did you test your changes in multiplayer to ensure it works correctly on all clients?

@WLVF WLVF changed the title Config raiditem consumable feat: Configurable consumption of raid item Aug 22, 2023
@MonkeyWhisper MonkeyWhisper merged commit 738d1a0 into Project-Sloth:main Aug 27, 2023
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

Successfully merging this pull request may close these issues.

2 participants