Files
Paradise/code/modules/power/engines/singularity/singulogen.dm
Ryan 11717823df Power Code Cleanup + Conversion to Regional Powernets [Refactor Only] (#20598)
* initial edits

* more cleanup, yipee

* moving shit around

* dme fixes

* fixes file ticking issue

* more dme fixes + duplicate files???

* Apply suggestions from code review

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* glass floor fixes

* Apply suggestions from code review

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>

* requested reviews

* the most painful bugfix of my life

* forgot to remove some debug stuff

* fixed issues with excess power

* fuck powernets (fix)

* Update code/modules/power/powernets/README.md

Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>

---------

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
2023-05-31 20:55:10 -05:00

39 lines
1.3 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
power_state = NO_POWER_USE
resistance_flags = FIRE_PROOF
var/energy = 0
var/creation_type = /obj/singularity
/obj/machinery/the_singularitygen/process()
var/turf/T = get_turf(src)
if(src.energy >= 200)
message_admins("A [creation_type] has been created at [x], [y], [z] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
investigate_log("A [creation_type] has been created at [x], [y], [z]","singulo")
var/obj/singularity/S = new creation_type(T, 50)
transfer_fingerprints_to(S)
if(src) qdel(src)
/obj/machinery/the_singularitygen/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/wrench))
anchored = !anchored
playsound(src.loc, W.usesound, 75, 1)
if(anchored)
user.visible_message("[user.name] secures [src] to the floor.", \
"You secure [src] to the floor.", \
"You hear a ratchet")
src.add_hiddenprint(user)
else
user.visible_message("[user.name] unsecures [src] from the floor.", \
"You unsecure [src.name] from the floor.", \
"You hear a ratchet")
return
return ..()