Skip to content

Commit

Permalink
add: suppressor for sp91 and wt550 (#5960)
Browse files Browse the repository at this point in the history
add suppressor for sp91 and wt550

Co-authored-by: Limitless <[email protected]>
  • Loading branch information
AlebriumUltra and Alebrium authored Oct 18, 2024
1 parent c382513 commit 6270856
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions code/modules/projectiles/guns/projectile/automatic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
magin_sound = 'sound/weapons/gun_interactions/batrifle_magin.ogg'
magout_sound = 'sound/weapons/gun_interactions/batrifle_magout.ogg'
fire_delay = 2
can_suppress = FALSE
can_suppress = TRUE
can_flashlight = TRUE
burst_size = 2
can_bayonet = TRUE
Expand All @@ -146,6 +146,11 @@
/obj/item/gun/projectile/automatic/wt550/update_icon_state()
icon_state = "wt550[magazine ? "-[CEILING(get_ammo(FALSE)/4, 1)*4]" : ""]"

/obj/item/gun/projectile/automatic/wt550/update_overlays()
. = ..()
if(suppressed)
. += image(icon = icon, icon_state = "wt-sp_supp", pixel_x = 3)


/obj/item/gun/projectile/automatic/wt550/ui_action_click(mob/user, datum/action/action, leftclick)
if(..())
Expand All @@ -165,7 +170,7 @@
magin_sound = 'sound/weapons/gun_interactions/batrifle_magin.ogg'
magout_sound = 'sound/weapons/gun_interactions/batrifle_magout.ogg'
fire_delay = 2
can_suppress = FALSE
can_suppress = TRUE
can_flashlight = TRUE
burst_size = 3
can_bayonet = FALSE
Expand All @@ -176,6 +181,10 @@
icon_state = "SP-91-RC[magazine ? "-[CEILING(get_ammo(FALSE)/5, 1)*5]" : ""]"
item_state = "SP-91-RC[magazine ? "-[get_ammo(FALSE) ? "20" : "0"]" : ""]"

/obj/item/gun/projectile/automatic/sp91rc/update_overlays()
. = ..()
if(suppressed)
. += image(icon = icon, icon_state = "wt-sp_supp", pixel_x = 3)

/obj/item/gun/projectile/automatic/sp91rc/ui_action_click(mob/user, datum/action/action, leftclick)
if(..())
Expand Down
Binary file modified icons/obj/weapons/projectile.dmi
Binary file not shown.

0 comments on commit 6270856

Please sign in to comment.