mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-10 17:04:36 +00:00
Makes needed improvements to proposed fireplaces - Fireplaces now use world.timer - Fireplaces no longer prompt input() for inserting logs, it just takes as many logs as possible - Paper and paper bins can be thrown on the fire, thirty paper is worth one log of burn time. - One log gives 15 seconds of burn time, the fireplace can hold up to 5 minutes of fuel. - Ignitable items now use a /obj level proc to generate their messages, currently using this are cigarettes, candles, fireplaces - The fireplace can be put out with an extinguisher - Cardboard cutouts are now flammable - The fireplace is only "warm and cozy" when lit - Paperbins qdel their stored papers when destroyed (probably did that already, but no harm in making sure) - Also removed some returns hanging around * Added new proc for lighting stuff - Adds ignition_effect(atom/A, mob/user) to obj/item, which is called when you're attempting to light things with that object. By default it does nothing and prevents ignition, but if the object is hot, it returns a message. May do other things for different stuff. - Eswords now ignite flammable gasses in their area. * Fireplace is no longer on fire when not on fire
38 lines
1021 B
Plaintext
38 lines
1021 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
|
|
. = ..()
|
|
|
|
/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)
|
|
|
|
/obj/item/device/assembly/igniter/ignition_effect(atom/A, mob/user)
|
|
. = "<span class='notice'>[user] fiddles with [src], and manages to \
|
|
light [A].</span>"
|
|
activate()
|
|
add_fingerprint(user)
|