mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-04 06:22:14 +00:00
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:
@@ -33,3 +33,6 @@
|
||||
activate()
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/device/assembly/igniter/isFlameSource()
|
||||
return TRUE
|
||||
@@ -197,7 +197,7 @@
|
||||
if(WT.isOn()) //Badasses dont get blinded by lighting their candle with a welding tool
|
||||
light()
|
||||
to_chat(user, span("notice", "\The [user] casually lights \the [name] with [W]."))
|
||||
else if(isflamesource(W))
|
||||
else if(W.isFlameSource())
|
||||
light()
|
||||
to_chat(user, span("notice", "\The [user] lights \the [name]."))
|
||||
else if(istype(W, /obj/item/flame/candle))
|
||||
|
||||
@@ -1065,6 +1065,9 @@ All custom items with worn sprites must follow the contained sprite system: http
|
||||
item_state = initial(item_state)
|
||||
set_light(0)
|
||||
|
||||
/obj/item/clothing/gloves/fluff/lunea_gloves/isFlameSource()
|
||||
return lit
|
||||
|
||||
|
||||
/obj/item/fluff/fernando_knittingneedles //Kitting Needles - Fernando Gonzales - resilynn
|
||||
name = "knitting needles"
|
||||
|
||||
@@ -53,14 +53,12 @@
|
||||
remove_contents(user)
|
||||
|
||||
/obj/item/reagent_containers/glass/rag/attackby(obj/item/W, mob/user)
|
||||
if(!on_fire && istype(W, /obj/item/flame))
|
||||
var/obj/item/flame/F = W
|
||||
if(F.lit)
|
||||
ignite()
|
||||
if(on_fire)
|
||||
visible_message(span("warning", "\The [user] lights \the [src] with \the [W]."))
|
||||
else
|
||||
to_chat(user, span("warning", "You manage to singe \the [src], but fail to light it."))
|
||||
if(!on_fire && W.isFlameSource())
|
||||
ignite()
|
||||
if(on_fire)
|
||||
visible_message(SPAN_WARNING("\The [user] lights \the [src] with \the [W]."))
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("You manage to singe \the [src], but fail to light it."))
|
||||
|
||||
. = ..()
|
||||
update_name()
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -311,25 +311,12 @@
|
||||
return t
|
||||
|
||||
|
||||
/obj/item/paper/proc/burnpaper(obj/item/flame/P, mob/user)
|
||||
/obj/item/paper/proc/burnpaper(obj/item/P, mob/user)
|
||||
var/class = "warning"
|
||||
|
||||
if (!user.restrained())
|
||||
if (istype(P, /obj/item/flame))
|
||||
var/obj/item/flame/F = P
|
||||
if (!F.lit)
|
||||
return
|
||||
else if (P.iswelder())
|
||||
var/obj/item/weldingtool/F = P
|
||||
if (!F.welding)//welding tools are 0 when off
|
||||
return
|
||||
else
|
||||
//If we got here somehow, the item is incompatible and can't burn things
|
||||
return
|
||||
|
||||
if(!use_check_and_message(user))
|
||||
if(istype(P, /obj/item/flame/lighter/zippo))
|
||||
class = "rose"
|
||||
|
||||
|
||||
user.visible_message("<span class='[class]'>[user] holds \the [P] up to \the [src], it looks like \he's trying to burn it!</span>", \
|
||||
"<span class='[class]'>You hold \the [P] up to \the [src], burning it slowly.</span>")
|
||||
playsound(src.loc, 'sound/bureaucracy/paperburn.ogg', 50, 1)
|
||||
@@ -429,11 +416,8 @@
|
||||
c.update_icon()
|
||||
|
||||
|
||||
/obj/item/paper/attackby(obj/item/P as obj, mob/user as mob)
|
||||
/obj/item/paper/attackby(var/obj/item/P, mob/user)
|
||||
..()
|
||||
var/clown = 0
|
||||
if(user.mind && (user.mind.assigned_role == "Clown"))
|
||||
clown = 1
|
||||
|
||||
if(istype(P, /obj/item/tape_roll))
|
||||
var/obj/item/tape_roll/tape = P
|
||||
@@ -521,11 +505,6 @@
|
||||
stampoverlay.pixel_x = x
|
||||
stampoverlay.pixel_y = y
|
||||
|
||||
if(istype(P, /obj/item/stamp/clown))
|
||||
if(!clown)
|
||||
to_chat(user, span("notice", "You are totally unable to use the stamp. HONK!"))
|
||||
return
|
||||
|
||||
if(!ico)
|
||||
ico = new
|
||||
ico += "paper_[P.icon_state]"
|
||||
@@ -539,7 +518,7 @@
|
||||
playsound(src, 'sound/bureaucracy/stamp.ogg', 50, 1)
|
||||
to_chat(user, span("notice", "You stamp the paper with \the [P]."))
|
||||
|
||||
else if(istype(P, /obj/item/flame) || P.iswelder())
|
||||
else if(P.isFlameSource())
|
||||
burnpaper(P, user)
|
||||
|
||||
update_icon()
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
if(!rag && istype(W, /obj/item/reagent_containers/glass/rag))
|
||||
insert_rag(W, user)
|
||||
return
|
||||
if(rag && istype(W, /obj/item/flame))
|
||||
if(rag && W.isFlameSource())
|
||||
rag.attackby(W, user)
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
if(H && cooldown < world.time)
|
||||
var/target_zone = user.zone_sel.selecting
|
||||
|
||||
if(isflamesource(W))
|
||||
if(W.isFlameSource())
|
||||
fire_act()
|
||||
|
||||
if(istype(W, /obj/item/melee/baton))
|
||||
|
||||
Reference in New Issue
Block a user