feat: [😭] Firearm AmmoModules Api#288
Conversation
|
All ammoModules🥹 firearm: GunCOM15
- barrel: AutomaticActionModule
- primary: MagazineModule
firearm: GunCOM18
- barrel: AutomaticActionModule
- primary: MagazineModule
firearm: GunE11SR
- barrel: AutomaticActionModule
- primary: MagazineModule
firearm: GunCrossvec
- barrel: AutomaticActionModule
- primary: MagazineModule
firearm: GunFSP9
- barrel: AutomaticActionModule
- primary: MagazineModule
firearm: GunLogicer
- barrel: AutomaticActionModule
- primary: MagazineModule
firearm: GunRevolver
- primary: CylinderAmmoModule
firearm: GunAK
- barrel: AutomaticActionModule
- primary: MagazineModule
firearm: GunShotgun
- barrel: PumpActionModule
- primary: MagazineModule
firearm: GunCom45
- barrel: AutomaticActionModule
- primary: MagazineModule
firearm: ParticleDisruptor
- primary: MagazineModule
firearm: GunFRMG0
- barrel: AutomaticActionModule
- primary: MagazineModule
firearm: GunA7
- barrel: AutomaticActionModule
- primary: MagazineModule |
|
Anyway until we come to an agreement on that Ill leave it to the draft |
|
I like the idea of separating the barrel and the magazine. It will be way too complex to handle them all in one place. We would deal with more edge cases and a much higher chance that something just doesn't work. |
|
Lgtm. For some people may be too complex to use but game the game is also is not too easy to understand. So if people don't need to use a lot of classes to get a ammo and and if we don't have a 70 line ammo setter I agree |
|
Also waiting for these guys opinions |
louis1706
left a comment
There was a problem hiding this comment.
I am lazzy to finish just inlined everything than can be inlined
EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/PumpBarrelMagazine.cs
Outdated
Show resolved
Hide resolved
EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/PumpBarrelMagazine.cs
Outdated
Show resolved
Hide resolved
EXILED/Exiled.API/Features/Items/FirearmModules/Primary/CylinderMagazine.cs
Outdated
Show resolved
Hide resolved
EXILED/Exiled.API/Features/Items/FirearmModules/Primary/CylinderMagazine.cs
Outdated
Show resolved
Hide resolved
EXILED/Exiled.API/Features/Items/FirearmModules/Primary/CylinderMagazine.cs
Outdated
Show resolved
Hide resolved
EXILED/Exiled.API/Features/Items/FirearmModules/Primary/CylinderMagazine.cs
Outdated
Show resolved
Hide resolved
EXILED/Exiled.API/Features/Items/FirearmModules/Primary/CylinderMagazine.cs
Outdated
Show resolved
Hide resolved
|
Is this PR is ready for reviews and tests? I think it's one the best one from other PRs which are fixing firearm properties |
AmmoModules ApiAmmoModules Api
endless loop for creating magazine wrappers
|
Some things (a lot) can be inlined. But generally looks good if you've tested magazine API |
louis1706
left a comment
There was a problem hiding this comment.
It's all fine to merge when this will be completed (it's can be done after it's merge if needed)
the only important it's for AmmoDrain.cs file about comment on the GetInstructions method
EXILED/Exiled.API/Features/Items/FirearmModules/Barrel/AutomaticBarrelMagazine.cs
Outdated
Show resolved
Hide resolved
EXILED/Exiled.API/Features/Items/FirearmModules/Primary/NormalMagazine.cs
Outdated
Show resolved
Hide resolved
EXILED/Exiled.API/Features/Items/FirearmModules/Primary/NormalMagazine.cs
Outdated
Show resolved
Hide resolved
EXILED/Exiled.API/Features/Items/FirearmModules/Primary/NormalMagazine.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com>
…icBarrelMagazine.cs Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com>
…Magazine.cs Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com>
…Magazine.cs Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com>
…Magazine.cs Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com>
|
Epic 🧀 |
Description
Describe the changes
inspired by #255
I was thinking about more flexible logic for setting ammo. My first idea was to make better abstractions of
BarrelandPrimarymagazines(that what i did in that pr firstly). I liked that idea, and that gave me a possibility to add more specific api for specific magazines (Rotatefor revolvers, or bolt locking for automatic firearms as example). But there is 2 questions about ammo setters and for modules in general:Ammo/MaxAmmosetters? When i finished with main part of api, and started thinking about totalAmmosetter. And I really dont think an absolute/total ammo setter like before 14.0 is needed. This setter has an overly complex background and logic. Even if we position Exiled as a highlevel api, I still dont think its necessary to make a single setter for barrel and magazine ammos. But anyway that my honest shizo opinion says. Really wait for feedback😘oh, and i added RotatingRevolver event😎
What is the current behavior? (You can also link to an open issue here)
😥
What is the new behavior? (if this is a feature change)
😎
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
😓
Other information:
🥹
Types of changes
Submission checklist
Patches (if there are any changes related to Harmony patches)
Main Axioms that i used for api logic, or tldr😎
BarrelandNormalmagazines should be clearly segregated for the convenience of peopleAmmosetters should be available, despite the lack of this abstraction in the basegame.BarrelAmmoMagazineAmmofull properties, and makeTotalAmmoonly with getter