Water (and other cleaner reagents) now extinguishes lit items such as candles, cigarettes, etc (#35931)

* extinguish

* extinguish

* lighters and welding tools too
This commit is contained in:
DeityLink
2024-02-09 15:30:56 +01:00
committed by GitHub
parent 099f23a63e
commit b8c32cd8e8
6 changed files with 57 additions and 13 deletions

View File

@@ -86,10 +86,11 @@ Attach to transfer valve and open. BOOM.
qdel(src)
/atom/proc/extinguish()
on_fire=0
if(fire_overlay)
overlays -= fire_overlay
QDEL_NULL(firelightdummy)
if (on_fire)
on_fire=0
if(fire_overlay)
overlays -= fire_overlay
QDEL_NULL(firelightdummy)
/atom/proc/ignite(var/temperature)
on_fire=1

View File

@@ -543,6 +543,8 @@ its easier to just keep the beam vertical.
clean_blood()
if (cleanliness >= CLEANLINESS_BLEACH)
color = ""
if (cleanliness >= CLEANLINESS_WATER)//I mean, not sure why we'd ever add a rank below water but, futur-proofing and all that jazz
extinguish()//Fire.dm
//Called on every object in a shuttle which rotates
/atom/proc/map_element_rotate(var/angle)

View File

@@ -35,6 +35,13 @@
lit = 0
light("",TRUE)
/obj/item/candle/extinguish()
..()
if(lit)
lit = 0
update_icon()
set_light(0)
/obj/item/candle/update_icon()
overlays.len = 0
dynamic_overlay["[HAND_LAYER]-[GRASP_LEFT_HAND]"] = null

View File

@@ -61,6 +61,13 @@ MATCHBOXES ARE ALSO IN FANCY.DM
lit = 1
update_brightness()
/obj/item/weapon/match/extinguish()
..()
if (lit)
lit = -1
update_brightness()
visible_message("<span class='notice'>\The [name] goes out.</span>")
/obj/item/weapon/match/examine(mob/user)
..()
switch(lit)
@@ -307,6 +314,20 @@ MATCHBOXES ARE ALSO IN FANCY.DM
return
light("<span class='danger'>The raging fire sets \the [src] alight.</span>")
/obj/item/clothing/mask/cigarette/extinguish()
..()
if(lit)
if (ismob(loc))
loc.visible_message("<span class='notice'>[loc]'s [name] goes out.</span>","<span class='notice'>Your [name] goes out.</span>")
else
visible_message("<span class='notice'>\The [name] goes out.</span>")
var/turf/T = get_turf(src)
var/atom/new_butt = new type_butt(T)
transfer_fingerprints_to(new_butt)
lit = 0 //Needed for proper update
update_brightness()
qdel(src)
/obj/item/clothing/mask/cigarette/is_hot()
if(lit)
return source_temperature
@@ -1020,6 +1041,13 @@ MATCHBOXES ARE ALSO IN FANCY.DM
"<span class='notice'>You quietly shut off \the [src].</span>")
update_brightness()
/obj/item/weapon/lighter/extinguish()
..()
if (lit)
fueltime = null
lit = 0
update_brightness()
/obj/item/weapon/lighter/is_hot()
if(lit)
return source_temperature

View File

@@ -551,12 +551,20 @@
to_chat(usr, "<span class='notice'>You switch the [src] off.</span>")
else
visible_message("<span class='notice'>\The [src] shuts off!</span>")
playsound(src,'sound/effects/zzzt.ogg',20,1)
set_light(0)
src.force = 3
src.damtype = "brute"
update_icon()
src.welding = 0
shut_off()
/obj/item/tool/weldingtool/extinguish()
..()
if (welding)
shut_off()
/obj/item/tool/weldingtool/proc/shut_off()
playsound(src,'sound/effects/zzzt.ogg',20,1)
set_light(0)
force = 3
damtype = "brute"
update_icon()
welding = 0
//Decides whether or not to damage a player's eyes based on what they're wearing as protection
//Note: This should probably be moved to mob

View File

@@ -326,7 +326,7 @@
if(O.invisibility)
O.make_visible(INVISIBLESPRAY)
O.clean_act(CLEANLINESS_WATER)
O.clean_act(CLEANLINESS_WATER)//removes glue and extinguishes fire
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/monkeycube))
var/obj/item/weapon/reagent_containers/food/snacks/monkeycube/cube = O
@@ -338,8 +338,6 @@
else if(istype(O, /obj/item/weapon/book/manual/snow))
var/obj/item/weapon/book/manual/snow/S = O
S.trigger()
else if(O.on_fire) // For extinguishing objects on fire
O.extinguish()
else if(O.molten) // Molten shit.
O.molten=0
O.solidify()