PKP Mind Virus: Glorfing Cigs edition (#69904)

* PKP Mind Virus: Glorfing Cigs edition

If you glorf while smoking you'll get the cig stuck in your throat, leaving you unable to breath, speak, or eat. Based off the sort of cig you have a random delay before you vomit up the cig. (Pipes last forever don't philoso-larp kids). Other players can help you by using the help action on you while you're hurt, which leads to something imitating the himelich manuver, a broken chest, and a vomited up blockage. Other forms of vomiting will work too, if that's even applicable.

Oh I fixed a bug in vomit code. Because paralyzing you forces you to the ground, thus changing your dir, paralyzing vomits always went down. This is cringe, easy fix tho.

Ah and I added some extra functionality to sound loops too. You can set them to pick and take from the provided list, then refilling it once it's empty. This keeps some variety while preventing the risk of repeat sounds

Oh and I added some new signals. Some misc ones, for force say and a different kind of help then the existing one, which I renamed. One for breathing, which I used to clean up leroxin. I was planning to hook this but didn't need to in the end.

One for vomiting too. and eating. Also added a way to update looping timer delays. Forgot about that, I also added variable delay for sound loops, because I thought it sounded better here.

Features audio courtesy of our very own san7890, and the quake jump sound.
This commit is contained in:
LemonInTheDark
2022-10-19 06:34:45 -04:00
committed by GitHub
parent 56a8387b96
commit cd3a778915
27 changed files with 485 additions and 25 deletions
@@ -22,3 +22,13 @@
spawning = 1
velocity = list(0, 0.3, 0)
friction = 0.25
/particles/smoke/ash
icon_state = list("ash_1" = 2, "ash_2" = 2, "ash_3" = 1, "smoke_1" = 3, "smoke_2" = 2)
count = 500
spawning = 1
lifespan = 1 SECONDS
fade = 0.2 SECONDS
fadein = 0.7 SECONDS
position = generator("vector", list(-3, 5, 0), list(3, 6.5, 0), NORMAL_RAND)
velocity = generator("vector", list(-0.1, 0.4, 0), list(0.1, 0.5, 0), NORMAL_RAND)
+23 -1
View File
@@ -163,7 +163,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/smoke_all = FALSE
/// How much damage this deals to the lungs per drag.
var/lung_harm = 1
/// If, when glorf'd, we will choke on this cig forever
var/choke_forever = FALSE
/// When choking, what is the maximum amount of time we COULD choke for
var/choke_time_max = 30 SECONDS // I am mean
/obj/item/clothing/mask/cigarette/Initialize(mapload)
. = ..()
@@ -181,6 +184,21 @@ CIGARETTE PACKETS ARE IN FANCY.DM
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/clothing/mask/cigarette/equipped(mob/equipee, slot)
. = ..()
if(!(slot & ITEM_SLOT_MASK))
UnregisterSignal(equipee, COMSIG_HUMAN_FORCESAY)
return
RegisterSignal(equipee, COMSIG_HUMAN_FORCESAY, .proc/on_forcesay)
/obj/item/clothing/mask/cigarette/dropped(mob/dropee)
. = ..()
UnregisterSignal(dropee, COMSIG_HUMAN_FORCESAY)
/obj/item/clothing/mask/cigarette/proc/on_forcesay(mob/living/source)
SIGNAL_HANDLER
source.apply_status_effect(/datum/status_effect/choke, src, lit, choke_forever ? -1 : rand(25 SECONDS, choke_time_max))
/obj/item/clothing/mask/cigarette/suicide_act(mob/user)
user.visible_message(span_suicide("[user] is huffing [src] as quickly as [user.p_they()] can! It looks like [user.p_theyre()] trying to give [user.p_them()]self cancer."))
return (TOXLOSS|OXYLOSS)
@@ -431,6 +449,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
smoketime = 4 MINUTES
chem_volume = 50
list_reagents = null
choke_time_max = 40 SECONDS
/obj/item/clothing/mask/cigarette/rollie/Initialize(mapload)
name = pick(list(
@@ -503,6 +522,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
heat = 473.15 // Lowered so that the sugar can be carmalized, but not burnt.
lung_harm = 0.5
list_reagents = list(/datum/reagent/consumable/sugar = 20)
choke_time_max = 70 SECONDS // This shit really is deadly
/obj/item/clothing/mask/cigarette/candy/nicotine
desc = "For all ages*! Doesn't contain any* amount of nicotine. Health and safety risks can be read on the tip of the cigarette."
@@ -538,6 +558,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
smoketime = 11 MINUTES
chem_volume = 40
list_reagents = list(/datum/reagent/drug/nicotine = 25)
choke_time_max = 40 SECONDS
/obj/item/clothing/mask/cigarette/cigar/cohiba
name = "\improper Cohiba Robusto cigar"
@@ -589,6 +610,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
chem_volume = 200 // So we can fit densified chemicals plants
list_reagents = null
w_class = WEIGHT_CLASS_SMALL
choke_forever = TRUE
///name of the stuff packed inside this pipe
var/packeditem