Files
GS13NG/code/modules/power/singularity/generator.dm
Poojawa 5fa001c10f things with stuff (#6233)
* buncha things from upstream

* datums globals, onclick

* datums

* game folder, holy shit mirror bot why

* modules

* icons

* dme

* compiles cleanly

* tools purge

* updates maps

* double check just because. and wew lad

* incidentally, this needs more work first

* some things

* weh

* sound cleanup and icons

* reeeee

* compile issues

* oh look, fresh code sync

* cleans up some unused icons

* dirty vars

* reeeeeeeeeeeeeeee

* wew lad. fuck off with this already
2018-04-07 23:07:09 -04:00

42 lines
1.2 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 = 'icons/obj/singularity.dmi'
icon_state = "TheSingGen"
anchored = FALSE
density = TRUE
use_power = NO_POWER_USE
resistance_flags = FIRE_PROOF
// You can buckle someone to the singularity generator, then start the engine. Fun!
can_buckle = TRUE
buckle_lying = FALSE
buckle_requires_restraints = TRUE
var/energy = 0
var/creation_type = /obj/singularity
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/machinery/the_singularitygen/attack_hand(mob/user)
if(user.a_intent == INTENT_GRAB && user_buckle_mob(user.pulling, user, check_loc = 0))
return
. = ..()
/obj/machinery/the_singularitygen/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/wrench))
default_unfasten_wrench(user, W, 0)
else
return ..()
/obj/machinery/the_singularitygen/process()
if(energy > 0)
if(energy >= 200)
var/turf/T = get_turf(src)
SSblackbox.record_feedback("tally", "engine_started", 1, type)
var/obj/singularity/S = new creation_type(T, 50)
transfer_fingerprints_to(S)
qdel(src)
else
energy -= 1