Merge pull request #9785 from lass9030/match-fix

Relighting matches with shoes fix.
This commit is contained in:
variableundefined
2018-10-10 07:55:11 +08:00
committed by GitHub
2 changed files with 5 additions and 9 deletions
@@ -183,6 +183,7 @@
attack_verb = list("burnt","singed")
processing_objects.Add(src)
update_icon()
return TRUE
/obj/item/match/proc/matchburnout()
if(lit)
@@ -196,6 +197,7 @@
desc = "A match. This one has seen better days."
attack_verb = list("flicked")
processing_objects.Remove(src)
return TRUE
/obj/item/match/dropped(mob/user)
matchburnout()
+3 -9
View File
@@ -385,18 +385,12 @@ BLIND // can't see anything
/obj/item/clothing/shoes/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/match) && src.loc == user)
var/obj/item/match/M = I
if(!M.lit) // Match isn't lit, but isn't burnt.
M.lit = 1
M.icon_state = "match_lit"
processing_objects.Add(M)
M.update_icon()
if(M.matchignite()) // Match isn't lit, but isn't burnt.
user.visible_message("<span class='warning'>[user] strikes a [M] on the bottom of [src], lighting it.</span>","<span class='warning'>You strike the [M] on the bottom of [src] to light it.</span>")
playsound(user.loc, 'sound/goonstation/misc/matchstick_light.ogg', 50, 1)
else if(M.lit == 1) // Match is lit, not extinguished.
M.dropped()
else
user.visible_message("<span class='warning'>[user] crushes the [M] into the bottom of [src], extinguishing it.</span>","<span class='warning'>You crush the [M] into the bottom of [src], extinguishing it.</span>")
else // Match has been previously lit and extinguished.
to_chat(user, "<span class='notice'>The [M] has already been extinguished.</span>")
M.dropped()
return
if(istype(I, /obj/item/wirecutters))