Merge branch 'master' into upstream-merge-26760

This commit is contained in:
LetterJay
2017-05-14 01:02:26 -04:00
committed by GitHub
531 changed files with 5863 additions and 3439 deletions
+1 -1
View File
@@ -396,7 +396,7 @@
remove_reagent(B, (multiplier * cached_required_reagents[B]), safety = 1)
for(var/P in C.results)
feedback_add_details("chemical_reaction", "[P]|[cached_results[P]*multiplier]")
SSblackbox.add_details("chemical_reaction", "[P]|[cached_results[P]*multiplier]")
multiplier = max(multiplier, 1) //this shouldnt happen ...
add_reagent(P, cached_results[P]*multiplier, null, chem_temp)
@@ -10,7 +10,7 @@
active_power_usage = 100
pass_flags = PASSTABLE
resistance_flags = ACID_PROOF
var/operating = 0
var/operating = FALSE
var/obj/item/weapon/reagent_containers/beaker = null
var/limit = 10
var/list/blend_items = list (
@@ -38,7 +38,7 @@
/obj/item/weapon/reagent_containers/food/snacks/grown/wheat = list("flour" = -5),
/obj/item/weapon/reagent_containers/food/snacks/grown/oat = list("flour" = -5),
/obj/item/weapon/reagent_containers/food/snacks/grown/rice = list("rice" = -5),
/obj/item/weapon/reagent_containers/food/snacks/donut/New = list("sprinkles" = -2, "sugar" = 1),
/obj/item/weapon/reagent_containers/food/snacks/donut = list("sprinkles" = -2, "sugar" = 1),
/obj/item/weapon/reagent_containers/food/snacks/grown/cherries = list("cherryjelly" = 0),
/obj/item/weapon/reagent_containers/food/snacks/grown/bluecherries = list("bluecherryjelly" = 0),
/obj/item/weapon/reagent_containers/food/snacks/egg = list("eggyolk" = -5),
@@ -220,9 +220,12 @@
[processing_chamber]<br>
[beaker_contents]<hr>
"}
if (is_beaker_ready && !is_chamber_empty && !(stat & (NOPOWER|BROKEN)))
dat += "<A href='?src=\ref[src];action=grind'>Grind the reagents</a><BR>"
dat += "<A href='?src=\ref[src];action=juice'>Juice the reagents</a><BR><BR>"
if (is_beaker_ready)
if(!is_chamber_empty && !(stat & (NOPOWER|BROKEN)))
dat += "<A href='?src=\ref[src];action=grind'>Grind the reagents</a><BR>"
dat += "<A href='?src=\ref[src];action=juice'>Juice the reagents</a><BR><BR>"
else if (beaker.reagents.total_volume)
dat += "<A href='?src=\ref[src];action=mix'>Mix the reagents</a><BR><BR>"
if(holdingitems && holdingitems.len > 0)
dat += "<A href='?src=\ref[src];action=eject'>Eject the reagents</a><BR>"
if (beaker)
@@ -248,6 +251,8 @@
grind()
if("juice")
juice()
if("mix")
mix()
if("eject")
eject()
if ("detach")
@@ -327,11 +332,11 @@
playsound(src.loc, 'sound/machines/juicer.ogg', 20, 1)
var/offset = prob(50) ? -2 : 2
animate(src, pixel_x = pixel_x + offset, time = 0.2, loop = 250) //start shaking
operating = 1
operating = TRUE
updateUsrDialog()
spawn(50)
pixel_x = initial(pixel_x) //return to its spot after shaking
operating = 0
operating = FALSE
updateUsrDialog()
//Snacks
@@ -365,11 +370,11 @@
playsound(src.loc, 'sound/machines/blender.ogg', 50, 1)
var/offset = prob(50) ? -2 : 2
animate(src, pixel_x = pixel_x + offset, time = 0.2, loop = 250) //start shaking
operating = 1
operating = TRUE
updateUsrDialog()
spawn(60)
pixel_x = initial(pixel_x) //return to its spot after shaking
operating = 0
operating = FALSE
updateUsrDialog()
//Snacks and Plants
@@ -467,3 +472,33 @@
break
beaker.reagents.add_reagent(r_id, min(O.reagent_contents[r_id], space))
remove_object(O)
/obj/machinery/reagentgrinder/proc/mix()
//For butter and other things that would change upon shaking or mixing
power_change()
if(stat & (NOPOWER|BROKEN))
return
if (!beaker)
return
playsound(src.loc, 'sound/machines/juicer.ogg', 20, 1)
var/offset = prob(50) ? -2 : 2
animate(src, pixel_x = pixel_x + offset, time = 0.2, loop = 250) //start shaking
operating = TRUE
updateUsrDialog()
addtimer(CALLBACK(src, /obj/machinery/reagentgrinder/proc/mix_complete), 50)
/obj/machinery/reagentgrinder/proc/mix_complete()
pixel_x = initial(pixel_x) //return to its spot after shaking
operating = FALSE
updateUsrDialog()
if (beaker.reagents.total_volume)
//Recipe to make Butter
while(beaker.reagents.get_reagent_amount("milk") >= 15)
beaker.reagents.remove_reagent("milk", 15)
new /obj/item/weapon/reagent_containers/food/snacks/butter(src.loc)
//Recipe to make Mayonnaise
if (beaker.reagents.has_reagent("eggyolk"))
var/amount = beaker.reagents.get_reagent_amount("eggyolk")
beaker.reagents.remove_reagent("eggyolk", amount)
beaker.reagents.add_reagent("mayonnaise", amount)
@@ -966,7 +966,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "Only for the experienced. You think you see sand floating in the glass."
/datum/reagent/consumable/ethanol/bananahonk
name = "Banana Mama"
name = "Banana Honk"
id = "bananahonk"
description = "A drink from Clown Heaven."
nutriment_factor = 1 * REAGENTS_METABOLISM
@@ -60,7 +60,10 @@
// data for nutriment is one or more (flavour -> ratio)
// where all the ratio values adds up to 1
var/list/taste_amounts = data.Copy()
var/list/taste_amounts = list()
if(data)
taste_amounts = data.Copy()
counterlist_scale(taste_amounts, volume)
var/list/other_taste_amounts = newdata.Copy()
@@ -524,6 +527,12 @@
M.heal_bodypart_damage(3,1)
..()
/datum/reagent/consumable/mayonnaise
name = "Mayonnaise"
id = "mayonnaise"
description = "An white and oily mixture of mixed egg yolks."
color = "#DFDFDF"
taste_description = "mayonnaise"
////Lavaland Flora Reagents////
@@ -288,30 +288,43 @@
/datum/reagent/medicine/salglu_solution
name = "Saline-Glucose Solution"
id = "salglu_solution"
description = "Has a 33% chance per metabolism cycle to heal brute and burn damage. Can be used as a blood substitute on an IV drip."
description = "Has a 33% chance per metabolism cycle to heal brute and burn damage. Can be used as a temporary blood substitute."
reagent_state = LIQUID
color = "#DCDCDC"
metabolization_rate = 0.5 * REAGENTS_METABOLISM
overdose_threshold = 60
taste_description = "sweetness and salt"
var/last_added = 0
var/maximum_reachable = BLOOD_VOLUME_NORMAL - 10 //So that normal blood regeneration can continue with salglu active
/datum/reagent/medicine/salglu_solution/on_mob_life(mob/living/M)
if(last_added)
M.blood_volume -= last_added
last_added = 0
if(M.blood_volume < maximum_reachable) //Can only up to double your effective blood level.
var/amount_to_add = min(M.blood_volume, volume*5)
var/new_blood_level = min(M.blood_volume + amount_to_add, maximum_reachable)
last_added = new_blood_level - M.blood_volume
M.blood_volume = new_blood_level
if(prob(33))
M.adjustBruteLoss(-0.5*REM, 0)
M.adjustFireLoss(-0.5*REM, 0)
if(iscarbon(M))
var/mob/living/carbon/C = M
C.blood_volume += 0.2
. = 1
..()
/datum/reagent/medicine/salglu_solution/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1)
if(ishuman(M) && method == INJECT)
var/mob/living/carbon/human/H = M
if(H.dna && !(NOBLOOD in H.dna.species.species_traits))
var/efficiency = (BLOOD_VOLUME_NORMAL-H.blood_volume)/700 + 0.2//The lower the blood of the patient, the better it is as a blood substitute.
efficiency = Clamp(efficiency, 0.1, 0.75)
//As it's designed for an IV drip, make large injections not as effective as repeated small injections.
H.blood_volume += round(efficiency * min(5,reac_volume), 0.1)
/datum/reagent/medicine/salglu_solution/overdose_process(mob/living/M)
if(prob(3))
to_chat(M, "<span class = 'warning'>You feel salty.</span>")
holder.add_reagent("sodiumchloride", 1)
holder.remove_reagent("salglu_solution", 0.5)
else if(prob(3))
to_chat(M, "<span class = 'warning'>You feel sweet.</span>")
holder.add_reagent("sugar", 1)
holder.remove_reagent("salglu_solution", 0.5)
if(prob(33))
M.adjustBruteLoss(0.5*REM, 0)
M.adjustFireLoss(0.5*REM, 0)
. = 1
..()
/datum/reagent/medicine/mine_salve
@@ -334,10 +347,9 @@
/datum/reagent/medicine/mine_salve/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1)
if(iscarbon(M) && M.stat != DEAD)
if(method in list(INGEST, VAPOR, INJECT))
M.Stun(4)
M.Weaken(4)
M.nutrition -= 5
if(show_message)
to_chat(M, "<span class='warning'>Your stomach agonizingly cramps!</span>")
to_chat(M, "<span class='warning'>Your stomach feels empty and cramps!</span>")
else
var/mob/living/carbon/C = M
for(var/s in C.surgeries)
@@ -949,8 +961,7 @@
/datum/reagent/medicine/antitoxin/on_mob_life(mob/living/M)
M.adjustToxLoss(-2*REM, 0)
for(var/datum/reagent/toxin/R in M.reagents.reagent_list)
if(R != src)
M.reagents.remove_reagent(R.id,1)
M.reagents.remove_reagent(R.id,1)
..()
. = 1
@@ -189,7 +189,7 @@
/datum/reagent/water/holywater/on_mob_life(mob/living/M)
if(!data) data = 1
data++
M.jitteriness = max(M.jitteriness-5,0)
M.jitteriness = min(M.jitteriness+4,10)
if(data >= 30) // 12 units, 54 seconds @ metabolism 0.4 units & tick rate 1.8 sec
if(!M.stuttering)
M.stuttering = 1
@@ -212,9 +212,9 @@
SSticker.mode.remove_cultist(M.mind, 1, 1)
else if(is_servant_of_ratvar(M))
remove_servant_of_ratvar(M)
holder.remove_reagent(id, volume) // maybe this is a little too perfect and a max() cap on the statuses would be better??
M.jitteriness = 0
M.stuttering = 0
holder.remove_reagent(id, volume) // maybe this is a little too perfect and a max() cap on the statuses would be better??
return
holder.remove_reagent(id, 0.4) //fixed consumption to prevent balancing going out of whack
@@ -658,7 +658,7 @@
taste_mult = 0 // apparently tasteless.
/datum/reagent/mercury/on_mob_life(mob/living/M)
if(M.canmove && isspaceturf(M.loc))
if(M.canmove && !isspaceturf(M.loc))
step(M, pick(GLOB.cardinal))
if(prob(5))
M.emote(pick("twitch","drool","moan"))
@@ -738,7 +738,7 @@
taste_description = "metal"
/datum/reagent/lithium/on_mob_life(mob/living/M)
if(M.canmove && isspaceturf(M.loc))
if(M.canmove && !isspaceturf(M.loc))
step(M, pick(GLOB.cardinal))
if(prob(5))
M.emote(pick("twitch","drool","moan"))
@@ -1533,7 +1533,9 @@
/datum/reagent/romerol/on_mob_life(mob/living/carbon/human/H)
// Silently add the zombie infection organ to be activated upon death
new /obj/item/organ/zombie_infection(H)
if(!H.getorganslot("zombie_infection"))
var/obj/item/organ/zombie_infection/ZI = new()
ZI.Insert(H)
..()
/datum/reagent/growthserum
@@ -1568,6 +1570,13 @@
M.update_transform()
..()
/datum/reagent/plastic_polymers
name = "plastic polymers"
id = "plastic_polymers"
description = "the petroleum based components of plastic."
color = "#f7eded"
taste_description = "plastic"
/datum/reagent/glitter
name = "generic glitter"
id = "glitter"
@@ -648,6 +648,34 @@
M.losebreath += 5
return ..()
/datum/reagent/toxin/spewium
name = "Spewium"
id = "spewium"
description = "A powerful emetic, causes uncontrollable vomiting. May result in vomiting organs at high doses."
reagent_state = LIQUID
color = "#2f6617" //A sickly green color
metabolization_rate = REAGENTS_METABOLISM
overdose_threshold = 29
toxpwr = 0
taste_description = "vomit"
/datum/reagent/toxin/spewium/on_mob_life(mob/living/M)
.=..()
if(current_cycle >=11 && prob(min(50,current_cycle)) && ishuman(M))
var/mob/living/carbon/human/H = M
H.vomit(lost_nutrition = 10, blood = prob(10), stun = prob(50), distance = rand(0,4), message = TRUE, toxic = prob(30))
for(var/datum/reagent/toxin/R in M.reagents.reagent_list)
if(R != src)
H.reagents.remove_reagent(R.id,1)
/datum/reagent/toxin/spewium/overdose_process(mob/living/M)
. = ..()
if(current_cycle >=33 && prob(15) && ishuman(M))
var/mob/living/carbon/human/H = M
H.spew_organ()
H.vomit(lost_nutrition = 0, blood = 1, stun = 1, distance = 4)
to_chat(H, "<span class='userdanger'>You feel something lumpy come up as you vomit.</span>")
/datum/reagent/toxin/curare
name = "Curare"
id = "curare"
@@ -624,3 +624,14 @@
id = "laughter"
results = list("laughter" = 10) // Fuck it. I'm not touching this one.
required_reagents = list("sugar" = 1, "banana" = 1)
/datum/chemical_reaction/plastic_polymers
name = "plastic polymers"
id = "plastic_polymers"
required_reagents = list("oil" = 5, "sodiumchloride" = 2, "ash" = 3)
required_temp = 374 //lazily consistent with soap & other crafted objects generically created with heat.
/datum/chemical_reaction/plastic_polymers/on_reaction(datum/reagents/holder, created_volume)
var/location = get_turf(holder.my_atom)
for(var/i in 1 to 10)
new /obj/item/stack/sheet/plastic(location)
@@ -3,7 +3,7 @@
var/deletes_extract = TRUE
/datum/chemical_reaction/slime/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
SSblackbox.add_details("slime_cores_used","[type]")
if(deletes_extract)
delete_extract(holder)
@@ -478,26 +478,15 @@
..()
//Adamantine
/datum/chemical_reaction/slime/slimegolem
name = "Slime Golem"
id = "m_golem"
/datum/chemical_reaction/slime/adamantine
name = "Adamantine"
id = "adamantine"
required_reagents = list("plasma" = 1)
required_container = /obj/item/slime_extract/adamantine
required_other = 1
/datum/chemical_reaction/slime/slimegolem/on_reaction(datum/reagents/holder)
new /obj/effect/golemrune(get_turf(holder.my_atom))
..()
/datum/chemical_reaction/slime/slimegolem2
name = "Slime Golem 2"
id = "m_golem2"
required_reagents = list("iron" = 1)
required_container = /obj/item/slime_extract/adamantine
required_other = 1
/datum/chemical_reaction/slime/slimegolem2/on_reaction(datum/reagents/holder)
new /obj/item/golem_shell/artificial(get_turf(holder.my_atom))
/datum/chemical_reaction/slime/adamantine/on_reaction(datum/reagents/holder)
new /obj/item/stack/sheet/mineral/adamantine(get_turf(holder.my_atom))
..()
//Bluespace
@@ -58,6 +58,12 @@
icon_state = "bottle12"
list_reagents = list("cyanide" = 30)
/obj/item/weapon/reagent_containers/glass/bottle/spewium
name = "spewium bottle"
desc = "A small bottle of spewium."
icon_state = "bottle12"
list_reagents = list("spewium" = 30)
/obj/item/weapon/reagent_containers/glass/bottle/morphine
name = "morphine bottle"
desc = "A small bottle of morphine."