Merge remote-tracking branch 'bay12-upstream/master' into development

This commit is contained in:
skull132
2016-10-07 00:58:39 +03:00
1594 changed files with 53994 additions and 48590 deletions
+65 -72
View File
@@ -1,3 +1,5 @@
#define PROCESS_REACTION_ITER 5 //when processing a reaction, iterate this many times
/datum/reagents
var/list/datum/reagent/reagent_list = list()
var/total_volume = 0
@@ -5,6 +7,7 @@
var/atom/my_atom = null
/datum/reagents/New(var/max = 100, atom/A = null)
..()
maximum_volume = max
my_atom = A
@@ -19,33 +22,11 @@
continue
chemical_reagents_list[D.id] = D
if(!chemical_reactions_list)
//Chemical Reactions - Initialises all /datum/chemical_reaction into a list
// It is filtered into multiple lists within a list.
// For example:
// chemical_reaction_list["phoron"] is a list of all reactions relating to phoron
var/paths = typesof(/datum/chemical_reaction) - /datum/chemical_reaction
chemical_reactions_list = list()
for(var/path in paths)
var/datum/chemical_reaction/D = new path()
var/list/reaction_ids = list()
if(D.required_reagents && D.required_reagents.len)
for(var/reaction in D.required_reagents)
reaction_ids += reaction
// Create filters based on each reagent id in the required reagents list
for(var/id in reaction_ids)
if(!chemical_reactions_list[id])
chemical_reactions_list[id] = list()
chemical_reactions_list[id] += D
break // Don't bother adding ourselves to other reagent ids, it is redundant.
/datum/reagents/Destroy()
..()
if(chemistryProcess)
chemistryProcess.active_holders -= src
for(var/datum/reagent/R in reagent_list)
qdel(R)
reagent_list.Cut()
@@ -105,55 +86,43 @@
my_atom.reagents = null
/datum/reagents/proc/handle_reactions()
if(chemistryProcess)
chemistryProcess.mark_for_update(src)
//returns 1 if the holder should continue reactiong, 0 otherwise.
/datum/reagents/proc/process_reactions()
if(!my_atom) // No reactions in temporary holders
return
return 0
if(!my_atom.loc) //No reactions inside GC'd containers
return 0
if(my_atom.flags & NOREACT) // No reactions here
return
var/reaction_occured = 0
do
return 0
var/reaction_occured
var/list/effect_reactions = list()
var/list/eligible_reactions = list()
for(var/i in 1 to PROCESS_REACTION_ITER)
reaction_occured = 0
//need to rebuild this to account for chain reactions
for(var/datum/reagent/R in reagent_list)
for(var/datum/chemical_reaction/C in chemical_reactions_list[R.id])
var/reagents_suitable = 1
for(var/B in C.required_reagents)
if(!has_reagent(B, C.required_reagents[B]))
reagents_suitable = 0
for(var/B in C.catalysts)
if(!has_reagent(B, C.catalysts[B]))
reagents_suitable = 0
for(var/B in C.inhibitors)
if(has_reagent(B, C.inhibitors[B]))
reagents_suitable = 0
if(!reagents_suitable || !C.can_happen(src))
continue
var/use = -1
for(var/B in C.required_reagents)
if(use == -1)
use = get_reagent_amount(B) / C.required_reagents[B]
else
use = min(use, get_reagent_amount(B) / C.required_reagents[B])
var/newdata = C.send_data(src) // We need to get it before reagents are removed. See blood paint.
for(var/B in C.required_reagents)
remove_reagent(B, use * C.required_reagents[B], safety = 1)
if(C.result)
add_reagent(C.result, C.result_amount * use, newdata)
if(!ismob(my_atom) && C.mix_message)
var/list/seen = viewers(4, get_turf(my_atom))
for(var/mob/M in seen)
M << "<span class='notice'>\icon[my_atom] [C.mix_message]</span>"
playsound(get_turf(my_atom), 'sound/effects/bubbles.ogg', 80, 1)
C.on_reaction(src, C.result_amount * use)
eligible_reactions |= chemical_reactions_list[R.id]
for(var/datum/chemical_reaction/C in eligible_reactions)
if(C.can_happen(src) && C.process(src))
effect_reactions |= C
reaction_occured = 1
while(reaction_occured)
eligible_reactions.Cut()
if(!reaction_occured)
break
for(var/datum/chemical_reaction/C in effect_reactions)
C.post_reaction(src)
update_total()
return
return reaction_occured
/* Holder-to-chemical */
@@ -225,6 +194,24 @@
return 0
return 0
/datum/reagents/proc/has_any_reagent(var/list/check_reagents)
for(var/datum/reagent/current in reagent_list)
if(current.id in check_reagents)
if(current.volume >= check_reagents[current.id])
return 1
else
return 0
return 0
/datum/reagents/proc/has_all_reagents(var/list/check_reagents)
//this only works if check_reagents has no duplicate entries... hopefully okay since it expects an associative list
var/missing = check_reagents.len
for(var/datum/reagent/current in reagent_list)
if(current.id in check_reagents)
if(current.volume >= check_reagents[current.id])
missing--
return !missing
/datum/reagents/proc/clear_reagents()
for(var/datum/reagent/current in reagent_list)
del_reagent(current.id)
@@ -305,9 +292,15 @@
return trans_to_obj(target, amount, multiplier, copy)
return 0
//Using this in case we want to differentiate splashing an atom from transferring reagents to it later down the road.
//For now it just calls trans_to.
/datum/reagents/proc/splash(var/atom/target, var/amount = 1, var/multiplier = 1, var/copy = 0)
//Splashing reagents is messier than trans_to, the target's loc gets some of the reagents as well.
/datum/reagents/proc/splash(var/atom/target, var/amount = 1, var/multiplier = 1, var/copy = 0, var/min_spill=0, var/max_spill=60)
var/spill = 0
if(!isturf(target) && target.loc)
spill = amount*(rand(min_spill, max_spill)/100)
amount -= spill
if(spill)
splash(target.loc, spill, multiplier, copy, min_spill, max_spill)
trans_to(target, amount, multiplier, copy)
/datum/reagents/proc/trans_id_to(var/atom/target, var/id, var/amount = 1)
@@ -419,4 +412,4 @@
/* Atom reagent creation - use it all the time */
/atom/proc/create_reagents(var/max_vol)
reagents = new/datum/reagents(max_vol, src)
reagents = new/datum/reagents(max_vol, src)
+6 -23
View File
@@ -45,14 +45,6 @@
qdel(src)
return
/obj/machinery/chem_master/blob_act()
if (prob(50))
qdel(src)
/obj/machinery/chem_master/meteorhit()
qdel(src)
return
/obj/machinery/chem_master/attackby(var/obj/item/weapon/B as obj, var/mob/user as mob)
if(istype(B, /obj/item/weapon/reagent_containers/glass))
@@ -119,21 +111,21 @@
if(href_list["amount"])
var/id = href_list["add"]
var/amount = isgoodnumber(text2num(href_list["amount"]))
var/amount = Clamp((text2num(href_list["amount"])), 0, 200)
R.trans_id_to(src, id, amount)
else if (href_list["addcustom"])
var/id = href_list["addcustom"]
useramount = input("Select the amount to transfer.", 30, useramount) as num
useramount = isgoodnumber(useramount)
useramount = Clamp(useramount, 0, 200)
src.Topic(null, list("amount" = "[useramount]", "add" = "[id]"))
else if (href_list["remove"])
if(href_list["amount"])
var/id = href_list["remove"]
var/amount = isgoodnumber(text2num(href_list["amount"]))
var/amount = Clamp((text2num(href_list["amount"])), 0, 200)
if(mode)
reagents.trans_id_to(beaker, id, amount)
else
@@ -144,7 +136,7 @@
var/id = href_list["removecustom"]
useramount = input("Select the amount to transfer.", 30, useramount) as num
useramount = isgoodnumber(useramount)
useramount = Clamp(useramount, 0, 200)
src.Topic(null, list("amount" = "[useramount]", "remove" = "[id]"))
else if (href_list["toggle"])
@@ -166,11 +158,8 @@
return
if (href_list["createpill_multiple"])
count = isgoodnumber(input("Select the number of pills to make.", 10, pillamount) as num)
//used to be clamp, but seemed to be forcing the call of create_pill 3 times
if(count > max_pill_count) //instead we'll just manually check it the pill count - Ryan784
count = max_pill_count
count = input("Select the number of pills to make.", "Max [max_pill_count]", pillamount) as num
count = Clamp(count, 1, max_pill_count)
if(reagents.total_volume/count < 1) //Sanity checking.
return
@@ -299,12 +288,6 @@
onclose(user, "chem_master")
return
/obj/machinery/chem_master/proc/isgoodnumber(var/num)
if(isnum(num))
return Clamp(round(num), 0, 200)
else
return 0
/obj/machinery/chem_master/condimaster
name = "CondiMaster 3000"
condi = 1
+3 -3
View File
@@ -127,7 +127,7 @@ About the Holder:
trans_to_obj(var/turf/target, var/amount = 1, var/multiplier = 1, var/copy = 0)
If target has reagents, transfers [amount] to it. Otherwise, same as trans_to_turf().
/atom/proc/create_reagents(var/max_vol)
atom/proc/create_reagents(var/max_vol)
Creates a new reagent datum.
About Reagents:
@@ -285,7 +285,7 @@ About the Tools:
By default, all atom have a reagents var - but its empty. if you want to use an object for the chem.
system you'll need to add something like this in its new proc:
/atom/proc/create_reagents(var/max_volume)
atom/proc/create_reagents(var/max_volume)
Other important stuff:
@@ -302,4 +302,4 @@ About the Tools:
transfer code since you will not be able to use the standard
tools to manipulate it.
*/
*/
@@ -1,3 +1,15 @@
//Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id
/proc/initialize_chemical_reagents()
var/paths = typesof(/datum/reagent) - /datum/reagent
chemical_reagents_list = list()
for(var/path in paths)
var/datum/reagent/D = new path()
if(!D.name)
continue
chemical_reagents_list[D.id] = D
/datum/reagent
var/name = "Reagent"
var/id = "reagent"
@@ -70,6 +70,8 @@
infect_virus2(M, V.getcopy())
/datum/reagent/blood/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_MACHINE)
return
if(data && data["viruses"])
for(var/datum/disease/D in data["viruses"])
if(D.spread_type == SPECIAL || D.spread_type == NON_CONTAGIOUS)
@@ -194,6 +196,7 @@
description = "Required for welders. Flamable."
reagent_state = LIQUID
color = "#660000"
touch_met = 5
glass_icon_state = "dr_gibb_glass"
glass_name = "glass of welder fuel"
@@ -1,3 +1,31 @@
/datum/reagent/acetone
name = "Acetone"
id = "acetone"
description = "A colorless liquid solvent used in chemical synthesis."
reagent_state = LIQUID
color = "#808080"
metabolism = REM * 0.2
/datum/reagent/acetone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
M.adjustToxLoss(removed * 3)
/datum/reagent/acetone/touch_obj(var/obj/O) //I copied this wholesale from ethanol and could likely be converted into a shared proc. ~Techhead
if(istype(O, /obj/item/weapon/paper))
var/obj/item/weapon/paper/paperaffected = O
paperaffected.clearpaper()
usr << "The solution dissolves the ink on the paper."
return
if(istype(O, /obj/item/weapon/book))
if(volume < 5)
return
if(istype(O, /obj/item/weapon/book/tome))
usr << "<span class='notice'>The solution does nothing. Whatever this is, it isn't normal ink.</span>"
return
var/obj/item/weapon/book/affectedbook = O
affectedbook.dat = null
usr << "<span class='notice'>The solution dissolves the ink on the book.</span>"
return
/datum/reagent/aluminum
name = "Aluminum"
id = "aluminum"
@@ -5,6 +33,20 @@
reagent_state = SOLID
color = "#A8A8A8"
/datum/reagent/ammonia
name = "Ammonia"
id = "ammonia"
description = "A caustic substance commonly used in fertilizer or household cleaners."
reagent_state = LIQUID
color = "#404030"
metabolism = REM * 0.5
/datum/reagent/ammonia/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_VOX)
M.adjustOxyLoss(-removed * 10)
else if(alien != IS_DIONA)
M.adjustToxLoss(removed * 1.5)
/datum/reagent/carbon
name = "Carbon"
id = "carbon"
@@ -32,19 +74,6 @@
else
dirtoverlay.alpha = min(dirtoverlay.alpha + volume * 30, 255)
/datum/reagent/chlorine
name = "Chlorine"
id = "chlorine"
description = "A chemical element with a characteristic odour."
reagent_state = GAS
color = "#808080"
/datum/reagent/chlorine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
M.take_organ_damage(1*REM, 0)
/datum/reagent/chlorine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
M.take_organ_damage(1*REM, 0)
/datum/reagent/copper
name = "Copper"
id = "copper"
@@ -121,25 +150,26 @@
usr << "<span class='notice'>The solution dissolves the ink on the book.</span>"
return
/datum/reagent/fluorine
name = "Fluorine"
id = "fluorine"
description = "A highly-reactive chemical element."
reagent_state = GAS
/datum/reagent/hydrazine
name = "Hydrazine"
id = "hydrazine"
description = "A toxic, colorless, flammable liquid with a strong ammonia-like odor, in hydrate form."
reagent_state = LIQUID
color = "#808080"
metabolism = REM * 0.2
touch_met = 5
/datum/reagent/fluorine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
M.adjustToxLoss(removed)
/datum/reagent/hydrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
M.adjustToxLoss(4 * removed)
/datum/reagent/fluorine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
M.adjustToxLoss(removed)
/datum/reagent/hydrazine/affect_touch(var/mob/living/carbon/M, var/alien, var/removed) // Hydrazine is both toxic and flammable.
M.adjust_fire_stacks(removed / 12)
M.adjustToxLoss(0.2 * removed)
/datum/reagent/hydrogen
name = "Hydrogen"
id = "hydrogen"
description = "A colorless, odorless, nonmetallic, tasteless, highly combustible diatomic gas."
reagent_state = GAS
color = "#808080"
/datum/reagent/hydrazine/touch_turf(var/turf/T)
new /obj/effect/decal/cleanable/liquid_fuel(T, volume)
remove_self(volume)
return
/datum/reagent/iron
name = "Iron"
@@ -181,28 +211,6 @@
M.emote(pick("twitch", "drool", "moan"))
M.adjustBrainLoss(2)
/datum/reagent/nitrogen
name = "Nitrogen"
id = "nitrogen"
description = "A colorless, odorless, tasteless gas."
reagent_state = GAS
color = "#808080"
/datum/reagent/nitrogen/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_VOX )
M.adjustOxyLoss(-removed * 3)
/datum/reagent/oxygen
name = "Oxygen"
id = "oxygen"
description = "A colorless, odorless gas."
reagent_state = GAS
color = "#808080"
/datum/reagent/oxygen/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_VOX|| M.get_species() == "Vaurca")
M.adjustToxLoss(removed * 3)
/datum/reagent/phosphorus
name = "Phosphorus"
id = "phosphorus"
@@ -232,7 +240,7 @@
if(prob(5))
M.antibodies |= V.antigen
if(prob(50))
M.radiation += 50 // curing it that way may kill you instead
M.apply_effect(50, IRRADIATE, check_protection = 0) // curing it that way may kill you instead
var/absorbed = 0
var/obj/item/organ/diona/nutrients/rad_organ = locate() in M.internal_organs
if(rad_organ && !rad_organ.is_broken())
@@ -333,6 +341,15 @@
qdel(O)
remove_self(meltdose) // 10 units of acid will not melt EVERYTHING on the tile
/datum/reagent/acid/hydrochloric //Like sulfuric, but less toxic and more acidic.
name = "Hydrochloric Acid"
id = "hclacid"
description = "A very corrosive mineral acid with the molecular formula HCl."
reagent_state = LIQUID
color = "#808080"
power = 3
meltdose = 8
/datum/reagent/silicon
name = "Silicon"
id = "silicon"
@@ -78,7 +78,13 @@
return
..()
/datum/reagent/nutriment/egg // Also bad for skrell. Not a child of protein because it might mess up, not sure.
/datum/reagent/nutriment/protein/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(alien && alien == IS_SKRELL)
M.adjustToxLoss(2 * removed)
return
..()
/datum/reagent/nutriment/protein/egg // Also bad for skrell.
name = "egg yolk"
id = "egg"
color = "#FFFFAA"
@@ -92,6 +98,13 @@
return
..()
/datum/reagent/nutriment/honey
name = "Honey"
id = "honey"
description = "A golden yellow syrup, loaded with sugary sweetness."
nutriment_factor = 10
color = "#FFFF00"
/datum/reagent/nutriment/flour
name = "flour"
id = "flour"
@@ -262,11 +275,11 @@
M.adjustToxLoss(0.5 * removed)
/datum/reagent/capsaicin/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_DIONA)
if(alien == IS_DIONA || alien == IS_MACHINE)
return
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.species && (H.species.flags & (NO_PAIN | IS_SYNTHETIC)))
if(H.species && (H.species.flags & (NO_PAIN)))
return
if(dose < agony_dose)
if(prob(5) || dose == metabolism) //dose == metabolism is a very hacky way of forcing the message the first time this procs
@@ -310,10 +323,10 @@
for(var/obj/item/I in protection)
if(I)
if(I.flags & MASKCOVERSEYES)
if(I.body_parts_covered & EYES)
eyes_covered = 1
eye_protection = I.name
if(I.flags & MASKCOVERSMOUTH)
if((I.body_parts_covered & FACE) && !(I.item_flags & FLEXIBLEMATERIAL))
mouth_covered = 1
face_protection = I.name
@@ -340,7 +353,20 @@
M.Stun(5)
M.Weaken(5)
M << message
/datum/reagent/condensedcapsaicin/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.species && (H.species.flags & NO_PAIN))
return
if(dose == metabolism)
M << "<span class='danger'>You feel like your insides are burning!</span>"
else
M.apply_effect(4, AGONY, 0)
if(prob(5))
M.visible_message("<span class='warning'>[M] [pick("dry heaves!","coughs!","splutters!")]</span>", "<span class='danger'>You feel like your insides are burning!</span>")
if(istype(M, /mob/living/carbon/slime))
M.bodytemperature += rand(15, 30)
holder.remove_reagent("frostoil", 5)
/* Drinks */
@@ -593,9 +619,12 @@
glass_desc = "Don't drop it, or you'll send scalding liquid and glass shards everywhere."
/datum/reagent/drink/coffee/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
if(alien == IS_DIONA)
return
..()
if(alien == IS_TAJARA)
M.adjustToxLoss(0.5 * removed)
M.make_jittery(4) //extra sensitive to caffine
if(adj_temp > 0)
holder.remove_reagent("frostoil", 10 * removed)
@@ -606,10 +635,19 @@
if(M.bodytemperature > 310)
M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
/datum/reagent/nutriment/coffee/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
..()
if(alien == IS_TAJARA)
M.adjustToxLoss(2 * removed)
M.make_jittery(4)
return
/datum/reagent/drink/coffee/overdose(var/mob/living/carbon/M, var/alien)
if(alien == IS_DIONA)
return
if(alien == IS_TAJARA)
M.adjustToxLoss(4 * REM)
M.apply_effect(3, STUTTER)
M.make_jittery(5)
/datum/reagent/drink/coffee/icecoffee
@@ -1038,7 +1076,39 @@
glass_desc = "A crystal clear glass of Griffeater gin."
glass_center_of_mass = list("x"=16, "y"=12)
/datum/reagent/ethanol/kahlua
//Base type for alchoholic drinks containing coffee
/datum/reagent/ethanol/coffee
overdose = 45
/datum/reagent/ethanol/coffee/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_DIONA)
return
..()
M.dizziness = max(0, M.dizziness - 5)
M.drowsyness = max(0, M.drowsyness - 3)
M.sleeping = max(0, M.sleeping - 2)
if(M.bodytemperature > 310)
M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
if(alien == IS_TAJARA)
M.adjustToxLoss(0.5 * removed)
M.make_jittery(4) //extra sensitive to caffine
/datum/reagent/ethanol/coffee/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_TAJARA)
M.adjustToxLoss(2 * removed)
M.make_jittery(4)
return
..()
/datum/reagent/ethanol/coffee/overdose(var/mob/living/carbon/M, var/alien)
if(alien == IS_DIONA)
return
if(alien == IS_TAJARA)
M.adjustToxLoss(4 * REM)
M.apply_effect(3, STUTTER)
M.make_jittery(5)
/datum/reagent/ethanol/coffee/kahlua
name = "Kahlua"
id = "kahlua"
description = "A widely known, Mexican coffee-flavoured liqueur. In production since 1936!"
@@ -1050,17 +1120,6 @@
glass_desc = "DAMN, THIS THING LOOKS ROBUST"
glass_center_of_mass = list("x"=15, "y"=7)
/datum/reagent/ethanol/kahlua/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
if(alien == IS_DIONA)
return
M.dizziness = max(0, M.dizziness - 5)
M.drowsyness = max(0, M.drowsyness - 3)
M.sleeping = max(0, M.sleeping - 2)
if(M.bodytemperature > 310)
M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
M.make_jittery(5)
/datum/reagent/ethanol/melonliquor
name = "Melon Liquor"
id = "melonliquor"
@@ -1156,7 +1215,7 @@
/datum/reagent/ethanol/vodka/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
M.radiation = max(M.radiation - 1 * removed, 0)
M.apply_effect(max(M.radiation - 1 * removed, 0), IRRADIATE, check_protection = 0)
/datum/reagent/ethanol/whiskey
name = "Whiskey"
@@ -1194,7 +1253,7 @@
glass_icon_state = "acidspitglass"
glass_name = "glass of Acid Spit"
glass_desc = "A drink from Nanotrasen. Made from live aliens."
glass_desc = "A drink from the company archives. Made from live aliens."
glass_center_of_mass = list("x"=16, "y"=7)
/datum/reagent/ethanol/alliescocktail
@@ -1224,7 +1283,7 @@
/datum/reagent/ethanol/amasec
name = "Amasec"
id = "amasec"
description = "Official drink of the NanoTrasen Gun-Club!"
description = "Official drink of the Gun Club!"
reagent_state = LIQUID
color = "#664300"
strength = 25
@@ -1271,10 +1330,10 @@
glass_icon_state = "atomicbombglass"
glass_name = "glass of Atomic Bomb"
glass_desc = "Nanotrasen cannot take legal responsibility for your actions after imbibing."
glass_desc = "We cannot take legal responsibility for your actions after imbibing."
glass_center_of_mass = list("x"=15, "y"=7)
/datum/reagent/ethanol/b52
/datum/reagent/ethanol/coffee/b52
name = "B-52"
id = "b52"
description = "Coffee, Irish Cream, and cognac. You will get bombed."
@@ -1385,7 +1444,7 @@
glass_name = "glass of Booger"
glass_desc = "Ewww..."
/datum/reagent/ethanol/brave_bull
/datum/reagent/ethanol/coffee/brave_bull
name = "Brave Bull"
id = "bravebull"
description = "It's just as effective as Dutch-Courage!"
@@ -1484,7 +1543,7 @@
/datum/reagent/ethanol/grog
name = "Grog"
id = "grog"
description = "Watered down rum, NanoTrasen approves!"
description = "Watered-down rum, pirate approved!"
reagent_state = LIQUID
color = "#664300"
strength = 10
@@ -1593,7 +1652,7 @@
glass_desc = "An irish car bomb."
glass_center_of_mass = list("x"=16, "y"=8)
/datum/reagent/ethanol/irishcoffee
/datum/reagent/ethanol/coffee/irishcoffee
name = "Irish Coffee"
id = "irishcoffee"
description = "Coffee, and alcohol. More fun than a Mimosa to drink in the morning."
@@ -208,23 +208,18 @@
/datum/reagent/water/holywater/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
..()
if (M.mind && M.mind.vampire)
var/datum/vampire/vampire = M.mind.vampire
vampire.frenzy += removed * 5
if(ishuman(M))
if (M.mind && M.mind.vampire)
var/datum/vampire/vampire = M.mind.vampire
vampire.frenzy += removed * 5
else if(M.mind && cult.is_antagonist(M.mind) && prob(10))
cult.remove_antagonist(M.mind)
/datum/reagent/water/holywater/touch_turf(var/turf/T)
if(volume >= 5)
T.holy = 1
return
/datum/reagent/ammonia
name = "Ammonia"
id = "ammonia"
description = "A caustic substance commonly used in fertilizer or household cleaners."
reagent_state = GAS
color = "#404030"
/datum/reagent/diethylamine
name = "Diethylamine"
id = "diethylamine"
@@ -232,10 +227,10 @@
reagent_state = LIQUID
color = "#604030"
/datum/reagent/fluorosurfactant // Foam precursor
name = "Fluorosurfactant"
id = "fluorosurfactant"
description = "A perfluoronated sulfonic acid that forms a foam when mixed with water."
/datum/reagent/surfactant // Foam precursor
name = "Azosurfactant"
id = "surfactant"
description = "A isocyanate liquid that forms a foam when mixed with water."
reagent_state = LIQUID
color = "#9E6B38"
@@ -330,7 +325,7 @@
return
if(volume >= 1)
T.wet_floor(2)
/datum/reagent/silicate
name = "Silicate"
id = "silicate"
@@ -48,7 +48,8 @@
description = "Phoron in its liquid form."
reagent_state = LIQUID
color = "#9D14DB"
strength = 4
strength = 30
touch_met = 5
/datum/reagent/toxin/phoron/touch_mob(var/mob/living/L, var/amount)
if(istype(L))
@@ -56,11 +57,13 @@
/datum/reagent/toxin/phoron/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
M.take_organ_damage(0, removed * 0.1) //being splashed directly with phoron causes minor chemical burns
if(prob(50))
M.pl_effects()
/datum/reagent/toxin/phoron/touch_turf(var/turf/simulated/T)
if(!istype(T))
return
T.assume_gas("volatile_fuel", volume, T20C)
T.assume_gas("phoron", volume, T20C)
remove_self(volume)
/datum/reagent/toxin/cyanide //Fast and Lethal
@@ -174,14 +177,10 @@
if(locate(/obj/effect/overlay/wallrot) in W)
for(var/obj/effect/overlay/wallrot/E in W)
qdel(E)
W.visible_message("<span class='notice'>The fungi are completely dissolved by the solution!")
W.visible_message("<span class='notice'>The fungi are completely dissolved by the solution!</span>")
/datum/reagent/toxin/plantbgone/touch_obj(var/obj/O, var/volume)
if(istype(O, /obj/effect/alien/weeds/))
var/obj/effect/alien/weeds/alien_weeds = O
alien_weeds.health -= rand(15, 35)
alien_weeds.healthcheck()
else if(istype(O, /obj/effect/plant))
if(istype(O, /obj/effect/plant))
qdel(O)
/datum/reagent/toxin/plantbgone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
@@ -234,6 +233,9 @@
affect_blood(M, alien, removed)
/datum/reagent/mutagen/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
var/mob/living/carbon/human/H = M
if(istype(H) && (H.species.flags & NO_SCAN))
return
if(M.dna)
if(prob(removed * 10)) // Approx. one mutation per 10 injected/20 ingested/30 touching units
M << "Something feels different about you..."
@@ -422,13 +424,12 @@
return
M.druggy = max(M.druggy, 30)
if(dose < 1)
M.stuttering = max(M.stuttering, 3)
M.dizziness = max(150, M.dizziness)
M.apply_effect(3, STUTTER)
M.make_dizzy(5)
if(prob(5))
M.emote(pick("twitch", "giggle"))
else if(dose < 2)
M.stuttering = max(M.stuttering, 3)
M.apply_effect(3, STUTTER)
M.make_jittery(5)
M.dizziness = max(150, M.dizziness)
M.make_dizzy(5)
@@ -436,7 +437,7 @@
if(prob(10))
M.emote(pick("twitch", "giggle"))
else
M.stuttering = max(M.stuttering, 3)
M.apply_effect(3, STUTTER)
M.make_jittery(10)
M.dizziness = max(150, M.dizziness)
M.make_dizzy(10)
@@ -475,10 +476,10 @@
color = "#13BC5E"
/datum/reagent/aslimetoxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) // TODO: check if there's similar code anywhere else
if(M.monkeyizing)
if(M.transforming)
return
M << "<span class='danger'>Your flesh rapidly mutates!</span>"
M.monkeyizing = 1
M.transforming = 1
M.canmove = 0
M.icon = null
M.overlays.Cut()
+221 -110
View File
@@ -1,3 +1,34 @@
//Chemical Reactions - Initialises all /datum/chemical_reaction into a list
// It is filtered into multiple lists within a list.
// For example:
// chemical_reaction_list["phoron"] is a list of all reactions relating to phoron
// Note that entries in the list are NOT duplicated. So if a reaction pertains to
// more than one chemical it will still only appear in only one of the sublists.
/proc/initialize_chemical_reactions()
var/paths = typesof(/datum/chemical_reaction) - /datum/chemical_reaction
chemical_reactions_list = list()
for(var/path in paths)
var/datum/chemical_reaction/D = new path()
if(D.required_reagents && D.required_reagents.len)
var/reagent_id = D.required_reagents[1]
if(!chemical_reactions_list[reagent_id])
chemical_reactions_list[reagent_id] = list()
chemical_reactions_list[reagent_id] += D
//helper that ensures the reaction rate holds after iterating
//Ex. REACTION_RATE(0.3) means that 30% of the reagents will react each chemistry tick (~2 seconds by default).
#define REACTION_RATE(rate) (1.0 - (1.0-rate)**(1.0/PROCESS_REACTION_ITER))
//helper to define reaction rate in terms of half-life
//Ex.
//HALF_LIFE(0) -> Reaction completes immediately (default chems)
//HALF_LIFE(1) -> Half of the reagents react immediately, the rest over the following ticks.
//HALF_LIFE(2) -> Half of the reagents are consumed after 2 chemistry ticks.
//HALF_LIFE(3) -> Half of the reagents are consumed after 3 chemistry ticks.
#define HALF_LIFE(ticks) (ticks? 1.0 - (0.5)**(1.0/(ticks*PROCESS_REACTION_ITER)) : 1.0)
/datum/chemical_reaction
var/name = null
var/id = null
@@ -5,18 +36,112 @@
var/list/required_reagents = list()
var/list/catalysts = list()
var/list/inhibitors = list()
var/result_amount = 0
//how far the reaction proceeds each time it is processed. Used with either REACTION_RATE or HALF_LIFE macros.
var/reaction_rate = HALF_LIFE(0)
//if less than 1, the reaction will be inhibited if the ratio of products/reagents is too high.
//0.5 = 50% yield -> reaction will only proceed halfway until products are removed.
var/yield = 1.0
//If limits on reaction rate would leave less than this amount of any reagent (adjusted by the reaction ratios),
//the reaction goes to completion. This is to prevent reactions from going on forever with tiny reagent amounts.
var/min_reaction = 2
var/mix_message = "The solution begins to bubble."
var/reaction_sound = 'sound/effects/bubbles.ogg'
var/log_is_important = 0 // If this reaction should be considered important for logging. Important recipes message admins when mixed, non-important ones just log to file.
/datum/chemical_reaction/proc/can_happen(var/datum/reagents/holder)
//check that all the required reagents are present
if(!holder.has_all_reagents(required_reagents))
return 0
//check that all the required catalysts are present in the required amount
if(!holder.has_all_reagents(catalysts))
return 0
//check that none of the inhibitors are present in the required amount
if(holder.has_any_reagent(inhibitors))
return 0
return 1
/datum/chemical_reaction/proc/calc_reaction_progress(var/datum/reagents/holder, var/reaction_limit)
var/progress = reaction_limit * reaction_rate //simple exponential progression
//calculate yield
if(1-yield > 0.001) //if yield ratio is big enough just assume it goes to completion
/*
Determine the max amount of product by applying the yield condition:
(max_product/result_amount) / reaction_limit == yield/(1-yield)
We make use of the fact that:
reaction_limit = (holder.get_reagent_amount(reactant) / required_reagents[reactant]) of the limiting reagent.
*/
var/yield_ratio = yield/(1-yield)
var/max_product = yield_ratio * reaction_limit * result_amount //rearrange to obtain max_product
var/yield_limit = max(0, max_product - holder.get_reagent_amount(result))/result_amount
progress = min(progress, yield_limit) //apply yield limit
//apply min reaction progress - wasn't sure if this should go before or after applying yield
//I guess people can just have their miniscule reactions go to completion regardless of yield.
for(var/reactant in required_reagents)
var/remainder = holder.get_reagent_amount(reactant) - progress*required_reagents[reactant]
if(remainder <= min_reaction*required_reagents[reactant])
progress = reaction_limit
break
return progress
/datum/chemical_reaction/proc/process(var/datum/reagents/holder)
//determine how far the reaction can proceed
var/list/reaction_limits = list()
for(var/reactant in required_reagents)
reaction_limits += holder.get_reagent_amount(reactant) / required_reagents[reactant]
//determine how far the reaction proceeds
var/reaction_limit = min(reaction_limits)
var/progress_limit = calc_reaction_progress(holder, reaction_limit)
var/reaction_progress = min(reaction_limit, progress_limit) //no matter what, the reaction progress cannot exceed the stoichiometric limit.
//need to obtain the new reagent's data before anything is altered
var/data = send_data(holder, reaction_progress)
//remove the reactants
for(var/reactant in required_reagents)
var/amt_used = required_reagents[reactant] * reaction_progress
holder.remove_reagent(reactant, amt_used, safety = 1)
//add the product
var/amt_produced = result_amount * reaction_progress
if(result)
holder.add_reagent(result, amt_produced, data, safety = 1)
on_reaction(holder, amt_produced)
return reaction_progress
//called when a reaction processes
/datum/chemical_reaction/proc/on_reaction(var/datum/reagents/holder, var/created_volume)
return
/datum/chemical_reaction/proc/send_data(var/datum/reagents/T)
//called after processing reactions, if they occurred
/datum/chemical_reaction/proc/post_reaction(var/datum/reagents/holder)
var/atom/container = holder.my_atom
if(mix_message && container && !ismob(container))
var/turf/T = get_turf(container)
var/list/seen = viewers(4, T)
for(var/mob/M in seen)
M.show_message("<span class='notice'>\icon[container] [mix_message]</span>", 1)
playsound(T, reaction_sound, 80, 1)
//obtains any special data that will be provided to the reaction products
//this is called just before reactants are removed.
/datum/chemical_reaction/proc/send_data(var/datum/reagents/holder, var/reaction_limit)
return null
/* Common reactions */
@@ -25,21 +150,21 @@
name = "Inaprovaline"
id = "inaprovaline"
result = "inaprovaline"
required_reagents = list("oxygen" = 1, "carbon" = 1, "sugar" = 1)
required_reagents = list("acetone" = 1, "carbon" = 1, "sugar" = 1)
result_amount = 3
/datum/chemical_reaction/dylovene
name = "Dylovene"
id = "anti_toxin"
result = "anti_toxin"
required_reagents = list("silicon" = 1, "potassium" = 1, "nitrogen" = 1)
required_reagents = list("silicon" = 1, "potassium" = 1, "ammonia" = 1)
result_amount = 3
/datum/chemical_reaction/tramadol
name = "Tramadol"
id = "tramadol"
result = "tramadol"
required_reagents = list("inaprovaline" = 1, "ethanol" = 1, "oxygen" = 1)
required_reagents = list("inaprovaline" = 1, "ethanol" = 1, "acetone" = 1)
result_amount = 3
/datum/chemical_reaction/paracetamol
@@ -54,42 +179,35 @@
id = "oxycodone"
result = "oxycodone"
required_reagents = list("ethanol" = 1, "tramadol" = 1)
catalysts = list("phoron" = 1)
catalysts = list("phoron" = 5)
result_amount = 1
/datum/chemical_reaction/sterilizine
name = "Sterilizine"
id = "sterilizine"
result = "sterilizine"
required_reagents = list("ethanol" = 1, "anti_toxin" = 1, "chlorine" = 1)
required_reagents = list("ethanol" = 1, "anti_toxin" = 1, "hclacid" = 1)
result_amount = 3
/datum/chemical_reaction/silicate
name = "Silicate"
id = "silicate"
result = "silicate"
required_reagents = list("aluminum" = 1, "silicon" = 1, "oxygen" = 1)
required_reagents = list("aluminum" = 1, "silicon" = 1, "acetone" = 1)
result_amount = 3
/datum/chemical_reaction/mutagen
name = "Unstable mutagen"
id = "mutagen"
result = "mutagen"
required_reagents = list("radium" = 1, "phosphorus" = 1, "chlorine" = 1)
required_reagents = list("radium" = 1, "phosphorus" = 1, "hclacid" = 1)
result_amount = 3
/datum/chemical_reaction/water
name = "Water"
id = "water"
result = "water"
required_reagents = list("oxygen" = 1, "hydrogen" = 2)
result_amount = 1
/datum/chemical_reaction/thermite
name = "Thermite"
id = "thermite"
result = "thermite"
required_reagents = list("aluminum" = 1, "iron" = 1, "oxygen" = 1)
required_reagents = list("aluminum" = 1, "iron" = 1, "acetone" = 1)
result_amount = 3
/datum/chemical_reaction/space_drugs
@@ -103,14 +221,14 @@
name = "Space Lube"
id = "lube"
result = "lube"
required_reagents = list("water" = 1, "silicon" = 1, "oxygen" = 1)
required_reagents = list("water" = 1, "silicon" = 1, "acetone" = 1)
result_amount = 4
/datum/chemical_reaction/pacid
name = "Polytrinic acid"
id = "pacid"
result = "pacid"
required_reagents = list("sacid" = 1, "chlorine" = 1, "potassium" = 1)
required_reagents = list("sacid" = 1, "hclacid" = 1, "potassium" = 1)
result_amount = 3
/datum/chemical_reaction/synaptizine
@@ -131,14 +249,14 @@
name = "Arithrazine"
id = "arithrazine"
result = "arithrazine"
required_reagents = list("hyronalin" = 1, "hydrogen" = 1)
required_reagents = list("hyronalin" = 1, "hydrazine" = 1)
result_amount = 2
/datum/chemical_reaction/impedrezene
name = "Impedrezene"
id = "impedrezene"
result = "impedrezene"
required_reagents = list("mercury" = 1, "oxygen" = 1, "sugar" = 1)
required_reagents = list("mercury" = 1, "acetone" = 1, "sugar" = 1)
result_amount = 2
/datum/chemical_reaction/kelotane
@@ -154,7 +272,7 @@
id = "peridaxon"
result = "peridaxon"
required_reagents = list("bicaridine" = 2, "clonexadone" = 2)
catalysts = list("phoron" = 1)
catalysts = list("phoron" = 5)
result_amount = 2
/datum/chemical_reaction/virus_food
@@ -169,14 +287,14 @@
id = "leporazine"
result = "leporazine"
required_reagents = list("silicon" = 1, "copper" = 1)
catalysts = list("phoron" = 1)
catalysts = list("phoron" = 5)
result_amount = 2
/datum/chemical_reaction/cryptobiolin
name = "Cryptobiolin"
id = "cryptobiolin"
result = "cryptobiolin"
required_reagents = list("potassium" = 1, "oxygen" = 1, "sugar" = 1)
required_reagents = list("potassium" = 1, "acetone" = 1, "sugar" = 1)
result_amount = 3
/datum/chemical_reaction/tricordrazine
@@ -190,14 +308,14 @@
name = "Alkysine"
id = "alkysine"
result = "alkysine"
required_reagents = list("chlorine" = 1, "nitrogen" = 1, "anti_toxin" = 1)
required_reagents = list("hclacid" = 1, "ammonia" = 1, "anti_toxin" = 1)
result_amount = 2
/datum/chemical_reaction/dexalin
name = "Dexalin"
id = "dexalin"
result = "dexalin"
required_reagents = list("oxygen" = 2, "phoron" = 0.1)
required_reagents = list("acetone" = 2, "phoron" = 0.1)
catalysts = list("phoron" = 1)
inhibitors = list("water" = 1) // Messes with cryox
result_amount = 1
@@ -206,7 +324,7 @@
name = "Dermaline"
id = "dermaline"
result = "dermaline"
required_reagents = list("oxygen" = 1, "phosphorus" = 1, "kelotane" = 1)
required_reagents = list("acetone" = 1, "phosphorus" = 1, "kelotane" = 1)
result_amount = 3
/datum/chemical_reaction/dexalinp
@@ -242,7 +360,7 @@
name = "Cryoxadone"
id = "cryoxadone"
result = "cryoxadone"
required_reagents = list("dexalin" = 1, "water" = 1, "oxygen" = 1)
required_reagents = list("dexalin" = 1, "water" = 1, "acetone" = 1)
result_amount = 3
/datum/chemical_reaction/clonexadone
@@ -250,7 +368,7 @@
id = "clonexadone"
result = "clonexadone"
required_reagents = list("cryoxadone" = 1, "sodium" = 1, "phoron" = 0.1)
catalysts = list("phoron" = 1)
catalysts = list("phoron" = 5)
result_amount = 2
/datum/chemical_reaction/spaceacillin
@@ -264,14 +382,14 @@
name = "imidazoline"
id = "imidazoline"
result = "imidazoline"
required_reagents = list("carbon" = 1, "hydrogen" = 1, "anti_toxin" = 1)
required_reagents = list("carbon" = 1, "hydrazine" = 1, "anti_toxin" = 1)
result_amount = 2
/datum/chemical_reaction/ethylredoxrazine
name = "Ethylredoxrazine"
id = "ethylredoxrazine"
result = "ethylredoxrazine"
required_reagents = list("oxygen" = 1, "anti_toxin" = 1, "carbon" = 1)
required_reagents = list("acetone" = 1, "anti_toxin" = 1, "carbon" = 1)
result_amount = 3
/datum/chemical_reaction/ipecac
@@ -293,7 +411,7 @@
name = "Chloral Hydrate"
id = "chloralhydrate"
result = "chloralhydrate"
required_reagents = list("ethanol" = 1, "chlorine" = 3, "water" = 1)
required_reagents = list("ethanol" = 1, "hclacid" = 3, "water" = 1)
result_amount = 1
/datum/chemical_reaction/potassium_chloride
@@ -321,7 +439,7 @@
name = "Mindbreaker Toxin"
id = "mindbreaker"
result = "mindbreaker"
required_reagents = list("silicon" = 1, "hydrogen" = 1, "anti_toxin" = 1)
required_reagents = list("silicon" = 1, "hydrazine" = 1, "anti_toxin" = 1)
result_amount = 3
/datum/chemical_reaction/lipozine
@@ -332,19 +450,12 @@
result_amount = 3
/datum/chemical_reaction/surfactant
name = "Foam surfactant"
id = "foam surfactant"
result = "fluorosurfactant"
required_reagents = list("fluorine" = 2, "carbon" = 2, "sacid" = 1)
name = "Azosurfactant"
id = "surfactant"
result = "surfactant"
required_reagents = list("hydrazine" = 2, "carbon" = 2, "sacid" = 1)
result_amount = 5
/datum/chemical_reaction/ammonia
name = "Ammonia"
id = "ammonia"
result = "ammonia"
required_reagents = list("hydrogen" = 3, "nitrogen" = 1)
result_amount = 3
/datum/chemical_reaction/diethylamine
name = "Diethylamine"
id = "diethylamine"
@@ -370,7 +481,7 @@
name = "Foaming Agent"
id = "foaming_agent"
result = "foaming_agent"
required_reagents = list("lithium" = 1, "hydrogen" = 1)
required_reagents = list("lithium" = 1, "hydrazine" = 1)
result_amount = 1
/datum/chemical_reaction/glycerol
@@ -384,7 +495,7 @@
name = "Sodium Chloride"
id = "sodiumchloride"
result = "sodiumchloride"
required_reagents = list("sodium" = 1, "chlorine" = 1)
required_reagents = list("sodium" = 1, "hclacid" = 1)
result_amount = 2
/datum/chemical_reaction/condensedcapsaicin
@@ -392,14 +503,14 @@
id = "condensedcapsaicin"
result = "condensedcapsaicin"
required_reagents = list("capsaicin" = 2)
catalysts = list("phoron" = 1)
catalysts = list("phoron" = 5)
result_amount = 1
/datum/chemical_reaction/coolant
name = "Coolant"
id = "coolant"
result = "coolant"
required_reagents = list("tungsten" = 1, "oxygen" = 1, "water" = 1)
required_reagents = list("tungsten" = 1, "acetone" = 1, "water" = 1)
result_amount = 3
log_is_important = 1
@@ -414,14 +525,14 @@
name = "Lexorin"
id = "lexorin"
result = "lexorin"
required_reagents = list("phoron" = 1, "hydrogen" = 1, "nitrogen" = 1)
required_reagents = list("phoron" = 1, "hydrazine" = 1, "ammonia" = 1)
result_amount = 3
/datum/chemical_reaction/methylphenidate
name = "Methylphenidate"
id = "methylphenidate"
result = "methylphenidate"
required_reagents = list("mindbreaker" = 1, "hydrogen" = 1)
required_reagents = list("mindbreaker" = 1, "hydrazine" = 1)
result_amount = 3
/datum/chemical_reaction/citalopram
@@ -436,7 +547,7 @@
name = "Paroxetine"
id = "paroxetine"
result = "paroxetine"
required_reagents = list("mindbreaker" = 1, "oxygen" = 1, "inaprovaline" = 1)
required_reagents = list("mindbreaker" = 1, "acetone" = 1, "inaprovaline" = 1)
result_amount = 3
/* Solidification */
@@ -563,7 +674,7 @@
/datum/chemical_reaction/napalm/on_reaction(var/datum/reagents/holder, var/created_volume)
var/turf/location = get_turf(holder.my_atom.loc)
for(var/turf/simulated/floor/target_tile in range(0,location))
target_tile.assume_gas("volatile_fuel", created_volume, 400+T0C)
target_tile.assume_gas("phoron", created_volume, 400+T0C)
spawn (0) target_tile.hotspot_expose(700, 400)
holder.del_reagent("napalm")
return
@@ -590,7 +701,7 @@
name = "Foam"
id = "foam"
result = null
required_reagents = list("fluorosurfactant" = 1, "water" = 1)
required_reagents = list("surfactant" = 1, "water" = 1)
result_amount = 2
mix_message = "The solution violently bubbles!"
@@ -886,7 +997,7 @@
if(holder.my_atom && istype(holder.my_atom, required))
var/obj/item/slime_extract/T = holder.my_atom
if(T.Uses > 0)
return 1
return ..()
return 0
/datum/chemical_reaction/slime/on_reaction(var/datum/reagents/holder)
@@ -1006,7 +1117,7 @@
var/list/borks = typesof(/obj/item/weapon/reagent_containers/food/snacks) - /obj/item/weapon/reagent_containers/food/snacks
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/human/M in viewers(get_turf(holder.my_atom), null))
if(M.eyecheck() <= 0)
if(M.eyecheck() < FLASH_PROTECTION_MODERATE)
flick("e_flash", M.flash)
for(var/i = 1, i <= 4 + rand(1,2), i++)
@@ -1246,7 +1357,7 @@
id = "tofu"
result = null
required_reagents = list("soymilk" = 10)
catalysts = list("enzyme" = 1)
catalysts = list("enzyme" = 5)
result_amount = 1
/datum/chemical_reaction/tofu/on_reaction(var/datum/reagents/holder, var/created_volume)
@@ -1307,7 +1418,7 @@
id = "cheesewheel"
result = null
required_reagents = list("milk" = 40)
catalysts = list("enzyme" = 1)
catalysts = list("enzyme" = 5)
result_amount = 1
/datum/chemical_reaction/cheesewheel/on_reaction(var/datum/reagents/holder, var/created_volume)
@@ -1396,29 +1507,29 @@
name = "Iced Tea"
id = "icetea"
result = "icetea"
required_reagents = list("ice" = 1, "tea" = 3)
result_amount = 4
required_reagents = list("ice" = 1, "tea" = 2)
result_amount = 3
/datum/chemical_reaction/icecoffee
name = "Iced Coffee"
id = "icecoffee"
result = "icecoffee"
required_reagents = list("ice" = 1, "coffee" = 3)
result_amount = 4
required_reagents = list("ice" = 1, "coffee" = 2)
result_amount = 3
/datum/chemical_reaction/nuka_cola
name = "Nuka Cola"
id = "nuka_cola"
result = "nuka_cola"
required_reagents = list("uranium" = 1, "cola" = 6)
result_amount = 6
required_reagents = list("uranium" = 1, "cola" = 5)
result_amount = 5
/datum/chemical_reaction/moonshine
name = "Moonshine"
id = "moonshine"
result = "moonshine"
required_reagents = list("nutriment" = 10)
catalysts = list("enzyme" = 1)
catalysts = list("enzyme" = 5)
result_amount = 10
/datum/chemical_reaction/grenadine
@@ -1426,7 +1537,7 @@
id = "grenadine"
result = "grenadine"
required_reagents = list("berryjuice" = 10)
catalysts = list("enzyme" = 1)
catalysts = list("enzyme" = 5)
result_amount = 10
/datum/chemical_reaction/wine
@@ -1434,7 +1545,7 @@
id = "wine"
result = "wine"
required_reagents = list("grapejuice" = 10)
catalysts = list("enzyme" = 1)
catalysts = list("enzyme" = 5)
result_amount = 10
/datum/chemical_reaction/pwine
@@ -1442,7 +1553,7 @@
id = "pwine"
result = "pwine"
required_reagents = list("poisonberryjuice" = 10)
catalysts = list("enzyme" = 1)
catalysts = list("enzyme" = 5)
result_amount = 10
/datum/chemical_reaction/melonliquor
@@ -1450,7 +1561,7 @@
id = "melonliquor"
result = "melonliquor"
required_reagents = list("watermelonjuice" = 10)
catalysts = list("enzyme" = 1)
catalysts = list("enzyme" = 5)
result_amount = 10
/datum/chemical_reaction/bluecuracao
@@ -1458,7 +1569,7 @@
id = "bluecuracao"
result = "bluecuracao"
required_reagents = list("orangejuice" = 10)
catalysts = list("enzyme" = 1)
catalysts = list("enzyme" = 5)
result_amount = 10
/datum/chemical_reaction/spacebeer
@@ -1466,7 +1577,7 @@
id = "spacebeer"
result = "beer"
required_reagents = list("cornoil" = 10)
catalysts = list("enzyme" = 1)
catalysts = list("enzyme" = 5)
result_amount = 10
/datum/chemical_reaction/vodka
@@ -1474,7 +1585,7 @@
id = "vodka"
result = "vodka"
required_reagents = list("potato" = 10)
catalysts = list("enzyme" = 1)
catalysts = list("enzyme" = 5)
result_amount = 10
/datum/chemical_reaction/sake
@@ -1482,7 +1593,7 @@
id = "sake"
result = "sake"
required_reagents = list("rice" = 10)
catalysts = list("enzyme" = 1)
catalysts = list("enzyme" = 5)
result_amount = 10
/datum/chemical_reaction/kahlua
@@ -1490,7 +1601,7 @@
id = "kahlua"
result = "kahlua"
required_reagents = list("coffee" = 5, "sugar" = 5)
catalysts = list("enzyme" = 1)
catalysts = list("enzyme" = 5)
result_amount = 5
/datum/chemical_reaction/gin_tonic
@@ -1525,8 +1636,8 @@
name = "White Russian"
id = "whiterussian"
result = "whiterussian"
required_reagents = list("blackrussian" = 3, "cream" = 2)
result_amount = 5
required_reagents = list("blackrussian" = 2, "cream" = 1)
result_amount = 3
/datum/chemical_reaction/whiskey_cola
name = "Whiskey Cola"
@@ -1546,15 +1657,15 @@
name = "Bloody Mary"
id = "bloodymary"
result = "bloodymary"
required_reagents = list("vodka" = 1, "tomatojuice" = 2, "limejuice" = 1)
result_amount = 4
required_reagents = list("vodka" = 2, "tomatojuice" = 3, "limejuice" = 1)
result_amount = 6
/datum/chemical_reaction/gargle_blaster
name = "Pan-Galactic Gargle Blaster"
id = "gargleblaster"
result = "gargleblaster"
required_reagents = list("vodka" = 1, "gin" = 1, "whiskey" = 1, "cognac" = 1, "limejuice" = 1)
result_amount = 5
required_reagents = list("vodka" = 2, "gin" = 1, "whiskey" = 1, "cognac" = 1, "limejuice" = 1)
result_amount = 6
/datum/chemical_reaction/brave_bull
name = "Brave Bull"
@@ -1574,22 +1685,22 @@
name = "Toxins Special"
id = "phoronspecial"
result = "phoronspecial"
required_reagents = list("rum" = 2, "vermouth" = 1, "phoron" = 2)
result_amount = 5
required_reagents = list("rum" = 2, "vermouth" = 2, "phoron" = 2)
result_amount = 6
/datum/chemical_reaction/beepsky_smash
name = "Beepksy Smash"
id = "beepksysmash"
result = "beepskysmash"
required_reagents = list("limejuice" = 2, "whiskey" = 2, "iron" = 1)
result_amount = 4
required_reagents = list("limejuice" = 1, "whiskey" = 1, "iron" = 1)
result_amount = 2
/datum/chemical_reaction/doctor_delight
name = "The Doctor's Delight"
id = "doctordelight"
result = "doctorsdelight"
required_reagents = list("limejuice" = 1, "tomatojuice" = 1, "orangejuice" = 1, "cream" = 1, "tricordrazine" = 1)
result_amount = 5
required_reagents = list("limejuice" = 1, "tomatojuice" = 1, "orangejuice" = 1, "cream" = 2, "tricordrazine" = 1)
result_amount = 6
/datum/chemical_reaction/irish_cream
name = "Irish Cream"
@@ -1644,15 +1755,15 @@
name = "Long Island Iced Tea"
id = "longislandicedtea"
result = "longislandicedtea"
required_reagents = list("vodka" = 1, "gin" = 1, "tequilla" = 1, "cubalibre" = 1)
result_amount = 4
required_reagents = list("vodka" = 1, "gin" = 1, "tequilla" = 1, "cubalibre" = 3)
result_amount = 6
/datum/chemical_reaction/icedtea
name = "Long Island Iced Tea"
id = "longislandicedtea"
result = "longislandicedtea"
required_reagents = list("vodka" = 1, "gin" = 1, "tequilla" = 1, "cubalibre" = 1)
result_amount = 4
required_reagents = list("vodka" = 1, "gin" = 1, "tequilla" = 1, "cubalibre" = 3)
result_amount = 6
/datum/chemical_reaction/threemileisland
name = "Three Mile Island Iced Tea"
@@ -1672,8 +1783,8 @@
name = "Black Russian"
id = "blackrussian"
result = "blackrussian"
required_reagents = list("vodka" = 3, "kahlua" = 2)
result_amount = 5
required_reagents = list("vodka" = 2, "kahlua" = 1)
result_amount = 3
/datum/chemical_reaction/manhattan
name = "Manhattan"
@@ -1700,8 +1811,8 @@
name = "Gin Fizz"
id = "ginfizz"
result = "ginfizz"
required_reagents = list("gin" = 2, "sodawater" = 1, "limejuice" = 1)
result_amount = 4
required_reagents = list("gin" = 1, "sodawater" = 1, "limejuice" = 1)
result_amount = 3
/datum/chemical_reaction/bahama_mama
name = "Bahama mama"
@@ -1728,22 +1839,22 @@
name = "Demons Blood"
id = "demonsblood"
result = "demonsblood"
required_reagents = list("rum" = 1, "spacemountainwind" = 1, "blood" = 1, "dr_gibb" = 1)
result_amount = 4
required_reagents = list("rum" = 3, "spacemountainwind" = 1, "blood" = 1, "dr_gibb" = 1)
result_amount = 6
/datum/chemical_reaction/booger
name = "Booger"
id = "booger"
result = "booger"
required_reagents = list("cream" = 1, "banana" = 1, "rum" = 1, "watermelonjuice" = 1)
result_amount = 4
required_reagents = list("cream" = 2, "banana" = 1, "rum" = 1, "watermelonjuice" = 1)
result_amount = 5
/datum/chemical_reaction/antifreeze
name = "Anti-freeze"
id = "antifreeze"
result = "antifreeze"
required_reagents = list("vodka" = 2, "cream" = 1, "ice" = 1)
result_amount = 4
required_reagents = list("vodka" = 1, "cream" = 1, "ice" = 1)
result_amount = 3
/datum/chemical_reaction/barefoot
name = "Barefoot"
@@ -1778,7 +1889,7 @@
id = "mead"
result = "mead"
required_reagents = list("sugar" = 1, "water" = 1)
catalysts = list("enzyme" = 1)
catalysts = list("enzyme" = 5)
result_amount = 2
/datum/chemical_reaction/iced_beer
@@ -1835,14 +1946,14 @@
id = "changelingsting"
result = "changelingsting"
required_reagents = list("screwdrivercocktail" = 1, "limejuice" = 1, "lemonjuice" = 1)
result_amount = 5
result_amount = 3
/datum/chemical_reaction/aloe
name = "Aloe"
id = "aloe"
result = "aloe"
required_reagents = list("cream" = 1, "whiskey" = 1, "watermelonjuice" = 1)
result_amount = 2
result_amount = 3
/datum/chemical_reaction/andalusia
name = "Andalusia"
@@ -1883,8 +1994,8 @@
name = "Erika Surprise"
id = "erikasurprise"
result = "erikasurprise"
required_reagents = list("ale" = 1, "limejuice" = 1, "whiskey" = 1, "banana" = 1, "ice" = 1)
result_amount = 5
required_reagents = list("ale" = 2, "limejuice" = 1, "whiskey" = 1, "banana" = 1, "ice" = 1)
result_amount = 6
/datum/chemical_reaction/devilskiss
name = "Devils Kiss"
@@ -1933,14 +2044,14 @@
id = "kiraspecial"
result = "kiraspecial"
required_reagents = list("orangejuice" = 1, "limejuice" = 1, "sodawater" = 1)
result_amount = 2
result_amount = 3
/datum/chemical_reaction/brownstar
name = "Brown Star"
id = "brownstar"
result = "brownstar"
required_reagents = list("orangejuice" = 2, "cola" = 1)
result_amount = 2
result_amount = 3
/datum/chemical_reaction/milkshake
name = "Milkshake"
@@ -1960,8 +2071,8 @@
name = "Sui Dream"
id = "suidream"
result = "suidream"
required_reagents = list("space_up" = 2, "bluecuracao" = 1, "melonliquor" = 1)
result_amount = 4
required_reagents = list("space_up" = 1, "bluecuracao" = 1, "melonliquor" = 1)
result_amount = 3
/datum/chemical_reaction/luminol
name = "Luminol"
@@ -1978,7 +2089,7 @@
result = "white_coffee"
required_reagents = list("milk" = 1, "blackcoffee" = 2)
result_amount = 2
//aurora's drinks
/datum/chemical_reaction/daiquiri
@@ -2064,7 +2175,7 @@
result = "deweycocktail"
required_reagents = list("cremeyvette" = 1, "gin" = 1, "grenadine" = 1)
result_amount = 3
/datum/chemical_reaction/rustynail
name = "Rusty Nail"
id = "rustynail"
@@ -10,18 +10,17 @@
sugar spawn_reagent = "sugar"
// Chemistry
hydrogen spawn_reagent = "hydrogen"
hydrazine spawn_reagent = "hydrazine"
lithium spawn_reagent = "lithium"
carbon spawn_reagent = "carbon"
nitrogen spawn_reagent = "nitrogen"
oxygen spawn_reagent = "oxygen"
fluorine spawn_reagent = "fluorine"
ammonia spawn_reagent = "ammonia"
acetone spawn_reagent = "acetone"
sodium spawn_reagent = "sodium"
aluminum spawn_reagent = "aluminum"
silicon spawn_reagent = "silicon"
phosphorus spawn_reagent = "phosphorus"
sulfur spawn_reagent = "sulfur"
chlorine spawn_reagent = "chlorine"
hclacid spawn_reagent = "hclacid"
potassium spawn_reagent = "potassium"
iron spawn_reagent = "iron"
copper spawn_reagent = "copper"
@@ -1,17 +1,16 @@
/obj/machinery/chemical_dispenser/full
spawn_cartridges = list(
/obj/item/weapon/reagent_containers/chem_disp_cartridge/hydrogen,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/hydrazine,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/lithium,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/carbon,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/nitrogen,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/oxygen,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/fluorine,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/ammonia,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/acetone,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/sodium,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/aluminum,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/silicon,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/phosphorus,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/sulfur,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/chlorine,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/hclacid,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/potassium,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/iron,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/copper,
+10 -12
View File
@@ -31,18 +31,17 @@
/datum/supply_packs/reagents
name = "Chemistry dispenser refill"
contains = list(
/obj/item/weapon/reagent_containers/chem_disp_cartridge/hydrogen,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/hydrazine,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/lithium,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/carbon,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/nitrogen,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/oxygen,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/fluorine,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/ammonia,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/acetone,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/sodium,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/aluminum,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/silicon,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/phosphorus,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/sulfur,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/chlorine,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/hclacid,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/potassium,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/iron,
/obj/item/weapon/reagent_containers/chem_disp_cartridge/copper,
@@ -128,7 +127,7 @@
group = "Reagents"
#define SEC_PACK(_tname, _type, _name, _cname, _cost, _access)\
/datum/supply_packs/dispenser_cartridges{\
datum/supply_packs/dispenser_cartridges{\
_tname {\
name = _name ;\
containername = _cname ;\
@@ -140,7 +139,7 @@
}\
}
#define PACK(_tname, _type, _name, _cname, _cost)\
/datum/supply_packs/dispenser_cartridges{\
datum/supply_packs/dispenser_cartridges{\
_tname {\
name = _name ;\
containername = _cname ;\
@@ -153,18 +152,17 @@
// Chemistry-restricted (raw reagents excluding sugar/water)
// Datum path Contents type Supply pack name Container name Cost Container access
SEC_PACK(hydrogen, /obj/item/weapon/reagent_containers/chem_disp_cartridge/hydrogen, "Reagent refill - Hydrogen", "hydrogen reagent cartridge crate", 15, access_chemistry)
SEC_PACK(hydrazine, /obj/item/weapon/reagent_containers/chem_disp_cartridge/hydrazine, "Reagent refill - Hydrazine", "hydrazine reagent cartridge crate", 15, access_chemistry)
SEC_PACK(lithium, /obj/item/weapon/reagent_containers/chem_disp_cartridge/lithium, "Reagent refill - Lithium", "lithium reagent cartridge crate", 15, access_chemistry)
SEC_PACK(carbon, /obj/item/weapon/reagent_containers/chem_disp_cartridge/carbon, "Reagent refill - Carbon", "carbon reagent cartridge crate", 15, access_chemistry)
SEC_PACK(nitrogen, /obj/item/weapon/reagent_containers/chem_disp_cartridge/nitrogen, "Reagent refill - Nitrogen", "nitrogen reagent cartridge crate", 15, access_chemistry)
SEC_PACK(oxygen, /obj/item/weapon/reagent_containers/chem_disp_cartridge/oxygen, "Reagent refill - Oxygen", "oxygen reagent cartridge crate", 15, access_chemistry)
SEC_PACK(fluorine, /obj/item/weapon/reagent_containers/chem_disp_cartridge/fluorine, "Reagent refill - Fluorine", "fluorine reagent cartridge crate", 15, access_chemistry)
SEC_PACK(ammonia, /obj/item/weapon/reagent_containers/chem_disp_cartridge/ammonia, "Reagent refill - Ammonia", "ammonia reagent cartridge crate", 15, access_chemistry)
SEC_PACK(oxygen, /obj/item/weapon/reagent_containers/chem_disp_cartridge/acetone, "Reagent refill - Acetone", "acetone reagent cartridge crate", 15, access_chemistry)
SEC_PACK(sodium, /obj/item/weapon/reagent_containers/chem_disp_cartridge/sodium, "Reagent refill - Sodium", "sodium reagent cartridge crate", 15, access_chemistry)
SEC_PACK(aluminium, /obj/item/weapon/reagent_containers/chem_disp_cartridge/aluminum, "Reagent refill - Aluminum", "aluminum reagent cartridge crate", 15, access_chemistry)
SEC_PACK(silicon, /obj/item/weapon/reagent_containers/chem_disp_cartridge/silicon, "Reagent refill - Silicon", "silicon reagent cartridge crate", 15, access_chemistry)
SEC_PACK(phosphorus,/obj/item/weapon/reagent_containers/chem_disp_cartridge/phosphorus, "Reagent refill - Phosphorus", "phosphorus reagent cartridge crate", 15, access_chemistry)
SEC_PACK(sulfur, /obj/item/weapon/reagent_containers/chem_disp_cartridge/sulfur, "Reagent refill - Sulfur", "sulfur reagent cartridge crate", 15, access_chemistry)
SEC_PACK(chlorine, /obj/item/weapon/reagent_containers/chem_disp_cartridge/chlorine, "Reagent refill - Chlorine", "chlorine reagent cartridge crate", 15, access_chemistry)
SEC_PACK(hclacid, /obj/item/weapon/reagent_containers/chem_disp_cartridge/hclacid, "Reagent refill - Hydrochloric Acid", "hydrochloric acid reagent cartridge crate", 15, access_chemistry)
SEC_PACK(potassium, /obj/item/weapon/reagent_containers/chem_disp_cartridge/potassium, "Reagent refill - Potassium", "potassium reagent cartridge crate", 15, access_chemistry)
SEC_PACK(iron, /obj/item/weapon/reagent_containers/chem_disp_cartridge/iron, "Reagent refill - Iron", "iron reagent cartridge crate", 15, access_chemistry)
SEC_PACK(copper, /obj/item/weapon/reagent_containers/chem_disp_cartridge/copper, "Reagent refill - Copper", "copper reagent cartridge crate", 15, access_chemistry)
+20 -17
View File
@@ -25,11 +25,6 @@
/obj/item/weapon/reagent_containers/attack_self(mob/user as mob)
return
/obj/item/weapon/reagent_containers/attack(mob/M as mob, mob/user as mob, def_zone)
if(can_operate(M))//Checks if mob is lying down on table for surgery
if(do_surgery(M, user, src))
return
/obj/item/weapon/reagent_containers/afterattack(obj/target, mob/user, flag)
return
@@ -71,7 +66,7 @@
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to splash [target.name] ([target.key]). Reagents: [contained]</font>")
msg_admin_attack("[user.name] ([user.ckey]) splashed [target.name] ([target.key]) with [name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
user.visible_message("<span class='danger'>[target] has been splashed with something by [user]!", "<span class = 'notice'>You splash the solution onto [target].</span>")
user.visible_message("<span class='danger'>[target] has been splashed with something by [user]!</span>", "<span class = 'notice'>You splash the solution onto [target].</span>")
reagents.splash(target, reagents.total_volume)
return 1
@@ -79,10 +74,10 @@
user << "<span class='notice'>You eat \the [src]</span>"
/obj/item/weapon/reagent_containers/proc/other_feed_message_start(var/mob/user, var/mob/target)
user.visible_message("<span class='warning'>[user] is trying to feed [target] \the [src]!")
user.visible_message("<span class='warning'>[user] is trying to feed [target] \the [src]!</span>")
/obj/item/weapon/reagent_containers/proc/other_feed_message_finish(var/mob/user, var/mob/target)
user.visible_message("<span class='warning'>[user] has fed [target] \the [src]!")
user.visible_message("<span class='warning'>[user] has fed [target] \the [src]!</span>")
/obj/item/weapon/reagent_containers/proc/feed_sound(var/mob/user)
return
@@ -98,15 +93,15 @@
if(target == user)
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user
if(H.species.flags & IS_SYNTHETIC)
H << "<span class='notice'>You have a monitor for a head, where do you think you're going to put that?</span>"
return 1
if(!H.check_has_mouth())
user << "Where do you intend to put \the [src]? You don't have a mouth!"
return
var/obj/item/blocked = H.check_mouth_coverage()
if(blocked)
user << "<span class='warning'>\The [blocked] is in the way!</span>"
return
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) //puts a limit on how fast people can eat/drink things
self_feed_message(user)
reagents.trans_to_mob(user, amount_per_transfer_from_this, CHEM_INGEST)
feed_sound(user)
@@ -114,10 +109,9 @@
else
if(istype(target, /mob/living/carbon/human))
var/mob/living/carbon/human/H = target
if(H.species.flags & IS_SYNTHETIC)
H << "<span class='notice'>They have a monitor for a head, where do you think you're going to put that?</span>"
if(!H.check_has_mouth())
user << "Where do you intend to put \the [src]? \The [H] doesn't have a mouth!"
return
var/obj/item/blocked = H.check_mouth_coverage()
if(blocked)
user << "<span class='warning'>\The [blocked] is in the way!</span>"
@@ -125,6 +119,7 @@
other_feed_message_start(user, target)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
if(!do_mob(user, target))
return
@@ -140,7 +135,15 @@
return 1
/obj/item/weapon/reagent_containers/proc/standard_pour_into(var/mob/user, var/atom/target) // This goes into afterattack and yes, it's atom-level
if(!target.is_open_container() || !target.reagents)
if(!target.reagents)
return 0
// Ensure we don't splash beakers and similar containers.
if(!target.is_open_container() && istype(target, /obj/item/weapon/reagent_containers))
user << "<span class='notice'>\The [target] is closed.</span>"
return 1
// Otherwise don't care about splashing.
else if(!target.is_open_container())
return 0
if(!reagents || !reagents.total_volume)
@@ -153,4 +156,4 @@
var/trans = reagents.trans_to(target, amount_per_transfer_from_this)
user << "<span class='notice'>You transfer [trans] units of the solution to [target].</span>"
return 1
return 1
@@ -59,7 +59,17 @@
user << "<span class='warning'>The injector is empty.</span>"
return
if(M.can_inject(user, 1))
var/mob/living/carbon/human/H = M
if(istype(H))
var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting)
if(!affected)
user << "<span class='danger'>\The [H] is missing that limb!</span>"
return
else if(affected.status & ORGAN_ROBOT)
user << "<span class='danger'>You cannot inject a robotic limb.</span>"
return
if (M.can_inject(user, 1))
user << "<span class='notice'>You inject [M] with the injector.</span>"
M << "<span class='notice'>You feel a tiny prick!</span>"
@@ -30,7 +30,7 @@
if(ismob(target))
var/time = 20 //2/3rds the time of a syringe
user.visible_message("<span class='warning'>[user] is trying to squirt something into [target]'s eyes!")
user.visible_message("<span class='warning'>[user] is trying to squirt something into [target]'s eyes!</span>")
if(!do_mob(user, target, time))
return
@@ -40,10 +40,10 @@
var/obj/item/safe_thing = null
if(victim.wear_mask)
if (victim.wear_mask.flags & MASKCOVERSEYES)
if (victim.wear_mask.body_parts_covered & EYES)
safe_thing = victim.wear_mask
if(victim.head)
if (victim.head.flags & MASKCOVERSEYES)
if (victim.head.body_parts_covered & EYES)
safe_thing = victim.head
if(victim.glasses)
if (!safe_thing)
@@ -65,7 +65,7 @@
return
else
trans = reagents.trans_to_obj(target, amount_per_transfer_from_this) //sprinkling reagents on generic non-mobs
trans = reagents.trans_to(target, amount_per_transfer_from_this) //sprinkling reagents on generic non-mobs
user << "<span class='notice'>You transfer [trans] units of the solution.</span>"
else // Taking from something
@@ -1,10 +1,11 @@
#define CELLS 4
#define CELLS 8
#define CELLSIZE (32/CELLS)
////////////////////////////////////////////////////////////////////////////////
/// Food.
////////////////////////////////////////////////////////////////////////////////
/obj/item/weapon/reagent_containers/food
flags = OPENCONTAINER
possible_transfer_amounts = null
volume = 50 //Sets the default container amount for all food items.
var/filling_color = "#FFFFFF" //Used by sandwiches.
@@ -13,7 +14,7 @@
/obj/item/weapon/reagent_containers/food/New()
..()
if (!pixel_x && !pixel_y)
if (isnull(center_of_mass) && !pixel_x && !pixel_y)
src.pixel_x = rand(-6.0, 6) //Randomizes postion
src.pixel_y = rand(-6.0, 6)
@@ -1,43 +1,12 @@
/obj/item/weapon/reagent_containers/food/drinks/cans
volume = 40 //just over one and a half cups
amount_per_transfer_from_this = 5
flags = 0
attack_self(mob/user as mob)
if (!is_open_container())
playsound(loc,'sound/effects/canopen.ogg', rand(10,50), 1)
user << "<span class='notice'>You open the drink with an audible pop!</span>"
flags |= OPENCONTAINER
else
return
attack(mob/M as mob, mob/user as mob, def_zone)
if(!is_open_container())
user << "<span class='notice'>You need to open the drink!</span>"
return
return ..()
afterattack(obj/target, mob/user, proximity)
if(!proximity) return
if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
if(!is_open_container())
user << "<span class='notice'>You need to open the drink!</span>"
return
else if(target.is_open_container()) //Something like a glass. Player probably wants to transfer TO it.
if(!is_open_container())
user << "<span class='notice'>You need to open the drink!</span>"
return
return ..()
flags = 0 //starts closed
//DRINKS
/obj/item/weapon/reagent_containers/food/drinks/cans/cola
name = "Space Cola"
name = "\improper Space Cola"
desc = "Cola. in space."
icon_state = "cola"
center_of_mass = list("x"=16, "y"=10)
@@ -46,7 +15,7 @@
reagents.add_reagent("cola", 30)
/obj/item/weapon/reagent_containers/food/drinks/cans/waterbottle
name = "Bottled Water"
name = "bottled water"
desc = "Introduced to the vending machines by Skrellian request, this water comes straight from the Martian poles."
icon_state = "waterbottle"
center_of_mass = list("x"=15, "y"=8)
@@ -54,28 +23,8 @@
..()
reagents.add_reagent("water", 30)
/obj/item/weapon/reagent_containers/food/drinks/cans/beer
name = "Space Beer"
desc = "Contains only water, malt and hops."
icon_state = "beer"
center_of_mass = list("x"=16, "y"=12)
New()
..()
reagents.add_reagent("beer", 30)
/obj/item/weapon/reagent_containers/food/drinks/cans/ale
name = "Magm-Ale"
desc = "A true dorf's drink of choice."
icon_state = "alebottle"
item_state = "beer"
center_of_mass = list("x"=16, "y"=10)
New()
..()
reagents.add_reagent("ale", 30)
/obj/item/weapon/reagent_containers/food/drinks/cans/space_mountain_wind
name = "Space Mountain Wind"
name = "\improper Space Mountain Wind"
desc = "Blows right through you like a space wind."
icon_state = "space_mountain_wind"
center_of_mass = list("x"=16, "y"=10)
@@ -84,7 +33,7 @@
reagents.add_reagent("spacemountainwind", 30)
/obj/item/weapon/reagent_containers/food/drinks/cans/thirteenloko
name = "Thirteen Loko"
name = "\improper Thirteen Loko"
desc = "The CMO has advised crew members that consumption of Thirteen Loko may result in seizures, blindness, drunkeness, or even death. Please Drink Responsibly."
icon_state = "thirteen_loko"
center_of_mass = list("x"=16, "y"=8)
@@ -93,7 +42,7 @@
reagents.add_reagent("thirteenloko", 30)
/obj/item/weapon/reagent_containers/food/drinks/cans/dr_gibb
name = "Dr. Gibb"
name = "\improper Dr. Gibb"
desc = "A delicious mixture of 42 different flavors."
icon_state = "dr_gibb"
center_of_mass = list("x"=16, "y"=10)
@@ -102,7 +51,7 @@
reagents.add_reagent("dr_gibb", 30)
/obj/item/weapon/reagent_containers/food/drinks/cans/starkist
name = "Star-kist"
name = "\improper Star-kist"
desc = "The taste of a star in liquid form. And, a bit of tuna...?"
icon_state = "starkist"
center_of_mass = list("x"=16, "y"=10)
@@ -111,7 +60,7 @@
reagents.add_reagent("brownstar", 30)
/obj/item/weapon/reagent_containers/food/drinks/cans/space_up
name = "Space-Up"
name = "\improper Space-Up"
desc = "Tastes like a hull breach in your mouth."
icon_state = "space-up"
center_of_mass = list("x"=16, "y"=10)
@@ -120,7 +69,7 @@
reagents.add_reagent("space_up", 30)
/obj/item/weapon/reagent_containers/food/drinks/cans/lemon_lime
name = "Lemon-Lime"
name = "\improper Lemon-Lime"
desc = "You wanted ORANGE. It gave you Lemon Lime."
icon_state = "lemon-lime"
center_of_mass = list("x"=16, "y"=10)
@@ -129,7 +78,7 @@
reagents.add_reagent("lemon_lime", 30)
/obj/item/weapon/reagent_containers/food/drinks/cans/iced_tea
name = "Vrisk Serket Iced Tea"
name = "\improper Vrisk Serket Iced Tea"
desc = "That sweet, refreshing southern earthy flavor. That's where it's from, right? South Earth?"
icon_state = "ice_tea_can"
center_of_mass = list("x"=16, "y"=10)
@@ -138,7 +87,7 @@
reagents.add_reagent("icetea", 30)
/obj/item/weapon/reagent_containers/food/drinks/cans/grape_juice
name = "Grapel Juice"
name = "\improper Grapel Juice"
desc = "500 pages of rules of how to appropriately enter into a combat with this juice!"
icon_state = "purple_can"
center_of_mass = list("x"=16, "y"=10)
@@ -147,7 +96,7 @@
reagents.add_reagent("grapejuice", 30)
/obj/item/weapon/reagent_containers/food/drinks/cans/tonic
name = "T-Borg's Tonic Water"
name = "\improper T-Borg's Tonic Water"
desc = "Quinine tastes funny, but at least it'll keep that Space Malaria away."
icon_state = "tonic"
center_of_mass = list("x"=16, "y"=10)
@@ -156,7 +105,7 @@
reagents.add_reagent("tonic", 50)
/obj/item/weapon/reagent_containers/food/drinks/cans/sodawater
name = "Soda Water"
name = "soda water"
desc = "A can of soda water. Still water's more refreshing cousin."
icon_state = "sodawater"
center_of_mass = list("x"=16, "y"=10)
@@ -14,12 +14,21 @@
return
attack_self(mob/user as mob)
return
if(!is_open_container())
open(user)
attack(mob/M as mob, mob/user as mob, def_zone)
if(standard_feed_mob(user, M))
proc/open(mob/user)
playsound(loc,'sound/effects/canopen.ogg', rand(10,50), 1)
user << "<span class='notice'>You open [src] with an audible pop!</span>"
flags |= OPENCONTAINER
attack(mob/M as mob, mob/user as mob, def_zone)
if(force && !(flags & NOBLUDGEON) && user.a_intent == I_HURT)
return ..()
if(standard_feed_mob(user, M))
return
return 0
afterattack(obj/target, mob/user, proximity)
@@ -29,7 +38,24 @@
return
if(standard_pour_into(user, target))
return
return ..()
standard_feed_mob(var/mob/user, var/mob/target)
if(!is_open_container())
user << "<span class='notice'>You need to open [src]!</span>"
return 1
return ..()
standard_dispenser_refill(var/mob/user, var/obj/structure/reagent_dispensers/target)
if(!is_open_container())
user << "<span class='notice'>You need to open [src]!</span>"
return 1
return ..()
standard_pour_into(var/mob/user, var/atom/target)
if(!is_open_container())
user << "<span class='notice'>You need to open [src]!</span>"
return 1
return ..()
self_feed_message(var/mob/user)
@@ -70,10 +96,6 @@
volume = 150
flags = CONDUCT | OPENCONTAINER
/obj/item/weapon/reagent_containers/food/drinks/golden_cup/tournament_26_06_2011
desc = "A golden cup. It will be presented to a winner of tournament 26 june and name of the winner will be graved on it."
///////////////////////////////////////////////Drinks
//Notes by Darem: Drinks are simply containers that start preloaded. Unlike condiments, the contents can be ingested directly
// rather then having to add it to something else first. They should only contain liquids. They have a default container size of 50.
@@ -4,23 +4,57 @@
/obj/item/weapon/reagent_containers/food/drinks/bottle
amount_per_transfer_from_this = 5//Smaller sip size for more BaRP and less guzzling a litre of vodka before you realise it
volume = 120
volume = 100
item_state = "broken_beer" //Generic held-item sprite until unique ones are made.
var/const/duration = 13 //Directly relates to the 'weaken' duration. Lowered by armor (i.e. helmets)
force = 5
var/smash_duration = 5 //Directly relates to the 'weaken' duration. Lowered by armor (i.e. helmets)
var/isGlass = 1 //Whether the 'bottle' is made of glass or not so that milk cartons dont shatter when someone gets hit by it
var/obj/item/weapon/reagent_containers/glass/rag/rag = null
var/rag_underlay = "rag"
/obj/item/weapon/reagent_containers/food/drinks/bottle/New()
..()
if(isGlass) unacidable = 1
/obj/item/weapon/reagent_containers/food/drinks/bottle/proc/smash(mob/living/target as mob, mob/living/user as mob)
/obj/item/weapon/reagent_containers/food/drinks/bottle/Destroy()
if(rag)
rag.forceMove(src.loc)
rag = null
return ..()
//when thrown on impact, bottles smash and spill their contents
/obj/item/weapon/reagent_containers/food/drinks/bottle/throw_impact(atom/hit_atom, var/speed)
..()
var/mob/M = thrower
if(isGlass && istype(M) && M.a_intent == I_HURT)
var/throw_dist = get_dist(throw_source, loc)
if(speed >= throw_speed && smash_check(throw_dist)) //not as reliable as smashing directly
if(reagents)
hit_atom.visible_message("<span class='notice'>The contents of \the [src] splash all over [hit_atom]!</span>")
reagents.splash(hit_atom, reagents.total_volume)
src.smash(loc, hit_atom)
/obj/item/weapon/reagent_containers/food/drinks/bottle/proc/smash_check(var/distance)
if(!isGlass || !smash_duration)
return 0
var/list/chance_table = list(90, 90, 85, 85, 60, 35, 15) //starting from distance 0
var/idx = max(distance + 1, 1) //since list indices start at 1
if(idx > chance_table.len)
return 0
return prob(chance_table[idx])
/obj/item/weapon/reagent_containers/food/drinks/bottle/proc/smash(var/newloc, atom/against = null)
if(ismob(loc))
var/mob/M = loc
M.drop_from_inventory(src)
//Creates a shattering noise and replaces the bottle with a broken_bottle
user.drop_item()
var/obj/item/weapon/broken_bottle/B = new /obj/item/weapon/broken_bottle(user.loc)
user.put_in_active_hand(B)
var/obj/item/weapon/broken_bottle/B = new /obj/item/weapon/broken_bottle(newloc)
if(prob(33))
new/obj/item/weapon/material/shard(target.loc) // Create a glass shard at the target's location!
new/obj/item/weapon/material/shard(newloc) // Create a glass shard at the target's location!
B.icon_state = src.icon_state
var/icon/I = new('icons/obj/drinks.dmi', src.icon_state)
@@ -28,66 +62,91 @@
I.SwapColor(rgb(255, 0, 220, 255), rgb(0, 0, 0, 0))
B.icon = I
if(rag && rag.on_fire && isliving(against))
rag.forceMove(loc)
var/mob/living/L = against
L.IgniteMob()
playsound(src, "shatter", 70, 1)
user.put_in_active_hand(B)
src.transfer_fingerprints_to(B)
qdel(src)
return B
/obj/item/weapon/reagent_containers/food/drinks/bottle/attack(mob/living/target as mob, mob/living/user as mob)
if(!target)
/obj/item/weapon/reagent_containers/food/drinks/bottle/attackby(obj/item/W, mob/user)
if(!rag && istype(W, /obj/item/weapon/reagent_containers/glass/rag))
insert_rag(W, user)
return
if(rag && istype(W, /obj/item/weapon/flame))
rag.attackby(W, user)
return
..()
if(user.a_intent != I_HURT || !isGlass)
return ..()
force = 15 //Smashing bottles over someoen's head hurts.
var/obj/item/organ/external/affecting = user.zone_sel.selecting //Find what the player is aiming at
var/armor_block = 0 //Get the target's armour values for normal attack damage.
var/armor_duration = 0 //The more force the bottle has, the longer the duration.
//Calculating duration and calculating damage.
armor_block = target.run_armor_check(affecting, "melee")
armor_duration = duration + force - target.getarmor(affecting, "melee")
//Apply the damage!
target.apply_damage(force, BRUTE, affecting, armor_block, sharp=0)
// You are going to knock someone out for longer if they are not wearing a helmet.
if(affecting == "head" && istype(target, /mob/living/carbon/))
//Display an attack message.
for(var/mob/O in viewers(user, null))
if(target != user) O.show_message(text("\red <B>[target] has been hit over the head with a bottle of [src.name], by [user]!</B>"), 1)
else O.show_message(text("\red <B>[target] hit \himself with a bottle of [src.name] on the head!</B>"), 1)
//Weaken the target for the duration that we calculated and divide it by 5.
if(armor_duration)
target.apply_effect(min(armor_duration, 10) , WEAKEN, armor_block) // Never weaken more than a flash!
/obj/item/weapon/reagent_containers/food/drinks/bottle/attack_self(mob/user)
if(rag)
remove_rag(user)
else
//Default attack message and don't weaken the target.
for(var/mob/O in viewers(user, null))
if(target != user) O.show_message(text("\red <B>[target] has been attacked with a bottle of [src.name], by [user]!</B>"), 1)
else O.show_message(text("\red <B>[target] has attacked \himself with a bottle of [src.name]!</B>"), 1)
..()
//Attack logs
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Has attacked [target.name] ([target.ckey]) with a bottle!</font>")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been smashed with a bottle by [user.name] ([user.ckey])</font>")
msg_admin_attack("[user.name] ([user.ckey]) attacked [target.name] ([target.ckey]) with a bottle. (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
/obj/item/weapon/reagent_containers/food/drinks/bottle/proc/insert_rag(obj/item/weapon/reagent_containers/glass/rag/R, mob/user)
if(!isGlass || rag) return
if(user.unEquip(R))
user << "<span class='notice'>You stuff [R] into [src].</span>"
rag = R
rag.forceMove(src)
flags &= ~OPENCONTAINER
update_icon()
/obj/item/weapon/reagent_containers/food/drinks/bottle/proc/remove_rag(mob/user)
if(!rag) return
user.put_in_hands(rag)
rag = null
flags |= (initial(flags) & OPENCONTAINER)
update_icon()
/obj/item/weapon/reagent_containers/food/drinks/bottle/open(mob/user)
if(rag) return
..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/update_icon()
underlays.Cut()
if(rag)
var/underlay_image = image(icon='icons/obj/drinks.dmi', icon_state=rag.on_fire? "[rag_underlay]_lit" : rag_underlay)
underlays += underlay_image
copy_light(rag)
else
set_light(0)
/obj/item/weapon/reagent_containers/food/drinks/bottle/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
var/blocked = ..()
if(user.a_intent != I_HURT)
return
if(!smash_check(1))
return //won't always break on the first hit
// You are going to knock someone out for longer if they are not wearing a helmet.
var/weaken_duration = 0
if(blocked < 2)
weaken_duration = smash_duration + min(0, force - target.getarmor(hit_zone, "melee") + 10)
var/mob/living/carbon/human/H = target
if(istype(H) && H.headcheck(hit_zone))
var/obj/item/organ/affecting = H.get_organ(hit_zone) //headcheck should ensure that affecting is not null
user.visible_message("<span class='danger'>[user] smashes [src] into [H]'s [affecting.name]!</span>")
if(weaken_duration)
target.apply_effect(min(weaken_duration, 5), WEAKEN, blocked) // Never weaken more than a flash!
else
user.visible_message("<span class='danger'>\The [user] smashes [src] into [target]!</span>")
//The reagents in the bottle splash all over the target, thanks for the idea Nodrak
if(reagents)
user.visible_message("<span class='notice'>The contents of the [src] splash all over [target]!</span>")
user.visible_message("<span class='notice'>The contents of \the [src] splash all over [target]!</span>")
reagents.splash(target, reagents.total_volume)
//Finally, smash the bottle. This kills (qdel) the bottle.
src.smash(target, user)
return
var/obj/item/weapon/broken_bottle/B = smash(target.loc, target)
user.put_in_active_hand(B)
//Keeping this here for now, I'll ask if I should keep it here.
/obj/item/weapon/broken_bottle
@@ -96,8 +155,8 @@
desc = "A bottle with a sharp broken bottom."
icon = 'icons/obj/drinks.dmi'
icon_state = "broken_bottle"
force = 9.0
throwforce = 5.0
force = 9
throwforce = 5
throw_speed = 3
throw_range = 5
item_state = "beer"
@@ -264,6 +323,33 @@
..()
reagents.add_reagent("grenadine", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/cola
name = "\improper Space Cola"
desc = "Cola. in space"
icon_state = "colabottle"
center_of_mass = list("x"=16, "y"=6)
New()
..()
reagents.add_reagent("cola", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/space_up
name = "\improper Space-Up"
desc = "Tastes like a hull breach in your mouth."
icon_state = "space-up_bottle"
center_of_mass = list("x"=16, "y"=6)
New()
..()
reagents.add_reagent("space_up", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/space_mountain_wind
name = "\improper Space Mountain Wind"
desc = "Blows right through you like a space wind."
icon_state = "space_mountain_wind_bottle"
center_of_mass = list("x"=16, "y"=6)
New()
..()
reagents.add_reagent("spacemountainwind", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/pwine
name = "Warlock's Velvet"
desc = "What a delightful packaging for a surely high quality wine! The vintage must be amazing!"
@@ -319,6 +405,32 @@
..()
reagents.add_reagent("limejuice", 100)
//Small bottles
/obj/item/weapon/reagent_containers/food/drinks/bottle/small
volume = 50
smash_duration = 1
flags = 0 //starts closed
rag_underlay = "rag_small"
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer
name = "space beer"
desc = "Contains only water, malt and hops."
icon_state = "beer"
center_of_mass = list("x"=16, "y"=12)
New()
..()
reagents.add_reagent("beer", 30)
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/ale
name = "\improper Magm-Ale"
desc = "A true dorf's drink of choice."
icon_state = "alebottle"
item_state = "beer"
center_of_mass = list("x"=16, "y"=10)
New()
..()
reagents.add_reagent("ale", 30)
//aurora's drinks
/obj/item/weapon/reagent_containers/food/drinks/bottle/chartreusegreen
@@ -9,23 +9,14 @@
item_state = "beaker"
center_of_mass = list("x"=15, "y"=8)
unacidable = 1
New()
..()
reagents.add_reagent("slime", 50)
on_reagent_change()
if (reagents.reagent_list.len > 0)
switch(reagents.get_master_reagent_id())
if("slime")
icon_state = "jar_slime"
name = "slime jam"
desc = "A jar of slime jam. Delicious!"
else
icon_state ="jar_what"
name = "jar of something"
desc = "You can't really tell what this is."
else
icon_state = "jar"
name = "empty jar"
desc = "A jar. You're not sure what it's supposed to hold."
return
/obj/item/weapon/reagent_containers/food/drinks/jar/on_reagent_change()
if (reagents.reagent_list.len > 0)
icon_state ="jar_what"
name = "jar of something"
desc = "You can't really tell what this is."
else
icon_state = "jar"
name = "empty jar"
desc = "A jar. You're not sure what it's supposed to hold."
return
File diff suppressed because it is too large Load Diff
@@ -4,6 +4,7 @@
icon_state = "meat"
health = 180
filling_color = "#FF1C1C"
center_of_mass = list("x"=16, "y"=14)
New()
..()
reagents.add_reagent("protein", 9)
@@ -35,7 +35,6 @@
/obj/machinery/iv_drip,
/obj/machinery/disease2/incubator,
/obj/machinery/disposal,
/obj/machinery/apiary,
/mob/living/simple_animal/cow,
/mob/living/simple_animal/hostile/retaliate/goat,
/obj/machinery/computer/centrifuge,
@@ -222,20 +221,31 @@
flags = OPENCONTAINER
unacidable = 0
attackby(var/obj/D, mob/user as mob)
if(isprox(D))
user << "You add [D] to [src]."
qdel(D)
user.put_in_hands(new /obj/item/weapon/bucket_sensor)
user.drop_from_inventory(src)
qdel(src)
/obj/item/weapon/reagent_containers/glass/bucket/attackby(var/obj/D, mob/user as mob)
update_icon()
overlays.Cut()
if(isprox(D))
user << "You add [D] to [src]."
qdel(D)
user.put_in_hands(new /obj/item/weapon/bucket_sensor)
user.drop_from_inventory(src)
qdel(src)
return
else if(istype(D, /obj/item/weapon/mop))
if(reagents.total_volume < 1)
user << "<span class='warning'>\The [src] is empty!</span>"
else
reagents.trans_to_obj(D, 5)
user << "<span class='notice'>You wet \the [D] in \the [src].</span>"
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
return
else
return ..()
if (!is_open_container())
var/image/lid = image(icon, src, "lid_[initial(icon_state)]")
overlays += lid
/obj/item/weapon/reagent_containers/glass/bucket/update_icon()
overlays.Cut()
if (!is_open_container())
var/image/lid = image(icon, src, "lid_[initial(icon_state)]")
overlays += lid
/*
/obj/item/weapon/reagent_containers/glass/blender_jug
@@ -26,9 +26,19 @@
return
if (!istype(M))
return
if(!M.can_inject(user, 1))
return
var/mob/living/carbon/human/H = M
if(istype(H))
var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting)
if(!affected)
user << "<span class='danger'>\The [H] is missing that limb!</span>"
return
else if(affected.status & ORGAN_ROBOT)
user << "<span class='danger'>You cannot inject a robotic limb.</span>"
return
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN)
user.do_attack_animation(M)
user << "<span class='notice'>You inject [M] with [src].</span>"
M << "<span class='notice'>You feel a tiny prick!</span>"
@@ -18,18 +18,11 @@
icon_state = "pill[rand(1, 20)]"
attack(mob/M as mob, mob/user as mob, def_zone)
//TODO: replace with standard_feed_mob() call.
if(M == user)
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(H.species.flags & IS_SYNTHETIC)
H << "<span class='notice'>You have a monitor for a head, where do you think you're going to put that?</span>"
return
var/obj/item/blocked = H.check_mouth_coverage()
if(blocked)
user << "<span class='warning'>\The [blocked] is in the way!</span>"
return
if(!M.can_eat(src))
return
M << "<span class='notice'>You swallow \the [src].</span>"
M.drop_from_inventory(src) //icon update
@@ -39,20 +32,12 @@
return 1
else if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(H.species.flags & IS_SYNTHETIC)
H << "<span class='notice'>They have a monitor for a head, where do you think you're going to put that?</span>"
return
var/obj/item/blocked = H.check_mouth_coverage()
if(blocked)
user << "<span class='warning'>\The [blocked] is in the way!</span>"
if(!M.can_force_feed(user, src))
return
user.visible_message("<span class='warning'>[user] attempts to force [M] to swallow \the [src].</span>")
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
if(!do_mob(user, M))
return
@@ -52,6 +52,8 @@
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6)
user.setClickCooldown(4)
if(reagents.has_reagent("sacid"))
message_admins("[key_name_admin(user)] fired sulphuric acid from \a [src].")
log_game("[key_name(user)] fired sulphuric acid from \a [src].")
@@ -64,7 +66,7 @@
return
/obj/item/weapon/reagent_containers/spray/proc/Spray_at(atom/A as mob|obj, mob/user as mob, proximity)
if ((A.density || istype(A, /mob/living)) && proximity)//isHuman check allows the visible message to proc when spraying lying-down people and
if (A.density && proximity)
A.visible_message("[usr] sprays [A] with [src].")
reagents.splash(A, amount_per_transfer_from_this)
else
@@ -182,7 +184,7 @@
w_class = 3.0
possible_transfer_amounts = null
volume = 600
origin_tech = "combat=3;materials=3;engineering=3"
origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_ENGINEERING = 3)
/obj/item/weapon/reagent_containers/spray/chemsprayer/Spray_at(atom/A as mob|obj)
var/direction = get_dir(src, A)
@@ -144,13 +144,21 @@
user << "<span class='notice'>[target] is full.</span>"
return
var/mob/living/carbon/human/H = target
if(istype(H))
var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting)
if(!affected)
user << "<span class='danger'>\The [H] is missing that limb!</span>"
return
else if(affected.status & ORGAN_ROBOT)
user << "<span class='danger'>You cannot inject a robotic limb.</span>"
return
if(ismob(target) && target != user)
var/injtime = time //Injecting through a hardsuit takes longer due to needing to find a port.
if(istype(target, /mob/living/carbon/human))
var/mob/living/carbon/human/H = target
if(istype(H))
if(H.wear_suit)
if(istype(H.wear_suit, /obj/item/clothing/suit/space))
injtime = injtime * 2
@@ -174,6 +182,9 @@
else
user.visible_message("<span class='warning'>[user] begins hunting for an injection port on [target]'s suit!</span>")
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN)
user.do_attack_animation(target)
if(!do_mob(user, target, injtime))
return
@@ -235,7 +246,7 @@
var/hit_area = affecting.name
if((user != target) && H.check_shields(7, "the [src.name]"))
if((user != target) && H.check_shields(7, src, user, "\the [src]"))
return
if (target != user && H.getarmor(target_zone, "melee") > 5 && prob(50))
+2 -15
View File
@@ -7,7 +7,6 @@
icon_state = "watertank"
density = 1
anchored = 0
pressure_resistance = 2*ONE_ATMOSPHERE
var/amount_per_transfer_from_this = 10
var/possible_transfer_amounts = list(10,25,50,100)
@@ -59,11 +58,6 @@
else
return
blob_act()
if(prob(50))
new /obj/effect/effect/water(src.loc)
qdel(src)
@@ -101,7 +95,7 @@
if (modded)
user << "\red Fuel faucet is wrenched open, leaking the fuel!"
if(rig)
user << "<span class='notice'>There is some kind of device rigged to the tank."
user << "<span class='notice'>There is some kind of device rigged to the tank.</span>"
/obj/structure/reagent_dispensers/fueltank/attack_hand()
if (rig)
@@ -160,7 +154,7 @@
message_admins("[key_name_admin(user)] <font color=#FF0000>reset</font> fuse on fueltank at ([loc.x],[loc.y],[loc.z]).")
/obj/structure/reagent_dispensers/fueltank/bullet_act(var/obj/item/projectile/Proj)
if(Proj.damage_type == BRUTE || Proj.damage_type == BURN)
if(Proj.get_structure_damage())
if(istype(Proj.firer))
message_admins("[key_name_admin(Proj.firer)] shot fueltank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>JMP</a>).")
log_game("[key_name(Proj.firer)] shot fueltank at [loc.loc.name] ([loc.x],[loc.y],[loc.z]).")
@@ -168,9 +162,6 @@
if(!istype(Proj ,/obj/item/projectile/beam/lastertag) && !istype(Proj ,/obj/item/projectile/beam/practice) )
explode()
/obj/structure/reagent_dispensers/fueltank/blob_act()
explode()
/obj/structure/reagent_dispensers/fueltank/ex_act()
explode()
@@ -254,10 +245,6 @@
..()
reagents.add_reagent("beer",1000)
/obj/structure/reagent_dispensers/beerkeg/blob_act()
explosion(src.loc,0,3,5,7,10)
qdel(src)
/obj/structure/reagent_dispensers/virusfood
name = "Virus Food Dispenser"
desc = "A dispenser of virus food."