From 1eb6d76c74fddf0eeaa18824e509ecba1c59ff17 Mon Sep 17 00:00:00 2001 From: "VivianFoxfoot@gmail.com" Date: Thu, 23 Feb 2012 04:06:07 +0000 Subject: [PATCH] Changes alt+click to ctrl+click for pulling. Adds an adminspawn pinpointer that points towards people and traitor objectives. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3172 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/atom_procs.dm | 18 ++- code/game/gamemodes/nuclear/pinpointer.dm | 134 +++++++++++++++++++++- html/changelog.html | 8 ++ 3 files changed, 152 insertions(+), 8 deletions(-) diff --git a/code/game/atom_procs.dm b/code/game/atom_procs.dm index 153477db54..b9b0263cf7 100644 --- a/code/game/atom_procs.dm +++ b/code/game/atom_procs.dm @@ -617,6 +617,16 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl return } + // ------- CTRL-CLICK ------- + + if(parameters["ctrl"]){ + if(!isAI(usr)) + CtrlClick(usr) + return + } + + + // ------- AI ------- if (istype(usr, /mob/living/silicon/ai)) @@ -911,13 +921,11 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl return /atom/proc/AltClick() + return + +/atom/proc/CtrlClick() if(hascall(src,"pull")) src:pull() - -/* - if(hascall(src,"pull")) - call(src,/atom/movable/verb/pull)() -*/ return /atom/proc/get_global_map_pos() diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index 48b434270c..47fb555059 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -11,22 +11,22 @@ var/obj/item/weapon/disk/nuclear/the_disk = null var/active = 0 + attack_self() if(!active) active = 1 - work() + workdisk() usr << "\blue You activate the pinpointer" else active = 0 icon_state = "pinoff" usr << "\blue You deactivate the pinpointer" - proc/work() + proc/workdisk() if(!active) return if(!the_disk) the_disk = locate() if(!the_disk) - active = 0 icon_state = "pinonnull" return src.dir = get_dir(src,the_disk) @@ -42,6 +42,134 @@ spawn(5) .() +/obj/item/weapon/pinpointer/advpinpointer + name = "Advanced Pinpointer" + icon = 'device.dmi' + desc = "A larger version of the normal pinpointer, this unit features a helpful quantum entanglement detection system to locate various objects that do not broadcast a locator signal." + var/mode = 0 // Mode 0 locates disk, mode 1 locates coordinates. + var/turf/location = null + var/obj/target = null + + attack_self() + if(!active) + active = 1 + if(mode == 0) + workdisk() + if(mode == 1) + worklocation() + if(mode == 2) + workobj() + usr << "\blue You activate the pinpointer" + else + active = 0 + icon_state = "pinoff" + usr << "\blue You deactivate the pinpointer" + + + proc/worklocation() + if(!active) + return + if(!location) + icon_state = "pinonnull" + return + src.dir = get_dir(src,location) + switch(get_dist(src,location)) + if(0) + icon_state = "pinondirect" + if(1 to 8) + icon_state = "pinonclose" + if(9 to 16) + icon_state = "pinonmedium" + if(16 to INFINITY) + icon_state = "pinonfar" + spawn(5) .() + + + proc/workobj() + if(!active) + return + if(!target) + icon_state = "pinonnull" + return + src.dir = get_dir(src,target) + switch(get_dist(src,target)) + if(0) + icon_state = "pinondirect" + if(1 to 8) + icon_state = "pinonclose" + if(9 to 16) + icon_state = "pinonmedium" + if(16 to INFINITY) + icon_state = "pinonfar" + spawn(5) .() + +/obj/item/weapon/pinpointer/advpinpointer/verb/toggle_mode() + set category = "Object" + set name = "Toggle Pinpointer Mode" + set src in view(1) + + active = 0 + icon_state = "pinoff" + target=null + location = null + + switch(alert("Please select the mode you want to put the pinpointer in.", "Pinpointer Mode Select", "Location", "Disk Recovery", "Other Signature")) + if("Location") + mode = 1 + + var/locationx = input(usr, "Please input the x coordinate to search for.", "Location?" , "") as num + if(!locationx || !(usr in view(1,src))) + return + var/locationy = input(usr, "Please input the y coordinate to search for.", "Location?" , "") as num + if(!locationy || !(usr in view(1,src))) + return + + var/turf/Z = get_turf(src) + + location = locate(locationx,locationy,Z.z) + + usr << "You set the pinpointer to locate [locationx],[locationy]" + + + return attack_self() + + if("Disk Recovery") + mode = 0 + return attack_self() + + if("Other Signature") + mode = 2 + switch(alert("Search for item signature or DNA fragment?" , "Signature Mode Select" , "" , "Item" , "DNA")) + if("Item") + var/datum/objective/steal/itemlist + itemlist = itemlist // To supress a 'variable defined but not used' error. + var/targetitem = input("Select item to search for.", "Item Mode Select","") as null|anything in itemlist.possible_items + if(!targetitem) + return + target=locate(itemlist.possible_items[targetitem]) + if(!target) + usr << "Failed to locate [targetitem]!" + return + usr << "You set the pinpointer to locate [targetitem]" + if("DNA") + var/DNAstring = input("Input DNA string to search for." , "Please Enter String." , "") + if(!DNAstring) + return + for(var/mob/living/carbon/M in world) + if(!M.dna) + continue + if(M.dna.unique_enzymes == DNAstring) + target = M + break + + return attack_self() + + + + + + + /*/obj/item/weapon/pinpointer/New() . = ..() processing_objects.Add(src) diff --git a/html/changelog.html b/html/changelog.html index 9f9c15b087..87c41f96d2 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -92,6 +92,14 @@ should be listed in the changelog upon commit tho. Thanks. --> +
+

2/22/2012

+

PolymorphBlue updated:

+ +
+

21 February 2012

Petethegoat updated: