From 54b979eb340590c3be50263cc4d479e8e5c28878 Mon Sep 17 00:00:00 2001 From: Krausus Date: Thu, 30 Apr 2015 09:22:21 -0400 Subject: [PATCH 1/9] Adds nicotine addiction to smokables --- .../objects/items/weapons/cigs_lighters.dm | 62 ++++++++++--------- code/modules/reagents/Chemistry-Holder.dm | 2 +- code/modules/reagents/newchem/drugs.dm | 4 +- 3 files changed, 35 insertions(+), 33 deletions(-) diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index 27e3b00b489..8a113f14fce 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -68,12 +68,14 @@ CIGARETTE PACKETS ARE IN FANCY.DM var/lastHolder = null var/smoketime = 300 var/chem_volume = 15 + var/has_nicotine = 1 /obj/item/clothing/mask/cigarette/New() ..() flags |= NOREACT // so it doesn't react until you light it create_reagents(chem_volume) // making the cigarrete a chemical holder with a maximum volume of 15 - reagents.add_reagent("nicotine", 15) + if(has_nicotine) + reagents.add_reagent("nicotine", 15) /obj/item/clothing/mask/cigarette/Destroy() ..() @@ -162,7 +164,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM /obj/item/clothing/mask/cigarette/process() - var/turf/location = get_turf(src) var/mob/living/M = loc if(isliving(loc)) M.IgniteMob() @@ -170,20 +171,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM if(smoketime < 1) die() return - if(location) - location.hotspot_expose(700, 5) - if(reagents && reagents.total_volume) // check if it has any reagents at all - if(iscarbon(loc) && (src == loc:wear_mask)) // if it's in the human/monkey mouth, transfer reagents to the mob - if(istype(loc, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = loc - if(H.species.flags & IS_SYNTHETIC) - return - var/mob/living/carbon/C = loc - if(prob(15)) // so it's not an instarape in case of acid - reagents.reaction(C, INGEST) - reagents.trans_to(C, REAGENTS_METABOLISM) - else // else just remove some of the reagents - reagents.remove_any(REAGENTS_METABOLISM) + smoke() return @@ -193,6 +181,32 @@ CIGARETTE PACKETS ARE IN FANCY.DM die() return ..() +/obj/item/clothing/mask/cigarette/proc/smoke() + var/turf/location = get_turf(src) + var/smoker_is_synthetic = 0 + if(istype(loc, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = loc + if(H.species.flags & IS_SYNTHETIC) + smoker_is_synthetic = 1 // Synthetics can't smoke! + if(location) + location.hotspot_expose(700, 5) + if(reagents && reagents.total_volume) // check if it has any reagents at all + if(iscarbon(loc) && (src == loc:wear_mask) && !smoker_is_synthetic) // if it's in the human/monkey mouth, transfer reagents to the mob + var/mob/living/carbon/C = loc + if(prob(15)) // so it's not an instarape in case of acid + reagents.reaction(C, INGEST) + reagents.trans_to(C, REAGENTS_METABOLISM) + if(!reagents.total_volume) // There were reagents, but now they're gone + C << "Your [name] no longer tastes the same..." + else // else just remove some of the reagents + reagents.remove_any(REAGENTS_METABOLISM) + + if(has_nicotine && iscarbon(loc) && (src == loc:wear_mask) && !smoker_is_synthetic) + var/mob/living/carbon/C = loc + if (!C.reagents.has_reagent("nicotine")) + C.reagents.add_reagent("nicotine", 0.1) + return + /obj/item/clothing/mask/cigarette/proc/die() var/turf/T = get_turf(src) var/obj/item/butt = new type_butt(T) @@ -216,6 +230,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM item_state = "spliffoff" smoketime = 180 chem_volume = 50 + has_nicotine = 0 // The plants these are made from don't actually contain nicotine /obj/item/clothing/mask/cigarette/joint/New() ..() @@ -331,20 +346,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM M.update_inv_wear_mask(0) processing_objects.Remove(src) return - if(location) - location.hotspot_expose(700, 5) - if(reagents && reagents.total_volume) // check if it has any reagents at all - if(iscarbon(loc) && (src == loc:wear_mask)) // if it's in the human/monkey mouth, transfer reagents to the mob - if(istype(loc, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = loc - if(H.species.flags & IS_SYNTHETIC) - return - var/mob/living/carbon/C = loc - if(prob(15)) // so it's not an instarape in case of acid - reagents.reaction(C, INGEST) - reagents.trans_to(C, REAGENTS_METABOLISM) - else // else just remove some of the reagents - reagents.remove_any(REAGENTS_METABOLISM) + smoke() return /obj/item/clothing/mask/cigarette/pipe/attack_self(mob/user as mob) //Refills the pipe. Can be changed to an attackby later, if loose tobacco is added to vendors or something. diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm index 5c05909becd..e0064fec12e 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/Chemistry-Holder.dm @@ -63,7 +63,7 @@ datum if(current_list_element > reagent_list.len) current_list_element = 1 var/datum/reagent/current_reagent = reagent_list[current_list_element] - src.remove_reagent(current_reagent.id, 1) + src.remove_reagent(current_reagent.id, min(1, amount - total_transfered)) current_list_element++ total_transfered++ diff --git a/code/modules/reagents/newchem/drugs.dm b/code/modules/reagents/newchem/drugs.dm index b7012cb7b24..9515a5c9e38 100644 --- a/code/modules/reagents/newchem/drugs.dm +++ b/code/modules/reagents/newchem/drugs.dm @@ -11,14 +11,14 @@ datum/reagent/nicotine reagent_state = LIQUID color = "#60A584" // rgb: 96, 165, 132 overdose_threshold = 35 - addiction_threshold = 30 + addiction_threshold = 0.1 datum/reagent/nicotine/on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom var/smoke_message = pick("You can just feel your lungs dying!", "You feel relaxed.", "You feel calmed.", "You feel the lung cancer forming.", "You feel the money you wasted.", "You feel like a space cowboy.", "You feel rugged.") if(prob(5)) M << "[smoke_message]" - if(prob(50)) + if(volume >= 0.2 && prob(50)) // Trace amounts of nicotine are ineffective M.AdjustParalysis(-1) M.AdjustStunned(-1) M.AdjustWeakened(-1) From 96f2a087adc46231ba3cde3090a30c3ff219d8e3 Mon Sep 17 00:00:00 2001 From: Krausus Date: Thu, 30 Apr 2015 09:26:14 -0400 Subject: [PATCH 2/9] Re-adds passive nicotine comment Thanks for eating my comment, git. --- code/game/objects/items/weapons/cigs_lighters.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index 8a113f14fce..4a62e8d99c4 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -202,6 +202,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM reagents.remove_any(REAGENTS_METABOLISM) if(has_nicotine && iscarbon(loc) && (src == loc:wear_mask) && !smoker_is_synthetic) + // If the cigarette has nicotine, make sure the smoker is getting a bit, even if it's not in the reagents var/mob/living/carbon/C = loc if (!C.reagents.has_reagent("nicotine")) C.reagents.add_reagent("nicotine", 0.1) From 76513254971c1495b48034c7fca9f3e85435e787 Mon Sep 17 00:00:00 2001 From: Krausus Date: Thu, 30 Apr 2015 22:30:53 -0400 Subject: [PATCH 3/9] Reverts nicotine addiction changes --- code/game/objects/items/weapons/cigs_lighters.dm | 6 ------ code/modules/reagents/newchem/drugs.dm | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index 4a62e8d99c4..d8afb760ec9 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -200,12 +200,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM C << "Your [name] no longer tastes the same..." else // else just remove some of the reagents reagents.remove_any(REAGENTS_METABOLISM) - - if(has_nicotine && iscarbon(loc) && (src == loc:wear_mask) && !smoker_is_synthetic) - // If the cigarette has nicotine, make sure the smoker is getting a bit, even if it's not in the reagents - var/mob/living/carbon/C = loc - if (!C.reagents.has_reagent("nicotine")) - C.reagents.add_reagent("nicotine", 0.1) return /obj/item/clothing/mask/cigarette/proc/die() diff --git a/code/modules/reagents/newchem/drugs.dm b/code/modules/reagents/newchem/drugs.dm index 9515a5c9e38..b7012cb7b24 100644 --- a/code/modules/reagents/newchem/drugs.dm +++ b/code/modules/reagents/newchem/drugs.dm @@ -11,14 +11,14 @@ datum/reagent/nicotine reagent_state = LIQUID color = "#60A584" // rgb: 96, 165, 132 overdose_threshold = 35 - addiction_threshold = 0.1 + addiction_threshold = 30 datum/reagent/nicotine/on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom var/smoke_message = pick("You can just feel your lungs dying!", "You feel relaxed.", "You feel calmed.", "You feel the lung cancer forming.", "You feel the money you wasted.", "You feel like a space cowboy.", "You feel rugged.") if(prob(5)) M << "[smoke_message]" - if(volume >= 0.2 && prob(50)) // Trace amounts of nicotine are ineffective + if(prob(50)) M.AdjustParalysis(-1) M.AdjustStunned(-1) M.AdjustWeakened(-1) From d2588f64ec4b31f8a82b769bbcc22b22c705a5f9 Mon Sep 17 00:00:00 2001 From: Krausus Date: Thu, 30 Apr 2015 23:12:28 -0400 Subject: [PATCH 4/9] Fixes some code that was triggering Goofball --- .../objects/items/weapons/cigs_lighters.dm | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index d8afb760ec9..c87bf3fca2d 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -176,22 +176,28 @@ CIGARETTE PACKETS ARE IN FANCY.DM /obj/item/clothing/mask/cigarette/attack_self(mob/user as mob) - if(lit == 1) + if(lit) user.visible_message("[user] calmly drops and treads on the lit [src], putting it out instantly.") die() return ..() /obj/item/clothing/mask/cigarette/proc/smoke() var/turf/location = get_turf(src) - var/smoker_is_synthetic = 0 - if(istype(loc, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = loc - if(H.species.flags & IS_SYNTHETIC) - smoker_is_synthetic = 1 // Synthetics can't smoke! + var/is_being_smoked = 0 + // Check whether this is actually in a mouth, being smoked + if(iscarbon(loc)) + var/mob/living/carbon/C = loc + if(src == C.wear_mask) + if(istype(loc, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = loc + if(!(H.species.flags & IS_SYNTHETIC)) // Silly synthetics, you can't smoke. You don't even have mouths. + is_being_smoked = 1 + else + is_being_smoked = 1 if(location) location.hotspot_expose(700, 5) if(reagents && reagents.total_volume) // check if it has any reagents at all - if(iscarbon(loc) && (src == loc:wear_mask) && !smoker_is_synthetic) // if it's in the human/monkey mouth, transfer reagents to the mob + if(is_being_smoked) // if it's being smoked, transfer reagents to the mob var/mob/living/carbon/C = loc if(prob(15)) // so it's not an instarape in case of acid reagents.reaction(C, INGEST) @@ -345,7 +351,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM return /obj/item/clothing/mask/cigarette/pipe/attack_self(mob/user as mob) //Refills the pipe. Can be changed to an attackby later, if loose tobacco is added to vendors or something. - if(lit == 1) + if(lit) user.visible_message("[user] puts out [src].") lit = 0 icon_state = icon_off From e5f0d0bb6af6a3b576e7be5cc383e4dcdc1b17d2 Mon Sep 17 00:00:00 2001 From: Krausus Date: Fri, 1 May 2015 01:41:19 -0400 Subject: [PATCH 5/9] Changes nicotine pre-generation and fixes lacing --- code/datums/uplink_item.dm | 2 +- .../objects/items/weapons/cigs_lighters.dm | 12 ++-- .../objects/items/weapons/storage/fancy.dm | 58 +++++++++---------- .../reagents/reagent_containers/syringes.dm | 5 ++ 4 files changed, 42 insertions(+), 35 deletions(-) diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index 1db0e95da0d..8ba5f8677d5 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -543,7 +543,7 @@ var/list/uplink_items = list() /datum/uplink_item/badass/syndiecigs name = "Syndicate Smokes" - desc = "Strong flavor, dense smoke, infused with Doctor's Delight." + desc = "Strong flavor, dense smoke, infused with omnizine." item = /obj/item/weapon/storage/fancy/cigarettes/cigpack_syndicate cost = 4 diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index c87bf3fca2d..eebddabcc3c 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -68,14 +68,11 @@ CIGARETTE PACKETS ARE IN FANCY.DM var/lastHolder = null var/smoketime = 300 var/chem_volume = 15 - var/has_nicotine = 1 /obj/item/clothing/mask/cigarette/New() ..() flags |= NOREACT // so it doesn't react until you light it create_reagents(chem_volume) // making the cigarrete a chemical holder with a maximum volume of 15 - if(has_nicotine) - reagents.add_reagent("nicotine", 15) /obj/item/clothing/mask/cigarette/Destroy() ..() @@ -231,7 +228,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM item_state = "spliffoff" smoketime = 180 chem_volume = 50 - has_nicotine = 0 // The plants these are made from don't actually contain nicotine /obj/item/clothing/mask/cigarette/joint/New() ..() @@ -268,6 +264,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM smoketime = 1500 chem_volume = 20 +/obj/item/clothing/mask/cigarette/cigar/New() + ..() + reagents.add_reagent("nicotine", chem_volume) + /obj/item/clothing/mask/cigarette/cigar/cohiba name = "Cohiba Robusto Cigar" desc = "There's little more you could want from a cigar." @@ -323,6 +323,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM smoketime = 1000 chem_volume = 50 +/obj/item/clothing/mask/cigarette/pipe/New() + ..() + reagents.add_reagent("nicotine", chem_volume) + /obj/item/clothing/mask/cigarette/pipe/light(var/flavor_text = "[usr] lights the [name].") if(!src.lit) src.lit = 1 diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index 3dc18e532ca..70eee77c8a5 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -155,13 +155,19 @@ storage_slots = 6 can_hold = list("/obj/item/clothing/mask/cigarette") icon_type = "cigarette" + var/list/unlaced_cigarettes = list() // Cigarettes that haven't received reagents yet + var/default_reagents = list("nicotine" = 15) // List of reagents to pre-generate for each cigarette /obj/item/weapon/storage/fancy/cigarettes/New() ..() flags |= NOREACT - for(var/i = 1 to storage_slots) - new /obj/item/clothing/mask/cigarette(src) create_reagents(15 * storage_slots)//so people can inject cigarettes without opening a packet, now with being able to inject the whole one + for(var/i = 1 to storage_slots) + var/obj/item/clothing/mask/cigarette/C = new /obj/item/clothing/mask/cigarette(src) + unlaced_cigarettes += C + for(var/R in default_reagents) + reagents.add_reagent(R, default_reagents[R]) + /obj/item/weapon/storage/fancy/cigarettes/Destroy() del(reagents) @@ -173,22 +179,25 @@ desc = "There are [contents.len] cig\s left!" return +/obj/item/weapon/storage/fancy/cigarettes/proc/lace_cigarette(var/obj/item/clothing/mask/cigarette/C as obj) + if(istype(C) && (C in unlaced_cigarettes)) // Only transfer reagents to each cigarette once + reagents.trans_to(C, (reagents.total_volume/unlaced_cigarettes.len)) + unlaced_cigarettes -= C + reagents.maximum_volume = 15 * unlaced_cigarettes.len + /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)) - ..() + lace_cigarette(W) + ..() /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 = new /obj/item/clothing/mask/cigarette(user) - reagents.trans_to(W, (reagents.total_volume/contents.len)) - user.equip_to_slot_if_possible(W, slot_wear_mask) - reagents.maximum_volume = 15 * contents.len - contents.len-- + if(istype(M) && M == user && user.zone_sel.selecting == "mouth" && contents.len > 0 && !user.wear_mask) + var/obj/item/clothing/mask/cigarette/C = contents[contents.len] + if(!istype(C)) return + lace_cigarette(C) + user.equip_to_slot_if_possible(C, slot_wear_mask) user << "You take a cigarette out of the pack." update_icon() else @@ -217,11 +226,7 @@ desc = "An obscure brand of cigarettes." icon_state = "syndiepacket" item_state = "cigpacket" - -/obj/item/weapon/storage/fancy/cigarettes/cigpack_syndicate/New() - ..() - for(var/i = 1 to storage_slots) - reagents.add_reagent("omnizine",15) + default_reagents = list("omnizine" = 15) /obj/item/weapon/storage/fancy/cigarettes/cigpack_uplift name = "\improper Uplift Smooth packet" @@ -240,11 +245,7 @@ desc = "Smoked by the truly robust." icon_state = "robustgpacket" item_state = "cigpacket" - -/obj/item/weapon/storage/fancy/cigarettes/cigpack_robustgold/New() - ..() - for(var/i = 1 to storage_slots) - reagents.add_reagent("gold",1) + default_reagents = list("nicotine" = 14, "gold" = 1) /obj/item/weapon/storage/fancy/cigarettes/cigpack_carp name = "\improper Carp Classic packet" @@ -263,14 +264,11 @@ desc = "Is your weight slowing you down? Having trouble running away from gravitational singularities? Can't stop stuffing your mouth? Smoke Shady Jim's Super Slims and watch all that fat burn away. Guaranteed results!" icon_state = "shadyjimpacket" item_state = "cigpacket" - -/obj/item/weapon/storage/fancy/cigarettes/cigpack_shadyjims/New() - ..() - for(var/i = 1 to storage_slots) - reagents.add_reagent("lipolicide",4) - reagents.add_reagent("ammonia",2) - reagents.add_reagent("atrazine",1) - reagents.add_reagent("toxin",1.5) + default_reagents = list("nicotine" = 6.5, + "lipolicide" = 4, + "ammonia" = 2, + "atrazine" = 1, + "toxin" = 1.5) /* * Vial Box diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 1235ad4d1c7..f9cc487d0c7 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -158,6 +158,11 @@ if(!target.is_open_container() && !ismob(target) && !istype(target, /obj/item/weapon/reagent_containers/food) && !istype(target, /obj/item/slime_extract) && !istype(target, /obj/item/clothing/mask/cigarette) && !istype(target, /obj/item/weapon/storage/fancy/cigarettes)) user << "\red You cannot directly fill this object." return + if(istype(target, /obj/item/clothing/mask/cigarette)) + var/obj/item/clothing/mask/cigarette/C = target + if(istype(C.loc, /obj/item/weapon/storage/fancy/cigarettes)) + user << "\red You cannot inject a cigarette while it's still in the pack." + return if(target.reagents.total_volume >= target.reagents.maximum_volume) user << "\red [target] is full." return From 73983dc433a1d70a747c02645f7d299846ce9e40 Mon Sep 17 00:00:00 2001 From: Krausus Date: Fri, 1 May 2015 04:28:18 -0400 Subject: [PATCH 6/9] Fixes putting cigars and pipes into cigarette packs --- code/game/objects/items/weapons/storage/fancy.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index 70eee77c8a5..dbf10425c42 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -154,6 +154,8 @@ slot_flags = SLOT_BELT storage_slots = 6 can_hold = list("/obj/item/clothing/mask/cigarette") + cant_hold = list("/obj/item/clothing/mask/cigarette/cigar", + "/obj/item/clothing/mask/cigarette/pipe") icon_type = "cigarette" var/list/unlaced_cigarettes = list() // Cigarettes that haven't received reagents yet var/default_reagents = list("nicotine" = 15) // List of reagents to pre-generate for each cigarette From 21b92a80f994d97bda788631d68f2ca2ac6248fe Mon Sep 17 00:00:00 2001 From: Krausus Date: Fri, 1 May 2015 22:46:53 -0400 Subject: [PATCH 7/9] Tweaks cigarette reagent depletion message --- code/game/objects/items/weapons/cigs_lighters.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index eebddabcc3c..0b53aabb8cb 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -200,7 +200,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM reagents.reaction(C, INGEST) reagents.trans_to(C, REAGENTS_METABOLISM) if(!reagents.total_volume) // There were reagents, but now they're gone - C << "Your [name] no longer tastes the same..." + C << "Your [name] loses its flavor." else // else just remove some of the reagents reagents.remove_any(REAGENTS_METABOLISM) return From f6ad960f601667bee455c6e08bec8319551f4214 Mon Sep 17 00:00:00 2001 From: Krausus Date: Sat, 2 May 2015 22:43:44 -0400 Subject: [PATCH 8/9] Allows synthetics to get reagents from cigarettes --- code/game/objects/items/weapons/cigs_lighters.dm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index 0b53aabb8cb..5f6b1f0aae4 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -185,12 +185,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM if(iscarbon(loc)) var/mob/living/carbon/C = loc if(src == C.wear_mask) - if(istype(loc, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = loc - if(!(H.species.flags & IS_SYNTHETIC)) // Silly synthetics, you can't smoke. You don't even have mouths. - is_being_smoked = 1 - else - is_being_smoked = 1 + // There used to be a species check here, but synthetics can smoke now + is_being_smoked = 1 if(location) location.hotspot_expose(700, 5) if(reagents && reagents.total_volume) // check if it has any reagents at all From c000cb4c78a072835e0552daedd97d082ce6a3ce Mon Sep 17 00:00:00 2001 From: Krausus Date: Sat, 2 May 2015 23:08:17 -0400 Subject: [PATCH 9/9] Doubles cigar(ette) capacity, tweaks base nicotine --- code/game/objects/items/weapons/cigs_lighters.dm | 10 +++++----- code/game/objects/items/weapons/storage/fancy.dm | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index 5f6b1f0aae4..aacdc9c6e37 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -67,12 +67,12 @@ CIGARETTE PACKETS ARE IN FANCY.DM var/type_butt = /obj/item/weapon/cigbutt var/lastHolder = null var/smoketime = 300 - var/chem_volume = 15 + var/chem_volume = 30 /obj/item/clothing/mask/cigarette/New() ..() flags |= NOREACT // so it doesn't react until you light it - create_reagents(chem_volume) // making the cigarrete a chemical holder with a maximum volume of 15 + create_reagents(chem_volume) // making the cigarrete a chemical holder with a maximum volume of 30 /obj/item/clothing/mask/cigarette/Destroy() ..() @@ -258,11 +258,11 @@ CIGARETTE PACKETS ARE IN FANCY.DM throw_speed = 0.5 item_state = "cigaroff" smoketime = 1500 - chem_volume = 20 + chem_volume = 40 /obj/item/clothing/mask/cigarette/cigar/New() ..() - reagents.add_reagent("nicotine", chem_volume) + reagents.add_reagent("nicotine", chem_volume/2) /obj/item/clothing/mask/cigarette/cigar/cohiba name = "Cohiba Robusto Cigar" @@ -278,7 +278,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM icon_on = "cigar2on" icon_off = "cigar2off" smoketime = 7200 - chem_volume = 30 + chem_volume = 60 /obj/item/weapon/cigbutt name = "cigarette butt" diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index dbf10425c42..94db07084a2 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -163,7 +163,7 @@ /obj/item/weapon/storage/fancy/cigarettes/New() ..() flags |= NOREACT - create_reagents(15 * storage_slots)//so people can inject cigarettes without opening a packet, now with being able to inject the whole one + create_reagents(30 * storage_slots)//so people can inject cigarettes without opening a packet, now with being able to inject the whole one for(var/i = 1 to storage_slots) var/obj/item/clothing/mask/cigarette/C = new /obj/item/clothing/mask/cigarette(src) unlaced_cigarettes += C @@ -185,7 +185,7 @@ if(istype(C) && (C in unlaced_cigarettes)) // Only transfer reagents to each cigarette once reagents.trans_to(C, (reagents.total_volume/unlaced_cigarettes.len)) unlaced_cigarettes -= C - reagents.maximum_volume = 15 * unlaced_cigarettes.len + reagents.maximum_volume = 30 * unlaced_cigarettes.len /obj/item/weapon/storage/fancy/cigarettes/remove_from_storage(obj/item/W as obj, atom/new_location) lace_cigarette(W) @@ -228,7 +228,7 @@ desc = "An obscure brand of cigarettes." icon_state = "syndiepacket" item_state = "cigpacket" - default_reagents = list("omnizine" = 15) + default_reagents = list("nicotine" = 15, "omnizine" = 15) /obj/item/weapon/storage/fancy/cigarettes/cigpack_uplift name = "\improper Uplift Smooth packet" @@ -247,7 +247,7 @@ desc = "Smoked by the truly robust." icon_state = "robustgpacket" item_state = "cigpacket" - default_reagents = list("nicotine" = 14, "gold" = 1) + default_reagents = list("nicotine" = 15, "gold" = 1) /obj/item/weapon/storage/fancy/cigarettes/cigpack_carp name = "\improper Carp Classic packet" @@ -266,8 +266,8 @@ desc = "Is your weight slowing you down? Having trouble running away from gravitational singularities? Can't stop stuffing your mouth? Smoke Shady Jim's Super Slims and watch all that fat burn away. Guaranteed results!" icon_state = "shadyjimpacket" item_state = "cigpacket" - default_reagents = list("nicotine" = 6.5, - "lipolicide" = 4, + default_reagents = list("nicotine" = 15, + "lipolicide" = 7.5, "ammonia" = 2, "atrazine" = 1, "toxin" = 1.5)