Skip to content

Commit

Permalink
Complete virology addition
Browse files Browse the repository at this point in the history
CI fixes

Ci Fixes 2

Map changes.

CI fix?
  • Loading branch information
Kaksisilma committed Mar 21, 2022
1 parent 47be28d commit 91a3a29
Show file tree
Hide file tree
Showing 83 changed files with 4,544 additions and 362 deletions.
14 changes: 14 additions & 0 deletions baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1873,6 +1873,7 @@
#include "code\modules\events\sensor_suit_jamming.dm"
#include "code\modules\events\shipping_error.dm"
#include "code\modules\events\solar_storm.dm"
#include "code\modules\events\space_cold.dm"
#include "code\modules\events\spacevine.dm"
#include "code\modules\events\spider_infestation.dm"
#include "code\modules\events\spontaneous_appendicitis.dm"
Expand Down Expand Up @@ -3231,6 +3232,19 @@
#include "code\modules\ventcrawl\ventcrawl_atmospherics.dm"
#include "code\modules\ventcrawl\ventcrawl_multiz.dm"
#include "code\modules\ventcrawl\ventcrawl_verb.dm"
#include "code\modules\virus2\admin.dm"
#include "code\modules\virus2\analyser.dm"
#include "code\modules\virus2\antibodies.dm"
#include "code\modules\virus2\antibodyanalyser.dm"
#include "code\modules\virus2\centrifuge.dm"
#include "code\modules\virus2\curer.dm"
#include "code\modules\virus2\disease2.dm"
#include "code\modules\virus2\diseasesplicer.dm"
#include "code\modules\virus2\dishincubator.dm"
#include "code\modules\virus2\effect.dm"
#include "code\modules\virus2\helpers.dm"
#include "code\modules\virus2\isolator.dm"
#include "code\modules\virus2\items_devices.dm"
#include "code\modules\Vox2\vox_machines.dm"
#include "code\modules\vueui\external.dm"
#include "code\modules\vueui\ui.dm"
Expand Down
1 change: 1 addition & 0 deletions code/__defines/skills.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@
#define SKILL_SCIENCE /decl/hierarchy/skill/research/science
#define SKILL_MEDICAL /decl/hierarchy/skill/medical/medical
#define SKILL_ANATOMY /decl/hierarchy/skill/medical/anatomy
#define SKILL_VIROLOGY /decl/hierarchy/skill/medical/medical/virology
#define SKILL_CHEMISTRY /decl/hierarchy/skill/medical/chemistry
1 change: 1 addition & 0 deletions code/_global_vars/lists/objects.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
GLOBAL_LIST_EMPTY(active_diseases)
GLOBAL_LIST_EMPTY(med_hud_users) // List of all entities using a medical HUD.
GLOBAL_LIST_EMPTY(sec_hud_users) // List of all entities using a security HUD.
GLOBAL_LIST_EMPTY(jani_hud_users)
Expand Down
10 changes: 10 additions & 0 deletions code/_helpers/global_access.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// THIS FILE IS AUTOMATICALLY CREATED BY tools/gen_globals.py
/proc/readglobal(which)
switch(which)
if("ALL_ANTIGENS")
return global.ALL_ANTIGENS;
if("ANTAG_FREQS")
return global.ANTAG_FREQS;
if("BSACooldown")
Expand Down Expand Up @@ -909,6 +911,8 @@
return global.view_variables_dont_expand;
if("view_variables_no_assoc")
return global.view_variables_no_assoc;
if("virusDB")
return global.virusDB;
if("visual_nets")
return global.visual_nets;
if("vsc")
Expand Down Expand Up @@ -944,6 +948,8 @@

/proc/writeglobal(which, newval)
switch(which)
if("ALL_ANTIGENS")
global.ALL_ANTIGENS=newval;
if("ANTAG_FREQS")
global.ANTAG_FREQS=newval;
if("BSACooldown")
Expand Down Expand Up @@ -1852,6 +1858,8 @@
global.view_variables_dont_expand=newval;
if("view_variables_no_assoc")
global.view_variables_no_assoc=newval;
if("virusDB")
global.virusDB=newval;
if("visual_nets")
global.visual_nets=newval;
if("vsc")
Expand Down Expand Up @@ -1886,6 +1894,7 @@
global.zone_blocked=newval;

/var/list/_all_globals=list(
"ALL_ANTIGENS",
"ANTAG_FREQS",
"BSACooldown",
"BUMP_TELEPORTERS",
Expand Down Expand Up @@ -2342,6 +2351,7 @@
"ventcrawl_machinery",
"view_variables_dont_expand",
"view_variables_no_assoc",
"virusDB",
"visual_nets",
"vsc",
"wax_recipes",
Expand Down
7 changes: 7 additions & 0 deletions code/_helpers/medical_scans.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
scan["genetic"] = H.getCloneLoss()
scan["paralysis"] = H.paralysis
scan["immune_system"] = H.virus_immunity()
if (H.virus2.len)
scan["virus"] = TRUE
scan["worms"] = H.has_brain_worms()

scan["reagents"] = list()
Expand Down Expand Up @@ -234,6 +236,11 @@
<tr><td colspan='2'><span class='bad'><center>Large growth detected in frontal lobe, possibly cancerous.</center></span></td></tr>
*/
dat += "<tr><td colspan = '2'>Antibody levels and immune system perfomance are at [scan["immune_system"]*100]% of baseline.</td></tr>"
if (scan["virus"])
if(skill_level >= SKILL_ADEPT)
dat += "<tr><td colspan='2'><span class='bad'><center>Viral pathogen detected in blood stream.</center></span></td></tr>"
else
dat += "<tr><td colspan='2'><center>Viral pathogen detected in blood stream.</center></td></tr>"

if(scan["worms"])
dat += "<tr><td colspan='2'><span class='bad'><center>Large growth detected in frontal lobe, possibly cancerous.</center></span></td></tr>"
Expand Down
13 changes: 13 additions & 0 deletions code/controllers/subsystems/supply.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ SUBSYSTEM_DEF(supply)
"time" = "Base station supply",
"manifest" = "From exported manifests",
"crate" = "From exported crates",
"virology_antibodies" = "From uploaded antibody data",
"virology_dishes" = "From exported virus dishes",
"gep" = "From uploaded good explorer points",
"total" = "Total" // If you're adding additional point sources, add it here in a new line. Don't forget to put a comma after the old last line.
)
//virus dishes uniqueness
var/list/sold_virus_strains = list()

/datum/controller/subsystem/supply/Initialize()
. = ..()
Expand Down Expand Up @@ -112,6 +116,15 @@ SUBSYSTEM_DEF(supply)
var/obj/item/weapon/disk/survey/D = A
add_points_from_source(round(D.Value() * 0.005), "gep")

// Sell virus dishes.
if(istype(A, /obj/item/weapon/virusdish))
//Obviously the dish must be unique and never sold before.
var/obj/item/weapon/virusdish/dish = A
if(dish.analysed && istype(dish.virus2) && dish.virus2.uniqueID)
if(!(dish.virus2.uniqueID in sold_virus_strains))
add_points_from_source(5, "virology_dishes")
sold_virus_strains += dish.virus2.uniqueID

qdel(AM)

if(material_count.len)
Expand Down
8 changes: 8 additions & 0 deletions code/datums/supplypacks/science.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@
containertype = /obj/structure/largecrate
containername = "reagent dispenser crate"

/decl/hierarchy/supply_pack/science/virus
name = "Samples - Virus (BIOHAZARD)"
contains = list(/obj/item/weapon/virusdish/random = 4)
cost = 25
containertype = /obj/structure/closet/crate/secure
containername = "virus sample crate"
access = access_cmo

/decl/hierarchy/supply_pack/science/coolanttank
name = "Liquid - Coolant tank"
contains = list(/obj/structure/reagent_dispensers/coolanttank)
Expand Down
2 changes: 1 addition & 1 deletion code/game/area/Space Station 13 areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ area/space/atmosalert()
/area/medical/virology/access
name = "\improper Virology Access"
icon_state = "virology"
req_access = list() // This is like the lobby, needs low access to allow passing through in a different direction.
req_access = list(access_virology)

/area/security
req_access = list(access_sec_doors)
Expand Down
6 changes: 4 additions & 2 deletions code/game/machinery/kitchen/smartfridge.dm
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@
/obj/machinery/smartfridge/secure/virology/accept_check(var/obj/item/O as obj)
if(istype(O,/obj/item/weapon/reagent_containers/glass/beaker/vial/))
return 1
if(istype(O,/obj/item/weapon/virusdish/))
return 1
return 0

/obj/machinery/smartfridge/chemistry
Expand Down Expand Up @@ -177,7 +179,7 @@
var/remove_thing = FALSE
if(istype(thing, /obj/item/weapon/reagent_containers/food/snacks))
var/obj/item/weapon/reagent_containers/food/snacks/S = thing
if(S.dry || !I.get_specific_product(get_turf(src), S))
if(S.dry || !I.get_specific_product(get_turf(src), S))
continue
if(S.dried_type == S.type)
S.dry = 1
Expand All @@ -200,7 +202,7 @@
var/material/leather_mat = SSmaterials.get_material_by_name(skin_mat.tans_to)
stock_item(new leather_mat.stack_type(get_turf(src), skin.amount, skin_mat.tans_to))
remove_thing = TRUE

if(remove_thing)
I.instances -= thing
I.amount--
Expand Down
3 changes: 3 additions & 0 deletions code/game/objects/effects/decals/Cleanable/humans.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ var/global/list/image/splatter_cache=list()
scent_descriptor = SCENT_DESC_ODOR

var/base_icon = 'icons/effects/blood.dmi'
var/list/viruses = list()
var/basecolor=COLOR_BLOOD_HUMAN // Color when wet.
var/list/datum/disease2/disease/virus2 = list()
var/amount = 5
var/drytime
var/dryname = "dried blood"
Expand Down Expand Up @@ -271,6 +273,7 @@ var/global/list/image/splatter_cache=list()
icon_state = "mucus"
generic_filth = TRUE
persistent = TRUE
var/list/datum/disease2/disease/virus2 = list()
var/dry=0 // Keeps the lag down

/obj/effect/decal/cleanable/mucus/New()
Expand Down
1 change: 1 addition & 0 deletions code/game/objects/effects/decals/Cleanable/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
icon_state = "vomit_1"
persistent = TRUE
generic_filth = TRUE
var/list/viruses = list()

/obj/effect/decal/cleanable/vomit/New()
random_icon_states = icon_states(icon)
Expand Down
1 change: 1 addition & 0 deletions code/game/objects/effects/gibs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
icon = 'icons/mob/screen1.dmi'
icon_state = "x3"
var/sparks = 0 //whether sparks spread on Gib()
var/virusProb = 20 //the chance for viruses to spread on the gibs
var/list/gibtypes = list()
var/list/gibamounts = list()
var/list/gibdirections = list() //of lists
Expand Down
7 changes: 7 additions & 0 deletions code/game/objects/items/devices/scanners/health.dm
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,13 @@
if(chemtraces.len)
. += "<span class='scan_notice'>Metabolism products of [english_list(chemtraces)] found in subject's system.</span>"

if(H.virus2.len)
for (var/ID in H.virus2)
if (ID in virusDB)
print_reagent_default_message = FALSE
var/datum/computer_file/data/virus_record/V = virusDB[ID]
. += "<span class='scan_warning'>Warning: Pathogen [V.fields["name"]] detected in subject's blood. Known antigen : [V.fields["antigen"]]</span>"

if(print_reagent_default_message)
. += "No results."

Expand Down
14 changes: 14 additions & 0 deletions code/game/objects/items/weapons/circuitboards/computer/computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,20 @@
build_path = /obj/machinery/computer/operating
origin_tech = list(TECH_DATA = 2, TECH_BIO = 2)

/obj/item/weapon/stock_parts/circuitboard/curefab
name = T_BOARD("cure fabricator")
build_path = /obj/machinery/computer/curer

/obj/item/weapon/stock_parts/circuitboard/splicer
name = T_BOARD("disease splicer")
build_path = /obj/machinery/computer/diseasesplicer
origin_tech = list(TECH_DATA = 5, TECH_BIO = 5)

/obj/item/weapon/stock_parts/circuitboard/centrifuge
name = T_BOARD("isolation centrifuge")
build_path = /obj/machinery/computer/centrifuge
origin_tech = list(TECH_DATA = 2, TECH_BIO = 3)

/obj/item/weapon/stock_parts/circuitboard/helm
name = T_BOARD("helm control console")
build_path = /obj/machinery/computer/ship/helm
Expand Down
1 change: 1 addition & 0 deletions code/game/turfs/simulated.dm
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
B.blood_DNA = list()
if(!B.blood_DNA[M.dna.unique_enzymes])
B.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
B.virus2 = virus_copylist(M.virus2)
return 1 //we bloodied the floor
blood_splatter(src,M.get_blood(M.vessel),1)
return 1 //we bloodied the floor
Expand Down
30 changes: 30 additions & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,36 @@ var/list/admin_verbs_mod = list(
log_and_message_admins("created an admin explosion at [epicenter.loc].")
SSstatistics.add_field_details("admin_verb","DB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!

/client/proc/give_disease2(mob/T as mob in SSmobs.mob_list) // -- Giacom
set category = "Fun"
set name = "Give Disease"
set desc = "Gives a Disease to a mob."

var/datum/disease2/disease/D = new /datum/disease2/disease()

var/severity = 1
var/greater = input("Is this a lesser, greater, or badmin disease? (severity 1, 2, or 99)", "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.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.get_bodytype(H))
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)

SSstatistics.add_field_details("admin_verb","GD2") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_and_message_admins("gave [key_name(T)] a [greater] disease2 with infection chance [D.infectionchance].")

/client/proc/togglebuildmodeself()
set name = "Toggle Build Mode Self"
set category = "Special Verbs"
Expand Down
4 changes: 3 additions & 1 deletion code/modules/admin/view_variables/helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
<option>---</option>
<option value='?_src_=vars;offerghosts=\ref[src]'>Offer to ghosts</option>
<option value='?_src_=vars;give_spell=\ref[src]'>Give Spell</option>
<option value='?_src_=vars;give_disease2=\ref[src]'>Give Disease</option>
<option value='?_src_=vars;give_disease=\ref[src]'>Give TG-style Disease</option>
<option value='?_src_=vars;godmode=\ref[src]'>Toggle Godmode</option>
<option value='?_src_=vars;build_mode=\ref[src]'>Toggle Build Mode</option>

Expand Down Expand Up @@ -154,7 +156,7 @@

// The following vars require R_DEBUG to edit
/datum/proc/VV_locked()
return list("vars", "cuffed")
return list("vars", "viruses", "cuffed")

/client/VV_locked()
return list("vars", "mob")
Expand Down
11 changes: 11 additions & 0 deletions code/modules/admin/view_variables/topic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,17 @@
src.give_spell(M)
href_list["datumrefresh"] = href_list["give_spell"]

else if(href_list["give_disease2"])
if(!check_rights(R_ADMIN|R_FUN)) return

var/mob/M = locate(href_list["give_disease2"])
if(!istype(M))
to_chat(usr, "This can only be used on instances of type /mob")
return

src.give_disease2(M)
href_list["datumrefresh"] = href_list["give_spell"]

else if(href_list["godmode"])
if(!check_rights(R_REJUVINATE)) return

Expand Down
1 change: 1 addition & 0 deletions code/modules/events/event_container.dm
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Vermin Infestation", /datum/event/infestation, 100, list(ASSIGNMENT_JANITOR = 100)),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Wallrot", /datum/event/wallrot, 0, list(ASSIGNMENT_ENGINEER = 30, ASSIGNMENT_GARDENER = 50)),
new /datum/event_meta/no_overmap(EVENT_LEVEL_MUNDANE, "Electrical Storm", /datum/event/electrical_storm, 20, list(ASSIGNMENT_ENGINEER = 20, ASSIGNMENT_JANITOR = 100)),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Space Cold Outbreak", /datum/event/space_cold, 100, list(ASSIGNMENT_MEDICAL = 20)),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Toilet Clog", /datum/event/toilet_clog, 50, list(ASSIGNMENT_JANITOR = 20)),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Drone Malfunction", /datum/event/rogue_maint_drones/, 10, list(ASSIGNMENT_ENGINEER = 30)),
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Disposals Explosion", /datum/event/disposals_explosion/, 50, list(ASSIGNMENT_ENGINEER = 40)),
Expand Down
18 changes: 18 additions & 0 deletions code/modules/events/space_cold.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
datum/event/space_cold/start()
var/list/candidates = list() //list of candidate keys
for(var/mob/living/carbon/human/G in GLOB.player_list)
if(G.client && G.stat != DEAD && !G.species.get_virus_immune(G))
candidates += G

if(!candidates.len)
return

var/datum/disease2/disease/sniffle = new
sniffle.max_stage = 3
sniffle.makerandom(1)
sniffle.spreadtype = "Airborne"

var/victims = min(rand(1,3), candidates.len)
while(victims)
infect_virus2(pick_n_take(candidates),sniffle,1)
victims--
7 changes: 7 additions & 0 deletions code/modules/food/recipes_microwave.dm
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,13 @@ I said no!
)
result = /obj/item/weapon/reagent_containers/food/snacks/tofurkey

// Fuck Science!
/datum/recipe/ruinedvirusdish
items = list(
/obj/item/weapon/virusdish
)
result = /obj/item/weapon/ruinedvirusdish

//////////////////////////////////////////
// bs12 food port stuff
//////////////////////////////////////////
Expand Down
Loading

0 comments on commit 91a3a29

Please sign in to comment.