diff --git a/.gitignore b/.gitignore index 4fca86447c6d6..94f683034bbf7 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,3 @@ *~ .#* *.swp -*.db diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm index 2d83c037b5a92..31c92220a002f 100644 --- a/code/datums/diseases/advance/advance.dm +++ b/code/datums/diseases/advance/advance.dm @@ -273,10 +273,6 @@ var/list/advance_cures = list( if(s) AddSymptom(s) Refresh(1) - - if(symptoms.len>2) - for(var/datum/symptom/S in symptoms) - if(istype(S,/datum/symptom/inert)) src.RemoveSymptom(S) //removes the Inert Symptom return // Randomly remove a symptom. diff --git a/code/datums/diseases/advance/presets.dm b/code/datums/diseases/advance/presets.dm index 21afc7823a69b..84f34534906a4 100644 --- a/code/datums/diseases/advance/presets.dm +++ b/code/datums/diseases/advance/presets.dm @@ -49,12 +49,4 @@ if(!D) name = "Reality Impairment" symptoms = list(new/datum/symptom/hallucigen) - ..(process, D, copy) - -//Inert Virus - -/datum/disease/advance/inert/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0) - if(!D) - name = "Inert Virus" - symptoms = list(new/datum/symptom/inert) ..(process, D, copy) \ No newline at end of file diff --git a/code/datums/diseases/advance/symptoms/inert.dm b/code/datums/diseases/advance/symptoms/inert.dm deleted file mode 100644 index 6b016922e8b38..0000000000000 --- a/code/datums/diseases/advance/symptoms/inert.dm +++ /dev/null @@ -1,26 +0,0 @@ -/* -////////////////////////////////////// -Inert Virus - - Noticable. - No stat change - -BONUS - Nothing. Symptom disappears when other symptoms manifest - -////////////////////////////////////// -*/ - -/datum/symptom/inert - - name = "Facial Hypertrichosis" - stealth = 1 - resistance = 0 - stage_speed = 0 - transmittable = 0 - level = 10 //so it's not on the random rotation - severity = 1 - -/datum/symptom/beard/Activate(var/datum/disease/advance/A) - ..() - return \ No newline at end of file diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm index b6cd032bd60a1..7c6fe7381307d 100644 --- a/code/modules/admin/IsBanned.dm +++ b/code/modules/admin/IsBanned.dm @@ -90,6 +90,7 @@ world/IsBanned(key,address,computer_id) else expires = " The is a permanent ban." + var/desc = "\nReason: You, or another user of this computer or connection ([pckey]) is banned from playing here. The ban reason is:\n[reason]\nThis ban was applied by [ackey] on [bantime], [expires]" . = list("reason"="[bantype]", "desc"="[desc]") @@ -97,7 +98,6 @@ world/IsBanned(key,address,computer_id) log_access("Failed Login: [key] [computer_id] [address] - Banned [.["reason"]]") return . - . = ..() //default pager ban stuff if (.) //byond will not trigger isbanned() for "global" host bans, diff --git a/code/modules/admin/stickyban.dm b/code/modules/admin/stickyban.dm index 0fee57f272452..bdeba8dc82057 100644 --- a/code/modules/admin/stickyban.dm +++ b/code/modules/admin/stickyban.dm @@ -1,4 +1,4 @@ -/datum/admins/proc/stickyban(action,data) +datum/admins/proc/stickyban(action,data) if(!check_rights(R_BAN)) return switch (action) @@ -142,7 +142,6 @@ /datum/admins/proc/stickyban_show() if(!check_rights(R_BAN)) return - var/list/bans = sortList(world.GetConfig("ban")) var/banhtml = "" for(var/key in bans) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index a426e9280619c..b5fc6318aab9c 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -23,9 +23,9 @@ message_admins("[key_name_admin(usr)] Rejected [C.key]'s admin help. [C.key]'s Adminhelp verb has been returned to them") log_admin("[key_name(usr)] Rejected [C.key]'s admin help") - - else if(href_list["stickyban"]) + if(href_list["stickyban"]) stickyban(href_list["stickyban"],href_list) + if(href_list["makeAntag"]) switch(href_list["makeAntag"]) if("1") diff --git a/code/modules/food&drinks/kitchen machinery/smartfridge.dm b/code/modules/food&drinks/kitchen machinery/smartfridge.dm index 31598b9002c13..0a0596d39f4d3 100644 --- a/code/modules/food&drinks/kitchen machinery/smartfridge.dm +++ b/code/modules/food&drinks/kitchen machinery/smartfridge.dm @@ -360,4 +360,4 @@ /obj/machinery/smartfridge/chemistry/virology name = "smart virus storage" desc = "A refrigerated storage unit for volatile sample storage." - spawn_meds = list(/obj/item/weapon/reagent_containers/syringe/antiviral = 4, /obj/item/weapon/reagent_containers/glass/bottle/inert_virion = 1, /obj/item/weapon/reagent_containers/glass/bottle/cold = 1, /obj/item/weapon/reagent_containers/glass/bottle/flu_virion = 1, /obj/item/weapon/reagent_containers/glass/bottle/mutagen = 1, /obj/item/weapon/reagent_containers/glass/bottle/plasma = 1, /obj/item/weapon/reagent_containers/glass/bottle/synaptizine = 1) \ No newline at end of file + spawn_meds = list(/obj/item/weapon/reagent_containers/syringe/antiviral = 4, /obj/item/weapon/reagent_containers/glass/bottle/cold = 1, /obj/item/weapon/reagent_containers/glass/bottle/flu_virion = 1, /obj/item/weapon/reagent_containers/glass/bottle/mutagen = 1, /obj/item/weapon/reagent_containers/glass/bottle/plasma = 1, /obj/item/weapon/reagent_containers/glass/bottle/synaptizine = 1) \ No newline at end of file diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index fbbd72b4a88b8..d11a51eda64f9 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -749,14 +749,6 @@ circuit = /obj/item/weapon/circuitboard/pandemic use_power = 1 idle_power_usage = 20 - var/virusfood_ammount = 0 - var/mutagen_ammount = 0 - var/plasma_ammount = 0 - var/synaptizine_ammount = 0 - var/new_diseases = list() - var/new_symptoms = list() - var/new_cures = list() - var/tab_open = 1 //1-Virus Description, 2-Experiment, 3-Database var/temp_html = "" var/wait = null var/obj/item/weapon/reagent_containers/glass/beaker = null @@ -823,37 +815,48 @@ usr.set_machine(src) if(!beaker) return - if (href_list["symptom"]) - 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"] - for(var/datum/disease/advance/D in viruses) - D.AddSymptom(new_symptoms[text2num(href_list["symptom"])]) - src.updateUsrDialog() - return - - if (href_list["cure"]) + 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/vaccine_type = new_cures[text2num(href_list["cure"])] + 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_type.name] vaccine bottle" + + 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["virus"]) + else if (href_list["create_virus_culture"]) if(!wait) - var/datum/disease/D = new_diseases[text2num(href_list["virus"])] + 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) @@ -873,7 +876,20 @@ 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) @@ -888,105 +904,7 @@ AD.Refresh() src.updateUsrDialog() - else if (href_list["eject"]) - if(beaker) - var/obj/item/weapon/reagent_containers/glass/B = beaker - B.loc = loc - beaker = null - icon_state = "mixer0" - src.updateUsrDialog() - return - - else if (href_list["tab_open"]) - tab_open = text2num(href_list["tab_open"]) //fucking text - src.updateUsrDialog() - return - - else if(href_list["chem_choice"]) - switch(href_list["chem_choice"]) - if("virusfood") - if(virusfood_ammount>0) - if(beaker.reagents.add_reagent("virusfood",max(beaker.reagents.maximum_volume-beaker.reagents.total_volume,1))) - virusfood_ammount -= 1 - usr << "Mutation process is sucessfull!." - else - usr << "Not enough Virus Food stored!" - if("mutagen") - if(mutagen_ammount>0) - if(beaker.reagents.add_reagent("mutagen",max(beaker.reagents.maximum_volume-beaker.reagents.total_volume,1))) - mutagen_ammount -= 1 - usr << "Mutation process is sucessfull!." - else - usr << "Not enough Unstable Mutagen stored!" - if("plasma") - if(plasma_ammount>0) - if(beaker.reagents.add_reagent("virusfood",max(beaker.reagents.maximum_volume-beaker.reagents.total_volume,1))) - plasma_ammount -= 1 //no idea why plasma_ammount-- doesn't work here. - usr << "Mutation process is sucessfull!." - else - usr << "Not enough Plasma stored!" - if("synaptizine") - if(synaptizine_ammount>0) - if(beaker.reagents.add_reagent("synaptizine",max(beaker.reagents.maximum_volume-beaker.reagents.total_volume,1))) - synaptizine_ammount -= 1 - usr << "Mutation process is sucessfull!." - else - usr << "Not enough Synaptizine!" - if("reset") - beaker.reagents.clear_reagents() - var/datum/disease/advance/AD = new /datum/disease/advance/inert - var/list/data = list("viruses"=list(AD)) - beaker.reagents.add_reagent("blood",20,data) - usr << "Viral strain reset!." - src.updateUsrDialog() - return - else if(href_list["update"]) - 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"] - for(var/datum/disease/D in viruses) - if(istype(D,/datum/disease/advance)) //advanced deseases, we scan for symptoms first - var/datum/disease/advance/AD = D //inheritance failed me today - for(var/datum/symptom/S in AD.symptoms) - var/s_test = 1 - for(var/datum/symptom/ST in new_symptoms ) //this is awfull, I know. - if(S.name == ST.name) //I really hoped there was another way of doing this. - s_test = 0 - if(s_test) - new_symptoms += S - usr << "New symptom added to the database!" - //we scan for the desease itself to add to the list - var/d_test = 1 - for(var/datum/disease/DT in new_diseases) - if(D.IsSame(DT)) - d_test = 0 - if(d_test) - new_diseases += D - usr << "New disease added to the database!" - if(BL.data && BL.data["resistances"]) - var/v_test = 1 - for(var/resistance in BL.data["resistances"]) - for(var/res in new_cures) - if(resistance == res) - v_test = 0 - if(v_test) - new_cures += list(resistance) - if(!istype(resistance, /datum/disease)) - new_cures[resistance] = resistance - usr << "New vaccine added to the database!" - usr << "No virus found!" - else - usr << "No blood found!" - else - usr << "Beaker is empty!" - else - usr << "No beaker found!" - src.updateUsrDialog() - return else usr << browse(null, "window=pandemic") src.updateUsrDialog() @@ -1000,211 +918,106 @@ return user.set_machine(src) var/dat = "" - dat += "Analysis" - dat += "Experiment" - dat += "Database


" - - switch(tab_open) - if(1) //Virus Description - if(!beaker) - dat += "No beaker inserted.
" - - 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
" - else if(!Blood) - dat += "No blood sample found in beaker." - else if(!Blood.data) - dat += "No blood data found in beaker." - else - 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 += "Name Disease
" - - if(!D) - CRASH("We weren't able to get the advance disease from the archive.") - - dat += "Disease Agent: [D?"[D.agent]":"none"]
" - dat += "Common name: [(D.name||"none")]
" - dat += "Description: [(D.desc||"none")]
" - dat += "Spread: [(D.spread_text||"none")]


" - dat += "Possible cure: [(D.cure_text||"none")]
" - - if(istype(D, /datum/disease/advance)) - var/datum/disease/advance/A = D - dat += "Symptoms: " - var/english_symptoms = list() - for(var/datum/symptom/S in A.symptoms) - english_symptoms += S.name - dat += english_list(english_symptoms) + if(src.temp_html) + dat = "[src.temp_html]

Main Menu" + else if(!beaker) + dat += "Please insert beaker.
" + dat += "Close" + 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
" + else if(!Blood) + dat += "No blood sample found in beaker." + else if(!Blood.data) + dat += "No blood data found in beaker." + else + dat += "

Blood sample data:

" + dat += "Blood DNA: [(Blood.data["blood_DNA"]||"none")]
" + dat += "Blood Type: [(Blood.data["blood_type"]||"none")]
" + + + 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 += "Name Disease
" + + if(!D) + CRASH("We weren't able to get the advance disease from the archive.") + + dat += "Disease Agent: [D?"[D.agent] - Create virus culture bottle":"none"]
" + dat += "Common name: [(D.name||"none")]
" + dat += "Description: [(D.desc||"none")]
" + dat += "Spread: [(D.spread_text||"none")]
" + dat += "Possible cure: [(D.cure_text||"none")]

" + + if(istype(D, /datum/disease/advance)) + var/datum/disease/advance/A = D + dat += "Symptoms: " + 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 += "


Contains antibodies to: " - if(Blood.data["resistances"]) - var/list/res = Blood.data["resistances"] - if(res.len) - dat += "
" else - dat += "nothing
" - else - dat += "nothing
" - if(2) //Experimentation - dat += "Available Chems:
" - dat += "Virus Food: [virusfood_ammount].
" - dat += "Unstable Mutage: [mutagen_ammount].
" - dat += "Plasma: [plasma_ammount].
" - dat += "Synaptizine: [synaptizine_ammount].


" - - if(!beaker) - dat += "No beaker inserted.
" + dat += "No detectable virus in the sample." 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
" - else if(!Blood) - dat += "No blood sample found in beaker." - else if(!Blood.data) - dat += "No blood data found in beaker." - else - if(Blood.data["viruses"]) - var/list/vir = Blood.data["viruses"] - if(vir.len) - for(var/datum/disease/D in Blood.data["viruses"]) - if(!(D.visibility_flags & HIDDEN_PANDEMIC)) - if(!D) - CRASH("We weren't able to get the advance disease from the archive.") - if(istype(D, /datum/disease/advance)) - var/datum/disease/advance/A = D - dat += "Symptoms: " - var/english_symptoms = list() - dat += "" + dat += "No detectable virus in the sample." + + dat += "
Contains antibodies to: " + if(Blood.data["resistances"]) + var/list/res = Blood.data["resistances"] + if(res.len) + dat += "
" else - var/datum/disease/gn = new type(0, null) - dat += "[gn.name] " - dat += " - Make
" - - dat += "

Eject beaker" - - //user << browse("[src.name]
[dat]", "window=pandemic;size=575x400") - //onclose(user, "pandemic") //Old user interface - - //dat += "Eject the reagents
" - //EXAMPLE, REMOVE WHEN FINISHED + dat += "nothing
" + else + dat += "nothing
" + dat += "
Eject beaker[((R.total_volume&&R.reagent_list.len) ? "-- Empty beaker":"")]
" + dat += "Close" - var/datum/browser/popup = new(user, "pandemic", "PanD.E.M.I.C 2200") - popup.set_content(dat) - popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) - popup.open(1) + user << browse("[src.name]
[dat]", "window=pandemic;size=575x400") + onclose(user, "pandemic") return /obj/machinery/computer/pandemic/attackby(var/obj/I as obj, var/mob/user as mob, params) if(istype(I, /obj/item/weapon/reagent_containers/glass)) if(stat & (NOPOWER|BROKEN)) return - - for(var/datum/reagent/R in I.reagents.reagent_list) - if(R.id == "virusfood") - virusfood_ammount += R.volume - I.reagents.remove_reagent("virusfood",R.volume) - user << "You add the Virus Food into the machine!" - src.updateUsrDialog() - return - if(R.id == "mutagen") - mutagen_ammount += R.volume - I.reagents.remove_reagent("mutagen",R.volume) - user << "You add the Unstable Mutagen into the machine!" - src.updateUsrDialog() - return - if(R.id == "plasma") - plasma_ammount += R.volume - I.reagents.remove_reagent("plasma",R.volume) - user << "You add the Plasma into the machine!" - src.updateUsrDialog() - return - if(R.id == "synaptizine") - synaptizine_ammount += R.volume - I.reagents.remove_reagent("synaptizine",R.volume) - user << "You add the Synaptizine into the machine!" - src.updateUsrDialog() - return - if(src.beaker) user << "A beaker is already loaded into the machine." return + src.beaker = I user.drop_item() I.loc = src diff --git a/code/modules/reagents/reagent_containers/bottle.dm b/code/modules/reagents/reagent_containers/bottle.dm index afe3691786834..0ad95a74bc6e0 100644 --- a/code/modules/reagents/reagent_containers/bottle.dm +++ b/code/modules/reagents/reagent_containers/bottle.dm @@ -208,12 +208,6 @@ icon_state = "bottle12" list_reagents = list("atropine" = 30) -/obj/item/weapon/reagent_containers/glass/bottle/inert_virion - name = "Inert virion culture bottle" - desc = "A small bottle. Contains an Inert virion culture in synthblood medium." - icon_state = "bottle3" - spawned_disease = /datum/disease/advance/inert - /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." diff --git a/icons/Thumbs.db b/icons/Thumbs.db index d40fdc676cde9..bf782708a6251 100644 Binary files a/icons/Thumbs.db and b/icons/Thumbs.db differ diff --git a/tgstation.dme b/tgstation.dme index 1b2cc0baa6876..18ddcaf4dec08 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -207,7 +207,6 @@ #include "code\datums\diseases\advance\symptoms\heal.dm" #include "code\datums\diseases\advance\symptoms\horrorfiredeath.dm" #include "code\datums\diseases\advance\symptoms\hothead.dm" -#include "code\datums\diseases\advance\symptoms\inert.dm" #include "code\datums\diseases\advance\symptoms\itching.dm" #include "code\datums\diseases\advance\symptoms\liggeritis.dm" #include "code\datums\diseases\advance\symptoms\mlady.dm" diff --git a/tgstation.int b/tgstation.int index 097a712d301c3..d5dfad364def9 100644 --- a/tgstation.int +++ b/tgstation.int @@ -1,6 +1,5 @@ // BEGIN_INTERNALS /* -DIR: code code\modules code\modules\admin code\modules\client AUTO_FILE_DIR: OFF MAP_ICON_TYPE: 0 */