Files
CHOMPStation2/code/modules/power/singularity/generator.dm
mport2004@gmail.com 17ed3899c4 Fixed the map/code issues that the body bags caused.
/obj/effects is now /obj/effect.
/obj/station_objects is now /obj/structure.
Did a bit of minor blob work. 
The Bay 12 body bags were replaced with closets because having two sets of code that do almost the same thing is silly.
Changed back a few of the last jobproc edits as the remove from list before assign was a check to see if the mob was fucked up and if it was remove it so we did not check it again as it would still be fucked up.
The medbay/tox monkeys names are random once more.  More random name monkeys will help with changeling and clean up the observe/mob menus.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2324 316c924e-a436-60f5-8080-3fe189b3f50e
2011-10-03 10:28:57 +00:00

59 lines
1.7 KiB
Plaintext

/////SINGULARITY SPAWNER
/obj/machinery/the_singularitygen/
name = "Gravitational Singularity Generator"
desc = "An Odd Device which produces a Gravitational Singularity when set up."
icon = 'singularity.dmi'
icon_state = "TheSingGen"
anchored = 1
density = 1
use_power = 0
var
energy = 0
//////////////////////Singularity gen START
/obj/machinery/the_singularitygen/process()
var/turf/T = get_turf(src)
if(src.energy >= 200)
new /obj/machinery/singularity/(T, 50)
spawn(0)
del(src)
return
/*
if (singularity_is_surrounded(T))
new /obj/machinery/singularity/(T, 200)
spawn(0)
del(src)
return
*/
///obj/machinery/the_singularitygen/Bumped(atom/A)
// if(istype(A,/obj/effect/accelerated_particle))
// src.energy += A:energy
// return
// ..()
/obj/machinery/the_singularitygen/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/weapon/wrench))
anchored = !anchored
playsound(src.loc, 'Ratchet.ogg', 75, 1)
if(anchored)
user.visible_message("[user.name] secures [src.name] to the floor.", \
"You secure the [src.name] to the floor.", \
"You hear ratchet")
else
user.visible_message("[user.name] unsecures [src.name] from the floor.", \
"You unsecure the [src.name] from the floor.", \
"You hear ratchet")
return
return ..()
/proc/singularity_is_surrounded(turf/T)//TODO:Add a timer so we dont need this
var/checkpointC = 0
for (var/obj/X in orange(4,T)) //TODO: do we need requirement to singularity be actually _surrounded_ by field?
if(istype(X, /obj/machinery/containment_field) || istype(X, /obj/machinery/shieldwall))
checkpointC ++
return checkpointC >= 20