diff --git a/code/modules/projectiles/guns/projectile/pistol.dm b/code/modules/projectiles/guns/projectile/pistol.dm index 7a3a0742625..885aa40f6f9 100644 --- a/code/modules/projectiles/guns/projectile/pistol.dm +++ b/code/modules/projectiles/guns/projectile/pistol.dm @@ -40,6 +40,7 @@ mag_type = /obj/item/ammo_box/magazine/m45/enforcer45 can_suppress = TRUE unique_reskin = TRUE + can_flashlight = TRUE /obj/item/weapon/gun/projectile/automatic/pistol/enforcer/update_icon() ..() @@ -50,6 +51,14 @@ overlays.Cut() if(suppressed) overlays += image(icon = icon, icon_state = "enforcer_supp", pixel_x = 4) + if(gun_light) + var/iconF = "Enforcer_light" + if(gun_light.on) + iconF = "Enforcer_light-on" + overlays += image(icon = icon, icon_state = iconF, pixel_x = 3) + +/obj/item/weapon/gun/projectile/automatic/pistol/enforcer/ui_action_click() + toggle_gunlight() /obj/item/weapon/gun/projectile/automatic/pistol/enforcer/New() ..() diff --git a/code/modules/projectiles/guns/projectile/toy.dm b/code/modules/projectiles/guns/projectile/toy.dm index bcf6a712663..f79c25f8078 100644 --- a/code/modules/projectiles/guns/projectile/toy.dm +++ b/code/modules/projectiles/guns/projectile/toy.dm @@ -46,6 +46,19 @@ desc = "A foam version of the Enforcer meant to be used for training new caddets who can't be trusted with rubber bullets." icon_state = "enforcer" mag_type = /obj/item/ammo_box/magazine/toy/enforcer + can_flashlight = TRUE + +/obj/item/weapon/gun/projectile/automatic/toy/pistol/enforcer/update_icon() + ..() + overlays.Cut() + if(gun_light) + var/iconF = "Enforcer_light" + if(gun_light.on) + iconF = "Enforcer_light-on" + overlays += image(icon = 'icons/obj/guns/projectile.dmi', icon_state = iconF, pixel_x = 3) + +/obj/item/weapon/gun/projectile/automatic/toy/pistol/enforcer/ui_action_click() + toggle_gunlight() /obj/item/weapon/gun/projectile/shotgun/toy name = "foam force shotgun" diff --git a/icons/obj/guns/projectile.dmi b/icons/obj/guns/projectile.dmi index 3c619048f57..2a0cfc9a55d 100644 Binary files a/icons/obj/guns/projectile.dmi and b/icons/obj/guns/projectile.dmi differ