-
Notifications
You must be signed in to change notification settings - Fork 108
feat: Changes to ReadPickupInfoBefore to include more information when converting between Pickup and Item. #804
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -128,13 +128,38 @@ | |
| /// <returns>A string containing FirearmPickup related data.</returns> | ||
| public override string ToString() => $"{Type} ({Serial}) [{Weight}] *{Scale}*"; | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the damage for this <see cref="FirearmPickup"/>. | ||
| /// </summary> | ||
| public float Damage { get; set; } | ||
|
Check failure on line 134 in EXILED/Exiled.API/Features/Pickups/FirearmPickup.cs
|
||
|
|
||
| /// <summary> | ||
| /// Gets or sets the inaccuracy for this <see cref="FirearmPickup"/>. | ||
| /// </summary> | ||
| public float Inaccuracy { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the penetration for this <see cref="FirearmPickup"/>. | ||
| /// </summary> | ||
| public float Penetration { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets how much fast the value drop over the distance. | ||
| /// </summary> | ||
| public float DamageFalloffDistance { get; set; } | ||
|
|
||
| /// <inheritdoc/> | ||
| internal override void ReadItemInfo(Items.Item item) | ||
| { | ||
| if (item is Items.Firearm firearm) | ||
| { | ||
| MaxAmmo = firearm.PrimaryMagazine.ConstantMaxAmmo; | ||
| AmmoDrain = firearm.AmmoDrain; | ||
|
|
||
| Damage = firearm.Damage; | ||
| Inaccuracy = firearm.Inaccuracy; | ||
| Penetration = firearm.Penetration; | ||
| DamageFalloffDistance = firearm.DamageFalloffDistance; | ||
| } | ||
|
|
||
| base.ReadItemInfo(item); | ||
|
|
||
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.
Place these on top of the methods