-
Notifications
You must be signed in to change notification settings - Fork 522
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
Ammo Piles #9195
Ammo Piles #9195
Conversation
!review |
var/obj/first_round = new ammo_type(get_turf(src)) | ||
add_ammo(first_round) | ||
check_name_and_ammo() | ||
for(var/i = 1, i <= max_ammo - 1, i++) |
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.
shouldn't this use the projectile's max_stack?
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.
it does, check_name_and_ammo sets max_ammo and properly names the pile
if(istype(W, /obj/item/ammo_casing)) | ||
if(W.type != ammo_type) | ||
to_chat(user, SPAN_WARNING("\The [W] has a different type of ammunition!")) | ||
return | ||
if(length(ammo) >= max_ammo) | ||
to_chat(user, SPAN_WARNING("\The [src] is already fully stacked.")) | ||
return | ||
var/obj/item/ammo_casing/B = W | ||
if(!B.BB) | ||
to_chat(user, SPAN_WARNING("\The [B] is spent!")) | ||
return | ||
to_chat(user, SPAN_NOTICE("You add \the [W] to \the [src].")) | ||
add_ammo(W) |
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.
aren't all of these checks already done in add_ammo?
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.
sorta, the one in add_ammo is a safety measure to prevent spent casings from ever getting in. these have more checks that won't be earth shatteringly bad if they somehow were wrong
Discovered a bug where 7.62mm can only be stacked into piles of two before it tells you they are "of a different ammo type" also I managed to duplicate ammo from a magazine of 5 bullets to 6 by trying to stack them in a pile while they were within a bag. |
@Forktress make a github report in the issues section, please. |
Inspired by BoHBranch/BoH-Bay#519