diff --git a/code/WorkInProgress/Chinsky/ashtray.dm b/code/WorkInProgress/Chinsky/ashtray.dm
index ab3a636251..5ec88ac8bd 100644
--- a/code/WorkInProgress/Chinsky/ashtray.dm
+++ b/code/WorkInProgress/Chinsky/ashtray.dm
@@ -17,35 +17,34 @@
/obj/item/ashtray/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (health < 1)
return
- if (istype(W,/obj/item/clothing/mask/cigarette) || istype(W, /obj/item/weapon/match))
- if(user)
- if (contents.len >= max_butts)
- user << "This ashtray is full."
- return
- user.u_equip(W)
- W.loc = src
- if ((user.client && user.s_active != src))
- user.client.screen -= W
+ if (istype(W,/obj/item/weapon/cigbutt) || istype(W,/obj/item/clothing/mask/cigarette) || istype(W, /obj/item/weapon/match))
+ if (contents.len >= max_butts)
+ user << "This ashtray is full."
+ return
+ user.u_equip(W)
+ W.loc = src
+
+ if (istype(W,/obj/item/clothing/mask/cigarette))
var/obj/item/clothing/mask/cigarette/cig = W
if (cig.lit == 1)
src.visible_message("[user] crushes [cig] in [src], putting it out.")
- cig.smoketime = 0
+ processing_objects.Remove(cig)
+ var/obj/item/butt = new cig.type_butt(src)
+ cig.transfer_fingerprints_to(butt)
+ del(cig)
else if (cig.lit == 0)
- if(istype(cig, /obj/item/weapon/match))
- user << "You place [cig] in [src] without even lighting it. Why would you do that?"
- else
- user << "You place [cig] in [src] without even smoking it. Why would you do that?"
- else if (cig.lit == -1)
- src.visible_message("[user] places [cig] in [src].")
- user.update_inv_l_hand()
- user.update_inv_r_hand()
- add_fingerprint(user)
- if (contents.len == max_butts)
- icon_state = icon_full
- desc = empty_desc + " It's stuffed full."
- else if (contents.len > max_butts/2)
- icon_state = icon_half
- desc = empty_desc + " It's half-filled."
+ user << "You place [cig] in [src] without even smoking it. Why would you do that?"
+
+ src.visible_message("[user] places [W] in [src].")
+ user.update_inv_l_hand()
+ user.update_inv_r_hand()
+ add_fingerprint(user)
+ if (contents.len == max_butts)
+ icon_state = icon_full
+ desc = empty_desc + " It's stuffed full."
+ else if (contents.len > max_butts/2)
+ icon_state = icon_half
+ desc = empty_desc + " It's half-filled."
else
health = max(0,health - W.force)
user << "You hit [src] with [W]."
@@ -62,7 +61,6 @@
if (contents.len)
src.visible_message("\red [src] slams into [hit_atom] spilling its contents!")
for (var/obj/item/clothing/mask/cigarette/O in contents)
- contents -= O
O.loc = src.loc
icon_state = icon_empty
return ..()
@@ -70,7 +68,6 @@
/obj/item/ashtray/proc/die()
src.visible_message("\red [src] shatters spilling its contents!")
for (var/obj/item/clothing/mask/cigarette/O in contents)
- contents -= O
O.loc = src.loc
icon_state = icon_broken
diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm
index 43e0f8caef..87720c5f2c 100644
--- a/code/game/objects/items/weapons/cigs_lighters.dm
+++ b/code/game/objects/items/weapons/cigs_lighters.dm
@@ -157,14 +157,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/turf/location = get_turf(src)
smoketime--
if(smoketime < 1)
- new type_butt(location)
- processing_objects.Remove(src)
- if(ismob(loc))
- var/mob/living/M = loc
- M << "Your [name] goes out."
- M.u_equip(src) //un-equip it so the overlays can update
- M.update_inv_wear_mask(0)
- del(src)
+ die()
return
if(location)
location.hotspot_expose(700, 5)
@@ -182,13 +175,21 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/cigarette/attack_self(mob/user as mob)
if(lit == 1)
user.visible_message("[user] calmly drops and treads on the lit [src], putting it out instantly.")
- var/turf/T = get_turf(src)
- new type_butt(T)
- processing_objects.Remove(src)
- del(src)
+ die()
return ..()
+/obj/item/clothing/mask/cigarette/proc/die()
+ var/turf/T = get_turf(src)
+ var/obj/item/butt = new type_butt(T)
+ transfer_fingerprints_to(butt)
+ if(ismob(loc))
+ var/mob/living/M = loc
+ M << "Your [name] goes out."
+ M.u_equip(src) //un-equip it so the overlays can update
+ M.update_inv_wear_mask(0)
+ processing_objects.Remove(src)
+ del(src)
////////////
// CIGARS //
@@ -229,6 +230,12 @@ CIGARETTE PACKETS ARE IN FANCY.DM
w_class = 1
throwforce = 1
+/obj/item/weapon/cigbutt/New()
+ ..()
+ pixel_x = rand(-10,10)
+ pixel_y = rand(-10,10)
+ transform = turn(transform,rand(0,360))
+
/obj/item/weapon/cigbutt/cigarbutt
name = "cigar butt"
desc = "A manky old cigar butt."