mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-31 03:52:31 +00:00
Conflicts: code/modules/power/singularity/field_generator.dm maps/tgstation.2.1.2.dmm (What is this I don't even)
35 lines
1.1 KiB
Plaintext
35 lines
1.1 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 = 0
|
|
density = 1
|
|
use_power = 0
|
|
var/energy = 0
|
|
|
|
/obj/machinery/the_singularitygen/process()
|
|
var/turf/T = get_turf(src)
|
|
if(src.energy >= 200)
|
|
new /obj/machinery/singularity/(T, 50)
|
|
if(src) del(src)
|
|
|
|
/obj/machinery/the_singularitygen/attackby(obj/item/W, mob/user)
|
|
if(istype(W, /obj/item/weapon/wrench))
|
|
|
|
if(!anchored && !isinspace())
|
|
user.visible_message("[user.name] secures [src.name] to the floor.", \
|
|
"You secure the [src.name] to the floor.", \
|
|
"You hear a ratchet")
|
|
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
|
anchored = 1
|
|
else if(anchored)
|
|
user.visible_message("[user.name] unsecures [src.name] from the floor.", \
|
|
"You unsecure the [src.name] from the floor.", \
|
|
"You hear a ratchet")
|
|
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
|
|
anchored = 0
|
|
return
|
|
return ..()
|