Fancy Alt-Clicking for blob and others

This commit is contained in:
ZomgPonies
2013-09-24 20:12:12 -04:00
parent 6b90da203f
commit e3556791a7
5 changed files with 91 additions and 2 deletions
+22 -1
View File
@@ -881,6 +881,8 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
if(parameters["alt"]){
if(isrobot(usr))
RobotAltClick(usr)
else if(isovermind(usr))
OvermindAltClick(usr)
else if(!isAI(usr))
AltClick(usr)
else
@@ -1265,7 +1267,8 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
return
/atom/proc/AltClick()
var/turf/T = get_turf(src)
T.AltClick()
/* // NOT UNTIL I FIGURE OUT A GOOD WAY TO DO THIS SHIT
if((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
if(!istype(src, /obj/item) && !istype(src, /mob) && !istype(src, /turf))
@@ -1305,6 +1308,11 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
blob.click_expand_blob(src)
return
/atom/proc/OvermindAltClick(var/mob/camera/blob/blob)
if(istype(src, /obj/effect/blob/normal))
blob.click_create_shield(src)
return
/atom/proc/RobotAltClick() // Opens and closes doors!
if(istype(src , /obj/machinery/door/airlock))
if(src:density)
@@ -1313,9 +1321,22 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl
else
var/nhref = "src=\ref[src];aiDisable=7"
src.Topic(nhref, params2list(nhref), src, 1)
else
var/turf/T = get_turf(src)
T.AltClick()
return
/turf/AltClick()
if(!usr)
return
if(usr.listed_turf == src)
usr.listed_turf = null
else
usr.listed_turf = src
if(usr.client && !(get_dist(src,usr) > 1))
usr.client.statpanel = "[src.name]"
/atom/proc/AIShiftClick() // Opens and closes doors!
if(istype(src , /obj/machinery/door/airlock))
if(src:density)
+8 -1
View File
@@ -8,10 +8,12 @@
var/overmind_get_delay = 0 // we don't want to constantly try to find an overmind, do it every 30 seconds
var/resource_delay = 0
var/point_rate = 2
var/mob/camera/blob/creator = null
New(loc, var/h = 200, var/client/new_overmind = null, var/new_rate = 2)
New(loc, var/h = 200, var/client/new_overmind = null, var/new_rate = 2, var/mob/camera/blob/C = null)
blob_cores += src
processing_objects.Add(src)
creator = C
if(!overmind)
create_overmind(new_overmind)
point_rate = new_rate
@@ -84,6 +86,11 @@
B.key = C.key
B.blob_core = src
src.overmind = B
if(!B.blob_core.creator)
B.verbs += /mob/camera/blob/proc/create_core
if(istype(ticker.mode, /datum/game_mode/blob))
var/datum/game_mode/blob/mode = ticker.mode
mode.infected_crew += B.mind
return 1
return 0
+49
View File
@@ -100,6 +100,39 @@
return
/mob/camera/blob/proc/create_core()
set category = "Blob"
set name = "Create Core Blob (100)"
set desc = "Create another Core Blob to aid in the station takeover"
var/turf/T = get_turf(src)
if(!T)
return
var/obj/effect/blob/B = (locate(/obj/effect/blob) in T)
if(!B)//We are on a blob
src << "There is no blob here!"
return
if(!istype(B, /obj/effect/blob/normal))
src << "Unable to use this blob, find a normal one."
return
for(var/obj/effect/blob/core/blob in orange(15))
src << "There is another core blob nearby, move more than 15 tiles away from it!"
return
if(!can_buy(100))
return
B.change_to(/obj/effect/blob/core, src)
return
/mob/camera/blob/verb/create_node()
set category = "Blob"
set name = "Create Node Blob (60)"
@@ -211,6 +244,22 @@
OB.expand(T, 0)
return
/mob/camera/blob/proc/click_create_shield(obj/effect/blob/B)
if(!B)//We are on a blob
src << "There is no blob here!"
return
if(!istype(B, /obj/effect/blob/normal))
src << "Unable to use this blob, find a normal one."
return
if(!can_buy(10))
return
B.change_to(/obj/effect/blob/shield)
return
/mob/camera/blob/proc/click_expand_blob(var/turf/T)
if(!T)
+10
View File
@@ -735,6 +735,16 @@ note dizziness decrements automatically in the mob's Life() proc.
if("holdervar")
statpanel("Spells","[S.holder_var_type] [S.holder_var_amount]",S)
if(listed_turf)
if(get_dist(listed_turf,src) > 1)
listed_turf = null
else
statpanel(listed_turf.name,listed_turf.name,listed_turf)
for(var/atom/A in listed_turf)
if(A.invisibility > see_invisible)
continue
statpanel(listed_turf.name,A.name,A)
// facing verbs
+2
View File
@@ -217,3 +217,5 @@
var/can_stand = 1 //Whether this mob have ability to stand
var/immune_to_ssd = 0
var/turf/listed_turf = null