mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +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.
33 lines
829 B
Plaintext
33 lines
829 B
Plaintext
/obj/item/device/assembly/igniter
|
|
name = "igniter"
|
|
desc = "A small electronic device able to ignite combustable substances."
|
|
icon_state = "igniter"
|
|
materials = list(MAT_METAL=500, MAT_GLASS=50)
|
|
origin_tech = "magnets=1"
|
|
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
|
|
heat = 1000
|
|
|
|
/obj/item/device/assembly/igniter/New()
|
|
..()
|
|
sparks.set_up(2, 0, src)
|
|
sparks.attach(src)
|
|
|
|
/obj/item/device/assembly/igniter/Destroy()
|
|
qdel(sparks)
|
|
sparks = null
|
|
return ..()
|
|
|
|
|
|
/obj/item/device/assembly/igniter/activate()
|
|
if(!..()) return 0//Cooldown check
|
|
var/turf/location = get_turf(loc)
|
|
if(location) location.hotspot_expose(1000,1000)
|
|
sparks.start()
|
|
return 1
|
|
|
|
|
|
/obj/item/device/assembly/igniter/attack_self(mob/user)
|
|
activate()
|
|
add_fingerprint(user)
|
|
return
|