Merge branch 'master' into kk-headsets

This commit is contained in:
Killian
2024-11-05 11:53:33 +00:00
committed by GitHub
117 changed files with 4219 additions and 2913 deletions
+30
View File
@@ -0,0 +1,30 @@
#define VIRUS_SYMPTOM_LIMIT 6
//Visibility Flags
#define HIDDEN_SCANNER (1<<0)
#define HIDDEN_PANDEMIC (1<<1)
//Disease Flags
#define CURABLE (1<<0)
#define CAN_CARRY (1<<1)
#define CAN_RESIST (1<<2)
//Spread Flags
#define SPECIAL (1<<0)
#define NON_CONTAGIOUS (1<<1)
#define BLOOD (1<<2)
#define CONTACT_FEET (1<<3)
#define CONTACT_HANDS (1<<4)
#define CONTACT_GENERAL (1<<5)
#define AIRBORNE (1<<6)
//Severity Defines
#define NONTHREAT "No threat"
#define MINOR "Minor"
#define MEDIUM "Medium"
#define HARMFUL "Harmful"
#define DANGEROUS "Dangerous!"
#define BIOHAZARD "BIOHAZARD THREAT!"
#define SYMPTOM_ACTIVATION_PROB 3
+6
View File
@@ -220,3 +220,9 @@
#define ROUNDUPTOPOWEROFTWO(x) (2 ** -round(-log(2,x)))
#define DEFAULT(a, b) (a? a : b)
// sqrt, but if you give it a negative number, you get 0 instead of a runtime
/proc/sqrtor0(num)
if(num < 0)
return 0
return sqrt(num)
+3 -1
View File
@@ -173,7 +173,9 @@ SUBSYSTEM_DEF(statpanels)
target.stat_panel.send_message("update_examine", examine_update)
/datum/controller/subsystem/statpanels/proc/set_tickets_tab(client/target)
var/list/tickets = GLOB.ahelp_tickets.stat_entry(target)
var/list/tickets = list()
if(check_rights(R_ADMIN|R_SERVER|R_MOD,FALSE,target)) //Prevents non-staff from opening the list of ahelp tickets
tickets += GLOB.ahelp_tickets.stat_entry(target)
tickets += GLOB.mhelp_tickets.stat_entry(target)
target.stat_panel.send_message("update_tickets", tickets)
+195
View File
@@ -0,0 +1,195 @@
/mob/proc/HasDisease(datum/disease/D)
for(var/thing in GetViruses())
var/datum/disease/DD = thing
if(DD.IsSame(D))
return TRUE
return FALSE
/mob/proc/CanContractDisease(datum/disease/D)
if(stat == DEAD && !D.allow_dead)
return FALSE
if(D.GetDiseaseID() in GetResistances())
return FALSE
if(HasDisease(D))
return FALSE
if(istype(D, /datum/disease/advance) && count_by_type(GetViruses(), /datum/disease/advance) > 0)
return FALSE
if(!(type in D.viable_mobtypes))
return -1
if(isSynthetic())
if(D.infect_synthetics)
return TRUE
return FALSE
return TRUE
/mob/proc/ContractDisease(datum/disease/D)
if(!CanContractDisease(D))
return 0
AddDisease(D)
return TRUE
/mob/proc/AddDisease(datum/disease/D, respect_carrier = FALSE)
var/datum/disease/DD = new D.type(1, D, 0)
viruses += DD
DD.affected_mob = src
active_diseases += DD
var/list/skipped = list("affected_mob", "holder", "carrier", "stage", "type", "parent_type", "vars", "transformed")
if(respect_carrier)
skipped -= "carrier"
for(var/V in DD.vars)
if(V in skipped)
continue
if(istype(DD.vars[V],/list))
var/list/L = D.vars[V]
DD.vars[V] = L.Copy()
else
DD.vars[V] = D.vars[V]
log_admin("[key_name(usr)] has contracted the virus \"[DD]\"")
/mob/living/carbon/ContractDisease(datum/disease/D)
if(!CanContractDisease(D))
return 0
var/obj/item/clothing/Cl = null
var/passed = 1
var/head_ch = 100
var/body_ch = 100
var/hands_ch = 25
var/feet_ch = 25
if(D.spread_flags & CONTACT_HANDS)
head_ch = 0
body_ch = 0
hands_ch = 100
feet_ch = 0
if(D.spread_flags & CONTACT_FEET)
head_ch = 0
body_ch = 0
hands_ch = 0
feet_ch = 100
if(prob(15/D.permeability_mod))
return
if(nutrition > 300 && prob(nutrition/10))
return
var/list/zone_weights = list(
1 = head_ch,
2 = body_ch,
3 = hands_ch,
4 = feet_ch
)
var/target_zone = pick(zone_weights)
if(ishuman(src))
var/mob/living/carbon/human/H = src
switch(target_zone)
if(1)
if(isobj(H.head) && !istype(H.head, /obj/item/paper))
Cl = H.head
passed = prob((Cl.permeability_coefficient*100) - 1)
if(passed && isobj(H.wear_mask))
Cl = H.wear_mask
passed = prob((Cl.permeability_coefficient*100) - 1)
if(2)
if(isobj(H.wear_suit))
Cl = H.wear_suit
passed = prob((Cl.permeability_coefficient*100) - 1)
if(passed && isobj(H.w_uniform))
Cl = H.w_uniform
passed = prob((Cl.permeability_coefficient*100) - 1)
if(3)
if(isobj(H.wear_suit) && H.wear_suit.body_parts_covered & HANDS)
Cl = H.wear_suit
passed = prob((Cl.permeability_coefficient*100) - 1)
if(passed && isobj(H.gloves))
Cl = H.gloves
passed = prob((Cl.permeability_coefficient*100) - 1)
if(4)
if(isobj(H.wear_suit) && H.wear_suit.body_parts_covered & FEET)
Cl = H.wear_suit
passed = prob((Cl.permeability_coefficient*100) - 1)
if(passed && isobj(H.shoes))
Cl = H.shoes
passed = prob((Cl.permeability_coefficient*100) - 1)
if(!passed && (D.spread_flags & AIRBORNE) && !internal)
passed = (prob((50*D.permeability_mod) -1))
if(passed)
AddDisease(D)
return passed
/mob/proc/ForceContractDisease(datum/disease/D, respect_carrier)
if(!CanContractDisease(D))
return FALSE
AddDisease(D, respect_carrier)
return TRUE
/mob/living/carbon/human/CanContractDisease(datum/disease/D)
if(species.virus_immune && !D.bypasses_immunity)
return FALSE
for(var/organ in D.required_organs)
if(locate(organ) in internal_organs)
continue
if(locate(organ) in organs)
continue
return FALSE
return ..()
/mob/living/carbon/human/monkey/CanContractDisease(datum/disease/D)
. = ..()
if(. == -1)
if(D.viable_mobtypes.Find(/mob/living/carbon/human))
return 1
/mob/living/proc/handle_diseases()
return
/mob/proc/GetViruses()
LAZYINITLIST(viruses)
return viruses
/mob/proc/GetResistances()
LAZYINITLIST(resistances)
return resistances
/client/proc/ReleaseVirus()
set category = "Fun.Event Kit"
set name = "Release Virus"
set desc = "Release a pre-set virus."
if(!is_admin())
return FALSE
var/datum/disease/D = tgui_input_list(usr, "Choose virus", "Viruses", subtypesof(/datum/disease), subtypesof(/datum/disease))
var/mob/living/carbon/human/H = null
if(isnull(D))
return FALSE
for(var/thing in shuffle(human_mob_list))
H = thing
if(H.stat == DEAD)
continue
if(!H.HasDisease(D))
H.ForceContractDisease(D)
break
message_admins("[key_name_admin(usr)] has triggered a virus outbreak of [D.name]! Affected mob: [key_name_admin(H)]")
log_admin("[key_name_admin(usr)] infected [key_name_admin(H)] with [D.name]")
+167
View File
@@ -0,0 +1,167 @@
GLOBAL_LIST_INIT(diseases, subtypesof(/datum/disease))
/datum/disease
//Flags
var/visibility_flags = 0
var/disease_flags = CURABLE|CAN_CARRY|CAN_RESIST
var/spread_flags = AIRBORNE
//Fluff
/// Used for identification of viruses in the Medical Records Virus Database
var/medical_name
var/form = "Virus"
var/name = "No disease"
var/desc = ""
var/agent = "some microbes"
var/spread_text = ""
var/cure_text = ""
//Stages
var/stage = 1
var/max_stages = 0
var/stage_prob = 4
/// The fraction of stages the virus must at least be at to show up on medical HUDs. Rounded up.
var/discovery_threshold = 0.5
/// If TRUE, this virus will show up on medical HUDs. Automatically set when it reaches mid-stage.
var/discovered = FALSE
// Other
var/list/viable_mobtypes = list()
var/mob/living/carbon/affected_mob
var/list/cures = list()
var/infectivity = 65
var/cure_chance = 8
var/carrier = FALSE
var/bypasses_immunity = FALSE
var/virus_heal_resistant = FALSE
var/permeability_mod = 1
var/severity = NONTHREAT
var/list/required_organs = list()
var/needs_all_cures = TRUE
var/list/strain_data = list()
var/allow_dead = FALSE
var/infect_synthetics = FALSE
var/processing = FALSE
/datum/disease/Destroy()
affected_mob = null
active_diseases.Remove(src)
if(processing)
End()
return ..()
/datum/disease/proc/stage_act()
if(!affected_mob)
return FALSE
var/cure = has_cure()
if(carrier && !cure)
return FALSE
if(!processing)
processing = TRUE
Start()
stage = min(stage, max_stages)
handle_stage_advance(cure)
return handle_cure_testing(cure)
/datum/disease/proc/handle_stage_advance(has_cure = FALSE)
if(!has_cure && prob(stage_prob))
stage = min(stage + 1, max_stages)
if(!discovered && stage >= CEILING(max_stages * discovery_threshold, 1))
discovered = TRUE
BITSET(affected_mob.hud_updateflag, STATUS_HUD)
/datum/disease/proc/handle_cure_testing(has_cure = FALSE)
if(has_cure && prob(cure_chance))
stage = max(stage -1, 1)
if(disease_flags & CURABLE)
if(has_cure && prob(cure_chance))
cure()
return FALSE
return TRUE
/datum/disease/proc/has_cure()
if(!(disease_flags & CURABLE))
return 0
var/cures_found = 0
for(var/C_id in cures)
if(affected_mob.reagents.has_reagent(C_id))
cures_found++
if(needs_all_cures && cures_found < length(cures))
return FALSE
return cures_found
/datum/disease/proc/spread(force_spread = 0)
if(!affected_mob)
return
if((spread_flags & SPECIAL || spread_flags & NON_CONTAGIOUS || spread_flags & BLOOD) && !force_spread)
return
if(affected_mob.reagents.has_reagent("spaceacilin") || (affected_mob.nutrition > 300 && prob(affected_mob.nutrition/10)))
return
var/spread_range = 1
if(force_spread)
spread_range = force_spread
if(spread_flags & AIRBORNE)
spread_range++
var/turf/target = affected_mob.loc
if(istype(target))
for(var/mob/living/carbon/C in oview(spread_range, affected_mob))
var/turf/current = get_turf(C)
if(current)
while(TRUE)
if(current == target)
C.ContractDisease(src)
break
var/direction = get_dir(current, target)
var/turf/next = get_step(current, direction)
current = next
/datum/disease/proc/cure()
if(affected_mob)
if(disease_flags & CAN_RESIST)
if(!(type in affected_mob.GetResistances()))
affected_mob.resistances += type
remove_virus()
qdel(src)
/datum/disease/proc/IsSame(datum/disease/D)
if(ispath(D))
return istype(src, D)
return istype(src, D.type)
/datum/disease/proc/Copy()
var/datum/disease/D = new type()
D.strain_data = strain_data.Copy()
return D
/datum/disease/proc/GetDiseaseID()
return type
/datum/disease/proc/IsSpreadByTouch()
if(spread_flags & CONTACT_FEET || spread_flags & CONTACT_HANDS || spread_flags & CONTACT_GENERAL)
return 1
return 0
/datum/disease/proc/remove_virus()
affected_mob.viruses -= src
BITSET(affected_mob.hud_updateflag, STATUS_HUD)
/datum/disease/proc/Start()
return
/datum/disease/proc/End()
return
+404
View File
@@ -0,0 +1,404 @@
GLOBAL_LIST_EMPTY(archive_diseases)
GLOBAL_LIST_INIT(advance_cures, list(
"sodiumchloride", "sugar", "orangejuice",
"spaceacilin", "glucose", "ethanol",
"dyloteane", "impedrezene", "hepanephrodaxon",
"gold", "silver"
))
/datum/disease/advance
name = "Unknown"
desc = "An engineered disease which can contain a multitude of symptoms."
form = "Advance Disease"
agent = "advance microbes"
max_stages = 5
spread_text = "Unknown"
viable_mobtypes = list(/mob/living/carbon/human)
var/list/symptoms = list()
var/id = ""
/datum/disease/advance/New(process = 1, datum/disease/advance/D)
if(!istype(D))
D = null
if(!symptoms || !length(symptoms))
if(!D || !D.symptoms || !length(D.symptoms))
symptoms = GenerateSymptoms(0, 2)
else
for(var/datum/symptom/S in D.symptoms)
symptoms += new S.type
Refresh()
..(process, D)
return
/datum/disease/advance/Destroy()
if(processing)
for(var/datum/symptom/S in symptoms)
S.End(src)
return ..()
/datum/disease/advance/stage_act()
if(!..())
return FALSE
if(symptoms && length(symptoms))
if(!processing)
processing = TRUE
for(var/datum/symptom/S in symptoms)
S.Start(src)
for(var/datum/symptom/S in symptoms)
S.Activate(src)
else
CRASH("We do not have any symptoms during stage_act()!")
return TRUE
/datum/disease/advance/IsSame(datum/disease/advance/D)
if(ispath(D))
return FALSE
if(!istype(D, /datum/disease/advance))
return FALSE
if(GetDiseaseID() != D.GetDiseaseID())
return FALSE
return TRUE
/datum/disease/advance/cure(resistance=1)
if(affected_mob)
var/id = "[GetDiseaseID()]"
if(resistance && !(id in affected_mob.GetResistances()))
affected_mob.GetResistances()[id] = id
remove_virus()
qdel(src)
/datum/disease/advance/Copy(process = 0)
return new /datum/disease/advance(process, src, 1)
/datum/disease/advance/proc/Mix(datum/disease/advance/D)
if(!(IsSame(D)))
var/list/possible_symptoms = shuffle(D.symptoms)
for(var/datum/symptom/S in possible_symptoms)
AddSymptom(new S.type)
/datum/disease/advance/proc/HasSymptom(datum/symptom/S)
for(var/datum/symptom/symp in symptoms)
if(symp.id == S.id)
return 1
return 0
/datum/disease/advance/proc/GenerateSymptomsBySeverity(sev_min, sev_max, amount = 1)
var/list/generated = list()
var/list/possible_symptoms = list()
for(var/symp in GLOB.list_symptoms)
var/datum/symptom/S = new symp
if(S.severity >= sev_min && S.severity <= sev_max)
if(!HasSymptom(S))
possible_symptoms += S
if(!length(possible_symptoms))
return generated
for(var/i = 1 to amount)
generated += pick_n_take(possible_symptoms)
return generated
/datum/disease/advance/proc/GenerateSymptoms(level_min, level_max, amount_get = 0)
var/list/generated = list()
// Generate symptoms. By default, we only choose non-deadly symptoms.
var/list/possible_symptoms = list()
for(var/symp in GLOB.list_symptoms)
var/datum/symptom/S = new symp
if(S.level >= level_min && S.level <= level_max)
if(!HasSymptom(S))
possible_symptoms += S
if(!length(possible_symptoms))
return generated
// Random chance to get more than one symptom
var/number_of = amount_get
if(!amount_get)
number_of = 1
while(prob(20))
number_of += 1
for(var/i = 1; number_of >= i && length(possible_symptoms); i++)
generated += pick_n_take(possible_symptoms)
return generated
/datum/disease/advance/proc/Refresh(new_name = FALSE, archive = FALSE)
var/list/properties = GenerateProperties()
AssignProperties(properties)
id = null
if(!GLOB.archive_diseases[GetDiseaseID()])
if(new_name)
AssignName()
GLOB.archive_diseases[GetDiseaseID()] = src // So we don't infinite loop
GLOB.archive_diseases[GetDiseaseID()] = new /datum/disease/advance(0, src, 1)
var/datum/disease/advance/A = GLOB.archive_diseases[GetDiseaseID()]
AssignName(A.name)
/datum/disease/advance/proc/GenerateProperties()
if(!symptoms || !length(symptoms))
CRASH("We did not have any symptoms before generating properties.")
var/list/properties = list("resistance" = 1, "stealth" = 0, "stage rate" = 1, "transmittable" = 1, "severity" = 0)
for(var/datum/symptom/S in symptoms)
properties["resistance"] += S.resistance
properties["stealth"] += S.stealth
properties["stage rate"] += S.stage_speed
properties["transmittable"] += S.transmittable
properties["severity"] = max(properties["severity"], S.severity) // severity is based on the highest severity symptom
return properties
/datum/disease/advance/proc/AssignProperties(list/properties = list())
if(properties && length(properties))
switch(properties["stealth"])
if(2)
visibility_flags = HIDDEN_SCANNER
if(3 to INFINITY)
visibility_flags = HIDDEN_SCANNER|HIDDEN_PANDEMIC
// The more symptoms we have, the less transmittable it is but some symptoms can make up for it.
SetSpread(clamp(2 ** (properties["transmittable"] - length(symptoms)), BLOOD, AIRBORNE))
permeability_mod = max(CEILING(0.4 * properties["transmittable"], 1), 1)
cure_chance = 15 - clamp(properties["resistance"], -5, 5) // can be between 10 and 20
stage_prob = max(properties["stage rate"], 2)
SetSeverity(properties["severity"])
GenerateCure(properties)
else
CRASH("Our properties were empty or null!")
/datum/disease/advance/proc/SetSpread(spread_id)
switch(spread_id)
if(NON_CONTAGIOUS, SPECIAL)
spread_text = "Non-contagious"
if(CONTACT_GENERAL, CONTACT_HANDS, CONTACT_FEET)
spread_text = "On contact"
if(AIRBORNE)
spread_text = "Airborne"
if(BLOOD)
spread_text = "Blood"
spread_flags = spread_id
/datum/disease/advance/proc/SetSeverity(level_sev)
switch(level_sev)
if(-INFINITY to 0)
severity = NONTHREAT
if(1)
severity = MINOR
if(2)
severity = MEDIUM
if(3)
severity = HARMFUL
if(4)
severity = DANGEROUS
if(5 to INFINITY)
severity = BIOHAZARD
else
severity = "Unknown"
/datum/disease/advance/proc/GenerateCure(list/properties = list())
if(properties && length(properties))
var/res = clamp(properties["resistance"] - (length(symptoms) / 2), 1, length(GLOB.advance_cures))
cures = list(GLOB.advance_cures[res])
cure_text = cures[1]
return
// Randomly generate a symptom, has a chance to lose or gain a symptom.
/datum/disease/advance/proc/Evolve(min_level, max_level)
var/s = safepick(GenerateSymptoms(min_level, max_level, 1))
if(s)
AddSymptom(s)
Refresh(1)
return
// Randomly remove a symptom.
/datum/disease/advance/proc/Devolve()
if(length(symptoms) > 1)
var/s = safepick(symptoms)
if(s)
RemoveSymptom(s)
Refresh(1)
return
// Name the disease.
/datum/disease/advance/proc/AssignName(name = "Unknown")
src.name = name
return
// Return a unique ID of the disease.
/datum/disease/advance/GetDiseaseID()
if(!id)
var/list/L = list()
for(var/datum/symptom/S in symptoms)
L += S.id
L = sortList(L) // Sort the list so it doesn't matter which order the symptoms are in.
var/result = jointext(L, ":")
id = result
return id
// Add a symptom, if it is over the limit (with a small chance to be able to go over)
// we take a random symptom away and add the new one.
/datum/disease/advance/proc/AddSymptom(datum/symptom/S)
if(HasSymptom(S))
return
if(length(symptoms) < (VIRUS_SYMPTOM_LIMIT - 1) + rand(-1, 1))
symptoms += S
else
RemoveSymptom(pick(symptoms))
symptoms += S
return
// Simply removes the symptom.
/datum/disease/advance/proc/RemoveSymptom(datum/symptom/S)
symptoms -= S
return
// Mix a list of advance diseases and return the mixed result.
/proc/Advance_Mix(list/D_list)
var/list/diseases = list()
for(var/datum/disease/advance/A in D_list)
diseases += A.Copy()
if(!length(diseases))
return null
if(length(diseases) <= 1)
return pick(diseases) // Just return the only entry.
var/i = 0
// Mix our diseases until we are left with only one result.
while(i < 20 && length(diseases) > 1)
i++
var/datum/disease/advance/D1 = pick(diseases)
diseases -= D1
var/datum/disease/advance/D2 = pick(diseases)
D2.Mix(D1)
// Should be only 1 entry left, but if not let's only return a single entry
var/datum/disease/advance/to_return = pick(diseases)
to_return.Refresh(1)
return to_return
/proc/SetViruses(datum/reagent/R, list/data)
if(data)
var/list/preserve = list()
if(istype(data) && data["viruses"])
for(var/datum/disease/A in data["viruses"])
preserve += A.Copy()
R.data = data.Copy()
if(length(preserve))
R.data["viruses"] = preserve
/client/proc/AdminCreateVirus()
set category = "Fun.Event Kit"
set name = "Create Advanced Virus"
set desc = "Create an advanced virus and release it."
if(!is_admin())
return FALSE
var/i = VIRUS_SYMPTOM_LIMIT
var/mob/living/carbon/human/H = null
var/datum/disease/advance/D = new(0, null)
D.symptoms = list()
var/list/symptoms = list()
symptoms += "Done"
symptoms += GLOB.list_symptoms.Copy()
do
if(usr)
var/symptom = tgui_input_list(usr, "Choose a symptom to add ([i] remaining)", "Choose a Symptom", symptoms)
if(isnull(symptom))
return
else if(istext(symptom))
i = 0
else if(ispath(symptom))
var/datum/symptom/S = new symptom
if(!D.HasSymptom(S))
D.symptoms += S
i -= 1
while(i > 0)
if(length(D.symptoms) > 0)
var/new_name = tgui_input_text(usr, "Name your new disease.", "New Name")
if(!new_name)
return
D.AssignName(new_name)
D.Refresh()
for(var/datum/disease/advance/AD in active_diseases)
AD.Refresh()
for(var/thing in shuffle(human_mob_list))
H = thing
if(H.stat == DEAD)
continue
if(!H.HasDisease(D))
H.ForceContractDisease(D)
break
var/list/name_symptoms = list()
for(var/datum/symptom/S in D.symptoms)
name_symptoms += S.name
message_admins("[key_name_admin(usr)] has triggered a custom virus outbreak of [D.name]! It has these symptoms: [english_list(name_symptoms)]")
log_admin("[key_name_admin(usr)] infected [key_name_admin(H)] with [D.name]. It has these symptoms: [english_list(name_symptoms)]")
/datum/disease/advance/proc/totalStageSpeed()
var/total_stage_speed = 0
for(var/i in symptoms)
var/datum/symptom/S = i
total_stage_speed += S.stage_speed
return total_stage_speed
/datum/disease/advance/proc/totalStealth()
var/total_stealth = 0
for(var/i in symptoms)
var/datum/symptom/S = i
total_stealth += S.stealth
return total_stealth
/datum/disease/advance/proc/totalResistance()
var/total_resistance = 0
for(var/i in symptoms)
var/datum/symptom/S = i
total_resistance += S.resistance
return total_resistance
/datum/disease/advance/proc/totalTransmittable()
var/total_transmittable = 0
for(var/i in symptoms)
var/datum/symptom/S = i
total_transmittable += S.transmittable
return total_transmittable
@@ -0,0 +1,16 @@
// Cold
/datum/disease/advance/cold/New(process = 1, datum/disease/advance/D, copy = 0)
if(!D)
name = "Cold"
symptoms = list(new /datum/symptom/sneeze)
..(process, D, copy)
// Flu
/datum/disease/advance/flu/New(process = 1, datum/disease/advance/D, copy = 0)
if(!D)
name = "Flu"
symptoms = list(new /datum/symptom/cough)
..(process, D, copy)
@@ -0,0 +1,52 @@
/*
//////////////////////////////////////
Choking
Very very noticable.
Lowers resistance.
Decreases stage speed.
Decreases transmittablity tremendously.
Moderate Level.
Bonus
Inflicts spikes of oxyloss
//////////////////////////////////////
*/
/datum/symptom/choking
name = "Choking"
stealth = -3
resistance = -2
stage_speed = -2
transmittable = -4
level = 3
severity = 3
/datum/symptom/choking/Activate(datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
var/mob/living/M = A.affected_mob
switch(A.stage)
if(1, 2)
to_chat(M, span_warning(pick("You're having difficulty breathing.", "Your breathing becomes heavy.")))
if(3, 4)
to_chat(M, span_boldwarning(pick("Your windpipe feels like a straw.", "Your breathing becomes tremendously difficult.")))
Choke_stage_3_4(M, A)
M.emote("gasp")
else
to_chat(M, span_userdanger(pick("You're choking!", "You can't breathe!")))
Choke(M, A)
M.emote("gasp")
return
/datum/symptom/choking/proc/Choke_stage_3_4(mob/living/M, datum/disease/advance/A)
var/get_damage = sqrtor0(21+A.totalStageSpeed()*0.5)+sqrtor0(16+A.totalStealth())
M.adjustOxyLoss(get_damage)
return 1
/datum/symptom/choking/proc/Choke(mob/living/M, datum/disease/advance/A)
var/get_damage = sqrtor0(21+A.totalStageSpeed()*0.5)+sqrtor0(16+A.totalStealth()*5)
M.adjustOxyLoss(get_damage)
return 1
@@ -0,0 +1,40 @@
/*
//////////////////////////////////////
Confusion
Little bit hidden.
Lowers resistance.
Decreases stage speed.
Not very transmittable.
Intense Level.
Bonus
Makes the affected mob be confused for short periods of time.
//////////////////////////////////////
*/
/datum/symptom/confusion
name = "Confusion"
stealth = 1
resistance = -1
stage_speed = -3
transmittable = 0
level = 4
severity = 2
/datum/symptom/confusion/Activate(datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
var/mob/living/carbon/M = A.affected_mob
switch(A.stage)
if(1, 2, 3, 4)
to_chat(M, span_warning(pick("Your head hurts.", "Your mind blanks for a moment.")))
else
to_chat(M, span_userdanger("You can't think straight!"))
M.AdjustConfused(rand(16, 200))
return
@@ -0,0 +1,39 @@
/*
//////////////////////////////////////
Coughing
Noticable.
Little Resistance.
Doesn't increase stage speed much.
Transmittable.
Low Level.
BONUS
Will force the affected mob to drop small items!
//////////////////////////////////////
*/
/datum/symptom/cough
name = "Cough"
stealth = -1
resistance = 3
stage_speed = 1
transmittable = 2
level = 1
severity = 1
/datum/symptom/cough/Activate(var/datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
var/mob/living/M = A.affected_mob
switch(A.stage)
if(1, 2, 3)
to_chat(M, span_warning(pick("You swallow excess mucus", "You lightly cough.")))
else
M.emote("cough")
var/obj/item/I = M.get_active_hand()
if(I && I.w_class == ITEMSIZE_SMALL)
M.drop_item()
return
@@ -0,0 +1,59 @@
/*
//////////////////////////////////////
Damage Converter
Little bit hidden.
Lowers resistance tremendously.
Decreases stage speed tremendously.
Reduced transmittablity
Intense Level.
Bonus
Slowly converts brute/fire damage to toxin.
//////////////////////////////////////
*/
/datum/symptom/damage_converter
name = "Toxic Compensation"
stealth = 1
resistance = -4
stage_speed = -4
transmittable = -2
level = 4
/datum/symptom/damage_converter/Activate(datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB * 10))
var/mob/living/M = A.affected_mob
switch(A.stage)
if(4, 5)
Convert(M)
return
/datum/symptom/damage_converter/proc/Convert(mob/living/M)
var/get_damage = rand(1, 2)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/list/parts = H.get_damaged_organs(TRUE, TRUE)
if(!length(parts))
return
var/healed = 0
for(var/obj/item/organ/external/E in parts)
healed += min(E.brute_dam, get_damage) + min(E.burn_dam, get_damage)
E.heal_damage(get_damage, get_damage, 0, 0)
M.adjustToxLoss(healed)
else
if(M.getFireLoss() > 0 || M.getBruteLoss() > 0)
M.adjustFireLoss(-get_damage)
M.adjustBruteLoss(-get_damage)
M.adjustToxLoss(get_damage)
else
return
return TRUE
@@ -0,0 +1,38 @@
/*
//////////////////////////////////////
Dizziness
Hidden.
Lowers resistance considerably.
Decreases stage speed.
Reduced transmittability
Intense Level.
Bonus
Shakes the affected mob's screen for short periods.
//////////////////////////////////////
*/
/// Not the egg
/datum/symptom/dizzy
name = "Dizziness"
stealth = 2
resistance = -2
stage_speed = -3
transmittable = -1
level = 4
severity = 2
/datum/symptom/dizzy/Activate(var/datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
var/mob/living/M = A.affected_mob
switch(A.stage)
if(1, 2, 3, 4)
to_chat(M, span_warning(pick("You feel dizzy.", "Your head spins.")))
else
to_chat(M, span_userdanger("A wave of dizziness washes over you!"))
M.make_dizzy(10)
return
@@ -0,0 +1,40 @@
/*
//////////////////////////////////////
Fever
No change to hidden.
Increases resistance.
Increases stage speed.
Little transmittable.
Low level.
Bonus
Heats up your body.
//////////////////////////////////////
*/
/datum/symptom/fever
name = "Fever"
stealth = 0
resistance = 3
stage_speed = 3
transmittable = 2
level = 2
severity = 2
/datum/symptom/fever/Activate(var/datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
var/mob/living/carbon/M = A.affected_mob
to_chat(M, span_warning(pick("You feel hot.", "You feel like you're burning.")))
if(M.bodytemperature < BODYTEMP_HEAT_DAMAGE_LIMIT)
Heat(M, A)
return
/datum/symptom/fever/proc/Heat(var/mob/living/M, var/datum/disease/advance/A)
var/get_heat = (sqrt(21+A.totalTransmittable()*2))+(sqrt(20+A.totalStageSpeed()*3))
M.bodytemperature = min(M.bodytemperature + (get_heat * A.stage), BODYTEMP_HEAT_DAMAGE_LIMIT - 1)
return TRUE
@@ -0,0 +1,56 @@
/*
//////////////////////////////////////
Spontaneous Combustion
Slightly hidden.
Lowers resistance tremendously.
Decreases stage tremendously.
Decreases transmittablity tremendously.
Fatal Level.
Bonus
Ignites infected mob.
//////////////////////////////////////
*/
/datum/symptom/fire
name = "Spontaneous Combustion"
stealth = 1
resistance = -4
stage_speed = -4
transmittable = -4
level = 6
severity = 5
/datum/symptom/fire/Activate(datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
var/mob/living/M = A.affected_mob
switch(A.stage)
if(3)
to_chat(M, span_warning(pick("You feel hot.", "You hear a crackling noise.", "You smell smoke.")))
if(4)
Firestacks_stage_4(M, A)
M.IgniteMob()
to_chat(M, span_userdanger("Your skin bursts into flames!"))
M.emote("scream")
if(5)
Firestacks_stage_5(M, A)
M.IgniteMob()
to_chat(M, span_userdanger("Your skin erupts into an inferno!"))
M.emote("scream")
return
/datum/symptom/fire/proc/Firestacks_stage_4(mob/living/M, datum/disease/advance/A)
var/get_stacks = max((sqrtor0(20 + A.totalStageSpeed() * 2)) - (sqrtor0(16 + A.totalStealth())), 1)
M.adjust_fire_stacks(get_stacks)
M.adjustFireLoss(get_stacks * 0.5)
return 1
/datum/symptom/fire/proc/Firestacks_stage_5(mob/living/M, datum/disease/advance/A)
var/get_stacks = max((sqrtor0(20 + A.totalStageSpeed() * 3))-(sqrtor0(16 + A.totalStealth())), 1)
M.adjust_fire_stacks(get_stacks)
M.adjustFireLoss(get_stacks)
return 1
@@ -0,0 +1,42 @@
/*
//////////////////////////////////////
Necrotizing Fasciitis (AKA Flesh-Eating Disease)
Very very noticable.
Lowers resistance tremendously.
No changes to stage speed.
Decreases transmittablity temrendously.
Fatal Level.
Bonus
Deals brute damage over time.
//////////////////////////////////////
*/
/datum/symptom/flesh_eating
name = "Necrotizing Fasciitis"
stealth = -3
resistance = -4
stage_speed = 0
transmittable = -4
level = 6
severity = 5
/datum/symptom/flesh_eating/Activate(datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
var/mob/living/M = A.affected_mob
switch(A.stage)
if(2,3)
to_chat(M, span_warning(pick("You feel a sudden pain across your body.", "Drops of blood appear suddenly on your skin.")))
if(4,5)
to_chat(M, span_userdanger(pick("You cringe as a violent pain takes over your body.", "It feels like your body is eating itself inside out.", "IT HURTS.")))
Flesheat(M, A)
return
/datum/symptom/flesh_eating/proc/Flesheat(mob/living/M, datum/disease/advance/A)
var/get_damage = ((sqrt(16-A.totalStealth()))*5)
M.adjustBruteLoss(get_damage)
return 1
@@ -0,0 +1,40 @@
/*
//////////////////////////////////////
Hallucigen
Very noticable.
Lowers resistance considerably.
Decreases stage speed.
Reduced transmittable.
Critical Level.
Bonus
Makes the affected mob be hallucinated for short periods of time.
//////////////////////////////////////
*/
/datum/symptom/hallucigen
name = "Hallucigen"
stealth = -2
resistance = -3
stage_speed = -3
transmittable = -1
level = 5
severity = 3
/datum/symptom/hallucigen/Activate(datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
var/mob/living/carbon/M = A.affected_mob
switch(A.stage)
if(1, 2)
to_chat(M, span_warning(pick("Something appears in your peripheral vision, then winks out.", "You hear a faint whisper with no source.", "Your head aches.")))
if(3, 4)
to_chat(M, span_boldwarning(pick("Something is following you.", "You are being watched.", "You hear a whisper in your ear.", "Thumping footsteps slam toward you from nowhere.")))
else
to_chat(M, span_userdanger(pick("Oh, your head...", "Your head pounds.", "They're everywhere! Run!", "Something in the shadows...")))
M.hallucination = rand(5, 10)
return
@@ -0,0 +1,33 @@
/*
//////////////////////////////////////
Headache
Noticable.
Highly resistant.
Increases stage speed.
Not transmittable.
Low Level.
BONUS
Displays an annoying message!
Should be used for buffing your disease.
//////////////////////////////////////
*/
/datum/symptom/headache
name = "Headache"
stealth = -1
resistance = 4
stage_speed = 2
transmittable = 0
level = 1
severity = 1
/datum/symptom/headache/Activate(var/datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
var/mob/living/M = A.affected_mob
to_chat(M, span_warning(pick("Your head hurts.", "Your head starts pounding.")))
return
@@ -0,0 +1,150 @@
/*
//////////////////////////////////////
Healing
Little bit hidden.
Lowers resistance tremendously.
Decreases stage speed tremendously.
Decreases transmittablity temrendously.
Fatal Level.
Bonus
Heals toxins in the affected mob's blood stream.
//////////////////////////////////////
*/
/datum/symptom/heal
name = "Toxic Filter"
stealth = 1
resistance = -4
stage_speed = -4
transmittable = -4
level = 6
/datum/symptom/heal/Activate(datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB * 10))
var/mob/living/M = A.affected_mob
switch(A.stage)
if(4, 5)
Heal(M, A)
return
/datum/symptom/heal/proc/Heal(mob/living/M, datum/disease/advance/A)
var/get_damage = (sqrt(20+A.totalStageSpeed())*(1+rand()))
M.adjustToxLoss(-get_damage)
return TRUE
/*
//////////////////////////////////////
Metabolism
Little bit hidden.
Lowers resistance.
Decreases stage speed.
Decreases transmittablity temrendously.
High Level.
Bonus
Cures all diseases (except itself) and creates anti-bodies for them until the symptom dies.
//////////////////////////////////////
*/
/datum/symptom/heal/metabolism
name = "Anti-Bodies Metabolism"
stealth = -1
resistance = -1
stage_speed = -1
transmittable = -4
level = 3
var/list/cured_diseases = list()
/datum/symptom/heal/metabolism/Heal(mob/living/M, datum/disease/advance/A)
var/cured = 0
for(var/thing in M.GetViruses())
var/datum/disease/D = thing
if(D.virus_heal_resistant)
continue
if(D != A)
cured = TRUE
cured_diseases += D.GetDiseaseID()
D.cure()
if(cured)
to_chat(M, span_notice("You feel much better."))
/datum/symptom/heal/metabolism/End(datum/disease/advance/A)
var/mob/living/M = A.affected_mob
if(istype(M))
if(length(cured_diseases))
for(var/res in M.GetResistances())
M.resistances -= res
to_chat(M, span_warning("You feel weaker."))
/*
//////////////////////////////////////
Longevity
Medium hidden boost.
Large resistance boost.
Large stage speed boost.
Large transmittablity boost.
High Level.
Bonus
After a certain amount of time the symptom will cure itself.
//////////////////////////////////////
*/
/datum/symptom/heal/longevity
name = "Longevity"
stealth = 3
resistance = 4
stage_speed = 4
transmittable = 4
level = 3
var/longevity = 30
/datum/symptom/heal/longevity/Heal(mob/living/M, datum/disease/advance/A)
longevity -= 1
if(!longevity)
A.cure()
/datum/symptom/heal/longevity/Start(datum/disease/advance/A)
longevity = rand(initial(longevity) - 5, initial(longevity) + 5)
/*
//////////////////////////////////////
DNA Restoration
Not well hidden.
Lowers resistance minorly.
Does not affect stage speed.
Decreases transmittablity greatly.
Very high level.
Bonus
Heals brain damage, treats radiation.
//////////////////////////////////////
*/
/datum/symptom/heal/dna
name = "Deoxyribonucleic Acid Restoration"
stealth = -1
resistance = -1
stage_speed = 0
transmittable = -3
level = 5
/datum/symptom/heal/dna/Heal(var/mob/living/carbon/M, var/datum/disease/advance/A)
var/amt_healed = (sqrt(20+A.totalStageSpeed()*(3+rand())))-(sqrt(16+A.totalStealth()*rand()))
M.adjustBrainLoss(-amt_healed)
M.radiation = max(M.radiation - 3, 0)
return TRUE
@@ -0,0 +1,33 @@
/*
//////////////////////////////////////
Itching
Not noticable or unnoticable.
Resistant.
Increases stage speed.
Little transmittable.
Low Level.
BONUS
Displays an annoying message!
Should be used for buffing your disease.
//////////////////////////////////////
*/
/datum/symptom/itching
name = "Itching"
stealth = 0
resistance = 3
stage_speed = 3
transmittable = 1
level = 1
severity = 1
/datum/symptom/itching/Activate(var/datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
var/mob/living/M = A.affected_mob
to_chat(M, span_warning("Your [pick("back", "arm", "leg", "elbow", "head")] itches."))
return
@@ -0,0 +1,31 @@
/*
//////////////////////////////////////
Lingual Disocation
Improves stealth.
Increases resistance.
Decreases stage speed.
Slightly decreases transmissibility.
Moderate Level.
Bonus
Forces the affected mob to vomit
//////////////////////////////////////
*/
/datum/symptom/language
name = "Lingual Disocation"
stealth = 3
resistance = 2
stage_speed = -2
transmittable = -1
level = 3
/datum/symptom/language/Activate(var/datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
var/mob/living/carbon/human/H = A.affected_mob
H.apply_default_language(pick(H.languages))
return
@@ -0,0 +1,73 @@
/*
//////////////////////////////////////
Macrophages
Very noticeable.
Lowers resistance slightly.
Decreases stage speed.
Increases transmittablity
Fatal leve.
BONUS
The virus grows and ceases to be microscopic.
//////////////////////////////////////
*/
/datum/symptom/macrophage
name = "Macrophage"
stealth = -4
resistance = -1
stage_speed = -2
transmittable = 2
level = 6
severity = 2
var/gigagerms = FALSE
var/netspeed = 0
var/phagecounter = 10
/datum/symptom/macrophage/Start(datum/disease/advance/A)
netspeed = max(1, A.stage)
if(A.severity >= HARMFUL)
gigagerms = TRUE
/datum/symptom/macrophage/Activate(datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
var/mob/living/M = A.affected_mob
switch(A.stage)
if(1, 2, 3)
to_chat(M, span_notice("Your skin crawls."))
if(4)
M.visible_message(span_danger("Lumps form on [M]'s skin!"), span_userdanger("You cringe in pain as lumps form and move around on your skin!"))
if(5)
phagecounter -= max(2, A.totalStageSpeed())
if(gigagerms && phagecounter <= 0)
Burst(A, M, TRUE)
phagecounter += 10
while(phagecounter <= 0)
phagecounter += 5
Burst(A, M)
/datum/symptom/macrophage/proc/Burst(datum/disease/advance/A, var/mob/living/M, var/gigagerms = FALSE)
var/mob/living/simple_mob/vore/aggressive/macrophage/phage
phage = new(M.loc)
M.apply_damage(rand(1, 7))
phage.viruses = A.Copy()
phage.health += A.totalResistance()
phage.maxHealth += A.totalResistance()
phage.infections += A
phage.base_disease = A
if(A.spread_flags & CONTACT_GENERAL)
for(var/datum/disease/D in M.GetViruses())
if((D.spread_flags & SPECIAL) || (D.spread_flags & NON_CONTAGIOUS))
continue
if(D == A)
continue
phage.viruses += D
M.visible_message(span_danger("A strange crearure bursts out of [M]!"), span_userdanger("A slimy creature bursts forth from your flesh!"))
addtimer(CALLBACK(phage, TYPE_PROC_REF(/mob/living/simple_mob/vore/aggressive/macrophage, dust)), 3000)
@@ -0,0 +1,33 @@
/*
//////////////////////////////////////
Mlemingtong
Not noticable or unnoticable.
Resistant.
Increases stage speed.
Little transmittable.
Low Level.
BONUS
Mlem. Mlem. Mlem.
Should be used for buffing your disease.
//////////////////////////////////////
*/
/datum/symptom/mlem
name = "Mlemington"
stealth = 0
resistance = 3
stage_speed = 3
transmittable = 1
level = 1
severity = 1
/datum/symptom/itching/Activate(var/datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
var/mob/living/M = A.affected_mob
M.emote("mlem")
return
@@ -0,0 +1,31 @@
/*
//////////////////////////////////////
Necrotic Agent
Very Noticable.
Lowers resistance resistance considerably.
Decreases stage speed.
Reduced transmittable.
Critical Level.
Bonus
Makes the disease work on corpses
//////////////////////////////////////
*/
/datum/symptom/necrotic_agent
name = "Necrotic Agent"
stealth = -2
resistance = -3
stage_speed = -3
transmittable = 0
level = 6
severity = 3
/datum/symptom/necrotic_agent/Start(datum/disease/advance/A)
A.allow_dead = TRUE
/datum/symptom/necrotic_agent/End(datum/disease/advance/A)
A.allow_dead = FALSE
@@ -0,0 +1,37 @@
/*
//////////////////////////////////////
Self-Respiration
Slightly hidden.
Lowers resistance significantly.
Decreases stage speed significantly.
Decreases transmittablity tremendously.
Fatal Level.
Bonus
The body generates dexalin.
//////////////////////////////////////
*/
/datum/symptom/oxygen
name = "Self-Respiration"
stealth = 1
resistance = -3
stage_speed = -3
transmittable = -4
level = 6
/datum/symptom/oxygen/Activate(var/datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB * 5))
var/mob/living/M = A.affected_mob
switch(A.stage)
if(4, 5)
if(M.reagents.get_reagent_amount("dexalin") < 10)
M.reagents.add_reagent("dexalin", 10)
else
if(prob(SYMPTOM_ACTIVATION_PROB * 5))
to_chat(M, span_notice(pick("Your lungs feel great.", "You realize you haven't been breathing.", "You don't feel the need to breathe.")))
return
@@ -0,0 +1,63 @@
/*
//////////////////////////////////////
Sensory-Restoration
Very very very very noticable.
Lowers resistance tremendously.
Decreases stage speed tremendously.
Decreases transmittablity tremendously.
Fatal.
Bonus
The body generates Sensory restorational chemicals.
imidazoline for eyes
removes alcohol
removes hallucinogens
alkysine to kickstart the mind
//////////////////////////////////////
*/
/datum/symptom/mind_restoration
name = "Mind Restoration"
stealth = -3
resistance = -4
stage_speed = -4
transmittable = -3
level = 5
severity = 0
/datum/symptom/mind_restoration/Activate(datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB * 3))
var/mob/living/M = A.affected_mob
if(A.stage >= 3)
M.slurring = min(0, M.slurring-4)
M.druggy = min(0, M.druggy-4)
M.reagents.remove_reagent("ethanol", 3)
if(A.stage >= 4)
M.drowsyness = min(0, M.drowsyness-4)
if(M.reagents.has_reagent("bliss"))
M.reagents.del_reagent("bliss")
M.hallucination = min(0, M.hallucination-4)
if(A.stage >= 5)
if(M.reagents.get_reagent_amount("alkysine") < 10)
M.reagents.add_reagent("alkysine", 5)
/datum/symptom/sensory_restoration
name = "Sensory Restoration"
stealth = -1
resistance = -3
stage_speed = -2
transmittable = -4
level = 4
/datum/symptom/sensory_restoration/Activate(datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB * 5))
var/mob/living/M = A.affected_mob
switch(A.stage)
if(4, 5)
if(M.reagents.get_reagent_amount("imidazoline") < 10)
M.reagents.add_reagent("imidazoline", 5)
else
if(prob(SYMPTOM_ACTIVATION_PROB))
to_chat(M, span_notice(pick("Your eyes feel great.","You feel like your eyes can focus more clearly.", "You don't feel the need to blink.")))
@@ -0,0 +1,39 @@
/*
//////////////////////////////////////
Shivering
No change to hidden.
Increases resistance.
Increases stage speed.
Little transmittable.
Low level.
Bonus
Cools down your body.
//////////////////////////////////////
*/
/datum/symptom/shivering
name = "Shivering"
stealth = 0
resistance = 2
stage_speed = 2
transmittable = 2
level = 2
severity = 2
/datum/symptom/shivering/Activate(datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
var/mob/living/carbon/M = A.affected_mob
to_chat(M, span_warning(pick("You feel cold.", "You start shivering.")))
if(M.bodytemperature > BODYTEMP_COLD_DAMAGE_LIMIT)
Chill(M, A)
return
/datum/symptom/shivering/proc/Chill(mob/living/M, datum/disease/advance/A)
var/get_cold = (sqrt(16+A.totalStealth()*2))+(sqrt(21+A.totalResistance()*2))
M.bodytemperature = max(M.bodytemperature - (get_cold * A.stage), BODYTEMP_COLD_DAMAGE_LIMIT + 1)
return 1
@@ -0,0 +1,42 @@
/*
//////////////////////////////////////
Sneezing
Very Noticable.
Increases resistance.
Doesn't increase stage speed.
Very transmittable.
Low Level.
Bonus
Forces a spread type of AIRBORNE
with extra range!
//////////////////////////////////////
*/
/datum/symptom/sneeze
name = "Sneezing"
stealth = -2
resistance = 3
stage_speed = 0
transmittable = 4
level = 1
severity = 1
/datum/symptom/sneeze/Activate(datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
var/mob/living/M = A.affected_mob
switch(A.stage)
if(1, 2, 3)
M.emote("sniff")
else
M.emote("sneeze")
A.spread(5)
if(prob(30))
var/obj/effect/decal/cleanable/mucus/icky = new(get_turf(M))
icky.viruses |= A.Copy()
return
@@ -0,0 +1,40 @@
/*
//////////////////////////////////////
Spyndrome
Slightly hidden.
No change to resistance.
Increases stage speed.
Little transmittable.
Low Level.
BONUS
Makes the host spin.
Should be used for buffing your disease.
//////////////////////////////////////
*/
/datum/symptom/mlem
name = "Spyndrome"
stealth = 2
resistance = 0
stage_speed = 3
transmittable = 1
level = 1
severity = 1
var/list/directions = list(2,4,1,8,2,4,1,8,2,4,1,8,2,4,1,8,2,4,1,8)
/datum/symptom/mlem/Activate(var/datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
if(A.affected_mob.buckled())
to_chat(viewers(A.affected_mob), span_warning("[A.affected_mob.name] struggles violently against their restraints!"))
else
to_chat(viewers(A.affected_mob), span_warning("[A.affected_mob.name] spins around violently!"))
for(var/D in directions)
A.affected_mob.dir = D
A.affected_mob.dir = pick(2,4,1,8)
return
@@ -0,0 +1,36 @@
// Symptoms are the effects that engineered advanced diseases do.
GLOBAL_LIST_INIT(list_symptoms, subtypesof(/datum/symptom))
/datum/symptom
// Buffs/Debuffs the symptom has to the overall engineered disease.
var/name = ""
var/stealth = 0
var/resistance = 0
var/stage_speed = 0
var/transmittable = 0
// The type level of the symptom. Higher is harder to generate.
var/level = 0
// The severity level of the symptom. Higher is more dangerous.
var/severity = 0
// The hash tag for our diseases, we will add it up with our other symptoms to get a unique id! ID MUST BE UNIQUE!!!
var/id = ""
/datum/symptom/New()
var/list/S = GLOB.list_symptoms
for(var/i = 1; i <= length(S); i++)
if(type == S[i])
id = "[i]"
return
CRASH("We couldn't assign an ID!")
// Called when processing of the advance disease, which holds this symptom, starts.
/datum/symptom/proc/Start(datum/disease/advance/A)
return
// Called when the advance disease is going to be deleted or when the advance disease stops processing.
/datum/symptom/proc/End(datum/disease/advance/A)
return
/datum/symptom/proc/Activate(datum/disease/advance/A)
return
@@ -0,0 +1,32 @@
/*
//////////////////////////////////////
Sneezing
Slightly hidden.
Increases resistance.
Doesn't increase stage speed.
Slightly transmittable.
High Level.
Bonus
Allows the disease to infect synthetics
//////////////////////////////////////
*/
/datum/symptom/infect_synthetics
name = "Synthetic Infection"
stealth = 1
resistance = 2
stage_speed = 0
transmittable = 1
level = 5
severity = 3
id = "synthetic_infection"
/datum/symptom/infect_synthetics/Start(datum/disease/advance/A)
A.infect_synthetics = TRUE
/datum/symptom/infect_synthetics/End(datum/disease/advance/A)
A.infect_synthetics = FALSE
@@ -0,0 +1,36 @@
/*
//////////////////////////////////////
Telepathy
Hidden.
Decreases resistance.
Decreases stage speed significantly.
Decreases transmittablity tremendously.
Critical Level.
Bonus
The user gains telepathy.
//////////////////////////////////////
*/
/datum/symptom/telepathy
name = "Pineal Gland Decalcification"
stealth = 2
resistance = -2
stage_speed = -3
transmittable = -4
level = 5
/datum/symptom/telepathy/Start(datum/disease/advance/A)
var/mob/living/carbon/human/H = A.affected_mob
H.dna.SetSEState(REMOTETALKBLOCK, 1)
domutcheck(H, null, TRUE)
to_chat(H, span_notice("Your mind expands..."))
/datum/symptom/telepathy/End(datum/disease/advance/A)
var/mob/living/carbon/human/H = A.affected_mob
H.dna.SetSEState(REMOTETALKBLOCK, 0)
domutcheck(H, null, TRUE)
to_chat(H, span_notice("Everything feels... Normal."))
@@ -0,0 +1,65 @@
/*
//////////////////////////////////////
Viral adaptation
Moderate stealth boost.
Major Increases to resistance.
Reduces stage speed.
No change to transmission
Critical Level.
BONUS
Extremely useful for buffing viruses
//////////////////////////////////////
*/
/datum/symptom/viraladaptation
name = "Viral self-adaptation"
stealth = 3
resistance = 5
stage_speed = -3
transmittable = 0
level = 3
/datum/symptom/viraladaptation/Activate(datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
var/mob/living/M = A.affected_mob
switch(A.stage)
if(1)
to_chat(M, span_notice("You feel off, but no different from before."))
if(5)
to_chat(M, span_notice("You feel better, but nothing interesting happens."))
/*
//////////////////////////////////////
Viral evolution
Moderate stealth reductopn.
Major decreases to resistance.
increases stage speed.
increase to transmission
Critical Level.
BONUS
Extremely useful for buffing viruses
//////////////////////////////////////
*/
/datum/symptom/viralevolution
name = "Viral evolutionary acceleration"
stealth = -2
resistance = -3
stage_speed = 5
transmittable = 3
level = 3
/datum/symptom/viralevolution/Activate(datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
var/mob/living/M = A.affected_mob
switch(A.stage)
if(1)
to_chat(M, span_notice("You feel better, but no different from before."))
if(5)
to_chat(M,span_notice("You feel off, but nothing interesting happens."))
@@ -0,0 +1,50 @@
/*
//////////////////////////////////////
Hyphema (Eye bleeding)
Slightly noticable.
Lowers resistance tremendously.
Decreases stage speed tremendously.
Decreases transmittablity.
Critical Level.
Bonus
Causes blindness.
//////////////////////////////////////
*/
/datum/symptom/visionloss
name = "Hyphema"
stealth = -1
resistance = -4
stage_speed = -4
transmittable = -3
level = 5
severity = 4
/datum/symptom/visionloss/Activate(datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
var/mob/living/carbon/M = A.affected_mob
var/obj/item/organ/internal/eyes/eyes = M.internal_organs_by_name[O_EYES]
if(!eyes)
return
switch(A.stage)
if(1, 2)
to_chat(M, span_warning("Your eyes itch."))
if(3, 4)
to_chat(M, span_boldwarning("Your eyes burn!"))
M.eye_blurry = 20
eyes.take_damage(1)
else
to_chat(M, span_userdanger("Your eyes burn horrificly!"))
M.eye_blurry = 40
eyes.take_damage(5)
if(eyes.damage >= 10)
M.disabilities |= NEARSIGHTED
if(prob(eyes.damage - 10 + 1))
if(!M.eye_blind)
to_chat(M, span_userdanger("You go blind!"))
M.Blind(20)
@@ -0,0 +1,34 @@
/*
//////////////////////////////////////
Vomiting
Noticeable.
No change to resistance.
Slightly increases stage speed.
Increases transmissibility.
Medium Level.
Bonus
Forces the affected mob to vomit
//////////////////////////////////////
*/
/datum/symptom/vomit
name = "Vomiting"
stealth = -2
resistance = 0
stage_speed = 1
transmittable = 2
level = 3
severity = 1
/datum/symptom/vomit/Activate(datum/disease/advance/A)
if(!..())
return
var/mob/living/M = A.affected_mob
if(prob(2))
to_chat(M, span_warning(pick("you feel nauseated.", "You feel like you're going to throw up!")))
if(prob(SYMPTOM_ACTIVATION_PROB))
M.vomit()
@@ -0,0 +1,43 @@
/*
//////////////////////////////////////
Weakness
Slightly noticeable.
Lowers resistance slightly.
Decreases stage speed moderately.
Decreases transmittablity moderately.
Moderate Level.
Bonus
Weakens the host
//////////////////////////////////////
*/
/datum/symptom/weakness
name = "Weakness"
stealth = -1
resistance = -1
stage_speed = -2
transmittable = -2
level = 3
severity = 3
/datum/symptom/weakness/Activate(datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
var/mob/living/M = A.affected_mob
switch(A.stage)
if(1, 2)
to_chat(M, span_warning(pick("You feel weak.", "You feel lazy.")))
if(3, 4)
to_chat(M, span_boldwarning(pick("You feel very frail.", "You think you might faint.")))
M.Weaken(10)
else
to_chat(M, span_userdanger(pick("You feel tremendously weak!", "Your body trembles as exhaustion creeps over you.")))
M.Weaken(20)
if(M.weakened > 60 && !M.stat)
M.visible_message(span_warning("[M] faints!"), span_userdanger("You swoon and faint..."))
M.AdjustSleeping(10)
return
@@ -0,0 +1,37 @@
/*
//////////////////////////////////////
Weight Loss
Very Very Noticable.
Decreases resistance.
Decreases stage speed.
Reduced Transmittable.
High level.
Bonus
Decreases the weight of the mob,
forcing it to be skinny.
//////////////////////////////////////
*/
/datum/symptom/weight_loss
name = "Weight Loss"
stealth = -3
resistance = -2
stage_speed = -2
transmittable = -2
level = 3
severity = 1
/datum/symptom/weight_loss/Activate(datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
var/mob/living/M = A.affected_mob
switch(A.stage)
if(1, 2, 3, 4)
to_chat(M, span_warning(pick("You feel hungry.", "You crave for food.")))
else
to_chat(M, span_warning(pick("So hungry...", "You'd kill someone for a bite of food...", "Hunger cramps seize you...")))
M.adjust_nutrition(-20)
+53
View File
@@ -0,0 +1,53 @@
/datum/disease/anxiety
name = "Severe Anxiety"
form = "Infection"
max_stages = 4
spread_text = "On contact"
spread_flags = CONTACT_GENERAL
cure_text = "Ethanol"
cures = list("ethanol")
agent = "Excess Lepdopticides"
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/human/monkey)
desc = "If left untreated subject will regurgitate butterflies."
severity = MINOR
/datum/disease/anxiety/stage_act()
if(!..())
return FALSE
switch(stage)
if(2)
if(prob(15))
to_chat(affected_mob, span_notice("You feel anxious."))
if(3)
if(prob(10))
to_chat(affected_mob, span_notice("Your stomach flutters."))
if(prob(5))
to_chat(affected_mob, span_notice("You feel panicky."))
if(prob(2))
to_chat(affected_mob, span_danger("You're overtaken with panic!"))
affected_mob.AdjustConfused(rand(4, 6))
if(4)
if(prob(10))
to_chat(affected_mob, span_danger("You feel butterflies in your stomach."))
if(prob(5))
affected_mob.visible_message(
span_danger("[affected_mob] stumbles around in a panic"),
span_userdanger("You have a panic attack!")
)
affected_mob.AdjustConfused(rand(12, 16))
affected_mob.jitteriness = rand(12, 16)
if(prob(2))
affected_mob.visible_message(
span_danger("[affected_mob] coughs up butterflies!"),
span_userdanger("You cough up butterflies!")
)
affected_mob.emote("cough")
for(var/i in 1 to 2)
var/mob/living/simple_mob/animal/sif/glitterfly/B = new(affected_mob.loc)
addtimer(CALLBACK(B, TYPE_PROC_REF(/mob/living/simple_mob/animal/sif/glitterfly, decompose)), rand(5, 25) SECONDS)
/mob/living/simple_mob/animal/sif/glitterfly/proc/decompose()
visible_message(
span_notice("[src] decomposes due to being outside of its original habitat for too long!"),
span_userdanger("You decompose for being too long out of your habitat!"))
dust()
+36
View File
@@ -0,0 +1,36 @@
/datum/disease/beesease
name = "Beesease"
form = "Infection"
max_stages = 4
spread_text = "On contact"
spread_flags = CONTACT_GENERAL
cure_text = "Sugar"
cures = list("sugar")
agent = "Apidae Infection"
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/human/monkey)
desc = "If left untreated, subject will regurgitate bees."
severity = BIOHAZARD
/datum/disease/beesease/stage_act()
if(!..())
return FALSE
switch(stage)
if(2)
if(prob(2))
to_chat(affected_mob, span_notice("You tastey hone in your mouth."))
if(3)
if(prob(10))
to_chat(affected_mob, span_notice("Your stomach rumbles"))
if(prob(2))
to_chat(affected_mob, span_notice("Your stomach stings painfully."))
if(prob(20))
affected_mob.adjustToxLoss(2)
if(4)
if(prob(10))
affected_mob.visible_message(span_danger("[affected_mob] buzzles loudly"), span_userdanger("Your stomach buzzles violently!"))
if(prob(5))
to_chat(affected_mob, span_danger("You feel something moving in your throat."))
if(prob(1))
affected_mob.visible_message(span_danger("[affected_mob] coughs up a swarm of bees!"), span_userdanger("You cough up a swarm of bees!"))
new /mob/living/simple_mob/vore/bee(affected_mob.loc)
return
+43
View File
@@ -0,0 +1,43 @@
/datum/disease/brainrot
name = "Brainrot"
max_stages = 4
spread_text = "On contact"
spread_flags = CONTACT_GENERAL
cure_text = "Alkysine"
cures = list("alkysine")
agent = "Cryptococcus Cosmosis"
viable_mobtypes = list(/mob/living/carbon/human)
cure_chance = 15
desc = "This disease destroys the braincells, causing brain fever, brain necrosis and general intoxication."
required_organs = list(/obj/item/organ/internal/brain)
severity = HARMFUL
/datum/disease/brainrot/stage_act()
if(!..())
return FALSE
switch(stage)
if(2)
if(prob(2))
affected_mob.say("*blink")
if(prob(2))
affected_mob.say("*yawn")
if(prob(2))
to_chat(affected_mob, span_danger("You don't feel like yourself."))
if(prob(5))
affected_mob.adjustBrainLoss(1)
if(3)
if(prob(2))
affected_mob.say("*stare")
if(prob(3))
affected_mob.say("*drool")
if(prob(10) && affected_mob.getBrainLoss() < 100)
affected_mob.adjustBrainLoss(3)
if(prob(2))
to_chat(affected_mob, span_danger("Strange buzzing fills your head, removing all thoughts."))
if(prob(3))
to_chat(affected_mob, span_danger("You lose consciousness..."))
affected_mob.Sleeping(rand(5, 10))
if(prob(1))
affected_mob.emote("snore")
if(prob(15))
affected_mob.apply_effect(5, STUTTER)
+38
View File
@@ -0,0 +1,38 @@
/datum/disease/choreomania
name = "Choreomania"
max_stages = 3
spread_text = "Airborne"
cure_text = "Adranol"
cures = list("adranol")
cure_chance = 10
agent = "TAP-DAnC3"
viable_mobtypes = list(/mob/living/carbon/human)
permeability_mod = 0.75
desc = "If left untreated the subject... Won't stop dancing!"
severity = MINOR
var/list/dance = list(2,4,8,2,4,8,2,4,8,2,4,8,1,4,1,4,1,4,2,4,8,2)
/datum/disease/choreomania/stage_act()
if(!..())
return FALSE
switch(stage)
if(2)
if(prob(1))
to_chat(affected_mob, span_notice("You feel like dancing like a maniac, maniac..."))
if(prob(1))
affected_mob.emote("whistle")
if(3)
if(prob(1))
to_chat(affected_mob, span_notice("You feel like dancing like a maniac, maniac..."))
if(prob(1))
to_chat(affected_mob, span_notice("You really want to start a conga line!"))
if(prob(2))
for(var/D in dance)
affected_mob.dir = D
animate(affected_mob, pixel_x = 5, time = 5)
sleep(3)
animate(affected_mob, pixel_x = -5, time = 5)
animate(pixel_x = affected_mob.default_pixel_x, pixel_y = affected_mob.default_pixel_x, time = 2)
sleep(3)
return
+64
View File
@@ -0,0 +1,64 @@
/datum/disease/cold
name = "The Cold"
max_stages = 3
spread_text = "Airborne"
spread_flags = AIRBORNE
cure_text = "Rest & Spaceacilin"
cures = list("spaceacilin")
agent = "XY-rhinovirus"
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/human/monkey)
permeability_mod = 0.5
desc = "If left untreated the subject will contract the flu."
severity = MINOR
/datum/disease/cold/stage_act()
if(!..())
return FALSE
switch(stage)
if(2)
if(affected_mob.stat == UNCONSCIOUS && prob(40))
to_chat(affected_mob, span_notice("You feel better."))
cure()
return
if(affected_mob.lying && prob(10))
to_chat(affected_mob, span_notice("You feel better."))
cure()
return
if(prob(1) && prob(5))
to_chat(affected_mob, span_notice("You feel better."))
cure()
return
if(prob(1))
affected_mob.emote("sneeze")
if(prob(1))
affected_mob.emote("cough")
if(prob(1))
to_chat(affected_mob, span_notice("Your throat feels sore."))
if(prob(1))
to_chat(affected_mob, span_notice("Mucous runs down the back of your throat."))
if(3)
if(affected_mob.stat == UNCONSCIOUS && prob(25))
to_chat(affected_mob, span_notice("You feel better."))
cure()
return
if(affected_mob.lying && prob(5))
to_chat(affected_mob, span_notice("You feel better."))
cure()
return
if(prob(1) && prob(1))
to_chat(affected_mob, span_notice("You feel better."))
cure()
return
if(prob(1))
affected_mob.emote("sneeze")
if(prob(1))
affected_mob.emote("cough")
if(prob(1))
to_chat(affected_mob, span_notice("Your throat feels sore."))
if(prob(1))
to_chat(affected_mob, span_notice("Mucous runs down the back of your throat."))
if(prob(1) && prob(50))
if(!affected_mob.resistances.Find(/datum/disease/flu))
var/datum/disease/Flu = new /datum/disease/flu(0)
affected_mob.ContractDisease(Flu)
cure()
+30
View File
@@ -0,0 +1,30 @@
/datum/disease/cold9
name = "The Cold"
medical_name = "ICE9 Cold"
max_stages = 3
spread_text = "On contact"
spread_flags = CONTACT_GENERAL
cure_text = "Spaceacillin"
cures = list("spaceacillin")
agent = "ICE9-rhinovirus"
viable_mobtypes = list(/mob/living/carbon/human)
desc = "If left untreated the subject will slow, as if partly frozen."
severity = HARMFUL
/datum/disease/cold9/stage_act()
if(!..())
return FALSE
if(stage < 2)
return
var/stage_factor = stage - 1
affected_mob.bodytemperature -= 7.5 * stage_factor
if(prob(2 * stage_factor))
affected_mob.say("*sneeze")
if(prob(2 * stage_factor))
affected_mob.say("*cough")
if(prob(3 * stage_factor))
to_chat(affected_mob, span_danger("Your throat feels sore."))
if(prob(5 * stage_factor))
to_chat(affected_mob, span_danger("You feel stiff."))
affected_mob.adjustFireLoss(1)
+10
View File
@@ -0,0 +1,10 @@
/datum/disease/darkness
name = "Dark Exposure"
form = "Bluespace Micro-fissures"
max_stages = 4
spread = NON_CONTAGIOUS
cure_text = "Exposure to light and the real world"
agent = "Bluespace Exposure"
viable_mobtypes = list(/mob/living/carbon/human)
desc = "If left untreated, subject will lose grip on reality."
severity = HARMFUL
+50
View File
@@ -0,0 +1,50 @@
/datum/disease/flu
name = "The Flu"
max_stages = 3
spread_text = "Airborne"
cure_text = "Spaceacilin"
cures = list("spaceacilin")
cure_chance = 10
agent = "H13N1 flu virion"
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/human/monkey)
permeability_mod = 0.75
desc = "If left untreated the subject will feel quite unwell."
severity = MINOR
/datum/disease/flu/stage_act()
if(!..())
return FALSE
switch(stage)
if(2)
if(affected_mob.lying && prob(20))
to_chat(affected_mob, span_notice("You feel better."))
stage--
return
if(prob(1))
affected_mob.emote("sneeze")
if(prob(1))
affected_mob.emote("cough")
if(prob(1))
to_chat(affected_mob, span_danger("Your muscles ache."))
if(prob(20))
affected_mob.apply_damage(1)
if(prob(1))
to_chat(affected_mob, span_danger("Your stomach hurts."))
affected_mob.adjustToxLoss(1)
if(3)
if(affected_mob.lying && prob(15))
to_chat(affected_mob, span_notice("You feel better."))
stage--
return
if(prob(1))
affected_mob.emote("sneeze")
if(prob(1))
affected_mob.emote("cough")
if(prob(1))
to_chat(affected_mob, span_danger("Your muscles ache."))
if(prob(20))
affected_mob.apply_damage(1)
if(prob(1))
to_chat(affected_mob, span_danger("Your stomach hurts."))
affected_mob.adjustToxLoss(1)
return
+67
View File
@@ -0,0 +1,67 @@
/datum/disease/food_poisoning
name = "Food Poisoning"
max_stages = 3
stage_prob = 5
spread_text = "Non-Contagious"
spread_flags = NON_CONTAGIOUS
cure_text = "Sleep"
agent = "Salmonella"
cures = list("chicken_soup")
cure_chance = 10
viable_mobtypes = list(/mob/living/carbon/human)
desc = "Nausea, sickness, and vomitting."
severity = MINOR
disease_flags = CURABLE
virus_heal_resistant = TRUE
/datum/disease/food_poisoning/stage_act()
if(!..())
return FALSE
if(affected_mob.stat == UNCONSCIOUS && prob(33))
to_chat(affected_mob, span_notice("You feel better."))
cure()
return
switch(stage)
if(1)
if(prob(5))
to_chat(affected_mob, span_danger("Your stomach feels weird."))
if(prob(5))
to_chat(affected_mob, span_danger("You feel queasy."))
if(2)
if(affected_mob.stat == UNCONSCIOUS && prob(40))
to_chat(affected_mob, span_notice("You feel better."))
cure()
return
if(prob(1) && prob(10))
to_chat(affected_mob, span_notice("You feel better."))
if(prob(10))
affected_mob.emote("groan")
if(prob(5))
to_chat(affected_mob, span_danger("Your stomach aches."))
if(prob(5))
to_chat(affected_mob, span_danger("You feel nauseous"))
if(3)
if(affected_mob.stat == UNCONSCIOUS && prob(25))
to_chat(affected_mob, span_notice("You feel better."))
cure()
return
if(prob(1) && prob(10))
to_chat(affected_mob, span_notice("You feel better."))
cure()
return
if(prob(10))
affected_mob.emote("moan")
if(prob(10))
affected_mob.emote("groan")
if(prob(1))
to_chat(affected_mob, span_danger("Your stomach hurts."))
if(prob(1))
to_chat(affected_mob, span_danger("You feel sick."))
if(prob(5))
if(affected_mob.nutrition > 10)
affected_mob.emote("vomit")
else
to_chat(affected_mob, span_danger("Your stomach lurches painfully"))
affected_mob.visible_message(span_danger("[affected_mob] gags and retches!"))
affected_mob.Stun(rand(4, 8))
affected_mob.Weaken(rand(4, 8))
+64
View File
@@ -0,0 +1,64 @@
/datum/disease/lycan
name = "Lycancoughy"
form = "Infection"
max_stages = 4
spread_text = "On contact"
spread_flags = CONTACT_GENERAL
cure_text = "Ethanol"
cures = list("ethanol")
agent = "Excess Snuggles"
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/human/monkey)
desc = "If left untreated subject will regurgitate... puppies."
severity = HARMFUL
var/barklimit
var/list/puppy_types = list(/mob/living/simple_mob/animal/passive/dog/corgi/puppy)
var/list/plush_types = list(/obj/item/toy/plushie/orange_fox, /obj/item/toy/plushie/corgi, /obj/item/toy/plushie/robo_corgi, /obj/item/toy/plushie/pink_fox)
/datum/disease/lycan/stage_act()
if(!..())
return FALSE
var/mob/living/carbon/human/H = affected_mob
switch(stage)
if(2)
if(prob(2))
H.emote("cough")
if(prob(3))
to_chat(H, span_notice("You itch."))
H.adjustBruteLoss(rand(4, 6))
if(3)
var/obj/item/organ/external/stomach = H.organs_by_name[pick("torso", "groin")]
if(prob(3))
H.emote("cough")
stomach.take_damage(BRUTE, rand(0, 5))
if(prob(3))
to_chat(H, span_notice("You hear a faint barking."))
stomach.take_damage(BRUTE, rand(4, 6))
if(prob(2))
to_chat(H, span_notice("You crave meat."))
if(prob(3))
to_chat(H, span_danger("Your stomach growls!"))
stomach.take_damage(BRUTE, rand(5, 10))
if(4)
var/obj/item/organ/external/stomach = H.organs_by_name[pick("torso", "groin")]
if(prob(5))
H.emote("cough")
stomach.take_damage(BRUTE, rand(0, 5))
if(prob(5))
H.emote("awoo2")
H.Confuse(rand(12, 16))
stomach.take_damage(rand(0, 5))
if(prob(5))
if(!barklimit)
to_chat(H, span_danger("Your stomach growls!"))
stomach.take_damage(BRUTE, rand(5, 10))
else
var/atom/hairball = pick(prob(50) ? puppy_types : plush_types)
H.visible_message(span_danger("[H] coughs up \a [initial(hairball.name)]!"), span_userdanger("You cough up \a [initial(hairball.name)]?!"))
H.emote("cough")
new hairball(H.loc)
barklimit--
stomach.take_damage(BRUTE, rand(10, 15))
+63
View File
@@ -0,0 +1,63 @@
/datum/disease/magnitis
name = "Magnitis"
max_stages = 4
spread_text = "Airbone"
cure_text = "Iron"
cures = list("iron")
agent = "Fukkos Miracos"
viable_mobtypes = list(/mob/living/carbon/human)
permeability_mod = 0.75
desc = "This disease disrupts the magnetic field of your body, making it act as if a powerful magnet. Injections of iron help stabilize the field."
severity = MINOR
/datum/disease/magnitis/stage_act()
if(!..())
return FALSE
switch(stage)
if(2)
if(prob(2))
to_chat(affected_mob, span_danger("You feel a slight shock course through your body."))
if(prob(2))
for(var/obj/M in orange(2, affected_mob))
if(!M.anchored && prob(5))
INVOKE_ASYNC(M, TYPE_PROC_REF(/atom/movable, throw_at), affected_mob, rand(3, 10), rand(1, 3), src)
for(var/mob/living/silicon/S in orange(2, affected_mob))
if(isAI(S)) continue
INVOKE_ASYNC(S, TYPE_PROC_REF(/atom/movable, throw_at), affected_mob, rand(3, 10), rand(1, 3), src)
if(3)
if(prob(2))
to_chat(affected_mob, span_danger("You feel a strong shock course through your body."))
if(prob(2))
to_chat(affected_mob, span_danger("You feel like clowning aound."))
if(prob(4))
for(var/obj/M in orange(4, affected_mob))
if(!M.anchored && prob(5))
var/i
var/iter = rand(1,2)
for(i=0,i<iter,i++)
INVOKE_ASYNC(M, TYPE_PROC_REF(/atom/movable, throw_at), affected_mob, rand(3, 10), rand(1, 3), src)
for(var/mob/living/silicon/S in orange(4, affected_mob))
if(isAI(S)) continue
var/i
var/iter = rand(1,2)
for(i=0,i<iter,i++)
INVOKE_ASYNC(S, TYPE_PROC_REF(/atom/movable, throw_at), affected_mob, rand(3, 10), rand(1, 3), src)
if(4)
if(prob(2))
to_chat(affected_mob, span_danger("You feel a powerful shock course through your body."))
if(prob(2))
to_chat(affected_mob, span_danger("You query upon the nature of miracles"))
if(prob(8))
for(var/obj/M in orange(6, affected_mob))
if(!M.anchored && prob(5))
var/i
var/iter = rand(1,3)
for(i=0,i<iter,i++)
INVOKE_ASYNC(M, TYPE_PROC_REF(/atom/movable, throw_at), affected_mob, rand(3, 10), rand(1, 3), src)
for(var/mob/living/silicon/S in orange(6, affected_mob))
if(isAI(S)) continue
var/i
var/iter = rand(1,3)
for(i=0,i<iter,i++)
INVOKE_ASYNC(S, TYPE_PROC_REF(/atom/movable, throw_at), affected_mob, rand(3, 10), rand(1, 3), src)
return
+90
View File
@@ -0,0 +1,90 @@
/datum/disease/roanoake
name = "Roanoake Syndrome"
max_stages = 6
stage_prob = 2
spread_text = "Blood and close contact"
spread_flags = BLOOD
cure_text = "Spaceacilin"
agent = "Chimera cells"
cures = list("spaceacilin")
cure_chance = 10
viable_mobtypes = list(/mob/living/carbon/human)
desc = "If left untreated, subject will become a xenochimera upon perishing."
severity = BIOHAZARD
disease_flags = CURABLE
virus_heal_resistant = TRUE
allow_dead = TRUE
var/list/obj/item/organ/organ_list = list()
var/obj/item/organ/O
/datum/disease/roanoake/Start
var/mob/living/carbon/human/M = affected_mob
organ_list += M.organs
organ_list += M.internal_organs
/datum/disease/roanoake/stage_act()
if(!..())
return FALSE
var/mob/living/carbon/human/M = affected_mob
switch(stage)
if(2)
if(prob(1))
to_chat(M, span_notice("You feel a slight shiver through your spine..."))
if(prob(1))
to_chat(M, span_warning(pick("You feel hot.", "You feel like you're burning.")))
if(M.bodytemperature < BODYTEMP_HEAT_DAMAGE_LIMIT)
if(3)
if(prob(1))
to_chat(M, span_notice("You shiver a bit."))
if(prob(1))
to_chat(M, span_warning(pick("You feel hot.", "You feel like you're burning.")))
if(M.bodytemperature < BODYTEMP_HEAT_DAMAGE_LIMIT)
fever(M)
if(prob(1))
O = pick(organ_list)
O.adjust_germ_level(rand(5, 10))
if(4)
if(prob(1))
to_chat(M, span_warning(pick("You feel hot.", "You feel like you're burning.")))
if(M.bodytemperature < BODYTEMP_HEAT_DAMAGE_LIMIT)
fever(M)
if(prob(2))
O = pick(organ_list)
O.adjust_germ_level(rand(5, 10))
if(5)
if(prob(1))
to_chat(M, span_warning(pick("You feel hot.", "You feel like you're burning.")))
if(M.bodytemperature < BODYTEMP_HEAT_DAMAGE_LIMIT)
fever(M)
if(prob(2))
O = pick(organ_list)
O.adjust_germ_level(rand(5, 10))
if(prob(1))
O.take_damage(rand(1, 3))
if(6)
if(prob(1))
to_chat(M, span_warning(pick("You feel hot.", "You feel like you're burning.")))
if(M.bodytemperature < BODYTEMP_HEAT_DAMAGE_LIMIT)
fever(M)
if(prob(2))
O = pick(organ_list)
O.adjust_germ_level(rand(5, 10))
if(prob(2))
O.take_damage(rand(1, 3))
if(prob(1) && prob(10))
var/datum/wound/W = new /datum/wound/internal_bleeding(5)
O.wounds += W
if(M.stat == DEAD)
M.species = /datum/species/xenochimera
cure()
return
/datum/disease/roanoake/proc/fever(var/mob/living/M, var/datum/disease/D)
M.bodytemperature = min(M.bodytemperature + (2 * stage), BODYTEMP_HEAT_DAMAGE_LIMIT - 1)
return TRUE
+6 -6
View File
@@ -329,11 +329,11 @@
access = access_medical_equip
/datum/supply_pack/med/virus
name = "Virus sample crate"
contains = list(/obj/item/virusdish/random = 4)
name = "Virus culture crate"
contains = list(/obj/item/reagent_containers/glass/bottle/culture/cold = 1, /obj/item/reagent_containers/glass/bottle/culture/flu = 1)
cost = 25
containertype = /obj/structure/closet/crate/secure/zenghu
containername = "Virus sample crate"
containername = "Virus culture crate"
access = access_cmo
/datum/supply_pack/med/defib
@@ -410,11 +410,11 @@
access = access_medical_equip
/datum/supply_pack/med/virus
name = "Virus sample crate"
contains = list(/obj/item/virusdish/random = 4)
name = "Virus culture crate"
contains = list(/obj/item/reagent_containers/glass/bottle/culture/cold = 1, /obj/item/reagent_containers/glass/bottle/culture/flu = 1)
cost = 25
containertype = /obj/structure/closet/crate/secure
containername = "Virus sample crate"
containername = "Virus culture crate"
access = access_medical_equip
+3 -1
View File
@@ -478,7 +478,9 @@
/atom/proc/add_vomit_floor(mob/living/carbon/M as mob, var/toxvomit = 0)
if( istype(src, /turf/simulated) )
var/obj/effect/decal/cleanable/vomit/this = new /obj/effect/decal/cleanable/vomit(src)
this.virus2 = virus_copylist(M.virus2)
for(var/datum/disease/D in M.GetViruses())
this.viruses |= D.Copy()
// Make toxins vomit look different
if(toxvomit)
+7 -3
View File
@@ -189,7 +189,7 @@
occupantData["health"] = H.health
occupantData["maxHealth"] = H.getMaxHealth()
occupantData["hasVirus"] = H.virus2.len
occupantData["hasVirus"] = H.viruses.len
occupantData["bruteLoss"] = H.getBruteLoss()
occupantData["oxyLoss"] = H.getOxyLoss()
@@ -379,8 +379,12 @@
dat += (occupant.health > (occupant.getMaxHealth() / 2) ? span_blue(health_text) : span_red(health_text))
dat += "<br>"
if(occupant.virus2.len)
dat += span_red("Viral pathogen detected in blood stream.") + "<BR>"
if(occupant.viruses.len)
for(var/datum/disease/D in occupant.GetViruses())
if(D.visibility_flags & HIDDEN_SCANNER)
continue
else
dat += span_red("Viral pathogen detected in blood stream.") + "<BR>"
var/damage_string = null
damage_string = "\t-Brute Damage %: [occupant.getBruteLoss()]"
+4 -2
View File
@@ -172,8 +172,10 @@
medical["empty"] = 1
if(MED_DATA_V_DATA)
data["virus"] = list()
for(var/ID in virusDB)
var/datum/data/record/v = virusDB[ID]
for(var/datum/disease/D in active_diseases)
if(!D.discovered)
continue
var/datum/data/record/v = active_diseases[D]
data["virus"] += list(list("name" = v.fields["name"], "D" = "\ref[v]"))
if(MED_DATA_MEDBOT)
data["medbots"] = list()
+377
View File
@@ -0,0 +1,377 @@
/obj/machinery/computer/pandemic
name = "PanD.E.M.I.C 2200"
desc = "Used to work with viruses."
density = TRUE
anchored = TRUE
icon = 'icons/obj/pandemic.dmi'
icon_state = "pandemic0"
var/temp_html = ""
var/printing = null
var/wait = null
var/selected_strain_index = 1
var/obj/item/reagent_containers/beaker = null
/obj/machinery/computer/pandemic/Initialize(mapload)
. = ..()
update_icon()
/obj/machinery/computer/pandemic/set_broken()
stat |= BROKEN
update_icon()
/obj/machinery/computer/pandemic/proc/GetViruses()
if(beaker && beaker.reagents)
if(length(beaker.reagents.reagent_list))
var/datum/reagent/blood/BL = locate() in beaker.reagents.reagent_list
if(BL)
if(BL.data && BL.data["viruses"])
var/list/viruses = BL.data["viruses"]
return viruses
/obj/machinery/computer/pandemic/proc/GetVirusByIndex(index)
var/list/viruses = GetViruses()
if(viruses && index > 0 && index <= length(viruses))
return viruses[index]
/obj/machinery/computer/pandemic/proc/GetResistances()
if(beaker && beaker.reagents)
if(length(beaker.reagents.reagent_list))
var/datum/reagent/blood/BL = locate() in beaker.reagents.reagent_list
if(BL)
if(BL.data && BL.data["resistances"])
var/list/resistances = BL.data["resistances"]
return resistances
/obj/machinery/computer/pandemic/proc/GetResistancesByIndex(index)
var/list/resistances = GetResistances()
if(resistances && index > 0 && index <= length(resistances))
return resistances[index]
/obj/machinery/computer/pandemic/proc/GetVirusTypeByIndex(index)
var/datum/disease/D = GetVirusByIndex(index)
if(D)
return D.GetDiseaseID()
/obj/machinery/computer/pandemic/proc/replicator_cooldown(waittime)
wait = 1
update_icon()
spawn(waittime)
wait = null
update_icon()
playsound(loc, 'sound/machines/ping.ogg', 30, 1)
/obj/machinery/computer/pandemic/update_icon()
if(stat & BROKEN)
icon_state = (beaker ? "pandemic1_b" : "pandemic0_b")
return
icon_state = "pandemic[(beaker)?"1":"0"][!(stat & NOPOWER) ? "" : "_nopower"]"
/obj/machinery/computer/pandemic/proc/create_culture(name, bottle_type = "culture", cooldown = 50)
var/obj/item/reagent_containers/glass/bottle/B = new/obj/item/reagent_containers/glass/bottle(loc)
B.icon_state = "bottle10"
B.pixel_x = rand(-3, 3)
B.pixel_y = rand(-3, 3)
replicator_cooldown(cooldown)
B.name = "[name] [bottle_type] bottle"
return B
/obj/machinery/computer/pandemic/tgui_act(action, params, datum/tgui/ui, datum/tgui_state/state)
if(..())
return
if(inoperable())
return
. = TRUE
switch(action)
if("clone_strain")
if(wait)
atom_say("The replicator is not ready yet.")
return
var/strain_index = text2num(params["strain_index"])
if(isnull(strain_index))
atom_say("Unable to respond to command.")
return
var/datum/disease/virus = GetVirusByIndex(strain_index)
var/datum/disease/D = null
if(!virus)
atom_say("Unable to find requested strain.")
return
var/type = virus.GetDiseaseID()
if(!ispath(type))
var/datum/disease/advance/A = GLOB.archive_diseases[type]
if(A)
D = new A.type(0, A)
else if(type)
if(type in GLOB.diseases) // Make sure this is a disease
D = new type(0, null)
if(!D)
atom_say("Unable to synthesize requested strain.")
return
var/default_name = ""
if(D.name == "Unknown" || D.name == "")
default_name = replacetext(beaker.name, new/regex(" culture bottle\\Z", "g"), "")
else
default_name = D.name
var/name = tgui_input_text(usr, "Name:", "Name the culture", default_name, MAX_NAME_LEN)
if(name == null || wait)
return
var/obj/item/reagent_containers/glass/bottle/B = create_culture(name)
B.desc = "A small bottle. Contains [D.agent] culture in synthblood medium."
B.reagents.add_reagent("blood", 20, list("viruses" = list(D)))
if("clone_vaccine")
if(wait)
atom_say("The replicator is not ready yet.")
return
var/resistance_index = text2num(params["resistance_index"])
if(isnull(resistance_index))
atom_say("Unable to find requested antibody.")
return
var/vaccine_type = GetResistancesByIndex(resistance_index)
var/vaccine_name = "Unknown"
if(!ispath(vaccine_type))
if(GLOB.archive_diseases[vaccine_type])
var/datum/disease/D = GLOB.archive_diseases[vaccine_type]
if(D)
vaccine_name = D.name
else if(vaccine_type)
var/datum/disease/D = new vaccine_type(0, null)
if(D)
vaccine_name = D.name
if(!vaccine_type)
atom_say("Unable to synthesize requested antibody.")
return
var/obj/item/reagent_containers/glass/bottle/B = create_culture(vaccine_name, "vaccine", 200)
B.reagents.add_reagent("vaccine", 15, list(vaccine_type))
if("eject_beaker")
eject_beaker()
update_tgui_static_data(ui.user)
if("destroy_eject_beaker")
beaker.reagents.clear_reagents()
eject_beaker()
update_tgui_static_data(ui.user)
if("print_release_forms")
var/strain_index = text2num(params["strain_index"])
if(isnull(strain_index))
atom_say("Unable to respond to command.")
return
var/type = GetVirusTypeByIndex(strain_index)
if(!type)
atom_say("Unable to find requested strain.")
return
var/datum/disease/advance/A = GLOB.archive_diseases[type]
if(!A)
atom_say("Unable to find requested strain.")
return
print_form(A, usr)
if("name_strain")
var/strain_index = text2num(params["strain_index"])
if(isnull(strain_index))
atom_say("Unable to respond to command.")
return
var/type = GetVirusTypeByIndex(strain_index)
if(!type)
atom_say("Unable to find requested strain.")
return
var/datum/disease/advance/A = GLOB.archive_diseases[type]
if(!A)
atom_say("Unable to find requested strain.")
return
if(A.name != "Unknown")
atom_say("Request rejected. Strain already has a name.")
return
var/new_name = tgui_input_text(usr, "Name the Strain", "New Name", max_length = MAX_NAME_LEN)
if(!new_name)
return
A.AssignName(new_name)
for(var/datum/disease/advance/AD in active_diseases)
AD.Refresh()
update_tgui_static_data(ui.user)
if("switch_strain")
var/strain_index = text2num(params["strain_index"])
if(isnull(strain_index) || strain_index < 1)
atom_say("Unable to respond to command.")
return
var/list/viruses = GetViruses()
if(strain_index > length(viruses))
atom_say("Unable to find requested strain.")
return
selected_strain_index = strain_index;
else
return FALSE
/obj/machinery/computer/pandemic/tgui_state(mob/user)
return GLOB.tgui_default_state
/obj/machinery/computer/pandemic/tgui_interact(mob/user, datum/tgui/ui, datum/tgui/parent_ui = null)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "PanDEMIC", name)
ui.open()
/obj/machinery/computer/pandemic/tgui_data(mob/user)
var/datum/reagent/blood/Blood = null
if(beaker)
var/datum/reagents/R = beaker.reagents
for(var/datum/reagent/blood/B in R.reagent_list)
if(B)
Blood = B
break
var/list/data = list(
"synthesisCooldown" = wait ? TRUE : FALSE,
"beakerLoaded" = beaker ? TRUE : FALSE,
"beakerContainsBlood" = Blood ? TRUE : FALSE,
"beakerContainsVirus" = length(Blood?.data["viruses"]) != 0,
"selectedStrainIndex" = selected_strain_index,
)
return data
/obj/machinery/computer/pandemic/tgui_static_data(mob/user)
var/list/data = list()
. = data
var/datum/reagent/blood/Blood = null
if(beaker)
var/datum/reagents/R = beaker.reagents
for(var/datum/reagent/blood/B in R.reagent_list)
if(B)
Blood = B
break
var/list/strains = list()
for(var/datum/disease/D in GetViruses())
if(D.visibility_flags & HIDDEN_PANDEMIC)
continue
var/list/symptoms = list()
if(istype(D, /datum/disease/advance))
var/datum/disease/advance/A = D
D = GLOB.archive_diseases[A.GetDiseaseID()]
if(!D)
CRASH("We weren't able to get the advance disease from the archive.")
for(var/datum/symptom/S in A.symptoms)
symptoms += list(list(
"name" = S.name,
"stealth" = S.stealth,
"resistance" = S.resistance,
"stageSpeed" = S.stage_speed,
"transmissibility" = S.transmittable,
"complexity" = S.level,
))
strains += list(list(
"commonName" = D.name,
"description" = D.desc,
"bloodDNA" = Blood.data["blood_DNA"],
"bloodType" = Blood.data["blood_type"],
"diseaseAgent" = D.agent,
"possibleTreatments" = D.cure_text,
"transmissionRoute" = D.spread_text,
"symptoms" = symptoms,
"isAdvanced" = istype(D, /datum/disease/advance),
))
data["strains"] = strains
var/list/resistances = list()
for(var/resistance in GetResistances())
if(!ispath(resistance))
var/datum/disease/D = GLOB.archive_diseases[resistance]
if(D)
resistances += list(D.name)
else if(resistance)
var/datum/disease/D = new resistance(0, null)
if(D)
resistances += list(D.name)
data["resistances"] = resistances
/obj/machinery/computer/pandemic/proc/eject_beaker()
set name = "Eject Beaker"
set category = "Object"
set src in oview(1)
if(usr.stat != 0)
return
beaker.forceMove(loc)
beaker = null
icon_state = "pandemic0"
selected_strain_index = 1
/obj/machinery/computer/pandemic/proc/print_form(datum/disease/advance/D, mob/living/user)
D = GLOB.archive_diseases[D.GetDiseaseID()]
if(!(printing) && D)
var/reason = tgui_input_text(user,"Enter a reason for the release", "Write", multiline = TRUE)
if(!reason)
return
reason += "<span class=\"paper_field\"></span>"
var/english_symptoms = list()
for(var/I in D.symptoms)
var/datum/symptom/S = I
english_symptoms += S.name
var/symtoms = english_list(english_symptoms)
var/signature
if(tgui_alert(user, "Would you like to add your signature?", "Signature", list("Yes","No")) == "Yes")
signature = "<font face=\"Times New Roman\"><i>[user ? user.real_name : "Anonymous"]</i></font>"
else
signature = "<span class=\"paper_field\"></span>"
printing = 1
var/obj/item/paper/P = new /obj/item/paper(loc)
visible_message(span_notice("[src] rattles and prints out a sheet of paper."))
// playsound(loc, 'sound/goonstation/machines/printer_dotmatrix.ogg', 50, 1)
P.info = "<U><font size=\"4\"><B><center> Releasing Virus </B></center></font></U>"
P.info += "<HR>"
P.info += "<U>Name of the Virus:</U> [D.name] <BR>"
P.info += "<U>Symptoms:</U> [symtoms]<BR>"
P.info += "<U>Spreads by:</U> [D.spread_text]<BR>"
P.info += "<U>Cured by:</U> [D.cure_text]<BR>"
P.info += "<BR>"
P.info += "<U>Reason for releasing:</U> [reason]"
P.info += "<HR>"
P.info += "The Virologist is responsible for any biohazards caused by the virus released.<BR>"
P.info += "<U>Virologist's sign:</U> [signature]<BR>"
P.info += "If approved, stamp below with the Chief Medical Officer's stamp, and/or the Captain's stamp if required:"
P.updateinfolinks()
P.name = "Releasing Virus - [D.name]"
printing = null
/obj/machinery/computer/pandemic/attack_ai(mob/user)
return attack_hand(user)
/obj/machinery/computer/pandemic/attack_hand(mob/user)
if(..())
return
tgui_interact(user)
/obj/machinery/computer/pandemic/attack_ghost(mob/user)
tgui_interact(user)
/obj/machinery/computer/pandemic/attackby(obj/item/I, mob/user, params)
if(default_unfasten_wrench(user, I, 4 SECONDS))
return
if(I.has_tool_quality(TOOL_SCREWDRIVER))
eject_beaker()
return
if(istype(I, /obj/item/reagent_containers/glass) && I.is_open_container())
if(stat & (NOPOWER|BROKEN))
return
if(beaker)
to_chat(user, span_warning("A beaker is already loaded into the machine!"))
return
user.drop_item()
beaker = I
beaker.loc = src
to_chat(user, span_notice("You add the beaker to the machine."))
update_tgui_static_data(user)
icon_state = "pandemic1"
else
return ..()
@@ -19,7 +19,7 @@ var/global/list/image/splatter_cache=list()
blood_DNA = list()
var/basecolor="#A10808" // Color when wet.
var/synthblood = 0
var/list/datum/disease2/disease/virus2 = list()
var/list/datum/disease/viruses = list()
var/amount = 5
generic_filth = TRUE
persistent = FALSE
@@ -242,7 +242,7 @@ var/global/list/image/splatter_cache=list()
icon_state = "mucus"
random_icon_states = list("mucus")
var/list/datum/disease2/disease/virus2 = list()
var/list/datum/disease/viruses = list()
var/dry = 0 // Keeps the lag down
/obj/effect/decal/cleanable/mucus/Initialize()
@@ -252,11 +252,10 @@ var/global/list/image/splatter_cache=list()
//This version should be used for admin spawns and pre-mapped virus vectors (e.g. in PoIs), this version does not dry
/obj/effect/decal/cleanable/mucus/mapped/Initialize()
. = ..()
virus2 |= new /datum/disease2/disease
virus2[1].makerandom()
viruses |= new /datum/disease/advance
/obj/effect/decal/cleanable/mucus/mapped/Destroy()
virus2.Cut()
viruses.Cut()
return ..()
#undef DRYING_TIME
@@ -113,7 +113,7 @@
icon = 'icons/effects/blood.dmi'
icon_state = "vomit_1"
random_icon_states = list("vomit_1", "vomit_2", "vomit_3", "vomit_4")
var/list/datum/disease2/disease/virus2 = list()
var/list/datum/disease/viruses = list()
/obj/effect/decal/cleanable/tomato_smudge
name = "tomato smudge"
@@ -97,8 +97,12 @@
dat += span_bold("Genetic damage") + " - Utilize cryogenic pod with appropriate chemicals (i.e. Cryoxadone) and below 70 K, or give Rezadone.<br>"
if(bone)
dat += span_bold("Bone fracture") + " - Splint damaged area. Treat with bone repair surgery or Osteodaxon after treating brute damage.<br>"
if(M.virus2.len)
dat += span_bold("Viral infection") + " - Proceed with virology pathogen curing procedures or apply antiviral chemicals (i.e. Corophizine).<br>"
if(M.viruses.len)
for(var/datum/disease/D in M.GetViruses())
if(D.visibility_flags & HIDDEN_SCANNER)
continue
else
dat += span_bold("Viral Infection") + " - Inform a Virologist or the Chief Medical Officer and administer antiviral chemicals such as Spaceacilin. Limit exposure to other personnel.<br>"
if(robotparts)
dat += span_bold("Robotic body parts") + " - Should not be repaired by medical personnel, refer to robotics if damaged."
@@ -248,14 +248,14 @@
else
dat += span_warning("Unknown substance[(unknown > 1)?"s":""] found in subject's dermis.")
dat += "<br>"
if(C.virus2.len)
for (var/ID in C.virus2)
if (ID in virusDB)
var/datum/data/record/V = virusDB[ID]
dat += span_warning("Warning: Pathogen [V.fields["name"]] detected in subject's blood. Known antigen : [V.fields["antigen"]]")
if(C.resistances.len)
for (var/datum/disease/virus in C.GetViruses())
if(virus.visibility_flags & HIDDEN_SCANNER || virus.visibility_flags & HIDDEN_PANDEMIC)
continue
if(virus.discovered)
dat += span_warning("Warning: [virus.name] detected in subject's blood.")
dat += "<br>"
else
dat += span_warning("Warning: Unknown pathogen detected in subject's blood.")
dat += span_warning("Severity: [virus.severity]")
dat += "<br>"
if (M.getCloneLoss())
dat += span_warning("Subject appears to have been imperfectly cloned.")
@@ -154,14 +154,6 @@
build_path = /obj/machinery/computer/operating
origin_tech = list(TECH_DATA = 2, TECH_BIO = 2)
/obj/item/circuitboard/curefab
name = T_BOARD("cure fabricator")
build_path = /obj/machinery/computer/curer
/obj/item/circuitboard/splicer
name = T_BOARD("disease splicer")
build_path = /obj/machinery/computer/diseasesplicer
/obj/item/circuitboard/mining_shuttle
name = T_BOARD("mining shuttle console")
build_path = /obj/machinery/computer/shuttle_control/mining
@@ -226,4 +218,4 @@
/obj/item/circuitboard/stockexchange
name = T_BOARD("stock exchange console")
build_path = /obj/machinery/computer/stockexchange
origin_tech = list(TECH_DATA = 2, TECH_MAGNET = 1)
origin_tech = list(TECH_DATA = 2, TECH_MAGNET = 1)
@@ -453,7 +453,7 @@
max_storage_space = ITEMSIZE_COST_SMALL * 12
max_w_class = ITEMSIZE_NORMAL
w_class = ITEMSIZE_SMALL
can_hold = list(/obj/item/reagent_containers/glass/beaker/vial/,/obj/item/virusdish/)
can_hold = list(/obj/item/reagent_containers/glass/beaker/vial/)
// -----------------------------
// Food Bag
@@ -244,7 +244,6 @@
/obj/item/flashlight,
/obj/item/cell/device,
/obj/item/extinguisher/mini,
/obj/item/antibody_scanner, // VOREstation edit start
/obj/item/sleevemate,
/obj/item/mass_spectrometer,
/obj/item/surgical,
@@ -300,7 +300,7 @@
/obj/item/storage/box/syndie_kit/viral
starts_with = list(
/obj/item/virusdish/random = 3
// /obj/item/virusdish/random = 3
)
/obj/item/storage/secure/briefcase/rifle
+1 -1
View File
@@ -174,7 +174,7 @@
B.blood_DNA = list()
if(!B.blood_DNA[M.dna.unique_enzymes])
B.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
B.virus2 = virus_copylist(M.virus2)
B.viruses = M.viruses.Copy()
return 1 //we bloodied the floor
blood_splatter(src,M.get_blood(M.vessel),1)
return 1 //we bloodied the floor
+6 -4
View File
@@ -187,7 +187,6 @@ var/list/admin_verbs_spawn = list(
/client/proc/cmd_admin_droppod_spawn,
/client/proc/respawn_character,
/client/proc/spawn_character_mob, //VOREStation Add,
/client/proc/virus2_editor,
/client/proc/spawn_chemdisp_cartridge,
/client/proc/map_template_load,
/client/proc/map_template_upload,
@@ -196,7 +195,9 @@ var/list/admin_verbs_spawn = list(
/client/proc/generic_structure, //VOREStation Add
/client/proc/generic_item, //VOREStation Add
/client/proc/create_gm_message,
/client/proc/remove_gm_message
/client/proc/remove_gm_message,
/client/proc/AdminCreateVirus,
/client/proc/ReleaseVirus
)
var/list/admin_verbs_server = list(
@@ -563,8 +564,9 @@ var/list/admin_verbs_event_manager = list(
/client/proc/toggle_random_events,
/client/proc/modify_server_news,
/client/proc/toggle_spawning_with_recolour,
/client/proc/start_vote
/client/proc/start_vote,
/client/proc/AdminCreateVirus,
/client/proc/ReleaseVirus
)
/client/proc/add_admin_verbs()
-31
View File
@@ -283,37 +283,6 @@
message_admins(span_blue("[ckey] creating an admin explosion at [epicenter.loc]."))
feedback_add_details("admin_verb","DB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/give_disease2(mob/T as mob in mob_list) // -- Giacom
set category = "Fun.Event Kit"
set name = "Give Disease"
set desc = "Gives a Disease to a mob."
var/datum/disease2/disease/D = new /datum/disease2/disease()
var/severity = 1
var/greater = tgui_input_list(usr, "Is this a lesser, greater, or badmin disease?", "Give Disease", list("Lesser", "Greater", "Badmin"))
switch(greater)
if ("Lesser") severity = 1
if ("Greater") severity = 2
if ("Badmin") severity = 99
D.makerandom(severity)
D.infectionchance = tgui_input_number(usr, "How virulent is this disease? (1-100)", "Give Disease", D.infectionchance, 100, 1)
if(istype(T,/mob/living/carbon/human))
var/mob/living/carbon/human/H = T
if (H.species)
D.affected_species = list(H.species.get_bodytype())
if(H.species.primitive_form)
D.affected_species |= H.species.primitive_form
if(H.species.greater_form)
D.affected_species |= H.species.greater_form
infect_virus2(T,D,1)
feedback_add_details("admin_verb","GD2") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] gave [key_name(T)] a [greater] disease2 with infection chance [D.infectionchance].")
message_admins(span_blue("[key_name_admin(usr)] gave [key_name(T)] a [greater] disease2 with infection chance [D.infectionchance]."), 1)
/client/proc/admin_give_modifier(var/mob/living/L)
set category = "Debug.Game"
set name = "Give Modifier"
@@ -129,18 +129,6 @@
href_list["datumrefresh"] = href_list["give_wound_internal"]
else if(href_list["give_disease2"])
if(!check_rights(R_ADMIN|R_FUN|R_EVENT)) return
var/mob/M = locate(href_list["give_disease2"])
if(!istype(M))
to_chat(usr, "This can only be used on instances of type /mob")
return
src.give_disease2(M)
href_list["datumrefresh"] = href_list["give_spell"]
else if(href_list["godmode"])
if(!check_rights(R_REJUVINATE)) return
+98
View File
@@ -0,0 +1,98 @@
GLOBAL_LIST_EMPTY(current_pending_diseases)
/datum/event/disease_outbreak
var/datum/disease/chosen_disease
var/list/disease_blacklist = list(
/datum/disease/advance,
/datum/disease/food_poisoning
)
var/static/list/transmissable_symptoms = list()
var/static/list/diseases_minor = list()
var/static/list/diseases_moderate_major = list()
/datum/event/disease_outbreak/setup()
if(isemptylist(diseases_minor) && isemptylist(diseases_moderate_major))
populate_diseases()
if(isemptylist(transmissable_symptoms))
populate_symptoms()
var/datum/disease/virus
if(prob(50))
switch(severity)
if(EVENT_LEVEL_MODERATE)
virus = pick(diseases_minor)
if(EVENT_LEVEL_MAJOR)
virus = pick(diseases_moderate_major)
else
stack_trace("Disease Outbreak: Invalid Event Level [severity]. Expected: 1-2")
virus = /datum/disease/cold
chosen_disease = new virus()
else
if(severity == EVENT_LEVEL_MAJOR)
chosen_disease = create_virus(severity * pick(2,3)) //50% chance for a major disease instead of a moderate one
else
chosen_disease = create_virus(severity * 2)
chosen_disease.carrier = TRUE
/datum/event/disease_outbreak/start()
GLOB.current_pending_diseases += chosen_disease
var/list/candidates = list()
for(var/mob/living/carbon/human/G in player_list)
if(G.mind && G.stat != DEAD && G.is_client_active(5) && !player_is_antag(G.mind))
var/area/A = get_area(G)
if(!A)
continue
if(!(A.z in using_map.station_levels))
continue
if(A.flags & RAD_SHIELDED)
continue
if(isbelly(G.loc))
continue
if(!G.CanContractDisease())
continue
candidates += G
var/chosen_infect = rand(3, 5)
while(chosen_infect)
var/mob/living/carbon/human/H = pick(candidates)
H.ContractDisease(chosen_disease)
candidates -= H
//Creates a virus with a harmful effect, guaranteed to be spreadable by contact or airborne
/datum/event/disease_outbreak/proc/create_virus(max_severity = 6)
var/datum/disease/advance/A = new /datum/disease/advance
A.symptoms = A.GenerateSymptomsBySeverity(max_severity - 1, max_severity, 2) //Choose "Payload" symptoms
A.AssignProperties(A.GenerateProperties())
var/list/symptoms_to_try = transmissable_symptoms.Copy()
while(length(symptoms_to_try))
if(A.spread_text != "Blood")
break
if(length(A.symptoms) < VIRUS_SYMPTOM_LIMIT) //Ensure the virus is spreadable by adding symptoms that boost transmission
var/datum/symptom/TS = pick_n_take(symptoms_to_try)
A.AddSymptom(new TS)
else
popleft(A.symptoms) //We have a full symptom list but are still not transmittable. Try removing one of the "payloads"
A.AssignProperties(A.GenerateProperties())
A.name = pick(alphabet_uppercase) + num2text(rand(1,9)) + pick(alphabet_uppercase) + num2text(rand(1,9)) + pick("v", "V", "-" + num2text(game_year), "")
A.Refresh()
return A
/datum/event/disease_outbreak/proc/populate_diseases()
for(var/candidate in subtypesof(/datum/disease))
var/datum/disease/CD = new candidate
if(is_type_in_list(CD, disease_blacklist))
continue
switch(CD.severity)
if(NONTHREAT, MINOR)
diseases_minor += candidate
if(MEDIUM, HARMFUL, DANGEROUS, BIOHAZARD)
diseases_moderate_major += candidate
/datum/event/disease_outbreak/proc/populate_symptoms()
for(var/candidate in subtypesof(/datum/symptom))
var/datum/symptom/CS = candidate
if(initial(CS.transmittable) > 1)
transmissable_symptoms += candidate
+1
View File
@@ -6892,6 +6892,7 @@
"zombiepowder",
"cryptobiolin",
"psilocybin")), 5)
reagents.add_reagent("salmonella", 5)
/obj/item/reagent_containers/food/snacks/old/pizza
name = "\improper Pizza!"
@@ -31,9 +31,7 @@
icon_contents = "viro"
/obj/machinery/smartfridge/virology/accept_check(var/obj/item/O as obj)
if(istype(O,/obj/item/reagent_containers/glass/beaker/vial/))
return 1
if(istype(O,/obj/item/virusdish/))
if(istype(O,/obj/item/storage/pill_bottle) || istype(O,/obj/item/reagent_containers) || istype(O,/obj/item/reagent_containers/glass/))
return 1
return 0
@@ -44,9 +42,7 @@
req_access = list(access_virology)
/obj/machinery/smartfridge/secure/virology/accept_check(var/obj/item/O as obj)
if(istype(O,/obj/item/reagent_containers/glass/beaker/vial/))
return 1
if(istype(O,/obj/item/virusdish/))
if(istype(O,/obj/item/storage/pill_bottle) || istype(O,/obj/item/reagent_containers) || istype(O,/obj/item/reagent_containers/glass/))
return 1
return 0
-8
View File
@@ -508,14 +508,6 @@ I said no!
)
result = /obj/item/reagent_containers/food/snacks/icecreamsandwich
// Fuck Science!
/datum/recipe/ruinedvirusdish
items = list(
/obj/item/virusdish
)
result = /obj/item/ruinedvirusdish
/datum/recipe/onionsoup
fruit = list("onion" = 1)
reagents = list("water" = 10)
@@ -1,69 +0,0 @@
/datum/event2/meta/virus
name = "viral infection"
event_class = "virus"
departments = list(DEPARTMENT_MEDICAL, DEPARTMENT_EVERYONE)
chaos = 40
chaotic_threshold = EVENT_CHAOS_THRESHOLD_HIGH_IMPACT
event_type = /datum/event2/event/virus
/datum/event2/meta/virus/superbug
name = "viral superbug"
chaos = 60
event_type = /datum/event2/event/virus/superbug
/datum/event2/meta/virus/outbreak
name = "viral outbreak"
chaos = 60
event_type = /datum/event2/event/virus/outbreak
/datum/event2/meta/virus/get_weight()
var/list/virologists = metric.get_people_with_alt_title(/datum/job/doctor, /datum/alt_title/virologist)
virologists += metric.get_people_with_job(/datum/job/cmo)
return virologists.len * 25
/datum/event2/event/virus
announce_delay_lower_bound = 1 MINUTE
announce_delay_upper_bound = 3 MINUTES
var/number_of_viruses = 1
var/virus_power = 2 // Ranges from 1 to 3, with 1 being the weakest.
var/list/candidates = list()
// A single powerful virus.
/datum/event2/event/virus/superbug
virus_power = 3
// A lot of weaker viruses.
/datum/event2/event/virus/outbreak
virus_power = 1
number_of_viruses = 3
/datum/event2/event/virus/set_up()
for(var/mob/living/carbon/human/H in player_list)
if(H.client && !H.isSynthetic() && H.stat != DEAD && !player_is_antag(H.mind) && !isbelly(H.loc))
candidates += H
candidates = shuffle(candidates)
/datum/event2/event/virus/announce()
command_announcement.Announce("Confirmed outbreak of level 7 biohazard aboard \the [location_name()]. \
All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
/datum/event2/event/virus/start()
if(!candidates.len)
log_debug("Virus event could not find any valid targets to infect. Aborting.")
abort()
return
for(var/i = 1 to number_of_viruses)
var/mob/living/carbon/human/H = LAZYACCESS(candidates, 1)
if(!H)
return
var/datum/disease2/disease/D = new()
D.makerandom(virus_power)
log_debug("Virus event is now infecting \the [H] with a new random virus.")
infect_mob(H, D)
candidates -= H
+13 -3
View File
@@ -11,8 +11,6 @@
/mob/living/carbon/Life()
..()
handle_viruses()
// Increase germ_level regularly
if(germ_level < GERM_LEVEL_AMBIENT && prob(30)) //if you're just standing there, you shouldn't get more germs beyond an ambient level
germ_level++
@@ -398,7 +396,10 @@
return
..()
if(istype(A, /mob/living/carbon) && prob(10))
spread_disease_to(A, "Contact")
var/mob/living/carbon/human/H = A
for(var/datum/disease/D in GetViruses())
if(D.spread_flags & CONTACT_GENERAL)
H.ContractDisease(D)
/mob/living/carbon/cannot_use_vents()
return
@@ -542,3 +543,12 @@
if(allergen_type in species.food_preference)
return species.food_preference_bonus
return 0
/mob/living/carbon/handle_diseases()
for(var/thing in GetViruses())
var/datum/disease/D = thing
if(prob(D.infectivity))
D.spread()
if(stat != DEAD || D.allow_dead)
D.stage_act()
@@ -3,7 +3,6 @@
blocks_emissive = EMISSIVE_BLOCK_UNIQUE // BLEH, this could be improved for transparent species and stuff! And blocks glowing eyes?!
var/datum/species/species //Contains icon generation and language information, set during New().
var/list/stomach_contents = list()
var/list/datum/disease2/disease/virus2 = list()
var/list/antibodies = list()
var/last_eating = 0 //Not sure what this does... I found it hidden in food.dm
@@ -29,4 +28,4 @@
//these two help govern taste. The first is the last time a taste message was shown to the plaer.
//the second is the message in question.
var/last_taste_time = 0
var/last_taste_text = ""
var/last_taste_text = ""
@@ -1062,10 +1062,6 @@
sync_organ_dna()
// end vorestation addition
for (var/ID in virus2)
var/datum/disease2/disease/V = virus2[ID]
V.cure(src)
losebreath = 0
..()
@@ -44,6 +44,17 @@
if(!temp || !temp.is_usable())
to_chat(H, span_warning("You can't use your hand."))
return
for(var/thing in GetViruses())
var/datum/disease/D = thing
if(D.IsSpreadByTouch())
H.ContractDisease(D)
for(var/thing in H.GetViruses())
var/datum/disease/D = thing
if(D.IsSpreadByTouch())
ContractDisease(D)
if(H.lying)
return
M.break_cloak()
@@ -65,8 +76,9 @@
return FALSE
if(istype(M,/mob/living/carbon))
var/mob/living/carbon/C = M
C.spread_disease_to(src, "Contact")
for(var/datum/disease/D in M.GetViruses())
if(D.spread_flags & CONTACT_HANDS)
ContractDisease(D)
switch(M.a_intent)
if(I_HELP)
+12 -7
View File
@@ -504,9 +504,12 @@
/mob/living/carbon/human/handle_post_breath(datum/gas_mixture/breath)
..()
//spread some viruses while we are at it
if(breath && virus2.len > 0 && prob(10))
for(var/mob/living/carbon/M in view(1,src))
src.spread_disease_to(M)
if(breath && !isnull(viruses) && prob(10))
for(var/datum/disease/D in GetViruses())
if((D.spread_flags & SPECIAL) || (D.spread_flags & NON_CONTAGIOUS))
continue
for(var/mob/living/carbon/M in view(1,src))
ContractDisease(D)
/mob/living/carbon/human/get_breath_from_internal(volume_needed=BREATH_VOLUME)
@@ -2031,8 +2034,8 @@
if (BITTEST(hud_updateflag, STATUS_HUD))
var/foundVirus = 0
for (var/ID in virus2)
if (ID in virusDB)
for (var/datum/disease/D in GetViruses())
if(D.discovered)
foundVirus = 1
break
@@ -2054,8 +2057,10 @@
holder2.icon_state = "hudbrainworm"
else
holder.icon_state = "hudhealthy"
if(virus2.len)
holder2.icon_state = "hudill"
if(viruses.len)
for(var/datum/disease/D in GetViruses())
if(D.discovered)
holder2.icon_state = "hudill"
else
holder2.icon_state = "hudhealthy"
if(block_hud)
-48
View File
@@ -1,48 +0,0 @@
/mob/living/carbon/proc/handle_viruses()
if(status_flags & GODMODE) return 0 //godmode
if(bodytemperature > 406)
for (var/ID in virus2)
var/datum/disease2/disease/V = virus2[ID]
V.cure(src)
if(life_tick % 3) //don't spam checks over all objects in view every tick.
for(var/obj/effect/decal/cleanable/O in view(1,src))
if(istype(O,/obj/effect/decal/cleanable/blood))
var/obj/effect/decal/cleanable/blood/B = O
if(B.virus2.len)
for (var/ID in B.virus2)
var/datum/disease2/disease/V = B.virus2[ID]
infect_virus2(src,V)
else if(istype(O,/obj/effect/decal/cleanable/mucus))
var/obj/effect/decal/cleanable/mucus/M = O
if(M.virus2.len)
for (var/ID in M.virus2)
var/datum/disease2/disease/V = M.virus2[ID]
infect_virus2(src,V)
else if(istype(O,/obj/effect/decal/cleanable/vomit))
var/obj/effect/decal/cleanable/vomit/Vom = O
if(Vom.virus2.len)
for (var/ID in Vom.virus2)
var/datum/disease2/disease/V = Vom.virus2[ID]
infect_virus2(src,V)
if(virus2.len)
for (var/ID in virus2)
var/datum/disease2/disease/V = virus2[ID]
if(isnull(V)) // Trying to figure out a runtime error that keeps repeating
CRASH("virus2 nulled before calling activate()")
else
V.activate(src)
// activate may have deleted the virus
if(!V) continue
// check if we're immune
var/list/common_antibodies = V.antigen & src.antibodies
if(common_antibodies.len)
V.dead = 1
return
+19 -5
View File
@@ -1,10 +1,28 @@
/mob/living
var/datum/language/default_language
/mob/living/verb/set_default_language(language as null|anything in languages)
/mob/living/verb/set_default_language()
set name = "Set Default Language"
set category = "IC.Settings"
var/language = tgui_input_list(usr, "Select your default language", "Available languages", languages)
apply_default_language(language)
// Silicons can't neccessarily speak everything in their languages list
/mob/living/silicon/set_default_language()
var/language = tgui_input_list(usr, "Select your default language", "Available languages", speech_synthesizer_langs)
// Silicons have no species language usually. So let's default them to GALCOM
if(!language)
to_chat(src, span_notice("You will now speak your standard default language, common, if you do not specify a language when speaking."))
for(var/datum/language/lang in speech_synthesizer_langs)
if(lang.name == LANGUAGE_GALCOM)
default_language = lang
break
return
apply_default_language(language)
/mob/living/proc/apply_default_language(var/language)
if (only_species_language && language != GLOB.all_languages[src.species_language])
to_chat(src, span_notice("You can only speak your species language, [src.species_language]."))
return 0
@@ -22,10 +40,6 @@
to_chat(src, span_notice("You will now speak whatever your standard default language is if you do not specify one when speaking."))
default_language = language
// Silicons can't neccessarily speak everything in their languages list
/mob/living/silicon/set_default_language(language as null|anything in speech_synthesizer_langs)
..()
/mob/living/verb/check_default_language()
set name = "Check Default Language"
set category = "IC.Game"
+4
View File
@@ -51,6 +51,10 @@
//Chemicals in the body, this is moved over here so that blood can be added after death
handle_chemicals_in_body()
// Handle viruses - Dead or not!
if(LAZYLEN(viruses))
handle_diseases()
//Handle temperature/pressure differences between body and environment
if(environment)
handle_environment(environment)
@@ -0,0 +1,63 @@
/mob/living/simple_mob/vore/aggressive/macrophage
name = "Germ"
desc = "A giant virus!"
icon = 'icons/mob/macrophage.dmi'
icon_state = "macrophage-1"
faction = FACTION_MACROBACTERIA
maxHealth = 60
health = 60
var/datum/disease/base_disease = null
var/list/infections = list()
melee_damage_lower = 1
melee_damage_upper = 5
grab_resist = 100
see_in_dark = 8
response_help = "shoos"
response_disarm = "swats away"
response_harm = "squashes"
attacktext = list("squashed")
friendly = list("shoos", "rubs")
vore_bump_chance = "attempts to absorb"
vore_active = TRUE
vore_capacity = 1
can_be_drop_prey = FALSE
allow_mind_transfer = TRUE
ai_holder_type = /datum/ai_holder/simple_mob/melee
/mob/living/simple_mob/vore/aggressive/macrophage/green
icon_state = "macrophage-2"
/mob/living/simple_mob/vore/aggressive/macrophage/pink
icon_state = "macrophage-3"
/mob/living/simple_mob/vore/aggressive/macrophage/blue
icon_state = "macrophage-4"
/obj/belly/macrophage
name = "capsid"
fancy_vore = TRUE
contamination_color = "green"
vore_verb = "absorb"
escapable = TRUE
escapable = 5
desc = "In an attempt to get away from the giant virus, it's oversized envelope proteins dragged you right past it's matrix, encapsulating you deep inside it's capsid... The strange walls kneading and keeping you tight along within it's nucleoprotein."
belly_fullscreen = "VBO_gematically_angular"
belly_fullscreen_color = "#87d8d8"
digest_mode = DM_ABSORB
affects_vore_sprites = FALSE
/mob/living/simple_mob/vore/aggressive/macrophage/init_vore()
if(LAZYLEN(vore_organs))
return TRUE
var/obj/belly/B = new /obj/belly/macrophage(src)
vore_selected = B
+3
View File
@@ -239,3 +239,6 @@
var/list/list/misc_tabs = list()
var/list/datum/action/actions
var/list/viruses
var/list/resistances
+22 -9
View File
@@ -246,10 +246,19 @@ var/const/CE_STABLE_THRESHOLD = 0.5
//set reagent data
B.data["donor"] = src
if (!B.data["virus2"])
B.data["virus2"] = list()
B.data["virus2"] |= virus_copylist(src.virus2)
B.data["antibodies"] = src.antibodies
if(!B.data["viruses"])
B.data["viruses"] = list()
for(var/datum/disease/D in GetViruses())
if(D.spread_flags & SPECIAL || D.spread_flags & NON_CONTAGIOUS)
continue
B.data["viruses"] |= D.Copy()
if(!B.data["resistances"])
B.data["resistances"] = list()
if(B.data["resistances"])
B.data["resistances"] |= GetResistances()
B.data["blood_DNA"] = copytext(src.dna.unique_enzymes,1,0)
B.data["blood_type"] = copytext(src.dna.b_type,1,0)
@@ -282,10 +291,14 @@ var/const/CE_STABLE_THRESHOLD = 0.5
/mob/living/carbon/proc/inject_blood(var/datum/reagent/blood/injected, var/amount)
if (!injected || !istype(injected))
return
var/list/sniffles = virus_copylist(injected.data["virus2"])
var/list/sniffles = injected.data["viruses"]
for(var/ID in sniffles)
var/datum/disease2/disease/sniffle = sniffles[ID]
infect_virus2(src,sniffle,1)
var/datum/disease/D = ID
if((D.spread_flags & SPECIAL) || (D.spread_flags & NON_CONTAGIOUS)) // You can't put non-contagius diseases in blood, but just in case
continue
ContractDisease(D)
if (injected.data["resistances"] && prob(5))
antibodies |= injected.data["resistances"]
if (injected.data["antibodies"] && prob(5))
antibodies |= injected.data["antibodies"]
var/list/chems = list()
@@ -426,8 +439,8 @@ var/const/CE_STABLE_THRESHOLD = 0.5
B.blood_DNA[source.data["blood_DNA"]] = "O+"
// Update virus information.
if(source.data["virus2"])
B.virus2 = virus_copylist(source.data["virus2"])
if(source.data["viruses"])
B.viruses = source.data["viruses"]
B.fluorescent = 0
B.invisibility = 0
+3 -4
View File
@@ -18,7 +18,7 @@
var/emp_proof = FALSE
var/static/cell_uid = 1 // Unique ID of this power cell. Used to reduce bunch of uglier code in nanoUI.
var/c_uid
var/charge = 0 // note %age conveted to actual charge in New
var/charge = 1000 // maximum charge on spawn
var/maxcharge = 1000
var/rigged = 0 // true if rigged to explode
var/minor_fault = 0 //If not 100% reliable, it will build up faults.
@@ -36,10 +36,9 @@
var/standard_overlays = TRUE
var/last_overlay_state = null // Used to optimize update_icon() calls.
/obj/item/cell/New()
..()
/obj/item/cell/Initialize()
. = ..()
c_uid = cell_uid++
charge = maxcharge
update_icon()
if(self_recharge)
START_PROCESSING(SSobj, src)
+30 -20
View File
@@ -10,15 +10,14 @@
force = 0
throw_speed = 5
throw_range = 7
charge = 480
maxcharge = 480
charge_amount = 5
matter = list(MAT_STEEL = 350, MAT_GLASS = 50)
preserve_item = 1
/obj/item/cell/device/empty/Initialize()
. = ..()
/obj/item/cell/device/empty
charge = 0
update_icon()
/*
* Crap Device
@@ -29,16 +28,15 @@
description_fluff = "You can't top the rust top." //TOTALLY TRADEMARK INFRINGEMENT
origin_tech = list(TECH_POWER = 0)
icon_state = "device_crap"
charge = 240
maxcharge = 240
matter = list(MAT_STEEL = 350, MAT_GLASS = 30)
/obj/item/cell/device/crap/update_icon() //No visible charge indicator
return
/obj/item/cell/device/crap/empty/Initialize()
. = ..()
/obj/item/cell/device/crap/empty
charge = 0
update_icon()
/*
* Hyper Device
@@ -47,13 +45,12 @@
name = "hyper device power cell"
desc = "A small power cell designed to power handheld devices. Has a better charge than a standard device cell."
icon_state = "hype_device_cell"
charge = 600
maxcharge = 600
matter = list(MAT_STEEL = 400, MAT_GLASS = 60)
/obj/item/cell/device/hyper/empty/Initialize()
. = ..()
/obj/item/cell/device/hyper/empty
charge = 0
update_icon()
/*
* EMP Proof Device
@@ -65,10 +62,8 @@
matter = list(MAT_STEEL = 400, MAT_GLASS = 60)
emp_proof = TRUE
/obj/item/cell/device/empproof/empty/Initialize()
. = ..()
/obj/item/cell/device/empproof/empty
charge = 0
update_icon()
/*
* Weapon
@@ -77,13 +72,12 @@
name = "weapon power cell"
desc = "A small power cell designed to power handheld weaponry."
icon_state = "weapon_cell"
charge = 2400
maxcharge = 2400
charge_amount = 20
/obj/item/cell/device/weapon/empty/Initialize()
. = ..()
/obj/item/cell/device/weapon/empty
charge = 0
update_icon()
/*
* EMP Proof Weapon
@@ -95,10 +89,8 @@
matter = list(MAT_STEEL = 400, MAT_GLASS = 60)
emp_proof = TRUE
/obj/item/cell/device/weapon/empproof/empty/Initialize()
. = ..()
/obj/item/cell/device/weapon/empproof/empty
charge = 0
update_icon()
/*
* Self-charging Weapon
@@ -139,7 +131,7 @@
value = CATALOGUER_REWARD_EASY
/obj/item/cell/device/weapon/recharge/alien
name = "void cell"
name = "void cell (device)"
desc = "An alien technology that produces energy seemingly out of nowhere. Its small, cylinderal shape means it might be able to be used with human technology, perhaps?"
catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_void_cell)
icon = 'icons/obj/abductor.dmi'
@@ -147,6 +139,24 @@
charge_amount = 120 // 5%.
charge_delay = 50 // Every five seconds, bit faster than the default.
origin_tech = list(TECH_POWER = 8, TECH_ENGINEERING = 6)
var/swaps_to = /obj/item/cell/void
standard_overlays = FALSE
/obj/item/cell/device/weapon/recharge/alien/update_icon()
return // No overlays please.
return // No overlays please.
/obj/item/cell/device/weapon/recharge/alien/attack_self(var/mob/user)
user.remove_from_mob(src)
to_chat(user, span_notice("You swap [src] to 'machinery cell' mode."))
var/obj/item/cell/newcell = new swaps_to(null)
user.put_in_active_hand(newcell)
var/percentage = charge/maxcharge
newcell.charge = newcell.maxcharge * percentage
newcell.persist_storable = persist_storable
qdel(src)
// Bloo friendlier hybrid tech
/obj/item/cell/device/weapon/recharge/alien/hybrid
icon = 'icons/obj/power_vr.dmi'
icon_state = "cellb"
swaps_to = /obj/item/cell/void/hybrid
@@ -1,53 +0,0 @@
//The device cell
/obj/item/cell/device/weapon/recharge/alien
name = "void cell (device)"
var/swaps_to = /obj/item/cell/void
standard_overlays = FALSE
/obj/item/cell/device/weapon/recharge/alien/attack_self(var/mob/user)
user.remove_from_mob(src)
to_chat(user, span_notice("You swap [src] to 'machinery cell' mode."))
var/obj/item/cell/newcell = new swaps_to(null)
user.put_in_active_hand(newcell)
var/percentage = charge/maxcharge
newcell.charge = newcell.maxcharge * percentage
newcell.persist_storable = persist_storable
qdel(src)
//The machine cell
/obj/item/cell/void
name = "void cell (machinery)"
desc = "An alien technology that produces energy seemingly out of nowhere. Its small, cylinderal shape means it might be able to be used with human technology, perhaps?"
origin_tech = list(TECH_POWER = 8, TECH_ENGINEERING = 6)
icon = 'icons/obj/abductor.dmi'
icon_state = "cell"
maxcharge = 4800 //10x the device version
charge_amount = 1200 //10x the device version
self_recharge = TRUE
charge_delay = 50
matter = null
standard_overlays = FALSE
var/swaps_to = /obj/item/cell/device/weapon/recharge/alien
robot_durability = 100
/obj/item/cell/void/attack_self(var/mob/user)
user.remove_from_mob(src)
to_chat(user, span_notice("You swap [src] to 'device cell' mode."))
var/obj/item/cell/newcell = new swaps_to(null)
user.put_in_active_hand(newcell)
var/percentage = charge/maxcharge
newcell.charge = newcell.maxcharge * percentage
newcell.persist_storable = persist_storable
qdel(src)
// Bloo friendlier hybrid tech
/obj/item/cell/device/weapon/recharge/alien/hybrid
icon = 'icons/obj/power_vr.dmi'
icon_state = "cellb"
swaps_to = /obj/item/cell/void/hybrid
/obj/item/cell/void/hybrid
icon = 'icons/obj/power_vr.dmi'
icon_state = "cellb"
swaps_to = /obj/item/cell/device/weapon/recharge/alien/hybrid
@@ -4,6 +4,7 @@
desc = "A modified power cell sitting in a highly conductive chassis."
origin_tech = list(TECH_POWER = 2)
icon_state = "modded"
charge = 10000
maxcharge = 10000
matter = list(MAT_STEEL = 1000, MAT_GLASS = 80, MAT_SILVER = 100)
self_recharge = TRUE
+47 -13
View File
@@ -1,8 +1,7 @@
/*
* Empty
*/
/obj/item/cell/empty/New()
..()
/obj/item/cell/empty
charge = 0
/*
@@ -14,6 +13,7 @@
description_fluff = "You can't top the rust top." //TOTALLY TRADEMARK INFRINGEMENT
origin_tech = list(TECH_POWER = 0)
icon_state = "crap"
charge = 500
maxcharge = 500
matter = list(MAT_STEEL = 700, MAT_GLASS = 40)
robot_durability = 20
@@ -21,8 +21,7 @@
/obj/item/cell/crap/update_icon() //No visible charge indicator
return
/obj/item/cell/crap/empty/New()
..()
/obj/item/cell/crap/empty
charge = 0
/*
@@ -32,6 +31,7 @@
name = "heavy-duty power cell"
origin_tech = list(TECH_POWER = 1)
icon_state = "apc"
charge = 5000
maxcharge = 5000
matter = list(MAT_STEEL = 700, MAT_GLASS = 50)
@@ -40,6 +40,7 @@
*/
/obj/item/cell/robot_station
name = "standard robot power cell"
charge = 7500
maxcharge = 7500
/*
@@ -49,14 +50,13 @@
name = "high-capacity power cell"
origin_tech = list(TECH_POWER = 2)
icon_state = "high"
charge = 10000
maxcharge = 10000
matter = list(MAT_STEEL = 700, MAT_GLASS = 60)
robot_durability = 55
/obj/item/cell/high/empty/New()
..()
/obj/item/cell/high/empty
charge = 0
update_icon()
/*
* Super
@@ -65,14 +65,13 @@
name = "super-capacity power cell"
origin_tech = list(TECH_POWER = 5)
icon_state = "super"
charge = 20000
maxcharge = 20000
matter = list(MAT_STEEL = 700, MAT_GLASS = 70)
robot_durability = 60
/obj/item/cell/super/empty/New()
..()
/obj/item/cell/super/empty
charge = 0
update_icon()
/*
* Syndicate
@@ -81,6 +80,7 @@
name = "syndicate robot power cell"
description_fluff = "Almost as good as a hyper."
icon_state = "super" //We don't want roboticists confuse it with a low standard cell
charge = 25000
maxcharge = 25000
robot_durability = 65
@@ -91,14 +91,13 @@
name = "hyper-capacity power cell"
origin_tech = list(TECH_POWER = 6)
icon_state = "hyper"
charge = 30000
maxcharge = 30000
matter = list(MAT_STEEL = 700, MAT_GLASS = 80)
robot_durability = 70
/obj/item/cell/hyper/empty/New()
..()
/obj/item/cell/hyper/empty
charge = 0
update_icon()
/*
* Mecha
@@ -146,6 +145,7 @@
name = "infinite-capacity power cell!"
icon_state = "infinity"
origin_tech = null
charge = 30000
maxcharge = 30000 //determines how badly mobs get shocked
matter = list(MAT_STEEL = 700, MAT_GLASS = 80)
robot_durability = 200
@@ -180,6 +180,7 @@
icon_state = "yellow slime extract" //"potato_battery"
connector_type = "slime"
description_info = "This 'cell' holds a max charge of 10k and self recharges over time."
charge = 10000
maxcharge = 10000
matter = null
self_recharge = TRUE
@@ -191,6 +192,7 @@
/obj/item/cell/emergency_light
name = "miniature power cell"
desc = "A tiny power cell with a very low power capacity. Used in light fixtures to power them in the event of an outage."
charge = 120
maxcharge = 120 //Emergency lights use 0.2 W per tick, meaning ~10 minutes of emergency power from a cell
matter = list(MAT_GLASS = 20)
icon_state = "em_light"
@@ -247,3 +249,35 @@
cut_overlays()
target.adjust_nutrition(amount)
user.custom_emote(message = "connects \the [src] to [user == target ? "their" : "[target]'s"] charging port, expending it.")
//The machine cell
/obj/item/cell/void
name = "void cell (machinery)"
desc = "An alien technology that produces energy seemingly out of nowhere. Its small, cylinderal shape means it might be able to be used with human technology, perhaps?"
origin_tech = list(TECH_POWER = 8, TECH_ENGINEERING = 6)
icon = 'icons/obj/abductor.dmi'
icon_state = "cell"
charge = 4800
maxcharge = 4800 //10x the device version
charge_amount = 1200 //10x the device version
self_recharge = TRUE
charge_delay = 50
matter = null
standard_overlays = FALSE
var/swaps_to = /obj/item/cell/device/weapon/recharge/alien
robot_durability = 100
/obj/item/cell/void/attack_self(var/mob/user)
user.remove_from_mob(src)
to_chat(user, span_notice("You swap [src] to 'device cell' mode."))
var/obj/item/cell/newcell = new swaps_to(null)
user.put_in_active_hand(newcell)
var/percentage = charge/maxcharge
newcell.charge = newcell.maxcharge * percentage
newcell.persist_storable = persist_storable
qdel(src)
/obj/item/cell/void/hybrid
icon = 'icons/obj/power_vr.dmi'
icon_state = "cellb"
swaps_to = /obj/item/cell/device/weapon/recharge/alien/hybrid
@@ -0,0 +1,133 @@
/decl/chemical_reaction/instant/virus_food_mutagen
name = "mutagenic agar"
id = "mutagenvirusfood"
result = "mutagenvirusfood"
required_reagents = list("mutagen" = 1, "virusfood" = 1)
result_amount = 1
/decl/chemical_reaction/instant/virus_food_adranol
name = "virus rations"
id = "adranolvirusfood"
result = "adranolvirusfood"
required_reagents = list("adranol" = 1, "virusfood" = 1)
result_amount = 1
/decl/chemical_reaction/instant/virus_food_phoron
name = "phoronic virus food"
id = "phoronvirusfood"
result = "phoronvirusfood"
required_reagents = list("phoron" = 1, "virusfood" = 1)
result_amount = 1
/decl/chemical_reaction/instant/virus_food_phoron_adranol
name = "weakened phoronic virus food"
id = "weakphoronvirusfood"
result = "weakphoronvirusfood"
required_reagents = list("adranol" = 1, "phoronvirusfood" = 1)
result_amount = 2
/decl/chemical_reaction/instant/virus_food_mutagen_sugar
name = "sucrose agar"
id = "sugarvirusfood"
result = "sugarvirusfood"
required_reagents = list("sugar" = 1, "mutagenvirusfood" = 1)
result_amount = 2
/decl/chemical_reaction/instant/virus_food_mutagen_inaprovaline
name = "sucrose agar"
id = "inaprovalinevirusfood"
result = "sugarvirusfood"
required_reagents = list("inaprovaline" = 1, "mutagenvirusfood" = 1)
result_amount = 2
/decl/chemical_reaction/instant/mix_virus
name = "Mix Virus"
id = "mixvirus"
required_reagents = list("virusfood" = 1)
catalysts = list("blood" = 1)
var/level_min = 0
var/level_max = 2
/decl/chemical_reaction/instant/mix_virus/on_reaction(datum/reagents/holder)
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in holder.reagent_list
if(B && B.data)
var/datum/disease/advance/D = locate(/datum/disease/advance) in B.data["viruses"]
if(D)
D.Evolve(level_min, level_max)
/decl/chemical_reaction/instant/mix_virus/mix_virus_2
name = "Mix Virus 2"
id = "mixvirus2"
required_reagents = list("mutagen" = 1)
level_min = 2
level_max = 4
/decl/chemical_reaction/instant/mix_virus/mix_virus_3
name = "Mix Virus 3"
id = "mixvirus3"
required_reagents = list("phoron" = 1)
level_min = 4
level_max = 6
/decl/chemical_reaction/instant/mix_virus/mix_virus_4
name = "Mix Virus 4"
id = "mixvirus4"
required_reagents = list("uranium" = 1)
level_min = 5
level_max = 6
/decl/chemical_reaction/instant/mix_virus/mix_virus_5
name = "Mix Virus 5"
id = "mixvirus5"
required_reagents = list("mutagenvirusfood" = 1)
level_min = 3
level_max = 3
/decl/chemical_reaction/instant/mix_virus/mix_virus_6
name = "Mix Virus 6"
id = "mixvirus6"
required_reagents = list("sugarvirusfood" = 1)
level_min = 4
level_max = 4
/decl/chemical_reaction/instant/mix_virus/mix_virus_7
name = "Mix Virus 7"
id = "mixvirus7"
required_reagents = list("weakphoronvirusfood" = 1)
level_min = 5
level_max = 5
/decl/chemical_reaction/instant/mix_virus/mix_virus_8
name = "Mix Virus 8"
id = "mixvirus8"
required_reagents = list("phoronvirusfood" = 1)
level_min = 6
level_max = 6
/decl/chemical_reaction/instant/mix_virus/mix_virus_9
name = "Mix Virus 9"
id = "mixvirus9"
required_reagents = list("adranolvirusfood" = 1)
level_min = 1
level_max = 1
/decl/chemical_reaction/instant/mix_virus/rem_virus
name = "Devolve Virus"
id = "remvirus"
required_reagents = list("adranol" = 1)
catalysts = list("blood" = 1)
/decl/chemical_reaction/instant/mix_virus/rem_virus/on_reaction(var/datum/reagents/holder)
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in holder.reagent_list
if(B && B.data)
var/datum/disease/advance/D = locate(/datum/disease/advance) in B.data["viruses"]
if(D)
D.Devolve()
/decl/chemical_reaction/instant/antibodies
name = "Antibodies"
id = "antibodiesmix"
result = "antibodies"
required_reagents = list("vaccine")
catalysts = list("inaprovaline" = 0.1)
result_amount = 0.5
@@ -39,17 +39,16 @@
/obj/item/storage/secure/safe,
/obj/machinery/iv_drip,
/obj/structure/medical_stand, //VOREStation Add,
/obj/machinery/disease2/incubator,
/obj/machinery/disposal,
/mob/living/simple_mob/animal/passive/cow,
/mob/living/simple_mob/animal/goat,
/obj/machinery/computer/centrifuge,
/obj/machinery/sleeper,
/obj/machinery/smartfridge/,
/obj/machinery/biogenerator,
/obj/structure/frame,
/obj/machinery/radiocarbon_spectrometer,
/obj/machinery/portable_atmospherics/powered/reagent_distillery
/obj/machinery/portable_atmospherics/powered/reagent_distillery,
/obj/machinery/computer/pandemic
)
/obj/item/reagent_containers/glass/Initialize()
@@ -381,5 +381,4 @@
/obj/item/reagent_containers/hypospray/autoinjector/biginjector/contaminated/do_injection(mob/living/carbon/human/H, mob/living/user)
. = ..()
if(.) // Will occur if successfully injected.
infect_mob_random_lesser(H)
add_attack_logs(user, H, "Infected \the [H] with \the [src], by \the [user].")
@@ -32,7 +32,7 @@
var/used = FALSE
var/dirtiness = 0
var/list/targets
var/list/datum/disease2/disease/viruses
var/list/datum/disease/viruses
drop_sound = 'sound/items/drop/glass.ogg'
pickup_sound = 'sound/items/pickup/glass.ogg'
@@ -402,10 +402,10 @@
targets |= hash
//Grab any viruses they have
if(iscarbon(target) && LAZYLEN(target.virus2.len))
if(iscarbon(target) && LAZYLEN(target.viruses.len))
LAZYINITLIST(viruses)
var/datum/disease2/disease/virus = pick(target.virus2.len)
viruses[hash] = virus.getcopy()
var/datum/disease/virus = pick(target.viruses.len)
viruses[hash] = virus.Copy()
//Dirtiness should be very low if you're the first injectee. If you're spam-injecting 4 people in a row around you though,
//This gives the last one a 30% chance of infection.
@@ -421,8 +421,8 @@
if(LAZYLEN(viruses) && prob(75))
var/old_hash = pick(viruses)
if(hash != old_hash) //Same virus you already had?
var/datum/disease2/disease/virus = viruses[old_hash]
infect_virus2(target,virus.getcopy())
var/datum/disease/virus = viruses[old_hash]
target.ContractDisease(virus)
if(!used)
START_PROCESSING(SSobj, src)
@@ -0,0 +1,26 @@
/obj/item/reagent_containers/glass/bottle/culture
name = "virus culture"
desc = "A bottle with a virus culture"
icon_state = "bottle-1"
var/list/data = list("donor" = null, "viruses" = null, "blood_DNA" = null, "blood_type" = null, "resistances" = null, "trace_chems" = null)
var/list/diseases = list()
/obj/item/reagent_containers/glass/bottle/culture/cold
name = "cold virus culture"
desc = "A bottle with the common cold culture"
/obj/item/reagent_containers/glass/bottle/culture/cold/Initialize()
. = ..()
diseases += new /datum/disease/advance/cold
data["viruses"] = diseases
reagents.add_reagent("blood", 10, data)
/obj/item/reagent_containers/glass/bottle/culture/flu
name = "flu virus culture"
desc = "A bottle with the flu culture"
/obj/item/reagent_containers/glass/bottle/culture/flu/Initialize()
. = ..()
diseases += new /datum/disease/advance/flu
data["viruses"] = diseases
reagents.add_reagent("blood", 10, data)
+62 -15
View File
@@ -23,9 +23,9 @@
/datum/reagent/blood/get_data() // Just in case you have a reagent that handles data differently.
var/t = data.Copy()
if(t["virus2"])
var/list/v = t["virus2"]
t["virus2"] = v.Copy()
if(t["viruses"])
var/list/v = t["viruses"]
t["viruses"] = v.Copy()
return t
/datum/reagent/blood/touch_turf(var/turf/simulated/T)
@@ -70,13 +70,16 @@
if(effective_dose > 15)
if(!is_vampire) //VOREStation Edit.
M.adjustToxLoss(removed) //VOREStation Edit.
if(data && data["virus2"])
var/list/vlist = data["virus2"]
if(data && data["viruses"])
var/list/vlist = data["viruses"]
if(vlist.len)
for(var/ID in vlist)
var/datum/disease2/disease/V = vlist[ID]
if(V.spreadtype == "Contact")
infect_virus2(M, V.getcopy())
if(!ID)
continue
var/datum/disease/D = ID
if((D.spread_flags & SPECIAL) || (D.spread_flags & NON_CONTAGIOUS))
continue
M.ContractDisease(D)
/datum/reagent/blood/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
if(ishuman(M))
@@ -86,15 +89,59 @@
if(alien == IS_SLIME)
affect_ingest(M, alien, removed)
return
if(data && data["virus2"])
var/list/vlist = data["virus2"]
if(data && data["viruses"])
var/list/vlist = data["viruses"]
if(vlist.len)
for(var/ID in vlist)
var/datum/disease2/disease/V = vlist[ID]
if(V.spreadtype == "Contact")
infect_virus2(M, V.getcopy())
if(data && data["antibodies"])
M.antibodies |= data["antibodies"]
var/datum/disease/D = ID
if((D.spread_flags & SPECIAL) || (D.spread_flags & NON_CONTAGIOUS))
continue
M.ContractDisease(D)
if(data && data["resistances"])
M.resistances |= data["resistances"]
/datum/reagent/blood/mix_data(newdata, newamount)
if(!data || !newdata)
return
if(data["viruses"] || newdata["viruses"])
var/list/mix1 = data["viruses"]
var/list/mix2 = newdata["viruses"]
var/list/to_mix = list()
var/list/preserve = list()
for(var/datum/disease/advance/AD in mix1)
to_mix += AD
for(var/datum/disease/advance/AD in mix2)
to_mix += AD
var/datum/disease/advance/mixed_AD = Advance_Mix(to_mix)
if(mixed_AD)
preserve += mixed_AD
for(var/datum/disease/D1 in mix1)
if(!istype(D1, /datum/disease/advance))
var/keep = TRUE
for(var/datum/disease/D2 in preserve)
if(D1.IsSame(D2))
keep = FALSE
break
if(keep)
preserve += D1
for(var/datum/disease/D1 in mix2)
if(!istype(D1, /datum/disease/advance))
var/keep = TRUE
for(var/datum/disease/D2 in preserve)
if(D1.IsSame(D2))
keep = FALSE
break
if(keep)
preserve += D1
data["viruses"] = preserve
/datum/reagent/blood/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_SLIME) //They don't have blood, so it seems weird that they would instantly 'process' the chemical like another species does.
+1 -14
View File
@@ -319,20 +319,7 @@
/datum/reagent/radium/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(issmall(M)) removed *= 2
M.apply_effect(10 * removed, IRRADIATE, 0) // Radium may increase your chances to cure a disease
if(M.virus2.len)
for(var/ID in M.virus2)
var/datum/disease2/disease/V = M.virus2[ID]
if(prob(5))
M.antibodies |= V.antigen
if(prob(50))
M.apply_effect(50, IRRADIATE, check_protection = 0) // curing it that way may kill you instead
var/absorbed = 0
var/obj/item/organ/internal/diona/nutrients/rad_organ = locate() in M.internal_organs
if(rad_organ && !rad_organ.is_broken())
absorbed = 1
if(!absorbed)
M.adjustToxLoss(100)
M.apply_effect(10 * removed, IRRADIATE, 0)
/datum/reagent/radium/touch_turf(var/turf/T)
..()
+12
View File
@@ -973,3 +973,15 @@
/datum/reagent/neurophage_nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
M.adjustBrainLoss(2 * removed) // Their job is to give you a bad time.
M.adjustBruteLoss(2 * removed)
/datum/reagent/salmonella
name = "Salmonella"
id = "salmonella"
description = "A nasty bacteria found in spoiled food."
reagent_state = LIQUID
color = "#1E4600"
taste_mult = 0
/datum/reagent/salmonella/on_mob_life(mob/living/carbon/M)
M.ForceContractDisease(new /datum/disease/food_poisoning(0))
return ..()
@@ -0,0 +1,47 @@
/datum/reagent/vaccine
name = "Vaccine"
id = "vaccine"
color = "#C81040"
taste_description = "antibodies"
/datum/reagent/vaccine/affect_blood(mob/living/carbon/M, alien, removed)
if(islist(data))
for(var/thing in M.GetViruses())
var/datum/disease/D = thing
if(D.GetDiseaseID() in data)
D.cure()
M.resistances |= data
/datum/reagent/vaccines/mix_data(newdata, newamount)
if(islist(newdata))
var/list/newdatalist = newdata
data |= newdatalist.Copy()
/datum/reagent/mutagen/mutagenvirusfood
name = "Mutagenic agar"
id = "mutagenvirusfood"
description = "mutates blood"
color = "#A3C00F"
/datum/reagent/mutagen/mutagenvirusfood/sugar
name = "Sucrose agar"
id = "sugarvirusfood"
color = "#41B0C0"
taste_mult = 1.5
/datum/reagent/medicine/adranol/adranolvirusfood
name = "Virus rations"
id = "adranolvirusfood"
description = "mutates blood"
color = "#D18AA5"
/datum/reagent/phoron_dust/phoronvirusfood
name = "Phoronic virus food"
id = "phoronvirusfood"
description = "mutates blood"
color = "#A69DA9"
/datum/reagent/phoron_dust/phoronvirusfood/weak
name = "Weakened phoronic virus food"
id = "weakphoronvirusfood"
color = "#CEC3C6"
-222
View File
@@ -1,222 +0,0 @@
/datum/disease2/disease/Topic(href, href_list)
. = ..()
if(.) return
if(href_list["info"])
// spawn or admin privileges to see info about viruses
if(!check_rights(R_ADMIN|R_SPAWN|R_EVENT)) return
to_chat(usr, "Infection chance: [infectionchance]; Speed: [speed]; Spread type: [spreadtype]")
to_chat(usr, "Affected species: [english_list(affected_species)]")
to_chat(usr, "Effects:")
for(var/datum/disease2/effectholder/E in effects)
to_chat(usr, "[E.stage]: [E.effect.name]; chance=[E.chance]; multiplier=[E.multiplier]")
to_chat(usr, "Antigens: [antigens2string(antigen)]; Resistance: [resistance]")
return 1
/datum/disease2/disease/vv_get_header()
. = list()
for(var/datum/disease2/effectholder/E in effects)
. += "[E.stage]: [E.effect.name]"
. = list({"
<b>[name()]</b><br><font size=1>
[jointext(., "<br>")]</font>
"})
/datum/disease2/disease/get_view_variables_options()
return ..() + {"
<option value='?src=\ref[src];info=1'>Show info</option>
"}
/datum/admins/var/datum/virus2_editor/virus2_editor_datum = new
/client/proc/virus2_editor()
set name = "Virus Editor"
set category = "Admin.Events"
if(!holder || !check_rights(R_SPAWN)) return // spawn privileges to create viruses
holder.virus2_editor_datum.show_ui(src)
/datum/virus2_editor
var/list/s = list(/datum/disease2/effect/invisible,/datum/disease2/effect/invisible,/datum/disease2/effect/invisible,/datum/disease2/effect/invisible)
var/list/s_chance = list(1,1,1,1)
var/list/s_multiplier = list(1,1,1,1)
var/species = list()
var/infectionchance = 70
var/spreadtype = "Contact"
var/list/antigens = list()
var/speed = 1
var/resistance = 10
var/mob/living/carbon/infectee = null
// this holds spawned viruses so that the "Info" links work after the proc exits
var/list/spawned_viruses = list()
/datum/virus2_editor/proc/select(mob/user, stage)
if(stage < 1 || stage > 4) return
var/list/L = list()
for(var/datum/disease2/effect/f as anything in subtypesof(/datum/disease2/effect))
if(initial(f.stage) <= stage)
L[initial(f.name)] = f
var/datum/disease2/effect/Eff = s[stage]
var/C = tgui_input_list(usr, "Select effect for stage [stage]:", "Stage [stage]", L, Eff)
if(!C) return
return L[C]
/datum/virus2_editor/proc/show_ui(mob/user)
var/H = {"
<center><h3>Virus2 Virus Editor</h3></center><br />
<b>Effects:</b><br />
"}
for(var/i = 1 to 4)
var/datum/disease2/effect/Eff = s[i]
H += {"
<a href='?src=\ref[src];[HrefToken()];what=effect;stage=[i];effect=1'>[initial(Eff.name)]</a>
Chance: <a href='?src=\ref[src];[HrefToken()];what=effect;stage=[i];chance=1'>[s_chance[i]]</a>
Multiplier: <a href='?src=\ref[src];[HrefToken()];what=effect;stage=[i];multiplier=1'>[s_multiplier[i]]</a>
<br />
"}
H += {"
<br />
<b>Infectable Species:</b><br />
"}
var/f = 1
for(var/k in GLOB.all_species)
var/datum/species/S = GLOB.all_species[k]
if(S.get_virus_immune())
continue
if(!f) H += " | "
else f = 0
H += "<a href='?src=\ref[src];[HrefToken()];what=species;toggle=[k]' style='color:[(k in species) ? "#006600" : "#ff0000"]'>[k]</a>"
H += {"
<a href="?src=\ref[src];[HrefToken()];what=species;reset=1" style="color:#0000aa">Reset</a>
<br />
<b>Infection Chance:</b> <a href="?src=\ref[src];[HrefToken()];what=ichance">[infectionchance]</a><br />
<b>Spread Type:</b> <a href="?src=\ref[src];[HrefToken()];what=stype">[spreadtype]</a><br />
<b>Speed:</b> <a href="?src=\ref[src];[HrefToken()];what=speed">[speed]</a><br />
<b>Resistance:</b> <a href="?src=\ref[src];[HrefToken()];what=resistance">[resistance]</a><br />
<br />
"}
f = 1
for(var/k in ALL_ANTIGENS)
if(!f) H += " | "
else f = 0
H += "<a href='?src=\ref[src];[HrefToken()];what=antigen;toggle=[k]' style='color:[(k in antigens) ? "#006600" : "#ff0000"]'>[k]</a>"
H += {"
<a href="?src=\ref[src];[HrefToken()];what=antigen;reset=1" style="color:#0000aa">Reset</a>
<br />
<hr />
<b>Initial infectee:</b> <a href="?src=\ref[src];[HrefToken()];what=infectee">[infectee ? infectee : "(choose)"]</a>
<a href="?src=\ref[src];[HrefToken()];what=go" style="color:#ff0000">RELEASE</a>
"}
user << browse(H, "window=virus2edit")
/datum/virus2_editor/Topic(href, href_list)
switch(href_list["what"])
if("effect")
var/stage = text2num(href_list["stage"])
if(href_list["effect"])
var/datum/disease2/effect/E = select(usr,stage)
if(!E) return
s[stage] = E
// set a default chance and multiplier of half the maximum (roughly average)
s_chance[stage] = max(1, round(initial(E.chance_maxm)/2))
s_multiplier[stage] = max(1, round(initial(E.maxm)/2))
else if(href_list["chance"])
var/datum/disease2/effect/Eff = s[stage]
var/I = tgui_input_number(usr, "Chance, per tick, of this effect happening (min 0, max [initial(Eff.chance_maxm)])", "Effect Chance", s_chance[stage], initial(Eff.chance_maxm), 0)
if(I == null || I < 0 || I > initial(Eff.chance_maxm)) return
s_chance[stage] = I
else if(href_list["multiplier"])
var/datum/disease2/effect/Eff = s[stage]
var/I = tgui_input_number(usr, "Multiplier for this effect (min 1, max [initial(Eff.maxm)])", "Effect Multiplier", s_multiplier[stage], initial(Eff.maxm), 1)
if(I == null || I < 1 || I > initial(Eff.maxm)) return
s_multiplier[stage] = I
if("species")
if(href_list["toggle"])
var/T = href_list["toggle"]
if(T in species)
species -= T
else
species |= T
else if(href_list["reset"])
species = list()
if(infectee)
if(!infectee.species || !(infectee.species.get_bodytype() in species))
infectee = null
if("ichance")
var/I = tgui_input_number(usr, "Input infection chance", "Infection Chance", infectionchance, 100)
if(!I) return
infectionchance = I
if("stype")
var/S = tgui_alert(usr, "Which spread type?", "Spread Type", list("Contact", "Airborne", "Blood"))
if(!S) return
spreadtype = S
if("speed")
var/S = tgui_input_number(usr, "Input speed", "Speed", speed)
if(!S) return
speed = S
if("antigen")
if(href_list["toggle"])
var/T = href_list["toggle"]
if(length(T) != 1) return
if(T in antigens)
antigens -= T
else
antigens |= T
else if(href_list["reset"])
antigens = list()
if("resistance")
var/S = tgui_input_number(usr, "Input % resistance to antibiotics", "Resistance", resistance, 100)
if(!S) return
resistance = S
if("infectee")
var/list/candidates = list()
for(var/mob/living/carbon/G in living_mob_list)
if(G.stat != DEAD && G.species && !isbelly(G.loc))
if(G.species.get_bodytype() in species)
candidates["[G.name][G.client ? "" : " (no client)"]"] = G
else
candidates["[G.name] ([G.species.get_bodytype()])[G.client ? "" : " (no client)"]"] = G
if(!candidates.len)
to_chat(usr, "No possible candidates found!")
var/I = tgui_input_list(usr, "Choose initial infectee", "Infectee", candidates)
if(!I || !candidates[I]) return
infectee = candidates[I]
species |= infectee.species.get_bodytype()
if("go")
if(!antigens.len)
var/a = tgui_alert(usr, "This disease has no antigens; it will be impossible to permanently immunise anyone without them.\
It is strongly recommended to set at least one antigen. Do you want to go back and edit your virus?", "Antigens", list("Yes", "No"))
if(!a || a == "Yes") return
var/datum/disease2/disease/D = new
D.infectionchance = infectionchance
D.spreadtype = spreadtype
D.antigen = antigens
D.affected_species = species
D.speed = speed
D.resistance = resistance
for(var/i in 1 to 4)
var/datum/disease2/effectholder/E = new
var/Etype = s[i]
E.effect = new Etype()
E.effect.generate()
E.chance = s_chance[i]
E.multiplier = s_multiplier[i]
E.stage = i
D.effects += E
spawned_viruses += D
message_admins(span_danger("[key_name_admin(usr)] infected [key_name_admin(infectee)] with a virus (<a href='?src=\ref[D];[HrefToken()];info=1'>Info</a>)"))
log_admin("[key_name_admin(usr)] infected [key_name_admin(infectee)] with a virus!")
infect_virus2(infectee, D, forced=1)
show_ui(usr)
-73
View File
@@ -1,73 +0,0 @@
/obj/machinery/disease2/diseaseanalyser
name = "disease analyser"
desc = "Analyzes diseases to find out information about them!"
icon = 'icons/obj/virology_vr.dmi' //VOREStation Edit
icon_state = "analyser"
anchored = TRUE
density = TRUE
var/scanning = 0
var/pause = 0
var/obj/item/virusdish/dish = null
/obj/machinery/disease2/diseaseanalyser/attackby(var/obj/O as obj, var/mob/user as mob)
if(default_unfasten_wrench(user, O, 20))
return
else if(!istype(O,/obj/item/virusdish)) return
if(dish)
to_chat(user, "\The [src] is already loaded.")
return
dish = O
user.drop_item()
O.loc = src
user.visible_message("[user] adds \a [O] to \the [src]!", "You add \a [O] to \the [src]!")
/obj/machinery/disease2/diseaseanalyser/process()
if(stat & (NOPOWER|BROKEN))
return
if(scanning)
scanning -= 1
if(scanning == 0)
if (dish.virus2.addToDB())
ping("\The [src] pings, \"New pathogen added to data bank.\"")
var/obj/item/paper/P = new /obj/item/paper(src.loc)
P.name = "paper - [dish.virus2.name()]"
var/r = dish.virus2.get_info()
P.info = {"
[virology_letterhead("Post-Analysis Memo")]
[r]
<hr>
<u>Additional Notes:</u>&nbsp;
"}
dish.basic_info = dish.virus2.get_basic_info()
dish.info = r
dish.name = "[initial(dish.name)] ([dish.virus2.name()])"
dish.analysed = 1
dish.loc = src.loc
dish = null
icon_state = "analyser"
src.state("\The [src] prints a sheet of paper.")
else if(dish && !scanning && !pause)
if(dish.virus2 && dish.growth > 50)
dish.growth -= 10
scanning = 5
icon_state = "analyser_processing"
else
pause = 1
spawn(25)
dish.loc = src.loc
dish = null
src.state("\The [src] buzzes, \"Insufficient growth density to complete analysis.\"")
pause = 0
return
-26
View File
@@ -1,26 +0,0 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
var/global/list/ALL_ANTIGENS = list(
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"
)
/hook/startup/proc/randomise_antigens_order()
ALL_ANTIGENS = shuffle(ALL_ANTIGENS)
return 1
// iterate over the list of antigens and see what matches
/proc/antigens2string(list/antigens, none="None")
if(!istype(antigens))
CRASH("Illegal type!")
if(!antigens.len)
return none
var/code = ""
for(var/V in ALL_ANTIGENS)
if(V in antigens)
code += V
if(!code)
return none
return code
@@ -1,20 +0,0 @@
/obj/machinery/disease2/biodestroyer
name = "Biohazard destroyer"
icon = 'icons/obj/pipes/disposal.dmi'
icon_state = "disposalbio"
var/list/accepts = list(/obj/item/clothing,/obj/item/virusdish/,/obj/item/cureimplanter,/obj/item/diseasedisk,/obj/item/reagent_containers)
density = TRUE
anchored = TRUE
/obj/machinery/disease2/biodestroyer/attackby(var/obj/I as obj, var/mob/user as mob)
for(var/path in accepts)
if(I.type in typesof(path))
user.drop_item()
qdel(I)
add_overlay("dispover-handle")
return
user.drop_item()
I.loc = src.loc
for(var/mob/O in hearers(src, null))
O.show_message(span_blue("[icon2html(src, O.client)] The [src.name] beeps."), 2)
-208
View File
@@ -1,208 +0,0 @@
/obj/machinery/computer/centrifuge
name = "isolation centrifuge"
desc = "Used to separate things with different weight. Spin 'em round, round, right round."
icon = 'icons/obj/virology_vr.dmi' //VOREStation Edit
icon_state = "centrifuge"
var/curing
var/isolating
var/obj/item/reagent_containers/glass/beaker/vial/sample = null
var/datum/disease2/disease/virus2 = null
/obj/machinery/computer/centrifuge/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(O.has_tool_quality(TOOL_SCREWDRIVER))
return ..(O,user)
if(default_unfasten_wrench(user, O, 20))
return
if(istype(O,/obj/item/reagent_containers/glass/beaker/vial))
if(sample)
to_chat(user, "\The [src] is already loaded.")
return
sample = O
user.drop_item()
O.loc = src
user.visible_message("[user] adds \a [O] to \the [src]!", "You add \a [O] to \the [src]!")
SStgui.update_uis(src)
src.attack_hand(user)
/obj/machinery/computer/centrifuge/update_icon()
..()
if(! (stat & (BROKEN|NOPOWER)) && (isolating || curing))
icon_state = "centrifuge_moving"
/obj/machinery/computer/centrifuge/attack_hand(var/mob/user as mob)
if(..())
return
tgui_interact(user)
/obj/machinery/computer/centrifuge/tgui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "IsolationCentrifuge", name)
ui.open()
/obj/machinery/computer/centrifuge/tgui_data(mob/user)
var/list/data = list()
data["antibodies"] = null
data["pathogens"] = list()
data["is_antibody_sample"] = null
data["busy"] = null
data["sample_inserted"] = !!sample
if(curing)
data["busy"] = "Isolating antibodies..."
else if(isolating)
data["busy"] = "Isolating pathogens..."
else
if(sample)
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
if(B)
data["antibodies"] = antigens2string(B.data["antibodies"], none=null)
var/list/pathogens[0]
var/list/virus = B.data["virus2"]
for (var/ID in virus)
var/datum/disease2/disease/V = virus[ID]
pathogens.Add(list(list("name" = V.name(), "spread_type" = V.spreadtype, "reference" = "\ref[V]")))
data["pathogens"] = pathogens
else
var/datum/reagent/antibodies/A = locate(/datum/reagent/antibodies) in sample.reagents.reagent_list
if(A)
data["antibodies"] = antigens2string(A.data["antibodies"], none=null)
data["is_antibody_sample"] = 1
return data
/obj/machinery/computer/centrifuge/process()
..()
if(stat & (NOPOWER|BROKEN)) return
if(curing)
curing -= 1
if(curing == 0)
cure()
if(isolating)
isolating -= 1
if(isolating == 0)
isolate()
/obj/machinery/computer/centrifuge/tgui_act(action, params)
if(..())
return TRUE
var/mob/user = usr
add_fingerprint(user)
switch(action)
if("print")
print(user)
. = TRUE
if("isolate")
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
if(B)
var/datum/disease2/disease/virus = locate(params["isolate"])
virus2 = virus.getcopy()
isolating = 40
update_icon()
. = TRUE
if("antibody")
var/delay = 20
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
if(!B)
state("\The [src] buzzes, \"No antibody carrier detected.\"", "blue")
return TRUE
var/has_toxins = locate(/datum/reagent/toxin) in sample.reagents.reagent_list
var/has_radium = sample.reagents.has_reagent("radium")
if(has_toxins || has_radium)
state("\The [src] beeps, \"Pathogen purging speed above nominal.\"", "blue")
if(has_toxins)
delay = delay/2
if(has_radium)
delay = delay/2
curing = round(delay)
playsound(src, 'sound/machines/juicer.ogg', 50, 1)
update_icon()
. = TRUE
if("sample")
if(sample)
sample.loc = src.loc
sample = null
. = TRUE
/obj/machinery/computer/centrifuge/proc/cure()
if(!sample) return
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
if(!B) return
var/list/data = list("antibodies" = B.data["antibodies"])
var/amt= sample.reagents.get_reagent_amount("blood")
sample.reagents.remove_reagent("blood", amt)
sample.reagents.add_reagent("antibodies", amt, data)
SStgui.update_uis(src)
update_icon()
ping("\The [src] pings, \"Antibody isolated.\"")
/obj/machinery/computer/centrifuge/proc/isolate()
if(!sample) return
var/obj/item/virusdish/dish = new/obj/item/virusdish(loc)
dish.virus2 = virus2
virus2 = null
SStgui.update_uis(src)
update_icon()
ping("\The [src] pings, \"Pathogen isolated.\"")
/obj/machinery/computer/centrifuge/proc/print(var/mob/user)
var/obj/item/paper/P = new /obj/item/paper(loc)
P.name = "paper - Pathology Report"
P.info = {"
[virology_letterhead("Pathology Report")]
<large><u>Sample:</u></large> [sample.name]<br>
"}
if(user)
P.info += "<u>Generated By:</u> [user.name]<br>"
P.info += "<hr>"
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
if(B)
P.info += "<u>Antibodies:</u> "
P.info += antigens2string(B.data["antibodies"])
P.info += "<br>"
var/list/virus = B.data["virus2"]
P.info += "<u>Pathogens:</u> <br>"
if(virus.len > 0)
for (var/ID in virus)
var/datum/disease2/disease/V = virus[ID]
P.info += "[V.name()]<br>"
else
P.info += "None<br>"
else
var/datum/reagent/antibodies/A = locate(/datum/reagent/antibodies) in sample.reagents.reagent_list
if(A)
P.info += "The following antibodies have been isolated from the blood sample: "
P.info += antigens2string(A.data["antibodies"])
P.info += "<br>"
P.info += {"
<hr>
<u>Additional Notes:</u> <field>
"}
state("The nearby computer prints out a pathology report.")

Some files were not shown because too many files have changed in this diff Show More