anchor.diff:  	usr.set_machine(src)
   
   	if (href_list["lock"])
  -		coverlocked = !coverlocked
  +		if(!locked || (istype(usr, /mob/living/silicon/ai) && !src.aidisabled))
  +			coverlocked = !coverlocked
   
   	else if (href_list["breaker"])
  -		toggle_breaker()
  +		if(!locked || (istype(usr, /mob/living/silicon/ai) && !src.aidisabled))
  +			toggle_breaker()
   
   	else if (href_list["cmode"])
  -		chargemode = !chargemode
  -		if(!chargemode)
  -			charging = 0
  +		if(!locked || (istype(usr, /mob/living/silicon/ai) && !src.aidisabled))
  +			chargemode = !chargemode
  +			if(!chargemode)
  +				charging = 0
  +				update_icon()
  +
  +	else if (href_list["eqp"])
  +		if(!locked || (istype(usr, /mob/living/silicon/ai) && !src.aidisabled))
  +			var/val = text2num(href_list["eqp"])
  +			equipment = setsubsystem(val)
   			update_icon()
  -
  -	else if (href_list["eqp"])
  -		var/val = text2num(href_list["eqp"])
  -
  -		equipment = setsubsystem(val)
  -		update_icon()
  -		update()
  +			update()
   
   	else if (href_list["lgt"])
  -		var/val = text2num(href_list["lgt"])
  -
  -		lighting = setsubsystem(val)
  -		update_icon()
  -		update()
  +		if(!locked || (istype(usr, /mob/living/silicon/ai) && !src.aidisabled))
  +			var/val = text2num(href_list["lgt"])
  +			lighting = setsubsystem(val)
  +			update_icon()
  +			update()
   
   	else if (href_list["env"])
  -		var/val = text2num(href_list["env"])
  -
  -		environ = setsubsystem(val)
  -		update_icon()
  -		update()
  +		if(!locked || (istype(usr, /mob/living/silicon/ai) && !src.aidisabled))
  +			var/val = text2num(href_list["env"])
  +			environ = setsubsystem(val)
  +			update_icon()
  +			update()
   
   	else if( href_list["close"] )
   		usr << browse(null, "window=apc")
  
positive.code: 
  	else if (href_list["malfhack"])
  		var/mob/living/silicon/ai/malfai = usr
  		if( istype(malfai, /mob/living/silicon/ai) && !src.aidisabled && (ticker && ticker.mode && (malfai.mind in ticker.mode.malf_ai)) )
  			if (malfai.malfhacking)
  				malfai << "You are already hacking an APC."
  				return 1
  
negative.code: 			malfStatus = 1 // 1 = APC not hacked.
  	else
  		malfStatus = 0 // 0 = User is not a Malf AI
  	return malfStatus
  
  
  /obj/machinery/power/apc/ui_interact(mob/user, ui_key = "main")
  	if(!user)
  		return
  
  	var/malfStatus = get_malf_status(user)
  
  	var/list/data = list(
  		"locked" = locked,
  