diff --git a/code/datums/wires/autolathe.dm b/code/datums/wires/autolathe.dm index 80f5b4ace97..0fe2c9f2fcf 100644 --- a/code/datums/wires/autolathe.dm +++ b/code/datums/wires/autolathe.dm @@ -27,7 +27,8 @@ var/const/AUTOLATHE_DISABLE_WIRE = 4 var/obj/machinery/autolathe/A = holder switch(index) if(AUTOLATHE_HACK_WIRE) - A.adjust_hacked(!mended) + if(!A.hacked) + A.adjust_hacked(1) if(AUTOLATHE_SHOCK_WIRE) A.shocked = !mended if(AUTOLATHE_DISABLE_WIRE) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 5fae9f1bc4e..19c249c7eaa 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -246,6 +246,12 @@ Class Procs: return if(!isturf(M.loc) && M.loc != src) return + if(getBrainLoss() >= 60) + visible_message("[src] stares cluelessly at [M] and drools.") + return + if(prob(getBrainLoss())) + src << "You momentarily forget how to use [M]!" + return return 1 /mob/living/silicon/ai/canUseTopic(atom/movable/M, be_close = 0) @@ -281,22 +287,11 @@ Class Procs: //set_machine must be 0 if clicking the machinery doesn't bring up a dialog /obj/machinery/attack_hand(mob/user as mob, var/check_power = 1, var/set_machine = 1) - if(check_power && stat & NOPOWER) - user << "\The [src] seems unpowered." - return 1 - if(!interact_offline && stat & (BROKEN|MAINT)) - user << "\The [src] seems broken." - return 1 if(user.lying || user.stat) return 1 if(!user.IsAdvancedToolUser()) usr << "You don't have the dexterity to do this!" return 1 -/* - //distance checks are made by atom/proc/DblClick - if ((get_dist(src, user) > 1 || !istype(src.loc, /turf)) && !istype(user, /mob/living/silicon)) - return 1 -*/ if (ishuman(user)) var/mob/living/carbon/human/H = user if(H.getBrainLoss() >= 60) @@ -305,7 +300,15 @@ Class Procs: else if(prob(H.getBrainLoss())) user << "You momentarily forget how to use [src]!" return 1 - + if(panel_open) + src.add_fingerprint(user) + return 0 + if(check_power && stat & NOPOWER) + user << "\The [src] seems unpowered." + return 1 + if(!interact_offline && stat & (BROKEN|MAINT)) + user << "\The [src] seems broken." + return 1 src.add_fingerprint(user) if(set_machine) user.set_machine(src)