Skip to content

Commit

Permalink
Mouse disease fixes, and cooking purges disease (#3152)
Browse files Browse the repository at this point in the history
* a lot more than mouse changes

* Update code/datums/components/crafting/crafting.dm

Co-authored-by: Lucy <[email protected]>

* Update monkestation/code/modules/virology/machines/curer.dm

Co-authored-by: Lucy <[email protected]>

* Update code/datums/components/crafting/crafting.dm

Co-authored-by: Lucy <[email protected]>

---------

Co-authored-by: Lucy <[email protected]>
  • Loading branch information
PotatoTomahto and Absolucy authored Sep 20, 2024
1 parent e5a786a commit 2c230a8
Show file tree
Hide file tree
Showing 16 changed files with 52 additions and 37 deletions.
12 changes: 11 additions & 1 deletion code/datums/components/crafting/crafting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,14 @@
for(var/M in R.parts)
partlist[M] = R.parts[M]
for(var/part in R.parts)
if(istype(part, /datum/reagent))
//MONKESTATION EDIT START
if(ispath(part, /datum/reagent))
var/datum/reagent/RG = locate(part) in Deletion
if(RG.volume > partlist[part])
RG.volume = partlist[part]
if(RG.data?["viruses"]) //Purge diseases from food
RG.data["viruses"] = list()
//MONKESTATION EDIT END
. += RG
Deletion -= RG
continue
Expand All @@ -339,6 +343,12 @@
else
while(partlist[part] > 0)
var/atom/movable/AM = locate(part) in Deletion
//MONKESTATION EDIT START
var/datum/reagents/reagents = AM.reagents
for(var/datum/reagent/reagent as anything in reagents?.reagent_list) //Purge diseases from food
if(reagent.data?["viruses"])
reagent.data["viruses"] = list()
//MONKESTATION EDIT END
. += AM
Deletion -= AM
partlist[part] -= 1
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/medical_kiosk.dm
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
var/datum/disease/D = thing
if(!(D.visibility_flags & HIDDEN_SCANNER))
sickness = "Warning: Patient is harboring some form of viral disease. Seek further medical attention."
sickness_data = "\nName: [D.name].\nType: [D.spread_text].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]"
sickness_data = "\nName: [D.name].\nType: [D.get_spread_string()].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]"

if(patient.has_dna()) //Blood levels Information
if(patient.is_bleeding())
Expand Down
14 changes: 7 additions & 7 deletions code/game/objects/items/devices/scanners/health_analyzer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@

if(!istype(patient))
playsound(src, 'sound/machines/buzz-sigh.ogg', 30, TRUE)
to_chat(user, span_notice("\The [src] makes a sad buzz and briefly displays an unhappy face, indicating it can't scan [patient]."))
to_chat(user, span_warning("\The [src] makes a sad buzz and briefly displays an unhappy face, indicating it can't scan [patient]."))
show_emotion(AI_EMOTION_SAD)
return

Expand Down Expand Up @@ -710,9 +710,9 @@
add_fingerprint(user)
user.visible_message(span_notice("[user] scans [patient] for diseases."), span_notice("You scan [patient] for diseases."))

if(!istype(user))
if(!istype(patient))
playsound(src, 'sound/machines/buzz-sigh.ogg', 30, TRUE)
to_chat(user, span_notice("\The [src] makes a sad buzz and briefly displays a frowny face, indicating it can't scan [patient]."))
to_chat(user, span_warning("\The [src] makes a sad buzz and briefly displays a frowny face, indicating it can't scan [patient]."))
emotion = AID_EMOTION_SAD
update_appearance(UPDATE_OVERLAYS)
return
Expand Down Expand Up @@ -745,14 +745,14 @@
if(istype(disease, /datum/disease/advanced))
var/datum/disease/advanced/advanced = disease
if(!(disease.visibility_flags & HIDDEN_SCANNER))
render += "<span class='alert ml-1'><b>Warning: [advanced.origin] detected</b>\n\
<div class='ml-2'>Name: [advanced.real_name()].\nType: [disease.spread_text].\nStage: [disease.stage]/[disease.max_stages].</div>\
render += "<span class='alert ml-1'><b>Warning: [advanced.origin] disease detected</b>\n\
<div class='ml-2'>Name: [advanced.real_name()].\nType: [disease.get_spread_string()].\nStage: [disease.stage]/[disease.max_stages].</div>\
</span>"

else
if(!(disease.visibility_flags & HIDDEN_SCANNER))
render += "<span class='alert ml-1'><b>Warning: [disease.form] detected</b>\n\
<div class='ml-2'>Name: [disease.name].\nType: [disease.spread_text].\nStage: [disease.stage]/[disease.max_stages].\nPossible Cure: [disease.cure_text]</div>\
render += "<span class='alert ml-1'><b>Warning: [disease.form] disease detected</b>\n\
<div class='ml-2'>Name: [disease.name].\nType: [disease.get_spread_string()].\nStage: [disease.stage]/[disease.max_stages].\nPossible Cure: [disease.cure_text]</div>\
</span>"

if(!length(render))
Expand Down
3 changes: 2 additions & 1 deletion code/modules/food_and_drinks/recipes/soup_mixtures.dm
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
transfer_ingredient_reagents(ingredient, holder)
// Delete, it's done
qdel(ingredient)
continue

// Everything else will just get fried
ingredient.AddElement(/datum/element/fried_item, 30)
Expand Down Expand Up @@ -238,7 +239,7 @@
ingredient_pool.remove_reagent(/datum/reagent/consumable/nutriment, amount * percentage_of_nutriment_converted)
ingredient_pool.remove_reagent(/datum/reagent/consumable/nutriment/vitamin, amount * percentage_of_nutriment_converted)
// The other half of the nutriment, and the rest of the reagents, will get put directly into the pot
ingredient_pool.trans_to(holder, amount, ingredient_reagent_multiplier, no_react = TRUE)
ingredient_pool.trans_to(holder, amount, ingredient_reagent_multiplier, preserve_data = FALSE, no_react = TRUE)

/// Called whenever the soup pot overfills with reagent.
/datum/chemical_reaction/food/soup/proc/boil_over(datum/reagents/holder)
Expand Down
14 changes: 8 additions & 6 deletions code/modules/mob/living/basic/vermin/mouse.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
var/contributes_to_ratcap = TRUE
/// Probability that, if we successfully bite a shocked cable, that we will die to it.
var/cable_zap_prob = 85
/// responsible for disease stuff
var/list/ratdisease = list()

var/chooses_bodycolor = TRUE

Expand Down Expand Up @@ -112,7 +110,6 @@

// On death, remove the mouse from the ratcap, and turn it into an item if applicable
/mob/living/basic/mouse/death(gibbed)
var/list/data = list("viruses" = ratdisease)
SSmobs.cheeserats -= src
// Rats with a mind will not turn into a lizard snack on death
if(mind)
Expand All @@ -125,8 +122,15 @@
var/obj/item/food/deadmouse/mouse = new(loc)
mouse.name = name
mouse.icon_state = icon_dead
//MONKESTATION EDIT START
var/list/data = list("viruses"=list(),"blood_DNA"=null,"blood_type"=null,"resistances"=null,"trace_chem"=null,"immunity"=list())
for(var/datum/disease/D as anything in diseases)
var/datum/disease/DA = D.Copy()
DA.spread_flags = DISEASE_SPREAD_BLOOD //please stop killing the station with the black death from eating rats
data["viruses"] += DA
data["immunity"] = immune_system.GetImmunity()
//MONKESTATION EDIT END
mouse.reagents.add_reagent(/datum/reagent/blood, 2, data)
mouse.ratdisease = src.ratdisease
if(HAS_TRAIT(src, TRAIT_BEING_SHOCKED))
mouse.desc = "They're toast."
mouse.add_atom_colour("#3A3A3A", FIXED_COLOUR_PRIORITY)
Expand Down Expand Up @@ -307,8 +311,6 @@
decomp_req_handle = TRUE
ant_attracting = FALSE
decomp_type = /obj/item/food/deadmouse/moldy
///responsible for holding diseases for dead rat
var/list/ratdisease = list()
var/body_color = "gray"
var/critter_type = /mob/living/basic/mouse

Expand Down
2 changes: 1 addition & 1 deletion code/modules/mod/modules/modules_general.dm
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
for(var/datum/disease/virus as anything in mod.wearer.diseases)
var/list/virus_data = list()
virus_data["name"] = virus.name
virus_data["type"] = virus.spread_text
virus_data["type"] = virus.get_spread_string()
virus_data["stage"] = virus.stage
virus_data["maxstage"] = virus.max_stages
virus_data["cure"] = virus.cure_text
Expand Down
2 changes: 1 addition & 1 deletion code/modules/reagents/chemistry/machinery/pandemic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@
traits["description"] = disease.desc || "none"
traits["index"] = index++
traits["name"] = disease.name
traits["spread"] = disease.spread_text || "none"
traits["spread"] = disease.get_spread_string() || "none"
if(istype(disease, /datum/disease/advance)) // Advanced diseases get more info
var/datum/disease/advance/adv_disease = disease
var/disease_name = SSdisease.get_disease_name(adv_disease.GetDiseaseID())
Expand Down
Binary file modified icons/mob/simple/animal.dmi
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
e.chance = rand(1, e.max_chance)
return e

/datum/disease/proc/new_random_effect(var/max_badness = 5, var/min_badness = 0, var/stage = 0, var/old_effect)
/datum/disease/proc/new_random_effect(max_badness = 5, min_badness = 0, stage = 0, old_effect)
var/list/datum/symptom/list = list()
var/list/to_choose = subtypesof(/datum/symptom)
if(old_effect) //So it doesn't just evolve right back into the previous virus type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
return r

/datum/disease/proc/get_spread_string()
if(spread_text)
return spread_text
var/dat = ""
var/check = 0
if (spread_flags & DISEASE_SPREAD_BLOOD)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
L += D.Copy()
return L

/datum/disease/proc/makerandom(var/list/str = list(), var/list/rob = list(), var/list/anti = list(), var/list/bad = list(), var/atom/source = null)
/datum/disease/proc/makerandom(list/str = list(), list/rob = list(), list/anti = list(), list/bad = list(), atom/source = null)
//ID
uniqueID = rand(0,9999)
subID = rand(0,9999)
Expand Down
Binary file modified monkestation/code/modules/virology/icons/animal.dmi
Binary file not shown.
23 changes: 11 additions & 12 deletions monkestation/code/modules/virology/items/extrapolator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
name = "virus extrapolator"
icon = 'monkestation/icons/obj/device.dmi'
icon_state = "extrapolator_scan"
desc = "A scanning device, used to extract genetic material of potential pathogens"
desc = "A scanning device, used to extract genetic material of potential pathogens."
item_flags = NOBLUDGEON
w_class = WEIGHT_CLASS_TINY
var/using = FALSE
Expand Down Expand Up @@ -42,13 +42,13 @@
if(!user.transferItemToLoc(W, src))
return
scanner = W
to_chat(user, "<span class='notice'>You install a [scanner.name] in [src].</span>")
to_chat(user, span_notice("You install a [scanner.name] in [src]."))
else
to_chat(user, "<span class='notice'>[src] already has a scanner installed.</span>")
to_chat(user, span_notice("[src] already has a scanner installed."))

else if(W.tool_behaviour == TOOL_SCREWDRIVER)
if(scanner)
to_chat(user, "<span class='notice'>You remove the [scanner.name] from \the [src].</span>")
to_chat(user, span_notice("You remove the [scanner.name] from \the [src]."))
scanner.forceMove(drop_location())
scanner = null
else
Expand All @@ -58,9 +58,9 @@
. = ..()
if(in_range(user, src) || isobserver(user))
if(!scanner)
. += "<span class='notice'>The scanner is missing.</span>"
. += span_notice("The scanner is missing.")
else
. += "<span class='notice'>A class <b>[scanner.rating]</b> scanning module is installed. It is <i>screwed</i> in place.</span>"
. += span_notice("A class <b>[scanner.rating]</b> scanning module is installed. It is <i>screwed</i> in place.")

. += span_notice("List of Stored Varients.")
for(var/datum/symptom_varient/varient as anything in stored_varient_types)
Expand All @@ -84,12 +84,12 @@
switch(target.extrapolator_act(user, src, scan))
if(FALSE)
if(scan)
to_chat(user, "<span class='notice'>the extrapolator fails to return any data</span>")
to_chat(user, "<span class='notice'>[src] fails to return any data</span>")
if(TRUE)
to_chat(user, span_notice("You store [target]'s blood sample in [src]."))
to_chat(user, span_notice("You store \the [target]'s blood sample in [src]."))

else
to_chat(user, "<span class='warning'>the extrapolator has no scanner installed</span>")
to_chat(user, span_warning("[src] has no scanner installed!"))

/obj/item/extrapolator/attack_self(mob/user)
. = ..()
Expand All @@ -105,12 +105,11 @@
if(scan)
icon_state = "extrapolator_sample"
scan = FALSE
to_chat(user, "<span class='notice'>You remove the probe from the device and set it to inject genes into diseases or symptoms</span>")
to_chat(user, span_notice("You remove the probe from \the [src] and set it to inject genes into diseases or symptoms."))
else
icon_state = "extrapolator_scan"
scan = TRUE
to_chat(user, "<span class='notice'>You put the probe back in the device and set it to SCAN</span>")

to_chat(user, span_notice("You put the probe back in \the [src] and set it to scan for diseases."))

/obj/item/extrapolator/proc/try_disease_modification(mob/user, atom/target)
if(!isliving(target) && !istype(target, /obj/item/weapon/virusdish))
Expand Down
2 changes: 1 addition & 1 deletion monkestation/code/modules/virology/living/mouse.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
disease.log += "<br />[ROUND_TIME()] Infected [src]"

log_virus("[key_name(src)] was infected by virus: [disease.admin_details()] at [loc_name(loc)]")
disease.origin = "Rat"
disease.origin = "[capitalize(name)]"
disease.AddToGoggleView(src)

/mob/living/basic/mouse/Destroy()
Expand Down
2 changes: 1 addition & 1 deletion monkestation/code/modules/virology/machines/centrifuge.dm
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@

return result

/obj/machinery/disease2/centrifuge/proc/print_dish(var/datum/disease/advanced/D)
/obj/machinery/disease2/centrifuge/proc/print_dish(datum/disease/advanced/D)
special = CENTRIFUGE_LIGHTSPECIAL_BLINKING
/*
anim(target = src, a_icon = icon, flick_anim = "centrifuge_print", sleeptime = 10)
Expand Down
7 changes: 4 additions & 3 deletions monkestation/code/modules/virology/machines/curer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@
var/datum/reagent/blood/B = locate() in container.reagents.reagent_list

var/list/data = list()
data["antigen"] = B.data["immunity"]

product.reagents.add_reagent(/datum/reagent/vaccine , 30, data)
var/list/immunity = B.data["immunity"]
if(length(immunity))
data["antigen"] = immunity[2]

product.reagents.add_reagent(/datum/reagent/vaccine, 30, data)

0 comments on commit 2c230a8

Please sign in to comment.