[MIRROR] Disease antagonist (#5815)

* Disease antagonist

* Update mobs.dm

* can I go to sleep yet
This commit is contained in:
CitadelStationBot
2018-03-05 15:20:59 -06:00
committed by Poojawa
parent 766b85908e
commit a2e6253f00
85 changed files with 1483 additions and 505 deletions
@@ -57,7 +57,7 @@
if(istype(D, /datum/disease/advance))
var/datum/disease/advance/A = D
var/disease_name = SSdisease.get_disease_name(A.GetDiseaseID())
if(disease_name == "Unknown")
if(disease_name == "Unknown" && A.mutable)
this["can_rename"] = TRUE
this["name"] = disease_name
this["is_adv"] = TRUE
@@ -180,17 +180,21 @@
if("rename_disease")
var/id = get_virus_id_by_index(text2num(params["index"]))
var/datum/disease/advance/A = SSdisease.archive_diseases[id]
if(!A.mutable)
return
if(A)
var/new_name = stripped_input(usr, "Name the disease", "New name", "", MAX_NAME_LEN)
if(!new_name || ..())
return
A.AssignName(new_name)
for(var/datum/disease/advance/AD in SSdisease.active_diseases)
AD.Refresh()
. = TRUE
if("create_culture_bottle")
var/id = get_virus_id_by_index(text2num(params["index"]))
var/datum/disease/advance/A = new(FALSE, SSdisease.archive_diseases[id])
var/datum/disease/advance/A = SSdisease.archive_diseases[id]
if(!A.mutable)
to_chat(usr, "<span class='warning'>ERROR: Cannot replicate virus strain.</span>")
return
A = A.Copy()
var/list/data = list("viruses" = list(A))
var/obj/item/reagent_containers/glass/bottle/B = new(drop_location())
B.name = "[A.name] culture bottle"
@@ -60,9 +60,9 @@
M.SetSleeping(0, 0)
M.jitteriness = 0
M.cure_all_traumas(TRUE, TRAUMA_RESILIENCE_MAGIC)
for(var/thing in M.viruses)
for(var/thing in M.diseases)
var/datum/disease/D = thing
if(D.severity == VIRUS_SEVERITY_POSITIVE)
if(D.severity == DISEASE_SEVERITY_POSITIVE)
continue
D.cure()
..()
@@ -16,13 +16,15 @@
for(var/thing in data["viruses"])
var/datum/disease/D = thing
if((D.spread_flags & VIRUS_SPREAD_SPECIAL) || (D.spread_flags & VIRUS_SPREAD_NON_CONTAGIOUS))
if((D.spread_flags & DISEASE_SPREAD_SPECIAL) || (D.spread_flags & DISEASE_SPREAD_NON_CONTAGIOUS))
continue
if((method == TOUCH || method == VAPOR) && (D.spread_flags & VIRUS_SPREAD_CONTACT_FLUIDS))
M.ContactContractDisease(D)
else //ingest, patch or inject
M.ForceContractDisease(D)
if(isliving(M))
var/mob/living/L = M
if((method == TOUCH || method == VAPOR) && (D.spread_flags & DISEASE_SPREAD_CONTACT_FLUIDS))
L.ContactContractDisease(D)
else //ingest, patch or inject
L.ForceContractDisease(D)
if(iscarbon(M))
var/mob/living/carbon/C = M
@@ -97,12 +99,15 @@
taste_description = "slime"
/datum/reagent/vaccine/reaction_mob(mob/M, method=TOUCH, reac_volume)
if(!isliving(M))
return
var/mob/living/L = M
if(islist(data) && (method == INGEST || method == INJECT))
for(var/thing in M.viruses)
for(var/thing in L.diseases)
var/datum/disease/D = thing
if(D.GetDiseaseID() in data)
D.cure()
M.resistances |= data
L.disease_resistances |= data
/datum/reagent/vaccine/on_merge(list/data)
if(istype(data))
@@ -623,8 +628,11 @@
taste_description = "slime"
/datum/reagent/aslimetoxin/reaction_mob(mob/M, method=TOUCH, reac_volume)
if(!isliving(M))
return
var/mob/living/L = M
if(method != TOUCH)
M.ForceContractDisease(new /datum/disease/transformation/slime(0))
L.ForceContractDisease(new /datum/disease/transformation/slime(), FALSE, TRUE)
/datum/reagent/gluttonytoxin
name = "Gluttony's Blessing"
@@ -635,7 +643,10 @@
taste_description = "decay"
/datum/reagent/gluttonytoxin/reaction_mob(mob/M, method=TOUCH, reac_volume)
M.ForceContractDisease(new /datum/disease/transformation/morph(0))
if(!isliving(M))
return
var/mob/living/L = M
L.ForceContractDisease(new /datum/disease/transformation/morph(), FALSE, TRUE)
/datum/reagent/serotrotium
name = "Serotrotium"
@@ -1103,8 +1114,11 @@
taste_description = "sludge"
/datum/reagent/nanites/reaction_mob(mob/M, method=TOUCH, reac_volume, show_message = 1, touch_protection = 0)
if(!isliving(M))
return
var/mob/living/L = M
if(method==PATCH || method==INGEST || method==INJECT || (method == VAPOR && prob(min(reac_volume,100)*(1 - touch_protection))))
M.ForceContractDisease(new /datum/disease/transformation/robot(0))
L.ForceContractDisease(new /datum/disease/transformation/robot(), FALSE, TRUE)
/datum/reagent/xenomicrobes
name = "Xenomicrobes"
@@ -1115,8 +1129,11 @@
taste_description = "sludge"
/datum/reagent/xenomicrobes/reaction_mob(mob/M, method=TOUCH, reac_volume, show_message = 1, touch_protection = 0)
if(!isliving(M))
return
var/mob/living/L = M
if(method==PATCH || method==INGEST || method==INJECT || (method == VAPOR && prob(min(reac_volume,100)*(1 - touch_protection))))
M.ForceContractDisease(new /datum/disease/transformation/xeno(0))
L.ForceContractDisease(new /datum/disease/transformation/xeno(), FALSE, TRUE)
/datum/reagent/fungalspores
name = "Tubercle bacillus Cosmosis microbes"
@@ -1127,8 +1144,11 @@
taste_description = "slime"
/datum/reagent/fungalspores/reaction_mob(mob/M, method=TOUCH, reac_volume, show_message = 1, touch_protection = 0)
if(!isliving(M))
return
var/mob/living/L = M
if(method==PATCH || method==INGEST || method==INJECT || (method == VAPOR && prob(min(reac_volume,100)*(1 - touch_protection))))
M.ForceContractDisease(new /datum/disease/tuberculosis(0))
L.ForceContractDisease(new /datum/disease/tuberculosis(), FALSE, TRUE)
/datum/reagent/fluorosurfactant//foam precursor
name = "Fluorosurfactant"
+1 -1
View File
@@ -18,7 +18,7 @@
volume = vol
create_reagents(volume)
if(spawned_disease)
var/datum/disease/F = new spawned_disease(0)
var/datum/disease/F = new spawned_disease()
var/list/data = list("viruses"= list(F))
reagents.add_reagent("blood", disease_amount, data)