Reverts projectile sneezing :( (#89292)

## About The Pull Request

Reverts #83361

## Why It's Good For The Game

I PR'd the original with the intent of making disease battling more
engaging by adding warnings and sneeze dodging, but this was rejected
and instead we got a very awkward middle ground where no one is happy
and the original PR didnt accomplish what it set out to accomplish. You
can't dodge the sneeze because it's a shotgun spread and invisible :/.
The sneeze catchers are even somewhat buggy and the sneeze warning leads
to extra chat clutter
This commit is contained in:
Time-Green
2025-02-10 01:47:25 +01:00
committed by Roxy
parent cc72421d09
commit f5e1466305
14 changed files with 21 additions and 98 deletions
@@ -52,8 +52,8 @@
if(!suppress_warning)
affected_mob.emote("sniff")
else
if(affected_mob.can_spread_airborne_diseases()) //don't spread germs if they covered their mouth
affected_mob.infectious_sneeze(active_disease, TRUE, range = spread_range)
affected_mob.emote("sneeze")
active_disease.airborne_spread(spread_range = src.spread_range, force_spread = TRUE, require_facing = TRUE)
if(cartoon_sneezing) //Yeah, this can fling you around even if you have a space suit helmet on. It's, uh, bluespace snot, yeah.
to_chat(affected_mob, span_userdanger("You are launched violently backwards by an all-mighty sneeze!"))
var/sneeze_distance = rand(2,4) //twice as far as a normal baseball bat strike will fling you
+3 -3
View File
@@ -6,7 +6,7 @@
cures = list(/datum/reagent/medicine/spaceacillin)
agent = "XY-rhinovirus"
viable_mobtypes = list(/mob/living/carbon/human)
spreading_modifier = 0.1
spreading_modifier = 0.5
spread_text = "Airborne"
severity = DISEASE_SEVERITY_NONTHREAT
required_organ = ORGAN_SLOT_LUNGS
@@ -20,7 +20,7 @@
switch(stage)
if(2)
if(SPT_PROB(0.5, seconds_per_tick))
affected_mob.infectious_sneeze(src, TRUE)
affected_mob.emote("sneeze")
if(SPT_PROB(0.5, seconds_per_tick))
affected_mob.emote("cough")
if(SPT_PROB(0.5, seconds_per_tick))
@@ -33,7 +33,7 @@
return FALSE
if(3)
if(SPT_PROB(0.5, seconds_per_tick))
affected_mob.infectious_sneeze(src, TRUE)
affected_mob.emote("sneeze")
if(SPT_PROB(0.5, seconds_per_tick))
affected_mob.emote("cough")
if(SPT_PROB(0.5, seconds_per_tick))
+2 -2
View File
@@ -20,7 +20,7 @@
if(2)
affected_mob.adjust_bodytemperature(-5 * seconds_per_tick)
if(SPT_PROB(0.5, seconds_per_tick))
affected_mob.infectious_sneeze(src, TRUE)
affected_mob.emote("sneeze")
if(SPT_PROB(0.5, seconds_per_tick))
affected_mob.emote("cough")
if(SPT_PROB(0.5, seconds_per_tick))
@@ -34,7 +34,7 @@
if(3)
affected_mob.adjust_bodytemperature(-10 * seconds_per_tick)
if(SPT_PROB(0.5, seconds_per_tick))
affected_mob.infectious_sneeze(src, TRUE)
affected_mob.emote("sneeze")
if(SPT_PROB(0.5, seconds_per_tick))
affected_mob.emote("cough")
if(SPT_PROB(0.5, seconds_per_tick))
+1 -1
View File
@@ -40,7 +40,7 @@
switch(stage)
if(2, 3) //Pretend to be a cold and give time to spread.
if(SPT_PROB(4, seconds_per_tick))
affected_mob.sneeze()
affected_mob.emote("sneeze")
if(SPT_PROB(4, seconds_per_tick))
affected_mob.emote("cough")
if(SPT_PROB(0.5, seconds_per_tick))
+1 -1
View File
@@ -19,7 +19,7 @@
switch(stage)
if(2)
if(SPT_PROB(0.5, seconds_per_tick))
affected_mob.sneeze()
affected_mob.emote("sneeze")
if(3)
if(SPT_PROB(2.5, seconds_per_tick))
affected_mob.emote("cough")
+3 -3
View File
@@ -7,7 +7,7 @@
cure_chance = 5
agent = "H13N1 flu virion"
viable_mobtypes = list(/mob/living/carbon/human)
spreading_modifier = 0.1
spreading_modifier = 0.75
desc = "If left untreated the subject will feel quite unwell."
severity = DISEASE_SEVERITY_MINOR
required_organ = ORGAN_SLOT_LUNGS
@@ -20,7 +20,7 @@
switch(stage)
if(2)
if(SPT_PROB(0.5, seconds_per_tick))
affected_mob.infectious_sneeze(src, TRUE)
affected_mob.emote("sneeze")
if(SPT_PROB(0.5, seconds_per_tick))
affected_mob.emote("cough")
if(SPT_PROB(0.5, seconds_per_tick))
@@ -38,7 +38,7 @@
if(3)
if(SPT_PROB(0.5, seconds_per_tick))
affected_mob.infectious_sneeze(src, TRUE)
affected_mob.emote("sneeze")
if(SPT_PROB(0.5, seconds_per_tick))
affected_mob.emote("cough")
if(SPT_PROB(0.5, seconds_per_tick))
+3 -3
View File
@@ -7,7 +7,7 @@
cure_chance = 5
agent = "1nqu1s1t10n flu virion"
viable_mobtypes = list(/mob/living/carbon/human)
spreading_modifier = 0.1
spreading_modifier = 0.75
desc = "If left untreated the subject will burn to death for being a heretic."
severity = DISEASE_SEVERITY_DANGEROUS
required_organ = ORGAN_SLOT_LUNGS
@@ -21,7 +21,7 @@
if(2)
affected_mob.adjust_bodytemperature(5 * seconds_per_tick)
if(SPT_PROB(2.5, seconds_per_tick))
affected_mob.infectious_sneeze(src, TRUE)
affected_mob.emote("sneeze")
if(SPT_PROB(2.5, seconds_per_tick))
affected_mob.emote("cough")
if(SPT_PROB(0.5, seconds_per_tick))
@@ -31,7 +31,7 @@
if(3)
affected_mob.adjust_bodytemperature(10 * seconds_per_tick)
if(SPT_PROB(2.5, seconds_per_tick))
affected_mob.infectious_sneeze(src, TRUE)
affected_mob.emote("sneeze")
if(SPT_PROB(2.5, seconds_per_tick))
affected_mob.emote("cough")
if(SPT_PROB(2.5, seconds_per_tick))
+1 -1
View File
@@ -99,7 +99,7 @@
var/datum/action/cooldown/spell/picked = pick(random_spells)
picked.Activate(affected_mob)
affected_mob.sneeze()
affected_mob.emote("sneeze")
return
/datum/disease/wizarditis/proc/spawn_wizard_clothes(chance = 0)
@@ -798,7 +798,7 @@
if(prob(40))
fake_emote = "cough"
else
owner.sneeze()
fake_emote = "sneeze"
if(fake_emote)
owner.emote(fake_emote)
@@ -33,7 +33,7 @@
switch(stage)
if(3, 4)
if(SPT_PROB(1, seconds_per_tick))
owner.sneeze()
owner.emote("sneeze")
if(SPT_PROB(1, seconds_per_tick))
owner.emote("cough")
if(SPT_PROB(1, seconds_per_tick))
@@ -42,7 +42,7 @@
to_chat(owner, span_danger("Mucous runs down the back of your throat."))
if(5)
if(SPT_PROB(1, seconds_per_tick))
owner.sneeze()
owner.emote("sneeze")
if(SPT_PROB(1, seconds_per_tick))
owner.emote("cough")
if(SPT_PROB(2, seconds_per_tick))
-76
View File
@@ -1,76 +0,0 @@
/// How many degrees, up and down, can our sneeze deviate from our facing direction?
#define SNEEZE_CONE 60
/// Launch a sneeze that can infect with a disease
/mob/living/proc/infectious_sneeze(datum/disease/disease, force, range = 4, count = 4, charge_time = 0.5 SECONDS, obj/projectile/sneezoid = /obj/projectile/sneeze)
sneeze(range, count, charge_time, sneezoid, on_sneeze_hit_callback = CALLBACK(src, PROC_REF(try_sneeze_infect), disease.Copy(), force))
/// Try and infect following a sneeze hit. force to always infect
/mob/living/proc/try_sneeze_infect(datum/disease/disease, force, mob/living/target)
target.contract_airborne_disease(disease)
/// Inhale and start the sneeze timer. on_sneeze_callback can be used to do custom sneezes, on_sneeze_hit_callback for special effects, but probably usually making it infect
/mob/living/proc/sneeze(range = 4, count = 3, charge_time = 0.5 SECONDS, obj/projectile/sneezoid = /obj/projectile/sneeze, on_sneeze_callback = null, on_sneeze_hit_callback = null)
if(charge_time)
emote("inhale")
clear_fullscreen("sneezer", 0)
var/atom/movable/screen/fullscreen/cursor_catcher/catcher = overlay_fullscreen("sneezer", /atom/movable/screen/fullscreen/cursor_catcher, FALSE)
if(client)
catcher.assign_to_mob(src)
var/callback = on_sneeze_callback || CALLBACK(src, PROC_REF(launch_sneeze), range, count, sneezoid, on_sneeze_hit_callback, catcher)
addtimer(callback, charge_time)
/// Shoot the sneeze projectile
/mob/living/proc/launch_sneeze(range, count, obj/projectile/sneezoid, datum/callback/on_sneeze_hit_callback, atom/movable/screen/fullscreen/cursor_catcher/catcher)
emote("sneeze")
var/angle = dir2angle(dir)
if(catcher && catcher.given_turf)
catcher.calculate_params()
/// Take the target and subtract self for relative grid position. Then take the pixel x on the tile and divide by the tiles pixel size, and add 0.5 so it's fired from the center
var/sneeze_x = catcher.given_turf.x - x + catcher.given_x / ICON_SIZE_X - 0.5
var/sneeze_y = catcher.given_turf.y - y + catcher.given_y / ICON_SIZE_Y - 0.5
angle = ATAN2(sneeze_y, sneeze_x)
// Check if we're within the sneeze cone, otherwise just sneeze straight
if(abs(closer_angle_difference(angle, dir2angle(dir) - SNEEZE_CONE)) + abs(closer_angle_difference(angle, dir2angle(dir) + SNEEZE_CONE)) > 2 * SNEEZE_CONE)
angle = dir2angle(dir)
clear_fullscreen("sneezer", 0)
for(var/i in 0 to count)
var/obj/projectile/sneezium = new sneezoid(get_turf(src), on_sneeze_hit_callback)
sneezium.range = range
sneezium.firer = src
sneezium.fire(angle)
/// Sneeze projectile launched by sneezing. gross
/obj/projectile/sneeze
name = "sneeze"
icon_state = "sneeze"
suppressed = SUPPRESSED_VERY
range = 4
speed = 0.25
spread = 40
damage_type = BRUTE
damage = 0
hitsound = null
/// Call this when we hit something
var/datum/callback/sneezie_callback
/obj/projectile/sneeze/Initialize(mapload, callback)
. = ..()
sneezie_callback = callback
/obj/projectile/sneeze/on_hit(atom/target, blocked, pierce_hit)
. = ..()
if(isliving(target))
sneezie_callback?.Invoke(target) //you've been sneezered
#undef SNEEZE_CONE
@@ -1073,7 +1073,7 @@
affected_mob.update_transform(newsize/current_size)
current_size = newsize
if(SPT_PROB(23, seconds_per_tick))
affected_mob.sneeze()
affected_mob.emote("sneeze")
/datum/reagent/consumable/red_queen/on_mob_end_metabolize(mob/living/affected_mob)
. = ..()
@@ -615,7 +615,7 @@
if(2)
affected_mob.emote("cough")
if(3)
affected_mob.sneeze()
affected_mob.emote("sneeze")
if(4)
if(prob(75))
to_chat(affected_mob, span_danger("You scratch at an itch."))
-1
View File
@@ -4991,7 +4991,6 @@
#include "code\modules\mob\living\login.dm"
#include "code\modules\mob\living\logout.dm"
#include "code\modules\mob\living\navigation.dm"
#include "code\modules\mob\living\sneeze.dm"
#include "code\modules\mob\living\status_procs.dm"
#include "code\modules\mob\living\taste.dm"
#include "code\modules\mob\living\ventcrawling.dm"