mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-11 01:51:51 +00:00
Singularity Engine -Recoded some parts, still works mostly the same Welders -Recoded, it works mostly the same but is easier to use in code -Cyborgs have a larger fuel tank -Brought most if not all of the areas that use welders upto spec Moved the changeling chem recharge code into the human life proc New players who log out before spawning in are now deleted New minor Common event Machines around the station use more power, system might need some changes later Likely few other minor changes that I just cant think of atm git-svn-id: http://tgstation13.googlecode.com/svn/trunk@945 316c924e-a436-60f5-8080-3fe189b3f50e
42 lines
1.4 KiB
Plaintext
42 lines
1.4 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
|
|
power_usage = 0
|
|
|
|
//////////////////////Singularity gen START
|
|
|
|
/obj/machinery/the_singularitygen/process()
|
|
var/turf/T = get_turf(src)
|
|
if (singularity_is_surrounded(T))
|
|
new /obj/machinery/singularity/(T, 200)
|
|
spawn(0)
|
|
del(src)
|
|
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 |