mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
Add disease resistance effects for spaceacillin (#67448)
About The Pull Request
Spaceacillin is currently an under utilized medical chem. Its only effect is to stop a person who is already infected from spreading an airborne disease.
My changes add the following when someone has taken spaceacillin:
Infected mobs slow down disease progression by 50%
Uninfected mobs have a 75% chance to block being infected
Uninfected mobs have a 75% chance to block zombie infection when attacked
Impregnated mobs that have an alien larva slow down larva growth by 50%
Why It's Good For The Game
Gives spaceacillin more utility since it was such a niche thing.
Changelog
cl
add: Add disease resistance to spaceacillin. It now gives 50% disease progression slowdown, 75% to block disease infection, 75% to block zombie infection when attacked, and 50% alien larva growth slowdown.
/cl
This commit is contained in:
@@ -64,6 +64,9 @@
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/infecting_human = src
|
||||
|
||||
if(infecting_human.reagents.has_reagent(/datum/reagent/medicine/spaceacillin) && prob(75))
|
||||
return
|
||||
|
||||
switch(target_zone)
|
||||
if(BODY_ZONE_HEAD)
|
||||
if(isobj(infecting_human.head))
|
||||
@@ -92,6 +95,11 @@
|
||||
disease.try_infect(src)
|
||||
|
||||
/mob/living/proc/AirborneContractDisease(datum/disease/disease, force_spread)
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/infecting_human = src
|
||||
if(infecting_human.reagents.has_reagent(/datum/reagent/medicine/spaceacillin) && prob(75))
|
||||
return
|
||||
|
||||
if(((disease.spread_flags & DISEASE_SPREAD_AIRBORNE) || force_spread) && prob((50*disease.spreading_modifier) - 1))
|
||||
ForceContractDisease(disease)
|
||||
|
||||
|
||||
@@ -64,6 +64,8 @@
|
||||
|
||||
///Proc to process the disease and decide on whether to advance, cure or make the sympthoms appear. Returns a boolean on whether to continue acting on the symptoms or not.
|
||||
/datum/disease/proc/stage_act(delta_time, times_fired)
|
||||
var/slowdown = affected_mob.reagents.has_reagent(/datum/reagent/medicine/spaceacillin) ? 0.5 : 1 // spaceacillin slows stage speed by 50%
|
||||
|
||||
if(has_cure())
|
||||
if(DT_PROB(cure_chance, delta_time))
|
||||
update_stage(max(stage - 1, 1))
|
||||
@@ -71,8 +73,7 @@
|
||||
if(disease_flags & CURABLE && DT_PROB(cure_chance, delta_time))
|
||||
cure()
|
||||
return FALSE
|
||||
|
||||
else if(DT_PROB(stage_prob, delta_time))
|
||||
else if(DT_PROB(stage_prob*slowdown, delta_time))
|
||||
update_stage(min(stage + 1, max_stages))
|
||||
|
||||
return !carrier
|
||||
|
||||
@@ -60,7 +60,11 @@
|
||||
return
|
||||
if(++stage < 6)
|
||||
INVOKE_ASYNC(src, .proc/RefreshInfectionImage)
|
||||
addtimer(CALLBACK(src, .proc/advance_embryo_stage), growth_time)
|
||||
var/slowdown = 1
|
||||
if(ishuman(owner))
|
||||
var/mob/living/carbon/human/baby_momma = owner
|
||||
slowdown = baby_momma.reagents.has_reagent(/datum/reagent/medicine/spaceacillin) ? 2 : 1 // spaceacillin doubles the time it takes to grow
|
||||
addtimer(CALLBACK(src, .proc/advance_embryo_stage), growth_time*slowdown)
|
||||
|
||||
/obj/item/organ/internal/body_egg/alien_embryo/egg_process()
|
||||
if(stage == 6 && prob(50))
|
||||
|
||||
@@ -271,7 +271,7 @@
|
||||
|
||||
/datum/reagent/medicine/spaceacillin
|
||||
name = "Spaceacillin"
|
||||
description = "Spaceacillin will prevent a patient from conventionally spreading any diseases they are currently infected with. Also reduces infection in serious burns."
|
||||
description = "Spaceacillin will provide limited resistance against disease and parasites. Also reduces infection in serious burns."
|
||||
color = "#E1F2E6"
|
||||
metabolization_rate = 0.1 * REAGENTS_METABOLISM
|
||||
ph = 8.1
|
||||
|
||||
@@ -48,6 +48,10 @@
|
||||
// zombies)
|
||||
return
|
||||
|
||||
// spaceacillin has a 75% chance to block infection
|
||||
if(istype(target) && target.reagents.has_reagent(/datum/reagent/medicine/spaceacillin) && prob(75))
|
||||
return
|
||||
|
||||
var/obj/item/organ/internal/zombie_infection/infection
|
||||
infection = target.getorganslot(ORGAN_SLOT_ZOMBIE)
|
||||
if(!infection)
|
||||
|
||||
Reference in New Issue
Block a user