mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-06 07:22:42 +00:00
Merge branch 'incremental_tg' r5067 into bs12_with_tgport
removed extraneous admin attack messages, temporarily disabled much moderator stuff (will be re-enabled in future updates) Conflicts: baystation12.dme code/__HELPERS/type2type.dm code/controllers/configuration.dm code/datums/datumvars.dm code/datums/helper_datums/getrev.dm code/defines/obj.dm code/game/gamemodes/events/black_hole.dm code/game/gamemodes/events/space_ninja.dm code/game/gamemodes/wizard/rightandwrong.dm code/game/jobs/job/captain.dm code/game/jobs/job/job.dm code/game/jobs/job_controller.dm code/game/machinery/bots/medbot.dm code/game/machinery/computer/card.dm code/game/machinery/telecomms/traffic_control.dm code/game/machinery/turrets.dm code/game/machinery/wishgranter.dm code/game/objects/items/blueprints.dm code/game/objects/items/devices/uplinks.dm code/game/objects/items/stacks/stack.dm code/game/objects/items/weapons/surgery_tools.dm code/game/turfs/turf.dm code/game/verbs/ooc.dm code/global.dm code/modules/admin/IsBanned.dm code/modules/admin/admin.dm code/modules/admin/admin_memo.dm code/modules/admin/admin_verbs.dm code/modules/admin/holder2.dm code/modules/admin/player_panel.dm code/modules/admin/verbs/adminpm.dm code/modules/admin/verbs/diagnostics.dm code/modules/assembly/igniter.dm code/modules/client/client defines.dm code/modules/client/client procs.dm code/modules/clothing/spacesuits/miscellaneous.dm code/modules/clothing/suits/armor.dm code/modules/clothing/suits/jobs.dm code/modules/mining/mine_turfs.dm code/modules/mob/living/carbon/human/say.dm code/modules/mob/living/carbon/human/update_icons.dm code/modules/mob/living/living.dm code/modules/mob/living/living_defense.dm code/modules/mob/living/silicon/robot/emote.dm code/modules/mob/living/silicon/robot/life.dm code/modules/mob/mob_cleanup.dm code/modules/mob/new_player/new_player.dm code/modules/mob/new_player/preferences.dm code/modules/paperwork/paper.dm code/modules/paperwork/photocopier.dm code/modules/projectiles/guns/projectile/automatic.dm code/modules/reagents/Chemistry-Machinery.dm code/setup.dm code/stylesheet.dm code/world.dm config/admins.txt config/config.txt html/changelog.html icons/mob/items_lefthand.dmi icons/mob/items_righthand.dmi icons/mob/suit.dmi icons/obj/clothing/suits.dmi icons/turf/areas.dmi Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -340,12 +340,13 @@ datum
|
||||
else R.reaction_obj(A, R.volume+volume_modifier)
|
||||
return
|
||||
|
||||
add_reagent(var/reagent, var/amount, var/data=null)
|
||||
add_reagent(var/reagent, var/amount, var/list/data=null)
|
||||
if(!isnum(amount)) return 1
|
||||
update_total()
|
||||
if(total_volume + amount > maximum_volume) amount = (maximum_volume - total_volume) //Doesnt fit in. Make it disappear. Shouldnt happen. Will happen.
|
||||
|
||||
for(var/A in reagent_list)
|
||||
|
||||
var/datum/reagent/R = A
|
||||
if (R.id == reagent)
|
||||
R.volume += amount
|
||||
@@ -355,28 +356,40 @@ datum
|
||||
// mix dem viruses
|
||||
if(R.id == "blood" && reagent == "blood")
|
||||
if(R.data && data)
|
||||
if(R.data && R.data["viruses"] || data && data["viruses"])
|
||||
var/list/this = R.data["viruses"]
|
||||
var/list/that = data["viruses"]
|
||||
this += that // combine the two
|
||||
|
||||
/* -- Turns out this code was buggy and unnecessary ---- Doohl
|
||||
for(var/datum/disease/D in this) // makes sure no two viruses are in the reagent at the same time
|
||||
for(var/datum/disease/d in this)//Something in here can cause an inf loop and I am tired so someone else will have to fix it.
|
||||
if(d != D)
|
||||
D.cure(0)
|
||||
*/
|
||||
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
|
||||
|
||||
handle_reactions()
|
||||
return 0
|
||||
|
||||
var/datum/reagent/D = chemical_reagents_list[reagent]
|
||||
if(D)
|
||||
|
||||
var/datum/reagent/R = new D.type()
|
||||
reagent_list += R
|
||||
R.holder = src
|
||||
R.volume = amount
|
||||
R.data = data
|
||||
SetViruses(R, data) // Includes setting data
|
||||
|
||||
//debug
|
||||
//world << "Adding data"
|
||||
//for(var/D in R.data)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
var/recharged = 0
|
||||
var/list/dispensable_reagents = list("hydrogen","lithium","carbon","nitrogen","oxygen","fluorine",
|
||||
"sodium","aluminum","silicon","phosphorus","sulfur","chlorine","potassium","iron",
|
||||
"copper","mercury","radium","water","ethanol","sugar","sacid","milk")
|
||||
"copper","mercury","radium","water","ethanol","sugar","sacid")
|
||||
|
||||
/obj/machinery/chem_dispenser/proc/recharge()
|
||||
if(stat & (BROKEN|NOPOWER)) return
|
||||
@@ -127,7 +127,7 @@
|
||||
if (amount > 100)
|
||||
amount = 100
|
||||
|
||||
for(var/mob/player)
|
||||
for(var/mob/player in player_list)
|
||||
if (player.machine == src && player.client)
|
||||
updateWindow(player)
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
user.drop_item()
|
||||
B.loc = src
|
||||
user << "You add the beaker to the machine!"
|
||||
for(var/mob/player)
|
||||
for(var/mob/player in player_list)
|
||||
if (player.machine == src && player.client)
|
||||
updateWindow(player)
|
||||
|
||||
@@ -185,9 +185,6 @@
|
||||
var/obj/item/weapon/storage/pill_bottle/loaded_pill_bottle = null
|
||||
var/mode = 0
|
||||
var/condi = 0
|
||||
var/bottlesprite = "1" //yes, strings
|
||||
var/pillsprite = "1"
|
||||
var/client/has_sprites = list()
|
||||
var/useramount = 30 // Last used amount
|
||||
|
||||
/obj/machinery/chem_master/New()
|
||||
@@ -247,7 +244,6 @@
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/chem_master/Topic(href, href_list)
|
||||
if(stat & (BROKEN|NOPOWER)) return
|
||||
if(usr.stat || usr.restrained()) return
|
||||
@@ -276,58 +272,42 @@
|
||||
dat += "<TITLE>Condimaster 3000</TITLE>Condiment infos:<BR><BR>Name:<BR>[href_list["name"]]<BR><BR>Description:<BR>[href_list["desc"]]<BR><BR><BR><A href='?src=\ref[src];main=1'>(Back)</A>"
|
||||
usr << browse(dat, "window=chem_master;size=575x400")
|
||||
return
|
||||
else if (href_list["add1"])
|
||||
|
||||
/*
|
||||
(this fixes a pretty serious exploit) ~~ Doohl
|
||||
R.remove_reagent(href_list["add1"], 1) //Remove/add used instead of trans_to since we're moving a specific reagent.
|
||||
reagents.add_reagent(href_list["add1"], 1)
|
||||
*/
|
||||
else if (href_list["add"])
|
||||
|
||||
R.trans_id_to(src, href_list["add1"], 1)
|
||||
if(href_list["amount"])
|
||||
var/id = href_list["add"]
|
||||
var/amount = text2num(href_list["amount"])
|
||||
R.trans_id_to(src, id, amount)
|
||||
|
||||
else if (href_list["add5"])
|
||||
R.trans_id_to(src, href_list["add5"], 5)
|
||||
else if (href_list["add10"])
|
||||
R.trans_id_to(src, href_list["add10"], 10)
|
||||
else if (href_list["addall"])
|
||||
var/temp_amt = R.get_reagent_amount(href_list["addall"])
|
||||
R.trans_id_to(src, href_list["addall"], temp_amt)
|
||||
else if (href_list["addcustom"])
|
||||
|
||||
var/id = href_list["addcustom"]
|
||||
useramount = input("Select the amount to transfer.", 30, useramount) as num
|
||||
useramount = isgoodnumber(useramount)
|
||||
var/realamount = R.get_reagent_amount(id)
|
||||
R.trans_id_to(src, href_list["addcustom"], realamount)
|
||||
src.Topic(null, list("amount" = "[useramount]", "add" = "[id]"))
|
||||
|
||||
else if (href_list["remove"])
|
||||
|
||||
if(href_list["amount"])
|
||||
var/id = href_list["remove"]
|
||||
var/amount = text2num(href_list["amount"])
|
||||
if(mode)
|
||||
reagents.trans_id_to(beaker, id, amount)
|
||||
else
|
||||
reagents.remove_reagent(id, amount)
|
||||
|
||||
|
||||
else if (href_list["remove1"])
|
||||
reagents.remove_reagent(href_list["remove1"], 1)
|
||||
if(mode) R.add_reagent(href_list["remove1"], 1)
|
||||
else if (href_list["remove5"])
|
||||
reagents.remove_reagent(href_list["remove5"], 5)
|
||||
if(mode) R.add_reagent(href_list["remove5"], 5)
|
||||
else if (href_list["remove10"])
|
||||
reagents.remove_reagent(href_list["remove10"], 10)
|
||||
if(mode) R.add_reagent(href_list["remove10"], 10)
|
||||
else if (href_list["removeall"])
|
||||
if(mode)
|
||||
var/temp_amt = reagents.get_reagent_amount(href_list["removeall"])
|
||||
R.add_reagent(href_list["removeall"], temp_amt)
|
||||
reagents.del_reagent(href_list["removeall"])
|
||||
else if (href_list["removecustom"])
|
||||
|
||||
var/id = href_list["removecustom"]
|
||||
useramount = input("Select the amount to transfer.", 30, useramount) as num
|
||||
useramount = isgoodnumber(useramount)
|
||||
reagents.remove_reagent(id, useramount)
|
||||
if(mode) R.add_reagent(id, useramount)
|
||||
src.Topic(null, list("amount" = "[useramount]", "remove" = "[id]"))
|
||||
|
||||
else if (href_list["toggle"])
|
||||
if(mode)
|
||||
mode = 0
|
||||
else
|
||||
mode = 1
|
||||
mode = !mode
|
||||
|
||||
else if (href_list["main"])
|
||||
attack_hand(usr)
|
||||
return
|
||||
@@ -350,7 +330,6 @@
|
||||
P.name = "[name] pill"
|
||||
P.pixel_x = rand(-7, 7) //random position
|
||||
P.pixel_y = rand(-7, 7)
|
||||
P.icon_state = "pill"+pillsprite
|
||||
reagents.trans_to(P,50)
|
||||
|
||||
else if (href_list["createbottle"])
|
||||
@@ -361,33 +340,11 @@
|
||||
P.name = "[name] bottle"
|
||||
P.pixel_x = rand(-7, 7) //random position
|
||||
P.pixel_y = rand(-7, 7)
|
||||
P.icon_state = "bottle"+bottlesprite
|
||||
reagents.trans_to(P,30)
|
||||
else
|
||||
var/obj/item/weapon/reagent_containers/food/condiment/P = new/obj/item/weapon/reagent_containers/food/condiment(src.loc)
|
||||
reagents.trans_to(P,50)
|
||||
else if(href_list["change_pill"])
|
||||
#define MAX_PILL_SPRITE 20 //max icon state of the pill sprites
|
||||
var/dat = "<table>"
|
||||
for(var/i = 1 to MAX_PILL_SPRITE)
|
||||
dat += "<tr><td><a href=\"?src=\ref[src]&pill_sprite=[i]\"><img src=\"pill[i].png\" /></a></td></tr>"
|
||||
dat += "</table>"
|
||||
usr << browse(dat, "window=chem_master")
|
||||
return
|
||||
else if(href_list["change_bottle"])
|
||||
#define MAX_BOTTLE_SPRITE 20 //max icon state of the bottle sprites
|
||||
var/dat = "<table>"
|
||||
for(var/i = 1 to MAX_BOTTLE_SPRITE)
|
||||
dat += "<tr><td><a href=\"?src=\ref[src]&bottle_sprite=[i]\"><img src=\"bottle[i].png\" /></a></td></tr>"
|
||||
dat += "</table>"
|
||||
usr << browse(dat, "window=chem_master")
|
||||
return
|
||||
else if(href_list["pill_sprite"])
|
||||
pillsprite = href_list["pill_sprite"]
|
||||
else if(href_list["bottle_sprite"])
|
||||
bottlesprite = href_list["bottle_sprite"]
|
||||
else
|
||||
usr << browse(null, "window=chem_master")
|
||||
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
@@ -398,13 +355,6 @@
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/chem_master/attack_hand(mob/user as mob)
|
||||
if(!(user.client in has_sprites)) //yes, it's in three places, so they get downloaded even when they arent going to be shown, because they could be in the future
|
||||
spawn()
|
||||
has_sprites += user.client
|
||||
for(var/i = 1 to MAX_PILL_SPRITE)
|
||||
usr << browse_rsc(icon('chemical.dmi', "pill" + num2text(i)), "pill[i].png")
|
||||
for(var/i = 1 to MAX_BOTTLE_SPRITE)
|
||||
usr << browse_rsc(icon('chemical.dmi', "bottle" + num2text(i)), "bottle[i].png")
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
user.set_machine(src)
|
||||
@@ -430,29 +380,27 @@
|
||||
for(var/datum/reagent/G in R.reagent_list)
|
||||
dat += "[G.name] , [G.volume] Units - "
|
||||
dat += "<A href='?src=\ref[src];analyze=1;desc=[G.description];name=[G.name]'>(Analyze)</A> "
|
||||
dat += "<A href='?src=\ref[src];add1=[G.id]'>(1)</A> "
|
||||
if(G.volume >= 5) dat += "<A href='?src=\ref[src];add5=[G.id]'>(5)</A> "
|
||||
if(G.volume >= 10) dat += "<A href='?src=\ref[src];add10=[G.id]'>(10)</A> "
|
||||
dat += "<A href='?src=\ref[src];addall=[G.id]'>(All)</A> "
|
||||
dat += "<A href='?src=\ref[src];add=[G.id];amount=1'>(1)</A> "
|
||||
dat += "<A href='?src=\ref[src];add=[G.id];amount=5'>(5)</A> "
|
||||
dat += "<A href='?src=\ref[src];add=[G.id];amount=10'>(10)</A> "
|
||||
dat += "<A href='?src=\ref[src];add=[G.id];amount=[G.volume]'>(All)</A> "
|
||||
dat += "<A href='?src=\ref[src];addcustom=[G.id]'>(Custom)</A><BR>"
|
||||
if(!mode)
|
||||
dat += "<HR>Transfer to <A href='?src=\ref[src];toggle=1'>disposal:</A><BR>"
|
||||
else
|
||||
dat += "<HR>Transfer to <A href='?src=\ref[src];toggle=1'>beaker:</A><BR>"
|
||||
|
||||
dat += "<HR>Transfer to <A href='?src=\ref[src];toggle=1'>[(!mode ? "disposal" : "beaker")]:</A><BR>"
|
||||
if(reagents.total_volume)
|
||||
for(var/datum/reagent/N in reagents.reagent_list)
|
||||
dat += "[N.name] , [N.volume] Units - "
|
||||
dat += "<A href='?src=\ref[src];analyze=1;desc=[N.description];name=[N.name]'>(Analyze)</A> "
|
||||
dat += "<A href='?src=\ref[src];remove1=[N.id]'>(1)</A> "
|
||||
if(N.volume >= 5) dat += "<A href='?src=\ref[src];remove5=[N.id]'>(5)</A> "
|
||||
if(N.volume >= 10) dat += "<A href='?src=\ref[src];remove10=[N.id]'>(10)</A> "
|
||||
dat += "<A href='?src=\ref[src];removeall=[N.id]'>(All)</A> "
|
||||
dat += "<A href='?src=\ref[src];remove=[N.id];amount=1'>(1)</A> "
|
||||
dat += "<A href='?src=\ref[src];remove=[N.id];amount=5'>(5)</A> "
|
||||
dat += "<A href='?src=\ref[src];remove=[N.id];amount=10'>(10)</A> "
|
||||
dat += "<A href='?src=\ref[src];remove=[N.id];amount=[N.volume]'>(All)</A> "
|
||||
dat += "<A href='?src=\ref[src];removecustom=[N.id]'>(Custom)</A><BR>"
|
||||
else
|
||||
dat += "Empty<BR>"
|
||||
if(!condi)
|
||||
dat += "<HR><BR><A href='?src=\ref[src];createpill=1'>Create pill (50 units max)</A><a href=\"?src=\ref[src]&change_pill=1\"><img src=\"pill[pillsprite].png\" /></a><BR>"
|
||||
dat += "<A href='?src=\ref[src];createbottle=1'>Create bottle (30 units max)</A><a href=\"?src=\ref[src]&change_bottle=1\"><img src=\"bottle[bottlesprite].png\" /></a>"
|
||||
dat += "<HR><BR><A href='?src=\ref[src];createpill=1'>Create pill (50 units max)</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];createbottle=1'>Create bottle (30 units max)</A>"
|
||||
else
|
||||
dat += "<A href='?src=\ref[src];createbottle=1'>Create bottle (50 units max)</A>"
|
||||
if(!condi)
|
||||
@@ -528,12 +476,20 @@
|
||||
if(!src.wait)
|
||||
var/obj/item/weapon/reagent_containers/glass/bottle/B = new/obj/item/weapon/reagent_containers/glass/bottle(src.loc)
|
||||
if(B)
|
||||
var/vaccine_type = text2path(href_list["create_vaccine"])//the path is received as string - converting
|
||||
var/datum/disease/D = new vaccine_type
|
||||
var/path = href_list["create_vaccine"]
|
||||
var/vaccine_type = text2path(path)
|
||||
var/datum/disease/D = null
|
||||
|
||||
if(!vaccine_type)
|
||||
D = archive_diseases[path]
|
||||
vaccine_type = path
|
||||
else
|
||||
if(vaccine_type in diseases)
|
||||
D = new vaccine_type(0, null)
|
||||
|
||||
if(D)
|
||||
B.name = "[D.name] vaccine bottle"
|
||||
B.reagents.add_reagent("vaccine",15,vaccine_type)
|
||||
del(D)
|
||||
wait = 1
|
||||
var/datum/reagents/R = beaker.reagents
|
||||
var/datum/reagent/blood/Blood = null
|
||||
@@ -542,19 +498,25 @@
|
||||
Blood = L
|
||||
break
|
||||
var/list/res = Blood.data["resistances"]
|
||||
spawn(res.len*500)
|
||||
spawn(res.len*200)
|
||||
src.wait = null
|
||||
else
|
||||
src.temphtml = "The replicator is not ready yet."
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
/*
|
||||
else if (href_list["create_virus_culture"])
|
||||
if(!wait)
|
||||
var/obj/item/weapon/reagent_containers/glass/bottle/B = new/obj/item/weapon/reagent_containers/glass/bottle(src.loc)
|
||||
B.icon_state = "bottle3"
|
||||
var/type = text2path(href_list["create_virus_culture"])//the path is received as string - converting
|
||||
var/datum/disease/D = new type
|
||||
var/datum/disease/D = null
|
||||
if(!type)
|
||||
var/datum/disease/advance/A = archive_diseases[href_list["create_virus_culture"]]
|
||||
if(A)
|
||||
D = new A.type(0, A)
|
||||
else
|
||||
if(type in diseases) // Make sure this is a disease
|
||||
D = new type(0, null)
|
||||
var/list/data = list("viruses"=list(D))
|
||||
var/name = sanitize(input(usr,"Name:","Name the culture",D.name))
|
||||
if(!name || name == " ") name = D.name
|
||||
@@ -563,13 +525,12 @@
|
||||
B.reagents.add_reagent("blood",20,data)
|
||||
src.updateUsrDialog()
|
||||
wait = 1
|
||||
spawn(2000)
|
||||
spawn(1000)
|
||||
src.wait = null
|
||||
else
|
||||
src.temphtml = "The replicator is not ready yet."
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
*/
|
||||
else if (href_list["empty_beaker"])
|
||||
beaker.reagents.clear_reagents()
|
||||
src.updateUsrDialog()
|
||||
@@ -584,6 +545,20 @@
|
||||
src.temphtml = ""
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
else if(href_list["name_disease"])
|
||||
var/new_name = stripped_input(usr, "Name the Disease", "New Name", "", MAX_NAME_LEN)
|
||||
if(stat & (NOPOWER|BROKEN)) return
|
||||
if(usr.stat || usr.restrained()) return
|
||||
if(!in_range(src, usr)) return
|
||||
var/id = 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 active_diseases)
|
||||
AD.Refresh()
|
||||
src.updateUsrDialog()
|
||||
|
||||
|
||||
else
|
||||
usr << browse(null, "window=pandemic")
|
||||
src.updateUsrDialog()
|
||||
@@ -619,6 +594,8 @@
|
||||
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>"
|
||||
@@ -631,20 +608,51 @@
|
||||
for(var/datum/disease/D in Blood.data["viruses"])
|
||||
if(!D.hidden[PANDEMIC])
|
||||
|
||||
dat += "<b>Disease Agent:</b> [D?"[D.agent]":"none"]<BR>"
|
||||
|
||||
var/disease_creation = D.type
|
||||
if(istype(D, /datum/disease/advance))
|
||||
|
||||
var/datum/disease/advance/A = D
|
||||
D = archive_diseases[A.GetDiseaseID()]
|
||||
disease_creation = A.GetDiseaseID()
|
||||
if(D.name == "Unknown")
|
||||
dat += "<b><a href='?src=\ref[src];name_disease=[A.GetDiseaseID()]'>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=[disease_creation]'>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||"none")]<BR>"
|
||||
dat += "<b>Possible cure:</b> [(D.cure||"none")]<BR><BR>"
|
||||
|
||||
dat += "<b>Contains antibodies to:</b> "
|
||||
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)
|
||||
|
||||
|
||||
dat += "<BR><b>Contains antibodies to:</b> "
|
||||
if(Blood.data["resistances"])
|
||||
var/list/res = Blood.data["resistances"]
|
||||
if(res.len)
|
||||
dat += "<ul>"
|
||||
for(var/type in Blood.data["resistances"])
|
||||
var/datum/disease/DR = new type
|
||||
dat += "<li>[DR.name] - <A href='?src=\ref[src];create_vaccine=[type]'>Create vaccine bottle</A></li>"
|
||||
del(DR)
|
||||
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=[type]'>Create vaccine bottle</A></li>"
|
||||
dat += "</ul><BR>"
|
||||
else
|
||||
dat += "nothing<BR>"
|
||||
@@ -657,6 +665,7 @@
|
||||
onclose(user, "pandemic")
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/computer/pandemic/attackby(var/obj/I as obj, var/mob/user as mob)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
@@ -827,7 +836,7 @@
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/interact(mob/user as mob) // The microwave Menu
|
||||
/obj/machinery/reagentgrinder/interact(mob/user as mob) // The microwave Menu
|
||||
var/is_chamber_empty = 0
|
||||
var/is_beaker_ready = 0
|
||||
var/processing_chamber = ""
|
||||
|
||||
@@ -13,7 +13,7 @@ datum
|
||||
var/description = ""
|
||||
var/datum/reagents/holder = null
|
||||
var/reagent_state = SOLID
|
||||
var/data = null
|
||||
var/list/data = null
|
||||
var/volume = 0
|
||||
var/nutriment_factor = 0
|
||||
//var/list/viruses = list()
|
||||
@@ -100,15 +100,16 @@ datum
|
||||
reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
|
||||
var/datum/reagent/blood/self = src
|
||||
src = null
|
||||
for(var/datum/disease/D in self.data["viruses"])
|
||||
var/datum/disease/virus = new D.type
|
||||
// We don't spread.
|
||||
if(virus.spread_type == SPECIAL || virus.spread_type == NON_CONTAGIOUS) continue
|
||||
if(self.data && self.data["viruses"])
|
||||
for(var/datum/disease/D in self.data["viruses"])
|
||||
//var/datum/disease/virus = new D.type(0, D, 1)
|
||||
// We don't spread.
|
||||
if(D.spread_type == SPECIAL || D.spread_type == NON_CONTAGIOUS) continue
|
||||
|
||||
if(method == TOUCH)
|
||||
M.contract_disease(virus)
|
||||
else //injected
|
||||
M.contract_disease(virus, 1, 0)
|
||||
if(method == TOUCH)
|
||||
M.contract_disease(D)
|
||||
else //injected
|
||||
M.contract_disease(D, 1, 0)
|
||||
|
||||
if(self.data["virus2"])
|
||||
if(method == TOUCH)
|
||||
@@ -124,17 +125,6 @@ datum
|
||||
if (M:virus2) if((self.data["antibodies"] & M:virus2.antigen) && prob(10))
|
||||
M:virus2.dead = 1
|
||||
|
||||
/*
|
||||
if(self.data["virus"])
|
||||
var/datum/disease/V = self.data["virus"]
|
||||
if(M.resistances.Find(V.type)) return
|
||||
if(method == TOUCH)//respect all protective clothing...
|
||||
M.contract_disease(V)
|
||||
else //injected
|
||||
M.contract_disease(V, 1, 0)
|
||||
return
|
||||
*/
|
||||
|
||||
|
||||
reaction_turf(var/turf/simulated/T, var/volume)//splash the blood all over the place
|
||||
if(!istype(T)) return
|
||||
@@ -149,7 +139,7 @@ datum
|
||||
blood_prop.blood_DNA[self.data["blood_DNA"]] = self.data["blood_type"]
|
||||
|
||||
for(var/datum/disease/D in self.data["viruses"])
|
||||
var/datum/disease/newVirus = new D.type
|
||||
var/datum/disease/newVirus = new D.type(D)
|
||||
blood_prop.viruses += newVirus
|
||||
newVirus.holder = blood_prop
|
||||
|
||||
@@ -160,7 +150,7 @@ datum
|
||||
blood_prop = new(T)
|
||||
blood_prop.blood_DNA["Non-Human DNA"] = "A+"
|
||||
for(var/datum/disease/D in self.data["viruses"])
|
||||
var/datum/disease/newVirus = new D.type
|
||||
var/datum/disease/newVirus = new D.type(D)
|
||||
blood_prop.viruses += newVirus
|
||||
newVirus.holder = blood_prop
|
||||
|
||||
@@ -177,7 +167,7 @@ datum
|
||||
blood_prop = new(T)
|
||||
blood_prop.blood_DNA["UNKNOWN DNA STRUCTURE"] = "X*"
|
||||
for(var/datum/disease/D in self.data["viruses"])
|
||||
var/datum/disease/newVirus = new D.type
|
||||
var/datum/disease/newVirus = new D.type(D)
|
||||
blood_prop.viruses += newVirus
|
||||
newVirus.holder = blood_prop
|
||||
/*
|
||||
@@ -208,8 +198,13 @@ datum
|
||||
src = null
|
||||
if(self.data&&method == INGEST)
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if(D.type == self.data)
|
||||
D.cure()
|
||||
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
|
||||
|
||||
@@ -478,6 +478,55 @@ datum
|
||||
new /obj/item/stack/sheet/plasma(location)
|
||||
return
|
||||
|
||||
virus_food
|
||||
name = "Virus Food"
|
||||
id = "virusfood"
|
||||
result = "virusfood"
|
||||
required_reagents = list("water" = 5, "milk" = 5, "oxygen" = 5)
|
||||
result_amount = 15
|
||||
|
||||
mix_virus
|
||||
name = "Mix Virus"
|
||||
id = "mixvirus"
|
||||
result = "blood"
|
||||
required_reagents = list("blood" = 1, "virusfood" = 5)
|
||||
result_amount = 1
|
||||
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))
|
||||
|
||||
holder.del_reagent(id)
|
||||
|
||||
mix_virus_2
|
||||
|
||||
name = "Mix Virus 2"
|
||||
id = "mixvirus2"
|
||||
required_reagents = list("blood" = 1, "mutagen" = 5)
|
||||
level = 4
|
||||
|
||||
rem_virus
|
||||
|
||||
name = "Devolve Virus"
|
||||
id = "remvirus"
|
||||
required_reagents = list("blood" = 1, "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()
|
||||
holder.del_reagent(id)
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// foam and foam precursor
|
||||
|
||||
@@ -46,12 +46,8 @@
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [src.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]</font>")
|
||||
|
||||
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
|
||||
log_admin("ATTACK: [user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])")
|
||||
msg_admin_attack("ATTACK: [user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") //BS12 EDIT ALG
|
||||
|
||||
if(reagents.total_volume)
|
||||
reagents.reaction(M, INGEST)
|
||||
spawn(5)
|
||||
|
||||
@@ -48,9 +48,6 @@
|
||||
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
|
||||
log_admin("ATTACK: [user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])")
|
||||
msg_admin_attack("ATTACK: [user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") //BS12 EDIT ALG
|
||||
|
||||
if(reagents.total_volume)
|
||||
reagents.reaction(M, INGEST)
|
||||
spawn(5)
|
||||
|
||||
@@ -101,10 +101,6 @@
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been smashed with a bottle by [user.name] ([user.ckey])</font>")
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [target.name] with a bottle. ([target.ckey])</font>")
|
||||
|
||||
log_admin("ATTACK: [user.name] ([user.ckey]) attacked [target.name] with a bottle. ([target.ckey])")
|
||||
msg_admin_attack("ATTACK: [user.name] ([user.ckey]) attacked [target.name] with a bottle. ([target.ckey])") //BS12 EDIT ALG
|
||||
|
||||
|
||||
//The reagents in the bottle splash all over the target, thanks for the idea Nodrak
|
||||
if(src.reagents)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
|
||||
@@ -67,9 +67,6 @@
|
||||
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
|
||||
log_admin("ATTACK: [user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])")
|
||||
msg_admin_attack("ATTACK: [user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") //BS12 EDIT ALG
|
||||
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message("\red [user] feeds [M] [src].", 1)
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
icon_state = "bottle3"
|
||||
New()
|
||||
..()
|
||||
var/datum/disease/F = new /datum/disease/flu(0)
|
||||
var/datum/disease/F = new /datum/disease/advance/flu(0)
|
||||
var/list/data = list("viruses"= list(F))
|
||||
reagents.add_reagent("blood", 20, data)
|
||||
|
||||
@@ -126,7 +126,18 @@
|
||||
icon_state = "bottle3"
|
||||
New()
|
||||
..()
|
||||
var/datum/disease/F = new /datum/disease/cold(0)
|
||||
var/datum/disease/advance/F = new /datum/disease/advance/cold(0)
|
||||
var/list/data = list("viruses"= list(F))
|
||||
reagents.add_reagent("blood", 20, data)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/random
|
||||
name = "Random culture bottle"
|
||||
desc = "A small bottle. Contains a random disease."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle3"
|
||||
New()
|
||||
..()
|
||||
var/datum/disease/advance/F = new(0)
|
||||
var/list/data = list("viruses"= list(F))
|
||||
reagents.add_reagent("blood", 20, data)
|
||||
|
||||
|
||||
@@ -37,8 +37,6 @@
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to inject [M.name] ([M.ckey])</font>")
|
||||
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) injected [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
log_admin("ATTACK: [user.name] ([user.ckey]) injected [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])")
|
||||
msg_admin_attack("ATTACK: [user.name] ([user.ckey]) injected [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") //BS12 EDIT ALG
|
||||
|
||||
src.reagents.reaction(M, INGEST)
|
||||
if(M.reagents)
|
||||
|
||||
@@ -63,13 +63,8 @@
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [M.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]</font>")
|
||||
|
||||
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
|
||||
|
||||
log_admin("ATTACK: [user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])")
|
||||
msg_admin_attack("ATTACK: [user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") //BS12 EDIT ALG
|
||||
|
||||
|
||||
if(reagents.total_volume)
|
||||
reagents.reaction(M, INGEST)
|
||||
spawn(5)
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
B.data["viruses"] = list()
|
||||
|
||||
|
||||
B.data["viruses"] += new D.type
|
||||
B.data["viruses"] += new D.type(0, D, 1)
|
||||
|
||||
if(T.virus2)
|
||||
B.data["virus2"] = T.virus2.getcopy()
|
||||
|
||||
@@ -78,16 +78,10 @@
|
||||
user.attack_log += "\[[time_stamp()]\] <b>[user]/[user.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>syringegun</b> ([R])"
|
||||
log_attack("<font color='red'>[user] ([user.ckey]) shot [M] ([M.ckey]) with a syringegun ([R])</font>")
|
||||
|
||||
log_admin("ATTACK: [user] ([user.ckey]) shot [M] ([M.ckey]) with a syringegun ([R])")
|
||||
msg_admin_attack("ATTACK: [user] ([user.ckey]) shot [M] ([M.ckey]) with a syringegun ([R])") //BS12 EDIT ALG
|
||||
|
||||
else
|
||||
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[M]/[M.ckey]</b> with a <b>syringegun</b> ([R])"
|
||||
log_attack("<font color='red'>UNKNOWN shot [M] ([M.ckey]) with a <b>syringegun</b> ([R])</font>")
|
||||
|
||||
log_admin("ATTACK: UNKNOWN shot [M] ([M.ckey]) with a <b>syringegun</b> ([R])")
|
||||
msg_admin_attack("ATTACK: UNKNOWN shot [M] ([M.ckey]) with a <b>syringegun</b> ([R])") //BS12 EDIT ALG
|
||||
|
||||
if(D.reagents)
|
||||
D.reagents.trans_to(M, 15)
|
||||
M.take_organ_damage(5)
|
||||
|
||||
Reference in New Issue
Block a user