diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm
index de3c1ff4f48..4a385d03594 100644
--- a/code/game/objects/items/weapons/cigs_lighters.dm
+++ b/code/game/objects/items/weapons/cigs_lighters.dm
@@ -14,7 +14,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
//For anything that can light stuff on fire
/obj/item/flame
- var/lit = 0
+ var/lit = FALSE
/obj/item/flame/isFlameSource()
return lit
@@ -23,8 +23,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM
//MATCHES//
///////////
/obj/item/flame/match
- name = "match"
- desc = "A simple match stick, used for lighting fine smokables."
+ name = "safety match"
+ desc = "A simple safety match. Used for lighting fine smokables, among other things."
icon = 'icons/obj/cigs_lighters.dmi'
icon_state = "match_unlit"
item_state = "match_unlit"
@@ -32,48 +32,112 @@ CIGARETTE PACKETS ARE IN FANCY.DM
slot_l_hand_str = 'icons/mob/items/lefthand_cigs_lighters.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_cigs_lighters.dmi',
)
- var/burnt = 0
var/smoketime = 5
- w_class = 1.0
+ var/type_burnt = /obj/item/trash/match
+ w_class = ITEMSIZE_TINY
origin_tech = list(TECH_MATERIAL = 1)
- slot_flags = SLOT_EARS
+ slot_flags = SLOT_EARS | SLOT_MASK
attack_verb = list("burnt", "singed")
drop_sound = 'sound/items/drop/food.ogg'
pickup_sound = 'sound/items/pickup/food.ogg'
+/obj/item/trash/match
+ name = "burnt match"
+ desc = "A match. This one has seen better days."
+ icon = 'icons/obj/cigs_lighters.dmi'
+ icon_state = "match_burnt"
+ item_state = "match_burnt"
+ item_icons = list(
+ slot_l_hand_str = 'icons/mob/items/lefthand_cigs_lighters.dmi',
+ slot_r_hand_str = 'icons/mob/items/righthand_cigs_lighters.dmi',
+ )
+ randpixel = 10
+ slot_flags = SLOT_EARS | SLOT_MASK
+ attack_verb = list("flicked")
+ drop_sound = 'sound/items/cigs_lighters/cig_snuff.ogg'
+ pickup_sound = 'sound/items/pickup/food.ogg'
+
+/obj/item/trash/match/Initialize()
+ . = ..()
+ randpixel_xy()
+ transform = turn(transform,rand(0,360))
+
+/obj/item/trash/match/attack_self(mob/user)
+ var/turf/location = get_turf(src)
+ new /obj/effect/decal/cleanable/ash(location)
+ user.visible_message("[user] crushes \the [src] into a fine ash.", range = 3)
+ qdel(src)
+
/obj/item/flame/match/process()
if(isliving(loc))
var/mob/living/M = loc
M.IgniteMob()
var/turf/location = get_turf(src)
smoketime--
- if(smoketime < 1)
- burn_out()
+ if(smoketime < 1 || istype(loc, /obj/item/storage)) // Shouldn't be lit in a bag.
+ die()
return
if(location)
location.hotspot_expose(700, 5)
return
-/obj/item/flame/match/dropped(mob/user as mob)
- //If dropped, put ourselves out
- //not before lighting up the turf we land on, though.
+/obj/item/flame/match/attack_self(mob/user as mob)
if(lit)
- spawn(0)
- var/turf/location = src.loc
- if(istype(location))
- location.hotspot_expose(700, 5)
- burn_out()
+ user.visible_message("[user] waves out \the [src], extinguishing it.", range = 3)
+ die(TRUE)
return ..()
-/obj/item/flame/match/proc/burn_out()
- lit = 0
- burnt = 1
- damtype = "brute"
- icon_state = "match_burnt"
- item_state = "match_burnt"
- name = "burnt match"
- desc = "A match. This one has seen better days."
- STOP_PROCESSING(SSprocessing, src)
+/obj/item/flame/match/attackby(obj/item/W as obj, mob/user as mob)
+ ..()
+ if(W.isFlameSource() && !src.lit)
+ playsound(src, 'sound/items/cigs_lighters/cig_light.ogg', 75, 1, -1)
+ user.visible_message("In a feat of redundancy, [user] lights \the [src] using \the [W].", range = 3)
+ light()
+
+/obj/item/flame/match/dropped(mob/user as mob)
+ if(lit)
+ spawn(0)
+ var/turf/location = src.loc // Light up the turf we land on.
+ if(istype(location))
+ location.hotspot_expose(700, 5)
+ die(TRUE) // Put ourselves out.
+ return ..()
+
+/obj/item/flame/match/proc/light()
+ lit = TRUE
+ damtype = "burn"
+ icon_state = "match_lit"
+ item_state = "match_lit"
+ if(ismob(loc))
+ var/mob/living/M = loc
+ M.update_inv_wear_mask(0)
+ M.update_inv_l_hand(0)
+ M.update_inv_r_hand(1)
+ set_light(2, 0.25, "#E38F46")
+ START_PROCESSING(SSprocessing, src)
+
+/obj/item/flame/match/proc/die(var/nomessage = FALSE)
+ var/turf/T = get_turf(src)
+ playsound(src.loc, 'sound/items/cigs_lighters/cig_snuff.ogg', 50, 1)
+ if(type_burnt)
+ var/obj/item/burnt = new type_burnt(T)
+ transfer_fingerprints_to(burnt)
+ if(ismob(loc))
+ var/mob/living/M = loc
+ if(!nomessage)
+ to_chat(M, span("notice", "Your [name] goes out."))
+ if(M.wear_mask)
+ M.remove_from_mob(src) //un-equip it so the overlays can update
+ M.update_inv_wear_mask(0)
+ M.equip_to_slot_if_possible(burnt, slot_wear_mask)
+ else
+ M.remove_from_mob(src) // if it dies in your hand.
+ M.update_inv_l_hand(0)
+ M.update_inv_r_hand(1)
+ M.put_in_hands(burnt)
+ set_light(0)
+ STOP_PROCESSING(SSprocessing, src)
+ qdel(src)
//////////////////
//FINE SMOKABLES//
@@ -131,7 +195,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/smokable/proc/light(var/flavor_text = "[usr] lights the [name].")
if(!src.lit)
- src.lit = 1
+ src.lit = TRUE
playsound(src, 'sound/items/cigs_lighters/cig_light.ogg', 75, 1, -1)
src.reagents.set_temperature(T0C + 45)
damtype = "fire"
@@ -161,7 +225,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
set_light(2, 0.25, "#E38F46")
START_PROCESSING(SSprocessing, src)
-/obj/item/clothing/mask/smokable/proc/die(var/nomessage = 0)
+/obj/item/clothing/mask/smokable/proc/die(var/nomessage = FALSE)
var/turf/T = get_turf(src)
set_light(0)
playsound(src.loc, 'sound/items/cigs_lighters/cig_snuff.ogg', 50, 1)
@@ -283,10 +347,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM
to_chat(user, span("notice", "[src] is full."))
/obj/item/clothing/mask/smokable/cigarette/attack_self(mob/user as mob)
- if(lit == 1)
+ if(lit == TRUE)
user.visible_message(span("notice", "[user] calmly drops and treads on the lit [src], putting it out instantly."))
playsound(src.loc, 'sound/items/cigs_lighters/cig_snuff.ogg', 50, 1)
- die(1)
+ die(TRUE)
return ..()
@@ -488,7 +552,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/smokable/pipe/light(var/flavor_text = "[usr] lights the [name].")
if(!src.lit && burn_rate)
- src.lit = 1
+ src.lit = TRUE
damtype = "fire"
icon_state = icon_on
item_state = icon_on
@@ -502,7 +566,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
M.update_inv_r_hand(1)
/obj/item/clothing/mask/smokable/pipe/attack_self(mob/user as mob)
- if(lit == 1)
+ if(lit == TRUE)
user.visible_message(span("notice", "[user] puts out [src]."), span("notice", "You put out [src]."))
playsound(src.loc, 'sound/items/cigs_lighters/cig_snuff.ogg', 50, 1)
lit = 0
diff --git a/code/game/objects/items/weapons/material/ashtray.dm b/code/game/objects/items/weapons/material/ashtray.dm
index f58b99015d7..de751d6da2a 100644
--- a/code/game/objects/items/weapons/material/ashtray.dm
+++ b/code/game/objects/items/weapons/material/ashtray.dm
@@ -49,7 +49,7 @@
if (istype(W,/obj/item/clothing/mask/smokable/cigarette))
var/obj/item/clothing/mask/smokable/cigarette/cig = W
- if (cig.lit == 1)
+ if (cig.lit == TRUE)
src.visible_message("[user] crushes [cig] in \the [src], putting it out.")
playsound(src.loc, 'sound/items/cigs_lighters/cig_snuff.ogg', 50, 1)
STOP_PROCESSING(SSprocessing, cig)
@@ -59,7 +59,7 @@
W = butt
//spawn(1)
// TemperatureAct(150)
- else if (cig.lit == 0)
+ else if (cig.lit == FALSE)
to_chat(user, "You place [cig] in [src] without even smoking it. Why would you do that?")
src.visible_message("[user] places [W] in [src].")
diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm
index e399cf18281..239f848a708 100644
--- a/code/game/objects/items/weapons/storage/boxes.dm
+++ b/code/game/objects/items/weapons/storage/boxes.dm
@@ -491,34 +491,29 @@
starts_with = list(/obj/item/toy/snappop/syndi = 8)
/obj/item/storage/box/matches
- name = "matchbox"
- desc = "A small box of 'Space-Proof' premium matches."
+ name = "safety match box"
+ desc = "A small box of 'Space-Proof' premium safety matches." //can't strike these anywhere other than matchboxes, so they're safety matches
icon = 'icons/obj/cigs_lighters.dmi'
icon_state = "matchbox"
- item_state = "zippo"
- w_class = 1
+ item_state = "box"
+ w_class = ITEMSIZE_TINY
drop_sound = 'sound/items/drop/matchbox.ogg'
pickup_sound = 'sound/items/pickup/matchbox.ogg'
slot_flags = SLOT_BELT
can_hold = list(/obj/item/flame/match)
starts_with = list(/obj/item/flame/match = 10)
-/obj/item/storage/box/matches/attackby(obj/item/flame/match/W as obj, mob/user as mob)
- if(istype(W) && !W.lit && !W.burnt)
+/obj/item/storage/box/matches/attackby(obj/item/flame/match/W, mob/user)
+ if(istype(W) && !W.lit)
if(prob(25))
playsound(src.loc, 'sound/items/cigs_lighters/matchstick_lit.ogg', 25, 0, -1)
- user.visible_message("[user] manages to light the match on the matchbox.")
- W.lit = 1
- W.damtype = "burn"
- W.icon_state = "match_lit"
- W.item_state = "match_lit"
- START_PROCESSING(SSprocessing, W)
+ user.visible_message("[user] manages to light \the [W] by striking it on \the [src].", range = 3)
+ W.light()
else
playsound(src.loc, 'sound/items/cigs_lighters/matchstick_hit.ogg', 25, 0, -1)
W.update_icon()
return
-
/obj/item/storage/box/autoinjectors
name = "box of empty injectors"
desc = "Contains empty autoinjectors."
@@ -868,4 +863,4 @@
var/obj/item/closet_teleporter/CT_1 = new /obj/item/closet_teleporter(src)
var/obj/item/closet_teleporter/CT_2 = new /obj/item/closet_teleporter(src)
CT_1.linked_teleporter = CT_2
- CT_2.linked_teleporter = CT_1
\ No newline at end of file
+ CT_2.linked_teleporter = CT_1
diff --git a/html/changelogs/wezzy_match_update.yml b/html/changelogs/wezzy_match_update.yml
new file mode 100644
index 00000000000..d93e20662eb
--- /dev/null
+++ b/html/changelogs/wezzy_match_update.yml
@@ -0,0 +1,44 @@
+################################
+# Example Changelog File
+#
+# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
+#
+# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
+# When it is, any changes listed below will disappear.
+#
+# Valid Prefixes:
+# bugfix
+# wip (For works in progress)
+# tweak
+# soundadd
+# sounddel
+# rscadd (general adding of nice things)
+# rscdel (general deleting of nice things)
+# imageadd
+# imagedel
+# maptweak
+# spellcheck (typo fixes)
+# experiment
+# balance
+# admin
+# backend
+# security
+# refactor
+#################################
+
+# Your name.
+author: Wowzewow (Wezzy)
+
+# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
+delete-after: True
+
+# Any changes you've made. See valid prefix list above.
+# INDENT WITH TWO SPACES. NOT TABS. SPACES.
+# SCREW THIS UP AND IT WON'T WORK.
+# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
+# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
+changes:
+ - rscadd: "You can wear matches in your mask slot now, you pyromaniac, you."
+ - bugfix: "You no longer can keep matches lit inside storage containers."
+ - rscadd: "You can light matches using lighters. Because why the hell not."
+
diff --git a/icons/mob/mask.dmi b/icons/mob/mask.dmi
index 7d20b29a59b..4066d8f0e5d 100644
Binary files a/icons/mob/mask.dmi and b/icons/mob/mask.dmi differ
diff --git a/icons/obj/cigs_lighters.dmi b/icons/obj/cigs_lighters.dmi
index 9713051d960..073aad23113 100644
Binary files a/icons/obj/cigs_lighters.dmi and b/icons/obj/cigs_lighters.dmi differ