Skip to content

Commit

Permalink
Fixes cigars being lightable by everything (ParadiseSS13#24235)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
DGamerL and Contrabang authored Feb 21, 2024
1 parent cc0014e commit b11002b
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions code/game/objects/items/weapons/cigs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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>")
Expand Down

0 comments on commit b11002b

Please sign in to comment.