Merge branch 'master' into upstream-merge-32161

This commit is contained in:
LetterJay
2017-11-11 23:02:13 -06:00
committed by GitHub
625 changed files with 27981 additions and 20284 deletions
@@ -62,11 +62,13 @@
/obj/machinery/chem_master/attackby(obj/item/I, mob/user, params)
if(default_deconstruction_screwdriver(user, "mixer0_nopower", "mixer0", I))
if(beaker)
beaker.loc = src.loc
beaker.forceMove(drop_location())
adjust_item_drop_location(beaker)
beaker = null
reagents.clear_reagents()
if(bottle)
bottle.loc = src.loc
bottle.forceMove(drop_location())
adjust_item_drop_location(bottle)
bottle = null
return
@@ -153,7 +155,8 @@
switch(action)
if("eject")
if(beaker)
beaker.loc = src.loc
beaker.forceMove(drop_location())
adjust_item_drop_location(beaker)
beaker = null
reagents.clear_reagents()
icon_state = "mixer0"
@@ -161,7 +164,8 @@
if("ejectp")
if(bottle)
bottle.loc = src.loc
bottle.forceMove(drop_location())
adjust_item_drop_location(bottle)
bottle = null
. = TRUE
@@ -214,16 +218,15 @@
if(bottle && bottle.contents.len < bottle.storage_slots)
P = new/obj/item/reagent_containers/pill(bottle)
else
P = new/obj/item/reagent_containers/pill(src.loc)
P = new/obj/item/reagent_containers/pill(drop_location())
P.name = trim("[name] pill")
P.pixel_x = rand(-7, 7) //random position
P.pixel_y = rand(-7, 7)
adjust_item_drop_location(P)
reagents.trans_to(P,vol_each)
else
var/name = stripped_input(usr, "Name:", "Name your pack!", reagents.get_master_reagent_name(), MAX_NAME_LEN)
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, be_close=TRUE))
return
var/obj/item/reagent_containers/food/condiment/pack/P = new/obj/item/reagent_containers/food/condiment/pack(src.loc)
var/obj/item/reagent_containers/food/condiment/pack/P = new/obj/item/reagent_containers/food/condiment/pack(drop_location())
P.originalname = name
P.name = trim("[name] pack")
@@ -248,10 +251,9 @@
var/obj/item/reagent_containers/pill/P
for(var/i = 0; i < amount; i++)
P = new/obj/item/reagent_containers/pill/patch(src.loc)
P = new/obj/item/reagent_containers/pill/patch(drop_location())
P.name = trim("[name] patch")
P.pixel_x = rand(-7, 7) //random position
P.pixel_y = rand(-7, 7)
adjust_item_drop_location(P)
reagents.trans_to(P,vol_each)
. = TRUE
@@ -264,7 +266,7 @@
var/name = stripped_input(usr, "Name:","Name your bottle!", (reagents.total_volume ? reagents.get_master_reagent_name() : " "), MAX_NAME_LEN)
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, be_close=TRUE))
return
var/obj/item/reagent_containers/food/condiment/P = new(src.loc)
var/obj/item/reagent_containers/food/condiment/P = new(drop_location())
P.originalname = name
P.name = trim("[name] bottle")
reagents.trans_to(P, P.volume)
@@ -280,15 +282,15 @@
var/obj/item/reagent_containers/glass/bottle/P
for(var/i = 0; i < amount_full; i++)
P = new/obj/item/reagent_containers/glass/bottle(src.loc)
P.pixel_x = rand(-7, 7) //random position
P.pixel_y = rand(-7, 7)
P = new/obj/item/reagent_containers/glass/bottle(drop_location())
P.name = trim("[name] bottle")
adjust_item_drop_location(P)
reagents.trans_to(P, 30)
if(vol_part)
P = new/obj/item/reagent_containers/glass/bottle(src.loc)
P = new/obj/item/reagent_containers/glass/bottle(drop_location())
P.name = trim("[name] bottle")
adjust_item_drop_location(P)
reagents.trans_to(P, vol_part)
. = TRUE
@@ -328,6 +330,29 @@
return 0
/obj/machinery/chem_master/adjust_item_drop_location(atom/movable/AM) // Special version for chemmasters and condimasters
if (AM == beaker)
AM.pixel_x = -8
AM.pixel_y = 8
return null
else if (AM == bottle)
if (length(bottle.contents))
AM.pixel_x = -13
else
AM.pixel_x = -7
AM.pixel_y = -8
return null
else
var/md5 = md5(AM.name)
#if DM_VERSION > 511
#warn Refactor the loop in /obj/machinery/chem_master/adjust_item_drop_location() to make use of 512's list-like access to characters in a string
#endif
for (var/i in 1 to 32)
. += hex2num(copytext(md5,i,i+1))
. = . % 9
AM.pixel_x = ((.%3)*6)
AM.pixel_y = -8 + (round( . / 3)*8)
/obj/machinery/chem_master/condimaster
name = "CondiMaster 3000"
desc = "Used to create condiments and other cooking supplies."
@@ -1,6 +1,6 @@
/obj/machinery/smoke_machine
name = "Smoke Machine"
desc = "Seriously man?"
name = "smoke machine"
desc = "A machine with a centrifuge installed into it. It produces smoke with any reagents you put into the machine."
icon = 'icons/obj/chemical.dmi'
icon_state = "smoke0"
density = TRUE
@@ -11,9 +11,9 @@
var/cooldown = 0
var/screen = "home"
var/useramount = 30 // Last used amount
var/volume = 1000
var/volume = 300
var/setting = 3
var/list/possible_settings = list(3,6,9,12,15)
var/list/possible_settings = list(3,6,9)
/datum/effect_system/smoke_spread/chem/smoke_machine/set_up(datum/reagents/carry, setting = 3, efficiency = 10, loc)
amount = setting
@@ -66,7 +66,7 @@
/obj/machinery/smoke_machine/attackby(obj/item/I, mob/user, params)
add_fingerprint(user)
if(istype(I, /obj/item/reagent_containers))
if(istype(I, /obj/item/reagent_containers) && I.is_open_container())
var/obj/item/reagent_containers/RC = I
var/units = RC.reagents.trans_to(src, RC.amount_per_transfer_from_this)
if(units)
@@ -1175,10 +1175,10 @@
M.AdjustUnconscious(-20, 0)
M.adjustStaminaLoss(-0.5*REM, 0)
/datum/reagent/browngas
name = "Brown gas"
id = "brown_gas"
description = "A strange brown gas that makes you feel faster"
/datum/reagent/nitryl
name = "Nitryl"
id = "no2"
description = "A highly reactive gas that makes you feel faster"
reagent_state = GAS
metabolization_rate = REAGENTS_METABOLISM
color = "90560B"
@@ -199,7 +199,6 @@ Borg Shaker
to_chat(usr, "<span class='warning'>It is currently empty! Please allow some time for the synthesizer to produce more.</span>")
/obj/item/reagent_containers/borghypo/borgshaker/hacked
..()
name = "cyborg shaker"
desc = "Will mix drinks that knock them dead."
icon = 'icons/obj/drinks.dmi'
@@ -73,8 +73,8 @@
list_reagents = list("chloralhydrate" = 15)
/obj/item/reagent_containers/glass/bottle/charcoal
name = "antitoxin bottle"
desc = "A small bottle of charcoal."
name = "charcoal bottle"
desc = "A small bottle of charcoal, which removes toxins and other chemicals from the bloodstream."
list_reagents = list("charcoal" = 30)
/obj/item/reagent_containers/glass/bottle/mutagen
@@ -217,7 +217,7 @@
list_reagents = list("silver_sulfadiazine" = 50)
/obj/item/reagent_containers/glass/beaker/large/charcoal
name = "antitoxin reserve tank"
name = "charcoal reserve tank"
list_reagents = list("charcoal" = 50)
/obj/item/reagent_containers/glass/beaker/large/epinephrine