From 279e84f12bbd2d3b08762eb15119d302bacebe74 Mon Sep 17 00:00:00 2001 From: EuroNumbers Date: Sat, 14 Dec 2013 20:16:25 +0100 Subject: [PATCH] Updates turbine.dm to bypass the 'code\modules\power\turbine.dm:234:error: interact: duplicate definition' --- code/modules/power/turbine.dm | 69 ++++++++++++++++------------------- 1 file changed, 32 insertions(+), 37 deletions(-) diff --git a/code/modules/power/turbine.dm b/code/modules/power/turbine.dm index faea0bb278d..33d5969a6cd 100644 --- a/code/modules/power/turbine.dm +++ b/code/modules/power/turbine.dm @@ -217,61 +217,56 @@ /obj/machinery/power/turbine/attack_ai(mob/user) - if(stat & (BROKEN|NOPOWER)) - return + if(stat & (BROKEN|NOPOWER)) + return - interact(user) + interact(user) + +// Only non-AI mobs (This is a way to get over a duplicate declaration error! Thanks Metacide!) /obj/machinery/power/turbine/attack_hand(mob/user) - add_fingerprint(user) + add_fingerprint(user) - if(stat & (BROKEN|NOPOWER)) - return + if ( (get_dist(src, user) > 1 ) || (stat & (NOPOWER|BROKEN)) && (!istype(user, /mob/living/silicon/ai)) ) + user.machine = null + user << browse(null, "window=turbine") + return - interact(user) + user.machine = src -/obj/machinery/power/turbine/proc/interact(mob/user) + var/t = "Gas Turbine Generator
"
 
-        if ( (get_dist(src, user) > 1 ) || (stat & (NOPOWER|BROKEN)) && (!istype(user, /mob/living/silicon/ai)) )
-                user.machine = null
-                user << browse(null, "window=turbine")
-                return
+	t += "Generated power : [round(lastgen)] W

" - user.machine = src + t += "Turbine: [round(compressor.rpm)] RPM
" - var/t = "Gas Turbine Generator
"
+	t += "Starter: [ compressor.starter ? "Off On" : "Off On"]"
 
-        t += "Generated power : [round(lastgen)] W

" + t += "

Close" - t += "Turbine: [round(compressor.rpm)] RPM
" + t += "
" + user << browse(t, "window=turbine") + onclose(user, "turbine") - t += "Starter: [ compressor.starter ? "Off On" : "Off On"]" - - t += "

Close" - - t += "
" - user << browse(t, "window=turbine") - onclose(user, "turbine") - - return + return /obj/machinery/power/turbine/Topic(href, href_list) - if(..()) - return + if(..()) + return - if( href_list["close"] ) - usr << browse(null, "window=turbine") - usr.machine = null - return + if( href_list["close"] ) + usr << browse(null, "window=turbine") + usr.machine = null + return - else if( href_list["str"] ) - compressor.starter = !compressor.starter + else if( href_list["str"] ) + compressor.starter = !compressor.starter - spawn(0) - for(var/mob/M in viewers(1, src)) - if ((M.client && M.machine == src)) - src.interact(M) + spawn(0) + for(var/mob/M in viewers(1, src)) + if ((M.client && M.machine == src)) + src.interact(M)