From a929c42d291f3634ec1d4bcbc2c2575509f23edb Mon Sep 17 00:00:00 2001 From: xxalpha Date: Thu, 18 Sep 2014 00:26:42 +0100 Subject: [PATCH 1/2] Cigarettes box capacity modified to hold rollies and lighers. --- code/game/objects/items/weapons/storage/fancy.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index 303850c14dd..a9fb11e88db 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -153,7 +153,7 @@ throwforce = 0 slot_flags = SLOT_BELT storage_slots = 6 - can_hold = list(/obj/item/clothing/mask/cigarette) + can_hold = list(/obj/item/clothing/mask/cigarette, /obj/item/clothing/mask/cigarette/rollie, /obj/item/weapon/lighter) icon_type = "cigarette" /obj/item/weapon/storage/fancy/cigarettes/New() From c1449e4827489893b96fe87144c8ad816c0c47ae Mon Sep 17 00:00:00 2001 From: xxalpha Date: Fri, 19 Sep 2014 22:22:17 +0100 Subject: [PATCH 2/2] Cigarette packs can now hold lighters. Now with thought and effort put into it! --- .../objects/items/weapons/storage/fancy.dm | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index a9fb11e88db..f9558b784c8 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -153,7 +153,7 @@ throwforce = 0 slot_flags = SLOT_BELT storage_slots = 6 - can_hold = list(/obj/item/clothing/mask/cigarette, /obj/item/clothing/mask/cigarette/rollie, /obj/item/weapon/lighter) + can_hold = list(/obj/item/clothing/mask/cigarette,/obj/item/weapon/lighter) icon_type = "cigarette" /obj/item/weapon/storage/fancy/cigarettes/New() @@ -168,24 +168,26 @@ desc = "There are [contents.len] cig\s left!" return -/obj/item/weapon/storage/fancy/cigarettes/remove_from_storage(obj/item/W as obj, atom/new_location) - var/obj/item/clothing/mask/cigarette/C = W - if(!istype(C)) return // what - reagents.trans_to(C, (reagents.total_volume/contents.len)) - ..() +/obj/item/weapon/storage/fancy/cigarettes/remove_from_storage(obj/item/W, atom/new_location) + if(istype(W,/obj/item/clothing/mask/cigarette)) + reagents.trans_to(W,(reagents.total_volume/contents.len)) + ..() /obj/item/weapon/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) if(!istype(M, /mob)) return - - if(M == user && user.zone_sel.selecting == "mouth" && contents.len > 0 && !user.wear_mask) - var/obj/item/clothing/mask/cigarette/W = contents[1] - remove_from_storage(W, M) - M.equip_to_slot_if_possible(W, slot_wear_mask) - contents -= W - user << "You take a cigarette out of the pack." + var/obj/item/clothing/mask/cigarette/cig = locate(/obj/item/clothing/mask/cigarette) in contents + if(cig) + if(M == user && user.zone_sel.selecting == "mouth" && contents.len > 0 && !user.wear_mask) + var/obj/item/clothing/mask/cigarette/W = cig + remove_from_storage(W, M) + M.equip_to_slot_if_possible(W, slot_wear_mask) + contents -= W + user << "You take a cigarette out of the pack." + else + ..() else - ..() + user << "There are no cigarettes left in the pack." /obj/item/weapon/storage/fancy/cigarettes/dromedaryco name = "\improper DromedaryCo packet"