mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-13 02:13:06 +00:00
48 lines
1.0 KiB
Plaintext
48 lines
1.0 KiB
Plaintext
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
|
|
|
//All devices that link into the R&D console fall into thise type for easy identification and some shared procs.
|
|
|
|
|
|
/obj/machinery/r_n_d
|
|
name = "R&D Device"
|
|
icon = 'icons/obj/machines/research.dmi'
|
|
density = 1
|
|
anchored = 1
|
|
use_power = 1
|
|
var/busy = 0
|
|
var/hacked = 0
|
|
var/disabled = 0
|
|
var/shocked = 0
|
|
var/obj/machinery/computer/rdconsole/linked_console
|
|
|
|
/obj/machinery/r_n_d/New()
|
|
..()
|
|
wires = new /datum/wires/r_n_d(src)
|
|
|
|
/obj/machinery/r_n_d/Destroy()
|
|
qdel(wires)
|
|
wires = null
|
|
return ..()
|
|
|
|
/obj/machinery/r_n_d/proc/shock(mob/user, prb)
|
|
if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
|
|
return 0
|
|
if(!prob(prb))
|
|
return 0
|
|
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
|
s.set_up(5, 1, src)
|
|
s.start()
|
|
if (electrocute_mob(user, get_area(src), src, 0.7))
|
|
return 1
|
|
else
|
|
return 0
|
|
|
|
/obj/machinery/r_n_d/attack_hand(mob/user)
|
|
if(shocked)
|
|
shock(user,50)
|
|
if(panel_open)
|
|
wires.interact(user)
|
|
|
|
|
|
|