diff --git a/code/datums/ammo/ammo.dm b/code/datums/ammo/ammo.dm index a59290ab5f51..7395328427e5 100644 --- a/code/datums/ammo/ammo.dm +++ b/code/datums/ammo/ammo.dm @@ -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() diff --git a/code/datums/ammo/bullet/revolver.dm b/code/datums/ammo/bullet/revolver.dm index f9ab0b12d34e..287a90082f46 100644 --- a/code/datums/ammo/bullet/revolver.dm +++ b/code/datums/ammo/bullet/revolver.dm @@ -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" diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 69a458a983d0..197b40adb231 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -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) @@ -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)