mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-14 16:44:33 +01:00
@@ -70,7 +70,6 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/secrets,
|
||||
/client/proc/change_human_appearance_admin, /* Allows an admin to change the basic appearance of human-based mobs */
|
||||
/client/proc/change_human_appearance_self, /* Allows the human-based mob itself change its basic appearance */
|
||||
/client/proc/virus_2_creator,
|
||||
/client/proc/debug_variables
|
||||
)
|
||||
var/list/admin_verbs_ban = list(
|
||||
@@ -576,43 +575,16 @@ var/list/admin_verbs_proccall = list (
|
||||
log_admin("[key_name(usr)] gave [key_name(T)] the spell [S].")
|
||||
message_admins("[key_name_admin(usr)] gave [key_name(T)] the spell [S].", 1)
|
||||
|
||||
|
||||
/client/proc/give_disease2(mob/T as mob in mob_list) // -- Giacom
|
||||
/client/proc/give_disease(mob/T in mob_list)
|
||||
set category = "Event"
|
||||
set name = "Give Disease"
|
||||
set desc = "Gives a Disease to a mob."
|
||||
|
||||
if(!check_rights(R_EVENT))
|
||||
return
|
||||
|
||||
var/datum/disease2/disease/D = new /datum/disease2/disease()
|
||||
|
||||
var/severity = 1
|
||||
var/greater = input("Is this a lesser, greater, or badmin disease?", "Give Disease") in list("Lesser", "Greater", "Badmin")
|
||||
switch(greater)
|
||||
if ("Lesser") severity = 1
|
||||
if ("Greater") severity = 2
|
||||
if ("Badmin") severity = 99
|
||||
|
||||
D.makerandom(severity)
|
||||
|
||||
D.spreadtype = input("What method of contagion should the disease have?", "Give Disease") in list("Airborne","Contact","Injection")
|
||||
|
||||
D.infectionchance = input("How virulent is this disease? (1-100)", "Give Disease", D.infectionchance) as num
|
||||
|
||||
if(istype(T,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = T
|
||||
if (H.species)
|
||||
D.affected_species = list(H.species.name)
|
||||
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("[key_name_admin(usr)] gave [key_name(T)] a [greater] disease2 with infection chance [D.infectionchance].")
|
||||
var/datum/disease/D = input("Choose the disease to give to that guy", "ACHOO") as null|anything in diseases
|
||||
if(!D) return
|
||||
T.ForceContractDisease(new D)
|
||||
feedback_add_details("admin_verb","GD") //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)] the disease [D].")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] gave [key_name(T)] the disease [D].</span>")
|
||||
|
||||
/client/proc/make_sound(var/obj/O in view()) // -- TLE
|
||||
set category = "Event"
|
||||
@@ -860,19 +832,6 @@ var/list/admin_verbs_proccall = list (
|
||||
H.change_appearance(APPEARANCE_ALL, H.loc, check_species_whitelist = 1)
|
||||
feedback_add_details("admin_verb","CMAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/virus_2_creator()
|
||||
set name = "Virus2 Creator"
|
||||
set desc = "Allows you to create and spread custom viruses."
|
||||
set category = "Admin"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/datum/nano_module/virus2/virus2 = new()
|
||||
virus2.ui_interact(usr, state = admin_state)
|
||||
log_and_message_admins("has opened the virus2 creator.")
|
||||
feedback_add_details("admin_verb","VS2C")
|
||||
|
||||
/client/proc/free_slot()
|
||||
set name = "Free Job Slot"
|
||||
set category = "Admin"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
icon_state = "paramedic-vest"
|
||||
item_state = "paramedic-vest"
|
||||
allowed = list(/obj/item/stack/medical, /obj/item/weapon/reagent_containers/dropper, /obj/item/weapon/reagent_containers/hypospray, /obj/item/weapon/reagent_containers/syringe, \
|
||||
/obj/item/device/healthanalyzer, /obj/item/device/antibody_scanner, /obj/item/device/flashlight, /obj/item/device/radio, /obj/item/weapon/tank/emergency_oxygen,/obj/item/device/rad_laser)
|
||||
/obj/item/device/healthanalyzer, /obj/item/device/flashlight, /obj/item/device/radio, /obj/item/weapon/tank/emergency_oxygen,/obj/item/device/rad_laser)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 10)
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
@@ -22,7 +22,7 @@
|
||||
icon_state = "brigphysician-vest"
|
||||
item_state = "brigphysician-vest"
|
||||
allowed = list(/obj/item/stack/medical, /obj/item/weapon/reagent_containers/dropper, /obj/item/weapon/reagent_containers/hypospray, /obj/item/weapon/reagent_containers/syringe, \
|
||||
/obj/item/device/healthanalyzer, /obj/item/device/antibody_scanner, /obj/item/device/flashlight, \
|
||||
/obj/item/device/healthanalyzer, /obj/item/device/flashlight, \
|
||||
/obj/item/device/radio, /obj/item/weapon/tank/emergency_oxygen,/obj/item/device/rad_laser)
|
||||
armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0)
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
item_state = "fr_jacket_open"
|
||||
blood_overlay_type = "armor"
|
||||
allowed = list(/obj/item/stack/medical, /obj/item/weapon/reagent_containers/dropper, /obj/item/weapon/reagent_containers/hypospray, /obj/item/weapon/reagent_containers/syringe, \
|
||||
/obj/item/device/healthanalyzer, /obj/item/device/antibody_scanner, /obj/item/device/flashlight, /obj/item/device/radio, /obj/item/weapon/tank/emergency_oxygen,/obj/item/device/rad_laser)
|
||||
/obj/item/device/healthanalyzer, /obj/item/device/flashlight, /obj/item/device/radio, /obj/item/weapon/tank/emergency_oxygen,/obj/item/device/rad_laser)
|
||||
ignore_suitadjust = 0
|
||||
suit_adjusted = 1
|
||||
action_button_name = "Button/Unbutton Jacket"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
suit_adjusted = 1
|
||||
blood_overlay_type = "coat"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
|
||||
allowed = list(/obj/item/device/analyzer,/obj/item/device/antibody_scanner,/obj/item/stack/medical,/obj/item/weapon/dnainjector,/obj/item/weapon/reagent_containers/dropper,/obj/item/weapon/reagent_containers/syringe,/obj/item/weapon/reagent_containers/hypospray,/obj/item/device/healthanalyzer,/obj/item/device/flashlight/pen,/obj/item/weapon/reagent_containers/glass/bottle,/obj/item/weapon/reagent_containers/glass/beaker,/obj/item/weapon/reagent_containers/food/pill,/obj/item/weapon/storage/pill_bottle,/obj/item/weapon/paper,/obj/item/device/rad_laser)
|
||||
allowed = list(/obj/item/device/analyzer,/obj/item/stack/medical,/obj/item/weapon/dnainjector,/obj/item/weapon/reagent_containers/dropper,/obj/item/weapon/reagent_containers/syringe,/obj/item/weapon/reagent_containers/hypospray,/obj/item/device/healthanalyzer,/obj/item/device/flashlight/pen,/obj/item/weapon/reagent_containers/glass/bottle,/obj/item/weapon/reagent_containers/glass/beaker,/obj/item/weapon/reagent_containers/food/pill,/obj/item/weapon/storage/pill_bottle,/obj/item/weapon/paper,/obj/item/device/rad_laser)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 50, rad = 0)
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
|
||||
@@ -116,7 +116,6 @@
|
||||
dat += text("\n<A href='?src=\ref[];print_p=1'>Print Record</A><BR>\n<A href='?src=\ref[];screen=2'>Back</A><BR>", src, src)
|
||||
if(5.0)
|
||||
dat += "<CENTER><B>Virus Database</B></CENTER>"
|
||||
/* Advanced diseases is weak! Feeble! Glory to virus2!
|
||||
for(var/Dt in typesof(/datum/disease/))
|
||||
var/datum/disease/Dis = new Dt(0)
|
||||
if(istype(Dis, /datum/disease/advance))
|
||||
@@ -124,11 +123,6 @@
|
||||
if(!Dis.desc)
|
||||
continue
|
||||
dat += "<br><a href='?src=\ref[src];vir=[Dt]'>[Dis.name]</a>"
|
||||
*/
|
||||
for (var/ID in virusDB)
|
||||
var/datum/data/record/v = virusDB[ID]
|
||||
dat += "<br><a href='?src=\ref[src];vir=\ref[v]'>[v.fields["name"]]</a>"
|
||||
|
||||
dat += "<br><a href='?src=\ref[src];screen=1'>Back</a>"
|
||||
if(6.0)
|
||||
dat += "<center><b>Medical Robot Monitor</b></center>"
|
||||
|
||||
@@ -151,7 +151,6 @@ var/list/event_last_fired = list()
|
||||
//new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grid Check", /datum/event/grid_check, 200, list(ASSIGNMENT_ENGINEER = 60)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Electrical Storm", /datum/event/electrical_storm, 250, list(ASSIGNMENT_ENGINEER = 20, ASSIGNMENT_JANITOR = 150)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Radiation Storm", /datum/event/radiation_storm, 0, list(ASSIGNMENT_MEDICAL = 50), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 150)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation", /datum/event/spider_infestation, 100, list(ASSIGNMENT_SECURITY = 30), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Ion Storm", /datum/event/ion_storm, 0, list(ASSIGNMENT_AI = 50, ASSIGNMENT_CYBORG = 50, ASSIGNMENT_ENGINEER = 15, ASSIGNMENT_SCIENTIST = 5)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Borer Infestation", /datum/event/borer_infestation, 40, list(ASSIGNMENT_SECURITY = 30), 1),
|
||||
@@ -179,7 +178,6 @@ var/list/event_last_fired = list()
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Nothing", /datum/event/nothing, 1320),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Carp Migration", /datum/event/carp_migration, 0, list(ASSIGNMENT_SECURITY = 3), 1),
|
||||
//new /datum/event_meta(EVENT_LEVEL_MAJOR, "Containment Breach", /datum/event/prison_break/station, 0, list(ASSIGNMENT_ANY = 5)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Viral Infection", /datum/event/viral_infection, 0, list(ASSIGNMENT_MEDICAL = 30), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Blob", /datum/event/blob, 0, list(ASSIGNMENT_ENGINEER = 30), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Meteor Wave", /datum/event/meteor_wave, 0, list(ASSIGNMENT_ENGINEER = 3), 1),
|
||||
new /datum/event_meta/alien(EVENT_LEVEL_MAJOR, "Alien Infestation", /datum/event/alien_infestation, 0, list(ASSIGNMENT_SECURITY = 30), 1),
|
||||
|
||||
@@ -651,13 +651,6 @@ datum/recipe/microwave/slimesandwich
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/sashimi
|
||||
|
||||
// Fuck Science!
|
||||
/datum/recipe/microwave/ruinedvirusdish
|
||||
items = list(
|
||||
/obj/item/weapon/virusdish
|
||||
)
|
||||
result = /obj/item/weapon/ruinedvirusdish
|
||||
|
||||
/datum/recipe/microwave/mashedtaters
|
||||
fruit = list("potato" = 1)
|
||||
reagents = list("gravy" = 5)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
var/sheet_per_ore = 1
|
||||
var/point_upgrade = 1
|
||||
var/list/ore_values = list(("sand" = 1), ("iron" = 1), ("plasma" = 15), ("silver" = 16), ("gold" = 18), ("uranium" = 30), ("diamond" = 50), ("bananium" = 60), ("tranquillite" = 60))
|
||||
var/list/supply_consoles = list("Science", "Robotics", "Research Director's Desk", "Mechanic", "Engineering" = list("metal", "glass", "plasma"), "Chief Engineer's Desk" = list("metal", "glass", "plasma"), "Atmospherics" = list("metal", "glass", "plasma"), "Bar" = list("uranium", "plasma"))
|
||||
var/list/supply_consoles = list("Science", "Robotics", "Research Director's Desk", "Mechanic", "Engineering" = list("metal", "glass", "plasma"), "Chief Engineer's Desk" = list("metal", "glass", "plasma"), "Atmospherics" = list("metal", "glass", "plasma"), "Bar" = list("uranium", "plasma"), "Virology" = list("uranium", "gold"))
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/New()
|
||||
..()
|
||||
|
||||
@@ -92,6 +92,42 @@
|
||||
|
||||
#undef STOMACH_ATTACK_DELAY
|
||||
|
||||
/mob/living/carbon/proc/vomit(var/lost_nutrition = 10, var/blood = 0, var/stun = 1, var/distance = 0, var/message = 1)
|
||||
if(src.is_muzzled())
|
||||
if(message)
|
||||
src << "<span class='warning'>The muzzle prevents you from vomiting!</span>"
|
||||
return 0
|
||||
if(stun)
|
||||
Stun(4)
|
||||
if(nutrition < 100 && !blood)
|
||||
if(message)
|
||||
visible_message("<span class='warning'>[src] dry heaves!</span>", \
|
||||
"<span class='userdanger'>You try to throw up, but there's nothing your stomach!</span>")
|
||||
if(stun)
|
||||
Weaken(10)
|
||||
else
|
||||
if(message)
|
||||
visible_message("<span class='danger'>[src] throws up!</span>", \
|
||||
"<span class='userdanger'>You throw up!</span>")
|
||||
playsound(get_turf(src), 'sound/effects/splat.ogg', 50, 1)
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/i=0 to distance)
|
||||
if(blood)
|
||||
if(T)
|
||||
T.add_blood_floor(src)
|
||||
if(stun)
|
||||
adjustBruteLoss(3)
|
||||
else
|
||||
if(T)
|
||||
T.add_vomit_floor(src)
|
||||
nutrition -= lost_nutrition
|
||||
if(stun)
|
||||
adjustToxLoss(-3)
|
||||
T = get_step(T, dir)
|
||||
if (is_blocked_turf(T))
|
||||
break
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/gib()
|
||||
for(var/obj/item/organ/internal/I in internal_organs)
|
||||
if(isturf(loc))
|
||||
@@ -107,19 +143,6 @@
|
||||
visible_message("<span class='danger'>[M] bursts out of [src]!</span>")
|
||||
. = ..()
|
||||
|
||||
|
||||
/mob/living/carbon/attack_hand(mob/M as mob)
|
||||
if(!istype(M, /mob/living/carbon)) return
|
||||
if (ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
|
||||
if (H.hand)
|
||||
temp = H.organs_by_name["l_hand"]
|
||||
if(temp && !temp.is_usable())
|
||||
H << "\red You can't use your [temp.name]"
|
||||
return
|
||||
return
|
||||
|
||||
/mob/living/carbon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, override = 0, tesla_shock = 0)
|
||||
if(status_flags & GODMODE) //godmode
|
||||
return 0
|
||||
@@ -546,12 +569,12 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
|
||||
/mob/living/carbon/show_inv(mob/user)
|
||||
user.set_machine(src)
|
||||
|
||||
|
||||
var/dat = {"<table>
|
||||
<tr><td><B>Left Hand:</B></td><td><A href='?src=\ref[src];item=[slot_l_hand]'>[(l_hand && !(l_hand.flags&ABSTRACT)) ? l_hand : "<font color=grey>Empty</font>"]</A></td></tr>
|
||||
<tr><td><B>Right Hand:</B></td><td><A href='?src=\ref[src];item=[slot_r_hand]'>[(r_hand && !(r_hand.flags&ABSTRACT)) ? r_hand : "<font color=grey>Empty</font>"]</A></td></tr>
|
||||
<tr><td> </td></tr>"}
|
||||
|
||||
|
||||
dat += "<tr><td><B>Back:</B></td><td><A href='?src=\ref[src];item=[slot_back]'>[(back && !(back.flags&ABSTRACT)) ? back : "<font color=grey>Empty</font>"]</A>"
|
||||
if(istype(wear_mask, /obj/item/clothing/mask) && istype(back, /obj/item/weapon/tank))
|
||||
dat += " <A href='?src=\ref[src];internal=[slot_back]'>[internal ? "Disable Internals" : "Set Internals"]</A>"
|
||||
|
||||
@@ -23,4 +23,17 @@
|
||||
for(var/datum/surgery/S in surgeries)
|
||||
if(S.next_step(user, src))
|
||||
return 1
|
||||
..()
|
||||
..()
|
||||
|
||||
/mob/living/carbon/attack_hand(mob/living/carbon/human/user)
|
||||
if(!iscarbon(user))
|
||||
return
|
||||
|
||||
for(var/datum/disease/D in viruses)
|
||||
if(D.IsSpreadByTouch())
|
||||
user.ContractDisease(D)
|
||||
|
||||
for(var/datum/disease/D in user.viruses)
|
||||
if(D.IsSpreadByTouch())
|
||||
ContractDisease(D)
|
||||
return 0
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
var/list/stomach_contents = list()
|
||||
var/list/internal_organs = list()
|
||||
var/brain_op_stage = 0.0
|
||||
var/list/datum/disease2/disease/virus2 = list()
|
||||
var/antibodies = 0
|
||||
var/last_eating = 0 //Not sure what this does... I found it hidden in food.dm
|
||||
|
||||
|
||||
@@ -789,8 +789,6 @@
|
||||
for(var/mob/M in range(location,aoe_range))
|
||||
if (M.internal != null && M.wear_mask && (M.wear_mask.flags & AIRTIGHT))
|
||||
continue
|
||||
if(!airborne_can_reach(location,M,aoe_range))
|
||||
continue
|
||||
// Now, we don't have this:
|
||||
//new /obj/effects/fart_cloud(T,L)
|
||||
// But:
|
||||
|
||||
@@ -161,9 +161,6 @@
|
||||
if(ismob(AM))
|
||||
var/mob/tmob = AM
|
||||
|
||||
if(iscarbon(tmob) && prob(10))
|
||||
spread_disease_to(tmob, "Contact")
|
||||
|
||||
//BubbleWrap - Should stop you pushing a restrained person out of the way
|
||||
//i still don't get it, is this supposed to be 'bubblewrapping' or was it made by a guy named 'BubbleWrap'
|
||||
if(ishuman(tmob))
|
||||
@@ -1246,44 +1243,6 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/proc/vomit(hairball=0)
|
||||
if(stat==DEAD)return
|
||||
|
||||
if(!check_has_mouth())
|
||||
return
|
||||
|
||||
if(!lastpuke)
|
||||
lastpuke = 1
|
||||
src << "<spawn class='warning'>You feel nauseous..."
|
||||
spawn(150) //15 seconds until second warning
|
||||
src << "<spawn class='warning'>You feel like you are about to throw up!"
|
||||
spawn(100) //and you have 10 more for mad dash to the bucket
|
||||
Stun(5)
|
||||
|
||||
if(hairball)
|
||||
src.visible_message("<span class='warning'>[src] hacks up a hairball!</span>","<span class='warning'>You hack up a hairball!</span>")
|
||||
else
|
||||
src.visible_message("<span class='warning'>[src] throws up!</span>","<span class='warning'>You throw up!</span>")
|
||||
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
|
||||
|
||||
var/turf/location = loc
|
||||
if (istype(location, /turf/simulated))
|
||||
location.add_vomit_floor(src, 1)
|
||||
|
||||
var/stomach_len = src.stomach_contents.len
|
||||
if (stomach_len)
|
||||
var/content = src.stomach_contents[stomach_len]
|
||||
if (istype(content, /atom/movable))
|
||||
var/atom/movable/AM = content
|
||||
src.stomach_contents.Remove(AM)
|
||||
AM.loc = location
|
||||
|
||||
if(!hairball)
|
||||
nutrition -= 40
|
||||
adjustToxLoss(-3)
|
||||
spawn(350) //wait 35 seconds before next volley
|
||||
lastpuke = 0
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/get_visible_gender()
|
||||
if(wear_suit && wear_suit.flags_inv & HIDEJUMPSUIT && ((head && head.flags_inv & HIDEMASK) || wear_mask))
|
||||
@@ -1315,12 +1274,6 @@
|
||||
H.brainmob.mind.transfer_to(src)
|
||||
qdel(H)
|
||||
|
||||
|
||||
|
||||
for (var/ID in virus2)
|
||||
var/datum/disease2/disease/V = virus2[ID]
|
||||
V.cure(src)
|
||||
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/proc/is_lung_ruptured()
|
||||
|
||||
@@ -48,10 +48,6 @@
|
||||
apply_effect(4, WEAKEN, armor_block)
|
||||
|
||||
return
|
||||
else
|
||||
if(istype(M,/mob/living/carbon))
|
||||
// log_debug("No gloves, [M] is truing to infect [src]")
|
||||
M.spread_disease_to(src, "Contact")
|
||||
|
||||
var/datum/martial_art/attacker_style = M.martial_art
|
||||
|
||||
|
||||
@@ -64,8 +64,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
update_mutations()
|
||||
check_mutations=0
|
||||
|
||||
handle_virus_updates()
|
||||
|
||||
handle_shock()
|
||||
handle_pain()
|
||||
handle_heartbeat()
|
||||
@@ -345,12 +343,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
|
||||
if(breath)
|
||||
loc.assume_air(breath)
|
||||
//spread virus2
|
||||
if(virus2.len > 0)
|
||||
if(prob(10) && get_infection_chance(src))
|
||||
for(var/mob/living/carbon/M in view(1,src))
|
||||
src.spread_disease_to(M)
|
||||
|
||||
|
||||
|
||||
// USED IN DEATHWHISPERS
|
||||
@@ -955,7 +947,23 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
// Puke if toxloss is too high
|
||||
if(!stat)
|
||||
if (getToxLoss() >= 45 && nutrition > 20)
|
||||
vomit()
|
||||
lastpuke ++
|
||||
if(lastpuke >= 25) // about 25 second delay I guess
|
||||
Stun(5)
|
||||
|
||||
visible_message("<span class='danger'>[src] throws up!</span>", \
|
||||
"<span class='userdanger'>[src] throws up!</span>")
|
||||
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
|
||||
|
||||
var/turf/location = loc
|
||||
if (istype(location, /turf/simulated))
|
||||
location.add_vomit_floor(src, 1)
|
||||
|
||||
nutrition -= 20
|
||||
adjustToxLoss(-3)
|
||||
|
||||
// make it so you can only puke so fast
|
||||
lastpuke = 0
|
||||
|
||||
//0.1% chance of playing a scary sound to someone who's in complete darkness
|
||||
if(isturf(loc) && rand(1,1000) == 1)
|
||||
@@ -964,69 +972,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
if(L && L.lum_r + L.lum_g + L.lum_b == 0)
|
||||
playsound_local(src,pick(scarySounds),50, 1, -1)
|
||||
|
||||
// Separate proc so we can jump out of it when we've succeeded in spreading disease.
|
||||
/mob/living/carbon/human/proc/findAirborneVirii()
|
||||
for(var/obj/effect/decal/cleanable/blood/B in get_turf(src))
|
||||
if(B.virus2.len)
|
||||
for (var/ID in B.virus2)
|
||||
var/datum/disease2/disease/V = B.virus2[ID]
|
||||
if (infect_virus2(src,V))
|
||||
return 1
|
||||
|
||||
for(var/obj/effect/decal/cleanable/mucus/M in get_turf(src))
|
||||
if(M.virus2.len)
|
||||
for (var/ID in M.virus2)
|
||||
var/datum/disease2/disease/V = M.virus2[ID]
|
||||
if (infect_virus2(src,V))
|
||||
return 1
|
||||
|
||||
for(var/obj/effect/decal/cleanable/poop/P in get_turf(src))
|
||||
if(P.virus2.len)
|
||||
for (var/ID in P.virus2)
|
||||
var/datum/disease2/disease/V = P.virus2[ID]
|
||||
if (infect_virus2(src,V))
|
||||
return 1
|
||||
|
||||
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/proc/handle_virus_updates()
|
||||
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(mob_master.current_cycle % 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.getcopy())
|
||||
|
||||
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.getcopy())
|
||||
|
||||
|
||||
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
|
||||
if(V.antigen & src.antibodies)
|
||||
V.dead = 1
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/handle_changeling()
|
||||
if(mind)
|
||||
if(mind.changeling)
|
||||
@@ -1160,16 +1105,15 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
|
||||
for(var/mob/living/carbon/human/H in range(decaylevel, src))
|
||||
if(prob(5))
|
||||
if(airborne_can_reach(get_turf(src), get_turf(H)))
|
||||
if(istype(loc,/obj/item/bodybag))
|
||||
return
|
||||
var/obj/item/clothing/mask/M = H.wear_mask
|
||||
if(M && (M.flags & MASKCOVERSMOUTH))
|
||||
return
|
||||
if(H.species && H.species.flags & NO_BREATHE)
|
||||
return //no puking if you can't smell!
|
||||
H << "<spawn class='warning'>You smell something foul..."
|
||||
H.fakevomit()
|
||||
if(istype(loc,/obj/item/bodybag))
|
||||
return
|
||||
var/obj/item/clothing/mask/M = H.wear_mask
|
||||
if(M && (M.flags & MASKCOVERSMOUTH))
|
||||
return
|
||||
if(H.species && H.species.flags & NO_BREATHE)
|
||||
return //no puking if you can't smell!
|
||||
H << "<spawn class='warning'>You smell something foul..."
|
||||
H.fakevomit()
|
||||
|
||||
/mob/living/carbon/human/proc/handle_heartbeat()
|
||||
var/client/C = src.client
|
||||
|
||||
@@ -84,12 +84,7 @@
|
||||
|
||||
if(breath)
|
||||
loc.assume_air(breath)
|
||||
//spread virus2
|
||||
if(virus2.len > 0)
|
||||
if(prob(10) && get_infection_chance(src))
|
||||
for(var/mob/living/carbon/M in view(1,src))
|
||||
src.spread_disease_to(M)
|
||||
|
||||
air_update_turf()
|
||||
|
||||
//Third link in a breath chain, calls handle_breath_temperature()
|
||||
/mob/living/carbon/proc/check_breath(datum/gas_mixture/breath)
|
||||
|
||||
@@ -386,6 +386,9 @@
|
||||
C.handcuffed = initial(C.handcuffed)
|
||||
C.heart_attack = 0
|
||||
|
||||
for(var/datum/disease/D in C.viruses)
|
||||
D.cure(0)
|
||||
|
||||
// restore all of the human's blood and reset their shock stage
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/human_mob = src
|
||||
|
||||
+2
-10
@@ -6,6 +6,8 @@
|
||||
hud_used = null
|
||||
if(mind && mind.current == src)
|
||||
spellremove(src)
|
||||
for(var/infection in viruses)
|
||||
qdel(infection)
|
||||
ghostize()
|
||||
for(var/mob/dead/observer/M in following_mobs)
|
||||
M.following = null
|
||||
@@ -1387,16 +1389,6 @@ mob/proc/yank_out_object()
|
||||
location.add_vomit_floor(src, 1)
|
||||
playsound(location, 'sound/effects/splat.ogg', 50, 1)
|
||||
|
||||
/mob/proc/fakepoop() //for aesthetic craps. Whyyyyy -Fox
|
||||
if(stat==DEAD)
|
||||
return
|
||||
var/turf/location = loc
|
||||
if (istype(location, /turf/simulated))
|
||||
src.visible_message("<span class='warning'>[src] has explosive diarrhea all over the floor!</span>","<span class='warning'>You have explosive diarrhea all over the floor!</span>")
|
||||
location.add_poop_floor()
|
||||
playsound(location, 'sound/effects/splat.ogg', 50, 1)
|
||||
|
||||
|
||||
|
||||
/mob/proc/adjustEarDamage()
|
||||
return
|
||||
|
||||
@@ -194,8 +194,8 @@
|
||||
|
||||
//List of active diseases
|
||||
|
||||
var/viruses = list() // replaces var/datum/disease/virus
|
||||
|
||||
var/list/viruses = list() // replaces var/datum/disease/virus
|
||||
var/list/resistances = list()
|
||||
|
||||
mouse_drag_pointer = MOUSE_ACTIVE_POINTER
|
||||
|
||||
|
||||
@@ -1,142 +0,0 @@
|
||||
/datum/nano_module/virus2
|
||||
name = "Virus Creator"
|
||||
|
||||
var/mob/virus_target = null
|
||||
var/datum/disease2/disease/curr_virus = null
|
||||
|
||||
/datum/nano_module/virus2/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = admin_state)
|
||||
var/data[0]
|
||||
|
||||
data["virus_target"] = virus_target
|
||||
data["curr_virus"] = curr_virus ? curr_virus.uniqueID : null
|
||||
if(curr_virus)
|
||||
var/effects[0]
|
||||
for(var/datum/disease2/effectholder/E in curr_virus.effects)
|
||||
var/subeffect[0]
|
||||
subeffect["name"] = E.effect.name
|
||||
subeffect["stage"] = E.stage
|
||||
subeffect["chance"] = E.chance
|
||||
subeffect["multiplier"] = E.multiplier
|
||||
subeffect["badness"] = E.effect.badness
|
||||
|
||||
effects.Add(list(subeffect))
|
||||
data["virus_effects"] = effects
|
||||
|
||||
var/virusstats[0]
|
||||
virusstats["antigen"] = antigens2string(curr_virus.antigen)
|
||||
virusstats["spreadType"] = curr_virus.spreadtype
|
||||
virusstats["affectedSpecies"] = list2text(curr_virus.affected_species, ", ")
|
||||
virusstats["speed"] = curr_virus.speed
|
||||
data["virusStats"] = virusstats
|
||||
|
||||
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "virus2_creator.tmpl", "[src]", 800, 450, state = state)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/datum/nano_module/virus2/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(href_list["setTarget"])
|
||||
var/list/mob_list_l = list()
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
mob_list_l += H
|
||||
mob_list_l = sortList(mob_list_l)
|
||||
mob_list_l += "Random"
|
||||
|
||||
var/newTarget = input(usr, "Who do you want to infect?", "Infection", "Random") as null|anything in mob_list_l
|
||||
if(newTarget)
|
||||
if(newTarget == "Random")
|
||||
virus_target = null
|
||||
else
|
||||
if(ismob(newTarget))
|
||||
virus_target = newTarget
|
||||
return 1
|
||||
|
||||
if(href_list["createVirus"])
|
||||
if(curr_virus)
|
||||
if(alert(usr, "Would you like to delete the current virus and generate a new one?", "Regenerate Virus", "Yes", "No") == "Yes")
|
||||
qdel(curr_virus)
|
||||
curr_virus = null
|
||||
else
|
||||
return 0
|
||||
|
||||
var/datum/disease2/disease/new_virus = new()
|
||||
new_virus.makerandom()
|
||||
curr_virus = new_virus
|
||||
new_virus.affected_species = list("Human","Unathi","Skrell","Tajaran","Vox","Kidan","Slime People","Grey","Diona", "Vulpkanin") //restore to default
|
||||
usr << "New virus generated: [new_virus.uniqueID]."
|
||||
return 1
|
||||
|
||||
if(href_list["deleteCurrVirus"])
|
||||
if(curr_virus)
|
||||
qdel(curr_virus)
|
||||
curr_virus = null
|
||||
return 1
|
||||
|
||||
if(href_list["changeEffect"])
|
||||
if(curr_virus)
|
||||
var/stage = text2num(href_list["changeEffect"])
|
||||
if(stage)
|
||||
var/list/L = list()
|
||||
|
||||
for(var/effect in (subtypesof(/datum/disease2/effect)))
|
||||
var/datum/disease2/effect/E = new effect
|
||||
if(initial(E.stage) == stage)
|
||||
L[initial(E.name)] = E
|
||||
|
||||
var/datum/disease2/effectholder/holder = curr_virus.effects[stage]
|
||||
if(holder)
|
||||
var/datum/disease2/effect/current_effect = holder.effect
|
||||
|
||||
var/C = input("Select effect for stage [stage]:", "Stage [stage]", current_effect.name) as null|anything in L
|
||||
if(!C)
|
||||
return 0
|
||||
|
||||
var/datum/disease2/effect/applied_effect = L[C]
|
||||
if(istype(applied_effect))
|
||||
holder.effect = applied_effect
|
||||
qdel(current_effect)
|
||||
else
|
||||
|
||||
return 1
|
||||
|
||||
if(href_list["changeStat"])
|
||||
if(curr_virus)
|
||||
var/stat = href_list["changeStat"]
|
||||
var/stage = text2num(href_list["cSEffect"])
|
||||
if(stat && stage)
|
||||
switch(stat)
|
||||
if("C")
|
||||
var/C = input(usr, "What would you like to change the chance to? ", "Edit Chance", null) as null|num
|
||||
if(C)
|
||||
var/datum/disease2/effectholder/holder = curr_virus.effects[stage]
|
||||
if(holder)
|
||||
holder.chance = Clamp(C, 0, holder.effect.chance_maxm)
|
||||
|
||||
if("M")
|
||||
var/C = input(usr, "What would you like to change the multiplier to?", "Edit Multiplier", null) as null|num
|
||||
if(C)
|
||||
var/datum/disease2/effectholder/holder = curr_virus.effects[stage]
|
||||
if(holder)
|
||||
holder.multiplier = Clamp(C, 1, holder.effect.maxm)
|
||||
return 1
|
||||
|
||||
if(href_list["spreadToTarget"])
|
||||
if(curr_virus)
|
||||
if(virus_target)
|
||||
infect_virus2(virus_target, curr_virus, 1) //no protection from gods
|
||||
else //random
|
||||
var/list/mob_list_l = list()
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
if(H.client)
|
||||
mob_list_l += H
|
||||
|
||||
var/mob/living/carbon/human/H = pick(mob_list_l)
|
||||
if(H && H.client)
|
||||
infect_virus2(H, curr_virus, 1) //no protection from gods
|
||||
@@ -12,7 +12,7 @@
|
||||
var/vol_temp
|
||||
// see libs/IconProcs/IconProcs.dm
|
||||
for(var/datum/reagent/reagent in reagent_list)
|
||||
if(reagent.id == "blood" && reagent.data["blood_colour"])
|
||||
if(reagent.id == "blood" && reagent.data && reagent.data["blood_colour"])
|
||||
reagent_color = reagent.data["blood_colour"]
|
||||
else
|
||||
reagent_color = reagent.color
|
||||
|
||||
@@ -304,13 +304,6 @@ var/const/INGEST = 2
|
||||
if(!C.no_message)
|
||||
M << "\blue \icon[my_atom] [C.mix_message]"
|
||||
|
||||
/* if(istype(my_atom, /obj/item/slime_core))
|
||||
var/obj/item/slime_core/ME = my_atom
|
||||
ME.Uses--
|
||||
if(ME.Uses <= 0) // give the notification that the slime core is dead
|
||||
for(var/mob/M in viewers(4, get_turf(my_atom)) )
|
||||
M << "\blue \icon[my_atom] The innards begin to boil!"
|
||||
*/
|
||||
if(istype(my_atom, /obj/item/slime_extract))
|
||||
var/obj/item/slime_extract/ME2 = my_atom
|
||||
ME2.Uses--
|
||||
@@ -435,6 +428,11 @@ var/const/INGEST = 2
|
||||
else R.reaction_obj(A, R.volume+volume_modifier)
|
||||
return
|
||||
|
||||
/datum/reagents/proc/add_reagent_list(list/list_reagents, list/data=null) // Like add_reagent but you can enter a list. Format it like this: list("toxin" = 10, "beer" = 15)
|
||||
for(var/r_id in list_reagents)
|
||||
var/amt = list_reagents[r_id]
|
||||
add_reagent(r_id, amt, data)
|
||||
|
||||
/datum/reagents/proc/add_reagent(var/reagent, var/amount, var/list/data=null, var/reagtemp = 300)
|
||||
if(!isnum(amount)) return 1
|
||||
update_total()
|
||||
@@ -449,33 +447,7 @@ var/const/INGEST = 2
|
||||
R.volume += amount
|
||||
update_total()
|
||||
my_atom.on_reagent_change()
|
||||
/*
|
||||
// mix dem viruses
|
||||
if(R.id == "blood" && reagent == "blood")
|
||||
if(R.data && data)
|
||||
|
||||
if(R.data["viruses"] || data["viruses"])
|
||||
|
||||
var/list/mix1 = R.data["viruses"]
|
||||
var/list/mix2 = data["viruses"]
|
||||
|
||||
// Stop issues with the list changing during mixing.
|
||||
var/list/to_mix = 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/AD = Advance_Mix(to_mix)
|
||||
if(AD)
|
||||
var/list/preserve = list(AD)
|
||||
for(var/D in R.data["viruses"])
|
||||
if(!istype(D, /datum/disease/advance))
|
||||
preserve += D
|
||||
R.data["viruses"] = preserve
|
||||
*/
|
||||
|
||||
R.on_merge(data)
|
||||
handle_reactions()
|
||||
return 0
|
||||
|
||||
@@ -486,13 +458,10 @@ var/const/INGEST = 2
|
||||
reagent_list += R
|
||||
R.holder = src
|
||||
R.volume = amount
|
||||
// SetViruses(R, data) // Includes setting data
|
||||
if(data) R.data = data
|
||||
//debug
|
||||
//world << "Adding data"
|
||||
//for(var/D in R.data)
|
||||
// world << "Container data: [D] = [R.data[D]]"
|
||||
//debug
|
||||
if(data)
|
||||
R.data = data
|
||||
R.on_new(data)
|
||||
|
||||
update_total()
|
||||
my_atom.on_reagent_change()
|
||||
handle_reactions()
|
||||
@@ -605,9 +574,9 @@ var/const/INGEST = 2
|
||||
// Technically we should probably copy all data lists, but
|
||||
// that could possibly eat up a lot of memory needlessly
|
||||
// if most data lists are read-only.
|
||||
if (trans_data["virus2"])
|
||||
var/list/v = trans_data["virus2"]
|
||||
trans_data["virus2"] = v.Copy()
|
||||
if(trans_data["viruses"])
|
||||
var/list/v = trans_data["viruses"]
|
||||
trans_data["viruses"] = v.Copy()
|
||||
|
||||
return trans_data
|
||||
|
||||
|
||||
@@ -5,10 +5,188 @@
|
||||
reagent_state = SOLID
|
||||
color = "#FFFFFF"
|
||||
|
||||
/datum/reagent/spider_eggs/on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
/datum/reagent/spider_eggs/on_mob_life(mob/living/M)
|
||||
if(volume > 2.5)
|
||||
if(iscarbon(M))
|
||||
if(!M.get_int_organ(/obj/item/organ/internal/body_egg))
|
||||
new/obj/item/organ/internal/body_egg/spider_eggs(M) //Yes, even Xenos can fall victim to the plague that is spider infestation.
|
||||
..()
|
||||
..()
|
||||
|
||||
|
||||
//virus food
|
||||
/datum/reagent/virus_food
|
||||
name = "Virus Food"
|
||||
id = "virusfood"
|
||||
description = "A mixture of water, milk, and oxygen. Virus cells can use this mixture to reproduce."
|
||||
reagent_state = LIQUID
|
||||
nutriment_factor = 2 * REAGENTS_METABOLISM
|
||||
color = "#899613" // rgb: 137, 150, 19
|
||||
|
||||
/datum/reagent/virus_food/on_mob_life(mob/living/M)
|
||||
M.nutrition += nutriment_factor * REAGENTS_EFFECT_MULTIPLIER
|
||||
..()
|
||||
|
||||
/datum/reagent/mutagen/mutagenvirusfood
|
||||
name = "mutagenic agar"
|
||||
id = "mutagenvirusfood"
|
||||
description = "mutates blood"
|
||||
color = "#A3C00F" // rgb: 163,192,15
|
||||
|
||||
/datum/reagent/mutagen/mutagenvirusfood/sugar
|
||||
name = "sucrose agar"
|
||||
id = "sugarvirusfood"
|
||||
color = "#41B0C0" // rgb: 65,176,192
|
||||
|
||||
/datum/reagent/diphenhydramine/diphenhydraminevirusfood
|
||||
name = "virus rations"
|
||||
id = "diphenhydraminevirusfood"
|
||||
description = "mutates blood"
|
||||
color = "#D18AA5" // rgb: 209,138,165
|
||||
|
||||
/datum/reagent/plasma/plasmavirusfood
|
||||
name = "virus plasma"
|
||||
id = "plasmavirusfood"
|
||||
description = "mutates blood"
|
||||
color = "#A69DA9" // rgb: 166,157,169
|
||||
|
||||
/datum/reagent/plasma/plasmavirusfood/weak
|
||||
name = "weakened virus plasma"
|
||||
id = "weakplasmavirusfood"
|
||||
color = "#CEC3C6" // rgb: 206,195,198
|
||||
|
||||
//reactions
|
||||
/datum/chemical_reaction/virus_food
|
||||
name = "Virus Food"
|
||||
id = "virusfood"
|
||||
result = "virusfood"
|
||||
required_reagents = list("water" = 1, "milk" = 1, "oxygen" = 1)
|
||||
result_amount = 3
|
||||
|
||||
/datum/chemical_reaction/virus_food_mutagen
|
||||
name = "mutagenic agar"
|
||||
id = "mutagenvirusfood"
|
||||
result = "mutagenvirusfood"
|
||||
required_reagents = list("mutagen" = 1, "virusfood" = 1)
|
||||
result_amount = 1
|
||||
|
||||
/datum/chemical_reaction/virus_food_diphenhydramine
|
||||
name = "virus rations"
|
||||
id = "diphenhydraminevirusfood"
|
||||
result = "diphenhydraminevirusfood"
|
||||
required_reagents = list("diphenhydramine" = 1, "virusfood" = 1)
|
||||
result_amount = 1
|
||||
|
||||
/datum/chemical_reaction/virus_food_plasma
|
||||
name = "virus plasma"
|
||||
id = "plasmavirusfood"
|
||||
result = "plasmavirusfood"
|
||||
required_reagents = list("plasma" = 1, "virusfood" = 1)
|
||||
result_amount = 1
|
||||
|
||||
/datum/chemical_reaction/virus_food_plasma_diphenhydramine
|
||||
name = "weakened virus plasma"
|
||||
id = "weakplasmavirusfood"
|
||||
result = "weakplasmavirusfood"
|
||||
required_reagents = list("diphenhydramine" = 1, "plasmavirusfood" = 1)
|
||||
result_amount = 2
|
||||
|
||||
/datum/chemical_reaction/virus_food_mutagen_sugar
|
||||
name = "sucrose agar"
|
||||
id = "sugarvirusfood"
|
||||
result = "sugarvirusfood"
|
||||
required_reagents = list("sugar" = 1, "mutagenvirusfood" = 1)
|
||||
result_amount = 2
|
||||
|
||||
/datum/chemical_reaction/virus_food_mutagen_salineglucose
|
||||
name = "sucrose agar"
|
||||
id = "salineglucosevirusfood"
|
||||
result = "sugarvirusfood"
|
||||
required_reagents = list("salglu_solution" = 1, "mutagenvirusfood" = 1)
|
||||
result_amount = 2
|
||||
|
||||
|
||||
//mix virus
|
||||
/datum/chemical_reaction/mix_virus
|
||||
name = "Mix Virus"
|
||||
id = "mixvirus"
|
||||
required_reagents = list("virusfood" = 1)
|
||||
required_catalysts = list("blood" = 1)
|
||||
var/level_min = 0
|
||||
var/level_max = 2
|
||||
|
||||
/datum/chemical_reaction/mix_virus/on_reaction(datum/reagents/holder, created_volume)
|
||||
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)
|
||||
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_2
|
||||
name = "Mix Virus 2"
|
||||
id = "mixvirus2"
|
||||
required_reagents = list("mutagen" = 1)
|
||||
level_min = 2
|
||||
level_max = 4
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_3
|
||||
name = "Mix Virus 3"
|
||||
id = "mixvirus3"
|
||||
required_reagents = list("plasma" = 1)
|
||||
level_min = 4
|
||||
level_max = 6
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_4
|
||||
name = "Mix Virus 4"
|
||||
id = "mixvirus4"
|
||||
required_reagents = list("uranium" = 1)
|
||||
level_min = 5
|
||||
level_max = 6
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_5
|
||||
name = "Mix Virus 5"
|
||||
id = "mixvirus5"
|
||||
required_reagents = list("mutagenvirusfood" = 1)
|
||||
level_min = 3
|
||||
level_max = 3
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_6
|
||||
name = "Mix Virus 6"
|
||||
id = "mixvirus6"
|
||||
required_reagents = list("sugarvirusfood" = 1)
|
||||
level_min = 4
|
||||
level_max = 4
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_7
|
||||
name = "Mix Virus 7"
|
||||
id = "mixvirus7"
|
||||
required_reagents = list("weakplasmavirusfood" = 1)
|
||||
level_min = 5
|
||||
level_max = 5
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_8
|
||||
name = "Mix Virus 8"
|
||||
id = "mixvirus8"
|
||||
required_reagents = list("plasmavirusfood" = 1)
|
||||
level_min = 6
|
||||
level_max = 6
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_9
|
||||
name = "Mix Virus 9"
|
||||
id = "mixvirus9"
|
||||
required_reagents = list("diphenhydraminevirusfood" = 1)
|
||||
level_min = 1
|
||||
level_max = 1
|
||||
|
||||
/datum/chemical_reaction/mix_virus/rem_virus
|
||||
name = "Devolve Virus"
|
||||
id = "remvirus"
|
||||
required_reagents = list("diphenhydramine" = 1)
|
||||
required_catalysts = list("blood" = 1)
|
||||
|
||||
/datum/chemical_reaction/mix_virus/rem_virus/on_reaction(datum/reagents/holder, created_volume)
|
||||
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()
|
||||
@@ -1,20 +1,18 @@
|
||||
/datum/chemical_reaction/
|
||||
|
||||
hydrocodone
|
||||
/datum/chemical_reaction/hydrocodone
|
||||
name = "Hydrocodone"
|
||||
id = "hydrocodone"
|
||||
result = "hydrocodone"
|
||||
required_reagents = list("morphine" = 1, "sacid" = 1, "water" = 1, "oil" = 1)
|
||||
result_amount = 2
|
||||
|
||||
mitocholide
|
||||
/datum/chemical_reaction/mitocholide
|
||||
name = "mitocholide"
|
||||
id = "mitocholide"
|
||||
result = "mitocholide"
|
||||
required_reagents = list("synthflesh" = 1, "cryoxadone" = 1, "plasma" = 1)
|
||||
result_amount = 3
|
||||
|
||||
cryoxadone
|
||||
/datum/chemical_reaction/cryoxadone
|
||||
name = "Cryoxadone"
|
||||
id = "cryoxadone"
|
||||
result = "cryoxadone"
|
||||
@@ -23,7 +21,7 @@
|
||||
mix_message = "The solution bubbles softly."
|
||||
mix_sound = 'sound/goonstation/misc/drinkfizz.ogg'
|
||||
|
||||
spaceacillin
|
||||
/datum/chemical_reaction/spaceacillin
|
||||
name = "Spaceacillin"
|
||||
id = "spaceacillin"
|
||||
result = "spaceacillin"
|
||||
@@ -31,62 +29,16 @@
|
||||
result_amount = 2
|
||||
mix_message = "The solvent extracts an antibiotic compound from the fungus."
|
||||
|
||||
rezadone
|
||||
/datum/chemical_reaction/rezadone
|
||||
name = "Rezadone"
|
||||
id = "rezadone"
|
||||
result = "rezadone"
|
||||
required_reagents = list("carpotoxin" = 1, "spaceacillin" = 1, "copper" = 1)
|
||||
result_amount = 3
|
||||
|
||||
virus_food
|
||||
name = "Virus Food"
|
||||
id = "virusfood"
|
||||
result = "virusfood"
|
||||
required_reagents = list("water" = 1, "milk" = 1, "oxygen" = 1)
|
||||
result_amount = 3
|
||||
/*
|
||||
mix_virus
|
||||
name = "Mix Virus"
|
||||
id = "mixvirus"
|
||||
result = "blood"
|
||||
required_reagents = list("virusfood" = 5)
|
||||
required_catalysts = list("blood")
|
||||
var/level = 2
|
||||
|
||||
on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
|
||||
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 - rand(0, 1))
|
||||
|
||||
|
||||
mix_virus_2
|
||||
|
||||
name = "Mix Virus 2"
|
||||
id = "mixvirus2"
|
||||
required_reagents = list("mutagen" = 5)
|
||||
level = 4
|
||||
|
||||
rem_virus
|
||||
|
||||
name = "Devolve Virus"
|
||||
id = "remvirus"
|
||||
required_reagents = list("synaptizine" = 5)
|
||||
|
||||
on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
|
||||
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()
|
||||
*/
|
||||
|
||||
sterilizine
|
||||
/datum/chemical_reaction/sterilizine
|
||||
name = "Sterilizine"
|
||||
id = "sterilizine"
|
||||
result = "sterilizine"
|
||||
required_reagents = list("antihol" = 2, "chlorine" = 1)
|
||||
result_amount = 3
|
||||
result_amount = 3
|
||||
|
||||
@@ -81,6 +81,10 @@
|
||||
/datum/reagent/proc/on_update(var/atom/A)
|
||||
return
|
||||
|
||||
// Called after add_reagents creates a new reagent.
|
||||
/datum/reagent/proc/on_new(data)
|
||||
return
|
||||
|
||||
/datum/reagent/Destroy()
|
||||
. = ..()
|
||||
holder = null
|
||||
@@ -42,13 +42,9 @@
|
||||
M.jitteriness = 0
|
||||
if(istype(M,/mob/living/carbon)) // make sure to only use it on carbon mobs
|
||||
var/mob/living/carbon/C = M
|
||||
if(C.virus2.len)
|
||||
for (var/ID in C.virus2)
|
||||
var/datum/disease2/disease/V = C.virus2[ID]
|
||||
C.antibodies |= V.antigen
|
||||
for(var/datum/disease/D in C.viruses)
|
||||
D.cure(0)
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
/datum/reagent/adminordrazine/nanites
|
||||
name = "Nanites"
|
||||
|
||||
@@ -16,20 +16,6 @@
|
||||
..()
|
||||
return
|
||||
|
||||
/datum/reagent/virus_food
|
||||
name = "Virus Food"
|
||||
id = "virusfood"
|
||||
description = "A mixture of water, milk, and oxygen. Virus cells can use this mixture to reproduce."
|
||||
reagent_state = LIQUID
|
||||
nutriment_factor = 2 * REAGENTS_METABOLISM
|
||||
color = "#899613" // rgb: 137, 150, 19
|
||||
|
||||
/datum/reagent/virus_food/on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
M.nutrition += nutriment_factor*REM
|
||||
..()
|
||||
return
|
||||
|
||||
/datum/reagent/sterilizine
|
||||
name = "Sterilizine"
|
||||
id = "sterilizine"
|
||||
|
||||
@@ -98,33 +98,9 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#13BC5E" // rgb: 19, 188, 94
|
||||
|
||||
/datum/reagent/aslimetoxin/on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
if(istype(M, /mob/living/carbon) && M.stat != DEAD)
|
||||
M << "\red Your flesh rapidly mutates!"
|
||||
if(M.notransform) return
|
||||
M.notransform = 1
|
||||
M.canmove = 0
|
||||
M.icon = null
|
||||
M.overlays.Cut()
|
||||
M.invisibility = 101
|
||||
for(var/obj/item/W in M)
|
||||
if(istype(W, /obj/item/weapon/implant)) //TODO: Carn. give implants a dropped() or something
|
||||
qdel(W)
|
||||
continue
|
||||
W.layer = initial(W.layer)
|
||||
W.loc = M.loc
|
||||
W.dropped(M)
|
||||
var/mob/living/carbon/slime/new_mob = new /mob/living/carbon/slime(M.loc)
|
||||
new_mob.a_intent = I_HARM
|
||||
new_mob.universal_speak = 1
|
||||
if(M.mind)
|
||||
M.mind.transfer_to(new_mob)
|
||||
else
|
||||
new_mob.key = M.key
|
||||
qdel(M)
|
||||
..()
|
||||
return
|
||||
/datum/reagent/aslimetoxin/reaction_mob(mob/M, method=TOUCH, reac_volume)
|
||||
if(method != TOUCH)
|
||||
M.ForceContractDisease(new /datum/disease/transformation/slime(0))
|
||||
|
||||
|
||||
/datum/reagent/mercury
|
||||
@@ -189,19 +165,7 @@
|
||||
if(!M) M = holder.my_atom
|
||||
if(M.radiation < 80)
|
||||
M.apply_effect(4, IRRADIATE, negate_armor = 1)
|
||||
// radium may increase your chances to cure a disease
|
||||
if(istype(M,/mob/living/carbon)) // make sure to only use it on carbon mobs
|
||||
var/mob/living/carbon/C = M
|
||||
if(C.virus2.len)
|
||||
for (var/ID in C.virus2)
|
||||
var/datum/disease2/disease/V = C.virus2[ID]
|
||||
if(prob(5))
|
||||
if(prob(50))
|
||||
M.apply_effect(50, IRRADIATE, negate_armor = 1) // curing it that way may kill you instead
|
||||
M.adjustToxLoss(100)
|
||||
C.antibodies |= V.antigen
|
||||
..()
|
||||
return
|
||||
|
||||
/datum/reagent/radium/reaction_turf(var/turf/T, var/volume)
|
||||
src = null
|
||||
|
||||
@@ -145,65 +145,103 @@
|
||||
|
||||
|
||||
/datum/reagent/blood
|
||||
data = new/list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=null,"blood_colour"= "#A10808","resistances"=null,"trace_chem"=null, "antibodies" = null)
|
||||
data = list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=null,"blood_colour"="#A10808","resistances"=null,"trace_chem"=null, "antibodies" = null)
|
||||
name = "Blood"
|
||||
id = "blood"
|
||||
reagent_state = LIQUID
|
||||
color = "#C80000" // rgb: 200, 0, 0
|
||||
|
||||
/datum/reagent/blood/reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
|
||||
var/datum/reagent/blood/self = src
|
||||
src = null
|
||||
if(self.data && self.data["virus2"] && istype(M, /mob/living/carbon))//infecting...
|
||||
var/list/vlist = self.data["virus2"]
|
||||
if (vlist.len)
|
||||
for (var/ID in vlist)
|
||||
var/datum/disease2/disease/V = vlist[ID]
|
||||
/datum/reagent/blood/reaction_mob(mob/M, method=TOUCH, reac_volume)
|
||||
if(data && data["viruses"])
|
||||
for(var/datum/disease/D in data["viruses"])
|
||||
|
||||
if(method == TOUCH)
|
||||
infect_virus2(M,V.getcopy())
|
||||
else
|
||||
infect_virus2(M,V.getcopy(),1) //injected, force infection!
|
||||
if(self.data && self.data["antibodies"] && istype(M, /mob/living/carbon))//... and curing
|
||||
var/mob/living/carbon/C = M
|
||||
C.antibodies |= self.data["antibodies"]
|
||||
if(D.spread_flags & SPECIAL || D.spread_flags & NON_CONTAGIOUS)
|
||||
continue
|
||||
|
||||
/datum/reagent/blood/on_merge(var/data)
|
||||
if(data["blood_colour"])
|
||||
color = data["blood_colour"]
|
||||
return ..()
|
||||
if(method == TOUCH)
|
||||
M.ContractDisease(D)
|
||||
else //ingest, patch or inject
|
||||
M.ForceContractDisease(D)
|
||||
|
||||
/datum/reagent/blood/on_new(list/data)
|
||||
if(istype(data))
|
||||
SetViruses(src, data)
|
||||
|
||||
/datum/reagent/blood/on_merge(list/mix_data)
|
||||
if(data && mix_data)
|
||||
if(data["viruses"] || mix_data["viruses"])
|
||||
|
||||
var/list/mix1 = data["viruses"]
|
||||
var/list/mix2 = mix_data["viruses"]
|
||||
|
||||
// Stop issues with the list changing during mixing.
|
||||
var/list/to_mix = 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/AD = Advance_Mix(to_mix)
|
||||
if(AD)
|
||||
var/list/preserve = list(AD)
|
||||
for(var/D in data["viruses"])
|
||||
if(!istype(D, /datum/disease/advance))
|
||||
preserve += D
|
||||
data["viruses"] = preserve
|
||||
|
||||
if(mix_data["blood_colour"])
|
||||
color = mix_data["blood_colour"]
|
||||
return 1
|
||||
|
||||
/datum/reagent/blood/on_update(var/atom/A)
|
||||
if(data["blood_colour"])
|
||||
color = data["blood_colour"]
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
/datum/reagent/blood/reaction_turf(var/turf/simulated/T, var/volume)//splash the blood all over the place
|
||||
if(!istype(T)) return
|
||||
var/datum/reagent/blood/self = src
|
||||
src = null
|
||||
var/big_splash = 1
|
||||
if(volume < 3)
|
||||
big_splash = 0
|
||||
//var/datum/disease/D = self.data["virus"]
|
||||
if(!self.data["donor"] || istype(self.data["donor"], /mob/living/carbon/human))
|
||||
blood_splatter(T, src, big_splash)
|
||||
/datum/reagent/blood/reaction_turf(turf/simulated/T, reac_volume)//splash the blood all over the place
|
||||
if(!istype(T))
|
||||
return
|
||||
if(reac_volume < 3)
|
||||
return
|
||||
if(!data["donor"] || istype(data["donor"], /mob/living/carbon/human))
|
||||
var/obj/effect/decal/cleanable/blood/blood_prop = locate() in T //find some blood here
|
||||
if(!blood_prop) //first blood!
|
||||
blood_prop = new(T)
|
||||
blood_prop.blood_DNA[data["blood_DNA"]] = data["blood_type"]
|
||||
|
||||
if(blood_prop)
|
||||
blood_prop.blood_DNA[self.data["blood_DNA"]] = self.data["blood_type"]
|
||||
if(self.data["virus2"])
|
||||
blood_prop.virus2 = virus_copylist(self.data["virus2"])
|
||||
for(var/datum/disease/D in data["viruses"])
|
||||
var/datum/disease/newVirus = D.Copy(1)
|
||||
blood_prop.viruses += newVirus
|
||||
newVirus.holder = blood_prop
|
||||
|
||||
else if(istype(self.data["donor"], /mob/living/carbon/alien))
|
||||
else if(istype(data["donor"], /mob/living/carbon/alien))
|
||||
var/obj/effect/decal/cleanable/blood/xeno/blood_prop = locate() in T
|
||||
if(!blood_prop)
|
||||
blood_prop = new(T)
|
||||
blood_prop.blood_DNA["UNKNOWN DNA STRUCTURE"] = "X*"
|
||||
return
|
||||
|
||||
for(var/datum/disease/D in data["viruses"])
|
||||
var/datum/disease/newVirus = D.Copy(1)
|
||||
blood_prop.viruses += newVirus
|
||||
newVirus.holder = blood_prop
|
||||
|
||||
/datum/reagent/vaccine
|
||||
//data must contain virus type
|
||||
name = "Vaccine"
|
||||
id = "vaccine"
|
||||
color = "#C81040" // rgb: 200, 16, 64
|
||||
|
||||
/datum/reagent/vaccine/reaction_mob(mob/M, method=TOUCH, reac_volume)
|
||||
if(islist(data) && (method == INGEST))
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if(D.GetDiseaseID() in data)
|
||||
D.cure()
|
||||
M.resistances |= data
|
||||
|
||||
/datum/reagent/vaccine/on_merge(list/data)
|
||||
if(istype(data))
|
||||
src.data |= data.Copy()
|
||||
|
||||
/datum/reagent/fishwater
|
||||
name = "Fish Water"
|
||||
@@ -350,28 +388,3 @@
|
||||
var/t_loc = get_turf(O)
|
||||
qdel(O)
|
||||
new /obj/item/clothing/shoes/galoshes/dry(t_loc)
|
||||
|
||||
/*
|
||||
/datum/reagent/vaccine
|
||||
//data must contain virus type
|
||||
name = "Vaccine"
|
||||
id = "vaccine"
|
||||
reagent_state = LIQUID
|
||||
color = "#C81040" // rgb: 200, 16, 64
|
||||
|
||||
/datum/reagent/vaccine/reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
|
||||
var/datum/reagent/vaccine/self = src
|
||||
src = null
|
||||
if(self.data&&method == INGEST)
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if(istype(D, /datum/disease/advance))
|
||||
var/datum/disease/advance/A = D
|
||||
if(A.GetDiseaseID() == self.data)
|
||||
D.cure()
|
||||
else
|
||||
if(D.type == self.data)
|
||||
D.cure()
|
||||
|
||||
M.resistances += self.data
|
||||
return
|
||||
*/
|
||||
@@ -0,0 +1,295 @@
|
||||
/obj/machinery/computer/pandemic
|
||||
name = "PanD.E.M.I.C 2200"
|
||||
desc = "Used to work with viruses."
|
||||
density = 1
|
||||
anchored = 1
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "mixer0"
|
||||
circuit = /obj/item/weapon/circuitboard/pandemic
|
||||
use_power = 1
|
||||
idle_power_usage = 20
|
||||
var/temp_html = ""
|
||||
var/wait = null
|
||||
var/obj/item/weapon/reagent_containers/beaker = null
|
||||
|
||||
/obj/machinery/computer/pandemic/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/pandemic/set_broken()
|
||||
icon_state = (beaker ? "mixer1_b" : "mixer0_b")
|
||||
overlays.Cut()
|
||||
stat |= BROKEN
|
||||
|
||||
/obj/machinery/computer/pandemic/proc/GetVirusByIndex(index)
|
||||
if(beaker && beaker.reagents)
|
||||
if(beaker.reagents.reagent_list.len)
|
||||
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[index]
|
||||
return null
|
||||
|
||||
/obj/machinery/computer/pandemic/proc/GetResistancesByIndex(index)
|
||||
if(beaker && beaker.reagents)
|
||||
if(beaker.reagents.reagent_list.len)
|
||||
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[index]
|
||||
return null
|
||||
|
||||
/obj/machinery/computer/pandemic/proc/GetVirusTypeByIndex(index)
|
||||
var/datum/disease/D = GetVirusByIndex(index)
|
||||
if(D)
|
||||
return D.GetDiseaseID()
|
||||
return null
|
||||
|
||||
/obj/machinery/computer/pandemic/proc/replicator_cooldown(waittime)
|
||||
wait = 1
|
||||
update_icon()
|
||||
spawn(waittime)
|
||||
src.wait = null
|
||||
update_icon()
|
||||
playsound(src.loc, 'sound/machines/ping.ogg', 30, 1)
|
||||
|
||||
/obj/machinery/computer/pandemic/update_icon()
|
||||
if(stat & BROKEN)
|
||||
icon_state = (beaker ? "mixer1_b" : "mixer0_b")
|
||||
return
|
||||
|
||||
icon_state = "mixer[(beaker)?"1":"0"][(powered()) ? "" : "_nopower"]"
|
||||
|
||||
if(wait)
|
||||
overlays.Cut()
|
||||
else
|
||||
overlays += "waitlight"
|
||||
|
||||
/obj/machinery/computer/pandemic/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
|
||||
usr.set_machine(src)
|
||||
if(!beaker) return
|
||||
|
||||
if (href_list["create_vaccine"])
|
||||
if(!src.wait)
|
||||
var/obj/item/weapon/reagent_containers/glass/bottle/B = new/obj/item/weapon/reagent_containers/glass/bottle(src.loc)
|
||||
if(B)
|
||||
B.pixel_x = rand(-3, 3)
|
||||
B.pixel_y = rand(-3, 3)
|
||||
var/path = GetResistancesByIndex(text2num(href_list["create_vaccine"]))
|
||||
var/vaccine_type = path
|
||||
var/vaccine_name = "Unknown"
|
||||
|
||||
if(!ispath(vaccine_type))
|
||||
if(archive_diseases[path])
|
||||
var/datum/disease/D = archive_diseases[path]
|
||||
if(D)
|
||||
vaccine_name = D.name
|
||||
vaccine_type = path
|
||||
else if(vaccine_type)
|
||||
var/datum/disease/D = new vaccine_type(0, null)
|
||||
if(D)
|
||||
vaccine_name = D.name
|
||||
|
||||
if(vaccine_type)
|
||||
|
||||
B.name = "[vaccine_name] vaccine bottle"
|
||||
B.reagents.add_reagent("vaccine", 15, list(vaccine_type))
|
||||
replicator_cooldown(200)
|
||||
else
|
||||
src.temp_html = "The replicator is not ready yet."
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
else if (href_list["create_virus_culture"])
|
||||
if(!wait)
|
||||
var/type = GetVirusTypeByIndex(text2num(href_list["create_virus_culture"]))//the path is received as string - converting
|
||||
var/datum/disease/D = null
|
||||
if(!ispath(type))
|
||||
D = GetVirusByIndex(text2num(href_list["create_virus_culture"]))
|
||||
var/datum/disease/advance/A = archive_diseases[D.GetDiseaseID()]
|
||||
if(A)
|
||||
D = new A.type(0, A)
|
||||
else if(type)
|
||||
if(type in diseases) // Make sure this is a disease
|
||||
D = new type(0, null)
|
||||
if(!D)
|
||||
return
|
||||
var/name = stripped_input(usr,"Name:","Name the culture",D.name,MAX_NAME_LEN)
|
||||
if(name == null || wait)
|
||||
return
|
||||
var/obj/item/weapon/reagent_containers/glass/bottle/B = new/obj/item/weapon/reagent_containers/glass/bottle(src.loc)
|
||||
B.icon_state = "bottle3"
|
||||
B.pixel_x = rand(-3, 3)
|
||||
B.pixel_y = rand(-3, 3)
|
||||
replicator_cooldown(50)
|
||||
var/list/data = list("viruses"=list(D))
|
||||
B.name = "[name] culture bottle"
|
||||
B.desc = "A small bottle. Contains [D.agent] culture in synthblood medium."
|
||||
B.reagents.add_reagent("blood",20,data)
|
||||
src.updateUsrDialog()
|
||||
else
|
||||
src.temp_html = "The replicator is not ready yet."
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
else if (href_list["empty_beaker"])
|
||||
beaker.reagents.clear_reagents()
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
else if (href_list["eject"])
|
||||
beaker:loc = src.loc
|
||||
beaker = null
|
||||
icon_state = "mixer0"
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
else if(href_list["clear"])
|
||||
src.temp_html = ""
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
else if(href_list["name_disease"])
|
||||
var/new_name = stripped_input(usr, "Name the Disease", "New Name", "", MAX_NAME_LEN)
|
||||
if(!new_name)
|
||||
return
|
||||
if(..())
|
||||
return
|
||||
var/id = GetVirusTypeByIndex(text2num(href_list["name_disease"]))
|
||||
if(archive_diseases[id])
|
||||
var/datum/disease/advance/A = archive_diseases[id]
|
||||
A.AssignName(new_name)
|
||||
for(var/datum/disease/advance/AD in disease_master.processing)
|
||||
AD.Refresh()
|
||||
src.updateUsrDialog()
|
||||
|
||||
|
||||
else
|
||||
usr << browse(null, "window=pandemic")
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/pandemic/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat = ""
|
||||
if(src.temp_html)
|
||||
dat = "[src.temp_html]<BR><BR><A href='?src=\ref[src];clear=1'>Main Menu</A>"
|
||||
else if(!beaker)
|
||||
dat += "Please insert beaker.<BR>"
|
||||
dat += "<A href='?src=\ref[user];mach_close=pandemic'>Close</A>"
|
||||
else
|
||||
var/datum/reagents/R = beaker.reagents
|
||||
var/datum/reagent/blood/Blood = null
|
||||
for(var/datum/reagent/blood/B in R.reagent_list)
|
||||
if(B)
|
||||
Blood = B
|
||||
break
|
||||
if(!R.total_volume||!R.reagent_list.len)
|
||||
dat += "The beaker is empty<BR>"
|
||||
else if(!Blood)
|
||||
dat += "No blood sample found in beaker."
|
||||
else if(!Blood.data)
|
||||
dat += "No blood data found in beaker."
|
||||
else
|
||||
dat += "<h3>Blood sample data:</h3>"
|
||||
dat += "<b>Blood DNA:</b> [(Blood.data["blood_DNA"]||"none")]<BR>"
|
||||
dat += "<b>Blood Type:</b> [(Blood.data["blood_type"]||"none")]<BR>"
|
||||
|
||||
|
||||
if(Blood.data["viruses"])
|
||||
var/list/vir = Blood.data["viruses"]
|
||||
if(vir.len)
|
||||
var/i = 0
|
||||
for(var/datum/disease/D in Blood.data["viruses"])
|
||||
i++
|
||||
if(!(D.visibility_flags & HIDDEN_PANDEMIC))
|
||||
|
||||
if(istype(D, /datum/disease/advance))
|
||||
|
||||
var/datum/disease/advance/A = D
|
||||
D = archive_diseases[A.GetDiseaseID()]
|
||||
if(D && D.name == "Unknown")
|
||||
dat += "<b><a href='?src=\ref[src];name_disease=[i]'>Name Disease</a></b><BR>"
|
||||
|
||||
if(!D)
|
||||
CRASH("We weren't able to get the advance disease from the archive.")
|
||||
|
||||
dat += "<b>Disease Agent:</b> [D?"[D.agent] - <A href='?src=\ref[src];create_virus_culture=[i]'>Create virus culture bottle</A>":"none"]<BR>"
|
||||
dat += "<b>Common name:</b> [(D.name||"none")]<BR>"
|
||||
dat += "<b>Description: </b> [(D.desc||"none")]<BR>"
|
||||
dat += "<b>Spread:</b> [(D.spread_text||"none")]<BR>"
|
||||
dat += "<b>Possible cure:</b> [(D.cure_text||"none")]<BR><BR>"
|
||||
|
||||
if(istype(D, /datum/disease/advance))
|
||||
var/datum/disease/advance/A = D
|
||||
dat += "<b>Symptoms:</b> "
|
||||
var/english_symptoms = list()
|
||||
for(var/datum/symptom/S in A.symptoms)
|
||||
english_symptoms += S.name
|
||||
dat += english_list(english_symptoms)
|
||||
|
||||
else
|
||||
dat += "No detectable virus in the sample."
|
||||
else
|
||||
dat += "No detectable virus in the sample."
|
||||
|
||||
dat += "<BR><b>Contains antibodies to:</b> "
|
||||
if(Blood.data["resistances"])
|
||||
var/list/res = Blood.data["resistances"]
|
||||
if(res.len)
|
||||
dat += "<ul>"
|
||||
var/i = 0
|
||||
for(var/type in Blood.data["resistances"])
|
||||
i++
|
||||
var/disease_name = "Unknown"
|
||||
|
||||
if(!ispath(type))
|
||||
var/datum/disease/advance/A = archive_diseases[type]
|
||||
if(A)
|
||||
disease_name = A.name
|
||||
else
|
||||
var/datum/disease/D = new type(0, null)
|
||||
disease_name = D.name
|
||||
|
||||
dat += "<li>[disease_name] - <A href='?src=\ref[src];create_vaccine=[i]'>Create vaccine bottle</A></li>"
|
||||
dat += "</ul><BR>"
|
||||
else
|
||||
dat += "nothing<BR>"
|
||||
else
|
||||
dat += "nothing<BR>"
|
||||
dat += "<BR><A href='?src=\ref[src];eject=1'>Eject beaker</A>[((R.total_volume&&R.reagent_list.len) ? "-- <A href='?src=\ref[src];empty_beaker=1'>Empty beaker</A>":"")]<BR>"
|
||||
dat += "<A href='?src=\ref[user];mach_close=pandemic'>Close</A>"
|
||||
|
||||
user << browse("<TITLE>[src.name]</TITLE><BR>[dat]", "window=pandemic;size=575x400")
|
||||
onclose(user, "pandemic")
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/computer/pandemic/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/reagent_containers) && (I.flags & OPENCONTAINER))
|
||||
if(stat & (NOPOWER|BROKEN)) return
|
||||
if(beaker)
|
||||
user << "<span class='warning'>A beaker is already loaded into the machine!</span>"
|
||||
return
|
||||
if(!user.drop_item())
|
||||
return
|
||||
|
||||
beaker = I
|
||||
beaker.loc = src
|
||||
user << "<span class='notice'>You add the beaker to the machine.</span>"
|
||||
src.updateUsrDialog()
|
||||
icon_state = "mixer1"
|
||||
|
||||
else if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(src.beaker)
|
||||
beaker.loc = get_turf(src)
|
||||
..()
|
||||
return
|
||||
else
|
||||
..()
|
||||
return
|
||||
@@ -7,6 +7,9 @@
|
||||
var/amount_per_transfer_from_this = 5
|
||||
var/possible_transfer_amounts = list(5,10,15,25,30)
|
||||
var/volume = 30
|
||||
var/list/list_reagents = null
|
||||
var/spawned_disease = null
|
||||
var/disease_amount = 20
|
||||
|
||||
/obj/item/weapon/reagent_containers/verb/set_APTFT() //set amount_per_transfer_from_this
|
||||
set name = "Set transfer amount"
|
||||
@@ -30,6 +33,12 @@
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
processing_objects.Add(src)
|
||||
if(spawned_disease)
|
||||
var/datum/disease/F = new spawned_disease(0)
|
||||
var/list/data = list("viruses" = list(F), "blood_colour" = "#A10808")
|
||||
reagents.add_reagent("blood", disease_amount, data)
|
||||
if(list_reagents)
|
||||
reagents.add_reagent_list(list_reagents)
|
||||
|
||||
/obj/item/weapon/reagent_containers/process()
|
||||
if(reagents)
|
||||
|
||||
@@ -299,4 +299,120 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent(pick("polonium","initropidril","concentrated_initro","pancuronium","sodium_thiopental","ketamine","sulfonal","amanitin","coniine","curare","sarin","histamine","venom","cyanide","spidereggs"), 40)
|
||||
reagents.add_reagent(pick("polonium","initropidril","concentrated_initro","pancuronium","sodium_thiopental","ketamine","sulfonal","amanitin","coniine","curare","sarin","histamine","venom","cyanide","spidereggs"), 40)
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/plasma
|
||||
name = "liquid plasma bottle"
|
||||
desc = "A small bottle of liquid plasma. Extremely toxic and reacts with micro-organisms inside blood."
|
||||
icon_state = "bottle8"
|
||||
list_reagents = list("plasma" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/diphenhydramine
|
||||
name = "diphenhydramine bottle"
|
||||
desc = "A small bottle of diphenhydramine."
|
||||
icon_state = "bottle20"
|
||||
list_reagents = list("diphenhydramine" = 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/flu_virion
|
||||
name = "Flu virion culture bottle"
|
||||
desc = "A small bottle. Contains H13N1 flu virion culture in synthblood medium."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/advance/flu
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/epiglottis_virion
|
||||
name = "Epiglottis virion culture bottle"
|
||||
desc = "A small bottle. Contains Epiglottis virion culture in synthblood medium."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/advance/voice_change
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/liver_enhance_virion
|
||||
name = "Liver enhancement virion culture bottle"
|
||||
desc = "A small bottle. Contains liver enhancement virion culture in synthblood medium."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/advance/heal
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/hullucigen_virion
|
||||
name = "Hullucigen virion culture bottle"
|
||||
desc = "A small bottle. Contains hullucigen virion culture in synthblood medium."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/advance/hullucigen
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/pierrot_throat
|
||||
name = "Pierrot's Throat culture bottle"
|
||||
desc = "A small bottle. Contains H0NI<42 virion culture in synthblood medium."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/pierrot_throat
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/cold
|
||||
name = "Rhinovirus culture bottle"
|
||||
desc = "A small bottle. Contains XY-rhinovirus culture in synthblood medium."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/advance/cold
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/retrovirus
|
||||
name = "Retrovirus culture bottle"
|
||||
desc = "A small bottle. Contains a retrovirus culture in a synthblood medium."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/dna_retrovirus
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/gbs
|
||||
name = "GBS culture bottle"
|
||||
desc = "A small bottle. Contains Gravitokinetic Bipotential SADS+ culture in synthblood medium."//Or simply - General BullShit
|
||||
icon_state = "bottle3"
|
||||
amount_per_transfer_from_this = 5
|
||||
spawned_disease = /datum/disease/gbs
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/fake_gbs
|
||||
name = "GBS culture bottle"
|
||||
desc = "A small bottle. Contains Gravitokinetic Bipotential SADS- culture in synthblood medium."//Or simply - General BullShit
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/fake_gbs
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/brainrot
|
||||
name = "Brainrot culture bottle"
|
||||
desc = "A small bottle. Contains Cryptococcus Cosmosis culture in synthblood medium."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/brainrot
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/magnitis
|
||||
name = "Magnitis culture bottle"
|
||||
desc = "A small bottle. Contains a small dosage of Fukkos Miracos."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/magnitis
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/wizarditis
|
||||
name = "Wizarditis culture bottle"
|
||||
desc = "A small bottle. Contains a sample of Rincewindus Vulgaris."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/wizarditis
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/anxiety
|
||||
name = "Severe Anxiety culture bottle"
|
||||
desc = "A small bottle. Contains a sample of Lepidopticides."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/anxiety
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/beesease
|
||||
name = "Beesease culture bottle"
|
||||
desc = "A small bottle. Contains a sample of invasive Apidae."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/beesease
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/fluspanish
|
||||
name = "Spanish flu culture bottle"
|
||||
desc = "A small bottle. Contains a sample of Inquisitius."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/fluspanish
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/tuberculosis
|
||||
name = "Fungal Tuberculosis culture bottle"
|
||||
desc = "A small bottle. Contains a sample of Fungal Tubercle bacillus."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/tuberculosis
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/tuberculosiscure
|
||||
name = "BVAK bottle"
|
||||
desc = "A small bottle containing Bio Virus Antidote Kit."
|
||||
icon_state = "bottle5"
|
||||
list_reagents = list("atropine" = 5, "epinephrine" = 5, "salbutamol" = 10, "spaceacillin" = 10)
|
||||
|
||||
@@ -31,12 +31,11 @@
|
||||
/obj/machinery/bot/medbot,
|
||||
/obj/item/weapon/storage/secure/safe,
|
||||
/obj/machinery/iv_drip,
|
||||
/obj/machinery/disease2/incubator,
|
||||
/obj/machinery/computer/pandemic,
|
||||
/obj/machinery/disposal,
|
||||
/obj/machinery/apiary,
|
||||
/mob/living/simple_animal/cow,
|
||||
/mob/living/simple_animal/hostile/retaliate/goat,
|
||||
/obj/machinery/computer/centrifuge,
|
||||
/obj/machinery/sleeper,
|
||||
/obj/machinery/smartfridge/,
|
||||
/obj/machinery/biogenerator,
|
||||
|
||||
@@ -182,6 +182,16 @@
|
||||
build_path = /obj/item/weapon/circuitboard/operating
|
||||
category = list("Computer Boards")
|
||||
|
||||
/datum/design/pandemic
|
||||
name = "Computer Design (PanD.E.M.I.C. 2200)"
|
||||
desc = "Allows for the construction of circuit boards used to build a PanD.E.M.I.C. 2200 console."
|
||||
id = "pandemic"
|
||||
req_tech = list("programming" = 2, "biotech" = 2)
|
||||
build_type = IMPRINTER
|
||||
materials = list(MAT_GLASS = 1000, "sacid" = 20)
|
||||
build_path = /obj/item/weapon/circuitboard/pandemic
|
||||
category = list("Computer Boards")
|
||||
|
||||
/datum/design/powermonitor
|
||||
name = "Console Board (Power Monitor)"
|
||||
desc = "Allows for the construction of circuit boards used to build a new power monitor"
|
||||
|
||||
@@ -23,6 +23,16 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
vessel.add_reagent(species.exotic_blood, max_blood)
|
||||
else
|
||||
vessel.add_reagent("blood", max_blood)
|
||||
for(var/datum/reagent/blood/B in vessel.reagent_list)
|
||||
if(B.id == "blood")
|
||||
B.data = list(
|
||||
"donor" = src,
|
||||
"viruses" = null,
|
||||
"blood_DNA" = dna.unique_enzymes,
|
||||
"blood_colour" = species.blood_color,
|
||||
"blood_type" = b_type,
|
||||
"resistances" = null,
|
||||
"trace_chem" = null)
|
||||
spawn(1)
|
||||
fixblood()
|
||||
|
||||
@@ -30,9 +40,14 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
/mob/living/carbon/human/proc/fixblood()
|
||||
for(var/datum/reagent/blood/B in vessel.reagent_list)
|
||||
if(B.id == "blood")
|
||||
B.data = list( "donor"=src,"viruses"=null,"blood_DNA"=dna.unique_enzymes,"blood_colour"= species.blood_color,"blood_type"=dna.b_type, \
|
||||
"resistances"=null,"trace_chem"=null, "virus2" = null, "antibodies" = null)
|
||||
B.color = B.data["blood_colour"]
|
||||
B.data = list(
|
||||
"donor" = src,
|
||||
"viruses" = null,
|
||||
"blood_DNA" = dna.unique_enzymes,
|
||||
"blood_colour" = species.blood_color,
|
||||
"blood_type" = b_type,
|
||||
"resistances" = null,
|
||||
"trace_chem" = null)
|
||||
|
||||
// Takes care blood loss and regeneration
|
||||
/mob/living/carbon/human/proc/handle_blood()
|
||||
@@ -196,10 +211,13 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
|
||||
//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
|
||||
B.data["viruses"] = list()
|
||||
|
||||
for(var/datum/disease/D in viruses)
|
||||
B.data["viruses"] += D.Copy()
|
||||
if(resistances && resistances.len)
|
||||
B.data["resistances"] = resistances.Copy()
|
||||
|
||||
B.data["blood_DNA"] = copytext(src.dna.unique_enzymes,1,0)
|
||||
B.data["blood_type"] = copytext(src.dna.b_type,1,0)
|
||||
|
||||
@@ -242,14 +260,10 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
//Transfers blood from container ot vessels
|
||||
/mob/living/carbon/proc/inject_blood(obj/item/weapon/reagent_containers/container, var/amount)
|
||||
var/datum/reagent/blood/injected = get_blood(container.reagents)
|
||||
|
||||
if (!istype(injected))
|
||||
return
|
||||
var/list/sniffles = virus_copylist(injected.data["virus2"])
|
||||
for(var/ID in sniffles)
|
||||
var/datum/disease2/disease/sniffle = sniffles[ID]
|
||||
infect_virus2(src,sniffle,1)
|
||||
if (injected.data["antibodies"] && prob(5))
|
||||
antibodies |= injected.data["antibodies"]
|
||||
|
||||
var/list/chems = list()
|
||||
chems = params2list(injected.data["trace_chem"])
|
||||
for(var/C in chems)
|
||||
@@ -388,8 +402,4 @@ Large: Whether the splat should be big or not
|
||||
else
|
||||
B.blood_DNA[bld.data["blood_DNA"]] = "O+"
|
||||
|
||||
// Update virus information.
|
||||
if(bld.data["virus2"])
|
||||
B.virus2 = virus_copylist(bld.data["virus2"])
|
||||
|
||||
return B
|
||||
return B
|
||||
|
||||
@@ -352,22 +352,26 @@
|
||||
organ_tag = "appendix"
|
||||
parent_organ = "groin"
|
||||
slot = "appendix"
|
||||
var/inflamed = 0
|
||||
|
||||
|
||||
/*
|
||||
/obj/item/organ/internal/appendix/removed()
|
||||
|
||||
if(owner)
|
||||
var/inflamed = 0
|
||||
for(var/datum/disease/appendicitis/appendicitis in owner.viruses)
|
||||
inflamed = 1
|
||||
appendicitis.cure()
|
||||
owner.resistances += appendicitis
|
||||
if(inflamed)
|
||||
icon_state = "appendixinflamed"
|
||||
name = "inflamed appendix"
|
||||
/obj/item/organ/internal/appendix/remove(mob/living/carbon/M, special = 0)
|
||||
for(var/datum/disease/appendicitis/A in M.viruses)
|
||||
A.cure()
|
||||
inflamed = 1
|
||||
update_icon()
|
||||
..()
|
||||
*/
|
||||
|
||||
/obj/item/organ/internal/appendix/insert(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
if(inflamed)
|
||||
M.AddDisease(new /datum/disease/appendicitis)
|
||||
|
||||
/obj/item/organ/internal/appendix/prepare_eat()
|
||||
var/obj/S = ..()
|
||||
if(inflamed)
|
||||
S.reagents.add_reagent("????", 5)
|
||||
return S
|
||||
|
||||
//shadowling tumor
|
||||
/obj/item/organ/internal/shadowtumor
|
||||
name = "black tumor"
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
/obj/machinery/disease2/diseaseanalyser
|
||||
name = "Disease Analyser"
|
||||
icon = 'icons/obj/virology.dmi'
|
||||
icon_state = "analyser"
|
||||
anchored = 1
|
||||
density = 1
|
||||
|
||||
var/scanning = 0
|
||||
var/pause = 0
|
||||
|
||||
var/obj/item/weapon/virusdish/dish = null
|
||||
|
||||
/obj/machinery/disease2/diseaseanalyser/attackby(var/obj/O as obj, var/mob/user as mob, params)
|
||||
if(!istype(O,/obj/item/weapon/virusdish)) return
|
||||
|
||||
if(dish)
|
||||
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.\"")
|
||||
|
||||
playsound(loc, "sound/goonstation/machines/printer_dotmatrix.ogg", 50, 1)
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/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>
|
||||
"}
|
||||
dish.info = r
|
||||
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
|
||||
@@ -1,52 +0,0 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
||||
|
||||
// reserving some numbers for later special antigens
|
||||
var/global/const/ANTIGEN_A = 1
|
||||
var/global/const/ANTIGEN_B = 2
|
||||
var/global/const/ANTIGEN_RH = 4
|
||||
var/global/const/ANTIGEN_Q = 8
|
||||
var/global/const/ANTIGEN_U = 16
|
||||
var/global/const/ANTIGEN_V = 32
|
||||
var/global/const/ANTIGEN_X = 64
|
||||
var/global/const/ANTIGEN_Y = 128
|
||||
var/global/const/ANTIGEN_Z = 256
|
||||
var/global/const/ANTIGEN_M = 512
|
||||
var/global/const/ANTIGEN_N = 1024
|
||||
var/global/const/ANTIGEN_P = 2048
|
||||
var/global/const/ANTIGEN_O = 4096
|
||||
|
||||
var/global/list/ANTIGENS = list(
|
||||
"[ANTIGEN_A]" = "A",
|
||||
"[ANTIGEN_B]" = "B",
|
||||
"[ANTIGEN_RH]" = "RH",
|
||||
"[ANTIGEN_Q]" = "Q",
|
||||
"[ANTIGEN_U]" = "U",
|
||||
"[ANTIGEN_V]" = "V",
|
||||
"[ANTIGEN_Z]" = "Z",
|
||||
"[ANTIGEN_M]" = "M",
|
||||
"[ANTIGEN_N]" = "N",
|
||||
"[ANTIGEN_P]" = "P",
|
||||
"[ANTIGEN_O]" = "O"
|
||||
)
|
||||
|
||||
// pure concentrated antibodies
|
||||
datum/reagent/antibodies
|
||||
data = list("antibodies"=0)
|
||||
name = "Antibodies"
|
||||
id = "antibodies"
|
||||
reagent_state = LIQUID
|
||||
color = "#0050F0"
|
||||
|
||||
reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
|
||||
if(istype(M,/mob/living/carbon))
|
||||
if(src.data && method == INGEST)
|
||||
if(M:virus2) if(src.data["antibodies"] & M:virus2.antigen)
|
||||
M:virus2.dead = 1
|
||||
M:antibodies |= src.data["antibodies"]
|
||||
return
|
||||
|
||||
// iterate over the list of antigens and see what matches
|
||||
/proc/antigens2string(var/antigens)
|
||||
var/code = ""
|
||||
for(var/V in ANTIGENS) if(text2num(V) & antigens) code += ANTIGENS[V]
|
||||
return code
|
||||
@@ -1,217 +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.dmi'
|
||||
icon_state = "centrifuge"
|
||||
var/curing
|
||||
var/isolating
|
||||
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/vial/sample = null
|
||||
var/datum/disease2/disease/virus2 = null
|
||||
|
||||
/obj/machinery/computer/centrifuge/attackby(var/obj/O as obj, var/mob/user as mob, params)
|
||||
if(istype(O, /obj/item/weapon/screwdriver))
|
||||
return ..(O,user)
|
||||
|
||||
if(istype(O,/obj/item/weapon/reagent_containers/glass/beaker/vial))
|
||||
if(sample)
|
||||
user << "\The [src] is already loaded."
|
||||
return
|
||||
|
||||
if(!user.drop_item())
|
||||
user << "<span class='warning'>\The [O] is stuck to you!</span>"
|
||||
return
|
||||
|
||||
sample = O
|
||||
O.forceMove(src)
|
||||
|
||||
user.visible_message("[user] adds \a [O] to \the [src]!", "You add \a [O] to \the [src]!")
|
||||
nanomanager.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
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/centrifuge/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
user.set_machine(src)
|
||||
|
||||
var/data[0]
|
||||
data["antibodies"] = null
|
||||
data["pathogens"] = null
|
||||
data["is_antibody_sample"] = null
|
||||
|
||||
if (curing)
|
||||
data["busy"] = "Isolating antibodies..."
|
||||
else if (isolating)
|
||||
data["busy"] = "Isolating pathogens..."
|
||||
else
|
||||
data["sample_inserted"] = !!sample
|
||||
|
||||
if (sample)
|
||||
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
|
||||
if (B)
|
||||
data["antibodies"] = B.data["antibodies"] ? antigens2string(B.data["antibodies"]) : 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]")))
|
||||
|
||||
if (pathogens.len > 0)
|
||||
data["pathogens"] = pathogens
|
||||
|
||||
else
|
||||
var/datum/reagent/antibodies/A = locate(/datum/reagent/antibodies) in sample.reagents.reagent_list
|
||||
data["antibodies"] = A && A.data["antibodies"] ? antigens2string(A.data["antibodies"]) : null
|
||||
data["is_antibody_sample"] = 1
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "isolation_centrifuge.tmpl", src.name, 400, 500)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
/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/Topic(href, href_list)
|
||||
if (..()) return 0
|
||||
|
||||
var/mob/user = usr
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
|
||||
|
||||
src.add_fingerprint(user)
|
||||
|
||||
if (href_list["close"])
|
||||
user.unset_machine()
|
||||
ui.close()
|
||||
return 0
|
||||
|
||||
if (href_list["print"])
|
||||
print(user)
|
||||
return 1
|
||||
|
||||
if(href_list["isolate"])
|
||||
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in sample.reagents.reagent_list
|
||||
if (B)
|
||||
var/datum/disease2/disease/virus = locate(href_list["isolate"])
|
||||
virus2 = virus.getcopy()
|
||||
isolating = 40
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
switch(href_list["action"])
|
||||
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 1
|
||||
|
||||
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.loc, 'sound/machines/juicer.ogg', 50, 1)
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
if("sample")
|
||||
if(sample)
|
||||
sample.forceMove(src.loc)
|
||||
sample = null
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
/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)
|
||||
|
||||
nanomanager.update_uis(src)
|
||||
update_icon()
|
||||
ping("\The [src] pings, \"Antibody isolated.\"")
|
||||
|
||||
/obj/machinery/computer/centrifuge/proc/isolate()
|
||||
if (!sample) return
|
||||
var/obj/item/weapon/virusdish/dish = new/obj/item/weapon/virusdish(loc)
|
||||
dish.virus2 = virus2
|
||||
virus2 = null
|
||||
|
||||
nanomanager.update_uis(src)
|
||||
update_icon()
|
||||
ping("\The [src] pings, \"Pathogen isolated.\"")
|
||||
|
||||
/obj/machinery/computer/centrifuge/proc/print(var/mob/user)
|
||||
playsound(loc, "sound/goonstation/machines/printer_dotmatrix.ogg", 50, 1)
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/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 += B.data["antibodies"] ? antigens2string(B.data["antibodies"]) : "None"
|
||||
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 += A.data["antibodies"] ? antigens2string(A.data["antibodies"]) : "None"
|
||||
P.info += "<br>"
|
||||
|
||||
P.info += {"
|
||||
<hr>
|
||||
<u>Additional Notes:</u> <field>
|
||||
"}
|
||||
|
||||
state("The nearby computer prints out a pathology report.")
|
||||
@@ -1,107 +0,0 @@
|
||||
/obj/machinery/computer/curer
|
||||
name = "cure research machine"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "dna"
|
||||
circuit = /obj/item/weapon/circuitboard/curefab
|
||||
var/curing
|
||||
var/virusing
|
||||
|
||||
var/obj/item/weapon/reagent_containers/container = null
|
||||
|
||||
/obj/machinery/computer/curer/attackby(var/obj/I as obj, var/mob/user as mob, params)
|
||||
if(istype(I,/obj/item/weapon/reagent_containers))
|
||||
var/mob/living/carbon/C = user
|
||||
if(!container && C.drop_item())
|
||||
container = I
|
||||
I.forceMove(src)
|
||||
return
|
||||
if(istype(I,/obj/item/weapon/virusdish))
|
||||
if(virusing)
|
||||
user << "<b>The pathogen materializer is still recharging..</b>"
|
||||
return
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/product = new(src.loc)
|
||||
|
||||
var/list/data = list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=null,"resistances"=null,"trace_chem"=null,"virus2"=list(),"antibodies"=0)
|
||||
data["virus2"] |= I:virus2
|
||||
product.reagents.add_reagent("blood",30,data)
|
||||
|
||||
virusing = 1
|
||||
spawn(1200) virusing = 0
|
||||
|
||||
state("The [src.name] Buzzes", "blue")
|
||||
return
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/curer/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/curer/attack_hand(var/mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
user.machine = src
|
||||
var/dat
|
||||
if(curing)
|
||||
dat = "Antibody production in progress"
|
||||
else if(virusing)
|
||||
dat = "Virus production in progress"
|
||||
else if(container)
|
||||
// see if there's any blood in the container
|
||||
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in container.reagents.reagent_list
|
||||
|
||||
if(B)
|
||||
dat = "Blood sample inserted."
|
||||
var/code = ""
|
||||
for(var/V in ANTIGENS) if(text2num(V) & B.data["antibodies"]) code += ANTIGENS[V]
|
||||
dat += "<BR>Antibodies: [code]"
|
||||
dat += "<BR><A href='?src=\ref[src];antibody=1'>Begin antibody production</a>"
|
||||
else
|
||||
dat += "<BR>Please check container contents."
|
||||
dat += "<BR><A href='?src=\ref[src];eject=1'>Eject container</a>"
|
||||
else
|
||||
dat = "Please insert a container."
|
||||
|
||||
user << browse(dat, "window=computer;size=400x500")
|
||||
onclose(user, "computer")
|
||||
return
|
||||
|
||||
/obj/machinery/computer/curer/process()
|
||||
..()
|
||||
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
use_power(500)
|
||||
|
||||
if(curing)
|
||||
curing -= 1
|
||||
if(curing == 0)
|
||||
if(container)
|
||||
createcure(container)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/curer/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.machine = src
|
||||
|
||||
if (href_list["antibody"])
|
||||
curing = 10
|
||||
else if(href_list["eject"])
|
||||
container.forceMove(src.loc)
|
||||
container = null
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/computer/curer/proc/createcure(var/obj/item/weapon/reagent_containers/container)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/product = new(src.loc)
|
||||
|
||||
var/datum/reagent/blood/B = locate() in container.reagents.reagent_list
|
||||
|
||||
var/list/data = list()
|
||||
data["antibodies"] = B.data["antibodies"]
|
||||
product.reagents.add_reagent("antibodies",30,data)
|
||||
|
||||
state("\The [src.name] buzzes", "blue")
|
||||
@@ -1,268 +0,0 @@
|
||||
/datum/disease2/disease
|
||||
var/infectionchance = 70
|
||||
var/speed = 1
|
||||
var/spreadtype = "Contact" // Can also be "Airborne" or "Injection"
|
||||
var/stage = 1
|
||||
var/stageprob = 10
|
||||
var/dead = 0
|
||||
var/clicks = 0
|
||||
var/uniqueID = 0
|
||||
var/list/datum/disease2/effectholder/effects = list()
|
||||
var/antigen = 0 // 16 bits describing the antigens, when one bit is set, a cure with that bit can dock here
|
||||
var/max_stage = 4
|
||||
var/list/affected_species = list("Human","Unathi","Skrell","Tajaran","Vox","Kidan","Slime People","Grey","Diona", "Vulpkanin") //if this is changed, also change modules/nano/modules/virus2_creator.dm
|
||||
//as you cannot use initial() with lists
|
||||
/datum/disease2/disease/New()
|
||||
uniqueID = rand(0,10000)
|
||||
..()
|
||||
|
||||
/datum/disease2/disease/proc/makerandom(var/greater=0, var/allow_injection=0)
|
||||
for(var/i=1 ; i <= max_stage ; i++ )
|
||||
var/datum/disease2/effectholder/holder = new /datum/disease2/effectholder
|
||||
holder.stage = i
|
||||
if(greater)
|
||||
holder.getrandomeffect(2)
|
||||
else
|
||||
holder.getrandomeffect()
|
||||
effects += holder
|
||||
uniqueID = rand(0,10000)
|
||||
infectionchance = rand(60,90)
|
||||
antigen |= text2num(pick(ANTIGENS))
|
||||
antigen |= text2num(pick(ANTIGENS))
|
||||
spreadtype = prob(70) ? "Airborne" : "Contact"
|
||||
if(allow_injection) spreadtype = prob(20) ? spreadtype : "Injection"
|
||||
|
||||
if(all_species.len)
|
||||
affected_species = get_infectable_species()
|
||||
|
||||
/proc/get_infectable_species()
|
||||
var/list/meat = list()
|
||||
var/list/res = list()
|
||||
for (var/specie in all_species)
|
||||
var/datum/species/S = all_species[specie]
|
||||
if(!(S.virus_immune))
|
||||
meat += S.name
|
||||
if(meat.len)
|
||||
var/num = rand(1,meat.len)
|
||||
for(var/i=0,i<num,i++)
|
||||
var/picked = pick(meat)
|
||||
meat -= picked
|
||||
res += picked
|
||||
return res
|
||||
|
||||
/datum/disease2/disease/proc/activate(var/mob/living/carbon/mob)
|
||||
if(dead)
|
||||
cure(mob)
|
||||
return
|
||||
|
||||
if(mob.stat == 2)
|
||||
return
|
||||
|
||||
// Some species are flat out immune to organic viruses.
|
||||
var/mob/living/carbon/human/H = mob
|
||||
if(istype(H) && H.species.virus_immune)
|
||||
cure(mob)
|
||||
return
|
||||
|
||||
if(stage <= 1 && clicks == 0) // with a certain chance, the mob may become immune to the disease before it starts properly
|
||||
if(prob(5))
|
||||
mob.antibodies |= antigen
|
||||
|
||||
// NO MORE MUTATING IN MOBS - Bone White
|
||||
// if(mob.radiation > 50)
|
||||
// if(prob(1))
|
||||
// majormutateinactivate(mob)
|
||||
|
||||
//Space antibiotics stop disease completely
|
||||
if(mob.reagents.has_reagent("spaceacillin"))
|
||||
if(stage == 1 && prob(20))
|
||||
src.cure(mob)
|
||||
return
|
||||
|
||||
//Virus food speeds up disease progress
|
||||
if(mob.reagents.has_reagent("virusfood"))
|
||||
mob.reagents.remove_reagent("virusfood",0.1)
|
||||
clicks += 10
|
||||
|
||||
//Moving to the next stage
|
||||
if(clicks > stage*100 && prob(10))
|
||||
/*if(stage == max_stage)
|
||||
src.cure(mob)
|
||||
mob.antibodies |= src.antigen*/ //NO AUTOCURE FOR YOU
|
||||
stage++
|
||||
clicks = 0
|
||||
//Do nasty effects
|
||||
for(var/datum/disease2/effectholder/e in effects)
|
||||
if(prob(33))
|
||||
e.runeffect(mob,stage)
|
||||
|
||||
//Short airborne spread
|
||||
if(src.spreadtype == "Airborne")
|
||||
for(var/mob/living/carbon/M in oview(1,mob))
|
||||
if(airborne_can_reach(get_turf(mob), get_turf(M)))
|
||||
infect_virus2(M,src)
|
||||
|
||||
//fever
|
||||
mob.bodytemperature = max(mob.bodytemperature, min(310+5*stage ,mob.bodytemperature+5*stage))
|
||||
clicks+=speed
|
||||
|
||||
/datum/disease2/disease/proc/cure(var/mob/living/carbon/mob)
|
||||
for(var/datum/disease2/effectholder/e in effects)
|
||||
e.effect.deactivate(mob)
|
||||
mob.virus2.Remove("[uniqueID]")
|
||||
|
||||
/datum/disease2/disease/proc/minormutate()
|
||||
//uniqueID = rand(0,10000)
|
||||
var/datum/disease2/effectholder/holder = pick(effects)
|
||||
holder.minormutate()
|
||||
infectionchance = min(50,infectionchance + rand(0,10))
|
||||
|
||||
/datum/disease2/disease/proc/majormutate()
|
||||
uniqueID = rand(0,10000)
|
||||
var/datum/disease2/effectholder/holder = pick(effects)
|
||||
holder.majormutate()
|
||||
if (prob(5))
|
||||
antigen = text2num(pick(ANTIGENS))
|
||||
antigen |= text2num(pick(ANTIGENS))
|
||||
if (prob(5) && all_species.len)
|
||||
affected_species = get_infectable_species()
|
||||
|
||||
/datum/disease2/disease/proc/majormutateinactivate(var/mob/living/carbon/mob) //Bone White - Duplicate of majormutate() with adminlogs, for use only in activate()
|
||||
var/oldID = uniqueID
|
||||
uniqueID = rand(0,10000)
|
||||
var/datum/disease2/effectholder/holder = pick(effects)
|
||||
holder.majormutate()
|
||||
if (prob(5))
|
||||
var/oldAntigen = antigen
|
||||
antigen = text2num(pick(ANTIGENS))
|
||||
antigen |= text2num(pick(ANTIGENS))
|
||||
log_admin("Stamm #[oldID] ([oldAntigen]) mutated antigens in [mob.name] to Stamm #[uniqueID] ([antigen])")
|
||||
message_admins("Stamm #[oldID] ([oldAntigen]) mutated antigens in [mob.name] to Stamm #[uniqueID] ([antigen])")
|
||||
else if (prob(10) && all_species.len)
|
||||
var/old_species = affected_species
|
||||
affected_species = get_infectable_species()
|
||||
log_admin("Stamm #[oldID] ([old_species]) mutated affected species in [mob.name] to Stamm #[uniqueID] ([affected_species])")
|
||||
message_admins("Stamm #[oldID] ([old_species]) mutated affected species in [mob.name] to Stamm #[uniqueID] ([affected_species])")
|
||||
else
|
||||
log_admin("Stamm #[oldID] mutated in [mob.name] to Stamm #[uniqueID] ([antigen])")
|
||||
message_admins("Stamm #[oldID] mutated in a [mob.name] to Stamm #[uniqueID] ([antigen])")
|
||||
|
||||
/datum/disease2/disease/proc/getcopy()
|
||||
var/datum/disease2/disease/disease = new /datum/disease2/disease
|
||||
disease.infectionchance = infectionchance
|
||||
disease.spreadtype = spreadtype
|
||||
disease.stageprob = stageprob
|
||||
disease.antigen = antigen
|
||||
disease.uniqueID = uniqueID
|
||||
disease.speed = speed
|
||||
disease.clicks = clicks
|
||||
disease.affected_species = affected_species.Copy()
|
||||
for(var/datum/disease2/effectholder/holder in effects)
|
||||
var/datum/disease2/effectholder/newholder = new /datum/disease2/effectholder
|
||||
newholder.effect = new holder.effect.type
|
||||
newholder.chance = holder.chance
|
||||
newholder.cure = holder.cure
|
||||
newholder.multiplier = holder.multiplier
|
||||
newholder.happensonce = holder.happensonce
|
||||
newholder.stage = holder.stage
|
||||
disease.effects += newholder
|
||||
return disease
|
||||
|
||||
/datum/disease2/disease/proc/issame(var/datum/disease2/disease/disease)
|
||||
var/list/types = list()
|
||||
var/list/types2 = list()
|
||||
for(var/datum/disease2/effectholder/d in effects)
|
||||
types += d.effect.type
|
||||
var/equal = 1
|
||||
|
||||
for(var/datum/disease2/effectholder/d in disease.effects)
|
||||
types2 += d.effect.type
|
||||
|
||||
for(var/type in types)
|
||||
if(!(type in types2))
|
||||
equal = 0
|
||||
|
||||
if (antigen != disease.antigen)
|
||||
equal = 0
|
||||
return equal
|
||||
|
||||
/proc/virus_copylist(var/list/datum/disease2/disease/viruses)
|
||||
var/list/res = list()
|
||||
for (var/ID in viruses)
|
||||
var/datum/disease2/disease/V = viruses[ID]
|
||||
if(istype(V))
|
||||
res["[V.uniqueID]"] = V.getcopy()
|
||||
else
|
||||
testing("Got a NULL disease2 in virus_copylist!")
|
||||
return res
|
||||
|
||||
|
||||
var/global/list/virusDB = list()
|
||||
|
||||
/datum/disease2/disease/proc/name()
|
||||
.= "stamm #[add_zero("[uniqueID]", 4)]"
|
||||
if ("[uniqueID]" in virusDB)
|
||||
var/datum/data/record/V = virusDB["[uniqueID]"]
|
||||
.= V.fields["name"]
|
||||
|
||||
/datum/disease2/disease/proc/get_info()
|
||||
var/r = {"
|
||||
<small>Analysis determined the existence of a GNAv2-based viral lifeform.</small><br>
|
||||
<u>Designation:</u> [name()]<br>
|
||||
<u>Antigen:</u> [antigens2string(antigen)]<br>
|
||||
<u>Transmitted By:</u> [spreadtype]<br>
|
||||
<u>Rate of Progression:</u> [stageprob * 10]<br>
|
||||
<u>Species Affected:</u> [list2text(affected_species, ", ")]<br>
|
||||
"}
|
||||
|
||||
r += "<u>Symptoms:</u><br>"
|
||||
for(var/datum/disease2/effectholder/E in effects)
|
||||
r += "([E.stage]) [E.effect.name] "
|
||||
r += "<small><u>Strength:</u> [E.multiplier >= 3 ? "Severe" : E.multiplier > 1 ? "Above Average" : "Average"] "
|
||||
r += "<u>Verosity:</u> [E.chance * 15]</small><br>"
|
||||
|
||||
return r
|
||||
|
||||
/datum/disease2/disease/proc/addToDB()
|
||||
if ("[uniqueID]" in virusDB)
|
||||
return 0
|
||||
var/datum/data/record/v = new()
|
||||
v.fields["id"] = uniqueID
|
||||
v.fields["name"] = name()
|
||||
v.fields["description"] = get_info()
|
||||
v.fields["antigen"] = antigens2string(antigen)
|
||||
v.fields["spread type"] = spreadtype
|
||||
virusDB["[uniqueID]"] = v
|
||||
return 1
|
||||
|
||||
proc/virus2_lesser_infection()
|
||||
var/list/candidates = list() //list of candidate keys
|
||||
|
||||
for(var/mob/living/carbon/human/G in player_list)
|
||||
if(G.client && G.stat != DEAD)
|
||||
candidates += G
|
||||
|
||||
if(!candidates.len) return
|
||||
|
||||
candidates = shuffle(candidates)
|
||||
|
||||
infect_mob_random_lesser(candidates[1])
|
||||
|
||||
proc/virus2_greater_infection()
|
||||
var/list/candidates = list() //list of candidate keys
|
||||
|
||||
for(var/mob/living/carbon/human/G in player_list)
|
||||
if(G.client && G.stat != DEAD)
|
||||
candidates += G
|
||||
if(!candidates.len) return
|
||||
|
||||
candidates = shuffle(candidates)
|
||||
|
||||
infect_mob_random_greater(candidates[1])
|
||||
|
||||
proc/virology_letterhead(var/report_name)
|
||||
return {"
|
||||
<center><h1><b>[report_name]</b></h1></center>
|
||||
<center><small><i>[station_name()] Virology Lab</i></small></center>
|
||||
<hr>
|
||||
"}
|
||||
@@ -1,180 +0,0 @@
|
||||
/obj/machinery/computer/diseasesplicer
|
||||
name = "disease splicer console"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_screen = "crew"
|
||||
icon_keyboard = "med_key"
|
||||
|
||||
var/datum/disease2/effectholder/memorybank = null
|
||||
var/list/species_buffer = null
|
||||
var/analysed = 0
|
||||
var/obj/item/weapon/virusdish/dish = null
|
||||
var/burning = 0
|
||||
var/splicing = 0
|
||||
var/scanning = 0
|
||||
|
||||
/obj/machinery/computer/diseasesplicer/attackby(var/obj/I as obj, var/mob/user as mob, params)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
return ..(I,user)
|
||||
|
||||
if(istype(I,/obj/item/weapon/virusdish))
|
||||
var/mob/living/carbon/c = user
|
||||
if (dish)
|
||||
user << "\The [src] is already loaded."
|
||||
return
|
||||
|
||||
dish = I
|
||||
c.drop_item()
|
||||
I.loc = src
|
||||
|
||||
if(istype(I,/obj/item/weapon/diseasedisk))
|
||||
user << "You upload the contents of the disk onto the buffer."
|
||||
memorybank = I:effect
|
||||
species_buffer = I:species
|
||||
analysed = I:analysed
|
||||
|
||||
src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/diseasesplicer/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/diseasesplicer/attack_hand(var/mob/user as mob)
|
||||
if(..()) return
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/diseasesplicer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
user.set_machine(src)
|
||||
|
||||
var/data[0]
|
||||
data["dish_inserted"] = !!dish
|
||||
data["growth"] = 0
|
||||
data["affected_species"] = null
|
||||
|
||||
if (memorybank)
|
||||
data["buffer"] = list("name" = (analysed ? memorybank.effect.name : "Unknown Symptom"), "stage" = memorybank.stage)
|
||||
if (species_buffer)
|
||||
data["species_buffer"] = analysed ? list2text(species_buffer, ", ") : "Unknown Species"
|
||||
|
||||
if (splicing)
|
||||
data["busy"] = "Splicing..."
|
||||
else if (scanning)
|
||||
data["busy"] = "Scanning..."
|
||||
else if (burning)
|
||||
data["busy"] = "Copying data to disk..."
|
||||
else if (dish)
|
||||
data["growth"] = min(dish.growth, 100)
|
||||
|
||||
if (dish.virus2)
|
||||
if (dish.virus2.affected_species)
|
||||
data["affected_species"] = dish.analysed ? list2text(dish.virus2.affected_species, ", ") : "Unknown"
|
||||
|
||||
if (dish.growth >= 50)
|
||||
var/list/effects[0]
|
||||
for (var/datum/disease2/effectholder/e in dish.virus2.effects)
|
||||
effects.Add(list(list("name" = (dish.analysed ? e.effect.name : "Unknown"), "stage" = (e.stage), "reference" = "\ref[e]")))
|
||||
data["effects"] = effects
|
||||
else
|
||||
data["info"] = "Insufficient cell growth for gene splicing."
|
||||
else
|
||||
data["info"] = "No virus detected."
|
||||
else
|
||||
data["info"] = "No dish loaded."
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "disease_splicer.tmpl", src.name, 400, 600)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/diseasesplicer/process()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
if(scanning)
|
||||
scanning -= 1
|
||||
if(!scanning)
|
||||
ping("\The [src] pings, \"Analysis complete.\"")
|
||||
nanomanager.update_uis(src)
|
||||
if(splicing)
|
||||
splicing -= 1
|
||||
if(!splicing)
|
||||
ping("\The [src] pings, \"Splicing operation complete.\"")
|
||||
nanomanager.update_uis(src)
|
||||
if(burning)
|
||||
burning -= 1
|
||||
if(!burning)
|
||||
var/obj/item/weapon/diseasedisk/d = new /obj/item/weapon/diseasedisk(src.loc)
|
||||
d.analysed = analysed
|
||||
if(analysed)
|
||||
if (memorybank)
|
||||
d.name = "[memorybank.effect.name] GNA disk (Stage: [memorybank.effect.stage])"
|
||||
d.effect = memorybank
|
||||
else if (species_buffer)
|
||||
d.name = "[list2text(species_buffer, ", ")] GNA disk"
|
||||
d.species = species_buffer
|
||||
else
|
||||
if (memorybank)
|
||||
d.name = "Unknown GNA disk (Stage: [memorybank.effect.stage])"
|
||||
d.effect = memorybank
|
||||
else if (species_buffer)
|
||||
d.name = "Unknown Species GNA disk"
|
||||
d.species = species_buffer
|
||||
|
||||
ping("\The [src] pings, \"Backup disk saved.\"")
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
/obj/machinery/computer/diseasesplicer/Topic(href, href_list)
|
||||
if(..()) return 0
|
||||
|
||||
var/mob/user = usr
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
|
||||
|
||||
src.add_fingerprint(user)
|
||||
|
||||
if (href_list["close"])
|
||||
user.unset_machine()
|
||||
ui.close()
|
||||
return 0
|
||||
|
||||
if (href_list["grab"])
|
||||
if (dish)
|
||||
memorybank = locate(href_list["grab"])
|
||||
species_buffer = null
|
||||
analysed = dish.analysed
|
||||
dish = null
|
||||
scanning = 10
|
||||
return 1
|
||||
|
||||
if (href_list["affected_species"])
|
||||
if (dish)
|
||||
memorybank = null
|
||||
species_buffer = dish.virus2.affected_species
|
||||
analysed = dish.analysed
|
||||
dish = null
|
||||
scanning = 10
|
||||
return 1
|
||||
|
||||
if(href_list["eject"])
|
||||
if (dish)
|
||||
dish.loc = src.loc
|
||||
dish = null
|
||||
return 1
|
||||
|
||||
if(href_list["splice"])
|
||||
if(dish)
|
||||
if (memorybank)
|
||||
for(var/datum/disease2/effectholder/e in dish.virus2.effects)
|
||||
if(e.stage == memorybank.stage)
|
||||
e.effect = memorybank.effect
|
||||
|
||||
if (species_buffer)
|
||||
dish.virus2.affected_species = species_buffer
|
||||
|
||||
splicing = 10
|
||||
dish.virus2.uniqueID = rand(0,10000)
|
||||
return 1
|
||||
|
||||
if(href_list["disk"])
|
||||
burning = 10
|
||||
return 1
|
||||
|
||||
return 0
|
||||
@@ -1,208 +0,0 @@
|
||||
/obj/machinery/disease2/incubator/
|
||||
name = "Pathogenic incubator"
|
||||
density = 1
|
||||
anchored = 1
|
||||
icon = 'icons/obj/virology.dmi'
|
||||
icon_state = "incubator"
|
||||
var/obj/item/weapon/virusdish/dish
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
||||
var/radiation = 0
|
||||
|
||||
var/on = 0
|
||||
var/power = 0
|
||||
|
||||
var/foodsupply = 0
|
||||
var/toxins = 0
|
||||
|
||||
/obj/machinery/disease2/incubator/attackby(var/obj/O as obj, var/mob/user as mob, params)
|
||||
if(istype(O, /obj/item/weapon/reagent_containers/glass) || istype(O,/obj/item/weapon/reagent_containers/syringe))
|
||||
|
||||
if(beaker)
|
||||
user << "<span class='warning'>\The [src] is already loaded.</span>"
|
||||
return
|
||||
|
||||
if(!user.drop_item())
|
||||
user << "<span class='warning'>\The [O] is stuck to you!</span>"
|
||||
return
|
||||
|
||||
beaker = O
|
||||
O.forceMove(src)
|
||||
|
||||
user.visible_message("[user] adds \a [O] to \the [src]!", "You add \a [O] to \the [src]!")
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
src.attack_hand(user)
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/weapon/virusdish))
|
||||
|
||||
if(dish)
|
||||
user << "The dish tray is aleady full!"
|
||||
return
|
||||
|
||||
if(!user.drop_item())
|
||||
user << "<span class='warning'>\The [O] is stuck to you!</span>"
|
||||
return
|
||||
dish = O
|
||||
O.forceMove(src)
|
||||
|
||||
user.visible_message("[user] adds \a [O] to \the [src]!", "You add \a [O] to \the [src]!")
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
src.attack_hand(user)
|
||||
|
||||
/obj/machinery/disease2/incubator/attack_hand(mob/user as mob)
|
||||
if(stat & (NOPOWER|BROKEN)) return
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/disease2/incubator/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
user.set_machine(src)
|
||||
|
||||
var/data[0]
|
||||
data["chemicals_inserted"] = !!beaker
|
||||
data["dish_inserted"] = !!dish
|
||||
data["food_supply"] = foodsupply
|
||||
data["radiation"] = radiation
|
||||
data["toxins"] = min(toxins, 100)
|
||||
data["on"] = on
|
||||
data["system_in_use"] = foodsupply > 0 || radiation > 0 || toxins > 0
|
||||
data["chemical_volume"] = beaker ? beaker.reagents.total_volume : 0
|
||||
data["max_chemical_volume"] = beaker ? beaker.volume : 1
|
||||
data["virus"] = dish ? dish.virus2 : null
|
||||
data["growth"] = dish ? min(dish.growth, 100) : 0
|
||||
data["infection_rate"] = dish && dish.virus2 ? dish.virus2.infectionchance * 10 : 0
|
||||
data["analysed"] = dish && dish.analysed ? 1 : 0
|
||||
data["can_breed_virus"] = null
|
||||
data["blood_already_infected"] = null
|
||||
|
||||
if (beaker)
|
||||
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in beaker.reagents.reagent_list
|
||||
data["can_breed_virus"] = dish && dish.virus2 && B
|
||||
|
||||
if (B)
|
||||
if (!B.data["virus2"])
|
||||
B.data["virus2"] = list()
|
||||
|
||||
var/list/virus = B.data["virus2"]
|
||||
for (var/ID in virus)
|
||||
data["blood_already_infected"] = virus[ID]
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "dish_incubator.tmpl", src.name, 400, 600)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/disease2/incubator/process()
|
||||
if(dish && on && dish.virus2)
|
||||
use_power(50,EQUIP)
|
||||
if(!powered(EQUIP))
|
||||
on = 0
|
||||
icon_state = "incubator"
|
||||
|
||||
if(foodsupply)
|
||||
if(dish.growth + 3 >= 100 && dish.growth < 100)
|
||||
ping("\The [src] pings, \"Sufficient viral growth density achieved.\"")
|
||||
|
||||
foodsupply -= 1
|
||||
dish.growth += 3
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
if(radiation)
|
||||
if(radiation > 50 & prob(5))
|
||||
dish.virus2.majormutate()
|
||||
if(dish.info)
|
||||
dish.info = "OUTDATED : [dish.info]"
|
||||
dish.analysed = 0
|
||||
ping("\The [src] pings, \"Mutant viral strain detected.\"")
|
||||
else if(prob(5))
|
||||
dish.virus2.minormutate()
|
||||
radiation -= 1
|
||||
nanomanager.update_uis(src)
|
||||
if(toxins && prob(5))
|
||||
dish.virus2.infectionchance -= 1
|
||||
nanomanager.update_uis(src)
|
||||
if(toxins > 50)
|
||||
dish.growth = 0
|
||||
dish.virus2 = null
|
||||
nanomanager.update_uis(src)
|
||||
else if(!dish)
|
||||
on = 0
|
||||
icon_state = "incubator"
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
if(beaker)
|
||||
if(!beaker.reagents.remove_reagent("virusfood",5))
|
||||
foodsupply += 10
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
if (locate(/datum/reagent/toxin) in beaker.reagents.reagent_list)
|
||||
for(var/datum/reagent/toxin/T in beaker.reagents.reagent_list)
|
||||
//toxins += max(T.toxpwr,1)
|
||||
beaker.reagents.remove_reagent(T.id,1)
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
/obj/machinery/disease2/incubator/Topic(href, href_list)
|
||||
if (..()) return 0
|
||||
|
||||
var/mob/user = usr
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
|
||||
|
||||
src.add_fingerprint(user)
|
||||
|
||||
if (href_list["close"])
|
||||
user.unset_machine()
|
||||
ui.close()
|
||||
return 0
|
||||
|
||||
if (href_list["ejectchem"])
|
||||
if(beaker)
|
||||
beaker.forceMove(src.loc)
|
||||
beaker = null
|
||||
return 1
|
||||
|
||||
if (href_list["power"])
|
||||
if (dish)
|
||||
on = !on
|
||||
icon_state = on ? "incubator_on" : "incubator"
|
||||
return 1
|
||||
|
||||
if (href_list["ejectdish"])
|
||||
if(dish)
|
||||
dish.forceMove(src.loc)
|
||||
dish = null
|
||||
return 1
|
||||
|
||||
if (href_list["rad"])
|
||||
radiation += 10
|
||||
return 1
|
||||
|
||||
if (href_list["flush"])
|
||||
radiation = 0
|
||||
toxins = 0
|
||||
foodsupply = 0
|
||||
return 1
|
||||
|
||||
if(href_list["virus"])
|
||||
if (!dish)
|
||||
return 1
|
||||
|
||||
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in beaker.reagents.reagent_list
|
||||
if (!B)
|
||||
return 1
|
||||
|
||||
if (!B.data["virus2"])
|
||||
B.data["virus2"] = list()
|
||||
|
||||
var/list/virus = list("[dish.virus2.uniqueID]" = dish.virus2.getcopy())
|
||||
B.data["virus2"] += virus
|
||||
|
||||
var/list/virus_effects
|
||||
for(var/datum/disease2/effectholder/symptom in dish.virus2.effects)
|
||||
virus_effects += "\[" + symptom.effect.name + "\]"
|
||||
use_log += text("\[[time_stamp()]\] <font color='red'>[user.name] ([user.ckey]) has transferred a virus containing [virus_effects] to a blood sample.</font>")
|
||||
|
||||
ping("\The [src] pings, \"Injection complete.\"")
|
||||
return 1
|
||||
|
||||
return 0
|
||||
@@ -1,982 +0,0 @@
|
||||
/datum/disease2/effectholder
|
||||
var/name = "Holder"
|
||||
var/datum/disease2/effect/effect
|
||||
var/chance = 0 //Chance in percentage each tick
|
||||
var/cure = "" //Type of cure it requires
|
||||
var/happensonce = 0
|
||||
var/multiplier = 1 //The chance the effects are WORSE
|
||||
var/stage = 0
|
||||
|
||||
/datum/disease2/effectholder/proc/runeffect(var/mob/living/carbon/human/mob,var/stage)
|
||||
if(happensonce > -1 && effect.stage <= stage && prob(chance))
|
||||
effect.activate(mob,multiplier)
|
||||
if(happensonce == 1)
|
||||
happensonce = -1
|
||||
|
||||
/datum/disease2/effectholder/proc/getrandomeffect(var/badness = 1)
|
||||
var/list/datum/disease2/effect/list = list()
|
||||
for(var/e in subtypesof(/datum/disease2/effect) - /datum/disease2/effect/organs/vampire)
|
||||
var/datum/disease2/effect/f = new e
|
||||
if (f.badness > badness) //we don't want such strong effects
|
||||
continue
|
||||
if(f.stage == src.stage)
|
||||
list += f
|
||||
effect = pick(list)
|
||||
chance = rand(0,effect.chance_maxm)
|
||||
multiplier = rand(1,effect.maxm)
|
||||
|
||||
/datum/disease2/effectholder/proc/minormutate()
|
||||
switch(pick(1,2,3,4,5))
|
||||
if(1)
|
||||
chance = rand(0,effect.chance_maxm)
|
||||
if(2)
|
||||
multiplier = rand(1,effect.maxm)
|
||||
|
||||
/datum/disease2/effectholder/proc/majormutate()
|
||||
getrandomeffect(2)
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
////////////////////////EFFECTS/////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
// Badness : 1 means can be a minor viral outbreak event symptom
|
||||
// it can also be a major mutation
|
||||
// 2 means can be a major or minor viral outbreak event symptom
|
||||
// it can also be a major mutation
|
||||
// 3 means it cannot be in a viral outbreak event
|
||||
// it cannot be a major mutation
|
||||
|
||||
/datum/disease2/effect
|
||||
var/chance_maxm = 50
|
||||
var/name = "Blanking effect"
|
||||
var/stage = 4
|
||||
var/maxm = 1
|
||||
var/badness = 1
|
||||
proc/activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
proc/deactivate(var/mob/living/carbon/mob)
|
||||
|
||||
////////////////////////SPECIAL/////////////////////////////////
|
||||
/datum/disease2/effect/alien
|
||||
name = "Unidentified Foreign Body"
|
||||
stage = 4
|
||||
badness = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob << "\red You feel something tearing its way out of your stomach..."
|
||||
mob.adjustToxLoss(10)
|
||||
mob.updatehealth()
|
||||
if(prob(40))
|
||||
if(mob.client)
|
||||
mob.client.mob = new/mob/living/carbon/alien/larva(mob.loc)
|
||||
else
|
||||
new/mob/living/carbon/alien/larva(mob.loc)
|
||||
var/datum/disease2/disease/D = mob:virus2
|
||||
mob:gib()
|
||||
qdel(D)
|
||||
|
||||
|
||||
/datum/disease2/effect/invisible
|
||||
name = "Waiting Syndrome"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
return
|
||||
|
||||
// Bone White - Empty sypmtoms. There is a better way of handling this but this is much faster.
|
||||
|
||||
/datum/disease2/effect/invisible_stage_two
|
||||
name = "Patience Syndrome"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
return
|
||||
|
||||
/datum/disease2/effect/invisible_stage_three
|
||||
name = "Delayed Syndrome"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
return
|
||||
|
||||
/datum/disease2/effect/invisible_stage_four
|
||||
name = "Anticipation Syndrome"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
return
|
||||
|
||||
|
||||
|
||||
////////////////////////STAGE 4/////////////////////////////////
|
||||
|
||||
/datum/disease2/effect/borg
|
||||
name = "Borgification Disorder"
|
||||
stage = 4
|
||||
badness = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob << "<span class = 'warning'>You feel like beeping and booping...</span>"
|
||||
mob.adjustBruteLoss(10)
|
||||
mob.updatehealth()
|
||||
if(prob(40))
|
||||
if(mob.client)
|
||||
if(!jobban_isbanned(mob, "Cyborg") && !jobban_isbanned(mob,"nonhumandept"))
|
||||
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(mob.loc))
|
||||
mob.mind.transfer_to(O)
|
||||
else
|
||||
new/mob/living/silicon/robot(get_turf(mob.loc))
|
||||
var/datum/disease2/disease/D = mob.virus2
|
||||
mob.gib()
|
||||
qdel(D)
|
||||
|
||||
/datum/disease2/effect/omnizine
|
||||
name = "Panacea Effect"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if (mob.reagents.get_reagent_amount("omnizine") < 2)
|
||||
mob.reagents.add_reagent("omnizine", 2)
|
||||
|
||||
/datum/disease2/effect/viralsputum_major
|
||||
name = "Hemoptysis"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if (prob(60))
|
||||
mob.say("*cough")
|
||||
var/obj/effect/decal/cleanable/blood/viralsputum/D= locate(/obj/effect/decal/cleanable/blood/viralsputum) in get_turf(mob)
|
||||
if(D==null)
|
||||
D = new(get_turf(mob))
|
||||
D.virus2 |= virus_copylist(mob.virus2)
|
||||
mob.reagents.remove_reagent("blood", 20) // Bone White - Blood loss when coughing up blood, experimental, may need adjusting.
|
||||
else
|
||||
|
||||
/datum/disease2/effect/gibbingtons
|
||||
name = "Gibbingtons Syndrome"
|
||||
stage = 4
|
||||
badness = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.gib()
|
||||
|
||||
/datum/disease2/effect/radian
|
||||
name = "Radian's Syndrome"
|
||||
stage = 4
|
||||
maxm = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.apply_effect(2*multiplier,IRRADIATE,0)
|
||||
|
||||
/datum/disease2/effect/deaf
|
||||
name = "Dead Ear Syndrome"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.ear_deaf += 20
|
||||
|
||||
/datum/disease2/effect/monkey
|
||||
name = "Monkism Syndrome"
|
||||
stage = 4
|
||||
badness = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/h = mob
|
||||
h.monkeyize()
|
||||
|
||||
/datum/disease2/effect/suicide
|
||||
name = "Suicidal Syndrome"
|
||||
stage = 4
|
||||
badness = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if (mob.suiciding == 0)
|
||||
mob.suiciding = 1
|
||||
//instead of killing them instantly, just put them at -175 health and let 'em gasp for a while
|
||||
viewers(mob) << "\red <b>[mob.name] is holding \his breath. It looks like \he's trying to commit suicide.</b>"
|
||||
mob.adjustOxyLoss(175 - mob.getToxLoss() - mob.getFireLoss() - mob.getBruteLoss() - mob.getOxyLoss())
|
||||
mob.updatehealth()
|
||||
spawn(200) //in case they get revived by cryo chamber or something stupid like that, let them suicide again in 20 seconds
|
||||
mob.suiciding = 0
|
||||
|
||||
|
||||
// === burn brute toxin clone brain damage symptoms - Bone White ===
|
||||
|
||||
/datum/disease2/effect/burn_major
|
||||
name = "Blood Plasma Pyroclastia"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.take_overall_damage(0,15)
|
||||
|
||||
/datum/disease2/effect/brute_major
|
||||
name = "Exploding Cell Phenomenon"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.take_overall_damage(15,0)
|
||||
|
||||
/datum/disease2/effect/toxin_major
|
||||
name = "Acute Kidney Failure"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.adjustToxLoss(15*multiplier)
|
||||
|
||||
/datum/disease2/effect/clone_major
|
||||
name = "Reverse Pattern Syndrome"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.bodytemperature = max(mob.bodytemperature, 350)
|
||||
scramble(0,mob,10)
|
||||
mob.apply_damage(10, CLONE)
|
||||
|
||||
/datum/disease2/effect/brain_major
|
||||
name = "Cortical Liquification"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = mob
|
||||
var/obj/item/organ/internal/brain/B = H.get_int_organ(/obj/item/organ/internal/brain)
|
||||
if (B.damage < B.min_broken_damage)
|
||||
B.take_damage(5, 1)
|
||||
else
|
||||
mob.setBrainLoss(50)
|
||||
|
||||
|
||||
|
||||
/datum/disease2/effect/organs
|
||||
name = "Shutdown Syndrome"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = mob
|
||||
var/organ = pick(list("r_arm","l_arm","r_leg","r_leg"))
|
||||
var/obj/item/organ/external/E = H.organs_by_name[organ]
|
||||
if (!(E.status & ORGAN_DEAD) && !(E.status & ORGAN_ROBOT))
|
||||
E.status |= ORGAN_DEAD
|
||||
H << "<span class='notice'>You can't feel your [E.name] anymore...</span>"
|
||||
for (var/obj/item/organ/external/C in E.children)
|
||||
C.status |= ORGAN_DEAD
|
||||
H.update_body(1)
|
||||
if(multiplier < 1) multiplier = 1
|
||||
H.adjustToxLoss(10*multiplier)
|
||||
vampire
|
||||
stage = 3
|
||||
|
||||
deactivate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = mob
|
||||
for (var/obj/item/organ/external/E in H.organs)
|
||||
if(!(E.status & ORGAN_ROBOT))
|
||||
E.status &= ~ORGAN_DEAD
|
||||
for (var/obj/item/organ/external/C in E.children)
|
||||
C.status &= ~ORGAN_DEAD
|
||||
|
||||
|
||||
/datum/disease2/effect/immortal
|
||||
name = "Longevity Syndrome"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = mob
|
||||
for (var/obj/item/organ/external/E in H.organs)
|
||||
if (E.status & ORGAN_BROKEN && prob(30) && !(E.status & ORGAN_ROBOT))
|
||||
E.status ^= ORGAN_BROKEN
|
||||
var/heal_amt = -5*multiplier
|
||||
mob.apply_damages(heal_amt,heal_amt,heal_amt,heal_amt)
|
||||
|
||||
/datum/disease2/effect/gmagnitis
|
||||
name = "Greater Magnitis"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
for(var/obj/M in orange(6,mob))
|
||||
if(!M.anchored && (M.flags & CONDUCT))
|
||||
var/i
|
||||
var/iter = rand(1,3)
|
||||
for(i=0,i<iter,i++)
|
||||
step_towards(M,mob)
|
||||
for(var/mob/living/silicon/S in orange(6,mob))
|
||||
if(istype(S, /mob/living/silicon/ai)) continue
|
||||
var/i
|
||||
var/iter = rand(1,3)
|
||||
for(i=0,i<iter,i++)
|
||||
step_towards(S,mob)
|
||||
|
||||
/datum/disease2/effect/catbeast
|
||||
name = "Kingston Syndrome"
|
||||
stage = 4
|
||||
badness = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/h = mob
|
||||
if(h.species.name != "Tajaran")
|
||||
if(h.set_species("Tajaran"))
|
||||
h.regenerate_icons()
|
||||
|
||||
|
||||
/datum/disease2/effect/scc
|
||||
name = "Spontaneous Cellular Collapse"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.reagents.add_reagent("facid", 1)
|
||||
mob << "<span class = 'warning'> Your body burns as your cells break down.</span>"
|
||||
shake_camera(mob,5*multiplier)
|
||||
|
||||
|
||||
/datum/disease2/effect/necrosis
|
||||
name = "Necrosis"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
//
|
||||
var/mob/living/carbon/human/H = mob
|
||||
//
|
||||
var/inst = pick(1,2,3)
|
||||
switch(inst)
|
||||
if(1)
|
||||
mob << "<span class = 'warning'>A chunk of meat falls off you!</span>"
|
||||
var/totalslabs = 1
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/meat/allmeat[totalslabs]
|
||||
if( istype(mob, /mob/living/carbon/human/) )
|
||||
//
|
||||
var/sourcename = mob.real_name
|
||||
var/sourcejob = mob.job
|
||||
var/sourcenutriment = mob.nutrition / 15
|
||||
//var/sourcetotalreagents = mob.reagents.total_volume
|
||||
for(var/i=1 to totalslabs)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/meat/human/newmeat = new
|
||||
newmeat.name = sourcename + newmeat.name
|
||||
newmeat.subjectname = sourcename
|
||||
newmeat.subjectjob = sourcejob
|
||||
newmeat.reagents.add_reagent("nutriment", sourcenutriment / totalslabs) // Thehehe. Fat guys go first
|
||||
//src.occupant.reagents.trans_to(newmeat, round (sourcetotalreagents / totalslabs, 1)) // Transfer all the reagents from the
|
||||
allmeat[i] = newmeat
|
||||
var/obj/item/meatslab = allmeat[i]
|
||||
var/turf/Tx = locate(mob.x, mob.y, mob.z)
|
||||
meatslab.loc = mob.loc
|
||||
meatslab.throw_at(Tx,i,3)
|
||||
if (!Tx.density)
|
||||
new /obj/effect/decal/cleanable/blood/gibs(Tx,i)
|
||||
if(2)
|
||||
if(ishuman(mob))
|
||||
for (var/obj/item/organ/external/E in H.organs)
|
||||
if(pick(1,0) && !(E.status & ORGAN_ROBOT))
|
||||
E.droplimb(0,DROPLIMB_EDGE)
|
||||
if(3)
|
||||
if(ishuman(mob))
|
||||
if(H.species.name != "Skeleton")
|
||||
mob << "<span class = 'warning'> Your necrotic skin ruptures!</span>"
|
||||
for (var/obj/item/organ/external/E in H.organs)
|
||||
if(pick(1,0) && !(E.status & ORGAN_ROBOT))
|
||||
E.createwound(CUT, pick(2,4))
|
||||
if(prob(30))
|
||||
if(H.species.name != "Skeleton")
|
||||
if(H.set_species("Skeleton"))
|
||||
mob << "<span class = 'warning'> A massive amount of flesh sloughs off your bones!</span>"
|
||||
H.regenerate_icons()
|
||||
else
|
||||
return
|
||||
|
||||
|
||||
/datum/disease2/effect/plasma
|
||||
name = "Toxin Sublimation"
|
||||
stage = 4
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
//var/src = mob
|
||||
var/hack = mob.loc
|
||||
var/turf/simulated/T = get_turf(hack)
|
||||
if(!T)
|
||||
return
|
||||
var/datum/gas_mixture/GM = new
|
||||
if(prob(10))
|
||||
GM.toxins += 100
|
||||
//GM.temperature = 1500+T0C //should be enough to start a fire
|
||||
mob << "\red You exhale a large plume of toxic gas!"
|
||||
else
|
||||
GM.toxins += 10
|
||||
GM.temperature = istype(T) ? T.air.temperature : T20C
|
||||
mob << "<span class = 'warning'> A toxic gas emanates from your pores!</span>"
|
||||
T.assume_air(GM)
|
||||
return
|
||||
|
||||
|
||||
////////////////////////STAGE 3/////////////////////////////////
|
||||
|
||||
/datum/disease2/effect/brain_regen
|
||||
name = "Regenerative Synapse Effect"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if (mob.reagents.get_reagent_amount("mannitol") < 10)
|
||||
mob.reagents.add_reagent("mannitol", 10)
|
||||
|
||||
/datum/disease2/effect/haloperidol
|
||||
name = "Psyche Collapse Syndrome"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if (mob.reagents.get_reagent_amount("haloperidol") < 10)
|
||||
mob.reagents.add_reagent("haloperidol", 1)
|
||||
|
||||
/datum/disease2/effect/pain_major
|
||||
name = "Phantom Pain Syndrome"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if (mob.staminaloss < 100)
|
||||
mob << "<span class = 'warning'> You feel like your body is on fire. Make the pain stop!</span>"
|
||||
mob.apply_effect(20,STAMINA,0)
|
||||
|
||||
// === burn brute toxin clone brain damage symptoms - Bone White ===
|
||||
|
||||
/datum/disease2/effect/burn
|
||||
name = "Flammable inflammation"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.take_overall_damage(0,5)
|
||||
|
||||
/datum/disease2/effect/brute
|
||||
name = "Continuous Contusions"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.take_overall_damage(5,0)
|
||||
|
||||
/datum/disease2/effect/toxin
|
||||
name = "Hyperacidity"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.adjustToxLoss(15*multiplier)
|
||||
|
||||
/datum/disease2/effect/clone
|
||||
name = "DNA Breakdown Effect"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.bodytemperature = max(mob.bodytemperature, 350)
|
||||
scramble(0,mob,5)
|
||||
mob.apply_damage(5, CLONE)
|
||||
|
||||
/datum/disease2/effect/brain
|
||||
name = "Synapse Distancing"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = mob
|
||||
var/obj/item/organ/internal/brain/B = H.get_int_organ(/obj/item/organ/internal/brain)
|
||||
if (B.damage < B.min_broken_damage)
|
||||
B.take_damage(1, 1)
|
||||
else
|
||||
mob.setBrainLoss(10)
|
||||
|
||||
|
||||
/datum/disease2/effect/lantern_major
|
||||
name = "Lantern Syndrome"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.set_light(5)
|
||||
mob << "<span class = 'notice'>You are glowing brightly!</span>"
|
||||
|
||||
|
||||
/datum/disease2/effect/cough_major
|
||||
name = "Acute Tussis"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*cough")
|
||||
for(var/mob/living/carbon/M in oview(3,mob))
|
||||
mob.spread_disease_to(M)
|
||||
|
||||
|
||||
/datum/disease2/effect/bones
|
||||
name = "Fragile Bones Syndrome"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = mob
|
||||
for (var/obj/item/organ/external/E in H.organs)
|
||||
if(!(E.status & ORGAN_ROBOT))
|
||||
E.min_broken_damage = max(5, E.min_broken_damage - 30)
|
||||
|
||||
deactivate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = mob
|
||||
for (var/obj/item/organ/external/E in H.organs)
|
||||
if(!(E.status & ORGAN_ROBOT))
|
||||
E.min_broken_damage = initial(E.min_broken_damage)
|
||||
|
||||
/datum/disease2/effect/shakey
|
||||
name = "World Shaking Syndrome"
|
||||
stage = 3
|
||||
maxm = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
shake_camera(mob,5*multiplier)
|
||||
|
||||
/datum/disease2/effect/telepathic
|
||||
name = "Telepathy Syndrome"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.dna.check_integrity()
|
||||
mob.dna.SetSEState(REMOTETALKBLOCK,1)
|
||||
domutcheck(mob, null)
|
||||
|
||||
/datum/disease2/effect/hallucinations
|
||||
name = "Hallucinational Syndrome"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.hallucination += 25
|
||||
|
||||
/datum/disease2/effect/deaf
|
||||
name = "Hard of Hearing Syndrome"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.ear_deaf = 5
|
||||
|
||||
/datum/disease2/effect/giggle
|
||||
name = "Uncontrolled Laughter Effect"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*giggle")
|
||||
|
||||
/datum/disease2/effect/confusion
|
||||
name = "Topographical Cretinism"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob << "<span class='notice'>You have trouble telling right and left apart all of a sudden.</span>"
|
||||
mob.confused += 10
|
||||
|
||||
/datum/disease2/effect/groan
|
||||
name = "Groaning Syndrome"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*groan")
|
||||
|
||||
/datum/disease2/effect/lmagnitis
|
||||
name = "Lesser Magnitis"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
for(var/obj/M in orange(4,mob))
|
||||
if(!M.anchored && (M.flags & CONDUCT))
|
||||
var/i
|
||||
var/iter = rand(1,2)
|
||||
for(i=0,i<iter,i++)
|
||||
step_towards(M,mob)
|
||||
for(var/mob/living/silicon/S in orange(4,mob))
|
||||
if(istype(S, /mob/living/silicon/ai)) continue
|
||||
var/i
|
||||
var/iter = rand(1,2)
|
||||
for(i=0,i<iter,i++)
|
||||
step_towards(S,mob)
|
||||
|
||||
|
||||
/datum/disease2/effect/sweat
|
||||
name = "Hyper-perspiration Effect"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(prob(30))
|
||||
mob.custom_emote(1,"is sweating profusely!")
|
||||
|
||||
if(istype(mob.loc,/turf/simulated))
|
||||
var/turf/simulated/T = mob.loc
|
||||
if(T.wet < TURF_WET_WATER)
|
||||
T.MakeSlippery()
|
||||
|
||||
|
||||
|
||||
/datum/disease2/effect/elvis
|
||||
name = "Elvisism"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
//
|
||||
var/obj/item/clothing/glasses/virussunglasses = new /obj/item/clothing/glasses/virussunglasses
|
||||
mob.equip_to_slot(virussunglasses, slot_glasses)
|
||||
mob.confused += 10
|
||||
if(pick(0,1))
|
||||
mob.say(pick("Uh HUH!", "Thank you, Thank you very much...", "I ain't nothin' but a hound dog!", "Swing low, sweet chariot!"))
|
||||
else
|
||||
mob.custom_emote(1,pick("curls his lip!", "gyrates his hips!", "thrusts his hips!"))
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = mob
|
||||
if(H.species.name == "Human" && !(H.f_style == "Pompadour"))
|
||||
spawn(50)
|
||||
H.h_style = "Pompadour"
|
||||
H.update_hair()
|
||||
if(H.species.name == "Human" && !(H.f_style == "Elvis Sideburns"))
|
||||
spawn(50)
|
||||
H.f_style = "Elvis Sideburns"
|
||||
H.update_fhair()
|
||||
|
||||
|
||||
/obj/item/clothing/glasses/virussunglasses
|
||||
|
||||
dropped(mob/user as mob)
|
||||
flags &= ~NODROP
|
||||
..()
|
||||
|
||||
equipped(var/mob/user, var/slot)
|
||||
if (slot == slot_glasses)
|
||||
flags |= NODROP //curses!
|
||||
..()
|
||||
|
||||
|
||||
/datum/disease2/effect/pthroat
|
||||
name = "Pierrot's Throat"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
//
|
||||
var/obj/item/clothing/mask/gas/virusclown_hat = new /obj/item/clothing/mask/gas/virusclown_hat
|
||||
mob.equip_to_slot(virusclown_hat, slot_wear_mask)
|
||||
mob.reagents.add_reagent("psilocybin", 20)
|
||||
mob.say(pick("HONK!", "Honk!", "Honk.", "Honk?", "Honk!!", "Honk?!", "Honk..."))
|
||||
|
||||
|
||||
|
||||
/obj/item/clothing/mask/gas/virusclown_hat
|
||||
|
||||
dropped(mob/user as mob)
|
||||
flags &= ~NODROP
|
||||
..()
|
||||
|
||||
equipped(var/mob/user, var/slot)
|
||||
if (slot == slot_wear_mask)
|
||||
flags |= NODROP //curses!
|
||||
..()
|
||||
|
||||
|
||||
var/list/compatible_mobs = list(/mob/living/carbon/human)
|
||||
/datum/disease2/effect/horsethroat
|
||||
name = "Horse Throat"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(!(mob.type in compatible_mobs))
|
||||
return
|
||||
|
||||
|
||||
var/obj/item/clothing/mask/horsehead/magic/magichead = new /obj/item/clothing/mask/horsehead/magic
|
||||
mob.equip_to_slot(magichead, slot_wear_mask)
|
||||
mob << "<span class='warning'>You feel a little horse!</span>"
|
||||
|
||||
|
||||
/obj/item/clothing/mask/horsehead/magic
|
||||
//flags_inv = null //so you can still see their face... no. How can you recognize someone when their face is completely different?
|
||||
voicechange = 1 //NEEEEIIGHH
|
||||
|
||||
dropped(mob/user as mob)
|
||||
flags &= ~NODROP
|
||||
..()
|
||||
|
||||
equipped(var/mob/user, var/slot)
|
||||
if (slot == slot_wear_mask)
|
||||
flags |= NODROP //curses!
|
||||
..()
|
||||
|
||||
////////////////////////STAGE 2/////////////////////////////////
|
||||
|
||||
|
||||
/datum/disease2/effect/pain
|
||||
name = "Acute Muscle Ache"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if (mob.staminaloss < 50)
|
||||
mob << "<span class='warning'>You ache all over!</span>"
|
||||
mob.apply_effect(10,STAMINA,0)
|
||||
|
||||
// === burn brute toxin clone brain damage symptoms - Bone White ===
|
||||
|
||||
/datum/disease2/effect/burn
|
||||
name = "Prickly Heat Syndrome"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.take_overall_damage(0,2)
|
||||
|
||||
/datum/disease2/effect/brute
|
||||
name = "Continuous Contusions"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.take_overall_damage(2,0)
|
||||
|
||||
/datum/disease2/effect/toxin
|
||||
name = "White Blood Cell Putrification"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.adjustToxLoss(5*multiplier)
|
||||
|
||||
/datum/disease2/effect/clone
|
||||
name = "RNA Compound Corruption"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.bodytemperature = max(mob.bodytemperature, 350)
|
||||
scramble(0,mob,5)
|
||||
mob.apply_damage(5, CLONE)
|
||||
|
||||
/datum/disease2/effect/brain
|
||||
name = "Synapse Distancing"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = mob
|
||||
var/obj/item/organ/internal/brain/B = H.get_int_organ(/obj/item/organ/internal/brain)
|
||||
if (B.damage < B.min_broken_damage)
|
||||
B.take_damage(0.5, 1)
|
||||
else
|
||||
mob.setBrainLoss(5)
|
||||
|
||||
|
||||
/datum/disease2/effect/scream
|
||||
name = "Loudness Syndrome"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*scream")
|
||||
|
||||
/datum/disease2/effect/drowsness
|
||||
name = "Automated Sleeping Syndrome"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.drowsyness += 10
|
||||
|
||||
/datum/disease2/effect/sleepy
|
||||
name = "Resting Syndrome"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*collapse")
|
||||
|
||||
/datum/disease2/effect/blind
|
||||
name = "Blackout Syndrome"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.eye_blind = max(mob.eye_blind, 4)
|
||||
|
||||
/datum/disease2/effect/cough
|
||||
name = "Anima Syndrome"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*cough")
|
||||
for(var/mob/living/carbon/M in oview(2,mob))
|
||||
mob.spread_disease_to(M)
|
||||
|
||||
/datum/disease2/effect/hungry
|
||||
name = "Appetiser Effect"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.nutrition = max(0, mob.nutrition - 200)
|
||||
|
||||
/datum/disease2/effect/fridge
|
||||
name = "Refridgerator Syndrome"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*shiver")
|
||||
|
||||
/datum/disease2/effect/hair
|
||||
name = "Hair Loss"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = mob
|
||||
if(H.species.name == "Human" && !(H.h_style == "Bald") && !(H.h_style == "Balding Hair"))
|
||||
H << "<span class='danger'>Your hair starts to fall out in clumps...</span>"
|
||||
spawn(50)
|
||||
H.h_style = "Balding Hair"
|
||||
H.update_hair()
|
||||
|
||||
/datum/disease2/effect/stimulant_major
|
||||
name = "Adrenal Overload"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if (mob.reagents.get_reagent_amount("methamphetamine") < 5)
|
||||
mob.reagents.add_reagent("methamphetamine", 4)
|
||||
if (prob(30))
|
||||
mob << "<span class='notice'>You feel a rush of energy inside you!</span>"
|
||||
mob.jitteriness += 10
|
||||
|
||||
/datum/disease2/effect/drunk
|
||||
name = "Glasgow Syndrome"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob << "<span class='notice'>You feel like you had one hell of a party!</span>"
|
||||
if (mob.reagents.get_reagent_amount("ethanol") < 325)
|
||||
mob.reagents.add_reagent("ethanol", 5*multiplier)
|
||||
|
||||
/datum/disease2/effect/gaben
|
||||
name = "Gaben Syndrome"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob << "<span class='notice'>Your clothing fits a little tighter!!</span>"
|
||||
if (prob(10))
|
||||
mob.reagents.add_reagent("nutriment", 1000)
|
||||
mob.overeatduration = 1000
|
||||
|
||||
|
||||
/datum/disease2/effect/beard
|
||||
name = "Bearding"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(istype(mob, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = mob
|
||||
if(H.species.name == "Human" && !(H.f_style == "Full Beard"))
|
||||
H << "<span class='warning'>Your chin and neck itch!.</span>"
|
||||
spawn(50)
|
||||
H.f_style = "Full Beard"
|
||||
H.update_fhair()
|
||||
|
||||
/datum/disease2/effect/bloodynose
|
||||
name = "Intranasal Hemorrhage"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if (prob(30))
|
||||
var/obj/effect/decal/cleanable/blood/D= locate(/obj/effect/decal/cleanable/blood) in get_turf(mob)
|
||||
if(D==null)
|
||||
D = new(get_turf(mob))
|
||||
D.virus2 |= virus_copylist(mob.virus2)
|
||||
mob.reagents.remove_reagent("blood", 5) // Bone White - Blood loss when coughing up blood, experimental, may need adjusting.
|
||||
|
||||
|
||||
/datum/disease2/effect/lantern
|
||||
name = "Lantern Syndrome"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.set_light(4)
|
||||
mob << "<span class = 'notice'>You are glowing!</span>"
|
||||
|
||||
|
||||
/datum/disease2/effect/optimistic
|
||||
name = "Full Glass Syndrome"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob << "<span class = 'notice'> You feel optimistic!</span>"
|
||||
if (mob.reagents.get_reagent_amount("salglu_solution") < 1)
|
||||
mob.reagents.add_reagent("salglu_solution", 1)
|
||||
|
||||
|
||||
////////////////////////STAGE 1/////////////////////////////////
|
||||
|
||||
/datum/disease2/effect/poop
|
||||
name = "Uncontrollable Bowel Syndrome"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.fakepoop()
|
||||
|
||||
|
||||
/datum/disease2/effect/vomit
|
||||
name = "Projectile Vomit Syndrome"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.fakevomit()
|
||||
|
||||
/datum/disease2/effect/pain_minor
|
||||
name = "Heightened Sensitivity"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if (mob.staminaloss < 20)
|
||||
mob << "<span class='warning'>Your body aches.</span>"
|
||||
mob.apply_effect(5,STAMINA,0)
|
||||
|
||||
/datum/disease2/effect/stimulant
|
||||
name = "Adrenaline Extra"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if (mob.reagents.get_reagent_amount("ephedrine") < 10)
|
||||
mob.reagents.add_reagent("ephedrine", 4)
|
||||
if (prob(30))
|
||||
mob << "<span class='notice'>You feel a rush of energy inside you!</span>"
|
||||
mob.jitteriness += 10
|
||||
|
||||
/datum/disease2/effect/cough_minor
|
||||
name = "Trachea Sensitivity"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*cough")
|
||||
for(var/mob/living/carbon/M in oview(1,mob))
|
||||
mob.spread_disease_to(M)
|
||||
|
||||
/datum/disease2/effect/sneeze
|
||||
name = "Coldingtons Effect"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if (prob(30))
|
||||
mob << "<span class='warning'>You feel like you are about to sneeze!</span>"
|
||||
sleep(5)
|
||||
mob.say("*sneeze")
|
||||
for(var/mob/living/carbon/M in get_step(mob,mob.dir))
|
||||
mob.spread_disease_to(M)
|
||||
if (prob(50))
|
||||
var/obj/effect/decal/cleanable/mucus/M= locate(/obj/effect/decal/cleanable/mucus) in get_turf(mob)
|
||||
if(M==null)
|
||||
M = new(get_turf(mob))
|
||||
else
|
||||
if(M.dry)
|
||||
M.dry=0
|
||||
M.virus2 |= virus_copylist(mob.virus2)
|
||||
|
||||
/datum/disease2/effect/gunck
|
||||
name = "Flemmingtons"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob << "<span class = 'notice'> Mucous runs down the back of your throat.</span>"
|
||||
|
||||
/datum/disease2/effect/drool
|
||||
name = "Saliva Effect"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*drool")
|
||||
|
||||
/datum/disease2/effect/twitch
|
||||
name = "Twitcher"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.say("*twitch")
|
||||
|
||||
/datum/disease2/effect/headache
|
||||
name = "Headache"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob << "<span class = 'notice'> Your head hurts a bit</span>"
|
||||
|
||||
/datum/disease2/effect/itching
|
||||
name = "Itching"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob << "<span class='warning'>Your skin itches!</span>"
|
||||
|
||||
/datum/disease2/effect/drained
|
||||
name = "Drained Feeling"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob << "<span class='warning'>You feel drained.</span>"
|
||||
|
||||
/datum/disease2/effect/eyewater
|
||||
name = "Watery Eyes"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/human/mob,var/multiplier)
|
||||
var/obj/item/organ/internal/eyes/E = mob.get_int_organ(/obj/item/organ/internal/eyes)
|
||||
if(!istype(E) || (E.status & ORGAN_ROBOT)) // No eyes or robotic eyes? No problem!
|
||||
return
|
||||
mob << "<span class='warning'>Your eyes sting and water!</span>"
|
||||
|
||||
/datum/disease2/effect/wheeze
|
||||
name = "Wheezing"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.custom_emote(1,"wheezes.")
|
||||
|
||||
|
||||
/datum/disease2/effect/optimistic_minor
|
||||
name = "Glass Half Full Syndrome"
|
||||
stage = 1
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob << "<span class = 'notice'> You feel optimistic!</span>"
|
||||
|
||||
/datum/disease2/effect/anxiety
|
||||
name = "Severe Anxiety"
|
||||
stage = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(prob(20))
|
||||
mob << "<span class='notice'>You feel anxious.</span>"
|
||||
if(prob(15))
|
||||
mob << "<span class='danger'>You feel butterflies in your stomach.</span>"
|
||||
if(prob(11))
|
||||
mob.visible_message("<span class='danger'>[mob] stumbles around in a panic.</span>", \
|
||||
"<span class='userdanger'>You have a panic attack!</span>")
|
||||
mob.confused += (rand(6,8))
|
||||
mob.jitteriness += (rand(6,8))
|
||||
if(prob(10))
|
||||
mob.visible_message("<span class='danger'>[mob] coughs up butterflies!</span>", \
|
||||
"<span class='userdanger'>You cough up butterflies!</span>")
|
||||
new /mob/living/simple_animal/butterfly(mob.loc)
|
||||
new /mob/living/simple_animal/butterfly(mob.loc)
|
||||
|
||||
/datum/disease2/effect/lycan
|
||||
name = "Lycancoughy"
|
||||
stage = 3
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
if(prob(20))
|
||||
mob << "<span class='notice'>You feel itchy.</span>"
|
||||
if(prob(15))
|
||||
mob << "<span class='danger'>You have the sudden urge for bacon..</span>"
|
||||
if(prob(11))
|
||||
mob.say(pick("WOOF!", "BARK!", "Bark.", "Woof?", "AUUUUUUUUUUUUU!!"))
|
||||
if(prob(10))
|
||||
mob.visible_message("<span class='danger'>[mob] coughs up a dog!!</span>", \
|
||||
"<span class='userdanger'>You cough up a DOG!!!</span>")
|
||||
//yes i KNOW foxes technically are not normal dogs...hush....
|
||||
var/randompup = pick(/mob/living/simple_animal/pet/corgi/puppy,/mob/living/simple_animal/pet/pug,/mob/living/simple_animal/pet/fox)
|
||||
|
||||
new randompup(mob.loc)
|
||||
mob.adjustBruteLoss(rand(1,5))//you just coughed up a CANINIE, you are taking brute loss...
|
||||
@@ -1,150 +0,0 @@
|
||||
//Returns 1 if mob can be infected, 0 otherwise. Checks his clothing.
|
||||
proc/get_infection_chance(var/mob/living/carbon/M, var/vector = "Airborne")
|
||||
var/score = 0
|
||||
if (!istype(M))
|
||||
return 0
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H) && H.species.virus_immune)
|
||||
return 0
|
||||
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
if (vector == "Airborne")
|
||||
if(M.internal) //not breathing infected air helps greatly
|
||||
score = 30
|
||||
if(M.wear_mask)
|
||||
score += 5
|
||||
if(istype(M:wear_mask, /obj/item/clothing/mask/surgical) && !M.internal)
|
||||
score += 10
|
||||
if(istype(M:wear_suit, /obj/item/clothing/suit/space) && istype(M:head, /obj/item/clothing/head/helmet/space))
|
||||
score += 20
|
||||
if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit) && istype(M:head, /obj/item/clothing/head/bio_hood))
|
||||
score += 30
|
||||
|
||||
|
||||
if (vector == "Contact")
|
||||
if(M:gloves) score += 15
|
||||
if(istype(M:wear_suit, /obj/item/clothing/suit/space) && istype(M:head, /obj/item/clothing/head/helmet/space))
|
||||
score += 15
|
||||
if(istype(M:wear_suit, /obj/item/clothing/suit/bio_suit) && istype(M:head, /obj/item/clothing/head/bio_hood))
|
||||
score += 15
|
||||
|
||||
if (vector == "Injection") score = 30 // Makes sure Injection viruses cannot be caught normally
|
||||
|
||||
|
||||
// log_debug("[M]'s resistance to [vector] viruses: [score]")
|
||||
|
||||
if(score >= 30)
|
||||
return 0
|
||||
else if(score == 25 && prob(99))
|
||||
return 0
|
||||
else if(score == 20 && prob(95))
|
||||
return 0
|
||||
else if(score == 15 && prob(75))
|
||||
return 0
|
||||
else if(score == 10 && prob(55))
|
||||
return 0
|
||||
else if(score == 5 && prob(35))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
//Checks if table-passing table can reach target (5 tile radius)
|
||||
proc/airborne_can_reach(turf/source, turf/target, var/radius=5)
|
||||
var/obj/dummy = new(source)
|
||||
dummy.pass_flags = PASSTABLE
|
||||
|
||||
for(var/i=0, i<radius, i++) if(!step_towards(dummy, target)) break
|
||||
|
||||
var/rval = dummy.Adjacent(target)
|
||||
dummy.loc = null
|
||||
dummy = null
|
||||
return rval
|
||||
|
||||
//Attemptes to infect mob M with virus. Set forced to 1 to ignore protective clothnig
|
||||
/proc/infect_virus2(var/mob/living/carbon/M,var/datum/disease2/disease/disease,var/forced = 0)
|
||||
if(!istype(disease))
|
||||
return 0
|
||||
if(!istype(M))
|
||||
return 0
|
||||
if ("[disease.uniqueID]" in M.virus2)
|
||||
return 0
|
||||
// if one of the antibodies in the mob's body matches one of the disease's antigens, don't infect
|
||||
if((M.antibodies & disease.antigen) != 0)
|
||||
return
|
||||
if(M.reagents.has_reagent("spaceacillin"))
|
||||
return
|
||||
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/chump = M
|
||||
if (!(chump.species.name in disease.affected_species))
|
||||
return
|
||||
|
||||
// log_debug("Infecting [M]")
|
||||
|
||||
if(prob(disease.infectionchance) || forced)
|
||||
// certain clothes can prevent an infection
|
||||
if(!forced && !get_infection_chance(M, disease.spreadtype))
|
||||
return
|
||||
|
||||
var/datum/disease2/disease/D = disease.getcopy()
|
||||
D.minormutate()
|
||||
M.virus2["[D.uniqueID]"] = D
|
||||
|
||||
//Infects mob M with random lesser disease, if he doesn't have one
|
||||
/proc/infect_mob_random_lesser(var/mob/living/carbon/M)
|
||||
var/datum/disease2/disease/D = new /datum/disease2/disease
|
||||
D.makerandom()
|
||||
D.infectionchance = 1
|
||||
M.virus2["[D.uniqueID]"] = D
|
||||
|
||||
//Infects mob M with random greated disease, if he doesn't have one
|
||||
/proc/infect_mob_random_greater(var/mob/living/carbon/M)
|
||||
var/datum/disease2/disease/D = new /datum/disease2/disease
|
||||
D.makerandom(1)
|
||||
M.virus2["[D.uniqueID]"] = D
|
||||
|
||||
//Fancy prob() function.
|
||||
/proc/dprob(var/p)
|
||||
return(prob(sqrt(p)) && prob(sqrt(p)))
|
||||
|
||||
/mob/living/carbon/proc/spread_disease_to(var/mob/living/carbon/victim, var/vector = "Airborne")
|
||||
if (src == victim)
|
||||
return "retardation"
|
||||
|
||||
// log_debug("Spreading [vector] diseases from [src] to [victim]")
|
||||
if (virus2.len > 0)
|
||||
for (var/ID in virus2)
|
||||
log_debug("Attempting virus [ID]")
|
||||
var/datum/disease2/disease/V = virus2[ID]
|
||||
if(V.spreadtype != vector) continue
|
||||
|
||||
if (vector == "Airborne")
|
||||
if(airborne_can_reach(get_turf(src), get_turf(victim)))
|
||||
// log_debug("In range, infecting")
|
||||
infect_virus2(victim,V)
|
||||
// else
|
||||
// log_debug("Could not reach target")
|
||||
|
||||
if (vector == "Contact")
|
||||
if (in_range(src, victim))
|
||||
// log_debug("In range, infecting")
|
||||
infect_virus2(victim,V)
|
||||
|
||||
//contact goes both ways
|
||||
if (victim.virus2.len > 0 && vector == "Contact")
|
||||
// log_debug("Spreading [vector] diseases from [victim] to [src]")
|
||||
var/nudity = 1
|
||||
|
||||
if (ishuman(victim))
|
||||
var/mob/living/carbon/human/H = victim
|
||||
var/obj/item/organ/external/select_area = H.get_organ(src.zone_sel.selecting)
|
||||
var/list/clothes = list(H.head, H.wear_mask, H.wear_suit, H.w_uniform, H.gloves, H.shoes)
|
||||
for(var/obj/item/clothing/C in clothes )
|
||||
if(C && istype(C))
|
||||
if(C.body_parts_covered & select_area.body_part)
|
||||
nudity = 0
|
||||
if (nudity)
|
||||
for (var/ID in victim.virus2)
|
||||
var/datum/disease2/disease/V = victim.virus2[ID]
|
||||
if(V && V.spreadtype != vector) continue
|
||||
infect_virus2(src,V)
|
||||
@@ -1,234 +0,0 @@
|
||||
// UI menu navigation
|
||||
#define HOME "home"
|
||||
#define LIST "list"
|
||||
#define ENTRY "entry"
|
||||
|
||||
/obj/machinery/disease2/isolator/
|
||||
name = "Pathogenic Isolator"
|
||||
density = 1
|
||||
anchored = 1
|
||||
icon = 'icons/obj/virology.dmi'
|
||||
icon_state = "isolator"
|
||||
var/isolating = 0
|
||||
var/state = HOME
|
||||
var/datum/disease2/disease/virus2 = null
|
||||
var/datum/data/record/entry = null
|
||||
var/obj/item/weapon/reagent_containers/syringe/sample = null
|
||||
|
||||
/obj/machinery/disease2/isolator/update_icon()
|
||||
if (stat & (BROKEN|NOPOWER))
|
||||
icon_state = "isolator"
|
||||
return
|
||||
|
||||
if (isolating)
|
||||
icon_state = "isolator_processing"
|
||||
else if (sample)
|
||||
icon_state = "isolator_in"
|
||||
else
|
||||
icon_state = "isolator"
|
||||
|
||||
/obj/machinery/disease2/isolator/attackby(var/obj/O as obj, var/mob/user, params)
|
||||
if(!istype(O,/obj/item/weapon/reagent_containers/syringe)) return
|
||||
var/obj/item/weapon/reagent_containers/syringe/S = O
|
||||
|
||||
if(sample)
|
||||
user << "\The [src] is already loaded."
|
||||
return
|
||||
|
||||
sample = S
|
||||
user.drop_item()
|
||||
S.loc = src
|
||||
|
||||
user.visible_message("[user] adds \a [O] to \the [src]!", "You add \a [O] to \the [src]!")
|
||||
nanomanager.update_uis(src)
|
||||
update_icon()
|
||||
|
||||
src.attack_hand(user)
|
||||
|
||||
/obj/machinery/disease2/isolator/attack_hand(mob/user as mob)
|
||||
if(stat & (NOPOWER|BROKEN)) return
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/disease2/isolator/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
user.set_machine(src)
|
||||
|
||||
var/data[0]
|
||||
data["syringe_inserted"] = !!sample
|
||||
data["isolating"] = isolating
|
||||
data["pathogen_pool"] = null
|
||||
data["state"] = state
|
||||
data["entry"] = entry
|
||||
data["can_print"] = (state != HOME || sample) && !isolating
|
||||
|
||||
switch (state)
|
||||
if (HOME)
|
||||
if (sample)
|
||||
var/list/pathogen_pool[0]
|
||||
for(var/datum/reagent/blood/B in sample.reagents.reagent_list)
|
||||
var/list/virus = B.data["virus2"]
|
||||
for (var/ID in virus)
|
||||
var/datum/disease2/disease/V = virus[ID]
|
||||
var/datum/data/record/R = null
|
||||
if (ID in virusDB)
|
||||
R = virusDB[ID]
|
||||
|
||||
var/mob/living/carbon/human/D = B.data["donor"]
|
||||
pathogen_pool.Add(list(list(\
|
||||
"name" = "[D.get_species()] [B.name]", \
|
||||
"dna" = B.data["blood_DNA"], \
|
||||
"unique_id" = V.uniqueID, \
|
||||
"reference" = "\ref[V]", \
|
||||
"is_in_database" = !!R, \
|
||||
"record" = "\ref[R]")))
|
||||
|
||||
if (pathogen_pool.len > 0)
|
||||
data["pathogen_pool"] = pathogen_pool
|
||||
|
||||
if (LIST)
|
||||
var/list/db[0]
|
||||
for (var/ID in virusDB)
|
||||
var/datum/data/record/r = virusDB[ID]
|
||||
db.Add(list(list("name" = r.fields["name"], "record" = "\ref[r]")))
|
||||
|
||||
if (db.len > 0)
|
||||
data["database"] = db
|
||||
|
||||
if (ENTRY)
|
||||
if (entry)
|
||||
var/desc = entry.fields["description"]
|
||||
data["entry"] = list(\
|
||||
"name" = entry.fields["name"], \
|
||||
"description" = replacetext(desc, "\n", ""))
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "pathogenic_isolator.tmpl", src.name, 400, 500)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/disease2/isolator/process()
|
||||
if (isolating > 0)
|
||||
isolating -= 1
|
||||
if (isolating == 0)
|
||||
if (virus2)
|
||||
var/obj/item/weapon/virusdish/d = new /obj/item/weapon/virusdish(src.loc)
|
||||
d.virus2 = virus2.getcopy()
|
||||
virus2 = null
|
||||
ping("\The [src] pings, \"Viral strain isolated.\"")
|
||||
|
||||
nanomanager.update_uis(src)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/disease2/isolator/Topic(href, href_list)
|
||||
if (..()) return 0
|
||||
|
||||
var/mob/user = usr
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
|
||||
|
||||
src.add_fingerprint(user)
|
||||
|
||||
if (href_list["close"])
|
||||
user.unset_machine()
|
||||
ui.close()
|
||||
return 0
|
||||
|
||||
if (href_list[HOME])
|
||||
state = HOME
|
||||
return 1
|
||||
|
||||
if (href_list[LIST])
|
||||
state = LIST
|
||||
return 1
|
||||
|
||||
if (href_list[ENTRY])
|
||||
if (istype(locate(href_list["view"]), /datum/data/record))
|
||||
entry = locate(href_list["view"])
|
||||
|
||||
state = ENTRY
|
||||
return 1
|
||||
|
||||
if (href_list["print"])
|
||||
print(user)
|
||||
return 1
|
||||
|
||||
if(!sample) return 1
|
||||
|
||||
if (href_list["isolate"])
|
||||
var/datum/disease2/disease/V = locate(href_list["isolate"])
|
||||
if (V)
|
||||
virus2 = V
|
||||
isolating = 20
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
if (href_list["eject"])
|
||||
sample.loc = src.loc
|
||||
sample = null
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/machinery/disease2/isolator/proc/print(var/mob/user)
|
||||
playsound(loc, "sound/goonstation/machines/printer_dotmatrix.ogg", 50, 1)
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(loc)
|
||||
|
||||
switch (state)
|
||||
if (HOME)
|
||||
if (!sample) return
|
||||
P.name = "paper - Patient Diagnostic Report"
|
||||
P.info = {"
|
||||
[virology_letterhead("Patient Diagnostic Report")]
|
||||
<center><small><font color='red'><b>CONFIDENTIAL MEDICAL REPORT</b></font></small></center><br>
|
||||
<large><u>Sample:</u></large> [sample.name]<br>
|
||||
"}
|
||||
|
||||
if (user)
|
||||
P.info += "<u>Generated By:</u> [user.name]<br>"
|
||||
|
||||
P.info += "<hr>"
|
||||
|
||||
for(var/datum/reagent/blood/B in sample.reagents.reagent_list)
|
||||
var/mob/living/carbon/human/D = B.data["donor"]
|
||||
P.info += "<large><u>[D.get_species()] [B.name]:</u></large><br>[B.data["blood_DNA"]]<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>"
|
||||
|
||||
P.info += {"
|
||||
<hr>
|
||||
<u>Additional Notes:</u>
|
||||
"}
|
||||
|
||||
if (LIST)
|
||||
P.name = "paper - Virus List"
|
||||
P.info = {"
|
||||
[virology_letterhead("Virus List")]
|
||||
"}
|
||||
|
||||
var/i = 0
|
||||
for (var/ID in virusDB)
|
||||
i++
|
||||
var/datum/data/record/r = virusDB[ID]
|
||||
P.info += "[i]. " + r.fields["name"]
|
||||
P.info += "<br>"
|
||||
|
||||
P.info += {"
|
||||
<hr>
|
||||
<u>Additional Notes:</u>
|
||||
"}
|
||||
|
||||
if (ENTRY)
|
||||
P.name = "paper - Viral Profile"
|
||||
P.info = {"
|
||||
[virology_letterhead("Viral Profile")]
|
||||
[entry.fields["description"]]
|
||||
<hr>
|
||||
<u>Additional Notes:</u>
|
||||
"}
|
||||
|
||||
state("The nearby computer prints out a report.")
|
||||
@@ -1,104 +0,0 @@
|
||||
///////////////ANTIBODY SCANNER///////////////
|
||||
|
||||
/obj/item/device/antibody_scanner
|
||||
name = "\improper Antibody Scanner"
|
||||
desc = "Scans living beings for antibodies in their blood."
|
||||
icon_state = "antibody"
|
||||
w_class = 2.0
|
||||
item_state = "electronic"
|
||||
flags = CONDUCT
|
||||
|
||||
/obj/item/device/antibody_scanner/attack(mob/M as mob, mob/user as mob)
|
||||
if(!istype(M,/mob/living/carbon/))
|
||||
report("Scan aborted: Incompatible target.", user)
|
||||
return
|
||||
|
||||
var/mob/living/carbon/C = M
|
||||
if (istype(C,/mob/living/carbon/human/))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(H.species && H.species.flags & NO_BLOOD)
|
||||
report("Scan aborted: The target does not have blood.", user)
|
||||
return
|
||||
|
||||
if(!C.antibodies)
|
||||
report("Scan Complete: No antibodies detected.", user)
|
||||
return
|
||||
|
||||
if (CLUMSY in user.mutations && prob(50))
|
||||
// I was tempted to be really evil and rot13 the output.
|
||||
report("Antibodies detected: [reverse_text(antigens2string(C.antibodies))]", user)
|
||||
else
|
||||
report("Antibodies detected: [antigens2string(C.antibodies)]", user)
|
||||
|
||||
/obj/item/device/antibody_scanner/proc/report(var/text, mob/user as mob)
|
||||
user << "\blue \icon[src] \The [src] beeps, \"[text]\""
|
||||
|
||||
///////////////VIRUS DISH///////////////
|
||||
|
||||
/obj/item/weapon/virusdish
|
||||
name = "virus containment/growth dish"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implantcase-b"
|
||||
var/datum/disease2/disease/virus2 = null
|
||||
var/growth = 0
|
||||
var/info = 0
|
||||
var/analysed = 0
|
||||
|
||||
/obj/item/weapon/virusdish/random
|
||||
name = "virus sample"
|
||||
|
||||
/obj/item/weapon/virusdish/random/New()
|
||||
..()
|
||||
src.virus2 = new /datum/disease2/disease
|
||||
src.virus2.makerandom(0, 1) // Virus dishes get minor effects only on creation, and have a chance of being injection type
|
||||
growth = rand(5, 50)
|
||||
|
||||
/obj/item/weapon/virusdish/attackby(var/obj/item/weapon/W as obj,var/mob/living/carbon/user as mob, params)
|
||||
if(istype(W,/obj/item/weapon/hand_labeler) || istype(W,/obj/item/weapon/reagent_containers/syringe))
|
||||
return
|
||||
..()
|
||||
if(prob(50))
|
||||
user << "\The [src] shatters!"
|
||||
if(virus2.infectionchance > 0)
|
||||
for(var/mob/living/carbon/target in view(1, get_turf(src)))
|
||||
if(airborne_can_reach(get_turf(src), get_turf(target)))
|
||||
if(get_infection_chance(target))
|
||||
infect_virus2(target,src.virus2)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/virusdish/examine(mob/user)
|
||||
user << "This is a virus containment dish."
|
||||
if(src.info)
|
||||
user << "It has the following information about its contents:"
|
||||
user << src.info
|
||||
|
||||
/obj/item/weapon/ruinedvirusdish
|
||||
name = "ruined virus sample"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "implantcase-b"
|
||||
desc = "The bacteria in the dish are completely dead."
|
||||
|
||||
/obj/item/weapon/ruinedvirusdish/attackby(var/obj/item/weapon/W as obj,var/mob/living/carbon/user as mob, params)
|
||||
if(istype(W,/obj/item/weapon/hand_labeler) || istype(W,/obj/item/weapon/reagent_containers/syringe))
|
||||
return ..()
|
||||
|
||||
if(prob(50))
|
||||
user << "\The [src] shatters!"
|
||||
qdel(src)
|
||||
|
||||
///////////////GNA DISK///////////////
|
||||
|
||||
/obj/item/weapon/diseasedisk
|
||||
name = "blank GNA disk"
|
||||
icon = 'icons/obj/cloning.dmi'
|
||||
icon_state = "datadisk0"
|
||||
var/datum/disease2/effectholder/effect = null
|
||||
var/list/species = null
|
||||
var/stage = 1
|
||||
var/analysed = 1
|
||||
|
||||
/obj/item/weapon/diseasedisk/premade/New()
|
||||
name = "blank GNA disk (stage: [stage])"
|
||||
effect = new /datum/disease2/effectholder
|
||||
effect.effect = new /datum/disease2/effect/invisible
|
||||
effect.stage = stage
|
||||
Reference in New Issue
Block a user