Files
CHOMPStation2/code/game/machinery/OpTable.dm
panurgomatic 15a5ecdd06 - Moved passability flags from atom/var/flags to atom/var/pass_flags.
Currently there are three - PASSTABLE, PASSGLASS and PASSGRILLE. PASSTABLE - same as TABLEPASS, PASSGRILLE - can this atom pass through grilles and PASSGLASS - can this atom pass through windows, glass doors, etc. Most can_pass() procs were updated.
Added checkpass atom proc to check if this atom has certain pass_flag set.
- Added proc/sanitize_simple() and proc/strip_html_simple(). sanitize_simple does not html_encode the string and strip_html_simple does not sanitize it. Additionally, sanitize_simple and sanitize can take associative list of key-val chars as second argument, where key is char to searh for and val is replacement.
- Added datum/gas_mixture/proc/return_volume() and datum/gas_mixture/proc/return_temperature().
- Added proc/tg_text2list() and proc/tg_list2text(). tg_list2text is slower then dd_list2text, but processes associative lists differently (it adds not the keys, but associated values). tg_text2list is somewhat faster then dd_text2list.
- Added proc/listclearnulls(), proc/difflist(), proc/intersectlist() and proc/uniquemergelist(). Check the code comments for more info.
- Mechs can hold 3 equipment pieces. Gygax can hold 4.
- Tweaked global_iterator CRASH report.
- Fixed mech pilot ejection if mecha was destroyed.
- Fixed mech fabricator process() waiting for sync() to finish.
- Fixed mech fabricator Topic() waiting for process_queue() to finish.
- Some bugixes related to global map and random sectors.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1722 316c924e-a436-60f5-8080-3fe189b3f50e
2011-06-24 23:30:27 +00:00

113 lines
2.7 KiB
Plaintext

/obj/machinery/optable/New()
..()
for(var/obj/machinery/computer/operating/O in world)
if(src.id == O.id)
src.computer = O
spawn(100)
process()
/obj/machinery/optable/ex_act(severity)
switch(severity)
if(1.0)
//SN src = null
del(src)
return
if(2.0)
if (prob(50))
//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/O as mob|obj, target as turf)
return (istype(O) && O.checkpass(PASSTABLE))
/obj/machinery/optable/MouseDrop_T(obj/O as obj, mob/user as mob)
if ((!( istype(O, /obj/item/weapon) ) || user.equipped() != O))
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/human, src.loc))
var/mob/M = locate(/mob/living/carbon/human, src.loc)
if(M.resting)
src.victim = M
icon_state = "table2-active"
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