diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm index 1d6cbfb87af..aee782b58f1 100644 --- a/code/__DEFINES/status_effects.dm +++ b/code/__DEFINES/status_effects.dm @@ -135,6 +135,9 @@ #define STATUS_EFFECT_SURRENDER /datum/status_effect/grouped/surrender // gives an alert to quickly surrender #define STATUS_EFFECT_EIGEN /datum/status_effect/eigenstasium + +#define STATUS_EFFECT_STONED /datum/status_effect/stoned + ///////////// // SLIME // ///////////// diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index d60d9586b63..c1dcfb07e85 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -294,7 +294,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai /// Addictions don't tick down, basically they're permanently addicted #define TRAIT_HOPELESSLY_ADDICTED "hopelessly_addicted" /// Special examine if eyes are visible -#define CULT_EYES "cult_eyes" +#define TRAIT_CULT_EYES "cult_eyes" +/// Special examine if eyes are visible +#define TRAIT_BLOODSHOT_EYES "bloodshot_eyes" /// This mob should never close UI even if it doesn't have a client #define TRAIT_PRESERVE_UI_WITHOUT_CLIENT "preserve_ui_without_client" diff --git a/code/datums/mood_events/drug_events.dm b/code/datums/mood_events/drug_events.dm index 99e48ba9291..03e0b7bf94e 100644 --- a/code/datums/mood_events/drug_events.dm +++ b/code/datums/mood_events/drug_events.dm @@ -2,6 +2,10 @@ mood_change = 6 description = "Woooow duudeeeeee... I'm tripping baaalls...\n" +/datum/mood_event/stoned + mood_change = 6 + description = "I'm sooooo stooooooooooooned...\n" + /datum/mood_event/smoked description = "I have had a smoke recently.\n" mood_change = 2 diff --git a/code/datums/status_effects/drug_effects.dm b/code/datums/status_effects/drug_effects.dm index dcc45e5c5c2..224182f16e3 100644 --- a/code/datums/status_effects/drug_effects.dm +++ b/code/datums/status_effects/drug_effects.dm @@ -58,3 +58,41 @@ name = "Seizure" desc = "FJOIWEHUWQEFGYUWDGHUIWHUIDWEHUIFDUWGYSXQHUIODSDBNJKVBNKDML <--- this is you right now" icon_state = "paralysis" + +/datum/status_effect/stoned + id = "stoned" + duration = 10 SECONDS + alert_type = /atom/movable/screen/alert/status_effect/stoned + status_type = STATUS_EFFECT_REFRESH + var/original_eye_color + +/datum/status_effect/stoned/on_apply() + if(!ishuman(owner)) + CRASH("[type] status effect added to non-human owner: [owner ? owner.type : "null owner"]") + var/mob/living/carbon/human/human_owner = owner + original_eye_color = human_owner.eye_color + human_owner.add_movespeed_modifier(/datum/movespeed_modifier/reagent/cannabis) //slows you down + human_owner.eye_color = BLOODCULT_EYE //makes cult eyes less obvious + human_owner.update_body() //updates eye color + ADD_TRAIT(human_owner, TRAIT_BLOODSHOT_EYES, type) //dilates blood vessels in eyes + ADD_TRAIT(human_owner, TRAIT_CLUMSY, type) //impairs motor coordination + SEND_SIGNAL(human_owner, COMSIG_ADD_MOOD_EVENT, "stoned", /datum/mood_event/stoned) //improves mood + human_owner.sound_environment_override = SOUND_ENVIRONMENT_DRUGGED //not realistic but very immersive + return TRUE + +/datum/status_effect/stoned/on_remove() + if(!ishuman(owner)) + stack_trace("[type] status effect being removed from non-human owner: [owner ? owner.type : "null owner"]") + var/mob/living/carbon/human/human_owner = owner + human_owner.remove_movespeed_modifier(/datum/movespeed_modifier/reagent/cannabis) + human_owner.eye_color = original_eye_color + human_owner.update_body() + REMOVE_TRAIT(human_owner, TRAIT_BLOODSHOT_EYES, type) + REMOVE_TRAIT(human_owner, TRAIT_CLUMSY, type) + SEND_SIGNAL(human_owner, COMSIG_CLEAR_MOOD_EVENT, "stoned") + human_owner.sound_environment_override = SOUND_ENVIRONMENT_NONE + +/atom/movable/screen/alert/status_effect/stoned + name = "Stoned" + desc = "Cannabis is impairing your speed, motor skills, and mental cognition." + icon_state = "stoned" diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm index a443233fa4b..d2423a2bd30 100644 --- a/code/game/objects/items/cigs_lighters.dm +++ b/code/game/objects/items/cigs_lighters.dm @@ -461,7 +461,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM starts_lit = TRUE /obj/item/clothing/mask/cigarette/rollie/cannabis - list_reagents = list(/datum/reagent/drug/space_drugs = 15, /datum/reagent/toxin/lipolicide = 35) + list_reagents = list(/datum/reagent/drug/cannabis = 15) /obj/item/clothing/mask/cigarette/rollie/mindbreaker list_reagents = list(/datum/reagent/toxin/mindbreaker = 35, /datum/reagent/toxin/lipolicide = 15) diff --git a/code/modules/antagonists/cult/cult.dm b/code/modules/antagonists/cult/cult.dm index 034fea9128a..643f223bc18 100644 --- a/code/modules/antagonists/cult/cult.dm +++ b/code/modules/antagonists/cult/cult.dm @@ -134,7 +134,7 @@ var/mob/living/carbon/human/H = current H.eye_color = initial(H.eye_color) H.dna.update_ui_block(DNA_EYE_COLOR_BLOCK) - REMOVE_TRAIT(H, CULT_EYES, CULT_TRAIT) + REMOVE_TRAIT(H, TRAIT_CULT_EYES, CULT_TRAIT) H.remove_overlay(HALO_LAYER) H.update_body() @@ -274,7 +274,7 @@ var/mob/living/carbon/human/H = cultist H.eye_color = "f00" H.dna.update_ui_block(DNA_EYE_COLOR_BLOCK) - ADD_TRAIT(H, CULT_EYES, CULT_TRAIT) + ADD_TRAIT(H, TRAIT_CULT_EYES, CULT_TRAIT) H.update_body() /datum/team/cult/proc/ascend(cultist) diff --git a/code/modules/hydroponics/grown/cannabis.dm b/code/modules/hydroponics/grown/cannabis.dm index 97bbcb2a7c8..90144b7c003 100644 --- a/code/modules/hydroponics/grown/cannabis.dm +++ b/code/modules/hydroponics/grown/cannabis.dm @@ -18,7 +18,7 @@ /obj/item/seeds/cannabis/death, /obj/item/seeds/cannabis/white, /obj/item/seeds/cannabis/ultimate) - reagents_add = list(/datum/reagent/drug/space_drugs = 0.15, /datum/reagent/toxin/lipolicide = 0.35) // gives u the munchies + reagents_add = list(/datum/reagent/drug/cannabis = 0.15) /obj/item/seeds/cannabis/rainbow @@ -29,7 +29,7 @@ plantname = "Rainbow Weed" product = /obj/item/food/grown/cannabis/rainbow mutatelist = list() - reagents_add = list(/datum/reagent/colorful_reagent = 0.05, /datum/reagent/medicine/psicodine = 0.03, /datum/reagent/drug/happiness = 0.1, /datum/reagent/toxin/mindbreaker = 0.1, /datum/reagent/toxin/lipolicide = 0.15) + reagents_add = list(/datum/reagent/colorful_reagent = 0.05, /datum/reagent/medicine/psicodine = 0.03, /datum/reagent/drug/happiness = 0.1, /datum/reagent/toxin/mindbreaker = 0.1, /datum/reagent/toxin/lipolicide = 0.15, /datum/reagent/drug/space_drugs = 0.15) rarity = 40 /obj/item/seeds/cannabis/death @@ -40,7 +40,7 @@ plantname = "Deathweed" product = /obj/item/food/grown/cannabis/death mutatelist = list() - reagents_add = list(/datum/reagent/toxin/cyanide = 0.35, /datum/reagent/drug/space_drugs = 0.15, /datum/reagent/toxin/lipolicide = 0.15) + reagents_add = list(/datum/reagent/toxin/cyanide = 0.35, /datum/reagent/drug/cannabis = 0.15) rarity = 40 /obj/item/seeds/cannabis/white @@ -52,7 +52,7 @@ instability = 30 product = /obj/item/food/grown/cannabis/white mutatelist = list() - reagents_add = list(/datum/reagent/medicine/omnizine = 0.35, /datum/reagent/drug/space_drugs = 0.15, /datum/reagent/toxin/lipolicide = 0.15) + reagents_add = list(/datum/reagent/medicine/omnizine = 0.35, /datum/reagent/drug/cannabis = 0.15) rarity = 40 @@ -65,7 +65,7 @@ product = /obj/item/food/grown/cannabis/ultimate genes = list(/datum/plant_gene/trait/repeated_harvest, /datum/plant_gene/trait/glow/green, /datum/plant_gene/trait/modified_volume/omega_weed) mutatelist = list() - reagents_add = list(/datum/reagent/drug/space_drugs = 0.3, + reagents_add = list(/datum/reagent/drug/cannabis = 0.3, /datum/reagent/toxin/mindbreaker = 0.3, /datum/reagent/mercury = 0.15, /datum/reagent/lithium = 0.15, diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index dd1cc38ac62..15041561f07 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -81,8 +81,11 @@ if(!(obscured & ITEM_SLOT_EYES) ) if(glasses && !(glasses.item_flags & EXAMINE_SKIP)) . += "[t_He] [t_has] [glasses.get_examine_string(user)] covering [t_his] eyes." - else if(eye_color == BLOODCULT_EYE && IS_CULTIST(src) && HAS_TRAIT(src, CULT_EYES)) - . += span_warning("[t_His] eyes are glowing an unnatural red!") + else if(eye_color == BLOODCULT_EYE) + if(IS_CULTIST(src) && HAS_TRAIT(src, TRAIT_CULT_EYES)) + . += "[t_His] eyes are glowing an unnatural red!" + else if(HAS_TRAIT(src, TRAIT_BLOODSHOT_EYES)) + . += "[t_His] eyes are bloodshot!" //ears if(ears && !(obscured & ITEM_SLOT_EARS) && !(ears.item_flags & EXAMINE_SKIP)) diff --git a/code/modules/movespeed/modifiers/reagent.dm b/code/modules/movespeed/modifiers/reagent.dm index b7108582d93..ac2f3cdd4c9 100644 --- a/code/modules/movespeed/modifiers/reagent.dm +++ b/code/modules/movespeed/modifiers/reagent.dm @@ -22,6 +22,9 @@ /datum/movespeed_modifier/reagent/nitryl multiplicative_slowdown = -0.65 +/datum/movespeed_modifier/reagent/cannabis + multiplicative_slowdown = 0.4 + /datum/movespeed_modifier/reagent/freon multiplicative_slowdown = 1.6 diff --git a/code/modules/reagents/chemistry/reagents/drug_reagents.dm b/code/modules/reagents/chemistry/reagents/drug_reagents.dm index 71d02f917d3..361cf8cdce3 100644 --- a/code/modules/reagents/chemistry/reagents/drug_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/drug_reagents.dm @@ -34,6 +34,31 @@ M.hallucination += 5 ..() +/datum/reagent/drug/cannabis + name = "Cannabis" + description = "A psychoactive drug from the Cannabis plant used for recreational purposes." + color = "#059033" + overdose_threshold = INFINITY + ph = 6 + chemical_flags = REAGENT_CAN_BE_SYNTHESIZED + metabolization_rate = 0.125 * REAGENTS_METABOLISM + +/datum/reagent/drug/cannabis/on_mob_life(mob/living/carbon/M, delta_time, times_fired) + M.apply_status_effect(/datum/status_effect/stoned) + if(DT_PROB(1, delta_time)) + var/smoke_message = pick("You feel relaxed.","You feel calmed.","Your mouth feels dry.","You could use some water.","Your heart beats quickly.","You feel clumsy.","You crave junk food.","You notice you've been moving more slowly.") + to_chat(M, "[smoke_message]") + if(DT_PROB(2, delta_time)) + M.emote(pick("smile","laugh","giggle")) + M.adjust_nutrition(-1 * REM * delta_time) //munchies + if(DT_PROB(4, delta_time) && M.body_position == LYING_DOWN && !M.IsSleeping()) //chance to fall asleep if lying down + to_chat(M, "You doze off...") + M.Sleeping(10 SECONDS) + if(DT_PROB(4, delta_time) && M.buckled && M.body_position != LYING_DOWN && !M.IsParalyzed()) //chance to be couchlocked if sitting + to_chat(M, "It's too comfy to move...") + M.Paralyze(10 SECONDS) + return ..() + /datum/reagent/drug/nicotine name = "Nicotine" description = "Slightly reduces stun times. If overdosed it will deal toxin and oxygen damage." diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm index 63b400ac3a8..c971f1178f3 100644 --- a/code/modules/surgery/organs/eyes.dm +++ b/code/modules/surgery/organs/eyes.dm @@ -476,7 +476,7 @@ adapt_light.update_brightness(adapted) //traits ADD_TRAIT(adapted, TRAIT_FLASH_SENSITIVE, ORGAN_TRAIT) - ADD_TRAIT(adapted, CULT_EYES, ORGAN_TRAIT) + ADD_TRAIT(adapted, TRAIT_CULT_EYES, ORGAN_TRAIT) /obj/item/organ/eyes/night_vision/maintenance_adapted/on_life(delta_time, times_fired) var/turf/owner_turf = get_turf(owner) @@ -496,5 +496,5 @@ adapt_light.forceMove(src) //traits REMOVE_TRAIT(unadapted, TRAIT_FLASH_SENSITIVE, ORGAN_TRAIT) - REMOVE_TRAIT(unadapted, CULT_EYES, ORGAN_TRAIT) + REMOVE_TRAIT(unadapted, TRAIT_CULT_EYES, ORGAN_TRAIT) return ..() diff --git a/icons/hud/screen_alert.dmi b/icons/hud/screen_alert.dmi index ef05d5f7d72..3ba3f98b93c 100755 Binary files a/icons/hud/screen_alert.dmi and b/icons/hud/screen_alert.dmi differ