mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Merge branch 'master' of https://github.com/Baystation12/Baystation12 into xenoarch
Conflicts: baystation12.dme code/modules/reagents/Chemistry-Recipes.dm code/modules/research/xenoarchaeology/misc.dm Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -109,9 +109,25 @@ datum
|
||||
trans_data = current_reagent.data
|
||||
if(current_reagent.id == "blood" && ishuman(target)) // can never be sure
|
||||
var/mob/living/carbon/human/H = target
|
||||
H.vessel.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data)
|
||||
|
||||
var/datum/reagent/blood/HisBlood = locate() in H.vessel.reagent_list //Grab some blood
|
||||
if(HisBlood) // Make sure there's some blood at all
|
||||
if(HisBlood.data["donor"] != H) //If it's not theirs, then we look for theirs
|
||||
for(var/datum/reagent/blood/D in H.vessel.reagent_list)
|
||||
if(D.data["donor"] == H)
|
||||
HisBlood = D
|
||||
break
|
||||
if(HisBlood && HisBlood.data && trans_data)
|
||||
if(blood_incompatible(trans_data["blood_type"],HisBlood.data["blood_type"]))
|
||||
H.reagents.add_reagent("toxin",(current_reagent_transfer * multiplier * 0.5))
|
||||
H.reagents.update_total()
|
||||
else
|
||||
H.vessel.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data)
|
||||
H.vessel.update_total()
|
||||
else
|
||||
H.vessel.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data)
|
||||
H.vessel.update_total()
|
||||
src.remove_reagent(current_reagent.id, current_reagent_transfer)
|
||||
H.vessel.update_total()
|
||||
else
|
||||
R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data)
|
||||
src.remove_reagent(current_reagent.id, current_reagent_transfer)
|
||||
|
||||
@@ -186,6 +186,9 @@
|
||||
var/mode = 0
|
||||
var/condi = 0
|
||||
var/useramount = 30 // Last used amount
|
||||
var/bottlesprite = "1" //yes, strings
|
||||
var/pillsprite = "1"
|
||||
var/client/has_sprites = list()
|
||||
|
||||
/obj/machinery/chem_master/New()
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
@@ -267,7 +270,18 @@
|
||||
if (href_list["analyze"])
|
||||
var/dat = ""
|
||||
if(!condi)
|
||||
dat += "<TITLE>Chemmaster 3000</TITLE>Chemical 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>"
|
||||
if(href_list["name"] == "Blood")
|
||||
var/datum/reagent/blood/G
|
||||
for(var/datum/reagent/F in R.reagent_list)
|
||||
if(F.name == href_list["name"])
|
||||
G = F
|
||||
break
|
||||
var/A = G.name
|
||||
var/B = G.data["blood_type"]
|
||||
var/C = G.data["blood_DNA"]
|
||||
dat += "<TITLE>Chemmaster 3000</TITLE>Chemical infos:<BR><BR>Name:<BR>[A]<BR><BR>Description:<BR>Blood Type: [B]<br>DNA: [C]<BR><BR><BR><A href='?src=\ref[src];main=1'>(Back)</A>"
|
||||
else
|
||||
dat += "<TITLE>Chemmaster 3000</TITLE>Chemical 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>"
|
||||
else
|
||||
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")
|
||||
@@ -319,19 +333,13 @@
|
||||
icon_state = "mixer0"
|
||||
else if (href_list["createpill"])
|
||||
var/name = reject_bad_text(input(usr,"Name:","Name your pill!",reagents.get_master_reagent_name()))
|
||||
var/obj/item/weapon/reagent_containers/pill/P
|
||||
|
||||
if(loaded_pill_bottle && loaded_pill_bottle.contents.len < loaded_pill_bottle.storage_slots)
|
||||
P = new/obj/item/weapon/reagent_containers/pill(loaded_pill_bottle)
|
||||
else
|
||||
P = new/obj/item/weapon/reagent_containers/pill(src.loc)
|
||||
|
||||
var/obj/item/weapon/reagent_containers/pill/P = new/obj/item/weapon/reagent_containers/pill(src.loc)
|
||||
if(!name) name = reagents.get_master_reagent_name()
|
||||
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"])
|
||||
if(!condi)
|
||||
var/name = reject_bad_text(input(usr,"Name:","Name your bottle!",reagents.get_master_reagent_name()))
|
||||
@@ -340,10 +348,31 @@
|
||||
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"]
|
||||
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
@@ -358,6 +387,13 @@
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
user.set_machine(src)
|
||||
if(!(user.client in has_sprites))
|
||||
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")
|
||||
var/dat = ""
|
||||
if(!beaker)
|
||||
dat = "Please insert beaker.<BR>"
|
||||
@@ -399,8 +435,8 @@
|
||||
else
|
||||
dat += "Empty<BR>"
|
||||
if(!condi)
|
||||
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>"
|
||||
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 href=\"?src=\ref[src]&change_bottle=1\"><img src=\"bottle[bottlesprite].png\" /></A>"
|
||||
else
|
||||
dat += "<A href='?src=\ref[src];createbottle=1'>Create bottle (50 units max)</A>"
|
||||
if(!condi)
|
||||
|
||||
@@ -113,6 +113,12 @@ datum
|
||||
M.contract_disease(D)
|
||||
else //injected
|
||||
M.contract_disease(D, 1, 0)
|
||||
if(self.data && self.data["virus2"])
|
||||
if(method == TOUCH)
|
||||
infect_virus2(M,self.data["virus2"])
|
||||
else
|
||||
infect_virus2(M,self.data["virus2"],1)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -921,6 +927,20 @@ datum
|
||||
..()
|
||||
return
|
||||
|
||||
tramadol
|
||||
name = "Tramadol"
|
||||
id = "tramadol"
|
||||
description = "A simple, yet effective painkiller."
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC"
|
||||
|
||||
oxycodone
|
||||
name = "Oxycodone"
|
||||
id = "oxycodone"
|
||||
description = "An effective and very addictive painkiller."
|
||||
reagent_state = LIQUID
|
||||
color = "#C805DC"
|
||||
|
||||
virus_food
|
||||
name = "Virus Food"
|
||||
id = "virusfood"
|
||||
@@ -1651,7 +1671,7 @@ datum
|
||||
description = "A highly addictive stimulant extracted from the tobacco plant."
|
||||
reagent_state = LIQUID
|
||||
color = "#181818" // rgb: 24, 24, 24
|
||||
|
||||
/*
|
||||
ethanol
|
||||
name = "Ethanol"
|
||||
id = "ethanol"
|
||||
@@ -1685,7 +1705,7 @@ datum
|
||||
else
|
||||
usr << "It wasn't enough..."
|
||||
return
|
||||
|
||||
*/
|
||||
ammonia
|
||||
name = "Ammonia"
|
||||
id = "ammonia"
|
||||
@@ -1740,7 +1760,7 @@ datum
|
||||
if(2 to 50)
|
||||
M.sleeping += 1
|
||||
if(51 to INFINITY)
|
||||
M.sleeping += 1
|
||||
M.sleeping += 1
|
||||
..()
|
||||
|
||||
return
|
||||
@@ -2593,7 +2613,7 @@ datum
|
||||
if(A.data) d += A.data
|
||||
|
||||
M.dizziness +=dizzy_adj.
|
||||
if(d >= slur_start && d < confused_start)
|
||||
if(d >= slur_start && d < pass_out)
|
||||
if (!M:slurring) M:slurring = 1
|
||||
M:slurring += slurr_adj
|
||||
if(d >= confused_start && prob(33))
|
||||
@@ -3205,12 +3225,12 @@ datum
|
||||
M.dizziness +=5
|
||||
return
|
||||
|
||||
erikasurprise
|
||||
name = "Erika Surprise"
|
||||
id = "erikasurprise"
|
||||
description = "The surprise is, it's green!"
|
||||
reagent_state = LIQUID
|
||||
color = "#2E6671" // rgb: 46, 102, 113
|
||||
erikasurprise
|
||||
name = "Erika Surprise"
|
||||
id = "erikasurprise"
|
||||
description = "The surprise is, it's green!"
|
||||
reagent_state = LIQUID
|
||||
color = "#2E6671" // rgb: 46, 102, 113
|
||||
|
||||
irishcarbomb
|
||||
name = "Irish Car Bomb"
|
||||
|
||||
@@ -480,7 +480,6 @@ datum
|
||||
var/location = get_turf(holder.my_atom)
|
||||
new /obj/item/stack/sheet/mineral/plasma(location)
|
||||
return
|
||||
|
||||
virus_food
|
||||
name = "Virus Food"
|
||||
id = "virusfood"
|
||||
@@ -525,6 +524,14 @@ datum
|
||||
var/datum/disease/advance/D = locate(/datum/disease/advance) in B.data["viruses"]
|
||||
if(D)
|
||||
D.Devolve()
|
||||
|
||||
condensedcapsaicin
|
||||
name = "Condensed Capsaicin"
|
||||
id = "condensedcapsaicin"
|
||||
result = "condensedcapsaicin"
|
||||
required_reagents = list("capsaicin" = 2)
|
||||
required_catalysts = list("plasma" = 5)
|
||||
result_amount = 1
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// foam and foam precursor
|
||||
|
||||
@@ -196,6 +196,13 @@
|
||||
if(sattisfaction_text)
|
||||
M.emote("[sattisfaction_text]")
|
||||
del(src)
|
||||
if(ismouse(M))
|
||||
var/mob/living/simple_animal/mouse/N = M
|
||||
N << text("\blue You nibble away at [src].")
|
||||
if(prob(50))
|
||||
N.visible_message("[N] nibbles away at [src].", "")
|
||||
//N.emote("nibbles away at the [src]")
|
||||
N.health = min(N.health + 1, N.maxHealth)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user