diff --git a/baystation12.dme b/baystation12.dme index dde8ecee60a..0bd69dcf253 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -327,6 +327,7 @@ #include "code\game\machinery\computer\crew.dm" #include "code\game\machinery\computer\HolodeckControl.dm" #include "code\game\machinery\computer\hologram.dm" +#include "code\game\machinery\computer\honkputer.dm" #include "code\game\machinery\computer\law.dm" #include "code\game\machinery\computer\medical.dm" #include "code\game\machinery\computer\message.dm" diff --git a/code/game/machinery/computer/honkputer.dm b/code/game/machinery/computer/honkputer.dm new file mode 100644 index 00000000000..4cadd27bab1 --- /dev/null +++ b/code/game/machinery/computer/honkputer.dm @@ -0,0 +1,93 @@ +/obj/machinery/computer/HONKputer + name = "HONKputer Mark I" + desc = "A yellow computer used in case of critically low levels of HONK." + icon = 'icons/obj/machines/HONKputer.dmi' + icon_state = "honk" + req_access = list(access_clown) + circuit = "/obj/item/weapon/circuitboard/HONKputer" + var/authenticated = 0 + var/message_cooldown = 0 + var/state = STATE_DEFAULT + var/const/STATE_DEFAULT = 1 + +/obj/machinery/computer/communications/process() + if(..()) + if(state != STATE_STATUSDISPLAY) + src.updateDialog() + +/obj/machinery/computer/HONKputer/Topic(href, href_list) + if(..()) + return + if (src.z > 1) + usr << "\red Unable to establish a connection: \black You're too far away from the station!" + return + usr.set_machine(src) + + if(!href_list["operation"]) + return + switch(href_list["operation"]) + // main interface + if("main") + src.state = STATE_DEFAULT + if("login") + var/mob/M = usr + var/obj/item/weapon/card/id/I = M.get_active_hand() + if (istype(I, /obj/item/device/pda)) + var/obj/item/device/pda/pda = I + I = pda.id + if (I && istype(I)) + if(src.check_access(I) || src.emagged==1) + authenticated = 1 + if("logout") + authenticated = 0 + + if("MessageHonkplanet") + if(src.authenticated==1) + if(message_cooldown) + usr << "Arrays recycling. Please stand by." + return + var/input = stripped_input(usr, "Please choose a message to transmit to your HONKbrothers on the homeworld. Transmission does not guarantee a response.", "To abort, send an empty message.", "") + if(!input || !(usr in view(1,src))) + return + HONK_announce(input, usr) + usr << "Message transmitted." + log_say("[key_name(usr)] has made a HONKplanet announcement: [input]") + message_cooldown = 1 + spawn(6000)//10 minute cooldown + message_cooldown = 0 + + src.updateUsrDialog() + +/obj/machinery/computer/HONKputer/attackby(var/obj/I as obj, var/mob/user as mob) + if(istype(I,/obj/item/weapon/card/emag/)) + src.emagged = 1 + user << "You scramble the login circuits, allowing anyone to use the console!" + ..() + + +/obj/machinery/computer/HONKputer/attack_hand(var/mob/user as mob) + if(..()) + return + if (src.z > 6) + user << "\red Unable to establish a connection: \black You're too far away from the station!" + return + + user.set_machine(src) + var/dat = "