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

Revives heavy revolver ammo #6456

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions code/datums/ammo/ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@
/// The flicker that plays when a bullet hits a target. Usually red. Can be nulled so it doesn't show up at all.
var/hit_effect_color = "#FF0000"

/// How much fire delay to add to the weapon after firing this kind of ammo
var/fire_delay_modifier = 0

/datum/ammo/New()
set_bullet_traits()

Expand Down
6 changes: 3 additions & 3 deletions code/datums/ammo/bullet/revolver.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
damage = 35
penetration = ARMOR_PENETRATION_TIER_4
accuracy = HIT_ACCURACY_TIER_3
fire_delay_modifier = 1 SECONDS

/datum/ammo/bullet/revolver/heavy/on_hit_mob(mob/entity, obj/projectile/bullet)
slowdown(entity, bullet)
pushback(entity, bullet, 4)
/datum/ammo/bullet/revolver/heavy/on_hit_mob(mob/M, obj/projectile/P)
knockback(M, P, 4)

/datum/ammo/bullet/revolver/incendiary
name = "incendiary revolver bullet"
Expand Down
4 changes: 3 additions & 1 deletion code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1142,6 +1142,8 @@ and you're good to go.
flags_gun_features &= ~GUN_BURST_FIRING
return NONE

var/ammo_fire_delay = projectile_to_fire.ammo.fire_delay_modifier // Save this early because projectile_to_fire is going to be nulled

apply_bullet_effects(projectile_to_fire, user, reflex, dual_wield) //User can be passed as null.
SEND_SIGNAL(projectile_to_fire, COMSIG_BULLET_USER_EFFECTS, user)

Expand Down Expand Up @@ -1204,7 +1206,7 @@ and you're good to go.
if(check_for_attachment_fire)
active_attachable.last_fired = world.time
else
last_fired = world.time
last_fired = world.time + ammo_fire_delay
var/delay_left = (last_fired + fire_delay + additional_fire_group_delay) - world.time
if(fire_delay_group && delay_left > 0)
LAZYSET(user.fire_delay_next_fire, src, world.time + delay_left)
Expand Down
Loading