Fixes cigars being lightable by everything (#24235)

* Fixes cigars being lightable by everything

* Update code/game/objects/items/weapons/cigs.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>

* Update code/game/objects/items/weapons/cigs.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>

---------

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
DGamerL
2024-02-21 09:04:59 +00:00
committed by GitHub
co-authored by Contrabang
parent cc0014e401
commit b11002b67b
+11 -4
View File
@@ -315,7 +315,7 @@ LIGHTERS ARE IN LIGHTERS.DM
////////////
/obj/item/clothing/mask/cigarette/cigar
name = "Premium Cigar"
name = "\improper Premium Cigar"
desc = "A brown roll of tobacco and... well, you're not quite sure. This thing's huge!"
icon_state = "cigaroff"
icon_on = "cigaron"
@@ -327,15 +327,22 @@ LIGHTERS ARE IN LIGHTERS.DM
chem_volume = 120
list_reagents = list("nicotine" = 120)
/obj/item/clothing/mask/cigarette/cigar/proc/can_light_cigar(obj/item/lighting_item)
return (istype(lighting_item, /obj/item/match) || istype(lighting_item, /obj/item/lighter/zippo))
/obj/item/clothing/mask/cigarette/cigar/can_light(obj/item/cigar, obj/item/lighting_item)
if(can_light_cigar(lighting_item))
return ..()
/obj/item/clothing/mask/cigarette/cigar/cohiba
name = "Cohiba Robusto Cigar"
name = "\improper Cohiba Robusto Cigar"
desc = "There's little more you could want from a cigar."
icon_state = "cigar2off"
icon_on = "cigar2on"
icon_off = "cigar2off"
/obj/item/clothing/mask/cigarette/cigar/havana
name = "Premium Havanian Cigar"
name = "\improper Premium Havanian Cigar"
desc = "A cigar fit for only the best for the best."
icon_state = "cigar2off"
icon_on = "cigar2on"
@@ -374,7 +381,7 @@ LIGHTERS ARE IN LIGHTERS.DM
/obj/item/clothing/mask/cigarette/cigar/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/reagent_containers))
return
if(istype(I, /obj/item/match) || istype(I, /obj/item/lighter/zippo))
if(can_light_cigar(I))
..()
else
to_chat(user, "<span class='notice'>[src] straight out REFUSES to be lit by such uncivilized means.</span>")