Improved capabilities to set someone else's internals.

Improved the operating table again.
Grabbed another TG update for telecomms.
This commit is contained in:
SkyMarshal
2012-01-22 15:31:13 -07:00
parent e201bcbe0e
commit 201046c3bf
5 changed files with 119 additions and 150 deletions

View File

@@ -578,7 +578,6 @@
#include "code\game\objects\kitchen.dm"
#include "code\game\objects\lamarr.dm"
#include "code\game\objects\mineral_doors.dm"
#include "code\game\objects\new_year.dm"
#include "code\game\objects\noticeboard.dm"
#include "code\game\objects\object_procs.dm"
#include "code\game\objects\portals.dm"

View File

@@ -115,6 +115,7 @@
var/t_loc = null
var/obj/item/item = null
var/place = null
var/internalloc = null
/obj/effect/equip_e/human
name = "human"

View File

@@ -14,135 +14,72 @@
var/obj/machinery/computer/operating/computer = null
var/id = 0.0
/obj/machinery/optable/New()
..()
for(var/obj/machinery/computer/operating/O in world)
if(src.id == O.id)
src.computer = O
spawn(100)
process()
New()
..()
if(id)
for(var/obj/machinery/computer/operating/O in world)
if(src.id == O.id)
src.computer = O
/obj/machinery/optable/ex_act(severity)
switch(severity)
if(1.0)
//SN src = null
del(src)
return
if(2.0)
if (prob(50))
ex_act(severity)
switch(severity)
if(1.0)
//SN src = null
del(src)
return
if(3.0)
if (prob(25))
src.density = 0
else
return
/obj/machinery/optable/blob_act()
if(prob(75))
del(src)
/obj/machinery/optable/hand_p(mob/user as mob)
return src.attack_paw(user)
return
/obj/machinery/optable/attack_paw(mob/user as mob)
if ((usr.mutations & HULK))
usr << text("\blue You destroy the operating table.")
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << text("\red [usr] destroys the operating table.")
src.density = 0
del(src)
if (!( locate(/obj/machinery/optable, user.loc) ))
step(user, get_dir(user, src))
if (user.loc == src.loc)
user.layer = TURF_LAYER
for(var/mob/M in viewers(user, null))
M.show_message("The monkey hides under the table!", 1)
//Foreach goto(69)
return
/obj/machinery/optable/attack_hand(mob/user as mob)
if ((usr.mutations & HULK))
usr << text("\blue You destroy the table.")
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << text("\red [usr] destroys the table.")
src.density = 0
del(src)
return
/obj/machinery/optable/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0)) return 1
if(istype(mover) && mover.checkpass(PASSTABLE))
return 1
else
return 0
/obj/machinery/optable/MouseDrop_T(obj/O as obj, mob/user as mob)
if ((!( istype(O, /obj/item/weapon) ) || user.equipped() != O))
if(2.0)
if (prob(50))
//SN src = null
del(src)
return
if(3.0)
if (prob(25))
src.density = 0
else
return
user.drop_item()
if (O.loc != src.loc)
step(O, get_dir(O, src))
return
/obj/machinery/optable/proc/check_victim()
if(locate(/mob/living/carbon, src.loc))
var/mob/M = locate(/mob/living/carbon, src.loc)
if(M.resting)
src.victim = M
icon_state = "table2-active"
blob_act()
if(prob(75))
del(src)
hand_p(mob/user as mob)
return src.attack_paw(user)
return
attack_paw(mob/user as mob)
if ((usr.mutations & HULK))
usr << text("\blue You destroy the operating table.")
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << text("\red [usr] destroys the operating table.")
src.density = 0
del(src)
if (!( locate(/obj/machinery/optable, user.loc) ))
step(user, get_dir(user, src))
if (user.loc == src.loc)
user.layer = TURF_LAYER
for(var/mob/M in viewers(user, null))
M.show_message("The monkey hides under the table!", 1)
//Foreach goto(69)
return
attack_hand(mob/user as mob)
if ((usr.mutations & HULK))
usr << text("\blue You destroy the table.")
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << text("\red [usr] destroys the table.")
src.density = 0
del(src)
return
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0)) return 1
if(istype(mover) && mover.checkpass(PASSTABLE))
return 1
src.victim = null
icon_state = "table2-idle"
return 0
/obj/machinery/optable/process()
check_victim()
/obj/machinery/optable/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/grab))
if(ismob(W:affecting))
var/mob/M = W:affecting
if (M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.resting = 1
M.loc = src.loc
for (var/mob/C in viewers(src))
C.show_message("\red [M] has been laid on the operating table by [user].", 3)
for(var/obj/O in src)
O.loc = src.loc
src.add_fingerprint(user)
icon_state = "table2-active"
src.victim = M
del(W)
return
user.drop_item()
if(W && W.loc)
W.loc = src.loc
return
/obj/machinery/optable/portable
name = "mobile operating Table"
desc = "Used for advanced medical procedures. Seems to be movable, neat."
icon = 'rollerbed.dmi'
icon_state = "up"
density = 1
anchored = 0
New()
..()
processing_objects.Remove(src)
else
return 0
MouseDrop_T(obj/O as obj, mob/user as mob)
if ((!( istype(O, /obj/item/weapon) ) || user.equipped() != O))
@@ -152,9 +89,22 @@
step(O, get_dir(O, src))
return
proc/check_victim()
if(locate(/mob/living/carbon, src.loc))
var/mob/M = locate(/mob/living/carbon, src.loc)
if(M.resting)
src.victim = M
icon_state = "table2-active"
return 1
src.victim = null
icon_state = "table2-idle"
processing_objects.Remove(src)
return 0
process()
check_victim()
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(!anchored)
return
if (istype(W, /obj/item/weapon/grab))
if(ismob(W:affecting))
var/mob/M = W:affecting
@@ -168,6 +118,7 @@
for(var/obj/O in src)
O.loc = src.loc
src.add_fingerprint(user)
icon_state = "table2-active"
src.victim = M
processing_objects.Add(src)
del(W)
@@ -177,15 +128,22 @@
W.loc = src.loc
return
check_victim()
if(locate(/mob/living/carbon/human, src.loc))
var/mob/M = locate(/mob/living/carbon/human, src.loc)
if(M.resting)
src.victim = M
return 1
src.victim = null
processing_objects.Remove(src)
return 0
/obj/machinery/optable/portable
name = "mobile operating Table"
desc = "Used for advanced medical procedures. Seems to be movable, neat."
icon = 'rollerbed.dmi'
icon_state = "up"
density = 1
anchored = 0
id = null
New()
..()
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(!anchored)
return
return ..()
verb/make_deployable()
set category = "Object"

View File

@@ -77,6 +77,9 @@
newpath = text2path(I)
var/obj/item/s = new newpath
s.loc = user.loc
if(istype(P, /obj/item/weapon/cable_coil))
var/obj/item/weapon/cable_coil/A = P
A.amount = 1
// Drop a circuit board too
C.loc = user.loc
@@ -113,13 +116,16 @@
dat += "<br>Network: <a href='?src=\ref[src];input=network'>[network]</a>"
dat += "<br>Prefabrication: [autolinkers.len ? "TRUE" : "FALSE"]"
dat += "<br>Linked Network Entities: <ol>"
var/i = 0
for(var/obj/machinery/telecomms/T in links)
dat += "<li>\ref[T] [T.name] ([T.id]) (<a href='?src=\ref[src];remove=[T.id]'>X</a>)</li>"
i++
dat += "<li>\ref[T] [T.name] ([T.id]) <a href='?src=\ref[src];unlink=[i]'>\[X\]</a></li>"
dat += "</ol>"
dat += "<br>Filtering Frequencies: "
var/i = 0
i = 0
if(length(freq_listening))
for(var/x in freq_listening)
i++
@@ -197,6 +203,16 @@
temp = "<font color = #666633>-% Removed frequency filter [x] %-</font color>"
freq_listening.Remove(x)
if(href_list["unlink"])
var/obj/machinery/telecomms/T = links[text2num(href_list["unlink"])]
temp = "<font color = #666633>-% Removed \ref[T] [T.name] from linked entities. %-</font color>"
// Remove link entries from both T and src.
if(src in T.links)
T.links.Remove(src)
links.Remove(T)
if(href_list["link"])
if(P.buffer)
@@ -222,13 +238,6 @@
temp = "<font color = #666633>-% Buffer successfully flushed. %-</font color>"
P.buffer = null
if(href_list["remove"])
temp = "<font color = #666633>-% Link successfully removed. %-</font color>"
for(var/obj/machinery/telecomms/T in links)
if(T.id == href_list["remove"])
src.links.Remove(T)
break
usr.machine = src
src.add_fingerprint(usr)

View File

@@ -2118,11 +2118,11 @@ It can still be worn/put on as normal.
if (!( istype(target.wear_mask, /obj/item/clothing/mask) ))
return
else
if (istype(target.back, /obj/item/weapon/tank))
if (istype(target.back, /obj/item/weapon/tank) && internalloc == "back")
target.internal = target.back
else if (istype(target.s_store, /obj/item/weapon/tank))
else if (istype(target.s_store, /obj/item/weapon/tank) && internalloc == "store")
target.internal = target.s_store
else if (istype(target.belt, /obj/item/weapon/tank))
else if (istype(target.belt, /obj/item/weapon/tank) && internalloc == "belt")
target.internal = target.belt
if (target.internal)
for(var/mob/M in viewers(target, 1))
@@ -2160,14 +2160,14 @@ It can still be worn/put on as normal.
<BR><B>Right Ear:</B> <A href='?src=\ref[src];item=r_ear'>[(r_ear ? r_ear : "Nothing")]</A>
<BR><B>Head:</B> <A href='?src=\ref[src];item=head'>[(head ? head : "Nothing")]</A>
<BR><B>Shoes:</B> <A href='?src=\ref[src];item=shoes'>[(shoes ? shoes : "Nothing")]</A>
<BR><B>Belt:</B> <A href='?src=\ref[src];item=belt'>[(belt ? belt : "Nothing")]</A>
<BR><B>Belt:</B> <A href='?src=\ref[src];item=belt'>[(belt ? belt : "Nothing")]</A> [(istype(wear_mask, /obj/item/clothing/mask) && istype(belt, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal;loc=belt'>Set Internal</A>", src) : ""]
<BR><B>Uniform:</B> <A href='?src=\ref[src];item=uniform'>[(w_uniform ? w_uniform : "Nothing")]</A>
<BR><B>(Exo)Suit:</B> <A href='?src=\ref[src];item=suit'>[(wear_suit ? wear_suit : "Nothing")]</A>
<BR><B>Back:</B> <A href='?src=\ref[src];item=back'>[(back ? back : "Nothing")]</A>
<BR><B>Back:</B> <A href='?src=\ref[src];item=back'>[(back ? back : "Nothing")]</A>[(istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal;loc=back'>Set Internal</A>", src) : ""]
<BR><B>ID:</B> <A href='?src=\ref[src];item=id'>[(wear_id ? wear_id : "Nothing")]</A>
<BR><B>Suit Storage:</B> <A href='?src=\ref[src];item=s_store'>[(s_store ? s_store : "Nothing")]</A>
<BR><B>Suit Storage:</B> <A href='?src=\ref[src];item=s_store'>[(s_store ? s_store : "Nothing")]</A> [(istype(wear_mask, /obj/item/clothing/mask) && istype(s_store, /obj/item/weapon/tank) && !( internal )) ? text(" <A href='?src=\ref[];item=internal;loc=store'>Set Internal</A>", src) : ""]
<BR>[(handcuffed ? text("<A href='?src=\ref[src];item=handcuff'>Handcuffed</A>") : text("<A href='?src=\ref[src];item=handcuff'>Not Handcuffed</A>"))]
<BR>[(internal ? text("<A href='?src=\ref[src];item=internal'>Remove Internal</A>") : ((istype(wear_mask, /obj/item/clothing/mask) && (istype(back, /obj/item/weapon/tank) || istype(belt, /obj/item/weapon/tank) || istype(s_store, /obj/item/weapon/tank)) && !( internal )) ? text(" <A href='?src=\ref[];item=internal'>Set Internal</A>", src) : ""))]
<BR>[(internal ? text("<A href='?src=\ref[src];item=internal'>Remove Internal</A>") : "")]
<BR><A href='?src=\ref[src];item=pockets'>Empty Pockets</A>
<BR><A href='?src=\ref[src];item=h_store'>Empty Hat</A>
<BR><A href='?src=\ref[user];refresh=1'>Refresh</A>
@@ -2341,6 +2341,8 @@ It can still be worn/put on as normal.
O.s_loc = usr.loc
O.t_loc = loc
O.place = href_list["item"]
if(href_list["loc"])
O.internalloc = href_list["loc"]
requests += O
spawn( 0 )
O.process()