diff --git a/code/game/objects/effects/effect_system/smoke.dm b/code/game/objects/effects/effect_system/smoke.dm index c9e404ae5b60..42554194e898 100644 --- a/code/game/objects/effects/effect_system/smoke.dm +++ b/code/game/objects/effects/effect_system/smoke.dm @@ -329,6 +329,33 @@ human_creature.temporary_slowdown = max(human_creature.temporary_slowdown, 4) //One tick every two second human_creature.recalculate_move_delay = TRUE return TRUE +////////////////////////////////////// +// WEED SMOKE +//////////////////////////////////// + +/obj/effect/particle_effect/smoke/weed + name = "Marijuana smoke" + smokeranking = SMOKE_RANK_HIGH + color = "#95d1ac" + opacity = FALSE + alpha = 75 + var/xeno_affecting = TRUE + +/obj/effect/particle_effect/smoke/weed/affect(mob/living/carbon/affected) + ..() + if(ishuman(affected)) + if (affected.internal && affected.wear_mask && (affected.wear_mask.flags_inventory & ALLOWINTERNALS)) + return + else + affected.updatehealth() + if(prob(15) && (affected.coughedtime < world.time)) + affected.coughedtime = 1 + affected.emote("cough") + + affected.last_damage_data = cause_data + + affected.druggy += 5 + ////////////////////////////////////// // FLASHBANG SMOKE @@ -633,6 +660,10 @@ /datum/effect_system/smoke_spread/cn20/xeno smoke_type = /obj/effect/particle_effect/smoke/cn20/xeno +/datum/effect_system/smoke_spread/weed + smoke_type = /obj/effect/particle_effect/smoke/weed + + // XENO SMOKES /datum/effect_system/smoke_spread/xeno_acid diff --git a/code/game/objects/items/tools/flame_tools.dm b/code/game/objects/items/tools/flame_tools.dm index d5cd708f29b3..4c975946a7b6 100644 --- a/code/game/objects/items/tools/flame_tools.dm +++ b/code/game/objects/items/tools/flame_tools.dm @@ -432,10 +432,18 @@ CIGARETTE PACKETS ARE IN FANCY.DM // WEED // //////////// /obj/item/clothing/mask/cigarette/weed - name = "weed joint" + name = "\the weed joint" + icon_state = "blunt_off" + icon_on = "blunt_on" + icon_off = "blunt_off" + item_state = "blunt_on" desc = "A rolled-up package of ambrosia vulgaris, aka space weed, in some smooth paper; you sure this is legal dude?" chem_volume = 39 smoketime = 20 MINUTES + actions_types = list(/datum/action/item_action/hotbox) + var/puff_cooldown = 10 SECONDS + var/can_puff = TRUE + var/datum/effect_system/smoke_spread/smoke /obj/item/clothing/mask/cigarette/weed/Initialize() . = ..() @@ -443,6 +451,72 @@ CIGARETTE PACKETS ARE IN FANCY.DM reagents.add_reagent("bicaridine", 8) reagents.add_reagent("kelotane", 1) +/obj/item/clothing/mask/cigarette/weed/verb/puff() + set name = "Hotbox" + set desc = "Puff a fat cloud." + set category = "Smoke" + set src in usr + var/mob/living/carbon/human/smoker = usr + var/datum/effect_system/smoke_spread/smoke = new /datum/effect_system/smoke_spread/weed + if(!smoker || smoker.is_mob_incapacitated(TRUE)) + return + + if(smoker.wear_mask != src) + return + + if(!can_puff) + to_chat(smoker,SPAN_NOTICE("Your lungs lack fresh air, chill man.")) + return + + if(icon_on == "blunt_off") + to_chat(smoker,SPAN_NOTICE("You need to light it up first.")) + return + + smoker.visible_message(SPAN_NOTICE("[src] takes a massive breath!"),\ + SPAN_WARNING("You prepare for a massive cloud!")) + + if(!do_after(smoker, 4 SECONDS, INTERRUPT_ALL, BUSY_ICON_FRIENDLY)) + to_chat(smoker,SPAN_NOTICE("You fumble the puff!")) + smoker.emote("cough") + smoker.emote("gasp") + smoker.apply_damage(rand(5,10),OXYLOSS) + can_puff = FALSE + addtimer(VARSET_CALLBACK(src, can_puff, TRUE), puff_cooldown + 5 SECONDS) + return + + smoker.visible_message(SPAN_BOLDNOTICE("[smoker] puffs a massive cloud from their [src]")) + smoke.set_up(rand(1,3), 0, get_turf(smoker),smoker.dir,5) + smoketime -= 4 MINUTES // Burns it a lot faster when + can_puff = FALSE + addtimer(VARSET_CALLBACK(src, can_puff, TRUE), puff_cooldown) // Need to take a breather before puffing + smoker.apply_damage(rand(1,10),OXYLOSS) + smoker.druggy += 50 // Awww yeah + smoker.make_jittery(40) + + if(prob(10)) + smoker.emote("cough") + smoke.start() + +/datum/action/item_action/hotbox/New(mob/living/user, obj/item/holder) + ..() + name = "Puff" + button.name = name + button.overlays.Cut() + var/image/IMG = image('icons/mob/hud/actions_xeno.dmi', button, "shift_spit_acid_glob") + button.overlays += IMG + +/datum/action/item_action/hotbox/can_use_action() + var/mob/living/carbon/human/H = owner + if(istype(H) && !H.is_mob_incapacitated() && H.body_position == STANDING_UP && holder_item == H.wear_mask) + return TRUE + +/datum/action/item_action/hotbox/action_activate() + var/obj/item/clothing/mask/cigarette/weed/weed = holder_item + if(!istype(weed)) + return + weed.puff() + + //////////// // CIGARS // //////////// diff --git a/code/game/objects/items/trash.dm b/code/game/objects/items/trash.dm index d9d40e003c7a..5171cb703b5a 100644 --- a/code/game/objects/items/trash.dm +++ b/code/game/objects/items/trash.dm @@ -151,6 +151,10 @@ desc = "A manky old cigar butt." icon_state = "cigarbutt" +/obj/item/trash/bluntbutt + name = "roach" + desc = "Someone's been puffing some good kush." + icon_state = "bluntbutt" //////////// ///Dishes/// //////////// diff --git a/icons/mob/humans/onmob/items_lefthand_0.dmi b/icons/mob/humans/onmob/items_lefthand_0.dmi index bcf2773e8dd7..59b3acebb97b 100644 Binary files a/icons/mob/humans/onmob/items_lefthand_0.dmi and b/icons/mob/humans/onmob/items_lefthand_0.dmi differ diff --git a/icons/mob/humans/onmob/items_righthand_0.dmi b/icons/mob/humans/onmob/items_righthand_0.dmi index d53360ec86a7..ae9d05b34ad7 100644 Binary files a/icons/mob/humans/onmob/items_righthand_0.dmi and b/icons/mob/humans/onmob/items_righthand_0.dmi differ diff --git a/icons/mob/humans/onmob/mask.dmi b/icons/mob/humans/onmob/mask.dmi index 0c4ac97807d9..11af0ba87b28 100644 Binary files a/icons/mob/humans/onmob/mask.dmi and b/icons/mob/humans/onmob/mask.dmi differ diff --git a/icons/obj/items/clothing/masks.dmi b/icons/obj/items/clothing/masks.dmi index 037ee8aba119..a937f0950e57 100644 Binary files a/icons/obj/items/clothing/masks.dmi and b/icons/obj/items/clothing/masks.dmi differ