-
Notifications
You must be signed in to change notification settings - Fork 345
Extend weapon functionality #2683
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
Conversation
|
Feel like As for permissions: There definitely needs to be a convar for these functions, probably a separate one for each type of function:
Also need to check if you For giving weapon also need to check https://wiki.facepunch.com/gmod/SANDBOX:PlayerGiveSWEP Will do a more in depth review later |
|
My bad hadn't really thought about permissions. |
vurvdev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just need to fix the lints, check E2Lib.isFriend before CanTool and add convars to the functions I previously thought were fine to leave without any convars.
Added check to stripWeapon to throw a runtime error in case the weapon class is invalid. Changed logic for permissions to AND, so you could be either a friend or have cppi perms rather than needing both to access the functions. Added check to the ammo functions to ensure the ammo type is valid, or else throw a runtime error self.entity.player -> self.player Changed invalid weapon error message for giveWeapon functions Fix checkGive using incorrect variable (this) instead of (target)
This implements some new features for the weapon extension.
It has some features mentioned in #2677 and some extra ones.
New Functions
New Events
New Convars
wire_expression2_weapon_ammo_set_enablewire_expression2_weapon_ammo_give_enablewire_expression2_weapon_give_enable