Fix matches and SSobj/SSprocessing

This commit is contained in:
Aronai Sieyes
2020-03-29 16:15:49 -04:00
parent 3e0e45468a
commit a7aa71e7ad
2 changed files with 12 additions and 7 deletions

View File

@@ -60,6 +60,15 @@ CIGARETTE PACKETS ARE IN FANCY.DM
burn_out() burn_out()
return ..() return ..()
/obj/item/weapon/flame/match/proc/light(var/mob/user)
playsound(src, 'sound/items/cigs_lighters/matchstick_lit.ogg', 25, 0, -1)
lit = 1
damtype = "burn"
icon_state = "match_lit"
name = "burning match"
desc = "A match. This one is presently on fire."
START_PROCESSING(SSobj, src)
/obj/item/weapon/flame/match/proc/burn_out() /obj/item/weapon/flame/match/proc/burn_out()
lit = 0 lit = 0
burnt = 1 burnt = 1

View File

@@ -408,17 +408,13 @@
can_hold = list(/obj/item/weapon/flame/match) can_hold = list(/obj/item/weapon/flame/match)
starts_with = list(/obj/item/weapon/flame/match = 10) starts_with = list(/obj/item/weapon/flame/match = 10)
/obj/item/weapon/storage/box/matches/attackby(obj/item/weapon/flame/match/W as obj, mob/user as mob) /obj/item/weapon/storage/box/matches/attackby(var/obj/item/weapon/flame/match/W, var/mob/user)
if(istype(W) && !W.lit && !W.burnt) if(istype(W) && !W.lit && !W.burnt)
if(prob(25)) if(prob(25))
playsound(src.loc, 'sound/items/cigs_lighters/matchstick_lit.ogg', 25, 0, -1) W.light(user)
user.visible_message("<span class='notice'>[user] manages to light the match on the matchbox.</span>") user.visible_message("<span class='notice'>[user] manages to light the match on the matchbox.</span>")
W.lit = 1
W.damtype = "burn"
W.icon_state = "match_lit"
START_PROCESSING(SSprocessing, W)
else else
playsound(src.loc, 'sound/items/cigs_lighters/matchstick_hit.ogg', 25, 0, -1) playsound(src, 'sound/items/cigs_lighters/matchstick_hit.ogg', 25, 0, -1)
W.update_icon() W.update_icon()
return return