[MIRROR] Virology Update #2 (#9884)

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-01-15 15:18:05 -07:00
committed by GitHub
parent 3d9a3ed2dc
commit 7e30dc5335
25 changed files with 455 additions and 82 deletions

View File

@@ -5,9 +5,10 @@
#define HIDDEN_PANDEMIC (1<<1) #define HIDDEN_PANDEMIC (1<<1)
//Disease Flags //Disease Flags
#define CURABLE (1<<0) #define CURABLE (1<<0)
#define CAN_CARRY (1<<1) #define CAN_CARRY (1<<1)
#define CAN_RESIST (1<<2) #define CAN_RESIST (1<<2)
#define CAN_NOT_POPULATE (1<<3)
//Spread Flags //Spread Flags
#define SPECIAL (1<<0) #define SPECIAL (1<<0)

View File

@@ -121,6 +121,20 @@ SUBSYSTEM_DEF(supply)
EC.contents[EC.contents.len]["quantity"] = cashmoney.worth EC.contents[EC.contents.len]["quantity"] = cashmoney.worth
EC.value += EC.contents[EC.contents.len]["value"] EC.value += EC.contents[EC.contents.len]["value"]
if(istype(A, /obj/item/reagent_containers/glass/bottle/vaccine))
var/obj/item/reagent_containers/glass/bottle/vaccine/sale_bottle = A
if(!istype(CR, /obj/structure/closet/crate/freezer))
EC.contents = list(
"error" = "Error: Product was improperly packaged. Send conents in freezer crate to preserve contents for transport."
)
else if(sale_bottle.reagents.reagent_list.len != 1 || sale_bottle.reagents.get_reagent_amount(REAGENT_ID_VACCINE) < sale_bottle.volume)
EC.contents = list(
"error" = "Error: Tainted product in batch. Was opened, contaminated, or was full. Payment rendered null under terms of agreement."
)
else
EC.contents[EC.contents.len]["value"] = 5
EC.value += EC.contents[EC.contents.len]["value"]
// CHOMPAdd Start - Sell salvage // CHOMPAdd Start - Sell salvage
if(istype(A, /obj/item/salvage)) if(istype(A, /obj/item/salvage))
var/obj/item/salvage/salvagedStuff = A var/obj/item/salvage/salvagedStuff = A

View File

@@ -36,6 +36,7 @@
/mob/proc/AddDisease(datum/disease/D, respect_carrier = FALSE) /mob/proc/AddDisease(datum/disease/D, respect_carrier = FALSE)
var/datum/disease/DD = new D.type(1, D, 0) var/datum/disease/DD = new D.type(1, D, 0)
DD.start_cure_timer()
viruses += DD viruses += DD
DD.affected_mob = src DD.affected_mob = src
active_diseases += DD active_diseases += DD
@@ -83,14 +84,7 @@
if(nutrition > 300 && prob(nutrition/50)) if(nutrition > 300 && prob(nutrition/50))
return return
var/list/zone_weights = list( var/target_zone = pick(head_ch;1,body_ch;2,hands_ch;3,feet_ch;4)
1 = head_ch,
2 = body_ch,
3 = hands_ch,
4 = feet_ch
)
var/target_zone = pick(zone_weights)
if(ishuman(src)) if(ishuman(src))
var/mob/living/carbon/human/H = src var/mob/living/carbon/human/H = src

View File

@@ -42,6 +42,7 @@ GLOBAL_LIST_INIT(diseases, subtypesof(/datum/disease))
var/allow_dead = FALSE var/allow_dead = FALSE
var/infect_synthetics = FALSE var/infect_synthetics = FALSE
var/processing = FALSE var/processing = FALSE
var/has_timer = FALSE
/datum/disease/Destroy() /datum/disease/Destroy()
affected_mob = null affected_mob = null
@@ -147,6 +148,23 @@ GLOBAL_LIST_INIT(diseases, subtypesof(/datum/disease))
remove_virus() remove_virus()
qdel(src) qdel(src)
/datum/disease/proc/start_cure_timer()
if(has_timer)
return
if(!(disease_flags & CURABLE))
return
has_timer = TRUE
addtimer(CALLBACK(src, PROC_REF(check_natural_immunity)), (1 HOUR) + rand( -20 MINUTES, 30 MINUTES), TIMER_DELETE_ME)
/datum/disease/proc/check_natural_immunity()
if(!(disease_flags & CURABLE))
return
if(prob(rand(10, 15)))
has_timer = FALSE
cure()
return
addtimer(CALLBACK(src, PROC_REF(check_natural_immunity)), rand(5 MINUTES, 10 MINUTES), TIMER_DELETE_ME)
/datum/disease/proc/IsSame(datum/disease/D) /datum/disease/proc/IsSame(datum/disease/D)
if(ispath(D)) if(ispath(D))
return istype(src, D) return istype(src, D)
@@ -173,8 +191,14 @@ GLOBAL_LIST_INIT(diseases, subtypesof(/datum/disease))
/datum/disease/proc/remove_virus() /datum/disease/proc/remove_virus()
affected_mob.viruses -= src affected_mob.viruses -= src
// Called when a disease is added onto a mob
/datum/disease/proc/Start() /datum/disease/proc/Start()
return return
// Called when a disease is removed from a mob
/datum/disease/proc/End() /datum/disease/proc/End()
return return
// Called when the mob dies
/datum/disease/proc/OnDeath()
return

View File

@@ -1,10 +1,19 @@
GLOBAL_LIST_EMPTY(archive_diseases) GLOBAL_LIST_EMPTY(archive_diseases)
GLOBAL_LIST_INIT(advance_cures, list( GLOBAL_LIST_INIT(advance_cures, list(
REAGENT_ID_SODIUMCHLORIDE, REAGENT_ID_SUGAR, REAGENT_ID_ORANGEJUICE, REAGENT_ID_SPACEACILLIN,
REAGENT_ID_SPACEACILLIN, REAGENT_ID_GLUCOSE, REAGENT_ID_ETHANOL, REAGENT_ID_ORANGEJUICE,
REAGENT_ID_LEPORAZINE, REAGENT_ID_IMPEDREZENE, REAGENT_ID_HEPANEPHRODAXON, REAGENT_ID_ETHANOL,
REAGENT_ID_SILVER, REAGENT_ID_GOLD REAGENT_ID_GLUCOSE,
REAGENT_ID_COPPER,
REAGENT_ID_LEAD,
REAGENT_ID_LITHIUM,
REAGENT_ID_RADIUM,
REAGENT_ID_MERCURY,
REAGENT_ID_BLISS,
REAGENT_ID_MUTAGEN,
REAGENT_ID_PHORON,
REAGENT_ID_SACID
)) ))
/datum/disease/advance /datum/disease/advance
@@ -13,6 +22,7 @@ GLOBAL_LIST_INIT(advance_cures, list(
form = "Advance Disease" form = "Advance Disease"
agent = "advance microbes" agent = "advance microbes"
max_stages = 5 max_stages = 5
disease_flags = CAN_NOT_POPULATE
spread_text = "Unknown" spread_text = "Unknown"
viable_mobtypes = list(/mob/living/carbon/human) viable_mobtypes = list(/mob/living/carbon/human)

View File

@@ -1,3 +1,49 @@
/datum/disease/advance/random
name = "Experimental Disease"
var/randomname = TRUE
var/datum/symptom/setsymptom = null
var/max_symptoms_override
/datum/disease/advance/random/minor
name = "Minor Experimental Disease"
max_symptoms_override = 4
/datum/disease/advance/random/New(max_symptoms, max_level = 6, min_level = 1, list/guaranteed_symptoms = setsymptom)
if(!max_symptoms)
max_symptoms = (2 + rand(1, (VIRUS_SYMPTOM_LIMIT - 2)))
if(max_symptoms_override)
max_symptoms = (max_symptoms_override - rand(0, 2))
if(guaranteed_symptoms)
if(islist(guaranteed_symptoms))
max_symptoms -= length(guaranteed_symptoms)
else
guaranteed_symptoms = list(guaranteed_symptoms)
max_symptoms -= 1
var/list/datum/symptom/possible_symptoms = list()
for(var/datum/symptom/symptom as anything in subtypesof(/datum/symptom))
if(symptom in guaranteed_symptoms)
continue
if(initial(symptom.level) > max_level || initial(symptom.level) < min_level)
continue
if(initial(symptom.level) <= -1)
continue
possible_symptoms += symptom
for(var/i in 1 to max_symptoms)
var/datum/symptom/chosen_symptom = pick_n_take(possible_symptoms)
if(chosen_symptom)
symptoms += new chosen_symptom
for(var/guaranteed_symptom in guaranteed_symptoms)
symptoms += new guaranteed_symptom
/datum/disease/advance/random/macrophage
name = "Unknown Disease"
setsymptom = /datum/symptom/macrophage
/datum/disease/advance/random/blob
name = "Blob Spores"
setsymptom = /datum/symptom/blobspores
// Cold // Cold
/datum/disease/advance/cold/New(process = 1, datum/disease/advance/D, copy = 0) /datum/disease/advance/cold/New(process = 1, datum/disease/advance/D, copy = 0)
@@ -14,3 +60,19 @@
name = "Flu" name = "Flu"
symptoms = list(new /datum/symptom/cough) symptoms = list(new /datum/symptom/cough)
..(process, D, copy) ..(process, D, copy)
// Macrophages
/datum/disease/advance/macrophage/New(process = 1, datum/disease/advance/D, copy = 0)
if(!D)
name = "Macrophages"
symptoms = list(new /datum/symptom/macrophage)
..(process, D, copy)
// Blob Spores
/datum/disease/advance/blobspores/New(process = 1, datum/disease/advance/D, copy = 0)
if(!D)
name = "Blob Spores"
symptoms = list(new /datum/symptom/blobspores)
..(process, D, copy)

View File

@@ -0,0 +1,93 @@
/*
//////////////////////////////////////
Blob Spores
Slightly hidden
Major Increases to resistance.
Reduces stage speed.
Slight boost to transmission
Admin Level.
BONUS
The host coughs up blob spores
//////////////////////////////////////
*/
/datum/symptom/blobspores
name = "Blob Spores"
stealth = 1
resistance = 5
stage_speed = -2
transmittable = 1
level = -1
severity = 3
var/ready_to_pop
var/factory_blob
var/strong_blob
var/node_blob
/datum/symptom/blobspores/Start(datum/disease/advance/A)
if(!..())
return
if(A.totalResistance() >= 8)
factory_blob = TRUE
if(A.totalResistance() >= 5)
strong_blob = TRUE
if(A.totalResistance() >= 10)
node_blob = TRUE
/datum/symptom/blobspores/Activate(datum/disease/advance/A)
if(!..())
return
var/mob/living/M = A.affected_mob
switch(A.stage)
if(1)
if(prob(2))
to_chat(M, span_notice("You feel bloated."))
if(prob(3) && !M.jitteriness)
to_chat(M, span_notice("You feel a bit jittery."))
M.jitteriness = 10
if(2)
if(prob(1) && ishuman(M))
var/mob/living/carbon/human/H = M
H.vomit(TRUE, FALSE)
if(3, 4)
if(prob(10))
to_chat(M, span_notice("You feel blobby?"))
if(5)
ready_to_pop = TRUE
if(prob(5))
M.audible_emote("coughs up a small amount of blood!")
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/bleeding_rng = rand(1, 2)
H.drip(bleeding_rng)
/datum/symptom/blobspores/OnDeath(datum/disease/advance/A)
var/mob/living/M = A.affected_mob
M.visible_message(span_danger("[M] starts swelling grotesquely!"))
addtimer(CALLBACK(src, PROC_REF(pop), A, M), 10 SECONDS)
/datum/symptom/blobspores/proc/pop(datum/disease/advance/A, mob/living/M)
if(!A || !M)
return
var/list/blob_options = list(/obj/structure/blob/normal)
if(factory_blob)
blob_options += /obj/structure/blob/factory
if(strong_blob)
blob_options += /obj/structure/blob/shield
if(node_blob)
blob_options += /obj/structure/blob/node
var/pick_blob = pick(blob_options)
if(ready_to_pop)
for(var/i in 1 to rand(1, 6))
new /mob/living/simple_mob/blob/spore(M.loc)
new pick_blob(M.loc)
M.visible_message(span_danger("A huge mass of blob and blob spores burst out of [M]!"))

View File

@@ -27,10 +27,10 @@ Bonus
/datum/symptom/shivering/Activate(datum/disease/advance/A) /datum/symptom/shivering/Activate(datum/disease/advance/A)
..() ..()
if(prob(SYMPTOM_ACTIVATION_PROB)) if(prob(SYMPTOM_ACTIVATION_PROB))
var/mob/living/carbon/M = A.affected_mob var/mob/living/L = A.affected_mob
to_chat(M, span_warning(pick("You feel cold.", "You start shivering."))) to_chat(L, span_warning(pick("You feel cold.", "You start shivering.")))
if(M.bodytemperature > BODYTEMP_COLD_DAMAGE_LIMIT) if(L.bodytemperature > BODYTEMP_COLD_DAMAGE_LIMIT)
Chill(M, A) Chill(L, A)
return return
/datum/symptom/shivering/proc/Chill(mob/living/M, datum/disease/advance/A) /datum/symptom/shivering/proc/Chill(mob/living/M, datum/disease/advance/A)

View File

@@ -87,34 +87,33 @@ Bonus
return return
/datum/symptom/sneeze/bluespace/proc/SneezeTeleport(datum/disease/advance/A, var/mob/living/M) /datum/symptom/sneeze/bluespace/proc/SneezeTeleport(datum/disease/advance/A, var/mob/living/mob)
var/list/destination = list() var/list/destination = list()
var/mob/living/carbon/human/H = M
var/place var/place
for(var/mob/living/carbon/human/B in range(A.stage, M)) for(var/mob/living/carbon/human/B in range(A.stage, mob))
if(B.can_be_drop_pred && H.can_be_drop_prey && H.devourable) if(B.can_be_drop_pred && mob.can_be_drop_prey && mob.devourable)
destination += B.vore_selected destination += B.vore_selected
for(var/turf/T in range(A.stage, H)) for(var/turf/T in range(A.stage, mob))
if(istype(T, /turf/space)) // No danger, this is just a fun/vore symptom if(istype(T, /turf/space)) // No danger, this is just a fun/vore symptom
continue continue
destination += T destination += T
if(isemptylist(destination)) if(isemptylist(destination))
to_chat(H, span_warning("You go to sneeze, but can't.")) to_chat(mob, span_warning("You go to sneeze, but can't."))
return FALSE return FALSE
place = safepick(destination) place = safepick(destination)
var/mob/living/carbon/human/unlucky = locate() in place var/mob/living/unlucky = locate() in place
if(unlucky && !unlucky.is_incorporeal()) // CHOMPEdit if(unlucky && !unlucky.is_incorporeal()) // CHOMPEdit
if(unlucky.can_be_drop_pred && H.can_be_drop_prey && H.devourable) if(unlucky.can_be_drop_pred && mob.can_be_drop_prey && mob.devourable)
place = unlucky.vore_selected place = unlucky.vore_selected
else if(unlucky.devourable && unlucky.can_be_drop_prey && H.can_be_drop_pred) else if(unlucky.devourable && unlucky.can_be_drop_prey && mob.can_be_drop_pred)
unlucky.forceMove(H.vore_selected) unlucky.forceMove(mob.vore_selected)
H.emote("sneeze") mob.emote("sneeze")
do_teleport(H, place) do_teleport(mob, place)
return TRUE return TRUE

View File

@@ -36,7 +36,7 @@ Bonus
if(3, 4) if(3, 4)
L.jitteriness += 10 L.jitteriness += 10
else else
if(L.reagents.get_reagent_amount(REAGENT_ID_HYPERZINE < 10)) if(L.reagents.get_reagent_amount(REAGENT_ID_HYPERZINE) < 10)
L.reagents.add_reagent(REAGENT_ID_HYPERZINE, 5) L.reagents.add_reagent(REAGENT_ID_HYPERZINE, 5)
if(prob(30)) if(prob(30))
L.jitteriness += 15 L.jitteriness += 15

View File

@@ -32,5 +32,10 @@ GLOBAL_LIST_INIT(list_symptoms, subtypesof(/datum/symptom))
/datum/symptom/proc/End(datum/disease/advance/A) /datum/symptom/proc/End(datum/disease/advance/A)
return return
// Called when the disease activates. It's what makes your diseases work!
/datum/symptom/proc/Activate(datum/disease/advance/A) /datum/symptom/proc/Activate(datum/disease/advance/A)
return return
// Called when the host dies
/datum/symptom/proc/OnDeath(datum/disease/advance/A)
return

View File

@@ -25,13 +25,15 @@ Bonus
severity = 0 severity = 0
/datum/symptom/telepathy/Start(datum/disease/advance/A) /datum/symptom/telepathy/Start(datum/disease/advance/A)
var/mob/living/carbon/human/H = A.affected_mob if(iscarbon(A))
H.dna.SetSEState(REMOTETALKBLOCK, 1) var/mob/living/carbon/human/H = A.affected_mob
domutcheck(H, null, TRUE) H.dna.SetSEState(REMOTETALKBLOCK, 1)
to_chat(H, span_notice("Your mind expands...")) domutcheck(H, null, TRUE)
to_chat(H, span_notice("Your mind expands..."))
/datum/symptom/telepathy/End(datum/disease/advance/A) /datum/symptom/telepathy/End(datum/disease/advance/A)
var/mob/living/carbon/human/H = A.affected_mob if(iscarbon(A))
H.dna.SetSEState(REMOTETALKBLOCK, 0) var/mob/living/carbon/human/H = A.affected_mob
domutcheck(H, null, TRUE) H.dna.SetSEState(REMOTETALKBLOCK, 0)
to_chat(H, span_notice("Everything feels... Normal.")) domutcheck(H, null, TRUE)
to_chat(H, span_notice("Everything feels... Normal."))

View File

@@ -27,24 +27,25 @@ Bonus
/datum/symptom/visionloss/Activate(datum/disease/advance/A) /datum/symptom/visionloss/Activate(datum/disease/advance/A)
..() ..()
if(prob(SYMPTOM_ACTIVATION_PROB)) if(prob(SYMPTOM_ACTIVATION_PROB))
var/mob/living/carbon/M = A.affected_mob if(iscarbon(A))
var/obj/item/organ/internal/eyes/eyes = M.internal_organs_by_name[O_EYES] var/mob/living/carbon/M = A.affected_mob
if(!eyes) var/obj/item/organ/internal/eyes/eyes = M.internal_organs_by_name[O_EYES]
return if(!eyes)
switch(A.stage) return
if(1, 2) switch(A.stage)
to_chat(M, span_warning("Your eyes itch.")) if(1, 2)
if(3, 4) to_chat(M, span_warning("Your eyes itch."))
to_chat(M, span_boldwarning("Your eyes burn!")) if(3, 4)
M.eye_blurry = 20 to_chat(M, span_boldwarning("Your eyes burn!"))
eyes.take_damage(1) M.eye_blurry = 20
else eyes.take_damage(1)
to_chat(M, span_userdanger("Your eyes burn horrificly!")) else
M.eye_blurry = 40 to_chat(M, span_userdanger("Your eyes burn horrificly!"))
eyes.take_damage(5) M.eye_blurry = 40
if(eyes.damage >= 10) eyes.take_damage(5)
M.disabilities |= NEARSIGHTED if(eyes.damage >= 10)
if(prob(eyes.damage - 10 + 1)) M.disabilities |= NEARSIGHTED
if(!M.eye_blind) if(prob(eyes.damage - 10 + 1))
to_chat(M, span_userdanger("You go blind!")) if(!M.eye_blind)
M.Blind(20) to_chat(M, span_userdanger("You go blind!"))
M.Blind(20)

View File

@@ -9,7 +9,7 @@
viable_mobtypes = list(/mob/living/carbon/human) viable_mobtypes = list(/mob/living/carbon/human)
desc = "If left untreated the subject will become very weak, and may vomit often." desc = "If left untreated the subject will become very weak, and may vomit often."
severity = MINOR severity = MINOR
disease_flags = CAN_CARRY|CAN_RESIST disease_flags = CAN_CARRY|CAN_RESIST|CAN_NOT_POPULATE
visibility_flags = HIDDEN_PANDEMIC visibility_flags = HIDDEN_PANDEMIC
required_organs = list(/obj/item/organ/internal/appendix) required_organs = list(/obj/item/organ/internal/appendix)
bypasses_immunity = TRUE bypasses_immunity = TRUE

View File

@@ -23,7 +23,7 @@
else if(prob(5)) else if(prob(5))
affected_mob.emote("gasp") affected_mob.emote("gasp")
if(prob(10)) if(prob(10))
to_chat(span_danger("You're starting to feel very weak...")) to_chat(affected_mob, span_danger("You're starting to feel very weak..."))
if(4) if(4)
if(prob(10)) if(prob(10))
affected_mob.emote("cough") affected_mob.emote("cough")

View File

@@ -11,7 +11,7 @@
viable_mobtypes = list(/mob/living/carbon/human) viable_mobtypes = list(/mob/living/carbon/human)
desc = "Nausea, sickness, and vomitting." desc = "Nausea, sickness, and vomitting."
severity = MINOR severity = MINOR
disease_flags = CURABLE disease_flags = CURABLE|CAN_NOT_POPULATE
virus_heal_resistant = TRUE virus_heal_resistant = TRUE
/datum/disease/food_poisoning/stage_act() /datum/disease/food_poisoning/stage_act()

View File

@@ -9,6 +9,7 @@
agent = "Gravitokinetic Bipotential SADS+" agent = "Gravitokinetic Bipotential SADS+"
viable_mobtypes = list(/mob/living/carbon/human) viable_mobtypes = list(/mob/living/carbon/human)
severity = BIOHAZARD severity = BIOHAZARD
disease_flags = CAN_NOT_POPULATE
/datum/disease/gbs/stage_act() /datum/disease/gbs/stage_act()
if(!..()) if(!..())

View File

@@ -421,6 +421,26 @@
containername = "Virology biohazard equipment" containername = "Virology biohazard equipment"
access = access_medical_equip access = access_medical_equip
/datum/supply_pack/med/disease
name = "Experimental Disease crate"
desc = "An experimental disease. Contains a multitude of symptoms."
contains = list(
/obj/item/reagent_containers/glass/bottle/culture/random_virus = 1
)
cost = 60
containertype = /obj/structure/closet/crate/freezer
access = access_medical_equip
/datum/supply_pack/med/disease_minor
name = "Minor Experimental Disease crate"
desc = "An experimental disease. Contains a weakened, untested viral culture."
contains = list(
/obj/item/reagent_containers/glass/bottle/culture/random_virus/minor = 1
)
cost = 40
containertype = /obj/structure/closet/crate/freezer
access = access_medical_equip
/datum/supply_pack/med/compactdefib /datum/supply_pack/med/compactdefib
name = "Compact Defibrillator crate" name = "Compact Defibrillator crate"
desc = "A compact defibrillator. Requires Medical Equipment access." desc = "A compact defibrillator. Requires Medical Equipment access."

View File

@@ -12,6 +12,12 @@
var/selected_strain_index = 1 var/selected_strain_index = 1
var/obj/item/reagent_containers/beaker = null var/obj/item/reagent_containers/beaker = null
// PanDEMIC Bottle
/obj/item/reagent_containers/glass/bottle/vaccine
icon_state = "bottle10"
possible_transfer_amounts = (list(5, 10, 15))
volume = 15
/obj/machinery/computer/pandemic/Initialize(mapload) /obj/machinery/computer/pandemic/Initialize(mapload)
. = ..() . = ..()
update_icon() update_icon()
@@ -67,13 +73,20 @@
return return
icon_state = "pandemic[(beaker)?"1":"0"][!(stat & NOPOWER) ? "" : "_nopower"]" icon_state = "pandemic[(beaker)?"1":"0"][!(stat & NOPOWER) ? "" : "_nopower"]"
/obj/machinery/computer/pandemic/proc/create_culture(name, bottle_type = "culture", cooldown = 50) /obj/machinery/computer/pandemic/proc/create_culture(name, bottle_type = "culture", cooldown = 50, vaccine = FALSE)
var/obj/item/reagent_containers/glass/bottle/B = new/obj/item/reagent_containers/glass/bottle(loc)
B.icon_state = "bottle10" var/obj/item/reagent_containers/glass/bottle/B
if(vaccine)
B = new /obj/item/reagent_containers/glass/bottle/vaccine(loc)
B.name = "[name] vaccine"
else
B = new(loc)
B.icon_state = "bottle10"
B.name = "[name] [bottle_type] bottle"
B.pixel_x = rand(-3, 3) B.pixel_x = rand(-3, 3)
B.pixel_y = rand(-3, 3) B.pixel_y = rand(-3, 3)
replicator_cooldown(cooldown) replicator_cooldown(cooldown)
B.name = "[name] [bottle_type] bottle"
return B return B
/obj/machinery/computer/pandemic/tgui_act(action, params, datum/tgui/ui, datum/tgui_state/state) /obj/machinery/computer/pandemic/tgui_act(action, params, datum/tgui/ui, datum/tgui_state/state)
@@ -146,8 +159,13 @@
atom_say("Unable to synthesize requested antibody.") atom_say("Unable to synthesize requested antibody.")
return return
var/obj/item/reagent_containers/glass/bottle/B = create_culture(vaccine_name, REAGENT_ID_VACCINE, 200) var/obj/item/reagent_containers/glass/bottle/vaccine/B = create_culture(vaccine_name, REAGENT_ID_VACCINE, 200, TRUE)
B.reagents.add_reagent(REAGENT_ID_VACCINE, 15, list(vaccine_type)) B.reagents.add_reagent(REAGENT_ID_VACCINE, 15, list(vaccine_type))
if(beaker && beaker.reagents && length(beaker.reagents.reagent_list))
beaker.reagents.remove_reagent(REAGENT_ID_BLOOD, 5)
if(!length(beaker.reagents.reagent_list))
update_tgui_static_data(ui.user)
if("eject_beaker") if("eject_beaker")
eject_beaker() eject_beaker()
update_tgui_static_data(ui.user) update_tgui_static_data(ui.user)
@@ -361,17 +379,17 @@
if(I.has_tool_quality(TOOL_SCREWDRIVER)) if(I.has_tool_quality(TOOL_SCREWDRIVER))
eject_beaker() eject_beaker()
return return
if(istype(I, /obj/item/reagent_containers/glass) && I.is_open_container()) if(istype(I, /obj/item/reagent_containers/glass) && I.is_open_container() || istype(I, /obj/item/reagent_containers/syringe))
if(stat & (NOPOWER|BROKEN)) if(stat & (NOPOWER|BROKEN))
return return
if(beaker) if(beaker)
to_chat(user, span_warning("A beaker is already loaded into the machine!")) to_chat(user, span_warning("A [beaker] is already loaded into the machine!"))
return return
user.drop_item() user.drop_item()
beaker = I beaker = I
beaker.loc = src beaker.loc = src
to_chat(user, span_notice("You add the beaker to the machine.")) to_chat(user, span_notice("You add \the [I] to the machine."))
update_tgui_static_data(user) update_tgui_static_data(user)
icon_state = "pandemic1" icon_state = "pandemic1"
else else

View File

@@ -1,11 +1,6 @@
GLOBAL_LIST_EMPTY(current_pending_diseases) GLOBAL_LIST_EMPTY(current_pending_diseases)
/datum/event/disease_outbreak /datum/event/disease_outbreak
var/datum/disease/chosen_disease var/datum/disease/chosen_disease
var/list/disease_blacklist = list(
/datum/disease/advance,
/datum/disease/food_poisoning,
/datum/disease/gbs // Terrible. It's only in the code to scare people.
)
var/static/list/transmissable_symptoms = list() var/static/list/transmissable_symptoms = list()
var/static/list/diseases_minor = list() var/static/list/diseases_minor = list()
var/static/list/diseases_moderate_major = list() var/static/list/diseases_moderate_major = list()
@@ -85,7 +80,7 @@ GLOBAL_LIST_EMPTY(current_pending_diseases)
/datum/event/disease_outbreak/proc/populate_diseases() /datum/event/disease_outbreak/proc/populate_diseases()
for(var/candidate in subtypesof(/datum/disease)) for(var/candidate in subtypesof(/datum/disease))
var/datum/disease/CD = new candidate var/datum/disease/CD = new candidate
if(is_type_in_list(CD, disease_blacklist)) if(CD.disease_flags & CAN_NOT_POPULATE)
continue continue
switch(CD.severity) switch(CD.severity)
if(NONTHREAT, MINOR) if(NONTHREAT, MINOR)

View File

@@ -100,6 +100,16 @@
drop_r_hand() drop_r_hand()
drop_l_hand() drop_l_hand()
if(viruses)
for(var/datum/disease/D in viruses)
if(istype(D, /datum/disease/advance))
var/datum/disease/advance/AD = D
for(var/symptom in AD.symptoms)
var/datum/symptom/S = symptom
S.OnDeath(AD)
else
D.OnDeath()
if(healths) if(healths)
healths.overlays = null // This is specific to humans but the relevant code is here; shouldn't mess with other mobs. healths.overlays = null // This is specific to humans but the relevant code is here; shouldn't mess with other mobs.
healths.icon_state = "health6" healths.icon_state = "health6"

View File

@@ -5,8 +5,25 @@
icon_state = "macrophage-1" icon_state = "macrophage-1"
faction = FACTION_MACROBACTERIA faction = FACTION_MACROBACTERIA
maxHealth = 60 maxHealth = 20
health = 60 health = 20
minbodytemp = T0C-30
heat_damage_per_tick = 40
cold_damage_per_tick = 40
min_oxy = 0
max_oxy = 0
min_tox = 0
max_tox = 0
min_co2 = 0
max_co2 = 0
min_n2 = 0
max_n2 = 0
unsuitable_atoms_damage = 0
shock_resist = 0.5
taser_kill = FALSE
water_resist = 1
var/datum/disease/base_disease = null var/datum/disease/base_disease = null
var/list/infections = list() var/list/infections = list()
@@ -30,13 +47,37 @@
can_be_drop_prey = FALSE can_be_drop_prey = FALSE
allow_mind_transfer = TRUE allow_mind_transfer = TRUE
ai_holder_type = /datum/ai_holder/simple_mob/melee pass_flags = PASSTABLE | PASSMOB
mob_size = MOB_TINY
ai_holder_type = /datum/ai_holder/simple_mob/melee/macrophage
/mob/living/simple_mob/vore/aggressive/macrophage/giant
name = "Giant Germ"
desc = "An incredibly huge virus!"
size_multiplier = 1.5
maxHealth = 40
health = 40
pass_flags = PASSTABLE | PASSGRILLE
/mob/living/simple_mob/vore/aggressive/macrophage/Initialize()
. = ..()
var/datum/disease/advance/random/macrophage/D = new
health += D.totalResistance()
maxHealth += D.totalResistance()
melee_damage_lower += max(0, D.totalResistance())
melee_damage_upper += max(0, D.totalResistance())
infections += D
base_disease = D
/mob/living/simple_mob/vore/aggressive/macrophage/proc/deathcheck() /mob/living/simple_mob/vore/aggressive/macrophage/proc/deathcheck()
if(locate(/mob/living/carbon/human) in vore_selected) if(locate(/mob/living/carbon/human) in vore_selected)
addtimer(CALLBACK(src, TYPE_PROC_REF(/mob/living/simple_mob/vore/aggressive/macrophage, deathcheck)), 3000) addtimer(CALLBACK(src, TYPE_PROC_REF(/mob/living/simple_mob/vore/aggressive/macrophage, deathcheck)), 3000)
else else
dust() death()
/mob/living/simple_mob/vore/aggressive/macrophage/green /mob/living/simple_mob/vore/aggressive/macrophage/green
icon_state = "macrophage-2" icon_state = "macrophage-2"
@@ -47,6 +88,27 @@
/mob/living/simple_mob/vore/aggressive/macrophage/blue /mob/living/simple_mob/vore/aggressive/macrophage/blue
icon_state = "macrophage-4" icon_state = "macrophage-4"
/mob/living/simple_mob/vore/aggressive/macrophage/do_attack(atom/A, turf/T)
. = ..()
if(iscarbon(A))
var/mob/living/carbon/human/victim = A
if((victim.HasDisease(base_disease) || !victim.CanContractDisease(base_disease)) && prob(75))
ai_holder.lose_target()
victim.ContractDisease(base_disease)
/mob/living/simple_mob/vore/aggressive/macrophage/death()
..()
visible_message(span_warning("\The [src] shrivels up and dies, unable to survive!"))
if(isbelly(loc))
var/obj/belly/belly = loc
if(belly)
var/mob/living/pred = belly.owner
pred.ForceContractDisease(base_disease)
else
var/obj/effect/decal/cleanable/mucus/sick = new(loc)
sick.viruses += base_disease
qdel(src)
/obj/belly/macrophage /obj/belly/macrophage
name = "capsid" name = "capsid"
fancy_vore = TRUE fancy_vore = TRUE
@@ -67,3 +129,17 @@
var/obj/belly/B = new /obj/belly/macrophage(src) var/obj/belly/B = new /obj/belly/macrophage(src)
vore_selected = B vore_selected = B
/datum/ai_holder/simple_mob/melee/macrophage
var/datum/disease/virus = null
/datum/ai_holder/simple_mob/melee/macrophage/list_targets()
var/list/our_targets = ..()
var/mob/living/simple_mob/vore/aggressive/macrophage/macrophage = holder
for(var/list_target in our_targets)
var/mob/living/victim = list_target
if(victim.viruses)
if(victim.HasDisease(macrophage.base_disease) && prob(75)) // Less likely to be a target if you're infected
our_targets -= list_target
continue
return our_targets

View File

@@ -24,3 +24,43 @@
diseases += new /datum/disease/advance/flu diseases += new /datum/disease/advance/flu
data["viruses"] = diseases data["viruses"] = diseases
reagents.add_reagent(REAGENT_ID_BLOOD, 10, data) reagents.add_reagent(REAGENT_ID_BLOOD, 10, data)
/obj/item/reagent_containers/glass/bottle/culture/blobspores
name = "blob spores culture"
desc = "A bottle with blob spores"
/obj/item/reagent_containers/glass/bottle/culture/blobspores/Initialize()
. = ..()
diseases += new /datum/disease/advance/blobspores
data["viruses"] = diseases
reagents.add_reagent(REAGENT_ID_BLOOD, 10, data)
/obj/item/reagent_containers/glass/bottle/culture/macrophages
name = "macrophages culture"
desc = "A bottle with giant viruses"
/obj/item/reagent_containers/glass/bottle/culture/macrophages/Initialize()
. = ..()
diseases += new /datum/disease/advance/macrophage
data["viruses"] = diseases
reagents.add_reagent(REAGENT_ID_BLOOD, 10, data)
/obj/item/reagent_containers/glass/bottle/culture/random_virus
name = "experimental disease culture bottle"
desc = "A small bottle. Contains an untested viral culture."
/obj/item/reagent_containers/glass/bottle/culture/random_virus/Initialize()
. = ..()
diseases += new /datum/disease/advance/random
data["viruses"] = diseases
reagents.add_reagent(REAGENT_ID_BLOOD, 10, data)
/obj/item/reagent_containers/glass/bottle/culture/random_virus/minor
name = "minor experimental disease culture bottle"
desc = "A small bottle. Contains a weak version of an untested viral culture."
/obj/item/reagent_containers/glass/bottle/culture/random_virus/minor/Initialize()
. = ..()
diseases += new /datum/disease/advance/random/minor
data["viruses"] = diseases
reagents.add_reagent(REAGENT_ID_BLOOD, 10, data)

View File

@@ -445,6 +445,10 @@
var/mob/living/carbon/C = M var/mob/living/carbon/C = M
C.clean_blood(TRUE) C.clean_blood(TRUE)
if(istype(M, /mob/living/simple_mob/vore/aggressive/macrophage)) // Big ouch for viruses
var/mob/living/simple_mob/macrophage = M
macrophage.adjustToxLoss(20)
/datum/reagent/space_cleaner/touch_obj(var/obj/O) /datum/reagent/space_cleaner/touch_obj(var/obj/O)
..() ..()
O.clean_blood() O.clean_blood()
@@ -463,6 +467,9 @@
for(var/mob/living/simple_mob/slime/M in T) for(var/mob/living/simple_mob/slime/M in T)
M.adjustToxLoss(rand(5, 10)) M.adjustToxLoss(rand(5, 10))
for(var/mob/living/simple_mob/vore/aggressive/macrophage/virus in T)
virus.adjustToxLoss(rand(5, 10))
T.apply_fire_protection() // CHOMPAdd - Apply fire protection T.apply_fire_protection() // CHOMPAdd - Apply fire protection
/datum/reagent/space_cleaner/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) /datum/reagent/space_cleaner/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)

View File

@@ -530,6 +530,7 @@
#include "code\datums\diseases\magnitis.dm" #include "code\datums\diseases\magnitis.dm"
#include "code\datums\diseases\advance\advance.dm" #include "code\datums\diseases\advance\advance.dm"
#include "code\datums\diseases\advance\disease_preset.dm" #include "code\datums\diseases\advance\disease_preset.dm"
#include "code\datums\diseases\advance\symptoms\blobspores.dm"
#include "code\datums\diseases\advance\symptoms\choking.dm" #include "code\datums\diseases\advance\symptoms\choking.dm"
#include "code\datums\diseases\advance\symptoms\confusion.dm" #include "code\datums\diseases\advance\symptoms\confusion.dm"
#include "code\datums\diseases\advance\symptoms\cough.dm" #include "code\datums\diseases\advance\symptoms\cough.dm"