Merge branch 'master' into eldritch_affairs
This commit is contained in:
@@ -196,7 +196,7 @@
|
||||
return ""
|
||||
|
||||
|
||||
var/outstring = "|<a href=\"#[R.name]\"><h5 id=\"[R.name]\">!\[[R.color]\](https://placehold.it/15/[copytext(R.color, 2, 8)]/000000?text=+)[R.name]</h5></a> pH: [R.pH] | "
|
||||
var/outstring = "|<a href=\"#[R.name]\"><h5 id=\"[R.name]\">!\[[R.color]\](https://placehold.it/15/[copytext_char(R.color, 2, 8)]/000000?text=+)[R.name]</h5></a> pH: [R.pH] | "
|
||||
var/datum/reagent/R3
|
||||
if(CR)
|
||||
outstring += "<ul>"
|
||||
|
||||
@@ -61,8 +61,9 @@
|
||||
var/reactedVol = 0 //how much of the reagent is reacted during a fermireaction
|
||||
var/fermiIsReacting = FALSE //that prevents multiple reactions from occurring (i.e. add_reagent calls to process_reactions(), this stops any extra reactions.)
|
||||
var/fermiReactID //instance of the chem reaction used during a fermireaction, kept here so it's cache isn't lost between loops/procs.
|
||||
var/value_multiplier = DEFAULT_REAGENTS_VALUE //used for cargo reagents selling.
|
||||
|
||||
/datum/reagents/New(maximum=100, new_flags)
|
||||
/datum/reagents/New(maximum=100, new_flags = NONE, new_value = DEFAULT_REAGENTS_VALUE)
|
||||
maximum_volume = maximum
|
||||
|
||||
//I dislike having these here but map-objects are initialised before world/New() is called. >_>
|
||||
@@ -72,6 +73,7 @@
|
||||
build_chemical_reactions_list()
|
||||
|
||||
reagents_holder_flags = new_flags
|
||||
value_multiplier = new_value
|
||||
|
||||
/datum/reagents/Destroy()
|
||||
. = ..()
|
||||
@@ -171,7 +173,7 @@
|
||||
|
||||
return master
|
||||
|
||||
/datum/reagents/proc/trans_to(obj/target, amount=1, multiplier=1, preserve_data=1, no_react = 0)//if preserve_data=0, the reagents data will be lost. Usefull if you use data for some strange stuff and don't want it to be transferred.
|
||||
/datum/reagents/proc/trans_to(obj/target, amount = 1, multiplier = 1, preserve_data = 1, no_react = 0, log = FALSE)//if preserve_data=0, the reagents data will be lost. Usefull if you use data for some strange stuff and don't want it to be transferred.
|
||||
var/list/cached_reagents = reagent_list
|
||||
if(!target || !total_volume)
|
||||
return
|
||||
@@ -188,17 +190,23 @@
|
||||
amount = min(min(amount, src.total_volume), R.maximum_volume-R.total_volume)
|
||||
var/part = amount / src.total_volume
|
||||
var/trans_data = null
|
||||
var/list/transferred = list()
|
||||
for(var/reagent in cached_reagents)
|
||||
var/datum/reagent/T = reagent
|
||||
var/transfer_amount = T.volume * part
|
||||
if(preserve_data)
|
||||
trans_data = copy_data(T)
|
||||
|
||||
transferred += "[T] - [transfer_amount]"
|
||||
|
||||
R.add_reagent(T.type, transfer_amount * multiplier, trans_data, chem_temp, T.purity, pH, no_react = TRUE, ignore_pH = TRUE) //we only handle reaction after every reagent has been transfered.
|
||||
|
||||
remove_reagent(T.type, transfer_amount, ignore_pH = TRUE)
|
||||
|
||||
if(log && amount > 0)
|
||||
var/atom/us = my_atom
|
||||
var/atom/them = R.my_atom
|
||||
var/location_string = "FROM [(us && "[us] ([REF(us)]) [COORD(us)]") || "NULL"] TO [(them && "[them] ([REF(them)]) [COORD(them)]") || "NULL"]"
|
||||
log_reagent_transfer("[location_string] - [key_name(usr)][istext(log) ? " - [log]" : ""]: trans_to with arguments [target] [amount] [multiplier] [preserve_data] [no_react] and reagents [english_list(transferred)]")
|
||||
|
||||
update_total()
|
||||
R.update_total()
|
||||
if(!no_react)
|
||||
@@ -237,7 +245,7 @@
|
||||
src.handle_reactions()
|
||||
return amount
|
||||
|
||||
/datum/reagents/proc/trans_id_to(obj/target, reagent, amount=1, preserve_data=1)//Not sure why this proc didn't exist before. It does now! /N
|
||||
/datum/reagents/proc/trans_id_to(obj/target, reagent, amount = 1, preserve_data = TRUE, log = FALSE)//Not sure why this proc didn't exist before. It does now! /N
|
||||
var/list/cached_reagents = reagent_list
|
||||
if (!target)
|
||||
return
|
||||
@@ -257,8 +265,12 @@
|
||||
if(preserve_data)
|
||||
trans_data = current_reagent.data
|
||||
R.add_reagent(current_reagent.type, amount, trans_data, chem_temp, current_reagent.purity, pH, no_react = TRUE)
|
||||
|
||||
remove_reagent(current_reagent.type, amount, 1)
|
||||
if(log && amount > 0)
|
||||
var/atom/us = my_atom
|
||||
var/atom/them = R.my_atom
|
||||
var/location_string = "FROM [(us && "[us] ([REF(us)]) [COORD(us)]") || "NULL"] TO [(them && "[them] ([REF(them)]) [COORD(them)]") || "NULL"]"
|
||||
log_reagent_transfer("[location_string] - [key_name(usr)][istext(log) ? " - [log]" : ""]: trans_id_to with arguments [target] [reagent] [amount] [preserve_data]")
|
||||
break
|
||||
|
||||
src.update_total()
|
||||
@@ -1137,10 +1149,10 @@
|
||||
|
||||
// Convenience proc to create a reagents holder for an atom
|
||||
// Max vol is maximum volume of holder
|
||||
/atom/proc/create_reagents(max_vol, flags)
|
||||
/atom/proc/create_reagents(max_vol, flags, new_value)
|
||||
if(reagents)
|
||||
qdel(reagents)
|
||||
reagents = new/datum/reagents(max_vol, flags)
|
||||
reagents = new/datum/reagents(max_vol, flags, new_value)
|
||||
reagents.my_atom = src
|
||||
|
||||
/proc/get_random_reagent_id() // Returns a random reagent type minus blacklisted reagents
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
var/working_state = "dispenser_working"
|
||||
var/nopower_state = "dispenser_nopower"
|
||||
var/has_panel_overlay = TRUE
|
||||
var/macrotier = 1
|
||||
var/obj/item/reagent_containers/beaker = null
|
||||
//dispensable_reagents is copypasted in plumbing synthesizers. Please update accordingly. (I didn't make it global because that would limit custom chem dispensers)
|
||||
var/list/dispensable_reagents = list(
|
||||
/datum/reagent/hydrogen,
|
||||
/datum/reagent/lithium,
|
||||
@@ -61,7 +61,7 @@
|
||||
/datum/reagent/bromine,
|
||||
/datum/reagent/stable_plasma
|
||||
)
|
||||
//these become available once upgraded.
|
||||
//These become available once upgraded.
|
||||
var/list/upgrade_reagents = list(
|
||||
/datum/reagent/oil,
|
||||
/datum/reagent/ammonia,
|
||||
@@ -87,11 +87,13 @@
|
||||
/datum/reagent/toxin/histamine,
|
||||
/datum/reagent/medicine/morphine
|
||||
)
|
||||
var/list/recording_recipe
|
||||
|
||||
var/list/saved_recipes = list()
|
||||
|
||||
/obj/machinery/chem_dispenser/Initialize()
|
||||
. = ..()
|
||||
dispensable_reagents = sortList(dispensable_reagents, /proc/cmp_reagents_asc)
|
||||
if(emagged_reagents)
|
||||
emagged_reagents = sortList(emagged_reagents, /proc/cmp_reagents_asc)
|
||||
if(upgrade_reagents)
|
||||
@@ -116,15 +118,6 @@
|
||||
. += "<span class='notice'>The status display reads:\n\
|
||||
Recharging <b>[recharge_amount]</b> power units per interval.\n\
|
||||
Power efficiency increased by <b>[round((powerefficiency*1000)-100, 1)]%</b>.</span>"
|
||||
switch(macrotier)
|
||||
if(1)
|
||||
. += "<span class='notice'>Macro granularity at <b>5u</b>.<span>"
|
||||
if(2)
|
||||
. += "<span class='notice'>Macro granularity at <b>3u</b>.<span>"
|
||||
if(3)
|
||||
. += "<span class='notice'>Macro granularity at <b>2u</b>.<span>"
|
||||
if(4)
|
||||
. += "<span class='notice'>Macro granularity at <b>1u</b>.<span>"
|
||||
|
||||
/obj/machinery/chem_dispenser/process()
|
||||
if (recharge_counter >= 4)
|
||||
@@ -160,7 +153,6 @@
|
||||
beaker_overlay = display_beaker()
|
||||
add_overlay(beaker_overlay)
|
||||
|
||||
|
||||
/obj/machinery/chem_dispenser/emag_act(mob/user)
|
||||
. = ..()
|
||||
if(obj_flags & EMAGGED)
|
||||
@@ -225,8 +217,7 @@
|
||||
data["beakerTransferAmounts"] = null
|
||||
data["beakerCurrentpH"] = null
|
||||
|
||||
var/chemicals[0]
|
||||
var/recipes[0]
|
||||
var/list/chemicals = list()
|
||||
var/is_hallucinating = FALSE
|
||||
if(user.hallucinating())
|
||||
is_hallucinating = TRUE
|
||||
@@ -237,10 +228,10 @@
|
||||
if(is_hallucinating && prob(5))
|
||||
chemname = "[pick_list_replacements("hallucination.json", "chemicals")]"
|
||||
chemicals.Add(list(list("title" = chemname, "id" = ckey(temp.name))))
|
||||
for(var/recipe in saved_recipes)
|
||||
recipes.Add(list(recipe))
|
||||
data["chemicals"] = chemicals
|
||||
data["recipes"] = recipes
|
||||
data["recipes"] = saved_recipes
|
||||
|
||||
data["recordingRecipe"] = recording_recipe
|
||||
return data
|
||||
|
||||
/obj/machinery/chem_dispenser/ui_act(action, params)
|
||||
@@ -258,21 +249,25 @@
|
||||
if("dispense")
|
||||
if(!is_operational() || QDELETED(cell))
|
||||
return
|
||||
var/reagent = GLOB.name2reagent[params["reagent"]]
|
||||
if(beaker && dispensable_reagents.Find(reagent))
|
||||
var/datum/reagents/R = beaker.reagents
|
||||
var/free = R.maximum_volume - R.total_volume
|
||||
var/actual = min(amount, (cell.charge * powerefficiency)*10, free)
|
||||
var/reagent_name = params["reagent"]
|
||||
if(!recording_recipe)
|
||||
var/reagent = GLOB.name2reagent[reagent_name]
|
||||
if(beaker && dispensable_reagents.Find(reagent))
|
||||
var/datum/reagents/R = beaker.reagents
|
||||
var/free = R.maximum_volume - R.total_volume
|
||||
var/actual = min(amount, (cell.charge * powerefficiency)*10, free)
|
||||
|
||||
if(!cell.use(actual / powerefficiency))
|
||||
say("Not enough energy to complete operation!")
|
||||
return
|
||||
R.add_reagent(reagent, actual)
|
||||
if(!cell.use(actual / powerefficiency))
|
||||
say("Not enough energy to complete operation!")
|
||||
return
|
||||
R.add_reagent(reagent, actual)
|
||||
|
||||
work_animation()
|
||||
. = TRUE
|
||||
work_animation()
|
||||
else
|
||||
recording_recipe[reagent_name] += amount
|
||||
. = TRUE
|
||||
if("remove")
|
||||
if(!is_operational())
|
||||
if(!is_operational() || recording_recipe)
|
||||
return
|
||||
var/amount = text2num(params["amount"])
|
||||
if(beaker && (amount in beaker.possible_transfer_amounts))
|
||||
@@ -285,57 +280,65 @@
|
||||
if("dispense_recipe")
|
||||
if(!is_operational() || QDELETED(cell))
|
||||
return
|
||||
var/recipe_to_use = params["recipe"]
|
||||
var/list/chemicals_to_dispense = process_recipe_list(recipe_to_use)
|
||||
var/res = get_macro_resolution()
|
||||
for(var/key in chemicals_to_dispense) // i suppose you could edit the list locally before passing it
|
||||
var/list/keysplit = splittext(key," ")
|
||||
var/r_id = GLOB.name2reagent[translate_legacy_chem_id(keysplit[1])]
|
||||
if(beaker && dispensable_reagents.Find(r_id)) // but since we verify we have the reagent, it'll be fine
|
||||
var/list/chemicals_to_dispense = saved_recipes[params["recipe"]]
|
||||
if(!LAZYLEN(chemicals_to_dispense))
|
||||
return
|
||||
for(var/key in chemicals_to_dispense)
|
||||
var/reagent = GLOB.name2reagent[translate_legacy_chem_id(key)]
|
||||
var/dispense_amount = chemicals_to_dispense[key]
|
||||
if(!dispensable_reagents.Find(reagent))
|
||||
return
|
||||
if(!recording_recipe)
|
||||
if(!beaker)
|
||||
return
|
||||
var/datum/reagents/R = beaker.reagents
|
||||
var/free = R.maximum_volume - R.total_volume
|
||||
var/actual = min(max(chemicals_to_dispense[key], res), (cell.charge * powerefficiency)*10, free)
|
||||
var/actual = min(dispense_amount, (cell.charge * powerefficiency)*10, free)
|
||||
if(actual)
|
||||
if(!cell.use(actual / powerefficiency))
|
||||
say("Not enough energy to complete operation!")
|
||||
return
|
||||
R.add_reagent(r_id, actual)
|
||||
R.add_reagent(reagent, actual)
|
||||
work_animation()
|
||||
else
|
||||
recording_recipe[key] += dispense_amount
|
||||
. = TRUE
|
||||
if("clear_recipes")
|
||||
if(!is_operational())
|
||||
return
|
||||
var/yesno = alert("Clear all recipes?",, "Yes","No")
|
||||
if(yesno == "Yes")
|
||||
saved_recipes = list()
|
||||
if("add_recipe")
|
||||
. = TRUE
|
||||
if("record_recipe")
|
||||
if(!is_operational())
|
||||
return
|
||||
recording_recipe = list()
|
||||
. = TRUE
|
||||
if("save_recording")
|
||||
if(!is_operational())
|
||||
return
|
||||
var/name = stripped_input(usr,"Name","What do you want to name this recipe?", "Recipe", MAX_NAME_LEN)
|
||||
var/recipe = stripped_input(usr,"Recipe","Insert recipe with chem IDs")
|
||||
if(!usr.canUseTopic(src, !issilicon(usr)))
|
||||
if(!usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
|
||||
return
|
||||
if(name && recipe)
|
||||
var/list/first_process = splittext(recipe, ";")
|
||||
if(!LAZYLEN(first_process))
|
||||
return
|
||||
var/res = get_macro_resolution()
|
||||
var/resmismatch = FALSE
|
||||
for(var/reagents in first_process)
|
||||
var/list/reagent = splittext(reagents, "=")
|
||||
var/reagent_id = GLOB.name2reagent[translate_legacy_chem_id(reagent[1])]
|
||||
if(dispensable_reagents.Find(reagent_id))
|
||||
if (!resmismatch && !check_macro_part(reagents, res))
|
||||
resmismatch = TRUE
|
||||
continue
|
||||
else
|
||||
var/chemid = reagent[1]
|
||||
if(saved_recipes[name] && alert("\"[name]\" already exists, do you want to overwrite it?",, "Yes", "No") == "No")
|
||||
return
|
||||
if(name && recording_recipe)
|
||||
for(var/reagent in recording_recipe)
|
||||
var/reagent_id = GLOB.name2reagent[translate_legacy_chem_id(reagent)]
|
||||
if(!dispensable_reagents.Find(reagent_id))
|
||||
visible_message("<span class='warning'>[src] buzzes.</span>", "<span class='italics'>You hear a faint buzz.</span>")
|
||||
to_chat(usr, "<span class ='danger'>[src] cannot find Chemical ID: <b>[chemid]</b>!</span>")
|
||||
to_chat(usr, "<span class ='danger'>[src] cannot find <b>[reagent]</b>!</span>")
|
||||
playsound(src, 'sound/machines/buzz-two.ogg', 50, 1)
|
||||
return
|
||||
if (resmismatch && alert("[src] is not yet capable of replicating this recipe with the precision it needs, do you want to save it anyway?",, "Yes","No") == "No")
|
||||
return
|
||||
saved_recipes += list(list("recipe_name" = name, "contents" = recipe))
|
||||
saved_recipes[name] = recording_recipe
|
||||
recording_recipe = null
|
||||
. = TRUE
|
||||
if("cancel_recording")
|
||||
if(!is_operational())
|
||||
return
|
||||
recording_recipe = null
|
||||
. = TRUE
|
||||
|
||||
/obj/machinery/chem_dispenser/attackby(obj/item/I, mob/user, params)
|
||||
if(default_unfasten_wrench(user, I))
|
||||
@@ -343,7 +346,6 @@
|
||||
if(default_deconstruction_screwdriver(user, icon_state, icon_state, I))
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(default_deconstruction_crowbar(I))
|
||||
return
|
||||
if(istype(I, /obj/item/reagent_containers) && !(I.item_flags & ABSTRACT) && I.is_open_container())
|
||||
@@ -384,7 +386,6 @@
|
||||
work_animation()
|
||||
visible_message("<span class='danger'>[src] malfunctions, spraying chemicals everywhere!</span>")
|
||||
|
||||
|
||||
/obj/machinery/chem_dispenser/RefreshParts()
|
||||
recharge_amount = initial(recharge_amount)
|
||||
var/newpowereff = 0.0666666
|
||||
@@ -395,13 +396,11 @@
|
||||
for(var/obj/item/stock_parts/capacitor/C in component_parts)
|
||||
recharge_amount *= C.rating
|
||||
for(var/obj/item/stock_parts/manipulator/M in component_parts)
|
||||
if (M.rating > macrotier)
|
||||
macrotier = M.rating
|
||||
if (M.rating > 1)
|
||||
if(M.rating > 1)
|
||||
dispensable_reagents |= upgrade_reagents
|
||||
if (M.rating > 2)
|
||||
if(M.rating > 2)
|
||||
dispensable_reagents |= upgrade_reagents2
|
||||
if (M.rating > 3)
|
||||
if(M.rating > 3)
|
||||
dispensable_reagents |= upgrade_reagents3
|
||||
powerefficiency = round(newpowereff, 0.01)
|
||||
|
||||
@@ -422,41 +421,14 @@
|
||||
cell = null
|
||||
if(beaker)
|
||||
beaker.forceMove(drop_location())
|
||||
beaker = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/chem_dispenser/proc/get_macro_resolution()
|
||||
. = 5
|
||||
if (macrotier > 1)
|
||||
. -= macrotier // 5 for tier1, 3 for 2, 2 for 3, 1 for 4.
|
||||
|
||||
/obj/machinery/chem_dispenser/proc/check_macro(macro)
|
||||
var/res = get_macro_resolution()
|
||||
for (var/reagent in splittext(trim(macro), ";"))
|
||||
if (!check_macro_part(reagent, res))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/chem_dispenser/proc/check_macro_part(var/part, var/res = get_macro_resolution())
|
||||
var/detail = splittext(part, "=")
|
||||
if (round(text2num(detail[2]), res) != text2num(detail[2]))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/chem_dispenser/proc/process_recipe_list(var/fucking_hell)
|
||||
var/list/key_list = list()
|
||||
var/list/final_list = list()
|
||||
var/list/first_process = splittext(fucking_hell, ";")
|
||||
for(var/reagents in first_process)
|
||||
var/list/fuck = splittext(reagents, "=")
|
||||
final_list += list(avoid_assoc_duplicate_keys(fuck[1],key_list) = text2num(fuck[2]))
|
||||
return final_list
|
||||
|
||||
/obj/machinery/chem_dispenser/AltClick(mob/living/user)
|
||||
. = ..()
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
replace_beaker(user)
|
||||
return TRUE
|
||||
if(istype(user) && user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
replace_beaker(user)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/chem_dispenser/drinks/Initialize()
|
||||
. = ..()
|
||||
@@ -540,7 +512,6 @@
|
||||
/datum/reagent/toxin/staminatoxin
|
||||
)
|
||||
|
||||
|
||||
/obj/machinery/chem_dispenser/drinks/fullupgrade //fully ugpraded stock parts, emagged
|
||||
desc = "Contains a large reservoir of soft drinks. This model has had its safeties shorted out."
|
||||
obj_flags = CAN_BE_HIT | EMAGGED
|
||||
@@ -646,7 +617,7 @@
|
||||
/datum/reagent/ammonia,
|
||||
/datum/reagent/ash,
|
||||
/datum/reagent/diethylamine)
|
||||
//same as above.
|
||||
//same as above.
|
||||
upgrade_reagents = null
|
||||
upgrade_reagents2 = null
|
||||
upgrade_reagents3 = null
|
||||
@@ -743,4 +714,4 @@
|
||||
component_parts += new /obj/item/stock_parts/manipulator/femto(null)
|
||||
component_parts += new /obj/item/stack/sheet/glass(null)
|
||||
component_parts += new /obj/item/stock_parts/cell/bluespace(null)
|
||||
RefreshParts()
|
||||
RefreshParts()
|
||||
@@ -155,4 +155,4 @@
|
||||
if("eject")
|
||||
on = FALSE
|
||||
replace_beaker(usr)
|
||||
. = TRUE
|
||||
. = TRUE
|
||||
@@ -261,7 +261,7 @@
|
||||
return
|
||||
vol_each = min(reagents.total_volume / amount, 50)
|
||||
var/name = html_decode(stripped_input(usr,"Name:","Name your pill!", "[reagents.get_master_reagent_name()] ([vol_each]u)", MAX_NAME_LEN))
|
||||
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr)))
|
||||
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
|
||||
return
|
||||
var/obj/item/reagent_containers/pill/P
|
||||
var/target_loc = drop_location()
|
||||
@@ -288,7 +288,7 @@
|
||||
reagents.trans_to(P,vol_each)
|
||||
else
|
||||
var/name = html_decode(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, !issilicon(usr)))
|
||||
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
|
||||
return
|
||||
var/obj/item/reagent_containers/food/condiment/pack/P = new/obj/item/reagent_containers/food/condiment/pack(drop_location())
|
||||
|
||||
@@ -314,7 +314,7 @@
|
||||
return
|
||||
vol_each = min(reagents.total_volume / amount, 40)
|
||||
var/name = html_decode(stripped_input(usr,"Name:","Name your patch!", "[reagents.get_master_reagent_name()] ([vol_each]u)", MAX_NAME_LEN))
|
||||
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr)))
|
||||
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
|
||||
return
|
||||
var/obj/item/reagent_containers/pill/P
|
||||
|
||||
@@ -332,7 +332,7 @@
|
||||
|
||||
if(condi)
|
||||
var/name = html_decode(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, !issilicon(usr)))
|
||||
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
|
||||
return
|
||||
var/obj/item/reagent_containers/food/condiment/P = new(drop_location())
|
||||
P.originalname = name
|
||||
@@ -345,7 +345,7 @@
|
||||
amount_full = round(reagents.total_volume / 30)
|
||||
vol_part = ((reagents.total_volume*1000) % 30000) / 1000 //% operator doesn't support decimals.
|
||||
var/name = html_decode(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, !issilicon(usr)))
|
||||
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
|
||||
return
|
||||
|
||||
var/obj/item/reagent_containers/glass/bottle/P
|
||||
@@ -373,7 +373,7 @@
|
||||
amount_full = round(reagents.total_volume / 60)
|
||||
vol_part = reagents.total_volume % 60
|
||||
var/name = html_decode(stripped_input(usr, "Name:","Name your hypovial!", (reagents.total_volume ? reagents.get_master_reagent_name() : " "), MAX_NAME_LEN))
|
||||
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr)))
|
||||
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
|
||||
return
|
||||
|
||||
var/obj/item/reagent_containers/glass/bottle/vial/small/P
|
||||
@@ -408,7 +408,7 @@
|
||||
vol_each = min(reagents.total_volume / amount, 20)
|
||||
|
||||
var/name = html_decode(stripped_input(usr,"Name:","Name your SmartDart!", "[reagents.get_master_reagent_name()] ([vol_each]u)", MAX_NAME_LEN))
|
||||
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr)))
|
||||
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !hasSiliconAccessInArea(usr)))
|
||||
return
|
||||
|
||||
var/obj/item/reagent_containers/syringe/dart/D
|
||||
@@ -525,4 +525,4 @@
|
||||
condi = TRUE
|
||||
|
||||
#undef PILL_STYLE_COUNT
|
||||
#undef RANDOM_PILL_STYLE
|
||||
#undef RANDOM_PILL_STYLE
|
||||
@@ -12,7 +12,6 @@
|
||||
idle_power_usage = 20
|
||||
resistance_flags = ACID_PROOF
|
||||
var/wait
|
||||
var/mode = MAIN_SCREEN
|
||||
var/datum/symptom/selected_symptom
|
||||
var/obj/item/reagent_containers/beaker
|
||||
|
||||
@@ -56,18 +55,14 @@
|
||||
if(istype(D, /datum/disease/advance))
|
||||
var/datum/disease/advance/A = D
|
||||
var/disease_name = SSdisease.get_disease_name(A.GetDiseaseID())
|
||||
if((disease_name == "Unknown") && A.mutable)
|
||||
this["can_rename"] = TRUE
|
||||
this["can_rename"] = ((disease_name == "Unknown") && A.mutable)
|
||||
this["name"] = disease_name
|
||||
this["is_adv"] = TRUE
|
||||
this["symptoms"] = list()
|
||||
var/symptom_index = 1
|
||||
for(var/symptom in A.symptoms)
|
||||
var/datum/symptom/S = symptom
|
||||
var/list/this_symptom = list()
|
||||
this_symptom["name"] = S.name
|
||||
this_symptom["sym_index"] = symptom_index
|
||||
symptom_index++
|
||||
this_symptom = get_symptom_data(S)
|
||||
this["symptoms"] += list(this_symptom)
|
||||
this["resistance"] = A.totalResistance()
|
||||
this["stealth"] = A.totalStealth()
|
||||
@@ -128,29 +123,28 @@
|
||||
/obj/machinery/computer/pandemic/ui_interact(mob/user, ui_key = "main", datum/tgui/ui, force_open = FALSE, datum/tgui/master_ui, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "pandemic", name, 700, 500, master_ui, state)
|
||||
ui = new(user, src, ui_key, "pandemic", name, 520, 550, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/pandemic/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["is_ready"] = !wait
|
||||
data["mode"] = mode
|
||||
switch(mode)
|
||||
if(MAIN_SCREEN)
|
||||
if(beaker)
|
||||
data["has_beaker"] = TRUE
|
||||
if(!beaker.reagents.total_volume || !beaker.reagents.reagent_list)
|
||||
data["beaker_empty"] = TRUE
|
||||
var/datum/reagent/blood/B = locate() in beaker.reagents.reagent_list
|
||||
if(B)
|
||||
data["has_blood"] = TRUE
|
||||
data[/datum/reagent/blood] = list()
|
||||
data[/datum/reagent/blood]["dna"] = B.data["blood_DNA"] || "none"
|
||||
data[/datum/reagent/blood]["type"] = B.data["blood_type"] || "none"
|
||||
data["viruses"] = get_viruses_data(B)
|
||||
data["resistances"] = get_resistance_data(B)
|
||||
if(SYMPTOM_DETAILS)
|
||||
data["symptom"] = get_symptom_data(selected_symptom)
|
||||
if(beaker)
|
||||
data["has_beaker"] = TRUE
|
||||
data["beaker_empty"] = (!beaker.reagents.total_volume || !beaker.reagents.reagent_list)
|
||||
var/datum/reagent/blood/B = locate() in beaker.reagents.reagent_list
|
||||
if(B)
|
||||
data["has_blood"] = TRUE
|
||||
data[/datum/reagent/blood] = list()
|
||||
data[/datum/reagent/blood]["dna"] = B.data["blood_DNA"] || "none"
|
||||
data[/datum/reagent/blood]["type"] = B.data["blood_type"] || "none"
|
||||
data["viruses"] = get_viruses_data(B)
|
||||
data["resistances"] = get_resistance_data(B)
|
||||
else
|
||||
data["has_blood"] = FALSE
|
||||
else
|
||||
data["has_beaker"] = FALSE
|
||||
data["has_blood"] = FALSE
|
||||
|
||||
return data
|
||||
|
||||
@@ -176,7 +170,7 @@
|
||||
if(!A.mutable)
|
||||
return
|
||||
if(A)
|
||||
var/new_name = stripped_input(usr, "Name the disease", "New name", "", MAX_NAME_LEN)
|
||||
var/new_name = sanitize_name(html_encode(params["name"]))
|
||||
if(!new_name || ..())
|
||||
return
|
||||
A.AssignName(new_name)
|
||||
@@ -187,41 +181,31 @@
|
||||
if(!istype(A) || !A.mutable)
|
||||
to_chat(usr, "<span class='warning'>ERROR: Cannot replicate virus strain.</span>")
|
||||
return
|
||||
wait = TRUE
|
||||
addtimer(CALLBACK(src, .proc/reset_replicator_cooldown), 50)
|
||||
A = A.Copy()
|
||||
var/list/data = list("blood_DNA" = "UNKNOWN DNA", "blood_type" = "SY", "viruses" = list(A))
|
||||
var/obj/item/reagent_containers/glass/bottle/B = new(drop_location())
|
||||
B.name = "[A.name] culture bottle"
|
||||
B.desc = "A small bottle. Contains [A.agent] culture in synthblood medium."
|
||||
B.reagents.add_reagent(/datum/reagent/blood, 20, data)
|
||||
wait = TRUE
|
||||
B.reagents.add_reagent(/datum/reagent/blood/synthetics, 10, data)
|
||||
update_icon()
|
||||
var/turf/source_turf = get_turf(src)
|
||||
log_virus("A culture bottle was printed for the virus [A.admin_details()] at [loc_name(source_turf)] by [key_name(usr)]")
|
||||
addtimer(CALLBACK(src, .proc/reset_replicator_cooldown), 50)
|
||||
|
||||
. = TRUE
|
||||
if("create_vaccine_bottle")
|
||||
wait = TRUE
|
||||
addtimer(CALLBACK(src, .proc/reset_replicator_cooldown), 400)
|
||||
var/id = params["index"]
|
||||
var/datum/disease/D = SSdisease.archive_diseases[id]
|
||||
var/obj/item/reagent_containers/glass/bottle/B = new(drop_location())
|
||||
B.name = "[D.name] vaccine bottle"
|
||||
B.reagents.add_reagent(/datum/reagent/vaccine, 15, list(id))
|
||||
wait = TRUE
|
||||
|
||||
update_icon()
|
||||
addtimer(CALLBACK(src, .proc/reset_replicator_cooldown), 200)
|
||||
|
||||
. = TRUE
|
||||
if("symptom_details")
|
||||
var/picked_symptom_index = text2num(params["picked_symptom"])
|
||||
var/index = text2num(params["index"])
|
||||
var/datum/disease/advance/A = get_by_index("viruses", index)
|
||||
var/datum/symptom/S = A.symptoms[picked_symptom_index]
|
||||
mode = SYMPTOM_DETAILS
|
||||
selected_symptom = S
|
||||
. = TRUE
|
||||
if("back")
|
||||
mode = MAIN_SCREEN
|
||||
selected_symptom = null
|
||||
. = TRUE
|
||||
|
||||
|
||||
/obj/machinery/computer/pandemic/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/reagent_containers) && !(I.item_flags & ABSTRACT) && I.is_open_container())
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
/obj/machinery/reagentgrinder/ui_interact(mob/user) // The microwave Menu //I am reasonably certain that this is not a microwave
|
||||
. = ..()
|
||||
|
||||
if(operating || !user.canUseTopic(src, !issilicon(user)))
|
||||
if(operating || !user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
return
|
||||
|
||||
var/list/options = list()
|
||||
@@ -170,10 +170,10 @@
|
||||
for(var/key in options)
|
||||
choice = key
|
||||
else
|
||||
choice = show_radial_menu(user, src, options, require_near = !issilicon(user))
|
||||
choice = show_radial_menu(user, src, options, require_near = !hasSiliconAccessInArea(user))
|
||||
|
||||
// post choice verification
|
||||
if(operating || (isAI(user) && stat & NOPOWER) || !user.canUseTopic(src, !issilicon(user)))
|
||||
if(operating || (isAI(user) && stat & NOPOWER) || !user.canUseTopic(src, !hasSiliconAccessInArea(user)))
|
||||
return
|
||||
|
||||
switch(choice)
|
||||
@@ -190,7 +190,7 @@
|
||||
|
||||
/obj/machinery/reagentgrinder/examine(mob/user)
|
||||
. = ..()
|
||||
if(!in_range(user, src) && !issilicon(user) && !isobserver(user))
|
||||
if(!in_range(user, src) && !hasSiliconAccessInArea(user) && !isobserver(user))
|
||||
. += "<span class='warning'>You're too far away to examine [src]'s contents and display!</span>"
|
||||
return
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "smoke_machine", name, 450, 350, master_ui, state)
|
||||
ui = new(user, src, ui_key, "smoke_machine", name, 350, 350, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/smoke_machine/ui_data(mob/user)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#define REM REAGENTS_EFFECT_MULTIPLIER
|
||||
|
||||
GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
|
||||
|
||||
/proc/build_name2reagent()
|
||||
|
||||
@@ -197,7 +197,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES)
|
||||
if(HAS_TRAIT(M, TRAIT_BLIND))
|
||||
if(eyes)
|
||||
eyes.Remove(M)
|
||||
eyes.Remove()
|
||||
eyes.forceMove(get_turf(M))
|
||||
to_chat(M, "<span class='userdanger'>You double over in pain as you feel your eyeballs liquify in your head!</span>")
|
||||
M.emote("scream")
|
||||
@@ -551,7 +551,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
value = 1
|
||||
|
||||
/datum/reagent/consumable/ethanol/screwdrivercocktail/on_mob_life(mob/living/carbon/M)
|
||||
if(M.mind && M.mind.assigned_role in list("Station Engineer", "Atmospheric Technician", "Chief Engineer")) //Engineers lose radiation poisoning at a massive rate.
|
||||
if(M.mind && (M.mind.assigned_role in list("Station Engineer", "Atmospheric Technician", "Chief Engineer"))) //Engineers lose radiation poisoning at a massive rate.
|
||||
M.radiation = max(M.radiation - 25, 0)
|
||||
return ..()
|
||||
|
||||
@@ -725,11 +725,15 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
var/dorf_mode
|
||||
|
||||
/datum/reagent/consumable/ethanol/manly_dorf/on_mob_metabolize(mob/living/M)
|
||||
var/real_dorf = isdwarf(M) //_species(H, /datum/species/dwarf)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.dna.check_mutation(DWARFISM) || HAS_TRAIT(H, TRAIT_ALCOHOL_TOLERANCE))
|
||||
if(H.dna.check_mutation(DWARFISM) || HAS_TRAIT(H, TRAIT_ALCOHOL_TOLERANCE) || real_dorf)
|
||||
to_chat(H, "<span class='notice'>Now THAT is MANLY!</span>")
|
||||
boozepwr = 5 //We've had worse in the mines
|
||||
if(real_dorf)
|
||||
boozepwr = 100 // Don't want dwarves to die because of a low booze power
|
||||
else
|
||||
boozepwr = 5 //We've had worse in the mines
|
||||
dorf_mode = TRUE
|
||||
|
||||
/datum/reagent/consumable/ethanol/manly_dorf/on_mob_life(mob/living/carbon/M)
|
||||
@@ -1509,6 +1513,23 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
M.stuttering = min(M.stuttering + 3, 3)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/cogchamp
|
||||
name = "CogChamp"
|
||||
description = "Now you can fill yourself with the power of Ratvar!"
|
||||
color = rgb(255, 201, 49)
|
||||
boozepwr = 10
|
||||
quality = DRINK_FANTASTIC
|
||||
taste_description = "a brass taste with a hint of oil"
|
||||
glass_icon_state = "cogchamp"
|
||||
glass_name = "CogChamp"
|
||||
glass_desc = "Not even Ratvar's Four Generals could withstand this! Qevax Jryy!"
|
||||
value = 8.13
|
||||
|
||||
/datum/reagent/consumable/ethanol/cogchamp/on_mob_life(mob/living/carbon/M)
|
||||
M.clockcultslurring = min(M.clockcultslurring + 3, 3)
|
||||
M.stuttering = min(M.stuttering + 3, 3)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/triple_sec
|
||||
name = "Triple Sec"
|
||||
description = "A sweet and vibrant orange liqueur."
|
||||
|
||||
@@ -383,7 +383,7 @@
|
||||
name = "Hot Chocolate"
|
||||
description = "Made with love! And coco beans."
|
||||
nutriment_factor = 3 * REAGENTS_METABOLISM
|
||||
color = "#403010" // rgb: 64, 48, 16
|
||||
color = "#660000" // rgb: 221, 202, 134
|
||||
taste_description = "creamy chocolate"
|
||||
glass_icon_state = "chocolateglass"
|
||||
glass_name = "glass of chocolate"
|
||||
|
||||
@@ -216,6 +216,14 @@
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/medicine/rezadone/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
. = ..()
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/patient = M
|
||||
if(reac_volume >= 5 && HAS_TRAIT_FROM(patient, TRAIT_HUSK, "burn") && patient.getFireLoss() < THRESHOLD_UNHUSK) //One carp yields 12u rezadone.
|
||||
patient.cure_husk("burn")
|
||||
patient.visible_message("<span class='nicegreen'>[patient]'s body rapidly absorbs moisture from the enviroment, taking on a more healthy appearance.")
|
||||
|
||||
/datum/reagent/medicine/spaceacillin
|
||||
name = "Spaceacillin"
|
||||
description = "Spaceacillin will prevent a patient from conventionally spreading any diseases they are currently infected with."
|
||||
@@ -436,6 +444,10 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
|
||||
if(show_message)
|
||||
to_chat(M, "<span class='danger'>You feel your burns and bruises healing! It stings like hell!</span>")
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "painful_medicine", /datum/mood_event/painful_medicine)
|
||||
//Has to be at less than THRESHOLD_UNHUSK burn damage and have 100 synthflesh before unhusking. Corpses dont metabolize.
|
||||
if(HAS_TRAIT_FROM(M, TRAIT_HUSK, "burn") && M.getFireLoss() < THRESHOLD_UNHUSK && M.reagents.has_reagent(/datum/reagent/medicine/synthflesh, 100))
|
||||
M.cure_husk("burn")
|
||||
M.visible_message("<span class='nicegreen'>Most of [M]'s burnt off or charred flesh has been restored.")
|
||||
..()
|
||||
|
||||
/datum/reagent/medicine/synthflesh/overdose_start(mob/living/M)
|
||||
@@ -982,7 +994,7 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
|
||||
|
||||
/datum/reagent/medicine/stimulants/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
L.add_movespeed_modifier(type, update=TRUE, priority=100, multiplicative_slowdown=-1, blacklisted_movetypes=(FLYING|FLOATING))
|
||||
L.add_movespeed_modifier(type, update=TRUE, priority=100, multiplicative_slowdown=-0.5, blacklisted_movetypes=(FLYING|FLOATING))
|
||||
|
||||
/datum/reagent/medicine/stimulants/on_mob_end_metabolize(mob/living/L)
|
||||
L.remove_movespeed_modifier(type)
|
||||
@@ -1470,14 +1482,14 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
|
||||
|
||||
/datum/reagent/medicine/polypyr //This is intended to be an ingredient in advanced chems.
|
||||
name = "Polypyrylium Oligomers"
|
||||
description = "A�purple mixture of short polyelectrolyte chains not easily synthesized in the laboratory. It is valued as an intermediate in the synthesis of the cutting edge pharmaceuticals."
|
||||
description = "A purple mixture of short polyelectrolyte chains not easily synthesized in the laboratory. It is valued as an intermediate in the synthesis of the cutting edge pharmaceuticals."
|
||||
reagent_state = SOLID
|
||||
color = "#9423FF"
|
||||
metabolization_rate = 0.25 * REAGENTS_METABOLISM
|
||||
overdose_threshold = 50
|
||||
taste_description = "numbing bitterness"
|
||||
|
||||
/datum/reagent/medicine/polypyr/on_mob_life(mob/living/carbon/M) //I w�nted a collection of small positive effects, this is as hard to obtain as coniine after all.
|
||||
/datum/reagent/medicine/polypyr/on_mob_life(mob/living/carbon/M) //I wanted a collection of small positive effects, this is as hard to obtain as coniine after all.
|
||||
M.adjustOrganLoss(ORGAN_SLOT_LUNGS, -0.25)
|
||||
M.adjustBruteLoss(-0.35, 0)
|
||||
if(prob(50))
|
||||
@@ -1499,4 +1511,3 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
|
||||
M.adjustOrganLoss(ORGAN_SLOT_LUNGS, 0.5)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
|
||||
@@ -93,8 +93,6 @@
|
||||
taste_description = "something spicy"
|
||||
pH = 6.85
|
||||
|
||||
|
||||
|
||||
/datum/reagent/blood/on_merge(list/mix_data)
|
||||
if(data && mix_data)
|
||||
if(data["blood_DNA"] != mix_data["blood_DNA"])
|
||||
@@ -131,16 +129,10 @@
|
||||
/datum/reagent/blood/synthetics
|
||||
data = list("donor"=null,"viruses"=null,"blood_DNA"="REPLICATED", "bloodcolor" = BLOOD_COLOR_SYNTHETIC, "blood_type"="SY","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null)
|
||||
name = "Synthetic Blood"
|
||||
description = "A synthetically produced imitation of blood."
|
||||
taste_description = "oily"
|
||||
color = BLOOD_COLOR_SYNTHETIC // rgb: 11, 7, 48
|
||||
|
||||
/datum/reagent/blood/lizard
|
||||
data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_LIZARD, "blood_type"="L","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null)
|
||||
name = "Lizard Blood"
|
||||
taste_description = "spicy"
|
||||
color = BLOOD_COLOR_LIZARD // rgb: 11, 7, 48
|
||||
pH = 6.85
|
||||
|
||||
/datum/reagent/blood/jellyblood
|
||||
data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_SLIME, "blood_type"="GEL","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null)
|
||||
name = "Slime Jelly Blood"
|
||||
@@ -150,29 +142,6 @@
|
||||
taste_mult = 1.3
|
||||
pH = 4
|
||||
|
||||
/datum/reagent/blood/xenomorph
|
||||
data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_XENO, "blood_type"="X*","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null)
|
||||
name = "Xenomorph Blood"
|
||||
taste_description = "acidic heresy"
|
||||
color = BLOOD_COLOR_XENO // greenish yellow ooze
|
||||
shot_glass_icon_state = "shotglassgreen"
|
||||
pH = 2.5
|
||||
|
||||
/datum/reagent/blood/oil
|
||||
data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_OIL, "blood_type"="HF","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null)
|
||||
name = "Hydraulic Blood"
|
||||
taste_description = "burnt oil"
|
||||
color = BLOOD_COLOR_OIL // dark, y'know, expected batman colors.
|
||||
pH = 9.75
|
||||
|
||||
/datum/reagent/blood/insect
|
||||
data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_BUG, "blood_type"="BUG","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null)
|
||||
name = "Insectoid Blood"
|
||||
taste_description = "waxy"
|
||||
color = BLOOD_COLOR_BUG // Bug colored, I guess.
|
||||
pH = 7.25
|
||||
|
||||
|
||||
/datum/reagent/blood/jellyblood/on_mob_life(mob/living/carbon/M)
|
||||
if(prob(10))
|
||||
if(M.dna?.species?.exotic_bloodtype != "GEL")
|
||||
@@ -338,8 +307,8 @@
|
||||
|
||||
/datum/reagent/water/holywater/on_mob_life(mob/living/carbon/M)
|
||||
if(!data)
|
||||
data = 1
|
||||
data++
|
||||
data = list("misc" = 1)
|
||||
data["misc"]++
|
||||
M.jitteriness = min(M.jitteriness+4,10)
|
||||
if(iscultist(M, FALSE, TRUE))
|
||||
for(var/datum/action/innate/cult/blood_magic/BM in M.actions)
|
||||
@@ -348,7 +317,7 @@
|
||||
to_chat(M, "<span class='cultlarge'>Your blood rites falter as holy water scours your body!</span>")
|
||||
for(var/datum/action/innate/cult/blood_spell/BS in BM.spells)
|
||||
qdel(BS)
|
||||
if(data >= 25) // 10 units, 45 seconds @ metabolism 0.4 units & tick rate 1.8 sec
|
||||
if(data["misc"] >= 25) // 10 units, 45 seconds @ metabolism 0.4 units & tick rate 1.8 sec
|
||||
if(!M.stuttering)
|
||||
M.stuttering = 1
|
||||
M.stuttering = min(M.stuttering+4, 10)
|
||||
@@ -369,7 +338,7 @@
|
||||
"You can't save him. Nothing can save him now", "It seems that Nar'Sie will triumph after all")].</span>")
|
||||
if("emote")
|
||||
M.visible_message("<span class='warning'>[M] [pick("whimpers quietly", "shivers as though cold", "glances around in paranoia")].</span>")
|
||||
if(data >= 60) // 30 units, 135 seconds
|
||||
if(data["misc"] >= 60) // 30 units, 135 seconds
|
||||
if(iscultist(M, FALSE, TRUE) || is_servant_of_ratvar(M, FALSE, TRUE))
|
||||
if(iscultist(M))
|
||||
SSticker.mode.remove_cultist(M.mind, FALSE, TRUE)
|
||||
@@ -540,9 +509,13 @@
|
||||
|
||||
if(MUTCOLORS in N.dna.species.species_traits) //take current alien color and darken it slightly
|
||||
var/newcolor = ""
|
||||
var/len = length(N.dna.features["mcolor"])
|
||||
for(var/i=1, i<=len, i+=1)
|
||||
var/ascii = text2ascii(N.dna.features["mcolor"],i)
|
||||
var/string = N.dna.features["mcolor"]
|
||||
var/len = length(string)
|
||||
var/char = ""
|
||||
var/ascii = 0
|
||||
for(var/i=1, i<=len, i += length(char))
|
||||
char = string[i]
|
||||
ascii = text2ascii(char)
|
||||
switch(ascii)
|
||||
if(48)
|
||||
newcolor += "0"
|
||||
@@ -553,7 +526,7 @@
|
||||
if(98 to 102)
|
||||
newcolor += ascii2text(ascii-1) //letters b to f lowercase
|
||||
if(65)
|
||||
newcolor +="9"
|
||||
newcolor += "9"
|
||||
if(66 to 70)
|
||||
newcolor += ascii2text(ascii+31) //letters B to F - translates to lowercase
|
||||
else
|
||||
@@ -766,7 +739,7 @@
|
||||
..()
|
||||
if(!istype(H))
|
||||
return
|
||||
if(!H.dna || !H.dna.species || !(MOB_ORGANIC in H.mob_biotypes))
|
||||
if(!H.dna || !H.dna.species || !(H.mob_biotypes & MOB_ORGANIC))
|
||||
return
|
||||
|
||||
if(isjellyperson(H))
|
||||
@@ -1058,7 +1031,7 @@
|
||||
if((HAS_TRAIT(C, TRAIT_NOMARROW)))
|
||||
return
|
||||
if(C.blood_volume < (BLOOD_VOLUME_NORMAL*C.blood_ratio))
|
||||
C.blood_volume += 0.01 //we'll have synthetics from medbay.
|
||||
C.blood_volume += 0.25
|
||||
..()
|
||||
|
||||
/datum/reagent/iron/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
@@ -2135,3 +2108,10 @@
|
||||
to_chat(M, "<span class='userlove'>You feel like playing with your [G.name]!</span>")
|
||||
|
||||
..()
|
||||
|
||||
/datum/reagent/preservahyde
|
||||
name = "Preservahyde"
|
||||
description = "A powerful preservation agent, utilizing the preservative effects of formaldehyde with significantly less of the histamine."
|
||||
reagent_state = LIQUID
|
||||
color = "#f7685e"
|
||||
metabolization_rate = REAGENTS_METABOLISM * 0.25
|
||||
|
||||
@@ -153,20 +153,37 @@
|
||||
color = "#669900" // rgb: 102, 153, 0
|
||||
toxpwr = 0.5
|
||||
taste_description = "death"
|
||||
var/fakedeath_active = FALSE
|
||||
pH = 13
|
||||
|
||||
/datum/reagent/toxin/zombiepowder/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
L.fakedeath(type)
|
||||
ADD_TRAIT(L, TRAIT_FAKEDEATH, type)
|
||||
|
||||
/datum/reagent/toxin/zombiepowder/on_mob_end_metabolize(mob/living/L)
|
||||
L.cure_fakedeath(type)
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/zombiepowder/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustOxyLoss(0.5*REM, 0)
|
||||
/datum/reagent/toxin/zombiepowder/reaction_mob(mob/living/L, method=TOUCH, reac_volume)
|
||||
L.adjustOxyLoss(0.5*REM, 0)
|
||||
if(method == INGEST)
|
||||
fakedeath_active = TRUE
|
||||
L.fakedeath(type)
|
||||
|
||||
/datum/reagent/toxin/zombiepowder/on_mob_life(mob/living/M)
|
||||
..()
|
||||
. = 1
|
||||
if(fakedeath_active)
|
||||
return TRUE
|
||||
switch(current_cycle)
|
||||
if(1 to 5)
|
||||
M.confused += 1
|
||||
M.drowsyness += 1
|
||||
M.slurring += 3
|
||||
if(5 to 8)
|
||||
M.adjustStaminaLoss(40, 0)
|
||||
if(9 to INFINITY)
|
||||
fakedeath_active = TRUE
|
||||
M.fakedeath(type)
|
||||
|
||||
/datum/reagent/toxin/ghoulpowder
|
||||
name = "Ghoul Powder"
|
||||
@@ -243,7 +260,7 @@
|
||||
|
||||
/datum/reagent/toxin/pestkiller/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
..()
|
||||
if(MOB_BUG in M.mob_biotypes)
|
||||
if(M.mob_biotypes & MOB_BUG)
|
||||
var/damage = min(round(0.4*reac_volume, 0.1),10)
|
||||
M.adjustToxLoss(damage)
|
||||
|
||||
|
||||
@@ -68,6 +68,10 @@
|
||||
results = list(/datum/reagent/medicine/synthflesh = 3)
|
||||
required_reagents = list(/datum/reagent/blood = 1, /datum/reagent/carbon = 1, /datum/reagent/medicine/styptic_powder = 1)
|
||||
|
||||
/datum/chemical_reaction/synthflesh/synthblood
|
||||
id = "synthflesh_2"
|
||||
required_reagents = list(/datum/reagent/blood/synthetics = 1, /datum/reagent/carbon = 1, /datum/reagent/medicine/styptic_powder = 1)
|
||||
|
||||
/datum/chemical_reaction/synthtissue
|
||||
name = "Synthtissue"
|
||||
id = /datum/reagent/synthtissue
|
||||
|
||||
@@ -47,6 +47,12 @@
|
||||
results = list(/datum/reagent/consumable/sodiumchloride = 3)
|
||||
required_reagents = list(/datum/reagent/water = 1, /datum/reagent/sodium = 1, /datum/reagent/chlorine = 1)
|
||||
|
||||
/datum/chemical_reaction/preservahyde
|
||||
name = "Preservahyde"
|
||||
id = "preservahyde"
|
||||
results = list(/datum/reagent/preservahyde = 3)
|
||||
required_reagents = list(/datum/reagent/water = 1, /datum/reagent/toxin/formaldehyde = 1, /datum/reagent/bromine = 1)
|
||||
|
||||
/datum/chemical_reaction/plasmasolidification
|
||||
name = "Solid Plasma"
|
||||
id = "solidplasma"
|
||||
@@ -228,7 +234,6 @@
|
||||
var/level_max = 2
|
||||
|
||||
/datum/chemical_reaction/mix_virus/on_reaction(datum/reagents/holder, multiplier)
|
||||
|
||||
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in holder.reagent_list
|
||||
if(B && B.data)
|
||||
var/datum/disease/advance/D = locate(/datum/disease/advance) in B.data["viruses"]
|
||||
@@ -236,94 +241,131 @@
|
||||
for(var/i in 1 to min(multiplier, 5))
|
||||
D.Evolve(level_min, level_max)
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_2
|
||||
/datum/chemical_reaction/mix_virus/synth
|
||||
id = "mixvirus_synth"
|
||||
required_catalysts = list(/datum/reagent/blood/synthetics = 1)
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_2
|
||||
name = "Mix Virus 2"
|
||||
id = "mixvirus2"
|
||||
required_reagents = list(/datum/reagent/toxin/mutagen = 1)
|
||||
level_min = 2
|
||||
level_max = 4
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_3
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_2/synth
|
||||
id = "mixvirus2_synth"
|
||||
required_catalysts = list(/datum/reagent/blood/synthetics = 1)
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_3
|
||||
name = "Mix Virus 3"
|
||||
id = "mixvirus3"
|
||||
required_reagents = list(/datum/reagent/toxin/plasma = 1)
|
||||
level_min = 4
|
||||
level_max = 6
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_4
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_3/synth
|
||||
id = "mixvirus3_synth"
|
||||
required_catalysts = list(/datum/reagent/blood/synthetics = 1)
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_4
|
||||
name = "Mix Virus 4"
|
||||
id = "mixvirus4"
|
||||
required_reagents = list(/datum/reagent/uranium = 1)
|
||||
level_min = 5
|
||||
level_max = 6
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_5
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_4/synth
|
||||
id = "mixvirus4_synth"
|
||||
required_catalysts = list(/datum/reagent/blood/synthetics = 1)
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_5
|
||||
name = "Mix Virus 5"
|
||||
id = "mixvirus5"
|
||||
required_reagents = list(/datum/reagent/toxin/mutagen/mutagenvirusfood = 1)
|
||||
level_min = 3
|
||||
level_max = 3
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_6
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_5/synth
|
||||
id = "mixvirus5_synth"
|
||||
required_catalysts = list(/datum/reagent/blood/synthetics = 1)
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_6
|
||||
name = "Mix Virus 6"
|
||||
id = "mixvirus6"
|
||||
required_reagents = list(/datum/reagent/toxin/mutagen/mutagenvirusfood/sugar = 1)
|
||||
level_min = 4
|
||||
level_max = 4
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_7
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_6/synth
|
||||
id = "mixvirus6_synth"
|
||||
required_catalysts = list(/datum/reagent/blood/synthetics = 1)
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_7
|
||||
name = "Mix Virus 7"
|
||||
id = "mixvirus7"
|
||||
required_reagents = list(/datum/reagent/toxin/plasma/plasmavirusfood/weak = 1)
|
||||
level_min = 5
|
||||
level_max = 5
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_8
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_7/synth
|
||||
id = "mixvirus7_synth"
|
||||
required_catalysts = list(/datum/reagent/blood/synthetics = 1)
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_8
|
||||
name = "Mix Virus 8"
|
||||
id = "mixvirus8"
|
||||
required_reagents = list(/datum/reagent/toxin/plasma/plasmavirusfood = 1)
|
||||
level_min = 6
|
||||
level_max = 6
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_9
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_8/synth
|
||||
id = "mixvirus8_synth"
|
||||
required_catalysts = list(/datum/reagent/blood/synthetics = 1)
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_9
|
||||
name = "Mix Virus 9"
|
||||
id = "mixvirus9"
|
||||
required_reagents = list(/datum/reagent/medicine/synaptizine/synaptizinevirusfood = 1)
|
||||
level_min = 1
|
||||
level_max = 1
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_10
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_9/synth
|
||||
id = "mixvirus9_synth"
|
||||
required_catalysts = list(/datum/reagent/blood/synthetics = 1)
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_10
|
||||
name = "Mix Virus 10"
|
||||
id = "mixvirus10"
|
||||
required_reagents = list(/datum/reagent/uranium/uraniumvirusfood = 1)
|
||||
level_min = 6
|
||||
level_max = 7
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_11
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_10/synth
|
||||
id = "mixvirus10_synth"
|
||||
required_catalysts = list(/datum/reagent/blood/synthetics = 1)
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_11
|
||||
name = "Mix Virus 11"
|
||||
id = "mixvirus11"
|
||||
required_reagents = list(/datum/reagent/uranium/uraniumvirusfood/unstable = 1)
|
||||
level_min = 7
|
||||
level_max = 7
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_12
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_11/synth
|
||||
id = "mixvirus11_synth"
|
||||
required_catalysts = list(/datum/reagent/blood/synthetics = 1)
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_12
|
||||
name = "Mix Virus 12"
|
||||
id = "mixvirus12"
|
||||
required_reagents = list(/datum/reagent/uranium/uraniumvirusfood/stable = 1)
|
||||
level_min = 8
|
||||
level_max = 8
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_12/synth
|
||||
id = "mixvirus12_synth"
|
||||
required_catalysts = list(/datum/reagent/blood/synthetics = 1)
|
||||
|
||||
/datum/chemical_reaction/mix_virus/rem_virus
|
||||
name = "Devolve Virus"
|
||||
id = "remvirus"
|
||||
@@ -338,6 +380,10 @@
|
||||
for(var/i in 1 to min(multiplier, 5))
|
||||
D.Devolve()
|
||||
|
||||
/datum/chemical_reaction/mix_virus/rem_virus/synth
|
||||
id = "remvirus_synth"
|
||||
required_catalysts = list(/datum/reagent/blood/synthetics = 1)
|
||||
|
||||
/datum/chemical_reaction/mix_virus/neuter_virus
|
||||
name = "Neuter Virus"
|
||||
id = "neutervirus"
|
||||
@@ -352,6 +398,10 @@
|
||||
for(var/i in 1 to min(multiplier, 5))
|
||||
D.Neuter()
|
||||
|
||||
/datum/chemical_reaction/mix_virus/neuter_virus/synth
|
||||
id = "neutervirus_synth"
|
||||
required_catalysts = list(/datum/reagent/blood/synthetics = 1)
|
||||
|
||||
////////////////////////////////// foam and foam precursor ///////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -743,3 +793,13 @@
|
||||
id = "blue_glitter_white"
|
||||
results = list(/datum/reagent/glitter/blue = 2)
|
||||
required_reagents = list(/datum/reagent/glitter/white = 1, /datum/reagent/colorful_reagent/crayonpowder/blue = 1)
|
||||
|
||||
//////////////////////////////////// Synthblood ///////////////////////////////////////////
|
||||
|
||||
/datum/chemical_reaction/synth_blood
|
||||
name = "Synthetic Blood"
|
||||
id = /datum/reagent/blood/synthetics
|
||||
results = list(/datum/reagent/blood/synthetics = 3)
|
||||
required_reagents = list(/datum/reagent/medicine/salglu_solution = 1, /datum/reagent/iron = 1, /datum/reagent/stable_plasma = 1)
|
||||
mix_message = "The mixture congeals and gives off a faint copper scent."
|
||||
required_temp = 350
|
||||
|
||||
@@ -70,6 +70,14 @@
|
||||
required_other = TRUE
|
||||
required_container = /obj/item/slime_extract/green
|
||||
|
||||
/datum/chemical_reaction/slime/slimemammal
|
||||
name = "Mammal Mutation Toxin"
|
||||
id = /datum/reagent/mutationtoxin/mammal
|
||||
results = list(/datum/reagent/mutationtoxin/mammal = 1)
|
||||
required_reagents = list(/datum/reagent/water = 1)
|
||||
required_other = TRUE
|
||||
required_container = /obj/item/slime_extract/green
|
||||
|
||||
//Metal
|
||||
/datum/chemical_reaction/slime/slimemetal
|
||||
name = "Slime Metal"
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
#define PH_WEAK (1 << 0)
|
||||
#define TEMP_WEAK (1 << 1)
|
||||
|
||||
/obj/item/reagent_containers
|
||||
name = "Container"
|
||||
desc = "..."
|
||||
@@ -9,14 +6,14 @@
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/amount_per_transfer_from_this = 5
|
||||
var/list/possible_transfer_amounts = list(5,10,15,20,25,30)
|
||||
var/APTFT_altclick = TRUE //will the set amount_per_transfer_from_this proc be called on AltClick() ?
|
||||
var/volume = 30
|
||||
var/reagent_flags
|
||||
var/reagent_flags = NONE //used to determine the reagent holder flags on add_initial_reagents()
|
||||
var/reagent_value = DEFAULT_REAGENTS_VALUE //same as above but for the holder value multiplier.
|
||||
var/list/list_reagents = null
|
||||
var/spawned_disease = null
|
||||
var/disease_amount = 20
|
||||
var/spillable = FALSE
|
||||
var/beaker_weakness_bitflag = NONE//Bitflag!
|
||||
var/container_flags = APTFT_ALTCLICK|APTFT_VERB //the container item flags
|
||||
var/container_HP = 2
|
||||
var/cached_icon
|
||||
|
||||
@@ -24,9 +21,9 @@
|
||||
. = ..()
|
||||
if(isnum(vol) && vol > 0)
|
||||
volume = vol
|
||||
if(length(possible_transfer_amounts))
|
||||
if(container_flags & APTFT_VERB && length(possible_transfer_amounts))
|
||||
verbs += /obj/item/reagent_containers/proc/set_APTFT
|
||||
create_reagents(volume, reagent_flags)
|
||||
create_reagents(volume, reagent_flags, reagent_value)
|
||||
if(spawned_disease)
|
||||
var/datum/disease/F = new spawned_disease()
|
||||
var/list/data = list("blood_DNA" = "UNKNOWN DNA", "blood_type" = "SY","viruses"= list(F))
|
||||
@@ -37,12 +34,12 @@
|
||||
. = ..()
|
||||
if(length(possible_transfer_amounts) > 1)
|
||||
. += "Currently transferring [amount_per_transfer_from_this] units per use."
|
||||
if(APTFT_altclick && user.Adjacent(src))
|
||||
if(container_flags & APTFT_ALTCLICK && user.Adjacent(src))
|
||||
. += "<span class='notice'>Alt-click it to set its transfer amount.</span>"
|
||||
|
||||
/obj/item/reagent_containers/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(APTFT_altclick && length(possible_transfer_amounts) > 1 && user.canUseTopic(src, BE_CLOSE, NO_DEXTERY))
|
||||
if(container_flags & APTFT_ALTCLICK && length(possible_transfer_amounts) > 1 && user.canUseTopic(src, BE_CLOSE, NO_DEXTERY))
|
||||
set_APTFT()
|
||||
return TRUE
|
||||
|
||||
@@ -109,11 +106,11 @@
|
||||
/obj/item/reagent_containers/proc/bartender_check(atom/target)
|
||||
. = FALSE
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T || target.CanPass(src, T) || !thrownby || !thrownby.actions)
|
||||
if(!T || !target.CanPass(src, T) || !thrownby || !thrownby.actions)
|
||||
return
|
||||
for(var/datum/action/innate/drink_fling/D in thrownby.actions)
|
||||
if(D.active)
|
||||
return TRUE
|
||||
var/datum/action/innate/D = get_action_of_type(thrownby, /datum/action/innate/drink_fling)
|
||||
if(D?.active)
|
||||
return TRUE
|
||||
|
||||
/obj/item/reagent_containers/proc/ForceResetRotation()
|
||||
transform = initial(transform)
|
||||
@@ -135,13 +132,14 @@
|
||||
if(thrownby)
|
||||
log_combat(thrownby, M, "splashed", R)
|
||||
reagents.reaction(target, TOUCH)
|
||||
|
||||
|
||||
else if(bartender_check(target) && thrown)
|
||||
visible_message("<span class='notice'>[src] lands onto the [target.name] without spilling a single drop.</span>")
|
||||
transform = initial(transform)
|
||||
addtimer(CALLBACK(src, .proc/ForceResetRotation), 1)
|
||||
return
|
||||
|
||||
|
||||
else
|
||||
if(isturf(target) && reagents.reagent_list.len && thrownby)
|
||||
log_combat(thrownby, target, "splashed (thrown) [english_list(reagents.reagent_list)]", "in [AREACOORD(target)]")
|
||||
@@ -157,7 +155,7 @@
|
||||
//melts plastic beakers
|
||||
/obj/item/reagent_containers/microwave_act(obj/machinery/microwave/M)
|
||||
reagents.expose_temperature(1000)
|
||||
if(beaker_weakness_bitflag & TEMP_WEAK)
|
||||
if(container_flags & TEMP_WEAK)
|
||||
var/list/seen = viewers(5, get_turf(src))
|
||||
var/iconhtml = icon2html(src, seen)
|
||||
for(var/mob/H in seen)
|
||||
@@ -172,13 +170,13 @@
|
||||
temp_check()
|
||||
|
||||
/obj/item/reagent_containers/proc/temp_check()
|
||||
if(beaker_weakness_bitflag & TEMP_WEAK)
|
||||
if(container_flags & TEMP_WEAK)
|
||||
if(reagents.chem_temp >= 444)//assuming polypropylene
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
//melts glass beakers
|
||||
/obj/item/reagent_containers/proc/pH_check()
|
||||
if(beaker_weakness_bitflag & PH_WEAK)
|
||||
if(container_flags & PH_WEAK)
|
||||
if((reagents.pH < 1.5) || (reagents.pH > 12.5))
|
||||
START_PROCESSING(SSobj, src)
|
||||
else if((reagents.pH < -3) || (reagents.pH > 17))
|
||||
@@ -192,7 +190,7 @@
|
||||
cached_icon = icon_state
|
||||
var/damage
|
||||
var/cause
|
||||
if(beaker_weakness_bitflag & PH_WEAK)
|
||||
if(container_flags & PH_WEAK)
|
||||
if(reagents.pH < 2)
|
||||
damage = (2 - reagents.pH)/20
|
||||
cause = "from the extreme pH"
|
||||
@@ -203,7 +201,7 @@
|
||||
cause = "from the extreme pH"
|
||||
playsound(get_turf(src), 'sound/FermiChem/bufferadd.ogg', 50, 1)
|
||||
|
||||
if(beaker_weakness_bitflag & TEMP_WEAK)
|
||||
if(container_flags & TEMP_WEAK)
|
||||
if(reagents.chem_temp >= 444)
|
||||
if(damage)
|
||||
damage += (reagents.chem_temp/444)/5
|
||||
|
||||
@@ -19,6 +19,7 @@ Borg Hypospray
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 30
|
||||
possible_transfer_amounts = list()
|
||||
reagent_value = NO_REAGENTS_VALUE
|
||||
var/mode = 1
|
||||
var/charge_cost = 50
|
||||
var/charge_tick = 0
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
if(safe_thing)
|
||||
if(!safe_thing.reagents)
|
||||
safe_thing.create_reagents(100)
|
||||
safe_thing.create_reagents(100, NONE, NO_REAGENTS_VALUE)
|
||||
|
||||
reagents.reaction(safe_thing, TOUCH, fraction)
|
||||
trans = reagents.trans_to(safe_thing, amount_per_transfer_from_this)
|
||||
@@ -64,12 +64,7 @@
|
||||
|
||||
reagents.reaction(target, TOUCH, fraction)
|
||||
var/mob/M = target
|
||||
var/R
|
||||
if(reagents)
|
||||
for(var/datum/reagent/A in src.reagents.reagent_list)
|
||||
R += A.type + " ("
|
||||
R += num2text(A.volume) + "),"
|
||||
log_combat(user, M, "squirted", R)
|
||||
log_combat(user, M, "squirted", reagents.log_list())
|
||||
|
||||
trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You transfer [trans] unit\s of the solution.</span>")
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
log_combat(user, M, "splashed", R)
|
||||
reagents.clear_reagents()
|
||||
else
|
||||
if(M != user)
|
||||
var/self_fed = M == user
|
||||
if(!self_fed)
|
||||
M.visible_message("<span class='danger'>[user] attempts to feed something to [M].</span>", \
|
||||
"<span class='userdanger'>[user] attempts to feed something to you.</span>")
|
||||
if(!do_mob(user, M))
|
||||
@@ -44,7 +45,7 @@
|
||||
to_chat(user, "<span class='notice'>You swallow a gulp of [src].</span>")
|
||||
var/fraction = min(5/reagents.total_volume, 1)
|
||||
reagents.reaction(M, INGEST, fraction)
|
||||
addtimer(CALLBACK(reagents, /datum/reagents.proc/trans_to, M, 5), 5)
|
||||
addtimer(CALLBACK(reagents, /datum/reagents.proc/trans_to, M, 5, null, null, null, self_fed? "self swallowed" : "fed by [user]"), 5)
|
||||
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
|
||||
|
||||
/obj/item/reagent_containers/glass/afterattack(obj/target, mob/user, proximity)
|
||||
@@ -61,7 +62,7 @@
|
||||
to_chat(user, "<span class='warning'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
var/trans = reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
var/trans = reagents.trans_to(target, amount_per_transfer_from_this, log = "reagentcontainer-glass afterattack transfer to")
|
||||
to_chat(user, "<span class='notice'>You transfer [trans] unit\s of the solution to [target].</span>")
|
||||
|
||||
else if(target.is_drainable()) //A dispenser. Transfer FROM it TO us.
|
||||
@@ -73,7 +74,7 @@
|
||||
to_chat(user, "<span class='warning'>[src] is full.</span>")
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this, log = "reagentcontainer-glass afterattack fill from")
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [trans] unit\s of the contents of [target].</span>")
|
||||
|
||||
else if(reagents.total_volume)
|
||||
@@ -96,7 +97,7 @@
|
||||
to_chat(user, "<span class='notice'>[src] is full.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You break [E] in [src].</span>")
|
||||
E.reagents.trans_to(src, E.reagents.total_volume)
|
||||
E.reagents.trans_to(src, E.reagents.total_volume, log = "reagentcontainer-glass break egg in")
|
||||
qdel(E)
|
||||
return
|
||||
..()
|
||||
@@ -110,7 +111,7 @@
|
||||
item_state = "beaker"
|
||||
materials = list(MAT_GLASS=500)
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,50,60)
|
||||
beaker_weakness_bitflag = PH_WEAK
|
||||
container_flags = PH_WEAK|APTFT_ALTCLICK|APTFT_VERB
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/Initialize()
|
||||
. = ..()
|
||||
@@ -203,11 +204,7 @@
|
||||
volume = 180
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,40,50,60,120,180)
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/plastic/Initialize()
|
||||
beaker_weakness_bitflag &= ~PH_WEAK
|
||||
beaker_weakness_bitflag |= TEMP_WEAK
|
||||
. = ..()
|
||||
container_flags = TEMP_WEAK|APTFT_ALTCLICK|APTFT_VERB
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/plastic/update_icon()
|
||||
icon_state = "beakerlarge" // hack to lets us reuse the large beaker reagent fill states
|
||||
@@ -222,10 +219,7 @@
|
||||
volume = 240
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,40,50,60,120,200,240)
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/meta/Initialize() // why the fuck can't you just set the beaker weakness bitflags to nothing? fuck you
|
||||
beaker_weakness_bitflag &= ~PH_WEAK
|
||||
. = ..()
|
||||
container_flags = APTFT_ALTCLICK|APTFT_VERB
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/noreact
|
||||
name = "cryostasis beaker"
|
||||
@@ -236,13 +230,9 @@
|
||||
reagent_flags = OPENCONTAINER | NO_REACT
|
||||
volume = 50
|
||||
amount_per_transfer_from_this = 10
|
||||
container_flags = APTFT_ALTCLICK|APTFT_VERB
|
||||
container_HP = 10//shouldn't be needed
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/noreact/Initialize()
|
||||
beaker_weakness_bitflag &= ~PH_WEAK
|
||||
. = ..()
|
||||
//reagents.set_reacting(FALSE) was this removed in a recent pr?
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/bluespace
|
||||
name = "bluespace beaker"
|
||||
desc = "A bluespace beaker, powered by experimental bluespace technology \
|
||||
@@ -310,18 +300,15 @@
|
||||
SLOT_L_STORE, SLOT_R_STORE,\
|
||||
SLOT_GENERC_DEXTROUS_STORAGE
|
||||
)
|
||||
container_flags = APTFT_ALTCLICK|APTFT_VERB
|
||||
container_HP = 1
|
||||
|
||||
/obj/item/reagent_containers/glass/bucket/Initialize()
|
||||
beaker_weakness_bitflag |= TEMP_WEAK
|
||||
. = ..()
|
||||
|
||||
/obj/item/reagent_containers/glass/bucket/attackby(obj/O, mob/user, params)
|
||||
if(istype(O, /obj/item/mop))
|
||||
if(reagents.total_volume < 1)
|
||||
to_chat(user, "<span class='warning'>[src] is out of water!</span>")
|
||||
else
|
||||
reagents.trans_to(O, 5)
|
||||
reagents.trans_to(O, 5, log = "reagentcontainer-bucket fill mop")
|
||||
to_chat(user, "<span class='notice'>You wet [O] in [src].</span>")
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
else if(isprox(O))
|
||||
@@ -365,12 +352,9 @@
|
||||
volume = 50
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,50)
|
||||
container_flags = TEMP_WEAK|APTFT_ALTCLICK|APTFT_VERB
|
||||
container_HP = 1
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/waterbottle/Initialize()
|
||||
beaker_weakness_bitflag |= TEMP_WEAK
|
||||
. = ..()
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/waterbottle/empty
|
||||
list_reagents = list()
|
||||
|
||||
|
||||
@@ -85,17 +85,17 @@
|
||||
|
||||
/obj/item/reagent_containers/hypospray/medipen
|
||||
name = "epinephrine medipen"
|
||||
desc = "A rapid and safe way to stabilize patients in critical condition for personnel without advanced medical knowledge."
|
||||
desc = "A rapid and safe way to stabilize patients in critical condition for personnel without advanced medical knowledge. Contains a powerful preservative that can delay decomposition when applied to a dead body."
|
||||
icon_state = "medipen"
|
||||
item_state = "medipen"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
amount_per_transfer_from_this = 10
|
||||
volume = 10
|
||||
amount_per_transfer_from_this = 13
|
||||
volume = 13
|
||||
ignore_flags = 1 //so you can medipen through hardsuits
|
||||
reagent_flags = DRAWABLE
|
||||
flags_1 = null
|
||||
list_reagents = list(/datum/reagent/medicine/epinephrine = 10)
|
||||
list_reagents = list(/datum/reagent/medicine/epinephrine = 10, /datum/reagent/preservahyde = 3)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/medipen/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] begins to choke on \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
@@ -423,18 +423,21 @@
|
||||
else
|
||||
unload_hypo(vial,user)
|
||||
|
||||
/obj/item/hypospray/mkii/verb/modes()
|
||||
set name = "Toggle Application Mode"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
var/mob/M = usr
|
||||
switch(mode)
|
||||
if(HYPO_SPRAY)
|
||||
mode = HYPO_INJECT
|
||||
to_chat(M, "[src] is now set to inject contents on application.")
|
||||
if(HYPO_INJECT)
|
||||
mode = HYPO_SPRAY
|
||||
to_chat(M, "[src] is now set to spray contents on application.")
|
||||
/obj/item/hypospray/mkii/CtrlClick(mob/living/user)
|
||||
. = ..()
|
||||
if(user.canUseTopic(src, FALSE) && user.get_active_held_item(src))
|
||||
switch(mode)
|
||||
if(HYPO_SPRAY)
|
||||
mode = HYPO_INJECT
|
||||
to_chat(user, "[src] is now set to inject contents on application.")
|
||||
if(HYPO_INJECT)
|
||||
mode = HYPO_SPRAY
|
||||
to_chat(user, "[src] is now set to spray contents on application.")
|
||||
return TRUE
|
||||
|
||||
/obj/item/hypospray/mkii/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'><b>Ctrl-Click</b> it to toggle its mode from spraying to injecting and vice versa.</span>"
|
||||
|
||||
#undef HYPO_SPRAY
|
||||
#undef HYPO_INJECT
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
spillable = FALSE
|
||||
volume = 10
|
||||
possible_transfer_amounts = list(1,2,5,10)
|
||||
APTFT_altclick = FALSE
|
||||
container_flags = APTFT_VERB
|
||||
obj_flags = UNIQUE_RENAME
|
||||
unique_reskin = list("hypovial" = "hypovial",
|
||||
"red hypovial" = "hypovial-b",
|
||||
@@ -25,9 +25,6 @@
|
||||
if(!icon_state)
|
||||
icon_state = "hypovial"
|
||||
update_icon()
|
||||
// beaker_weakness_bitflag |= PH_WEAK // fuck you if you're using these like beakers
|
||||
// beaker_weakness_bitflag |= TEMP_WEAK
|
||||
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/vial/on_reagent_change()
|
||||
update_icon()
|
||||
|
||||
@@ -8,9 +8,10 @@
|
||||
reagent_flags = REFILLABLE | DRAINABLE
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list()
|
||||
APTFT_altclick = FALSE
|
||||
container_flags = APTFT_VERB
|
||||
volume = 5
|
||||
spillable = FALSE
|
||||
reagent_value = NO_REAGENTS_VALUE
|
||||
var/wipe_sound
|
||||
var/soak_efficiency = 1
|
||||
var/extinguish_efficiency = 0
|
||||
@@ -26,7 +27,7 @@
|
||||
if(reagents.total_volume)
|
||||
. += "<span class='notice'>It's soaked. Alt-Click to squeeze it dry, and perhaps gather the liquids into another held open container.</span>"
|
||||
|
||||
/obj/item/reagent_containers/rag/afterattack(atom/A as obj|turf|area, mob/user,proximity)
|
||||
/obj/item/reagent_containers/rag/afterattack(atom/A, mob/user,proximity)
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
return
|
||||
@@ -45,7 +46,7 @@
|
||||
C.visible_message("<span class='notice'>[user] has touched \the [C] with \the [src].</span>")
|
||||
log_combat(user, C, "touched", log_object)
|
||||
|
||||
else if(istype(A) && src in user)
|
||||
else if(istype(A) && (src in user))
|
||||
user.visible_message("[user] starts to wipe down [A] with [src]!", "<span class='notice'>You start to wipe down [A] with [src]...</span>")
|
||||
if(do_after(user, action_speed, target = A))
|
||||
user.visible_message("[user] finishes wiping off [A]!", "<span class='notice'>You finish wiping off [A].</span>")
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 250
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,50,100)
|
||||
container_flags = NONE //APTFT is alternated between the initial value and stream_amount and shouldn't be exploited.
|
||||
|
||||
/obj/item/reagent_containers/spray/afterattack(atom/A, mob/user)
|
||||
. = ..()
|
||||
@@ -67,7 +68,7 @@
|
||||
/obj/item/reagent_containers/spray/proc/spray(atom/A)
|
||||
var/range = CLAMP(get_dist(src, A), 1, current_range)
|
||||
var/obj/effect/decal/chempuff/D = new /obj/effect/decal/chempuff(get_turf(src))
|
||||
D.create_reagents(amount_per_transfer_from_this)
|
||||
D.create_reagents(amount_per_transfer_from_this, NONE, NO_REAGENTS_VALUE)
|
||||
var/puff_reagent_left = range //how many turf, mob or dense objet we can react with before we consider the chem puff consumed
|
||||
if(stream_mode)
|
||||
reagents.trans_to(D, amount_per_transfer_from_this)
|
||||
@@ -171,6 +172,7 @@
|
||||
/obj/item/reagent_containers/spray/drying_agent
|
||||
name = "drying agent spray"
|
||||
desc = "A spray bottle for drying agent."
|
||||
icon_state = "cleaner_drying"
|
||||
volume = 100
|
||||
list_reagents = list(/datum/reagent/drying_agent = 100)
|
||||
amount_per_transfer_from_this = 2
|
||||
|
||||
Reference in New Issue
Block a user