Lit update (#9247)

Lit cigarettes now count as flame sources.
Changed the isflamesource proc from a general proc to an obj/item proc. It is tidier and will be easier to add future flame sources this way.
Removed some hardcoded flame stuff (Such as igniting rags and paper), which depending on an item being a type instead of just being something that could produce a flame. They now check to see if an item counts as a flame source.
Found leftover clown BS while updating paper burning code and killed it off.
This commit is contained in:
Doxxmedearly
2020-07-04 00:52:12 +03:00
committed by GitHub
parent 546b70652e
commit 16801b2abb
14 changed files with 51 additions and 59 deletions
+2 -2
View File
@@ -138,7 +138,7 @@
if(!istype(W, /obj/item/reagent_containers/food/snacks) && W.is_open_container())
trans_item(W, user)
return
if(isflamesource(W))
if(W.isFlameSource())
heat_item(W, user)
return
if(istype(W) && W.force >= 5 && !has_edge(W) && LAZYLEN(contents - analyzer))
@@ -243,7 +243,7 @@
transfer_out = !transfer_out
to_chat(user, span("notice", "You [transfer_out ? "open" : "close"] the spigot on the keg, ready to [transfer_out ? "remove" : "add"] reagents."))
return
if(isflamesource(W) && istype(welder))
if(W.isFlameSource() && istype(welder))
to_chat(user, span("notice", "You light \the [src] and begin the distillation process."))
addtimer(CALLBACK(src, .proc/distill), 60 SECONDS)
src.icon_state = "distillery-active"