mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-13 18:33:22 +00:00
obj/effect/effect is now renamed obj/effect/particle_effect for better usability. datum/effect/system and /datum/effect/effect/system are now both /datum/effect_system. Fixes a bug where wall mounted igniters (and other spark producing objects) didn't produce sparks sometimes. Moved explosion_particles.dm into the effect_system folder, because it has effect_systems code.
49 lines
1.1 KiB
Plaintext
49 lines
1.1 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
|
|
var/datum/wires/r_n_d/wires
|
|
|
|
/obj/machinery/r_n_d/New()
|
|
..()
|
|
wires = new(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)
|
|
|
|
|
|
|