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

SetAmmo&CategoryLimit #2515

Merged
merged 22 commits into from
Jul 2, 2024
Merged

SetAmmo&CategoryLimit #2515

merged 22 commits into from
Jul 2, 2024

Conversation

louis1706
Copy link
Member

No description provided.

@louis1706 louis1706 self-assigned this Apr 21, 2024
@VALERA771
Copy link
Contributor

Maybe add XML for AddOperation?

@louis1706
Copy link
Member Author

Maybe add XML for AddOperation?

i just haven't got the time for it rn

Copy link
Collaborator

@NaoUnderscore NaoUnderscore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix french comments

@louis1706
Copy link
Member Author

Fix french comments

No worries not finished pr

@NaoUnderscore NaoUnderscore marked this pull request as draft May 15, 2024 19:28
@Misfiy
Copy link
Contributor

Misfiy commented May 21, 2024

@louis1706 is this ready for review ?

@louis1706
Copy link
Member Author

No idea

@Misfiy Misfiy requested a review from NaoUnderscore May 24, 2024 13:34
@Misfiy Misfiy added the requires-testing Things need to be verified by an Exiled Developer/Contributor label May 26, 2024
@Misfiy
Copy link
Contributor

Misfiy commented Jun 24, 2024

Fixed some stuff but

                             System.Reflection.TargetException: Object does not match target type.
                               at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00024] in <75633565436c42f0a6426b33f0132ade>:0
                               at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <75633565436c42f0a6426b33f0132ade>:0
                               at Exiled.API.Extensions.MirrorExtensions.AddOperation[T] (Mirror.SyncList`1[T] synclist, Mirror.SyncList`1+Operation[T] op, System.Int32 itemIndex, T oldItem, T newItem, System.Boolean checkAccess) [0x00005] in <08fb87aec36d49e9bf960e3df1b821f7>:0
                               at Exiled.API.Features.Player.SetAmmoLimit (Exiled.API.Enums.AmmoType ammotype, System.UInt16 value) [0x0005f] in <08fb87aec36d49e9bf960e3df1b821f7>:0

@Misfiy Misfiy added the Do not merge Don't merge this PR label Jun 24, 2024
@Misfiy
Copy link
Contributor

Misfiy commented Jun 25, 2024

Spent 6 hours on this, cannot get it working
If someone else is able to do so go ahead, but I am unable

For anyone fixing it
SyncList<T>[index] = newItem might be useful

@louis1706 louis1706 marked this pull request as ready for review June 30, 2024 01:29
@IkaOverride
Copy link
Contributor

note: no error anymore but we need to send the synclist to only one player and not update to the server

@IkaOverride
Copy link
Contributor

IkaOverride commented Jul 1, 2024

I just thought: if we set a limit for one ammo/category, a list for all other will be created and it means armor will not work anymore for every ammo/category?

@Misfiy Misfiy changed the base branch from apis-rework to dev July 1, 2024 18:09
@Misfiy Misfiy added tested This PR has been built and tested and does not cause any obvious errors. and removed Do not merge Don't merge this PR requires-testing Things need to be verified by an Exiled Developer/Contributor labels Jul 1, 2024
@IkaOverride
Copy link
Contributor

IkaOverride commented Jul 2, 2024

breaking change : GetAmmoLimit and GetCategoryLimit both take the bool parameter "ignoreArmor"
fix : Categories that used to return -1 when getting their limit now return 1 (the real limit)

@NaoUnderscore NaoUnderscore merged commit 79a268c into Exiled-Team:dev Jul 2, 2024
3 checks passed
@louis1706 louis1706 deleted the SetAmmo&CategoryLimit branch July 10, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regarding-api tested This PR has been built and tested and does not cause any obvious errors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants