anchor.diff:  			set_light(gun_light.brightness_on)
   		else
   			set_light(0)
  -		cut_overlays(flashlight_overlay, TRUE)
  +	else
  +		set_light(0)
  +	update_icon()
  +	for(var/X in actions)
  +		var/datum/action/A = X
  +		A.UpdateButtonIcon()
  +
  +/obj/item/gun/pickup(mob/user)
  +	..()
  +	if(azoom)
  +		azoom.Grant(user)
  +
  +/obj/item/gun/dropped(mob/user)
  +	. = ..()
  +	if(azoom)
  +		azoom.Remove(user)
  +	if(zoomed)
  +		zoom(user,FALSE)
  +
  +/obj/item/gun/update_overlays()
  +	. = ..()
  +	if(gun_light)
  +		var/mutable_appearance/flashlight_overlay
   		var/state = "[gunlight_state][gun_light.on? "_on":""]"	//Generic state.
   		if(gun_light.icon_state in icon_states('icons/obj/guns/flashlights.dmi'))	//Snowflake state?
   			state = gun_light.icon_state
   		flashlight_overlay = mutable_appearance('icons/obj/guns/flashlights.dmi', state)
   		flashlight_overlay.pixel_x = flight_x_offset
   		flashlight_overlay.pixel_y = flight_y_offset
  -		add_overlay(flashlight_overlay, TRUE)
  -		add_overlay(knife_overlay, TRUE)
  -	else
  -		set_light(0)
  -		cut_overlays(flashlight_overlay, TRUE)
  -		flashlight_overlay = null
  -	update_icon(TRUE)
  -	for(var/X in actions)
  -		var/datum/action/A = X
  -		A.UpdateButtonIcon()
  -
  -/obj/item/gun/pickup(mob/user)
  -	..()
  -	if(azoom)
  -		azoom.Grant(user)
  -
  -/obj/item/gun/dropped(mob/user)
  -	. = ..()
  -	if(azoom)
  -		azoom.Remove(user)
  -	if(zoomed)
  -		zoom(user,FALSE)
  +		. += flashlight_overlay
  +
  +	if(bayonet)
  +		var/mutable_appearance/knife_overlay
  +		var/state = "bayonet"							//Generic state.
  +		if(bayonet.icon_state in icon_states('icons/obj/guns/bayonets.dmi'))		//Snowflake state?
  +			state = bayonet.icon_state
  +		var/icon/bayonet_icons = 'icons/obj/guns/bayonets.dmi'
  +		knife_overlay = mutable_appearance(bayonet_icons, state)
  +		knife_overlay.pixel_x = knife_x_offset
  +		knife_overlay.pixel_y = knife_y_offset
  +		. += knife_overlay
   
   /obj/item/gun/proc/handle_suicide(mob/living/carbon/human/user, mob/living/carbon/human/target, params, bypass_timer)
   	if(!ishuman(user) || !ishuman(target))
  
positive.code: 
  	var/can_flashlight = FALSE //if a flashlight can be added or removed if it already has one.
  	var/obj/item/flashlight/seclite/gun_light
  	var/mutable_appearance/flashlight_overlay
  	var/datum/action/item_action/toggle_gunlight/alight
  	var/gunlight_state = "flight"
  
  	var/can_bayonet = FALSE //if a bayonet can be added or removed if it already has one.
  	var/obj/item/kitchen/knife/bayonet
  	var/mutable_appearance/knife_overlay
  	var/knife_x_offset = 0
  	var/knife_y_offset = 0
  
  
negative.code: 			return
  		to_chat(user, "<span class='notice'>You attach [K] to [src]'s bayonet lug.</span>")
  		bayonet = K
  		update_icon()
  
  	else
  		return ..()
  
  