mirror of
https://github.com/KabKebab/GS13.git
synced 2026-08-26 22:46:15 +01:00
Uploading all files.
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
// Replaces chemgrenade stuff, allowing reagent explosions to be called from anywhere.
|
||||
// It should be called using a location, the range, and a list of reagents involved.
|
||||
|
||||
// Threatscale is a multiplier for the 'threat' of the grenade. If you're increasing the affected range drastically, you might want to improve this.
|
||||
// Extra heat affects the temperature of the mixture, and may cause it to react in different ways.
|
||||
|
||||
|
||||
/proc/chem_splash(turf/epicenter, affected_range = 3, list/datum/reagents/reactants = list(), extra_heat = 0, threatscale = 1, adminlog = 1)
|
||||
if(!isturf(epicenter) || !reactants.len || threatscale <= 0)
|
||||
return
|
||||
var/has_reagents
|
||||
var/total_reagents
|
||||
for(var/datum/reagents/R in reactants)
|
||||
if(R.total_volume)
|
||||
has_reagents = 1
|
||||
total_reagents += R.total_volume
|
||||
|
||||
if(!has_reagents)
|
||||
return
|
||||
|
||||
var/datum/reagents/splash_holder = new/datum/reagents(total_reagents*threatscale)
|
||||
splash_holder.my_atom = epicenter // For some reason this is setting my_atom to null, and causing runtime errors.
|
||||
var/total_temp = 0
|
||||
|
||||
for(var/datum/reagents/R in reactants)
|
||||
R.trans_to(splash_holder, R.total_volume, threatscale, 1, 1)
|
||||
total_temp += R.chem_temp
|
||||
splash_holder.chem_temp = (total_temp/reactants.len) + extra_heat // Average temperature of reagents + extra heat.
|
||||
splash_holder.handle_reactions() // React them now.
|
||||
|
||||
if(splash_holder.total_volume && affected_range >= 0) //The possible reactions didnt use up all reagents, so we spread it around.
|
||||
var/datum/effect_system/steam_spread/steam = new /datum/effect_system/steam_spread()
|
||||
steam.set_up(10, 0, epicenter)
|
||||
steam.attach(epicenter)
|
||||
steam.start()
|
||||
|
||||
var/list/viewable = view(affected_range, epicenter)
|
||||
|
||||
var/list/accessible = list(epicenter)
|
||||
for(var/i=1; i<=affected_range; i++)
|
||||
var/list/turflist = list()
|
||||
for(var/turf/T in (orange(i, epicenter) - orange(i-1, epicenter)))
|
||||
turflist |= T
|
||||
for(var/turf/T in turflist)
|
||||
if(!(get_dir(T,epicenter) in GLOB.cardinals) && (abs(T.x - epicenter.x) == abs(T.y - epicenter.y) ))
|
||||
turflist.Remove(T)
|
||||
turflist.Add(T) // we move the purely diagonal turfs to the end of the list.
|
||||
for(var/turf/T in turflist)
|
||||
if(accessible[T])
|
||||
continue
|
||||
for(var/thing in T.GetAtmosAdjacentTurfs(alldir = TRUE))
|
||||
var/turf/NT = thing
|
||||
if(!(NT in accessible))
|
||||
continue
|
||||
if(!(get_dir(T,NT) in GLOB.cardinals))
|
||||
continue
|
||||
accessible[T] = 1
|
||||
break
|
||||
var/list/reactable = accessible
|
||||
for(var/turf/T in accessible)
|
||||
for(var/atom/A in T.GetAllContents())
|
||||
if(!(A in viewable))
|
||||
continue
|
||||
reactable |= A
|
||||
if(extra_heat >= 300)
|
||||
T.hotspot_expose(extra_heat*2, 5)
|
||||
if(!reactable.len) //Nothing to react with. Probably means we're in nullspace.
|
||||
return
|
||||
for(var/thing in reactable)
|
||||
var/atom/A = thing
|
||||
var/distance = max(1,get_dist(A, epicenter))
|
||||
var/fraction = 0.5/(2 ** distance) //50/25/12/6... for a 200u splash, 25/12/6/3... for a 100u, 12/6/3/1 for a 50u
|
||||
splash_holder.reaction(A, TOUCH, fraction)
|
||||
|
||||
qdel(splash_holder)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/proc/mix_color_from_reagents(list/reagent_list)
|
||||
if(!istype(reagent_list))
|
||||
return
|
||||
|
||||
var/mixcolor
|
||||
var/vol_counter = 0
|
||||
var/vol_temp
|
||||
|
||||
for(var/datum/reagent/R in reagent_list)
|
||||
vol_temp = R.volume
|
||||
vol_counter += vol_temp
|
||||
|
||||
if(!mixcolor)
|
||||
mixcolor = R.color
|
||||
|
||||
else if (length(mixcolor) >= length(R.color))
|
||||
mixcolor = BlendRGB(mixcolor, R.color, vol_temp/vol_counter)
|
||||
else
|
||||
mixcolor = BlendRGB(R.color, mixcolor, vol_temp/vol_counter)
|
||||
|
||||
return mixcolor
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,655 @@
|
||||
/obj/machinery/chem_dispenser
|
||||
name = "chem dispenser"
|
||||
desc = "Creates and dispenses chemicals."
|
||||
density = TRUE
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "dispenser"
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 40
|
||||
interaction_flags_machine = INTERACT_MACHINE_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OFFLINE
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
circuit = /obj/item/circuitboard/machine/chem_dispenser
|
||||
var/obj/item/stock_parts/cell/cell
|
||||
var/powerefficiency = 0.1
|
||||
var/amount = 30
|
||||
var/recharge_amount = 10
|
||||
var/recharge_counter = 0
|
||||
var/mutable_appearance/beaker_overlay
|
||||
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
|
||||
var/list/dispensable_reagents = list(
|
||||
"hydrogen",
|
||||
"lithium",
|
||||
"carbon",
|
||||
"nitrogen",
|
||||
"oxygen",
|
||||
"fluorine",
|
||||
"sodium",
|
||||
"aluminium",
|
||||
"silicon",
|
||||
"phosphorus",
|
||||
"sulfur",
|
||||
"chlorine",
|
||||
"potassium",
|
||||
"iron",
|
||||
"copper",
|
||||
"mercury",
|
||||
"radium",
|
||||
"water",
|
||||
"ethanol",
|
||||
"sugar",
|
||||
"sacid",
|
||||
"welding_fuel",
|
||||
"silver",
|
||||
"iodine",
|
||||
"bromine",
|
||||
"stable_plasma"
|
||||
)
|
||||
//these become available once upgraded.
|
||||
var/list/upgrade_reagents = list(
|
||||
"oil",
|
||||
"ammonia",
|
||||
"ash"
|
||||
)
|
||||
|
||||
var/list/upgrade_reagents2 = list(
|
||||
"acetone",
|
||||
"phenol",
|
||||
"diethylamine"
|
||||
)
|
||||
|
||||
var/list/upgrade_reagents3 = list(
|
||||
"mine_salve",
|
||||
"toxin"
|
||||
)
|
||||
|
||||
var/list/emagged_reagents = list(
|
||||
"space_drugs",
|
||||
"plasma",
|
||||
"frostoil",
|
||||
"carpotoxin",
|
||||
"histamine",
|
||||
"morphine"
|
||||
)
|
||||
|
||||
var/list/saved_recipes = list()
|
||||
|
||||
/obj/machinery/chem_dispenser/Initialize()
|
||||
. = ..()
|
||||
dispensable_reagents = sortList(dispensable_reagents)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/chem_dispenser/Destroy()
|
||||
QDEL_NULL(beaker)
|
||||
QDEL_NULL(cell)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/chem_dispenser/examine(mob/user)
|
||||
..()
|
||||
if(panel_open)
|
||||
to_chat(user, "<span class='notice'>[src]'s maintenance hatch is open!</span>")
|
||||
if(in_range(user, src) || isobserver(user))
|
||||
to_chat(user, "<span class='notice'>The status display reads: <br>Recharging <b>[recharge_amount]</b> power units per interval.<br>Power efficiency increased by <b>[(powerefficiency*1000)-100]%</b>.<span>")
|
||||
switch(macrotier)
|
||||
if(1)
|
||||
to_chat(user, "<span class='notice'>Macro granularity at <b>5u</b>.<span>")
|
||||
if(2)
|
||||
to_chat(user, "<span class='notice'>Macro granularity at <b>3u</b>.<span>")
|
||||
if(3)
|
||||
to_chat(user, "<span class='notice'>Macro granularity at <b>2u</b>.<span>")
|
||||
if(4)
|
||||
to_chat(user, "<span class='notice'>Macro granularity at <b>1u</b>.<span>")
|
||||
/obj/machinery/chem_dispenser/process()
|
||||
if (recharge_counter >= 4)
|
||||
if(!is_operational())
|
||||
return
|
||||
var/usedpower = cell.give(recharge_amount)
|
||||
if(usedpower)
|
||||
use_power(250*recharge_amount)
|
||||
recharge_counter = 0
|
||||
return
|
||||
recharge_counter++
|
||||
|
||||
/obj/machinery/chem_dispenser/proc/display_beaker()
|
||||
..()
|
||||
var/mutable_appearance/b_o = beaker_overlay || mutable_appearance(icon, "disp_beaker")
|
||||
b_o.pixel_y = -4
|
||||
b_o.pixel_x = -7
|
||||
return b_o
|
||||
|
||||
/obj/machinery/chem_dispenser/proc/work_animation()
|
||||
if(working_state)
|
||||
flick(working_state,src)
|
||||
|
||||
/obj/machinery/chem_dispenser/power_change()
|
||||
..()
|
||||
icon_state = "[(nopower_state && !powered()) ? nopower_state : initial(icon_state)]"
|
||||
|
||||
/obj/machinery/chem_dispenser/update_icon()
|
||||
cut_overlays()
|
||||
if(has_panel_overlay && panel_open)
|
||||
add_overlay(mutable_appearance(icon, "[initial(icon_state)]_panel-o"))
|
||||
|
||||
if(beaker)
|
||||
beaker_overlay = display_beaker()
|
||||
add_overlay(beaker_overlay)
|
||||
|
||||
|
||||
/obj/machinery/chem_dispenser/emag_act(mob/user)
|
||||
if(obj_flags & EMAGGED)
|
||||
to_chat(user, "<span class='warning'>[src] has no functional safeties to emag.</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You short out [src]'s safeties.</span>")
|
||||
dispensable_reagents |= emagged_reagents//add the emagged reagents to the dispensable ones
|
||||
obj_flags |= EMAGGED
|
||||
|
||||
/obj/machinery/chem_dispenser/ex_act(severity, target)
|
||||
if(severity < 3)
|
||||
..()
|
||||
|
||||
/obj/machinery/chem_dispenser/contents_explosion(severity, target)
|
||||
..()
|
||||
if(beaker)
|
||||
beaker.ex_act(severity, target)
|
||||
|
||||
/obj/machinery/chem_dispenser/handle_atom_del(atom/A)
|
||||
..()
|
||||
if(A == beaker)
|
||||
beaker = null
|
||||
cut_overlays()
|
||||
|
||||
/obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
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, "chem_dispenser", name, 565, 550, master_ui, state)
|
||||
if(user.hallucinating())
|
||||
ui.set_autoupdate(FALSE) //to not ruin the immersion by constantly changing the fake chemicals
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/chem_dispenser/ui_data(mob/user)
|
||||
var/data = list()
|
||||
data["amount"] = amount
|
||||
data["energy"] = cell.charge ? cell.charge * powerefficiency : "0" //To prevent NaN in the UI.
|
||||
data["maxEnergy"] = cell.maxcharge * powerefficiency
|
||||
data["isBeakerLoaded"] = beaker ? 1 : 0
|
||||
|
||||
var/beakerContents[0]
|
||||
var/beakerCurrentVolume = 0
|
||||
if(beaker && beaker.reagents && beaker.reagents.reagent_list.len)
|
||||
for(var/datum/reagent/R in beaker.reagents.reagent_list)
|
||||
beakerContents.Add(list(list("name" = R.name, "volume" = R.volume))) // list in a list because Byond merges the first list...
|
||||
beakerCurrentVolume += R.volume
|
||||
data["beakerContents"] = beakerContents
|
||||
|
||||
if (beaker)
|
||||
data["beakerCurrentVolume"] = beakerCurrentVolume
|
||||
data["beakerMaxVolume"] = beaker.volume
|
||||
data["beakerTransferAmounts"] = beaker.possible_transfer_amounts
|
||||
data["beakerCurrentpH"] = beaker.reagents.pH
|
||||
//pH accuracy
|
||||
for(var/obj/item/stock_parts/capacitor/C in component_parts)
|
||||
data["partRating"]= 10**(C.rating-1)
|
||||
|
||||
else
|
||||
data["beakerCurrentVolume"] = null
|
||||
data["beakerMaxVolume"] = null
|
||||
data["beakerTransferAmounts"] = null
|
||||
data["beakerCurrentpH"] = null
|
||||
|
||||
var/chemicals[0]
|
||||
var/recipes[0]
|
||||
var/is_hallucinating = FALSE
|
||||
if(user.hallucinating())
|
||||
is_hallucinating = TRUE
|
||||
for(var/re in dispensable_reagents)
|
||||
var/datum/reagent/temp = GLOB.chemical_reagents_list[re]
|
||||
if(temp)
|
||||
var/chemname = temp.name
|
||||
if(is_hallucinating && prob(5))
|
||||
chemname = "[pick_list_replacements("hallucination.json", "chemicals")]"
|
||||
chemicals.Add(list(list("title" = chemname, "id" = temp.id)))
|
||||
for(var/recipe in saved_recipes)
|
||||
recipes.Add(list(recipe))
|
||||
data["chemicals"] = chemicals
|
||||
data["recipes"] = recipes
|
||||
return data
|
||||
|
||||
/obj/machinery/chem_dispenser/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("amount")
|
||||
if(!is_operational() || QDELETED(beaker))
|
||||
return
|
||||
var/target = text2num(params["target"])
|
||||
if(target in beaker.possible_transfer_amounts)
|
||||
amount = target
|
||||
work_animation()
|
||||
. = TRUE
|
||||
if("dispense")
|
||||
if(!is_operational() || QDELETED(cell))
|
||||
return
|
||||
var/reagent = 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)
|
||||
|
||||
if(!cell.use(actual / powerefficiency))
|
||||
say("Not enough energy to complete operation!")
|
||||
return
|
||||
R.add_reagent(reagent, actual)
|
||||
|
||||
work_animation()
|
||||
. = TRUE
|
||||
if("remove")
|
||||
if(!is_operational())
|
||||
return
|
||||
var/amount = text2num(params["amount"])
|
||||
if(beaker && amount in beaker.possible_transfer_amounts)
|
||||
beaker.reagents.remove_all(amount)
|
||||
work_animation()
|
||||
. = TRUE
|
||||
if("eject")
|
||||
replace_beaker(usr)
|
||||
. = TRUE //no afterattack
|
||||
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 = keysplit[1]
|
||||
if(beaker && dispensable_reagents.Find(r_id)) // but since we verify we have the reagent, it'll be fine
|
||||
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)
|
||||
if(actual)
|
||||
if(!cell.use(actual / powerefficiency))
|
||||
say("Not enough energy to complete operation!")
|
||||
return
|
||||
R.add_reagent(r_id, actual)
|
||||
work_animation()
|
||||
if("clear_recipes")
|
||||
if(!is_operational())
|
||||
return
|
||||
var/yesno = alert("Clear all recipes?",, "Yes","No")
|
||||
if(yesno == "Yes")
|
||||
saved_recipes = list()
|
||||
if("add_recipe")
|
||||
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)))
|
||||
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, "=")
|
||||
if(dispensable_reagents.Find(reagent[1]))
|
||||
if (!resmismatch && !check_macro_part(reagents, res))
|
||||
resmismatch = TRUE
|
||||
continue
|
||||
else
|
||||
var/chemid = reagent[1]
|
||||
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>")
|
||||
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))
|
||||
|
||||
/obj/machinery/chem_dispenser/attackby(obj/item/I, mob/user, params)
|
||||
if(default_unfasten_wrench(user, I))
|
||||
return
|
||||
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())
|
||||
var/obj/item/reagent_containers/B = I
|
||||
. = TRUE //no afterattack
|
||||
if(!user.transferItemToLoc(B, src))
|
||||
return
|
||||
replace_beaker(user, B)
|
||||
to_chat(user, "<span class='notice'>You add [B] to [src].</span>")
|
||||
updateUsrDialog()
|
||||
update_icon()
|
||||
else if(user.a_intent != INTENT_HARM && !istype(I, /obj/item/card/emag))
|
||||
to_chat(user, "<span class='warning'>You can't load [I] into [src]!</span>")
|
||||
return ..()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/chem_dispenser/get_cell()
|
||||
return cell
|
||||
|
||||
/obj/machinery/chem_dispenser/emp_act(severity)
|
||||
. = ..()
|
||||
if(. & EMP_PROTECT_SELF)
|
||||
return
|
||||
var/list/datum/reagents/R = list()
|
||||
var/total = min(rand(7,15), FLOOR(cell.charge*powerefficiency, 1))
|
||||
var/datum/reagents/Q = new(total*10)
|
||||
if(beaker && beaker.reagents)
|
||||
R += beaker.reagents
|
||||
for(var/i in 1 to total)
|
||||
Q.add_reagent(pick(dispensable_reagents), 10)
|
||||
R += Q
|
||||
chem_splash(get_turf(src), 3, R)
|
||||
if(beaker && beaker.reagents)
|
||||
beaker.reagents.remove_all()
|
||||
cell.use(total/powerefficiency)
|
||||
cell.emp_act(severity)
|
||||
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
|
||||
for(var/obj/item/stock_parts/cell/P in component_parts)
|
||||
cell = P
|
||||
for(var/obj/item/stock_parts/matter_bin/M in component_parts)
|
||||
newpowereff += 0.0166666666*M.rating
|
||||
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)
|
||||
dispensable_reagents |= upgrade_reagents
|
||||
if (M.rating > 2)
|
||||
dispensable_reagents |= upgrade_reagents2
|
||||
if (M.rating > 3)
|
||||
dispensable_reagents |= upgrade_reagents3
|
||||
powerefficiency = round(newpowereff, 0.01)
|
||||
|
||||
/obj/machinery/chem_dispenser/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
|
||||
if(beaker)
|
||||
beaker.forceMove(drop_location())
|
||||
if(user && Adjacent(user) && !issiliconoradminghost(user))
|
||||
user.put_in_hands(beaker)
|
||||
if(new_beaker)
|
||||
beaker = new_beaker
|
||||
else
|
||||
beaker = null
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/chem_dispenser/on_deconstruction()
|
||||
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
|
||||
|
||||
/obj/machinery/chem_dispenser/drinks/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/simple_rotation, ROTATION_ALTCLICK | ROTATION_CLOCKWISE)
|
||||
|
||||
/obj/machinery/chem_dispenser/drinks/setDir()
|
||||
var/old = dir
|
||||
. = ..()
|
||||
if(dir != old)
|
||||
update_icon() // the beaker needs to be re-positioned if we rotate
|
||||
|
||||
/obj/machinery/chem_dispenser/drinks/display_beaker()
|
||||
var/mutable_appearance/b_o = beaker_overlay || mutable_appearance(icon, "disp_beaker")
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
b_o.pixel_y = 7
|
||||
b_o.pixel_x = rand(-9, 9)
|
||||
if(EAST)
|
||||
b_o.pixel_x = 4
|
||||
b_o.pixel_y = rand(-5, 7)
|
||||
if(WEST)
|
||||
b_o.pixel_x = -5
|
||||
b_o.pixel_y = rand(-5, 7)
|
||||
else//SOUTH
|
||||
b_o.pixel_y = -7
|
||||
b_o.pixel_x = rand(-9, 9)
|
||||
return b_o
|
||||
|
||||
/obj/machinery/chem_dispenser/drinks
|
||||
name = "soda dispenser"
|
||||
desc = "Contains a large reservoir of soft drinks."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "soda_dispenser"
|
||||
has_panel_overlay = FALSE
|
||||
amount = 10
|
||||
pixel_y = 6
|
||||
layer = WALL_OBJ_LAYER
|
||||
circuit = /obj/item/circuitboard/machine/chem_dispenser/drinks
|
||||
working_state = null
|
||||
nopower_state = null
|
||||
pass_flags = PASSTABLE
|
||||
dispensable_reagents = list(
|
||||
"water",
|
||||
"ice",
|
||||
"coffee",
|
||||
"cream",
|
||||
"tea",
|
||||
"icetea",
|
||||
"cola",
|
||||
"spacemountainwind",
|
||||
"dr_gibb",
|
||||
"space_up",
|
||||
"tonic",
|
||||
"sodawater",
|
||||
"lemon_lime",
|
||||
"pwr_game",
|
||||
"shamblers",
|
||||
"sugar",
|
||||
"orangejuice",
|
||||
"grenadine",
|
||||
"limejuice",
|
||||
"tomatojuice",
|
||||
"lemonjuice",
|
||||
"menthol"
|
||||
)
|
||||
upgrade_reagents = list(
|
||||
"mushroomhallucinogen",
|
||||
"nothing",
|
||||
"cryoxadone"
|
||||
)
|
||||
upgrade_reagents2 = list(
|
||||
"banana",
|
||||
"berryjuice"
|
||||
)
|
||||
upgrade_reagents3 = null
|
||||
emagged_reagents = list(
|
||||
"thirteenloko",
|
||||
"changelingsting",
|
||||
"whiskeycola",
|
||||
"mindbreaker",
|
||||
"tirizene"
|
||||
)
|
||||
|
||||
|
||||
/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
|
||||
flags_1 = NODECONSTRUCT_1
|
||||
|
||||
/obj/machinery/chem_dispenser/drinks/fullupgrade/Initialize()
|
||||
. = ..()
|
||||
dispensable_reagents |= emagged_reagents //adds emagged reagents
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/machine/chem_dispenser/drinks(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin/bluespace(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin/bluespace(null)
|
||||
component_parts += new /obj/item/stock_parts/capacitor/quadratic(null)
|
||||
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()
|
||||
|
||||
/obj/machinery/chem_dispenser/drinks/beer
|
||||
name = "booze dispenser"
|
||||
desc = "Contains a large reservoir of the good stuff."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "booze_dispenser"
|
||||
circuit = /obj/item/circuitboard/machine/chem_dispenser/drinks/beer
|
||||
dispensable_reagents = list(
|
||||
"beer",
|
||||
"kahlua",
|
||||
"whiskey",
|
||||
"wine",
|
||||
"vodka",
|
||||
"gin",
|
||||
"rum",
|
||||
"tequila",
|
||||
"vermouth",
|
||||
"cognac",
|
||||
"ale",
|
||||
"absinthe",
|
||||
"hcider",
|
||||
"creme_de_menthe",
|
||||
"creme_de_cacao",
|
||||
"triple_sec",
|
||||
"sake",
|
||||
"applejack"
|
||||
)
|
||||
upgrade_reagents = list(
|
||||
"ethanol",
|
||||
"fernet"
|
||||
)
|
||||
upgrade_reagents2 = null
|
||||
upgrade_reagents3 = null
|
||||
emagged_reagents = list(
|
||||
"iron",
|
||||
"alexander",
|
||||
"clownstears",
|
||||
"minttoxin",
|
||||
"atomicbomb",
|
||||
"aphro",
|
||||
"aphro+"
|
||||
)
|
||||
|
||||
/obj/machinery/chem_dispenser/drinks/beer/fullupgrade //fully ugpraded stock parts, emagged
|
||||
desc = "Contains a large reservoir of the good stuff. This model has had its safeties shorted out."
|
||||
obj_flags = CAN_BE_HIT | EMAGGED
|
||||
flags_1 = NODECONSTRUCT_1
|
||||
|
||||
/obj/machinery/chem_dispenser/drinks/beer/fullupgrade/Initialize()
|
||||
. = ..()
|
||||
dispensable_reagents |= emagged_reagents //adds emagged reagents
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/machine/chem_dispenser/drinks/beer(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin/bluespace(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin/bluespace(null)
|
||||
component_parts += new /obj/item/stock_parts/capacitor/quadratic(null)
|
||||
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()
|
||||
|
||||
/obj/machinery/chem_dispenser/mutagen
|
||||
name = "mutagen dispenser"
|
||||
desc = "Creates and dispenses mutagen."
|
||||
dispensable_reagents = list("mutagen")
|
||||
upgrade_reagents = null
|
||||
emagged_reagents = list("plasma")
|
||||
|
||||
|
||||
/obj/machinery/chem_dispenser/mutagensaltpeter
|
||||
name = "botanical chemical dispenser"
|
||||
desc = "Creates and dispenses chemicals useful for botany."
|
||||
flags_1 = NODECONSTRUCT_1
|
||||
|
||||
dispensable_reagents = list(
|
||||
"mutagen",
|
||||
"saltpetre",
|
||||
"eznutriment",
|
||||
"left4zednutriment",
|
||||
"robustharvestnutriment",
|
||||
"water",
|
||||
"plantbgone",
|
||||
"weedkiller",
|
||||
"pestkiller",
|
||||
"cryoxadone",
|
||||
"ammonia",
|
||||
"ash",
|
||||
"diethylamine")
|
||||
//same as above.
|
||||
upgrade_reagents = null
|
||||
upgrade_reagents2 = null
|
||||
upgrade_reagents3 = null
|
||||
|
||||
/obj/machinery/chem_dispenser/mutagensaltpeter/Initialize()
|
||||
. = ..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/machine/chem_dispenser(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin/bluespace(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin/bluespace(null)
|
||||
component_parts += new /obj/item/stock_parts/capacitor/quadratic(null)
|
||||
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()
|
||||
|
||||
/obj/machinery/chem_dispenser/fullupgrade //fully ugpraded stock parts, emagged
|
||||
desc = "Creates and dispenses chemicals. This model has had its safeties shorted out."
|
||||
obj_flags = CAN_BE_HIT | EMAGGED
|
||||
flags_1 = NODECONSTRUCT_1
|
||||
|
||||
/obj/machinery/chem_dispenser/fullupgrade/Initialize()
|
||||
. = ..()
|
||||
dispensable_reagents |= emagged_reagents //adds emagged reagents
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/machine/chem_dispenser(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin/bluespace(null)
|
||||
component_parts += new /obj/item/stock_parts/matter_bin/bluespace(null)
|
||||
component_parts += new /obj/item/stock_parts/capacitor/quadratic(null)
|
||||
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()
|
||||
@@ -0,0 +1,142 @@
|
||||
/obj/machinery/chem_heater
|
||||
name = "chemical heater"
|
||||
density = TRUE
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "mixer0b"
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 40
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
circuit = /obj/item/circuitboard/machine/chem_heater
|
||||
var/obj/item/reagent_containers/beaker = null
|
||||
var/target_temperature = 300
|
||||
var/heater_coefficient = 0.1
|
||||
var/on = FALSE
|
||||
|
||||
/obj/machinery/chem_heater/Destroy()
|
||||
QDEL_NULL(beaker)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/chem_heater/handle_atom_del(atom/A)
|
||||
. = ..()
|
||||
if(A == beaker)
|
||||
beaker = null
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/chem_heater/update_icon()
|
||||
if(beaker)
|
||||
icon_state = "mixer1b"
|
||||
else
|
||||
icon_state = "mixer0b"
|
||||
|
||||
/obj/machinery/chem_heater/AltClick(mob/living/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
replace_beaker(user)
|
||||
return
|
||||
|
||||
/obj/machinery/chem_heater/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
|
||||
if(beaker)
|
||||
beaker.forceMove(drop_location())
|
||||
if(user && Adjacent(user) && !issiliconoradminghost(user))
|
||||
user.put_in_hands(beaker)
|
||||
if(new_beaker)
|
||||
beaker = new_beaker
|
||||
else
|
||||
beaker = null
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/chem_heater/RefreshParts()
|
||||
heater_coefficient = 0.1
|
||||
for(var/obj/item/stock_parts/micro_laser/M in component_parts)
|
||||
heater_coefficient *= M.rating
|
||||
|
||||
/obj/machinery/chem_heater/process()
|
||||
..()
|
||||
if(stat & NOPOWER)
|
||||
return
|
||||
if(on)
|
||||
if(beaker && beaker.reagents.total_volume)
|
||||
beaker.reagents.adjust_thermal_energy((target_temperature - beaker.reagents.chem_temp) * heater_coefficient * SPECIFIC_HEAT_DEFAULT * beaker.reagents.total_volume)
|
||||
beaker.reagents.handle_reactions()
|
||||
|
||||
/obj/machinery/chem_heater/attackby(obj/item/I, mob/user, params)
|
||||
if(default_deconstruction_screwdriver(user, "mixer0b", "mixer0b", I))
|
||||
return
|
||||
|
||||
if(default_deconstruction_crowbar(I))
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/reagent_containers) && !(I.item_flags & ABSTRACT) && I.is_open_container())
|
||||
. = TRUE //no afterattack
|
||||
var/obj/item/reagent_containers/B = I
|
||||
if(!user.transferItemToLoc(B, src))
|
||||
return
|
||||
replace_beaker(user, B)
|
||||
to_chat(user, "<span class='notice'>You add [B] to [src].</span>")
|
||||
updateUsrDialog()
|
||||
update_icon()
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/chem_heater/on_deconstruction()
|
||||
replace_beaker()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/chem_heater/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
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, "chem_heater", name, 275, 400, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/chem_heater/ui_data()
|
||||
var/data = list()
|
||||
data["targetTemp"] = target_temperature
|
||||
data["isActive"] = on
|
||||
data["isBeakerLoaded"] = beaker ? 1 : 0
|
||||
|
||||
data["currentTemp"] = beaker ? beaker.reagents.chem_temp : null
|
||||
data["currentpH"] = beaker ? beaker.reagents.pH : null
|
||||
data["beakerCurrentVolume"] = beaker ? beaker.reagents.total_volume : null
|
||||
data["beakerMaxVolume"] = beaker ? beaker.volume : null
|
||||
//purity and pH accuracy
|
||||
for(var/obj/item/stock_parts/micro_laser/M in component_parts)
|
||||
data["partRating"]= 10**(M.rating-1)
|
||||
if(M.rating == 4)
|
||||
data["showPurity"] = 1
|
||||
else
|
||||
data["showPurity"] = 0
|
||||
|
||||
var beakerContents[0]
|
||||
if(beaker)
|
||||
for(var/datum/reagent/R in beaker.reagents.reagent_list)
|
||||
beakerContents.Add(list(list("name" = R.name, "volume" = R.volume, "purity" = R.purity))) // list in a list because Byond merges the first list...
|
||||
data["beakerContents"] = beakerContents
|
||||
return data
|
||||
|
||||
/obj/machinery/chem_heater/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("power")
|
||||
on = !on
|
||||
. = TRUE
|
||||
if("temperature")
|
||||
var/target = params["target"]
|
||||
var/adjust = text2num(params["adjust"])
|
||||
if(target == "input")
|
||||
target = input("New target temperature:", name, target_temperature) as num|null
|
||||
if(!isnull(target) && !..())
|
||||
. = TRUE
|
||||
else if(adjust)
|
||||
target = target_temperature + adjust
|
||||
else if(text2num(target) != null)
|
||||
target = text2num(target)
|
||||
. = TRUE
|
||||
if(.)
|
||||
target_temperature = CLAMP(target, 0, 1000)
|
||||
if("eject")
|
||||
on = FALSE
|
||||
replace_beaker(usr)
|
||||
. = TRUE
|
||||
@@ -0,0 +1,454 @@
|
||||
#define PILL_STYLE_COUNT 22 //Update this if you add more pill icons or you die
|
||||
#define RANDOM_PILL_STYLE 22 //Dont change this one though
|
||||
|
||||
/obj/machinery/chem_master
|
||||
name = "ChemMaster 3000"
|
||||
desc = "Used to separate chemicals and distribute them in a variety of forms."
|
||||
density = TRUE
|
||||
layer = BELOW_OBJ_LAYER
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "mixer0"
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 20
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
circuit = /obj/item/circuitboard/machine/chem_master
|
||||
var/obj/item/reagent_containers/beaker = null
|
||||
var/obj/item/storage/pill_bottle/bottle = null
|
||||
var/mode = 1
|
||||
var/condi = FALSE
|
||||
var/chosenPillStyle = 1
|
||||
var/screen = "home"
|
||||
var/analyzeVars[0]
|
||||
var/useramount = 30 // Last used amount
|
||||
var/list/pillStyles
|
||||
var/fermianalyze //Give more detail on fermireactions on analysis
|
||||
|
||||
/obj/machinery/chem_master/Initialize()
|
||||
create_reagents(100)
|
||||
|
||||
//Calculate the span tags and ids fo all the available pill icons
|
||||
var/datum/asset/spritesheet/simple/assets = get_asset_datum(/datum/asset/spritesheet/simple/pills)
|
||||
pillStyles = list()
|
||||
for (var/x in 1 to PILL_STYLE_COUNT)
|
||||
var/list/SL = list()
|
||||
SL["id"] = x
|
||||
SL["htmltag"] = assets.icon_tag("pill[x]")
|
||||
pillStyles += list(SL)
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/chem_master/Destroy()
|
||||
QDEL_NULL(beaker)
|
||||
QDEL_NULL(bottle)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/chem_master/RefreshParts()
|
||||
reagents.maximum_volume = 0
|
||||
for(var/obj/item/reagent_containers/glass/beaker/B in component_parts)
|
||||
reagents.maximum_volume += B.reagents.maximum_volume
|
||||
|
||||
/obj/machinery/chem_master/ex_act(severity, target)
|
||||
if(severity < 3)
|
||||
..()
|
||||
|
||||
/obj/machinery/chem_master/contents_explosion(severity, target)
|
||||
..()
|
||||
if(beaker)
|
||||
beaker.ex_act(severity, target)
|
||||
if(bottle)
|
||||
bottle.ex_act(severity, target)
|
||||
|
||||
/obj/machinery/chem_master/handle_atom_del(atom/A)
|
||||
..()
|
||||
if(A == beaker)
|
||||
beaker = null
|
||||
reagents.clear_reagents()
|
||||
update_icon()
|
||||
else if(A == bottle)
|
||||
bottle = null
|
||||
|
||||
/obj/machinery/chem_master/update_icon()
|
||||
cut_overlays()
|
||||
if (stat & BROKEN)
|
||||
add_overlay("waitlight")
|
||||
if(beaker)
|
||||
icon_state = "mixer1"
|
||||
else
|
||||
icon_state = "mixer0"
|
||||
|
||||
/obj/machinery/chem_master/blob_act(obj/structure/blob/B)
|
||||
if (prob(50))
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/chem_master/attackby(obj/item/I, mob/user, params)
|
||||
if(default_deconstruction_screwdriver(user, "mixer0_nopower", "mixer0", I))
|
||||
return
|
||||
|
||||
else if(default_deconstruction_crowbar(I))
|
||||
return
|
||||
|
||||
if(default_unfasten_wrench(user, I))
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/reagent_containers) && !(I.item_flags & ABSTRACT) && I.is_open_container())
|
||||
. = TRUE // no afterattack
|
||||
if(panel_open)
|
||||
to_chat(user, "<span class='warning'>You can't use the [src.name] while its panel is opened!</span>")
|
||||
return
|
||||
var/obj/item/reagent_containers/B = I
|
||||
if(!user.transferItemToLoc(B, src))
|
||||
return
|
||||
replace_beaker(user, B)
|
||||
to_chat(user, "<span class='notice'>You add [B] to [src].</span>")
|
||||
updateUsrDialog()
|
||||
update_icon()
|
||||
else if(!condi && istype(I, /obj/item/storage/pill_bottle))
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
replace_pillbottle(user, I)
|
||||
to_chat(user, "<span class='notice'>You add [I] into the dispenser slot.</span>")
|
||||
updateUsrDialog()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/chem_master/AltClick(mob/living/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
replace_beaker(user)
|
||||
return
|
||||
|
||||
/obj/machinery/chem_master/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
|
||||
if(beaker)
|
||||
beaker.forceMove(drop_location())
|
||||
if(user && Adjacent(user) && !issiliconoradminghost(user))
|
||||
user.put_in_hands(beaker)
|
||||
if(new_beaker)
|
||||
beaker = new_beaker
|
||||
else
|
||||
beaker = null
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/chem_master/proc/replace_pillbottle(mob/living/user, obj/item/storage/pill_bottle/new_bottle)
|
||||
if(bottle)
|
||||
bottle.forceMove(drop_location())
|
||||
if(user && Adjacent(user) && !issiliconoradminghost(user))
|
||||
user.put_in_hands(beaker)
|
||||
else
|
||||
adjust_item_drop_location(bottle)
|
||||
if(new_bottle)
|
||||
bottle = new_bottle
|
||||
else
|
||||
bottle = null
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/chem_master/on_deconstruction()
|
||||
replace_beaker(usr)
|
||||
replace_pillbottle(usr)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/chem_master/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
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)
|
||||
var/datum/asset/assets = get_asset_datum(/datum/asset/spritesheet/simple/pills)
|
||||
assets.send(user)
|
||||
ui = new(user, src, ui_key, "chem_master", name, 500, 550, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
//Insert our custom spritesheet css link into the html
|
||||
/obj/machinery/chem_master/ui_base_html(html)
|
||||
var/datum/asset/spritesheet/simple/assets = get_asset_datum(/datum/asset/spritesheet/simple/pills)
|
||||
. = replacetext(html, "<!--customheadhtml-->", assets.css_tag())
|
||||
|
||||
/obj/machinery/chem_master/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["isBeakerLoaded"] = beaker ? 1 : 0
|
||||
data["beakerCurrentVolume"] = beaker ? beaker.reagents.total_volume : null
|
||||
data["beakerMaxVolume"] = beaker ? beaker.volume : null
|
||||
data["mode"] = mode
|
||||
data["condi"] = condi
|
||||
data["screen"] = screen
|
||||
data["analyzeVars"] = analyzeVars
|
||||
data["fermianalyze"] = fermianalyze
|
||||
data["chosenPillStyle"] = chosenPillStyle
|
||||
data["isPillBottleLoaded"] = bottle ? 1 : 0
|
||||
if(bottle)
|
||||
GET_COMPONENT_FROM(STRB, /datum/component/storage, bottle)
|
||||
data["pillBotContent"] = bottle.contents.len
|
||||
data["pillBotMaxContent"] = STRB.max_items
|
||||
|
||||
var/beakerContents[0]
|
||||
if(beaker)
|
||||
for(var/datum/reagent/R in beaker.reagents.reagent_list)
|
||||
beakerContents.Add(list(list("name" = R.name, "id" = R.id, "volume" = R.volume))) // list in a list because Byond merges the first list...
|
||||
data["beakerContents"] = beakerContents
|
||||
|
||||
var/bufferContents[0]
|
||||
if(reagents.total_volume)
|
||||
for(var/datum/reagent/N in reagents.reagent_list)
|
||||
bufferContents.Add(list(list("name" = N.name, "id" = N.id, "volume" = N.volume))) // ^
|
||||
data["bufferContents"] = bufferContents
|
||||
|
||||
//Calculated at init time as it never changes
|
||||
data["pillStyles"] = pillStyles
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/chem_master/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("eject")
|
||||
replace_beaker(usr)
|
||||
. = TRUE
|
||||
|
||||
if("ejectp")
|
||||
replace_pillbottle(usr)
|
||||
. = TRUE
|
||||
|
||||
if("transferToBuffer")
|
||||
if(beaker)
|
||||
var/id = params["id"]
|
||||
var/amount = text2num(params["amount"])
|
||||
if (amount > 0)
|
||||
end_fermi_reaction()
|
||||
beaker.reagents.trans_id_to(src, id, amount)
|
||||
. = TRUE
|
||||
else if (amount == -1) // -1 means custom amount
|
||||
useramount = input("Enter the Amount you want to transfer:", name, useramount) as num|null
|
||||
if (useramount > 0)
|
||||
end_fermi_reaction()
|
||||
beaker.reagents.trans_id_to(src, id, useramount)
|
||||
. = TRUE
|
||||
|
||||
if("transferFromBuffer")
|
||||
var/id = params["id"]
|
||||
var/amount = text2num(params["amount"])
|
||||
if (amount > 0)
|
||||
if(mode)
|
||||
reagents.trans_id_to(beaker, id, amount)
|
||||
. = TRUE
|
||||
else
|
||||
reagents.remove_reagent(id, amount)
|
||||
. = TRUE
|
||||
|
||||
if("toggleMode")
|
||||
mode = !mode
|
||||
. = TRUE
|
||||
|
||||
if("createPill")
|
||||
var/many = params["many"]
|
||||
if(reagents.total_volume == 0)
|
||||
return
|
||||
if(!condi)
|
||||
var/amount = 1
|
||||
var/vol_each = min(reagents.total_volume, 50)
|
||||
if(text2num(many))
|
||||
amount = CLAMP(round(input(usr, "Max 10. Buffer content will be split evenly.", "How many pills?", amount) as num|null), 0, 10)
|
||||
if(!amount)
|
||||
return
|
||||
vol_each = min(reagents.total_volume / amount, 50)
|
||||
var/name = 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)))
|
||||
return
|
||||
var/obj/item/reagent_containers/pill/P
|
||||
var/target_loc = bottle ? bottle : drop_location()
|
||||
var/drop_threshold = INFINITY
|
||||
if(bottle)
|
||||
GET_COMPONENT_FROM(STRB, /datum/component/storage, bottle)
|
||||
if(STRB)
|
||||
drop_threshold = STRB.max_items - bottle.contents.len
|
||||
|
||||
for(var/i in 1 to amount)
|
||||
if(i < drop_threshold)
|
||||
P = new(target_loc)
|
||||
else
|
||||
P = new(drop_location())
|
||||
P.name = trim("[name] pill")
|
||||
if(chosenPillStyle == RANDOM_PILL_STYLE)
|
||||
P.icon_state ="pill[rand(1,21)]"
|
||||
else
|
||||
P.icon_state = "pill[chosenPillStyle]"
|
||||
if(P.icon_state == "pill4")
|
||||
P.desc = "A tablet or capsule, but not just any, a red one, one taken by the ones not scared of knowledge, freedom, uncertainty and the brutal truths of reality."
|
||||
adjust_item_drop_location(P)
|
||||
reagents.trans_to(P,vol_each)
|
||||
else
|
||||
var/name = stripped_input(usr, "Name:", "Name your pack!", reagents.get_master_reagent_name(), MAX_NAME_LEN)
|
||||
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr)))
|
||||
return
|
||||
var/obj/item/reagent_containers/food/condiment/pack/P = new/obj/item/reagent_containers/food/condiment/pack(drop_location())
|
||||
|
||||
P.originalname = name
|
||||
P.name = trim("[name] pack")
|
||||
P.desc = "A small condiment pack. The label says it contains [name]."
|
||||
reagents.trans_to(P,10)
|
||||
. = TRUE
|
||||
|
||||
if("pillStyle")
|
||||
var/id = text2num(params["id"])
|
||||
chosenPillStyle = id
|
||||
|
||||
if("createPatch")
|
||||
var/many = params["many"]
|
||||
if(reagents.total_volume == 0)
|
||||
return
|
||||
var/amount = 1
|
||||
var/vol_each = min(reagents.total_volume, 40)
|
||||
if(text2num(many))
|
||||
amount = CLAMP(round(input(usr, "Max 10. Buffer content will be split evenly.", "How many patches?", amount) as num|null), 0, 10)
|
||||
if(!amount)
|
||||
return
|
||||
vol_each = min(reagents.total_volume / amount, 40)
|
||||
var/name = 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)))
|
||||
return
|
||||
var/obj/item/reagent_containers/pill/P
|
||||
|
||||
for(var/i = 0; i < amount; i++)
|
||||
P = new/obj/item/reagent_containers/pill/patch(drop_location())
|
||||
P.name = trim("[name] patch")
|
||||
adjust_item_drop_location(P)
|
||||
reagents.trans_to(P,vol_each)
|
||||
. = TRUE
|
||||
|
||||
if("createBottle")
|
||||
var/many = params["many"]
|
||||
if(reagents.total_volume == 0)
|
||||
return
|
||||
|
||||
if(condi)
|
||||
var/name = stripped_input(usr, "Name:","Name your bottle!", (reagents.total_volume ? reagents.get_master_reagent_name() : " "), MAX_NAME_LEN)
|
||||
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr)))
|
||||
return
|
||||
var/obj/item/reagent_containers/food/condiment/P = new(drop_location())
|
||||
P.originalname = name
|
||||
P.name = trim("[name] bottle")
|
||||
reagents.trans_to(P, P.volume)
|
||||
else
|
||||
var/amount_full = 0
|
||||
var/vol_part = min(reagents.total_volume, 30)
|
||||
if(text2num(many))
|
||||
amount_full = round(reagents.total_volume / 30)
|
||||
vol_part = reagents.total_volume % 30
|
||||
var/name = stripped_input(usr, "Name:","Name your bottle!", (reagents.total_volume ? reagents.get_master_reagent_name() : " "), MAX_NAME_LEN)
|
||||
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr)))
|
||||
return
|
||||
|
||||
var/obj/item/reagent_containers/glass/bottle/P
|
||||
for(var/i = 0; i < amount_full; i++)
|
||||
P = new/obj/item/reagent_containers/glass/bottle(drop_location())
|
||||
P.name = trim("[name] bottle")
|
||||
adjust_item_drop_location(P)
|
||||
reagents.trans_to(P, 30)
|
||||
|
||||
if(vol_part)
|
||||
P = new/obj/item/reagent_containers/glass/bottle(drop_location())
|
||||
P.name = trim("[name] bottle")
|
||||
adjust_item_drop_location(P)
|
||||
reagents.trans_to(P, vol_part)
|
||||
. = TRUE
|
||||
//CITADEL ADD Hypospray Vials
|
||||
if("createVial")
|
||||
var/many = params["many"]
|
||||
if(reagents.total_volume == 0)
|
||||
return
|
||||
|
||||
var/amount_full = 0
|
||||
var/vol_part = min(reagents.total_volume, 60)
|
||||
if(text2num(many))
|
||||
amount_full = round(reagents.total_volume / 60)
|
||||
vol_part = reagents.total_volume % 60
|
||||
var/name = 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)))
|
||||
return
|
||||
|
||||
var/obj/item/reagent_containers/glass/bottle/vial/small/P
|
||||
for(var/i = 0; i < amount_full; i++)
|
||||
P = new/obj/item/reagent_containers/glass/bottle/vial/small(drop_location())
|
||||
P.name = trim("[name] hypovial")
|
||||
adjust_item_drop_location(P)
|
||||
reagents.trans_to(P, 60)
|
||||
|
||||
if(vol_part)
|
||||
P = new/obj/item/reagent_containers/glass/bottle/vial/small(drop_location())
|
||||
P.name = trim("[name] hypovial")
|
||||
adjust_item_drop_location(P)
|
||||
reagents.trans_to(P, vol_part)
|
||||
. = TRUE
|
||||
//END CITADEL ADDITIONS
|
||||
if("analyze")
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[params["id"]]
|
||||
if(R)
|
||||
var/state = "Unknown"
|
||||
if(initial(R.reagent_state) == 1)
|
||||
state = "Solid"
|
||||
else if(initial(R.reagent_state) == 2)
|
||||
state = "Liquid"
|
||||
else if(initial(R.reagent_state) == 3)
|
||||
state = "Gas"
|
||||
var/const/P = 3 //The number of seconds between life ticks
|
||||
var/T = initial(R.metabolization_rate) * (60 / P)
|
||||
if(istype(R, /datum/reagent/fermi))
|
||||
fermianalyze = TRUE
|
||||
var/datum/chemical_reaction/Rcr = get_chemical_reaction(R.id)
|
||||
var/pHpeakCache = (Rcr.OptimalpHMin + Rcr.OptimalpHMax)/2
|
||||
analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold), "purityF" = initial(R.purity), "inverseRatioF" = initial(R.InverseChemVal), "purityE" = initial(Rcr.PurityMin), "minTemp" = initial(Rcr.OptimalTempMin), "maxTemp" = initial(Rcr.OptimalTempMax), "eTemp" = initial(Rcr.ExplodeTemp), "pHpeak" = pHpeakCache)
|
||||
else
|
||||
fermianalyze = FALSE
|
||||
analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold))
|
||||
screen = "analyze"
|
||||
return
|
||||
|
||||
if("goScreen")
|
||||
screen = params["screen"]
|
||||
. = TRUE
|
||||
|
||||
|
||||
|
||||
/obj/machinery/chem_master/proc/end_fermi_reaction()//Ends any reactions upon moving.
|
||||
if(beaker.reagents.fermiIsReacting)
|
||||
beaker.reagents.fermiEnd()
|
||||
|
||||
/obj/machinery/chem_master/proc/isgoodnumber(num)
|
||||
if(isnum(num))
|
||||
if(num > 200)
|
||||
num = 200
|
||||
else if(num < 0)
|
||||
num = 0
|
||||
else
|
||||
num = round(num)
|
||||
return num
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
/obj/machinery/chem_master/adjust_item_drop_location(atom/movable/AM) // Special version for chemmasters and condimasters
|
||||
if (AM == beaker)
|
||||
AM.pixel_x = -8
|
||||
AM.pixel_y = 8
|
||||
return null
|
||||
else if (AM == bottle)
|
||||
if (length(bottle.contents))
|
||||
AM.pixel_x = -13
|
||||
else
|
||||
AM.pixel_x = -7
|
||||
AM.pixel_y = -8
|
||||
return null
|
||||
else
|
||||
var/md5 = md5(AM.name)
|
||||
for (var/i in 1 to 32)
|
||||
. += hex2num(md5[i])
|
||||
. = . % 9
|
||||
AM.pixel_x = ((.%3)*6)
|
||||
AM.pixel_y = -8 + (round( . / 3)*8)
|
||||
|
||||
/obj/machinery/chem_master/condimaster
|
||||
name = "CondiMaster 3000"
|
||||
desc = "Used to create condiments and other cooking supplies."
|
||||
condi = TRUE
|
||||
|
||||
#undef PILL_STYLE_COUNT
|
||||
#undef RANDOM_PILL_STYLE
|
||||
@@ -0,0 +1,67 @@
|
||||
/obj/machinery/chem_dispenser/chem_synthesizer //formerly SCP-294 made by mrty, but now only for testing purposes
|
||||
name = "\improper debug chemical synthesizer"
|
||||
desc = "If you see this, yell at adminbus."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "dispenser"
|
||||
amount = 10
|
||||
resistance_flags = INDESTRUCTIBLE | FIRE_PROOF | ACID_PROOF | LAVA_PROOF
|
||||
flags_1 = NODECONSTRUCT_1
|
||||
use_power = NO_POWER_USE
|
||||
var/static/list/shortcuts = list(
|
||||
"meth" = "methamphetamine",
|
||||
"tricord" = "tricordrazine"
|
||||
)
|
||||
|
||||
/obj/machinery/chem_dispenser/chem_synthesizer/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
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, "chem_synthesizer", name, 390, 330, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/chem_dispenser/chem_synthesizer/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("ejectBeaker")
|
||||
if(beaker)
|
||||
beaker.forceMove(drop_location())
|
||||
if(Adjacent(usr) && !issilicon(usr))
|
||||
usr.put_in_hands(beaker)
|
||||
beaker = null
|
||||
. = TRUE
|
||||
if("input")
|
||||
var/input_reagent = replacetext(lowertext(input("Enter the name of any liquid", "Input") as text), " ", "") //95% of the time, the reagent id is a lowercase/no spaces version of the name
|
||||
if(shortcuts[input_reagent])
|
||||
input_reagent = shortcuts[input_reagent]
|
||||
else
|
||||
input_reagent = find_reagent(input_reagent)
|
||||
if(!input_reagent || !GLOB.chemical_reagents_list[input_reagent])
|
||||
say("OUT OF RANGE")
|
||||
return
|
||||
else
|
||||
if(!beaker)
|
||||
return
|
||||
else if(!beaker.reagents && !QDELETED(beaker))
|
||||
beaker.create_reagents(beaker.volume)
|
||||
beaker.reagents.add_reagent(input_reagent, amount)
|
||||
if("makecup")
|
||||
if(beaker)
|
||||
return
|
||||
beaker = new /obj/item/reagent_containers/glass/beaker/bluespace(src)
|
||||
visible_message("<span class='notice'>[src] dispenses a bluespace beaker.</span>")
|
||||
if("amount")
|
||||
var/input = input("Units to dispense", "Units") as num|null
|
||||
if(input)
|
||||
amount = input
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/chem_dispenser/chem_synthesizer/proc/find_reagent(input)
|
||||
. = FALSE
|
||||
if(GLOB.chemical_reagents_list[input]) //prefer IDs!
|
||||
return input
|
||||
else
|
||||
for(var/X in GLOB.chemical_reagents_list)
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[X]
|
||||
if(input == replacetext(lowertext(R.name), " ", ""))
|
||||
return X
|
||||
@@ -0,0 +1,249 @@
|
||||
#define MAIN_SCREEN 1
|
||||
#define SYMPTOM_DETAILS 2
|
||||
|
||||
/obj/machinery/computer/pandemic
|
||||
name = "PanD.E.M.I.C 2200"
|
||||
desc = "Used to work with viruses."
|
||||
density = TRUE
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "mixer0"
|
||||
circuit = /obj/item/circuitboard/computer/pandemic
|
||||
use_power = TRUE
|
||||
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
|
||||
|
||||
/obj/machinery/computer/pandemic/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/pandemic/Destroy()
|
||||
QDEL_NULL(beaker)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/pandemic/handle_atom_del(atom/A)
|
||||
. = ..()
|
||||
if(A == beaker)
|
||||
beaker = null
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/pandemic/proc/get_by_index(thing, index)
|
||||
if(!beaker || !beaker.reagents)
|
||||
return
|
||||
var/datum/reagent/blood/B = locate() in beaker.reagents.reagent_list
|
||||
if(B && B.data[thing])
|
||||
return B.data[thing][index]
|
||||
|
||||
/obj/machinery/computer/pandemic/proc/get_virus_id_by_index(index)
|
||||
var/datum/disease/D = get_by_index("viruses", index)
|
||||
if(D)
|
||||
return D.GetDiseaseID()
|
||||
|
||||
/obj/machinery/computer/pandemic/proc/get_viruses_data(datum/reagent/blood/B)
|
||||
. = list()
|
||||
var/list/V = B.get_diseases()
|
||||
var/index = 1
|
||||
for(var/virus in V)
|
||||
var/datum/disease/D = virus
|
||||
if(!istype(D) || D.visibility_flags & HIDDEN_PANDEMIC)
|
||||
continue
|
||||
|
||||
var/list/this = list()
|
||||
this["name"] = D.name
|
||||
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["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["symptoms"] += list(this_symptom)
|
||||
this["resistance"] = A.totalResistance()
|
||||
this["stealth"] = A.totalStealth()
|
||||
this["stage_speed"] = A.totalStageSpeed()
|
||||
this["transmission"] = A.totalTransmittable()
|
||||
this["index"] = index++
|
||||
this["agent"] = D.agent
|
||||
this["description"] = D.desc || "none"
|
||||
this["spread"] = D.spread_text || "none"
|
||||
this["cure"] = D.cure_text || "none"
|
||||
|
||||
. += list(this)
|
||||
|
||||
/obj/machinery/computer/pandemic/proc/get_symptom_data(datum/symptom/S)
|
||||
. = list()
|
||||
var/list/this = list()
|
||||
this["name"] = S.name
|
||||
this["desc"] = S.desc
|
||||
this["stealth"] = S.stealth
|
||||
this["resistance"] = S.resistance
|
||||
this["stage_speed"] = S.stage_speed
|
||||
this["transmission"] = S.transmittable
|
||||
this["level"] = S.level
|
||||
this["neutered"] = S.neutered
|
||||
this["threshold_desc"] = S.threshold_desc
|
||||
. += this
|
||||
|
||||
/obj/machinery/computer/pandemic/proc/get_resistance_data(datum/reagent/blood/B)
|
||||
. = list()
|
||||
if(!islist(B.data["resistances"]))
|
||||
return
|
||||
var/list/resistances = B.data["resistances"]
|
||||
for(var/id in resistances)
|
||||
var/list/this = list()
|
||||
var/datum/disease/D = SSdisease.archive_diseases[id]
|
||||
if(D)
|
||||
this["id"] = id
|
||||
this["name"] = D.name
|
||||
|
||||
. += list(this)
|
||||
|
||||
/obj/machinery/computer/pandemic/proc/reset_replicator_cooldown()
|
||||
wait = FALSE
|
||||
update_icon()
|
||||
playsound(loc, 'sound/machines/ping.ogg', 30, 1)
|
||||
|
||||
/obj/machinery/computer/pandemic/update_icon()
|
||||
if(stat & BROKEN)
|
||||
icon_state = (beaker ? "mixer1_b" : "mixer0_b")
|
||||
return
|
||||
|
||||
icon_state = "mixer[(beaker) ? "1" : "0"][powered() ? "" : "_nopower"]"
|
||||
if(wait)
|
||||
add_overlay("waitlight")
|
||||
else
|
||||
cut_overlays()
|
||||
|
||||
/obj/machinery/computer/pandemic/proc/eject_beaker()
|
||||
if(beaker)
|
||||
beaker.forceMove(drop_location())
|
||||
beaker = null
|
||||
update_icon()
|
||||
|
||||
/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.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["blood"] = list()
|
||||
data["blood"]["dna"] = B.data["blood_DNA"] || "none"
|
||||
data["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)
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/pandemic/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("eject_beaker")
|
||||
eject_beaker()
|
||||
. = TRUE
|
||||
if("empty_beaker")
|
||||
if(beaker)
|
||||
beaker.reagents.clear_reagents()
|
||||
. = TRUE
|
||||
if("empty_eject_beaker")
|
||||
if(beaker)
|
||||
beaker.reagents.clear_reagents()
|
||||
eject_beaker()
|
||||
. = TRUE
|
||||
if("rename_disease")
|
||||
var/id = get_virus_id_by_index(text2num(params["index"]))
|
||||
var/datum/disease/advance/A = SSdisease.archive_diseases[id]
|
||||
if(!A.mutable)
|
||||
return
|
||||
if(A)
|
||||
var/new_name = stripped_input(usr, "Name the disease", "New name", "", MAX_NAME_LEN)
|
||||
if(!new_name || ..())
|
||||
return
|
||||
A.AssignName(new_name)
|
||||
. = TRUE
|
||||
if("create_culture_bottle")
|
||||
var/id = get_virus_id_by_index(text2num(params["index"]))
|
||||
var/datum/disease/advance/A = SSdisease.archive_diseases[id]
|
||||
if(!istype(A) || !A.mutable)
|
||||
to_chat(usr, "<span class='warning'>ERROR: Cannot replicate virus strain.</span>")
|
||||
return
|
||||
A = A.Copy()
|
||||
var/list/data = list("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("blood", 20, data)
|
||||
wait = TRUE
|
||||
update_icon()
|
||||
addtimer(CALLBACK(src, .proc/reset_replicator_cooldown), 50)
|
||||
. = TRUE
|
||||
if("create_vaccine_bottle")
|
||||
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("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())
|
||||
. = TRUE //no afterattack
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(beaker)
|
||||
to_chat(user, "<span class='warning'>A container is already loaded into [src]!</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
|
||||
beaker = I
|
||||
to_chat(user, "<span class='notice'>You insert [I] into [src].</span>")
|
||||
update_icon()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/pandemic/on_deconstruction()
|
||||
eject_beaker()
|
||||
. = ..()
|
||||
@@ -0,0 +1,316 @@
|
||||
|
||||
#define MILK_TO_BUTTER_COEFF 15
|
||||
|
||||
/obj/machinery/reagentgrinder
|
||||
name = "\improper All-In-One Grinder"
|
||||
desc = "From BlenderTech. Will It Blend? Let's test it out!"
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "juicer1"
|
||||
layer = BELOW_OBJ_LAYER
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 5
|
||||
active_power_usage = 100
|
||||
circuit = /obj/item/circuitboard/machine/reagentgrinder
|
||||
pass_flags = PASSTABLE
|
||||
resistance_flags = ACID_PROOF
|
||||
var/operating = FALSE
|
||||
var/obj/item/reagent_containers/beaker = null
|
||||
var/limit = 10
|
||||
var/speed = 1
|
||||
var/list/holdingitems
|
||||
|
||||
var/static/radial_examine = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_examine")
|
||||
var/static/radial_eject = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_eject")
|
||||
var/static/radial_grind = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_grind")
|
||||
var/static/radial_juice = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_juice")
|
||||
var/static/radial_mix = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_mix")
|
||||
|
||||
/obj/machinery/reagentgrinder/Initialize()
|
||||
. = ..()
|
||||
holdingitems = list()
|
||||
beaker = new /obj/item/reagent_containers/glass/beaker/large(src)
|
||||
beaker.desc += " May contain blended dust. Don't breathe this in!"
|
||||
|
||||
/obj/machinery/reagentgrinder/constructed/Initialize()
|
||||
. = ..()
|
||||
holdingitems = list()
|
||||
QDEL_NULL(beaker)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/reagentgrinder/Destroy()
|
||||
if(beaker)
|
||||
beaker.forceMove(drop_location())
|
||||
drop_all_items()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/reagentgrinder/contents_explosion(severity, target)
|
||||
if(beaker)
|
||||
beaker.ex_act(severity, target)
|
||||
|
||||
/obj/machinery/reagentgrinder/RefreshParts()
|
||||
speed = 1
|
||||
for(var/obj/item/stock_parts/manipulator/M in component_parts)
|
||||
speed = M.rating
|
||||
|
||||
/obj/machinery/reagentgrinder/handle_atom_del(atom/A)
|
||||
. = ..()
|
||||
if(A == beaker)
|
||||
beaker = null
|
||||
update_icon()
|
||||
if(holdingitems[A])
|
||||
holdingitems -= A
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/drop_all_items()
|
||||
for(var/i in holdingitems)
|
||||
var/atom/movable/AM = i
|
||||
AM.forceMove(drop_location())
|
||||
holdingitems = list()
|
||||
|
||||
/obj/machinery/reagentgrinder/update_icon()
|
||||
if(beaker)
|
||||
icon_state = "juicer1"
|
||||
else
|
||||
icon_state = "juicer0"
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/replace_beaker(mob/living/user, obj/item/reagent_containers/new_beaker)
|
||||
if(beaker)
|
||||
beaker.forceMove(drop_location())
|
||||
if(user && Adjacent(user) && !issiliconoradminghost(user))
|
||||
user.put_in_hands(beaker)
|
||||
if(new_beaker)
|
||||
beaker = new_beaker
|
||||
else
|
||||
beaker = null
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/reagentgrinder/attackby(obj/item/I, mob/user, params)
|
||||
//You can only screw open empty grinder
|
||||
if(!beaker && !length(holdingitems) && default_deconstruction_screwdriver(user, icon_state, icon_state, I))
|
||||
return
|
||||
|
||||
if(default_deconstruction_crowbar(I))
|
||||
return
|
||||
|
||||
if(default_unfasten_wrench(user, I))
|
||||
return
|
||||
|
||||
if(panel_open) //Can't insert objects when its screwed open
|
||||
return TRUE
|
||||
|
||||
if (istype(I, /obj/item/reagent_containers) && !(I.item_flags & ABSTRACT) && I.is_open_container())
|
||||
var/obj/item/reagent_containers/B = I
|
||||
. = TRUE
|
||||
if(!user.transferItemToLoc(B, src))
|
||||
return
|
||||
replace_beaker(user, B)
|
||||
to_chat(user, "<span class='notice'>You add [B] to [src].</span>")
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(holdingitems.len >= limit)
|
||||
to_chat(user, "<span class='warning'>[src] is filled to capacity!</span>")
|
||||
return TRUE
|
||||
|
||||
//Fill machine with a bag!
|
||||
if(istype(I, /obj/item/storage/bag))
|
||||
var/list/inserted = list()
|
||||
if(SEND_SIGNAL(I, COMSIG_TRY_STORAGE_TAKE_TYPE, /obj/item/reagent_containers/food/snacks/grown, src, limit - length(holdingitems), null, null, user, inserted))
|
||||
for(var/i in inserted)
|
||||
holdingitems[i] = TRUE
|
||||
if(!I.contents.len)
|
||||
to_chat(user, "<span class='notice'>You empty [I] into [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You fill [src] to the brim.</span>")
|
||||
return TRUE
|
||||
|
||||
if(!I.grind_results && !I.juice_results)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return ..()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You cannot grind [I] into reagents!</span>")
|
||||
return TRUE
|
||||
|
||||
if(!I.grind_requirements(src)) //Error messages should be in the objects' definitions
|
||||
return
|
||||
|
||||
if(user.transferItemToLoc(I, src))
|
||||
to_chat(user, "<span class='notice'>You add [I] to [src].</span>")
|
||||
holdingitems[I] = TRUE
|
||||
return FALSE
|
||||
|
||||
/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)))
|
||||
return
|
||||
|
||||
var/list/options = list()
|
||||
|
||||
if(beaker || length(holdingitems))
|
||||
options["eject"] = radial_eject
|
||||
|
||||
if(isAI(user))
|
||||
if(stat & NOPOWER)
|
||||
return
|
||||
options["examine"] = radial_examine
|
||||
|
||||
// if there is no power or it's broken, the procs will fail but the buttons will still show
|
||||
if(length(holdingitems))
|
||||
options["grind"] = radial_grind
|
||||
options["juice"] = radial_juice
|
||||
else if(beaker?.reagents.total_volume)
|
||||
options["mix"] = radial_mix
|
||||
|
||||
var/choice
|
||||
|
||||
if(length(options) < 1)
|
||||
return
|
||||
if(length(options) == 1)
|
||||
for(var/key in options)
|
||||
choice = key
|
||||
else
|
||||
choice = show_radial_menu(user, src, options, require_near = !issilicon(user))
|
||||
|
||||
// post choice verification
|
||||
if(operating || (isAI(user) && stat & NOPOWER) || !user.canUseTopic(src, !issilicon(user)))
|
||||
return
|
||||
|
||||
switch(choice)
|
||||
if("eject")
|
||||
eject(user)
|
||||
if("grind")
|
||||
grind(user)
|
||||
if("juice")
|
||||
juice(user)
|
||||
if("mix")
|
||||
mix(user)
|
||||
if("examine")
|
||||
examine(user)
|
||||
|
||||
/obj/machinery/reagentgrinder/examine(mob/user)
|
||||
. = ..()
|
||||
if(!in_range(user, src) && !issilicon(user) && !isobserver(user))
|
||||
to_chat(user, "<span class='warning'>You're too far away to examine [src]'s contents and display!</span>")
|
||||
return
|
||||
|
||||
if(operating)
|
||||
to_chat(user, "<span class='warning'>\The [src] is operating.</span>")
|
||||
return
|
||||
|
||||
if(beaker || length(holdingitems))
|
||||
to_chat(user, "<span class='notice'>\The [src] contains:</span>")
|
||||
if(beaker)
|
||||
to_chat(user, "<span class='notice'>- \A [beaker].</span>")
|
||||
for(var/i in holdingitems)
|
||||
var/obj/item/O = i
|
||||
to_chat(user, "<span class='notice'>- \A [O.name].</span>")
|
||||
|
||||
if(!(stat & (NOPOWER|BROKEN)))
|
||||
to_chat(user, "<span class='notice'>The status display reads:</span>")
|
||||
to_chat(user, "<span class='notice'>- Grinding reagents at <b>[speed*100]%</b>.<span>")
|
||||
if(beaker)
|
||||
for(var/datum/reagent/R in beaker.reagents.reagent_list)
|
||||
to_chat(user, "<span class='notice'>- [R.volume] units of [R.name].</span>")
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/eject(mob/user)
|
||||
for(var/i in holdingitems)
|
||||
var/obj/item/O = i
|
||||
O.forceMove(drop_location())
|
||||
holdingitems -= O
|
||||
if(beaker)
|
||||
replace_beaker(user)
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/remove_object(obj/item/O)
|
||||
holdingitems -= O
|
||||
qdel(O)
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/shake_for(duration)
|
||||
var/offset = prob(50) ? -2 : 2
|
||||
var/old_pixel_x = pixel_x
|
||||
animate(src, pixel_x = pixel_x + offset, time = 0.2, loop = -1) //start shaking
|
||||
addtimer(CALLBACK(src, .proc/stop_shaking, old_pixel_x), duration)
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/stop_shaking(old_px)
|
||||
animate(src)
|
||||
pixel_x = old_px
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/operate_for(time, silent = FALSE, juicing = FALSE)
|
||||
shake_for(time / speed)
|
||||
operating = TRUE
|
||||
if(!silent)
|
||||
if(!juicing)
|
||||
playsound(src, 'sound/machines/blender.ogg', 50, 1)
|
||||
else
|
||||
playsound(src, 'sound/machines/juicer.ogg', 20, 1)
|
||||
addtimer(CALLBACK(src, .proc/stop_operating), time / speed)
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/stop_operating()
|
||||
operating = FALSE
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/juice()
|
||||
power_change()
|
||||
if(!beaker || stat & (NOPOWER|BROKEN) || beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
return
|
||||
operate_for(50, juicing = TRUE)
|
||||
for(var/obj/item/i in holdingitems)
|
||||
if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
break
|
||||
var/obj/item/I = i
|
||||
if(I.juice_results)
|
||||
juice_item(I)
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/juice_item(obj/item/I) //Juicing results can be found in respective object definitions
|
||||
if(I.on_juice(src) == -1)
|
||||
to_chat(usr, "<span class='danger'>[src] shorts out as it tries to juice up [I], and transfers it back to storage.</span>")
|
||||
return
|
||||
beaker.reagents.add_reagent_list(I.juice_results)
|
||||
remove_object(I)
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/grind()
|
||||
power_change()
|
||||
if(!beaker || stat & (NOPOWER|BROKEN) || beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
return
|
||||
operate_for(60)
|
||||
for(var/i in holdingitems)
|
||||
if(beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
|
||||
break
|
||||
var/obj/item/I = i
|
||||
if(I.grind_results)
|
||||
grind_item(i)
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/grind_item(obj/item/I) //Grind results can be found in respective object definitions
|
||||
if(I.on_grind(src) == -1) //Call on_grind() to change amount as needed, and stop grinding the item if it returns -1
|
||||
to_chat(usr, "<span class='danger'>[src] shorts out as it tries to grind up [I], and transfers it back to storage.</span>")
|
||||
return
|
||||
beaker.reagents.add_reagent_list(I.grind_results)
|
||||
if(I.reagents)
|
||||
I.reagents.trans_to(beaker, I.reagents.total_volume)
|
||||
remove_object(I)
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/mix(mob/user)
|
||||
//For butter and other things that would change upon shaking or mixing
|
||||
power_change()
|
||||
if(!beaker || stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
operate_for(50, juicing = TRUE)
|
||||
addtimer(CALLBACK(src, /obj/machinery/reagentgrinder/proc/mix_complete), 50)
|
||||
|
||||
/obj/machinery/reagentgrinder/proc/mix_complete()
|
||||
if(beaker?.reagents.total_volume)
|
||||
//Recipe to make Butter
|
||||
var/butter_amt = FLOOR(beaker.reagents.get_reagent_amount("milk") / MILK_TO_BUTTER_COEFF, 1)
|
||||
beaker.reagents.remove_reagent("milk", MILK_TO_BUTTER_COEFF * butter_amt)
|
||||
for(var/i in 1 to butter_amt)
|
||||
new /obj/item/reagent_containers/food/snacks/butter(drop_location())
|
||||
//Recipe to make Mayonnaise
|
||||
if (beaker.reagents.has_reagent("eggyolk"))
|
||||
var/amount = beaker.reagents.get_reagent_amount("eggyolk")
|
||||
beaker.reagents.remove_reagent("eggyolk", amount)
|
||||
beaker.reagents.add_reagent("mayonnaise", amount)
|
||||
//Moonsugar for skooma
|
||||
if(beaker.reagents.has_reagent("sugar") && beaker.reagents.has_reagent("moonshine"))
|
||||
var/amount = min(beaker.reagents.get_reagent_amount("sugar"), beaker.reagents.get_reagent_amount("moonshine"))
|
||||
beaker.reagents.remove_reagent("sugar", amount)
|
||||
beaker.reagents.remove_reagent("moonshine", amount)
|
||||
beaker.reagents.add_reagent("moonsugar", amount*2)
|
||||
@@ -0,0 +1,152 @@
|
||||
#define REAGENTS_BASE_VOLUME 100 // actual volume is REAGENTS_BASE_VOLUME plus REAGENTS_BASE_VOLUME * rating for each matterbin
|
||||
|
||||
/obj/machinery/smoke_machine
|
||||
name = "smoke machine"
|
||||
desc = "A machine with a centrifuge installed into it. It produces smoke with any reagents you put into the machine."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "smoke0"
|
||||
density = TRUE
|
||||
circuit = /obj/item/circuitboard/machine/smoke_machine
|
||||
var/efficiency = 10
|
||||
var/on = FALSE
|
||||
var/cooldown = 0
|
||||
var/screen = "home"
|
||||
var/useramount = 30 // Last used amount
|
||||
var/setting = 1 // displayed range is 3 * setting
|
||||
var/max_range = 3 // displayed max range is 3 * max range
|
||||
|
||||
/datum/effect_system/smoke_spread/chem/smoke_machine/set_up(datum/reagents/carry, setting=1, efficiency=10, loc)
|
||||
amount = setting
|
||||
carry.copy_to(chemholder, 20)
|
||||
carry.remove_any(amount * 16 / efficiency)
|
||||
location = loc
|
||||
|
||||
/datum/effect_system/smoke_spread/chem/smoke_machine
|
||||
effect_type = /obj/effect/particle_effect/smoke/chem/smoke_machine
|
||||
|
||||
/obj/effect/particle_effect/smoke/chem/smoke_machine
|
||||
opaque = FALSE
|
||||
alpha = 100
|
||||
|
||||
/obj/machinery/smoke_machine/Initialize()
|
||||
. = ..()
|
||||
create_reagents(REAGENTS_BASE_VOLUME)
|
||||
for(var/obj/item/stock_parts/matter_bin/B in component_parts)
|
||||
reagents.maximum_volume += REAGENTS_BASE_VOLUME * B.rating
|
||||
|
||||
/obj/machinery/smoke_machine/update_icon()
|
||||
if((!is_operational()) || (!on) || (reagents.total_volume == 0))
|
||||
if (panel_open)
|
||||
icon_state = "smoke0-o"
|
||||
else
|
||||
icon_state = "smoke0"
|
||||
else
|
||||
icon_state = "smoke1"
|
||||
return ..()
|
||||
|
||||
/obj/machinery/smoke_machine/RefreshParts()
|
||||
var/new_volume = REAGENTS_BASE_VOLUME
|
||||
for(var/obj/item/stock_parts/matter_bin/B in component_parts)
|
||||
new_volume += REAGENTS_BASE_VOLUME * B.rating
|
||||
if(!reagents)
|
||||
create_reagents(new_volume)
|
||||
reagents.maximum_volume = new_volume
|
||||
if(new_volume < reagents.total_volume)
|
||||
reagents.reaction(loc, TOUCH) // if someone manages to downgrade it without deconstructing
|
||||
reagents.clear_reagents()
|
||||
efficiency = 9
|
||||
for(var/obj/item/stock_parts/capacitor/C in component_parts)
|
||||
efficiency += C.rating
|
||||
max_range = 1
|
||||
for(var/obj/item/stock_parts/manipulator/M in component_parts)
|
||||
max_range += M.rating
|
||||
max_range = max(3, max_range)
|
||||
|
||||
/obj/machinery/smoke_machine/process()
|
||||
..()
|
||||
if(!is_operational())
|
||||
return
|
||||
if(reagents.total_volume == 0)
|
||||
on = FALSE
|
||||
update_icon()
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
var/smoke_test = locate(/obj/effect/particle_effect/smoke) in T
|
||||
if(on && !smoke_test)
|
||||
update_icon()
|
||||
var/datum/effect_system/smoke_spread/chem/smoke_machine/smoke = new()
|
||||
smoke.set_up(reagents, setting*3, efficiency, T)
|
||||
smoke.start()
|
||||
|
||||
/obj/machinery/smoke_machine/attackby(obj/item/I, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(I, /obj/item/reagent_containers) && I.is_open_container())
|
||||
var/obj/item/reagent_containers/RC = I
|
||||
var/units = RC.reagents.trans_to(src, RC.amount_per_transfer_from_this)
|
||||
if(units)
|
||||
to_chat(user, "<span class='notice'>You transfer [units] units of the solution to [src].</span>")
|
||||
log_combat(usr, src, "has added [english_list(RC.reagents.reagent_list)] to [src]")
|
||||
return
|
||||
if(default_unfasten_wrench(user, I, 40))
|
||||
on = FALSE
|
||||
return
|
||||
if(default_deconstruction_screwdriver(user, "smoke0-o", "smoke0", I))
|
||||
return
|
||||
if(default_deconstruction_crowbar(I))
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/smoke_machine/deconstruct()
|
||||
reagents.reaction(loc, TOUCH)
|
||||
reagents.clear_reagents()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/smoke_machine/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
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.open()
|
||||
|
||||
/obj/machinery/smoke_machine/ui_data(mob/user)
|
||||
var/data = list()
|
||||
var/TankContents[0]
|
||||
var/TankCurrentVolume = 0
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
TankContents.Add(list(list("name" = R.name, "volume" = R.volume))) // list in a list because Byond merges the first list...
|
||||
TankCurrentVolume += R.volume
|
||||
data["TankContents"] = TankContents
|
||||
data["isTankLoaded"] = reagents.total_volume ? TRUE : FALSE
|
||||
data["TankCurrentVolume"] = reagents.total_volume ? reagents.total_volume : null
|
||||
data["TankMaxVolume"] = reagents.maximum_volume
|
||||
data["active"] = on
|
||||
data["setting"] = setting
|
||||
data["screen"] = screen
|
||||
data["maxSetting"] = max_range
|
||||
return data
|
||||
|
||||
/obj/machinery/smoke_machine/ui_act(action, params)
|
||||
if(..() || !anchored)
|
||||
return
|
||||
switch(action)
|
||||
if("purge")
|
||||
reagents.clear_reagents()
|
||||
update_icon()
|
||||
. = TRUE
|
||||
if("setting")
|
||||
var/amount = text2num(params["amount"])
|
||||
if(amount in 1 to max_range)
|
||||
setting = amount
|
||||
. = TRUE
|
||||
if("power")
|
||||
on = !on
|
||||
update_icon()
|
||||
if(on)
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] activated a smoke machine that contains [english_list(reagents.reagent_list)] at [ADMIN_VERBOSEJMP(src)].")
|
||||
log_game("[key_name(usr)] activated a smoke machine that contains [english_list(reagents.reagent_list)] at [AREACOORD(src)].")
|
||||
log_combat(usr, src, "has activated [src] which contains [english_list(reagents.reagent_list)] at [AREACOORD(src)].")
|
||||
if("goScreen")
|
||||
screen = params["screen"]
|
||||
. = TRUE
|
||||
|
||||
#undef REAGENTS_BASE_VOLUME
|
||||
@@ -0,0 +1,258 @@
|
||||
**NOTE: IF YOU UPDATE THE REAGENT-SYSTEM, ALSO UPDATE THIS README.**
|
||||
|
||||
```
|
||||
Structure: /////////////////// //////////////////////////
|
||||
// Mob or object // -------> // Reagents var (datum) // Is a reference to the datum that holds the reagents.
|
||||
/////////////////// //////////////////////////
|
||||
| |
|
||||
The object that holds everything. V
|
||||
reagent_list var (list) A List of datums, each datum is a reagent.
|
||||
|
||||
| | |
|
||||
V V V
|
||||
|
||||
reagents (datums) Reagents. I.e. Water , cryoxadone or mercury.
|
||||
```
|
||||
|
||||
# Random important notes:
|
||||
An objects on_reagent_change will be called every time the objects reagents change. Useful if you want to update the objects icon etc.
|
||||
|
||||
# About the Holder:
|
||||
The holder (reagents datum) is the datum that holds a list of all reagents currently in the object.It also has all the procs needed to manipulate reagents
|
||||
```
|
||||
remove_any(var/amount)
|
||||
This proc removes reagents from the holder until the passed amount
|
||||
is matched. It'll try to remove some of ALL reagents contained.
|
||||
|
||||
remove_all(var/amount)
|
||||
This proc removes reagents from the holder equally.
|
||||
|
||||
trans_to(var/obj/target, var/amount)
|
||||
This proc equally transfers the contents of the holder to another
|
||||
objects holder. You need to pass it the object (not the holder) you want
|
||||
to transfer to and the amount you want to transfer. Its return value is the
|
||||
actual amount transfered (if one of the objects is full/empty)
|
||||
|
||||
trans_id_to(var/obj/target, var/reagent, var/amount)
|
||||
Same as above but only for a specific reagent in the reagent list.
|
||||
If the specified amount is greater than what is available, it will use
|
||||
the amount of the reagent that is available. If no reagent exists, returns null.
|
||||
|
||||
metabolize(var/mob/living/carbon/C)
|
||||
This proc is called by the mobs life proc. It simply calls on_mob_life for
|
||||
all contained reagents. You shouldnt have to use this one directly.
|
||||
|
||||
handle_reactions()
|
||||
This proc check all recipes and, on a match, uses them.
|
||||
It will also call the recipe's on_reaction proc (for explosions or w/e).
|
||||
Currently, this proc is automatically called by trans_to.
|
||||
|
||||
isolate_reagent(var/reagent)
|
||||
Pass it a reagent id and it will remove all reagents but that one.
|
||||
It's that simple.
|
||||
|
||||
del_reagent(var/reagent)
|
||||
Completely remove the reagent with the matching id.
|
||||
|
||||
reaction_fire(exposed_temp)
|
||||
Simply calls the reaction_fire procs of all contained reagents.
|
||||
|
||||
update_total()
|
||||
This one simply updates the total volume of the holder.
|
||||
(the volume of all reagents added together)
|
||||
|
||||
clear_reagents()
|
||||
This proc removes ALL reagents from the holder.
|
||||
|
||||
reaction(var/atom/A, var/method=TOUCH, var/volume_modifier=0)
|
||||
This proc calls the appropriate reaction procs of the reagents.
|
||||
I.e. if A is an object, it will call the reagents reaction_obj
|
||||
proc. The method var is used for reaction on mobs. It simply tells
|
||||
us if the mob TOUCHed the reagent, if it INGESTed the reagent, if the reagent
|
||||
was VAPORIZEd on them, if the reagent was INJECTed, or transfered via a PATCH to them.
|
||||
Since the volume can be checked in a reagents proc, you might want to
|
||||
use the volume_modifier var to modifiy the passed value without actually
|
||||
changing the volume of the reagents.
|
||||
If you're not sure if you need to use this the answer is very most likely 'No'.
|
||||
You'll want to use this proc whenever an atom first comes in
|
||||
contact with the reagents of a holder. (in the 'splash' part of a beaker i.e.)
|
||||
More on the reaction in the reagent part of this readme.
|
||||
|
||||
add_reagent(var/reagent, var/amount, var/data)
|
||||
Attempts to add X of the matching reagent to the holder.
|
||||
You wont use this much. Mostly in new procs for pre-filled
|
||||
objects.
|
||||
|
||||
remove_reagent(var/reagent, var/amount)
|
||||
The exact opposite of the add_reagent proc.
|
||||
|
||||
has_reagent(var/reagent, var/amount)
|
||||
Returns 1 if the holder contains this reagent.
|
||||
Or 0 if not.
|
||||
If you pass it an amount it will additionally check
|
||||
if the amount is matched. This is optional.
|
||||
|
||||
get_reagent_amount(var/reagent)
|
||||
Returns the amount of the matching reagent inside the
|
||||
holder. Returns 0 if the reagent is missing.
|
||||
|
||||
Important variables:
|
||||
|
||||
total_volume
|
||||
This variable contains the total volume of all reagents in this holder.
|
||||
|
||||
reagent_list
|
||||
This is a list of all contained reagents. More specifically, references
|
||||
to the reagent datums.
|
||||
|
||||
maximum_volume
|
||||
This is the maximum volume of the holder.
|
||||
|
||||
my_atom
|
||||
This is the atom the holder is 'in'. Useful if you need to find the location.
|
||||
(i.e. for explosions)
|
||||
```
|
||||
|
||||
# About Reagents:
|
||||
Reagents are all the things you can mix and fille in bottles etc. This can be anything from rejuvs over water to ... iron. Each reagent also has a few procs - i'll explain those below.
|
||||
```
|
||||
reaction_mob(var/mob/living/L, var/method=TOUCH)
|
||||
This is called by the holder's reation proc.
|
||||
This version is only called when the reagent
|
||||
reacts with a mob. The method var can be either
|
||||
TOUCH or INGEST. You'll want to put stuff like
|
||||
acid-facemelting in here.
|
||||
|
||||
reaction_obj(var/obj/O)
|
||||
This is called by the holder's reation proc.
|
||||
This version is called when the reagents reacts
|
||||
with an object. You'll want to put stuff like
|
||||
object melting in here ... or something. i dunno.
|
||||
|
||||
reaction_turf(var/turf/T)
|
||||
This is called by the holder's reation proc.
|
||||
This version is called when the reagents reacts
|
||||
with a turf. You'll want to put stuff like extra
|
||||
slippery floors for lube or something in here.
|
||||
|
||||
on_mob_life(var/mob/living/L)
|
||||
This proc is called everytime the mobs life proc executes.
|
||||
This is the place where you put damage for toxins ,
|
||||
drowsyness for sleep toxins etc etc.
|
||||
You'll want to call the parents proc by using ..() .
|
||||
If you dont, the chemical will stay in the mob forever -
|
||||
unless you write your own piece of code to slowly remove it.
|
||||
(Should be pretty easy, 1 line of code)
|
||||
```
|
||||
|
||||
## Important variables:
|
||||
```
|
||||
holder
|
||||
This variable contains a reference to the holder the chemical is 'in'
|
||||
|
||||
volume
|
||||
This is the volume of the reagent.
|
||||
|
||||
id
|
||||
The id of the reagent
|
||||
|
||||
name
|
||||
The name of the reagent.
|
||||
|
||||
data
|
||||
This var can be used for whatever the fuck you want. I used it for the sleep
|
||||
toxins to make them work slowly instead of instantly. You could also use this
|
||||
for DNA in a blood reagent or ... well whatever you want.
|
||||
|
||||
color
|
||||
This is a hexadecimal color that represents the reagent outside of containers,
|
||||
you define it as "#RRGGBB", or, red green blue. You can also define it using the
|
||||
rgb() proc, which returns a hexadecimal value too. The color is black by default.
|
||||
```
|
||||
A good website for color calculations: http://www.psyclops.com/tools/rgb/
|
||||
|
||||
# About Recipes:
|
||||
Recipes are simple datums that contain a list of required reagents and a result. They also have a proc that is called when the recipe is matched.
|
||||
```
|
||||
on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
This proc is called when the recipe is matched.
|
||||
You'll want to add explosions etc here.
|
||||
To find the location you'll have to do something
|
||||
like get_turf(holder.my_atom)
|
||||
|
||||
name & id
|
||||
Should be pretty obvious.
|
||||
|
||||
results
|
||||
This var contains a list of the id(s) of the resulting reagents and their result amounts.
|
||||
I recommend you set this to the total volume of all required reagent.
|
||||
|
||||
required_reagents
|
||||
This is a list of ids of the required reagents.
|
||||
Each id also needs an associated value that gives us the minimum required amount
|
||||
of that reagent. The handle_reaction proc can detect mutiples of the same recipes
|
||||
so for most cases you want to set the required amount to 1.
|
||||
|
||||
required_catalysts
|
||||
This is a list of the ids of the required catalysts.
|
||||
Functionally similar to required_reagents, it is a list of reagents that are required
|
||||
for the reaction. However, unlike required_reagents, catalysts are NOT consumed.
|
||||
They mearly have to be present in the container.
|
||||
|
||||
required_container
|
||||
The container the recipe has to take place in in order to happen. Leave this blank/null
|
||||
if you want the reaction to happen anywhere.
|
||||
|
||||
required_other
|
||||
Basically like a reagent's data variable. You can set extra requirements for a
|
||||
reaction with this.
|
||||
|
||||
required_temp
|
||||
This is the required temperature.
|
||||
```
|
||||
|
||||
# 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:
|
||||
```
|
||||
var/datum/reagents/R = new/datum/reagents(100) <<<<< create a new datum , 100 is the maximum_volume of the new holder datum.
|
||||
reagents = R <<<<< assign the new datum to the objects reagents var
|
||||
R.my_atom = src <<<<< set the holders my_atom to src so that we know where we are.
|
||||
|
||||
This can also be done by calling a convenience proc:
|
||||
atom/proc/create_reagents(var/max_volume)
|
||||
```
|
||||
|
||||
## Other important stuff:
|
||||
```
|
||||
amount_per_transfer_from_this var
|
||||
This var is mostly used by beakers and bottles.
|
||||
It simply tells us how much to transfer when
|
||||
'pouring' our reagents into something else.
|
||||
|
||||
atom/proc/is_open_container()
|
||||
Checks atom/var/reagents.reagents_holder_flags & OPENCONTAINER.
|
||||
If this returns 1 , you can use syringes, beakers etc
|
||||
to manipulate the contents of this object.
|
||||
If it's 0, you'll need to write your own custom reagent
|
||||
transfer code since you will not be able to use the standard
|
||||
tools to manipulate it.
|
||||
|
||||
atom/proc/is_injectable()
|
||||
Checks if something can be injected to.
|
||||
If this returns 1, you can use syringes and droppers
|
||||
to draw from and add to the contents of this object.
|
||||
|
||||
atom/proc/is_drawable()
|
||||
Checks if something can be drawn from.
|
||||
If this returns 1, you can use syringes and droppers
|
||||
to draw from the contents of this object.
|
||||
```
|
||||
|
||||
# GOON CHEMS README:
|
||||
Credit goes to Cogwerks, and all the other goonstation coders for the original idea and implementation of this over at goonstation.
|
||||
|
||||
- THE REQUESTED DON'T PORT LIST: IF YOU PORT THESE THE GOONS WILL MURDER US IN OUR SLEEP SO PLEASE DON'T KTHX - Iamgoofball
|
||||
- Any of the Secret Chems
|
||||
- Goon in-joke chems (Eg. Cat Drugs, Hairgrownium)
|
||||
- Liquid Electricity
|
||||
- Rajajajah
|
||||
@@ -0,0 +1,149 @@
|
||||
#define REM REAGENTS_EFFECT_MULTIPLIER
|
||||
|
||||
//Various reagents
|
||||
//Toxin & acid reagents
|
||||
//Hydroponics stuff
|
||||
|
||||
/datum/reagent
|
||||
var/name = "Reagent"
|
||||
var/id = "reagent"
|
||||
var/description = ""
|
||||
var/specific_heat = SPECIFIC_HEAT_DEFAULT //J/(K*mol)
|
||||
var/taste_description = "metaphorical salt"
|
||||
var/taste_mult = 1 //how this taste compares to others. Higher values means it is more noticable
|
||||
var/glass_name = "glass of ...what?" // use for specialty drinks.
|
||||
var/glass_desc = "You can't really tell what this is."
|
||||
var/glass_icon_state = null // Otherwise just sets the icon to a normal glass with the mixture of the reagents in the glass.
|
||||
var/shot_glass_icon_state = null
|
||||
var/datum/reagents/holder = null
|
||||
var/reagent_state = LIQUID
|
||||
var/list/data
|
||||
var/current_cycle = 0
|
||||
var/volume = 0 //pretend this is moles
|
||||
var/color = "#000000" // rgb: 0, 0, 0
|
||||
var/can_synth = TRUE // can this reagent be synthesized? (for example: odysseus syringe gun)
|
||||
var/metabolization_rate = REAGENTS_METABOLISM //how fast the reagent is metabolized by the mob
|
||||
var/overrides_metab = 0
|
||||
var/overdose_threshold = 0
|
||||
var/addiction_threshold = 0
|
||||
var/addiction_stage = 0
|
||||
var/addiction_stage1_end = 10
|
||||
var/addiction_stage2_end = 20
|
||||
var/addiction_stage3_end = 30
|
||||
var/addiction_stage4_end = 40
|
||||
var/overdosed = 0 // You fucked up and this is now triggering its overdose effects, purge that shit quick.
|
||||
var/self_consuming = FALSE
|
||||
//Fermichem vars:
|
||||
var/purity = 1 //How pure a chemical is from 0 - 1.
|
||||
var/addProc = FALSE //If the chemical should force an on_new() call
|
||||
var/turf/loc = null //Should be the creation location!
|
||||
var/pH = 7 //pH of the specific reagent, used for calculating the sum pH of a holder.
|
||||
var/ImpureChem = "fermiTox"// What chemical is metabolised with an inpure reaction
|
||||
var/InverseChemVal = 0.25 // If the impurity is below 0.5, replace ALL of the chem with InverseChem upon metabolising
|
||||
var/InverseChem = "fermiTox"// What chem is metabolised when purity is below InverseChemVal, this shouldn't be made, but if it does, well, I guess I'll know about it.
|
||||
var/DoNotSplit = FALSE // If impurity is handled within the main chem itself
|
||||
var/OnMobMergeCheck = FALSE //Call on_mob_life proc when reagents are merging.
|
||||
var/metabolizing = FALSE
|
||||
var/invisible = FALSE //Set to true if it doesn't appear on handheld health analyzers.
|
||||
|
||||
/datum/reagent/Destroy() // This should only be called by the holder, so it's already handled clearing its references
|
||||
. = ..()
|
||||
holder = null
|
||||
|
||||
/datum/reagent/proc/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1, touch_protection = 0)
|
||||
if(!istype(M))
|
||||
return 0
|
||||
if(method == VAPOR) //smoke, foam, spray
|
||||
if(M.reagents)
|
||||
var/modifier = CLAMP((1 - touch_protection), 0, 1)
|
||||
var/amount = round(reac_volume*modifier, 0.1)
|
||||
if(amount >= 0.5)
|
||||
M.reagents.add_reagent(id, amount)
|
||||
return 1
|
||||
|
||||
/datum/reagent/proc/reaction_obj(obj/O, volume)
|
||||
return
|
||||
|
||||
/datum/reagent/proc/reaction_turf(turf/T, volume)
|
||||
return
|
||||
|
||||
/datum/reagent/proc/on_mob_life(mob/living/carbon/M)
|
||||
current_cycle++
|
||||
if(holder)
|
||||
holder.remove_reagent(src.id, metabolization_rate * M.metabolism_efficiency) //By default it slowly disappears.
|
||||
return
|
||||
|
||||
// Called when this reagent is first added to a mob
|
||||
/datum/reagent/proc/on_mob_add(mob/living/L)
|
||||
return
|
||||
|
||||
// Called when this reagent is removed while inside a mob
|
||||
/datum/reagent/proc/on_mob_delete(mob/living/L)
|
||||
return
|
||||
|
||||
// Called when this reagent first starts being metabolized by a liver
|
||||
/datum/reagent/proc/on_mob_metabolize(mob/living/L)
|
||||
return
|
||||
|
||||
// Called when this reagent stops being metabolized by a liver
|
||||
/datum/reagent/proc/on_mob_end_metabolize(mob/living/L)
|
||||
return
|
||||
|
||||
/datum/reagent/proc/on_move(mob/M)
|
||||
return
|
||||
|
||||
// Called after add_reagents creates a new reagent.
|
||||
/datum/reagent/proc/on_new(data)
|
||||
return
|
||||
|
||||
// Called when two reagents of the same are mixing.
|
||||
/datum/reagent/proc/on_merge(data)
|
||||
return
|
||||
|
||||
/datum/reagent/proc/on_update(atom/A)
|
||||
return
|
||||
|
||||
// Called when the reagent container is hit by an explosion
|
||||
/datum/reagent/proc/on_ex_act(severity)
|
||||
return
|
||||
|
||||
// Called if the reagent has passed the overdose threshold and is set to be triggering overdose effects
|
||||
/datum/reagent/proc/overdose_process(mob/living/M)
|
||||
return
|
||||
|
||||
/datum/reagent/proc/overdose_start(mob/living/M)
|
||||
to_chat(M, "<span class='userdanger'>You feel like you took too much of [name]!</span>")
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "[id]_overdose", /datum/mood_event/overdose, name)
|
||||
return
|
||||
|
||||
/datum/reagent/proc/addiction_act_stage1(mob/living/M)
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "[id]_overdose", /datum/mood_event/withdrawal_light, name)
|
||||
if(prob(30))
|
||||
to_chat(M, "<span class='notice'>You feel like having some [name] right about now.</span>")
|
||||
return
|
||||
|
||||
/datum/reagent/proc/addiction_act_stage2(mob/living/M)
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "[id]_overdose", /datum/mood_event/withdrawal_medium, name)
|
||||
if(prob(30))
|
||||
to_chat(M, "<span class='notice'>You feel like you need [name]. You just can't get enough.</span>")
|
||||
return
|
||||
|
||||
/datum/reagent/proc/addiction_act_stage3(mob/living/M)
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "[id]_overdose", /datum/mood_event/withdrawal_severe, name)
|
||||
if(prob(30))
|
||||
to_chat(M, "<span class='danger'>You have an intense craving for [name].</span>")
|
||||
return
|
||||
|
||||
/datum/reagent/proc/addiction_act_stage4(mob/living/M)
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "[id]_overdose", /datum/mood_event/withdrawal_critical, name)
|
||||
if(prob(30))
|
||||
to_chat(M, "<span class='boldannounce'>You're not feeling good at all! You really need some [name].</span>")
|
||||
return
|
||||
|
||||
/proc/pretty_string_from_reagent_list(list/reagent_list)
|
||||
//Convert reagent list to a printable string for logging etc
|
||||
var/list/rs = list()
|
||||
for (var/datum/reagent/R in reagent_list)
|
||||
rs += "[R.name], [R.volume]"
|
||||
|
||||
return rs.Join(" | ")
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,500 @@
|
||||
// These can only be applied by blobs. They are what blobs are made out of.
|
||||
/datum/reagent/blob
|
||||
name = "Unknown"
|
||||
description = "shouldn't exist and you should adminhelp immediately."
|
||||
color = "#FFFFFF"
|
||||
taste_description = "bad code and slime"
|
||||
var/complementary_color = "#000000" //a color that's complementary to the normal blob color
|
||||
var/shortdesc = null //just damage and on_mob effects, doesn't include special, blob-tile only effects
|
||||
var/effectdesc = null //any long, blob-tile specific effects
|
||||
var/analyzerdescdamage = "Unknown. Report this bug to a coder, or just adminhelp."
|
||||
var/analyzerdesceffect = "N/A"
|
||||
var/blobbernaut_message = "slams" //blobbernaut attack verb
|
||||
var/message = "The blob strikes you" //message sent to any mob hit by the blob
|
||||
var/message_living = null //extension to first mob sent to only living mobs i.e. silicons have no skin to be burnt
|
||||
can_synth = FALSE
|
||||
|
||||
/datum/reagent/blob/proc/send_message(mob/living/M)
|
||||
var/totalmessage = message
|
||||
if(message_living && !issilicon(M))
|
||||
totalmessage += message_living
|
||||
totalmessage += "!"
|
||||
to_chat(M, "<span class='userdanger'>[totalmessage]</span>")
|
||||
|
||||
/datum/reagent/blob/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O)
|
||||
if(M.stat == DEAD || istype(M, /mob/living/simple_animal/hostile/blob))
|
||||
return 0 //the dead, and blob mobs, don't cause reactions
|
||||
return round(reac_volume * min(1.5 - touch_protection, 1), 0.1) //full touch protection means 50% volume, any prot below 0.5 means 100% volume.
|
||||
|
||||
/datum/reagent/blob/proc/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag) //when the blob takes damage, do this
|
||||
return damage
|
||||
|
||||
/datum/reagent/blob/proc/death_reaction(obj/structure/blob/B, damage_flag) //when a blob dies, do this
|
||||
return
|
||||
|
||||
/datum/reagent/blob/proc/expand_reaction(obj/structure/blob/B, obj/structure/blob/newB, turf/T, mob/camera/blob/O) //when the blob expands, do this
|
||||
return
|
||||
|
||||
/datum/reagent/blob/proc/tesla_reaction(obj/structure/blob/B, power) //when the blob is hit by a tesla bolt, do this
|
||||
return 1 //return 0 to ignore damage
|
||||
|
||||
/datum/reagent/blob/proc/extinguish_reaction(obj/structure/blob/B) //when the blob is hit with water, do this
|
||||
return
|
||||
|
||||
/datum/reagent/blob/proc/emp_reaction(obj/structure/blob/B, severity) //when the blob is hit with an emp, do this
|
||||
return
|
||||
|
||||
//does brute damage but can replicate when damaged and has a chance of expanding again
|
||||
/datum/reagent/blob/replicating_foam
|
||||
name = "Replicating Foam"
|
||||
id = "replicating_foam"
|
||||
description = "will do medium brute damage and occasionally expand again when expanding."
|
||||
shortdesc = "will do medium brute damage."
|
||||
effectdesc = "will also expand when attacked with burn damage, but takes more brute damage."
|
||||
taste_description = "duplication"
|
||||
analyzerdescdamage = "Does medium brute damage."
|
||||
analyzerdesceffect = "Expands when attacked with burn damage, will occasionally expand again when expanding, and is fragile to brute damage."
|
||||
color = "#7B5A57"
|
||||
complementary_color = "#57787B"
|
||||
|
||||
/datum/reagent/blob/replicating_foam/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O)
|
||||
reac_volume = ..()
|
||||
M.apply_damage(0.7*reac_volume, BRUTE)
|
||||
|
||||
/datum/reagent/blob/replicating_foam/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag)
|
||||
if(damage_type == BRUTE)
|
||||
damage = damage * 2
|
||||
else if(damage_type == BURN && damage > 0 && B.obj_integrity - damage > 0 && prob(60))
|
||||
var/obj/structure/blob/newB = B.expand(null, null, 0)
|
||||
if(newB)
|
||||
newB.obj_integrity = B.obj_integrity - damage
|
||||
newB.update_icon()
|
||||
return ..()
|
||||
|
||||
/datum/reagent/blob/replicating_foam/expand_reaction(obj/structure/blob/B, obj/structure/blob/newB, turf/T, mob/camera/blob/O)
|
||||
if(prob(30))
|
||||
newB.expand(null, null, 0) //do it again!
|
||||
|
||||
//does massive brute and burn damage, but can only expand manually
|
||||
/datum/reagent/blob/networked_fibers
|
||||
name = "Networked Fibers"
|
||||
id = "networked_fibers"
|
||||
description = "will do high brute and burn damage and will generate resources quicker, but can only expand manually."
|
||||
shortdesc = "will do high brute and burn damage."
|
||||
taste_description = "efficiency"
|
||||
effectdesc = "will move your core when manually expanding near it."
|
||||
analyzerdescdamage = "Does high brute and burn damage."
|
||||
analyzerdesceffect = "Is highly mobile and generates resources rapidly."
|
||||
color = "#CDC0B0"
|
||||
complementary_color = "#FFF68F"
|
||||
|
||||
/datum/reagent/blob/networked_fibers/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O)
|
||||
reac_volume = ..()
|
||||
M.apply_damage(0.6*reac_volume, BRUTE)
|
||||
if(M)
|
||||
M.apply_damage(0.6*reac_volume, BURN)
|
||||
|
||||
/datum/reagent/blob/networked_fibers/expand_reaction(obj/structure/blob/B, obj/structure/blob/newB, turf/T, mob/camera/blob/O)
|
||||
if(!O && newB.overmind)
|
||||
if(!istype(B, /obj/structure/blob/node))
|
||||
newB.overmind.add_points(1)
|
||||
qdel(newB)
|
||||
else
|
||||
var/area/A = get_area(T)
|
||||
if(!isspaceturf(T) && !istype(A, /area/shuttle))
|
||||
for(var/obj/structure/blob/core/C in range(1, newB))
|
||||
if(C.overmind == O)
|
||||
newB.forceMove(get_turf(C))
|
||||
C.forceMove(T)
|
||||
C.setDir(get_dir(newB, C))
|
||||
O.add_points(1)
|
||||
|
||||
//does brute damage, shifts away when damaged
|
||||
/datum/reagent/blob/shifting_fragments
|
||||
name = "Shifting Fragments"
|
||||
id = "shifting_fragments"
|
||||
description = "will do medium brute damage."
|
||||
effectdesc = "will also cause blob parts to shift away when attacked."
|
||||
taste_description = "something other-dimensional"
|
||||
analyzerdescdamage = "Does medium brute damage."
|
||||
analyzerdesceffect = "When attacked, may shift away from the attacker."
|
||||
color = "#C8963C"
|
||||
complementary_color = "#3C6EC8"
|
||||
|
||||
/datum/reagent/blob/shifting_fragments/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O)
|
||||
reac_volume = ..()
|
||||
M.apply_damage(0.7*reac_volume, BRUTE)
|
||||
|
||||
/datum/reagent/blob/shifting_fragments/expand_reaction(obj/structure/blob/B, obj/structure/blob/newB, turf/T, mob/camera/blob/O)
|
||||
if(istype(B, /obj/structure/blob/normal) || (istype(B, /obj/structure/blob/shield) && prob(25)))
|
||||
newB.forceMove(get_turf(B))
|
||||
B.forceMove(T)
|
||||
|
||||
/datum/reagent/blob/shifting_fragments/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag)
|
||||
if((damage_flag == "melee" || damage_flag == "bullet" || damage_flag == "laser") && damage > 0 && B.obj_integrity - damage > 0 && prob(60-damage))
|
||||
var/list/blobstopick = list()
|
||||
for(var/obj/structure/blob/OB in orange(1, B))
|
||||
if((istype(OB, /obj/structure/blob/normal) || (istype(OB, /obj/structure/blob/shield) && prob(25))) && OB.overmind && OB.overmind.blob_reagent_datum.id == B.overmind.blob_reagent_datum.id)
|
||||
blobstopick += OB //as long as the blob picked is valid; ie, a normal or shield blob that has the same chemical as we do, we can swap with it
|
||||
if(blobstopick.len)
|
||||
var/obj/structure/blob/targeted = pick(blobstopick) //randomize the blob chosen, because otherwise it'd tend to the lower left
|
||||
var/turf/T = get_turf(targeted)
|
||||
targeted.forceMove(get_turf(B))
|
||||
B.forceMove(T) //swap the blobs
|
||||
return ..()
|
||||
|
||||
//sets you on fire, does burn damage, explodes into flame when burnt, weak to water
|
||||
/datum/reagent/blob/blazing_oil
|
||||
name = "Blazing Oil"
|
||||
id = "blazing_oil"
|
||||
description = "will do medium burn damage and set targets on fire."
|
||||
effectdesc = "will also release bursts of flame when burnt, but takes damage from water."
|
||||
taste_description = "burning oil"
|
||||
analyzerdescdamage = "Does medium burn damage and sets targets on fire."
|
||||
analyzerdesceffect = "Releases fire when burnt, but takes damage from water and other extinguishing liquids."
|
||||
color = "#B68D00"
|
||||
complementary_color = "#BE5532"
|
||||
blobbernaut_message = "splashes"
|
||||
message = "The blob splashes you with burning oil"
|
||||
message_living = ", and you feel your skin char and melt"
|
||||
|
||||
/datum/reagent/blob/blazing_oil/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O)
|
||||
reac_volume = ..()
|
||||
M.adjust_fire_stacks(round(reac_volume/10))
|
||||
M.IgniteMob()
|
||||
if(M)
|
||||
M.apply_damage(0.8*reac_volume, BURN)
|
||||
if(iscarbon(M))
|
||||
M.emote("scream")
|
||||
|
||||
/datum/reagent/blob/blazing_oil/extinguish_reaction(obj/structure/blob/B)
|
||||
B.take_damage(1.5, BURN, "energy")
|
||||
|
||||
/datum/reagent/blob/blazing_oil/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag)
|
||||
if(damage_type == BURN && damage_flag != "energy")
|
||||
for(var/turf/open/T in range(1, B))
|
||||
var/obj/structure/blob/C = locate() in T
|
||||
if(!(C && C.overmind && C.overmind.blob_reagent_datum.id == B.overmind.blob_reagent_datum.id) && prob(80))
|
||||
new /obj/effect/hotspot(T)
|
||||
if(damage_flag == "fire")
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
//does toxin damage, hallucination, targets think they're not hurt at all
|
||||
/datum/reagent/blob/regenerative_materia
|
||||
name = "Regenerative Materia"
|
||||
id = "regenerative_materia"
|
||||
description = "will do toxin damage and cause targets to believe they are fully healed."
|
||||
analyzerdescdamage = "Does toxin damage and injects a toxin that causes the target to believe they are fully healed."
|
||||
taste_description = "heaven"
|
||||
color = "#5e7842"
|
||||
complementary_color = "#CD7794"
|
||||
message_living = ", and you feel <i>alive</i>"
|
||||
|
||||
/datum/reagent/blob/regenerative_materia/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O)
|
||||
reac_volume = ..()
|
||||
M.adjust_drugginess(reac_volume)
|
||||
if(M.reagents)
|
||||
M.reagents.add_reagent("regenerative_materia", 0.2*reac_volume)
|
||||
M.reagents.add_reagent("spore", 0.2*reac_volume)
|
||||
M.apply_damage(0.7*reac_volume, TOX)
|
||||
|
||||
/datum/reagent/blob/regenerative_materia/on_mob_life(mob/living/carbon/C)
|
||||
C.adjustToxLoss(1*REM)
|
||||
C.hal_screwyhud = SCREWYHUD_HEALTHY //fully healed, honest
|
||||
..()
|
||||
|
||||
/datum/reagent/blob/regenerative_materia/on_mob_end_metabolize(mob/living/M)
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/N = M
|
||||
N.hal_screwyhud = 0
|
||||
..()
|
||||
|
||||
//kills sleeping targets and turns them into blob zombies, produces fragile spores when killed or on expanding
|
||||
/datum/reagent/blob/zombifying_pods
|
||||
name = "Zombifying Pods"
|
||||
id = "zombifying_pods"
|
||||
description = "will do very low toxin damage and harvest sleeping targets for additional resources and a blob zombie."
|
||||
effectdesc = "will also produce fragile spores when killed and on expanding."
|
||||
taste_description = "fungi"
|
||||
shortdesc = "will do very low toxin damage and harvest sleeping targets for additional resources(for your overmind) and a blob zombie."
|
||||
analyzerdescdamage = "Does very low toxin damage and kills unconscious humans, turning them into blob zombies."
|
||||
analyzerdesceffect = "Produces spores when expanding and when killed."
|
||||
color = "#E88D5D"
|
||||
complementary_color = "#823ABB"
|
||||
message_living = ", and you feel tired"
|
||||
|
||||
/datum/reagent/blob/zombifying_pods/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O)
|
||||
reac_volume = ..()
|
||||
M.apply_damage(0.6*reac_volume, TOX)
|
||||
if(O && ishuman(M) && M.stat == UNCONSCIOUS)
|
||||
M.death() //sleeping in a fight? bad plan.
|
||||
var/points = rand(5, 10)
|
||||
var/mob/living/simple_animal/hostile/blob/blobspore/BS = new/mob/living/simple_animal/hostile/blob/blobspore/weak(get_turf(M))
|
||||
BS.overmind = O
|
||||
BS.update_icons()
|
||||
O.blob_mobs.Add(BS)
|
||||
BS.Zombify(M)
|
||||
O.add_points(points)
|
||||
to_chat(O, "<span class='notice'>Gained [points] resources from the zombification of [M].</span>")
|
||||
|
||||
/datum/reagent/blob/zombifying_pods/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag)
|
||||
if((damage_flag == "melee" || damage_flag == "bullet" || damage_flag == "laser") && damage <= 20 && B.obj_integrity - damage <= 0 && prob(30)) //if the cause isn't fire or a bomb, the damage is less than 21, we're going to die from that damage, 20% chance of a shitty spore.
|
||||
B.visible_message("<span class='warning'><b>A spore floats free of the blob!</b></span>")
|
||||
var/mob/living/simple_animal/hostile/blob/blobspore/weak/BS = new/mob/living/simple_animal/hostile/blob/blobspore/weak(B.loc)
|
||||
BS.overmind = B.overmind
|
||||
BS.update_icons()
|
||||
B.overmind.blob_mobs.Add(BS)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/blob/zombifying_pods/expand_reaction(obj/structure/blob/B, obj/structure/blob/newB, turf/T, mob/camera/blob/O)
|
||||
if(prob(10))
|
||||
var/mob/living/simple_animal/hostile/blob/blobspore/weak/BS = new/mob/living/simple_animal/hostile/blob/blobspore/weak(T)
|
||||
BS.overmind = B.overmind
|
||||
BS.update_icons()
|
||||
newB.overmind.blob_mobs.Add(BS)
|
||||
|
||||
//does tons of oxygen damage and a little stamina, immune to tesla bolts, weak to EMP
|
||||
/datum/reagent/blob/energized_jelly
|
||||
name = "Energized Jelly"
|
||||
id = "energized_jelly"
|
||||
description = "will cause low stamina and high oxygen damage, and cause targets to be unable to breathe."
|
||||
taste_description = "gelatin"
|
||||
effectdesc = "will also conduct electricity, but takes damage from EMPs."
|
||||
analyzerdescdamage = "Does low stamina damage, high oxygen damage, and prevents targets from breathing."
|
||||
analyzerdesceffect = "Is immune to electricity and will easily conduct it, but is weak to EMPs."
|
||||
color = "#EFD65A"
|
||||
complementary_color = "#00E5B1"
|
||||
message_living = ", and you feel a horrible tingling sensation"
|
||||
|
||||
/datum/reagent/blob/energized_jelly/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O)
|
||||
reac_volume = ..()
|
||||
M.losebreath += round(0.2*reac_volume)
|
||||
M.adjustStaminaLoss(0.4*reac_volume)
|
||||
if(M)
|
||||
M.apply_damage(0.6*reac_volume, OXY)
|
||||
|
||||
/datum/reagent/blob/energized_jelly/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag)
|
||||
if((damage_flag == "melee" || damage_flag == "bullet" || damage_flag == "laser") && B.obj_integrity - damage <= 0 && prob(10))
|
||||
do_sparks(rand(2, 4), FALSE, B)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/blob/energized_jelly/tesla_reaction(obj/structure/blob/B, power)
|
||||
return 0
|
||||
|
||||
/datum/reagent/blob/energized_jelly/emp_reaction(obj/structure/blob/B, severity)
|
||||
var/damage = rand(30, 50) - severity * rand(10, 15)
|
||||
B.take_damage(damage, BURN, "energy")
|
||||
|
||||
//does aoe brute damage when hitting targets, is immune to explosions
|
||||
/datum/reagent/blob/explosive_lattice
|
||||
name = "Explosive Lattice"
|
||||
id = "explosive_lattice"
|
||||
description = "will do brute damage in an area around targets."
|
||||
taste_description = "the bomb"
|
||||
effectdesc = "will also resist explosions, but takes increased damage from fire and other energy sources."
|
||||
analyzerdescdamage = "Does medium brute damage and causes damage to everyone near its targets."
|
||||
analyzerdesceffect = "Is highly resistant to explosions, but takes increased damage from fire and other energy sources."
|
||||
color = "#8B2500"
|
||||
complementary_color = "#00668B"
|
||||
blobbernaut_message = "blasts"
|
||||
message = "The blob blasts you"
|
||||
|
||||
/datum/reagent/blob/explosive_lattice/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O)
|
||||
var/initial_volume = reac_volume
|
||||
reac_volume = ..()
|
||||
if(reac_volume >= 10) //if it's not a spore cloud, bad time incoming
|
||||
var/obj/effect/temp_visual/explosion/fast/E = new /obj/effect/temp_visual/explosion/fast(get_turf(M))
|
||||
E.alpha = 150
|
||||
for(var/mob/living/L in orange(get_turf(M), 1))
|
||||
if(ROLE_BLOB in L.faction) //no friendly fire
|
||||
continue
|
||||
var/aoe_volume = ..(L, TOUCH, initial_volume, 0, L.get_permeability_protection(), O)
|
||||
L.apply_damage(0.4*aoe_volume, BRUTE)
|
||||
if(M)
|
||||
M.apply_damage(0.6*reac_volume, BRUTE)
|
||||
else
|
||||
M.apply_damage(0.6*reac_volume, BRUTE)
|
||||
|
||||
/datum/reagent/blob/explosive_lattice/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag)
|
||||
if(damage_flag == "bomb")
|
||||
return 0
|
||||
else if(damage_flag != "melee" && damage_flag != "bullet" && damage_flag != "laser")
|
||||
return damage * 1.5
|
||||
return ..()
|
||||
|
||||
//does brute, burn, and toxin damage, and cools targets down
|
||||
/datum/reagent/blob/cryogenic_poison
|
||||
name = "Cryogenic Poison"
|
||||
id = "cryogenic_poison"
|
||||
description = "will inject targets with a freezing poison that does high damage over time."
|
||||
analyzerdescdamage = "Injects targets with a freezing poison that will gradually solidify the target's internal organs."
|
||||
color = "#8BA6E9"
|
||||
taste_description = "brain freeze"
|
||||
complementary_color = "#7D6EB4"
|
||||
blobbernaut_message = "injects"
|
||||
message = "The blob stabs you"
|
||||
message_living = ", and you feel like your insides are solidifying"
|
||||
|
||||
/datum/reagent/blob/cryogenic_poison/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O)
|
||||
reac_volume = ..()
|
||||
if(M.reagents)
|
||||
M.reagents.add_reagent("frostoil", 0.3*reac_volume)
|
||||
M.reagents.add_reagent("ice", 0.3*reac_volume)
|
||||
M.reagents.add_reagent("cryogenic_poison", 0.3*reac_volume)
|
||||
M.apply_damage(0.2*reac_volume, BRUTE)
|
||||
|
||||
/datum/reagent/blob/cryogenic_poison/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustBruteLoss(0.3*REM, 0)
|
||||
M.adjustFireLoss(0.3*REM, 0)
|
||||
M.adjustToxLoss(0.3*REM, 0)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
//does burn damage and EMPs, slightly fragile
|
||||
/datum/reagent/blob/electromagnetic_web
|
||||
name = "Electromagnetic Web"
|
||||
id = "electromagnetic_web"
|
||||
description = "will do high burn damage and EMP targets."
|
||||
taste_description = "pop rocks"
|
||||
effectdesc = "will also take massively increased damage and release an EMP when killed."
|
||||
analyzerdescdamage = "Does low burn damage and EMPs targets."
|
||||
analyzerdesceffect = "Is fragile to all types of damage, but takes massive damage from brute. In addition, releases a small EMP when killed."
|
||||
color = "#83ECEC"
|
||||
complementary_color = "#EC8383"
|
||||
blobbernaut_message = "lashes"
|
||||
message = "The blob lashes you"
|
||||
message_living = ", and you hear a faint buzzing"
|
||||
|
||||
/datum/reagent/blob/electromagnetic_web/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O)
|
||||
reac_volume = ..()
|
||||
if(prob(reac_volume*2))
|
||||
M.emp_act(EMP_LIGHT)
|
||||
if(M)
|
||||
M.apply_damage(reac_volume, BURN)
|
||||
|
||||
/datum/reagent/blob/electromagnetic_web/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag)
|
||||
if(damage_type == BRUTE) //take full brute
|
||||
switch(B.brute_resist)
|
||||
if(0.5)
|
||||
return damage * 2
|
||||
if(0.25)
|
||||
return damage * 4
|
||||
if(0.1)
|
||||
return damage * 10
|
||||
return damage * 1.25 //a laser will do 25 damage, which will kill any normal blob
|
||||
|
||||
/datum/reagent/blob/electromagnetic_web/death_reaction(obj/structure/blob/B, damage_flag)
|
||||
if(damage_flag == "melee" || damage_flag == "bullet" || damage_flag == "laser")
|
||||
empulse(B.loc, 1, 3) //less than screen range, so you can stand out of range to avoid it
|
||||
|
||||
//does brute damage, bonus damage for each nearby blob, and spreads damage out
|
||||
/datum/reagent/blob/synchronous_mesh
|
||||
name = "Synchronous Mesh"
|
||||
id = "synchronous_mesh"
|
||||
description = "will do massively increased brute damage for each blob near the target."
|
||||
effectdesc = "will also spread damage between each blob near the attacked blob."
|
||||
taste_description = "toxic mold"
|
||||
analyzerdescdamage = "Does brute damage, increasing for each blob near the target."
|
||||
analyzerdesceffect = "When attacked, spreads damage between all blobs near the attacked blob."
|
||||
color = "#65ADA2"
|
||||
complementary_color = "#AD6570"
|
||||
blobbernaut_message = "synchronously strikes"
|
||||
message = "The blobs strike you"
|
||||
|
||||
/datum/reagent/blob/synchronous_mesh/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O)
|
||||
reac_volume = ..()
|
||||
M.apply_damage(0.2*reac_volume, BRUTE)
|
||||
if(M && reac_volume)
|
||||
for(var/obj/structure/blob/B in range(1, M)) //if the target is completely surrounded, this is 2.4*reac_volume bonus damage, total of 2.6*reac_volume
|
||||
if(M)
|
||||
B.blob_attack_animation(M) //show them they're getting a bad time
|
||||
M.apply_damage(0.3*reac_volume, BRUTE)
|
||||
|
||||
/datum/reagent/blob/synchronous_mesh/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag)
|
||||
if(damage_flag == "melee" || damage_flag == "bullet" || damage_flag == "laser") //the cause isn't fire or bombs, so split the damage
|
||||
var/damagesplit = 1 //maximum split is 9, reducing the damage each blob takes to 11% but doing that damage to 9 blobs
|
||||
for(var/obj/structure/blob/C in orange(1, B))
|
||||
if(!istype(C, /obj/structure/blob/core) && !istype(C, /obj/structure/blob/node) && C.overmind && C.overmind.blob_reagent_datum.id == B.overmind.blob_reagent_datum.id) //if it doesn't have the same chemical or is a core or node, don't split damage to it
|
||||
damagesplit += 1
|
||||
for(var/obj/structure/blob/C in orange(1, B))
|
||||
if(!istype(C, /obj/structure/blob/core) && !istype(C, /obj/structure/blob/node) && C.overmind && C.overmind.blob_reagent_datum.id == B.overmind.blob_reagent_datum.id) //only hurt blobs that have the same overmind chemical and aren't cores or nodes
|
||||
C.take_damage(damage/damagesplit, CLONE, 0, 0)
|
||||
return damage / damagesplit
|
||||
else
|
||||
return damage * 1.25
|
||||
|
||||
//does brute damage through armor and bio resistance
|
||||
/datum/reagent/blob/reactive_spines
|
||||
name = "Reactive Spines"
|
||||
id = "reactive_spines"
|
||||
description = "will do medium brute damage through armor and bio resistance."
|
||||
taste_description = "rock"
|
||||
effectdesc = "will also react when attacked with brute damage, attacking all near the attacked blob."
|
||||
analyzerdescdamage = "Does medium brute damage, ignoring armor and bio resistance."
|
||||
analyzerdesceffect = "When attacked with brute damage, will lash out, attacking everything near it."
|
||||
color = "#9ACD32"
|
||||
complementary_color = "#FFA500"
|
||||
blobbernaut_message = "stabs"
|
||||
message = "The blob stabs you"
|
||||
|
||||
/datum/reagent/blob/reactive_spines/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O)
|
||||
if(M.stat == DEAD || istype(M, /mob/living/simple_animal/hostile/blob))
|
||||
return 0 //the dead, and blob mobs, don't cause reactions
|
||||
M.adjustBruteLoss(0.8*reac_volume)
|
||||
|
||||
/datum/reagent/blob/reactive_spines/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag)
|
||||
if(damage && damage_type == BRUTE && B.obj_integrity - damage > 0) //is there any damage, is it brute, and will we be alive
|
||||
if(damage_flag == "melee")
|
||||
B.visible_message("<span class='boldwarning'>The blob retaliates, lashing out!</span>")
|
||||
for(var/atom/A in range(1, B))
|
||||
A.blob_act(B)
|
||||
return ..()
|
||||
|
||||
//does low brute damage, oxygen damage, and stamina damage and wets tiles when damaged
|
||||
/datum/reagent/blob/pressurized_slime
|
||||
name = "Pressurized Slime"
|
||||
id = "pressurized_slime"
|
||||
description = "will do low brute, oxygen, and stamina damage, and wet tiles under targets."
|
||||
effectdesc = "will also wet tiles near blobs that are attacked or killed."
|
||||
taste_description = "a sponge"
|
||||
analyzerdescdamage = "Does low brute damage, low oxygen damage, drains stamina, and wets tiles under targets, extinguishing them."
|
||||
analyzerdesceffect = "When attacked or killed, wets nearby tiles, extinguishing anything on them."
|
||||
color = "#AAAABB"
|
||||
complementary_color = "#BBBBAA"
|
||||
blobbernaut_message = "emits slime at"
|
||||
message = "The blob splashes into you"
|
||||
message_living = ", and you gasp for breath"
|
||||
|
||||
/datum/reagent/blob/pressurized_slime/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection, mob/camera/blob/O)
|
||||
reac_volume = ..()
|
||||
var/turf/open/T = get_turf(M)
|
||||
if(istype(T) && prob(reac_volume))
|
||||
T.MakeSlippery(TURF_WET_WATER, min_wet_time = 10 SECONDS, wet_time_to_add = 5 SECONDS)
|
||||
M.adjust_fire_stacks(-(reac_volume / 10))
|
||||
M.ExtinguishMob()
|
||||
M.apply_damage(0.4*reac_volume, BRUTE)
|
||||
if(M)
|
||||
M.apply_damage(0.4*reac_volume, OXY)
|
||||
if(M)
|
||||
M.adjustStaminaLoss(0.2*reac_volume)
|
||||
|
||||
/datum/reagent/blob/pressurized_slime/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag)
|
||||
if((damage_flag == "melee" || damage_flag == "bullet" || damage_flag == "laser") || damage_type != BURN)
|
||||
extinguisharea(B, damage)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/blob/pressurized_slime/death_reaction(obj/structure/blob/B, damage_flag)
|
||||
if(damage_flag == "melee" || damage_flag == "bullet" || damage_flag == "laser")
|
||||
B.visible_message("<span class='boldwarning'>The blob ruptures, spraying the area with liquid!</span>")
|
||||
extinguisharea(B, 50)
|
||||
|
||||
/datum/reagent/blob/pressurized_slime/proc/extinguisharea(obj/structure/blob/B, probchance)
|
||||
for(var/turf/open/T in range(1, B))
|
||||
if(prob(probchance))
|
||||
T.MakeSlippery(TURF_WET_WATER, min_wet_time = 10 SECONDS, wet_time_to_add = 5 SECONDS)
|
||||
for(var/obj/O in T)
|
||||
O.extinguish()
|
||||
for(var/mob/living/L in T)
|
||||
L.adjust_fire_stacks(-2.5)
|
||||
L.ExtinguishMob()
|
||||
@@ -0,0 +1,885 @@
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////// DRINKS BELOW, Beer is up there though, along with cola. Cap'n Pete's Cuban Spiced Rum////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/reagent/consumable/orangejuice
|
||||
name = "Orange Juice"
|
||||
id = "orangejuice"
|
||||
description = "Both delicious AND rich in Vitamin C, what more do you need?"
|
||||
color = "#E78108" // rgb: 231, 129, 8
|
||||
taste_description = "oranges"
|
||||
glass_icon_state = "glass_orange"
|
||||
glass_name = "glass of orange juice"
|
||||
glass_desc = "Vitamins! Yay!"
|
||||
|
||||
/datum/reagent/consumable/orangejuice/on_mob_life(mob/living/carbon/M)
|
||||
if(M.getOxyLoss() && prob(30))
|
||||
M.adjustOxyLoss(-1, 0)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/tomatojuice
|
||||
name = "Tomato Juice"
|
||||
id = "tomatojuice"
|
||||
description = "Tomatoes made into juice. What a waste of big, juicy tomatoes, huh?"
|
||||
color = "#731008" // rgb: 115, 16, 8
|
||||
taste_description = "tomatoes"
|
||||
glass_icon_state = "glass_red"
|
||||
glass_name = "glass of tomato juice"
|
||||
glass_desc = "Are you sure this is tomato juice?"
|
||||
|
||||
/datum/reagent/consumable/tomatojuice/on_mob_life(mob/living/carbon/M)
|
||||
if(M.getFireLoss() && prob(20))
|
||||
M.heal_bodypart_damage(0,1, 0)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/limejuice
|
||||
name = "Lime Juice"
|
||||
id = "limejuice"
|
||||
description = "The sweet-sour juice of limes."
|
||||
color = "#365E30" // rgb: 54, 94, 48
|
||||
taste_description = "unbearable sourness"
|
||||
glass_icon_state = "glass_green"
|
||||
glass_name = "glass of lime juice"
|
||||
glass_desc = "A glass of sweet-sour lime juice."
|
||||
|
||||
/datum/reagent/consumable/limejuice/on_mob_life(mob/living/carbon/M)
|
||||
if(M.getToxLoss() && prob(20))
|
||||
M.adjustToxLoss(-1*REM, 0)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/carrotjuice
|
||||
name = "Carrot Juice"
|
||||
id = "carrotjuice"
|
||||
description = "It is just like a carrot but without crunching."
|
||||
color = "#973800" // rgb: 151, 56, 0
|
||||
taste_description = "carrots"
|
||||
glass_icon_state = "carrotjuice"
|
||||
glass_name = "glass of carrot juice"
|
||||
glass_desc = "It's just like a carrot but without crunching."
|
||||
|
||||
/datum/reagent/consumable/carrotjuice/on_mob_life(mob/living/carbon/M)
|
||||
M.adjust_blurriness(-1)
|
||||
M.adjust_blindness(-1)
|
||||
switch(current_cycle)
|
||||
if(1 to 20)
|
||||
//nothing
|
||||
if(21 to INFINITY)
|
||||
if(prob(current_cycle-10))
|
||||
M.cure_nearsighted(list(EYE_DAMAGE))
|
||||
..()
|
||||
return
|
||||
|
||||
/datum/reagent/consumable/berryjuice
|
||||
name = "Berry Juice"
|
||||
id = "berryjuice"
|
||||
description = "A delicious blend of several different kinds of berries."
|
||||
color = "#863333" // rgb: 134, 51, 51
|
||||
taste_description = "berries"
|
||||
glass_icon_state = "berryjuice"
|
||||
glass_name = "glass of berry juice"
|
||||
glass_desc = "Berry juice. Or maybe it's jam. Who cares?"
|
||||
|
||||
/datum/reagent/consumable/applejuice
|
||||
name = "Apple Juice"
|
||||
id = "applejuice"
|
||||
description = "The sweet juice of an apple, fit for all ages."
|
||||
color = "#ECFF56" // rgb: 236, 255, 86
|
||||
taste_description = "apples"
|
||||
|
||||
/datum/reagent/consumable/poisonberryjuice
|
||||
name = "Poison Berry Juice"
|
||||
id = "poisonberryjuice"
|
||||
description = "A tasty juice blended from various kinds of very deadly and toxic berries."
|
||||
color = "#863353" // rgb: 134, 51, 83
|
||||
taste_description = "berries"
|
||||
glass_icon_state = "poisonberryjuice"
|
||||
glass_name = "glass of berry juice"
|
||||
glass_desc = "Berry juice. Or maybe it's poison. Who cares?"
|
||||
|
||||
/datum/reagent/consumable/poisonberryjuice/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustToxLoss(1, 0)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/watermelonjuice
|
||||
name = "Watermelon Juice"
|
||||
id = "watermelonjuice"
|
||||
description = "Delicious juice made from watermelon."
|
||||
color = "#863333" // rgb: 134, 51, 51
|
||||
taste_description = "juicy watermelon"
|
||||
glass_icon_state = "glass_red"
|
||||
glass_name = "glass of watermelon juice"
|
||||
glass_desc = "A glass of watermelon juice."
|
||||
|
||||
/datum/reagent/consumable/lemonjuice
|
||||
name = "Lemon Juice"
|
||||
id = "lemonjuice"
|
||||
description = "This juice is VERY sour."
|
||||
color = "#863333" // rgb: 175, 175, 0
|
||||
taste_description = "sourness"
|
||||
glass_icon_state = "lemonglass"
|
||||
glass_name = "glass of lemon juice"
|
||||
glass_desc = "Sour..."
|
||||
|
||||
/datum/reagent/consumable/banana
|
||||
name = "Banana Juice"
|
||||
id = "banana"
|
||||
description = "The raw essence of a banana. HONK"
|
||||
color = "#863333" // rgb: 175, 175, 0
|
||||
taste_description = "banana"
|
||||
glass_icon_state = "banana"
|
||||
glass_name = "glass of banana juice"
|
||||
glass_desc = "The raw essence of a banana. HONK."
|
||||
|
||||
/datum/reagent/consumable/banana/on_mob_life(mob/living/carbon/M)
|
||||
if((ishuman(M) && M.job == "Clown") || ismonkey(M))
|
||||
M.heal_bodypart_damage(1,1, 0)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/nothing
|
||||
name = "Nothing"
|
||||
id = "nothing"
|
||||
description = "Absolutely nothing."
|
||||
taste_description = "nothing"
|
||||
glass_icon_state = "nothing"
|
||||
glass_name = "nothing"
|
||||
glass_desc = "Absolutely nothing."
|
||||
shot_glass_icon_state = "shotglass"
|
||||
|
||||
/datum/reagent/consumable/nothing/on_mob_life(mob/living/carbon/M)
|
||||
if(ishuman(M) && M.job == "Mime")
|
||||
M.heal_bodypart_damage(1,1, 0)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/laughter
|
||||
name = "Laughter"
|
||||
id = "laughter"
|
||||
description = "Some say that this is the best medicine, but recent studies have proven that to be untrue."
|
||||
metabolization_rate = INFINITY
|
||||
color = "#FF4DD2"
|
||||
taste_description = "laughter"
|
||||
|
||||
/datum/reagent/consumable/laughter/on_mob_life(mob/living/carbon/M)
|
||||
M.emote("laugh")
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "chemical_laughter", /datum/mood_event/chemical_laughter)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/superlaughter
|
||||
name = "Super Laughter"
|
||||
id = "superlaughter"
|
||||
description = "Funny until you're the one laughing."
|
||||
metabolization_rate = 1.5 * REAGENTS_METABOLISM
|
||||
color = "#FF4DD2"
|
||||
taste_description = "laughter"
|
||||
|
||||
/datum/reagent/consumable/superlaughter/on_mob_life(mob/living/carbon/M)
|
||||
if(prob(30))
|
||||
M.visible_message("<span class='danger'>[M] bursts out into a fit of uncontrollable laughter!</span>", "<span class='userdanger'>You burst out in a fit of uncontrollable laughter!</span>")
|
||||
M.Stun(5)
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "chemical_laughter", /datum/mood_event/chemical_superlaughter)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/potato_juice
|
||||
name = "Potato Juice"
|
||||
id = "potato"
|
||||
description = "Juice of the potato. Bleh."
|
||||
nutriment_factor = 2 * REAGENTS_METABOLISM
|
||||
color = "#302000" // rgb: 48, 32, 0
|
||||
taste_description = "irish sadness"
|
||||
glass_icon_state = "glass_brown"
|
||||
glass_name = "glass of potato juice"
|
||||
glass_desc = "Bleh..."
|
||||
|
||||
/datum/reagent/consumable/grapejuice
|
||||
name = "Grape Juice"
|
||||
id = "grapejuice"
|
||||
description = "The juice of a bunch of grapes. Guaranteed non-alcoholic."
|
||||
color = "#290029" // dark purple
|
||||
taste_description = "grape soda"
|
||||
|
||||
/datum/reagent/consumable/milk
|
||||
name = "Milk"
|
||||
id = "milk"
|
||||
description = "An opaque white liquid produced by the mammary glands of mammals."
|
||||
color = "#DFDFDF" // rgb: 223, 223, 223
|
||||
taste_description = "milk"
|
||||
glass_icon_state = "glass_white"
|
||||
glass_name = "glass of milk"
|
||||
glass_desc = "White and nutritious goodness!"
|
||||
|
||||
/datum/reagent/consumable/milk/on_mob_life(mob/living/carbon/M)
|
||||
if(HAS_TRAIT(M, TRAIT_CALCIUM_HEALER))
|
||||
M.heal_bodypart_damage(1.5,0, 0)
|
||||
. = 1
|
||||
else
|
||||
if(M.getBruteLoss() && prob(20))
|
||||
M.heal_bodypart_damage(1,0, 0)
|
||||
. = 1
|
||||
if(holder.has_reagent("capsaicin"))
|
||||
holder.remove_reagent("capsaicin", 2)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/soymilk
|
||||
name = "Soy Milk"
|
||||
id = "soymilk"
|
||||
description = "An opaque white liquid made from soybeans."
|
||||
color = "#DFDFC7" // rgb: 223, 223, 199
|
||||
taste_description = "soy milk"
|
||||
glass_icon_state = "glass_white"
|
||||
glass_name = "glass of soy milk"
|
||||
glass_desc = "White and nutritious soy goodness!"
|
||||
|
||||
/datum/reagent/consumable/soymilk/on_mob_life(mob/living/carbon/M)
|
||||
if(M.getBruteLoss() && prob(20))
|
||||
M.heal_bodypart_damage(1,0, 0)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/cream
|
||||
name = "Cream"
|
||||
id = "cream"
|
||||
description = "The fatty, still liquid part of milk. Why don't you mix this with sum scotch, eh?"
|
||||
color = "#DFD7AF" // rgb: 223, 215, 175
|
||||
taste_description = "creamy milk"
|
||||
glass_icon_state = "glass_white"
|
||||
glass_name = "glass of cream"
|
||||
glass_desc = "Ewwww..."
|
||||
|
||||
/datum/reagent/consumable/cream/on_mob_life(mob/living/carbon/M)
|
||||
if(M.getBruteLoss() && prob(20))
|
||||
M.heal_bodypart_damage(1,0, 0)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/coffee
|
||||
name = "Coffee"
|
||||
id = "coffee"
|
||||
description = "Coffee is a brewed drink prepared from roasted seeds, commonly called coffee beans, of the coffee plant."
|
||||
color = "#482000" // rgb: 72, 32, 0
|
||||
nutriment_factor = 0
|
||||
overdose_threshold = 80
|
||||
taste_description = "bitterness"
|
||||
glass_icon_state = "glass_brown"
|
||||
glass_name = "glass of coffee"
|
||||
glass_desc = "Don't drop it, or you'll send scalding liquid and glass shards everywhere."
|
||||
|
||||
/datum/reagent/consumable/coffee/overdose_process(mob/living/M)
|
||||
M.Jitter(5)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/coffee/on_mob_life(mob/living/carbon/M)
|
||||
M.dizziness = max(0,M.dizziness-5)
|
||||
M.drowsyness = max(0,M.drowsyness-3)
|
||||
M.AdjustSleeping(-40, FALSE)
|
||||
//310.15 is the normal bodytemp.
|
||||
M.adjust_bodytemperature(25 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, BODYTEMP_NORMAL)
|
||||
if(holder.has_reagent("frostoil"))
|
||||
holder.remove_reagent("frostoil", 5)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/consumable/tea
|
||||
name = "Tea"
|
||||
id = "tea"
|
||||
description = "Tasty black tea, it has antioxidants, it's good for you!"
|
||||
color = "#101000" // rgb: 16, 16, 0
|
||||
nutriment_factor = 0
|
||||
taste_description = "tart black tea"
|
||||
glass_icon_state = "teaglass"
|
||||
glass_name = "glass of tea"
|
||||
glass_desc = "Drinking it from here would not seem right."
|
||||
|
||||
/datum/reagent/consumable/tea/on_mob_life(mob/living/carbon/M)
|
||||
M.dizziness = max(0,M.dizziness-2)
|
||||
M.drowsyness = max(0,M.drowsyness-1)
|
||||
M.jitteriness = max(0,M.jitteriness-3)
|
||||
M.AdjustSleeping(-20, FALSE)
|
||||
if(M.getToxLoss() && prob(20))
|
||||
M.adjustToxLoss(-1, 0)
|
||||
M.adjust_bodytemperature(20 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, BODYTEMP_NORMAL)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/consumable/lemonade
|
||||
name = "Lemonade"
|
||||
id = "lemonade"
|
||||
description = "Sweet, tangy lemonade. Good for the soul."
|
||||
quality = DRINK_NICE
|
||||
taste_description = "sunshine and summertime"
|
||||
glass_icon_state = "lemonpitcher"
|
||||
glass_name = "pitcher of lemonade"
|
||||
glass_desc = "This drink leaves you feeling nostalgic for some reason."
|
||||
|
||||
/datum/reagent/consumable/tea/arnold_palmer
|
||||
name = "Arnold Palmer"
|
||||
id = "arnold_palmer"
|
||||
description = "Encourages the patient to go golfing."
|
||||
color = "#FFB766"
|
||||
quality = DRINK_NICE
|
||||
nutriment_factor = 2
|
||||
taste_description = "bitter tea"
|
||||
glass_icon_state = "arnold_palmer"
|
||||
glass_name = "Arnold Palmer"
|
||||
glass_desc = "You feel like taking a few golf swings after a few swigs of this."
|
||||
|
||||
/datum/reagent/consumable/tea/arnold_palmer/on_mob_life(mob/living/carbon/M)
|
||||
if(prob(5))
|
||||
to_chat(M, "<span class = 'notice'>[pick("You remember to square your shoulders.","You remember to keep your head down.","You can't decide between squaring your shoulders and keeping your head down.","You remember to relax.","You think about how someday you'll get two strokes off your golf game.")]</span>")
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/consumable/icecoffee
|
||||
name = "Iced Coffee"
|
||||
id = "icecoffee"
|
||||
description = "Coffee and ice, refreshing and cool."
|
||||
color = "#102838" // rgb: 16, 40, 56
|
||||
nutriment_factor = 0
|
||||
taste_description = "bitter coldness"
|
||||
glass_icon_state = "icedcoffeeglass"
|
||||
glass_name = "iced coffee"
|
||||
glass_desc = "A drink to perk you up and refresh you!"
|
||||
|
||||
/datum/reagent/consumable/icecoffee/on_mob_life(mob/living/carbon/M)
|
||||
M.dizziness = max(0,M.dizziness-5)
|
||||
M.drowsyness = max(0,M.drowsyness-3)
|
||||
M.AdjustSleeping(-40, FALSE)
|
||||
M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
|
||||
M.Jitter(5)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/consumable/icetea
|
||||
name = "Iced Tea"
|
||||
id = "icetea"
|
||||
description = "No relation to a certain rap artist/actor."
|
||||
color = "#104038" // rgb: 16, 64, 56
|
||||
nutriment_factor = 0
|
||||
taste_description = "sweet tea"
|
||||
glass_icon_state = "icedteaglass"
|
||||
glass_name = "iced tea"
|
||||
glass_desc = "All natural, antioxidant-rich flavour sensation."
|
||||
|
||||
/datum/reagent/consumable/icetea/on_mob_life(mob/living/carbon/M)
|
||||
M.dizziness = max(0,M.dizziness-2)
|
||||
M.drowsyness = max(0,M.drowsyness-1)
|
||||
M.AdjustSleeping(-40, FALSE)
|
||||
if(M.getToxLoss() && prob(20))
|
||||
M.adjustToxLoss(-1, 0)
|
||||
M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/consumable/space_cola
|
||||
name = "Cola"
|
||||
id = "cola"
|
||||
description = "A refreshing beverage."
|
||||
color = "#100800" // rgb: 16, 8, 0
|
||||
taste_description = "cola"
|
||||
glass_icon_state = "glass_brown"
|
||||
glass_name = "glass of Space Cola"
|
||||
glass_desc = "A glass of refreshing Space Cola."
|
||||
|
||||
/datum/reagent/consumable/space_cola/on_mob_life(mob/living/carbon/M)
|
||||
M.drowsyness = max(0,M.drowsyness-5)
|
||||
M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/nuka_cola
|
||||
name = "Nuka Cola"
|
||||
id = "nuka_cola"
|
||||
description = "Cola, cola never changes."
|
||||
color = "#100800" // rgb: 16, 8, 0
|
||||
quality = DRINK_VERYGOOD
|
||||
taste_description = "the future"
|
||||
glass_icon_state = "nuka_colaglass"
|
||||
glass_name = "glass of Nuka Cola"
|
||||
glass_desc = "Don't cry, Don't raise your eye, It's only nuclear wasteland."
|
||||
|
||||
/datum/reagent/consumable/nuka_cola/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
ADD_TRAIT(L, TRAIT_GOTTAGOFAST, id)
|
||||
|
||||
/datum/reagent/consumable/nuka_cola/on_mob_end_metabolize(mob/living/L)
|
||||
REMOVE_TRAIT(L, TRAIT_GOTTAGOFAST, id)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/nuka_cola/on_mob_life(mob/living/carbon/M)
|
||||
M.Jitter(20)
|
||||
M.set_drugginess(30)
|
||||
M.dizziness +=1.5
|
||||
M.drowsyness = 0
|
||||
M.AdjustSleeping(-40, FALSE)
|
||||
M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/consumable/spacemountainwind
|
||||
name = "SM Wind"
|
||||
id = "spacemountainwind"
|
||||
description = "Blows right through you like a space wind."
|
||||
color = "#102000" // rgb: 16, 32, 0
|
||||
taste_description = "sweet citrus soda"
|
||||
glass_icon_state = "Space_mountain_wind_glass"
|
||||
glass_name = "glass of Space Mountain Wind"
|
||||
glass_desc = "Space Mountain Wind. As you know, there are no mountains in space, only wind."
|
||||
|
||||
/datum/reagent/consumable/spacemountainwind/on_mob_life(mob/living/carbon/M)
|
||||
M.drowsyness = max(0,M.drowsyness-7)
|
||||
M.AdjustSleeping(-20, FALSE)
|
||||
M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
|
||||
M.Jitter(5)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/consumable/dr_gibb
|
||||
name = "Dr. Gibb"
|
||||
id = "dr_gibb"
|
||||
description = "A delicious blend of 42 different flavours."
|
||||
color = "#102000" // rgb: 16, 32, 0
|
||||
taste_description = "cherry soda" // FALSE ADVERTISING
|
||||
glass_icon_state = "dr_gibb_glass"
|
||||
glass_name = "glass of Dr. Gibb"
|
||||
glass_desc = "Dr. Gibb. Not as dangerous as the glass_name might imply."
|
||||
|
||||
/datum/reagent/consumable/dr_gibb/on_mob_life(mob/living/carbon/M)
|
||||
M.drowsyness = max(0,M.drowsyness-6)
|
||||
M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/space_up
|
||||
name = "Space-Up"
|
||||
id = "space_up"
|
||||
description = "Tastes like a hull breach in your mouth."
|
||||
color = "#00FF00" // rgb: 0, 255, 0
|
||||
taste_description = "cherry soda"
|
||||
glass_icon_state = "space-up_glass"
|
||||
glass_name = "glass of Space-Up"
|
||||
glass_desc = "Space-up. It helps you keep your cool."
|
||||
|
||||
|
||||
/datum/reagent/consumable/space_up/on_mob_life(mob/living/carbon/M)
|
||||
M.adjust_bodytemperature(-8 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/lemon_lime
|
||||
name = "Lemon Lime"
|
||||
description = "A tangy substance made of 0.5% natural citrus!"
|
||||
id = "lemon_lime"
|
||||
color = "#8CFF00" // rgb: 135, 255, 0
|
||||
taste_description = "tangy lime and lemon soda"
|
||||
glass_icon_state = "glass_yellow"
|
||||
glass_name = "glass of lemon-lime"
|
||||
glass_desc = "You're pretty certain a real fruit has never actually touched this."
|
||||
|
||||
|
||||
/datum/reagent/consumable/lemon_lime/on_mob_life(mob/living/carbon/M)
|
||||
M.adjust_bodytemperature(-8 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/pwr_game
|
||||
name = "Pwr Game"
|
||||
description = "The only drink with the PWR that true gamers crave."
|
||||
id = "pwr_game"
|
||||
color = "#9385bf" // rgb: 58, 52, 75
|
||||
taste_description = "sweet and salty tang"
|
||||
glass_icon_state = "glass_red"
|
||||
glass_name = "glass of Pwr Game"
|
||||
glass_desc = "Goes well with a Vlad's salad."
|
||||
|
||||
/datum/reagent/consumable/pwr_game/on_mob_life(mob/living/carbon/M)
|
||||
M.adjust_bodytemperature(-8 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/shamblers
|
||||
name = "Shambler's Juice"
|
||||
description = "~Shake me up some of that Shambler's Juice!~"
|
||||
id = "shamblers"
|
||||
color = "#f00060" // rgb: 94, 0, 38
|
||||
taste_description = "carbonated metallic soda"
|
||||
glass_icon_state = "glass_red"
|
||||
glass_name = "glass of Shambler's juice"
|
||||
glass_desc = "Mmm mm, shambly."
|
||||
|
||||
/datum/reagent/consumable/shamblers/on_mob_life(mob/living/carbon/M)
|
||||
M.adjust_bodytemperature(-8 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/grey_bull
|
||||
name = "Grey Bull"
|
||||
id = "grey_bull"
|
||||
description = "Grey Bull, it gives you gloves!"
|
||||
color = "#EEFF00" // rgb: 238, 255, 0
|
||||
quality = DRINK_VERYGOOD
|
||||
taste_description = "carbonated oil"
|
||||
glass_icon_state = "grey_bull_glass"
|
||||
glass_name = "glass of Grey Bull"
|
||||
glass_desc = "Surprisingly it isnt grey."
|
||||
|
||||
/datum/reagent/consumable/grey_bull/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
ADD_TRAIT(L, TRAIT_SHOCKIMMUNE, id)
|
||||
|
||||
/datum/reagent/consumable/grey_bull/on_mob_end_metabolize(mob/living/L)
|
||||
REMOVE_TRAIT(L, TRAIT_SHOCKIMMUNE, id)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/grey_bull/on_mob_life(mob/living/carbon/M)
|
||||
M.Jitter(20)
|
||||
M.dizziness +=1
|
||||
M.drowsyness = 0
|
||||
M.AdjustSleeping(-40, FALSE)
|
||||
M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/sodawater
|
||||
name = "Soda Water"
|
||||
id = "sodawater"
|
||||
description = "A can of club soda. Why not make a scotch and soda?"
|
||||
color = "#619494" // rgb: 97, 148, 148
|
||||
taste_description = "carbonated water"
|
||||
glass_icon_state = "glass_clear"
|
||||
glass_name = "glass of soda water"
|
||||
glass_desc = "Soda water. Why not make a scotch and soda?"
|
||||
|
||||
/datum/reagent/consumable/sodawater/on_mob_life(mob/living/carbon/M)
|
||||
M.dizziness = max(0,M.dizziness-5)
|
||||
M.drowsyness = max(0,M.drowsyness-3)
|
||||
M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/tonic
|
||||
name = "Tonic Water"
|
||||
id = "tonic"
|
||||
description = "It tastes strange but at least the quinine keeps the Space Malaria at bay."
|
||||
color = "#0064C8" // rgb: 0, 100, 200
|
||||
taste_description = "tart and fresh"
|
||||
glass_icon_state = "glass_clear"
|
||||
glass_name = "glass of tonic water"
|
||||
glass_desc = "Quinine tastes funny, but at least it'll keep that Space Malaria away."
|
||||
|
||||
/datum/reagent/consumable/tonic/on_mob_life(mob/living/carbon/M)
|
||||
M.dizziness = max(0,M.dizziness-5)
|
||||
M.drowsyness = max(0,M.drowsyness-3)
|
||||
M.AdjustSleeping(-40, FALSE)
|
||||
M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/consumable/ice
|
||||
name = "Ice"
|
||||
id = "ice"
|
||||
description = "Frozen water, your dentist wouldn't like you chewing this."
|
||||
reagent_state = SOLID
|
||||
color = "#619494" // rgb: 97, 148, 148
|
||||
taste_description = "ice"
|
||||
glass_icon_state = "iceglass"
|
||||
glass_name = "glass of ice"
|
||||
glass_desc = "Generally, you're supposed to put something else in there too..."
|
||||
|
||||
/datum/reagent/consumable/ice/on_mob_life(mob/living/carbon/M)
|
||||
M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/soy_latte
|
||||
name = "Soy Latte"
|
||||
id = "soy_latte"
|
||||
description = "A nice and tasty beverage while you are reading your hippie books."
|
||||
color = "#664300" // rgb: 102, 67, 0
|
||||
quality = DRINK_NICE
|
||||
taste_description = "creamy coffee"
|
||||
glass_icon_state = "soy_latte"
|
||||
glass_name = "soy latte"
|
||||
glass_desc = "A nice and refreshing beverage while you're reading."
|
||||
|
||||
/datum/reagent/consumable/soy_latte/on_mob_life(mob/living/carbon/M)
|
||||
M.dizziness = max(0,M.dizziness-5)
|
||||
M.drowsyness = max(0,M.drowsyness-3)
|
||||
M.SetSleeping(0, FALSE)
|
||||
M.adjust_bodytemperature(5 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, BODYTEMP_NORMAL)
|
||||
M.Jitter(5)
|
||||
if(M.getBruteLoss() && prob(20))
|
||||
M.heal_bodypart_damage(1,0, 0)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/consumable/cafe_latte
|
||||
name = "Cafe Latte"
|
||||
id = "cafe_latte"
|
||||
description = "A nice, strong and tasty beverage while you are reading."
|
||||
color = "#664300" // rgb: 102, 67, 0
|
||||
quality = DRINK_NICE
|
||||
taste_description = "bitter cream"
|
||||
glass_icon_state = "cafe_latte"
|
||||
glass_name = "cafe latte"
|
||||
glass_desc = "A nice, strong and refreshing beverage while you're reading."
|
||||
|
||||
/datum/reagent/consumable/cafe_latte/on_mob_life(mob/living/carbon/M)
|
||||
M.dizziness = max(0,M.dizziness-5)
|
||||
M.drowsyness = max(0,M.drowsyness-3)
|
||||
M.SetSleeping(0, FALSE)
|
||||
M.adjust_bodytemperature(5 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, BODYTEMP_NORMAL)
|
||||
M.Jitter(5)
|
||||
if(M.getBruteLoss() && prob(20))
|
||||
M.heal_bodypart_damage(1,0, 0)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/consumable/doctor_delight
|
||||
name = "The Doctor's Delight"
|
||||
id = "doctorsdelight"
|
||||
description = "A gulp a day keeps the Medibot away! A mixture of juices that heals most damage types fairly quickly at the cost of hunger."
|
||||
color = "#FF8CFF" // rgb: 255, 140, 255
|
||||
quality = DRINK_VERYGOOD
|
||||
taste_description = "homely fruit"
|
||||
glass_icon_state = "doctorsdelightglass"
|
||||
glass_name = "Doctor's Delight"
|
||||
glass_desc = "The space doctor's favorite. Guaranteed to restore bodily injury; side effects include cravings and hunger."
|
||||
|
||||
/datum/reagent/consumable/doctor_delight/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustBruteLoss(-0.5, 0)
|
||||
M.adjustFireLoss(-0.5, 0)
|
||||
M.adjustToxLoss(-0.5, 0)
|
||||
M.adjustOxyLoss(-0.5, 0)
|
||||
if(M.nutrition && (M.nutrition - 2 > 0))
|
||||
if(!(M.mind && M.mind.assigned_role == "Medical Doctor")) //Drains the nutrition of the holder. Not medical doctors though, since it's the Doctor's Delight!
|
||||
M.nutrition -= 2
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/consumable/chocolatepudding
|
||||
name = "Chocolate Pudding"
|
||||
id = "chocolatepudding"
|
||||
description = "A great dessert for chocolate lovers."
|
||||
color = "#800000"
|
||||
quality = DRINK_VERYGOOD
|
||||
nutriment_factor = 4 * REAGENTS_METABOLISM
|
||||
taste_description = "sweet chocolate"
|
||||
glass_icon_state = "chocolatepudding"
|
||||
glass_name = "chocolate pudding"
|
||||
glass_desc = "Tasty."
|
||||
|
||||
/datum/reagent/consumable/vanillapudding
|
||||
name = "Vanilla Pudding"
|
||||
id = "vanillapudding"
|
||||
description = "A great dessert for vanilla lovers."
|
||||
color = "#FAFAD2"
|
||||
quality = DRINK_VERYGOOD
|
||||
nutriment_factor = 4 * REAGENTS_METABOLISM
|
||||
taste_description = "sweet vanilla"
|
||||
glass_icon_state = "vanillapudding"
|
||||
glass_name = "vanilla pudding"
|
||||
glass_desc = "Tasty."
|
||||
|
||||
/datum/reagent/consumable/cherryshake
|
||||
name = "Cherry Shake"
|
||||
id = "cherryshake"
|
||||
description = "A cherry flavored milkshake."
|
||||
color = "#FFB6C1"
|
||||
quality = DRINK_VERYGOOD
|
||||
nutriment_factor = 4 * REAGENTS_METABOLISM
|
||||
taste_description = "creamy cherry"
|
||||
glass_icon_state = "cherryshake"
|
||||
glass_name = "cherry shake"
|
||||
glass_desc = "A cherry flavored milkshake."
|
||||
|
||||
/datum/reagent/consumable/bluecherryshake
|
||||
name = "Blue Cherry Shake"
|
||||
id = "bluecherryshake"
|
||||
description = "An exotic milkshake."
|
||||
color = "#00F1FF"
|
||||
quality = DRINK_VERYGOOD
|
||||
nutriment_factor = 4 * REAGENTS_METABOLISM
|
||||
taste_description = "creamy blue cherry"
|
||||
glass_icon_state = "bluecherryshake"
|
||||
glass_name = "blue cherry shake"
|
||||
glass_desc = "An exotic blue milkshake."
|
||||
|
||||
/datum/reagent/consumable/pumpkin_latte
|
||||
name = "Pumpkin Latte"
|
||||
id = "pumpkin_latte"
|
||||
description = "A mix of pumpkin juice and coffee."
|
||||
color = "#F4A460"
|
||||
quality = DRINK_VERYGOOD
|
||||
nutriment_factor = 3 * REAGENTS_METABOLISM
|
||||
taste_description = "creamy pumpkin"
|
||||
glass_icon_state = "pumpkin_latte"
|
||||
glass_name = "pumpkin latte"
|
||||
glass_desc = "A mix of coffee and pumpkin juice."
|
||||
|
||||
/datum/reagent/consumable/gibbfloats
|
||||
name = "Gibb Floats"
|
||||
id = "gibbfloats"
|
||||
description = "Ice cream on top of a Dr. Gibb glass."
|
||||
color = "#B22222"
|
||||
quality = DRINK_NICE
|
||||
nutriment_factor = 3 * REAGENTS_METABOLISM
|
||||
taste_description = "creamy cherry"
|
||||
glass_icon_state = "gibbfloats"
|
||||
glass_name = "Gibbfloat"
|
||||
glass_desc = "Dr. Gibb with ice cream on top."
|
||||
|
||||
/datum/reagent/consumable/pumpkinjuice
|
||||
name = "Pumpkin Juice"
|
||||
id = "pumpkinjuice"
|
||||
description = "Juiced from real pumpkin."
|
||||
color = "#FFA500"
|
||||
taste_description = "pumpkin"
|
||||
|
||||
/datum/reagent/consumable/blumpkinjuice
|
||||
name = "Blumpkin Juice"
|
||||
id = "blumpkinjuice"
|
||||
description = "Juiced from real blumpkin."
|
||||
color = "#00BFFF"
|
||||
taste_description = "a mouthful of pool water"
|
||||
|
||||
/datum/reagent/consumable/triple_citrus
|
||||
name = "Triple Citrus"
|
||||
id = "triple_citrus"
|
||||
description = "A solution."
|
||||
color = "#fff12b"
|
||||
quality = DRINK_NICE
|
||||
taste_description = "extreme bitterness"
|
||||
glass_icon_state = "triplecitrus" //needs own sprite mine are trash
|
||||
glass_name = "glass of triple citrus"
|
||||
glass_desc = "A mixture of citrus juices. Tangy, yet smooth."
|
||||
|
||||
/datum/reagent/consumable/grape_soda
|
||||
name = "Grape soda"
|
||||
id = "grapesoda"
|
||||
description = "Beloved of children and teetotalers."
|
||||
color = "#E6CDFF"
|
||||
taste_description = "grape soda"
|
||||
glass_name = "glass of grape juice"
|
||||
glass_desc = "It's grape (soda)!"
|
||||
|
||||
/datum/reagent/consumable/grape_soda/on_mob_life(mob/living/carbon/M)
|
||||
M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
|
||||
..()
|
||||
|
||||
|
||||
/datum/reagent/consumable/milk/chocolate_milk
|
||||
name = "Chocolate Milk"
|
||||
id = "chocolate_milk"
|
||||
description = "Milk for cool kids."
|
||||
color = "#7D4E29"
|
||||
quality = DRINK_NICE
|
||||
taste_description = "chocolate milk"
|
||||
|
||||
/datum/reagent/consumable/menthol
|
||||
name = "Menthol"
|
||||
id = "menthol"
|
||||
description = "Alleviates coughing symptoms one might have."
|
||||
color = "#80AF9C"
|
||||
taste_description = "mint"
|
||||
glass_icon_state = "glass_green"
|
||||
glass_name = "glass of menthol"
|
||||
glass_desc = "Tastes naturally minty, and imparts a very mild numbing sensation."
|
||||
|
||||
/datum/reagent/consumable/grenadine
|
||||
name = "Grenadine"
|
||||
id = "grenadine"
|
||||
description = "Not cherry flavored!"
|
||||
color = "#EA1D26"
|
||||
taste_description = "sweet pomegranates"
|
||||
glass_name = "glass of grenadine"
|
||||
glass_desc = "Delicious flavored syrup."
|
||||
|
||||
/datum/reagent/consumable/parsnipjuice
|
||||
name = "Parsnip Juice"
|
||||
id = "parsnipjuice"
|
||||
description = "Why..."
|
||||
color = "#FFA500"
|
||||
taste_description = "parsnip"
|
||||
glass_name = "glass of parsnip juice"
|
||||
|
||||
/datum/reagent/consumable/peachjuice //Intended to be extremely rare due to being the limiting ingredients in the blazaam drink
|
||||
name = "Peach Juice"
|
||||
id = "peachjuice"
|
||||
description = "Just peachy."
|
||||
color = "#E78108"
|
||||
taste_description = "peaches"
|
||||
glass_name = "glass of peach juice"
|
||||
|
||||
/datum/reagent/consumable/cream_soda
|
||||
name = "Cream Soda"
|
||||
id = "cream_soda"
|
||||
description = "A classic space-American vanilla flavored soft drink."
|
||||
color = "#dcb137"
|
||||
quality = DRINK_VERYGOOD
|
||||
taste_description = "fizzy vanilla"
|
||||
glass_icon_state = "cream_soda"
|
||||
glass_name = "Cream Soda"
|
||||
glass_desc = "A classic space-American vanilla flavored soft drink."
|
||||
|
||||
/datum/reagent/consumable/cream_soda/on_mob_life(mob/living/carbon/M)
|
||||
M.adjust_bodytemperature(-5 * TEMPERATURE_DAMAGE_COEFFICIENT, BODYTEMP_NORMAL)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/red_queen
|
||||
name = "Red Queen"
|
||||
id = "red_queen"
|
||||
description = "DRINK ME."
|
||||
color = "#e6ddc3"
|
||||
quality = DRINK_GOOD
|
||||
taste_description = "wonder"
|
||||
glass_icon_state = "red_queen"
|
||||
glass_name = "Red Queen"
|
||||
glass_desc = "DRINK ME."
|
||||
var/current_size = 1
|
||||
|
||||
/datum/reagent/consumable/red_queen/on_mob_life(mob/living/carbon/H)
|
||||
if(prob(75))
|
||||
return ..()
|
||||
var/newsize = pick(0.5, 0.75, 1, 1.50, 2)
|
||||
H.resize = newsize/current_size
|
||||
current_size = newsize
|
||||
H.update_transform()
|
||||
if(prob(40))
|
||||
H.emote("sneeze")
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/red_queen/on_mob_end_metabolize(mob/living/M)
|
||||
M.resize = 1/current_size
|
||||
M.update_transform()
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/pinkmilk
|
||||
name = "Strawberry Milk"
|
||||
id = "pinkmilk"
|
||||
description = "A drink of a bygone era of milk and artificial sweetener back on a rock."
|
||||
color = "#f76aeb"//rgb(247, 106, 235)
|
||||
glass_icon_state = "pinkmilk"
|
||||
quality = DRINK_FANTASTIC //Love drink
|
||||
taste_description = "sweet strawberry and milk cream"
|
||||
glass_name = "tall glass of strawberry milk"
|
||||
glass_desc = "Delicious flavored strawberry syrup mixed with milk."
|
||||
|
||||
/datum/reagent/consumable/tea/pinkmilk/on_mob_life(mob/living/carbon/M)
|
||||
if(prob(15))
|
||||
to_chat(M, "<span class = 'notice'>[pick("You cant help to smile.","You feel nostalgia all of sudden.","You remember to relax.")]</span>")
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/consumable/pinktea //Tiny Tim song
|
||||
name = "Strawberry Tea"
|
||||
id = "pinktea"
|
||||
description = "A timeless classic!"
|
||||
color = "#f76aeb"//rgb(247, 106, 235)
|
||||
glass_icon_state = "pinktea"
|
||||
quality = DRINK_FANTASTIC //Love drink
|
||||
taste_description = "sweet tea with a hint of strawberry"
|
||||
glass_name = "mug of strawberry tea"
|
||||
glass_desc = "Delicious traditional tea flavored with strawberries."
|
||||
|
||||
/datum/reagent/consumable/tea/pinktea/on_mob_life(mob/living/carbon/M)
|
||||
if(prob(10))
|
||||
to_chat(M, "<span class = 'notice'>[pick("Diamond skies where white deer fly.","Sipping strawberry tea.","Silver raindrops drift through timeless, Neverending June.","Crystal ... pearls free, with love!","Beaming love into me.")]</span>")
|
||||
..()
|
||||
. = 1
|
||||
@@ -0,0 +1,528 @@
|
||||
/datum/reagent/drug
|
||||
name = "Drug"
|
||||
id = "drug"
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
taste_description = "bitterness"
|
||||
var/trippy = TRUE //Does this drug make you trip?
|
||||
|
||||
/datum/reagent/drug/on_mob_end_metabolize(mob/living/M)
|
||||
if(trippy)
|
||||
SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "[id]_high")
|
||||
|
||||
/datum/reagent/drug/space_drugs
|
||||
name = "Space drugs"
|
||||
id = "space_drugs"
|
||||
description = "An illegal chemical compound used as drug."
|
||||
color = "#60A584" // rgb: 96, 165, 132
|
||||
overdose_threshold = 30
|
||||
pH = 9
|
||||
|
||||
/datum/reagent/drug/space_drugs/on_mob_life(mob/living/carbon/M)
|
||||
M.set_drugginess(15)
|
||||
if(isturf(M.loc) && !isspaceturf(M.loc))
|
||||
if(M.canmove)
|
||||
if(prob(10))
|
||||
step(M, pick(GLOB.cardinals))
|
||||
if(prob(7))
|
||||
M.emote(pick("twitch","drool","moan","giggle"))
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/space_drugs/overdose_start(mob/living/M)
|
||||
to_chat(M, "<span class='userdanger'>You start tripping hard!</span>")
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "[id]_overdose", /datum/mood_event/overdose, name)
|
||||
|
||||
/datum/reagent/drug/space_drugs/overdose_process(mob/living/M)
|
||||
if(M.hallucination < volume && prob(20))
|
||||
M.hallucination += 5
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/nicotine
|
||||
name = "Nicotine"
|
||||
id = "nicotine"
|
||||
description = "Slightly reduces stun times. If overdosed it will deal toxin and oxygen damage."
|
||||
reagent_state = LIQUID
|
||||
color = "#60A584" // rgb: 96, 165, 132
|
||||
addiction_threshold = 30
|
||||
taste_description = "smoke"
|
||||
trippy = FALSE
|
||||
pH = 8
|
||||
|
||||
/datum/reagent/drug/nicotine/on_mob_life(mob/living/carbon/M)
|
||||
if(prob(1))
|
||||
var/smoke_message = pick("You feel relaxed.", "You feel calmed.","You feel alert.","You feel rugged.")
|
||||
to_chat(M, "<span class='notice'>[smoke_message]</span>")
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "smoked", /datum/mood_event/smoked, name)
|
||||
M.AdjustStun(-20, 0)
|
||||
M.AdjustKnockdown(-20, 0)
|
||||
M.AdjustUnconscious(-20, 0)
|
||||
M.adjustStaminaLoss(-0.5*REM, 0)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/crank
|
||||
name = "Crank"
|
||||
id = "crank"
|
||||
description = "Reduces stun times by about 200%. If overdosed or addicted it will deal significant Toxin, Brute and Brain damage."
|
||||
reagent_state = LIQUID
|
||||
color = "#FA00C8"
|
||||
overdose_threshold = 20
|
||||
addiction_threshold = 10
|
||||
pH = 10
|
||||
|
||||
/datum/reagent/drug/crank/on_mob_life(mob/living/carbon/M)
|
||||
if(prob(5))
|
||||
var/high_message = pick("You feel jittery.", "You feel like you gotta go fast.", "You feel like you need to step it up.")
|
||||
to_chat(M, "<span class='notice'>[high_message]</span>")
|
||||
M.AdjustStun(-20, 0)
|
||||
M.AdjustKnockdown(-20, 0)
|
||||
M.AdjustUnconscious(-20, 0)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/crank/overdose_process(mob/living/M)
|
||||
M.adjustBrainLoss(2*REM)
|
||||
M.adjustToxLoss(2*REM, 0)
|
||||
M.adjustBruteLoss(2*REM, 0)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/crank/addiction_act_stage1(mob/living/M)
|
||||
M.adjustBrainLoss(5*REM)
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/crank/addiction_act_stage2(mob/living/M)
|
||||
M.adjustToxLoss(5*REM, 0)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/crank/addiction_act_stage3(mob/living/M)
|
||||
M.adjustBruteLoss(5*REM, 0)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/crank/addiction_act_stage4(mob/living/M)
|
||||
M.adjustBrainLoss(3*REM)
|
||||
M.adjustToxLoss(5*REM, 0)
|
||||
M.adjustBruteLoss(5*REM, 0)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/krokodil
|
||||
name = "Krokodil"
|
||||
id = "krokodil"
|
||||
description = "Cools and calms you down. If overdosed it will deal significant Brain and Toxin damage. If addicted it will begin to deal fatal amounts of Brute damage as the subject's skin falls off."
|
||||
reagent_state = LIQUID
|
||||
color = "#0064B4"
|
||||
overdose_threshold = 20
|
||||
addiction_threshold = 15
|
||||
pH = 9
|
||||
|
||||
|
||||
/datum/reagent/drug/krokodil/on_mob_life(mob/living/carbon/M)
|
||||
var/high_message = pick("You feel calm.", "You feel collected.", "You feel like you need to relax.")
|
||||
if(prob(5))
|
||||
to_chat(M, "<span class='notice'>[high_message]</span>")
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/krokodil/overdose_process(mob/living/M)
|
||||
M.adjustBrainLoss(0.25*REM)
|
||||
M.adjustToxLoss(0.25*REM, 0)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/krokodil/addiction_act_stage1(mob/living/M)
|
||||
M.adjustBrainLoss(2*REM)
|
||||
M.adjustToxLoss(2*REM, 0)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/krokodil/addiction_act_stage2(mob/living/M)
|
||||
if(prob(25))
|
||||
to_chat(M, "<span class='danger'>Your skin feels loose...</span>")
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/krokodil/addiction_act_stage3(mob/living/M)
|
||||
if(prob(25))
|
||||
to_chat(M, "<span class='danger'>Your skin starts to peel away...</span>")
|
||||
M.adjustBruteLoss(3*REM, 0)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/krokodil/addiction_act_stage4(mob/living/carbon/human/M)
|
||||
CHECK_DNA_AND_SPECIES(M)
|
||||
if(!istype(M.dna.species, /datum/species/krokodil_addict))
|
||||
to_chat(M, "<span class='userdanger'>Your skin falls off easily!</span>")
|
||||
M.adjustBruteLoss(50*REM, 0) // holy shit your skin just FELL THE FUCK OFF
|
||||
M.set_species(/datum/species/krokodil_addict)
|
||||
else
|
||||
M.adjustBruteLoss(5*REM, 0)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/methamphetamine
|
||||
name = "Methamphetamine"
|
||||
id = "methamphetamine"
|
||||
description = "Reduces stun times by about 300%, speeds the user up, and allows the user to quickly recover stamina while dealing a small amount of Brain damage. If overdosed the subject will move randomly, laugh randomly, drop items and suffer from Toxin and Brain damage. If addicted the subject will constantly jitter and drool, before becoming dizzy and losing motor control and eventually suffer heavy toxin damage."
|
||||
reagent_state = LIQUID
|
||||
color = "#FAFAFA"
|
||||
overdose_threshold = 20
|
||||
addiction_threshold = 10
|
||||
metabolization_rate = 0.75 * REAGENTS_METABOLISM
|
||||
var/brain_damage = TRUE
|
||||
var/jitter = TRUE
|
||||
var/confusion = TRUE
|
||||
pH = 5
|
||||
|
||||
/datum/reagent/drug/methamphetamine/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
L.ignore_slowdown(id)
|
||||
|
||||
/datum/reagent/drug/methamphetamine/on_mob_end_metabolize(mob/living/L)
|
||||
L.unignore_slowdown(id)
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/methamphetamine/on_mob_life(mob/living/carbon/M)
|
||||
var/high_message = pick("You feel hyper.", "You feel like you need to go faster.", "You feel like you can run the world.")
|
||||
if(prob(5))
|
||||
to_chat(M, "<span class='notice'>[high_message]</span>")
|
||||
M.AdjustStun(-40, 0)
|
||||
M.AdjustKnockdown(-40, 0)
|
||||
M.AdjustUnconscious(-40, 0)
|
||||
M.adjustStaminaLoss(-7.5 * REM, 0)
|
||||
if(jitter)
|
||||
M.Jitter(2)
|
||||
if(brain_damage)
|
||||
M.adjustBrainLoss(rand(1,4))
|
||||
M.heal_overall_damage(2, 2)
|
||||
if(prob(5))
|
||||
M.emote(pick("twitch", "shiver"))
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/methamphetamine/overdose_process(mob/living/M)
|
||||
if(M.canmove && !ismovableatom(M.loc))
|
||||
for(var/i in 1 to 4)
|
||||
step(M, pick(GLOB.cardinals))
|
||||
if(prob(20))
|
||||
M.emote("laugh")
|
||||
if(prob(33))
|
||||
M.visible_message("<span class='danger'>[M]'s hands flip out and flail everywhere!</span>")
|
||||
M.drop_all_held_items()
|
||||
..()
|
||||
M.adjustToxLoss(1, 0)
|
||||
M.adjustBrainLoss(pick(0.5, 0.6, 0.7, 0.8, 0.9, 1))
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/methamphetamine/addiction_act_stage1(mob/living/M)
|
||||
M.Jitter(5)
|
||||
if(prob(20))
|
||||
M.emote(pick("twitch","drool","moan"))
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/methamphetamine/addiction_act_stage2(mob/living/M)
|
||||
M.Jitter(10)
|
||||
M.Dizzy(10)
|
||||
if(prob(30))
|
||||
M.emote(pick("twitch","drool","moan"))
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/methamphetamine/addiction_act_stage3(mob/living/M)
|
||||
if(M.canmove && !ismovableatom(M.loc))
|
||||
for(var/i = 0, i < 4, i++)
|
||||
step(M, pick(GLOB.cardinals))
|
||||
M.Jitter(15)
|
||||
M.Dizzy(15)
|
||||
if(prob(40))
|
||||
M.emote(pick("twitch","drool","moan"))
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/methamphetamine/addiction_act_stage4(mob/living/carbon/human/M)
|
||||
if(M.canmove && !ismovableatom(M.loc))
|
||||
for(var/i = 0, i < 8, i++)
|
||||
step(M, pick(GLOB.cardinals))
|
||||
M.Jitter(20)
|
||||
M.Dizzy(20)
|
||||
M.adjustToxLoss(5, 0)
|
||||
if(prob(50))
|
||||
M.emote(pick("twitch","drool","moan"))
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/methamphetamine/changeling
|
||||
id = "changelingmeth"
|
||||
name = "Changeling Adrenaline"
|
||||
addiction_threshold = 35
|
||||
overdose_threshold = 35
|
||||
jitter = FALSE
|
||||
brain_damage = FALSE
|
||||
|
||||
/datum/reagent/drug/bath_salts
|
||||
name = "Bath Salts"
|
||||
id = "bath_salts"
|
||||
description = "Makes you impervious to stuns and grants a stamina regeneration buff, but you will be a nearly uncontrollable tramp-bearded raving lunatic."
|
||||
reagent_state = LIQUID
|
||||
color = "#FAFAFA"
|
||||
overdose_threshold = 20
|
||||
addiction_threshold = 10
|
||||
taste_description = "salt" // because they're bathsalts?
|
||||
var/datum/brain_trauma/special/psychotic_brawling/bath_salts/rage
|
||||
pH = 8.2
|
||||
|
||||
/datum/reagent/drug/bath_salts/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
ADD_TRAIT(L, TRAIT_STUNIMMUNE, id)
|
||||
ADD_TRAIT(L, TRAIT_SLEEPIMMUNE, id)
|
||||
if(iscarbon(L))
|
||||
var/mob/living/carbon/C = L
|
||||
rage = new()
|
||||
C.gain_trauma(rage, TRAUMA_RESILIENCE_ABSOLUTE)
|
||||
|
||||
/datum/reagent/drug/bath_salts/on_mob_end_metabolize(mob/living/L)
|
||||
REMOVE_TRAIT(L, TRAIT_STUNIMMUNE, id)
|
||||
REMOVE_TRAIT(L, TRAIT_SLEEPIMMUNE, id)
|
||||
if(rage)
|
||||
QDEL_NULL(rage)
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/bath_salts/on_mob_life(mob/living/carbon/M)
|
||||
var/high_message = pick("You feel amped up.", "You feel ready.", "You feel like you can push it to the limit.")
|
||||
if(prob(5))
|
||||
to_chat(M, "<span class='notice'>[high_message]</span>")
|
||||
M.adjustStaminaLoss(-5, 0)
|
||||
M.adjustBrainLoss(4)
|
||||
M.hallucination += 5
|
||||
if(M.canmove && !ismovableatom(M.loc))
|
||||
step(M, pick(GLOB.cardinals))
|
||||
step(M, pick(GLOB.cardinals))
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/bath_salts/overdose_process(mob/living/M)
|
||||
M.hallucination += 5
|
||||
if(M.canmove && !ismovableatom(M.loc))
|
||||
for(var/i in 1 to 8)
|
||||
step(M, pick(GLOB.cardinals))
|
||||
if(prob(20))
|
||||
M.emote(pick("twitch","drool","moan"))
|
||||
if(prob(33))
|
||||
M.drop_all_held_items()
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/bath_salts/addiction_act_stage1(mob/living/M)
|
||||
M.hallucination += 10
|
||||
if(M.canmove && !ismovableatom(M.loc))
|
||||
for(var/i = 0, i < 8, i++)
|
||||
step(M, pick(GLOB.cardinals))
|
||||
M.Jitter(5)
|
||||
M.adjustBrainLoss(10)
|
||||
if(prob(20))
|
||||
M.emote(pick("twitch","drool","moan"))
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/bath_salts/addiction_act_stage2(mob/living/M)
|
||||
M.hallucination += 20
|
||||
if(M.canmove && !ismovableatom(M.loc))
|
||||
for(var/i = 0, i < 8, i++)
|
||||
step(M, pick(GLOB.cardinals))
|
||||
M.Jitter(10)
|
||||
M.Dizzy(10)
|
||||
M.adjustBrainLoss(10)
|
||||
if(prob(30))
|
||||
M.emote(pick("twitch","drool","moan"))
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/bath_salts/addiction_act_stage3(mob/living/M)
|
||||
M.hallucination += 30
|
||||
if(M.canmove && !ismovableatom(M.loc))
|
||||
for(var/i = 0, i < 12, i++)
|
||||
step(M, pick(GLOB.cardinals))
|
||||
M.Jitter(15)
|
||||
M.Dizzy(15)
|
||||
M.adjustBrainLoss(10)
|
||||
if(prob(40))
|
||||
M.emote(pick("twitch","drool","moan"))
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/bath_salts/addiction_act_stage4(mob/living/carbon/human/M)
|
||||
M.hallucination += 30
|
||||
if(M.canmove && !ismovableatom(M.loc))
|
||||
for(var/i = 0, i < 16, i++)
|
||||
step(M, pick(GLOB.cardinals))
|
||||
M.Jitter(50)
|
||||
M.Dizzy(50)
|
||||
M.adjustToxLoss(5, 0)
|
||||
M.adjustBrainLoss(10)
|
||||
if(prob(50))
|
||||
M.emote(pick("twitch","drool","moan"))
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/aranesp
|
||||
name = "Aranesp"
|
||||
id = "aranesp"
|
||||
description = "Amps you up and gets you going, fixes all stamina damage you might have but can cause toxin and oxygen damage."
|
||||
reagent_state = LIQUID
|
||||
color = "#78FFF0"
|
||||
pH = 9.2
|
||||
|
||||
/datum/reagent/drug/aranesp/on_mob_life(mob/living/carbon/M)
|
||||
var/high_message = pick("You feel amped up.", "You feel ready.", "You feel like you can push it to the limit.")
|
||||
if(prob(5))
|
||||
to_chat(M, "<span class='notice'>[high_message]</span>")
|
||||
M.adjustStaminaLoss(-18, 0)
|
||||
M.adjustToxLoss(0.5, 0)
|
||||
if(prob(50))
|
||||
M.losebreath++
|
||||
M.adjustOxyLoss(1, 0)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/happiness
|
||||
name = "Happiness"
|
||||
id = "happiness"
|
||||
description = "Fills you with ecstasic numbness and causes minor brain damage. Highly addictive. If overdosed causes sudden mood swings."
|
||||
reagent_state = LIQUID
|
||||
color = "#FFF378"
|
||||
addiction_threshold = 10
|
||||
overdose_threshold = 20
|
||||
pH = 10.5
|
||||
|
||||
/datum/reagent/drug/happiness/on_mob_add(mob/living/L)
|
||||
..()
|
||||
ADD_TRAIT(L, TRAIT_FEARLESS, id)
|
||||
SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "happiness_drug", /datum/mood_event/happiness_drug)
|
||||
|
||||
/datum/reagent/drug/happiness/on_mob_delete(mob/living/L)
|
||||
REMOVE_TRAIT(L, TRAIT_FEARLESS, id)
|
||||
SEND_SIGNAL(L, COMSIG_CLEAR_MOOD_EVENT, "happiness_drug")
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/happiness/on_mob_life(mob/living/carbon/M)
|
||||
M.jitteriness = 0
|
||||
M.confused = 0
|
||||
M.disgust = 0
|
||||
M.adjustBrainLoss(0.2)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/happiness/overdose_process(mob/living/M)
|
||||
if(prob(30))
|
||||
var/reaction = rand(1,3)
|
||||
switch(reaction)
|
||||
if(1)
|
||||
M.emote("laugh")
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "happiness_drug", /datum/mood_event/happiness_drug_good_od)
|
||||
if(2)
|
||||
M.emote("sway")
|
||||
M.Dizzy(25)
|
||||
if(3)
|
||||
M.emote("frown")
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "happiness_drug", /datum/mood_event/happiness_drug_bad_od)
|
||||
M.adjustBrainLoss(0.5)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/happiness/addiction_act_stage1(mob/living/M)// all work and no play makes jack a dull boy
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
|
||||
mood.setSanity(min(mood.sanity, SANITY_DISTURBED))
|
||||
M.Jitter(5)
|
||||
if(prob(20))
|
||||
M.emote(pick("twitch","laugh","frown"))
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/happiness/addiction_act_stage2(mob/living/M)
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
|
||||
mood.setSanity(min(mood.sanity, SANITY_UNSTABLE))
|
||||
M.Jitter(10)
|
||||
if(prob(30))
|
||||
M.emote(pick("twitch","laugh","frown"))
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/happiness/addiction_act_stage3(mob/living/M)
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
|
||||
mood.setSanity(min(mood.sanity, SANITY_CRAZY))
|
||||
M.Jitter(15)
|
||||
if(prob(40))
|
||||
M.emote(pick("twitch","laugh","frown"))
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/happiness/addiction_act_stage4(mob/living/carbon/human/M)
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, M)
|
||||
mood.setSanity(SANITY_INSANE)
|
||||
M.Jitter(20)
|
||||
if(prob(50))
|
||||
M.emote(pick("twitch","laugh","frown"))
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/skooma
|
||||
name = "Skooma"
|
||||
id = "skooma"
|
||||
description = "An ancient, highly-addictive drug of long-forgotten times. It greatly improves the user's speed and strength, but heavily impedes their intelligence and agility."
|
||||
reagent_state = LIQUID
|
||||
color = "#F3E0F9"
|
||||
taste_description = "ancient, unfulfilled prophecies"
|
||||
addiction_threshold = 1
|
||||
addiction_stage3_end = 40
|
||||
addiction_stage4_end = 240
|
||||
pH = 12.5
|
||||
|
||||
/datum/reagent/drug/skooma/on_mob_metabolize(mob/living/L)
|
||||
. = ..()
|
||||
ADD_TRAIT(L, TRAIT_GOTTAGOFAST, id)
|
||||
L.next_move_modifier *= 2
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(H.physiology)
|
||||
H.physiology.stamina_mod *= 0.5
|
||||
if(H.dna && H.dna.species)
|
||||
H.dna.species.punchdamagehigh *= 5
|
||||
|
||||
/datum/reagent/drug/skooma/on_mob_end_metabolize(mob/living/L)
|
||||
. = ..()
|
||||
REMOVE_TRAIT(L, TRAIT_GOTTAGOFAST, id)
|
||||
L.next_move_modifier *= 0.5
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(H.physiology)
|
||||
H.physiology.stamina_mod *= 2
|
||||
if(H.dna && H.dna.species)
|
||||
H.dna.species.punchdamagehigh *= 0.2
|
||||
|
||||
/datum/reagent/drug/skooma/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustBrainLoss(1*REM)
|
||||
M.adjustToxLoss(1*REM)
|
||||
if(prob(10))
|
||||
M.adjust_blurriness(2)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/drug/skooma/addiction_act_stage1(mob/living/M)
|
||||
M.Jitter(10)
|
||||
if(prob(50))
|
||||
M.adjust_blurriness(2)
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/skooma/addiction_act_stage2(mob/living/M)
|
||||
M.Jitter(20)
|
||||
M.Dizzy(10)
|
||||
M.adjust_blurriness(2)
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/skooma/addiction_act_stage3(mob/living/M)
|
||||
M.Jitter(50)
|
||||
M.Dizzy(20)
|
||||
M.adjust_blurriness(4)
|
||||
if(prob(20))
|
||||
M.emote(pick("twitch","drool","moan"))
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/skooma/addiction_act_stage4(mob/living/M)
|
||||
M.Jitter(50)
|
||||
M.Dizzy(50)
|
||||
M.adjust_blurriness(10)
|
||||
if(prob(50)) //This proc will be called about 200 times and the adjustbrainloss() below only has to be called 40 times to kill. This will make surviving skooma addiction pretty rare without mannitol usage.
|
||||
M.adjustBrainLoss(5)
|
||||
if(prob(40))
|
||||
M.emote(pick("twitch","drool","moan"))
|
||||
..()
|
||||
@@ -0,0 +1,761 @@
|
||||
///////////////////////////////////////////////////////////////////
|
||||
//Food Reagents
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// Part of the food code. Also is where all the food
|
||||
// condiments, additives, and such go.
|
||||
|
||||
|
||||
/datum/reagent/consumable
|
||||
name = "Consumable"
|
||||
id = "consumable"
|
||||
taste_description = "generic food"
|
||||
taste_mult = 4
|
||||
var/nutriment_factor = 1 * REAGENTS_METABOLISM
|
||||
var/quality = 0 //affects mood, typically higher for mixed drinks with more complex recipes
|
||||
|
||||
/datum/reagent/consumable/on_mob_life(mob/living/carbon/M)
|
||||
current_cycle++
|
||||
M.nutrition += nutriment_factor
|
||||
holder.remove_reagent(src.id, metabolization_rate)
|
||||
|
||||
/datum/reagent/consumable/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
if(method == INGEST)
|
||||
if (quality && !HAS_TRAIT(M, TRAIT_AGEUSIA))
|
||||
switch(quality)
|
||||
if (DRINK_NICE)
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_drink", /datum/mood_event/quality_nice)
|
||||
if (DRINK_GOOD)
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_drink", /datum/mood_event/quality_good)
|
||||
if (DRINK_VERYGOOD)
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_drink", /datum/mood_event/quality_verygood)
|
||||
if (DRINK_FANTASTIC)
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_drink", /datum/mood_event/quality_fantastic)
|
||||
if (FOOD_AMAZING)
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_food", /datum/mood_event/amazingtaste)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/consumable/nutriment
|
||||
name = "Nutriment"
|
||||
id = "nutriment"
|
||||
description = "All the vitamins, minerals, and carbohydrates the body needs in pure form."
|
||||
reagent_state = SOLID
|
||||
nutriment_factor = 15 * REAGENTS_METABOLISM
|
||||
color = "#664330" // rgb: 102, 67, 48
|
||||
|
||||
var/brute_heal = 1
|
||||
var/burn_heal = 0
|
||||
|
||||
/datum/reagent/consumable/nutriment/on_mob_life(mob/living/carbon/M)
|
||||
if(prob(50))
|
||||
M.heal_bodypart_damage(brute_heal,burn_heal, 0)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/nutriment/on_new(list/supplied_data)
|
||||
// taste data can sometimes be ("salt" = 3, "chips" = 1)
|
||||
// and we want it to be in the form ("salt" = 0.75, "chips" = 0.25)
|
||||
// which is called "normalizing"
|
||||
if(!supplied_data)
|
||||
supplied_data = data
|
||||
|
||||
// if data isn't an associative list, this has some WEIRD side effects
|
||||
// TODO probably check for assoc list?
|
||||
|
||||
data = counterlist_normalise(supplied_data)
|
||||
|
||||
/datum/reagent/consumable/nutriment/on_merge(list/newdata, newvolume)
|
||||
if(!islist(newdata) || !newdata.len)
|
||||
return
|
||||
|
||||
// data for nutriment is one or more (flavour -> ratio)
|
||||
// where all the ratio values adds up to 1
|
||||
|
||||
var/list/taste_amounts = list()
|
||||
if(data)
|
||||
taste_amounts = data.Copy()
|
||||
|
||||
counterlist_scale(taste_amounts, volume)
|
||||
|
||||
var/list/other_taste_amounts = newdata.Copy()
|
||||
counterlist_scale(other_taste_amounts, newvolume)
|
||||
|
||||
counterlist_combine(taste_amounts, other_taste_amounts)
|
||||
|
||||
counterlist_normalise(taste_amounts)
|
||||
|
||||
data = taste_amounts
|
||||
|
||||
/datum/reagent/consumable/nutriment/vitamin
|
||||
name = "Vitamin"
|
||||
id = "vitamin"
|
||||
description = "All the best vitamins, minerals, and carbohydrates the body needs in pure form."
|
||||
|
||||
brute_heal = 1
|
||||
burn_heal = 1
|
||||
|
||||
/datum/reagent/consumable/nutriment/vitamin/on_mob_life(mob/living/carbon/M)
|
||||
if(M.satiety < 600)
|
||||
M.satiety += 30
|
||||
. = ..()
|
||||
|
||||
/datum/reagent/consumable/cooking_oil
|
||||
name = "Cooking Oil"
|
||||
id = "cooking_oil"
|
||||
description = "A variety of cooking oil derived from fat or plants. Used in food preparation and frying."
|
||||
color = "#EADD6B" //RGB: 234, 221, 107 (based off of canola oil)
|
||||
taste_mult = 0.8
|
||||
taste_description = "oil"
|
||||
nutriment_factor = 7 * REAGENTS_METABOLISM //Not very healthy on its own
|
||||
metabolization_rate = 10 * REAGENTS_METABOLISM
|
||||
var/fry_temperature = 450 //Around ~350 F (117 C) which deep fryers operate around in the real world
|
||||
var/boiling //Used in mob life to determine if the oil kills, and only on touch application
|
||||
|
||||
/datum/reagent/consumable/cooking_oil/reaction_obj(obj/O, reac_volume)
|
||||
if(holder && holder.chem_temp >= fry_temperature)
|
||||
if(isitem(O) && !istype(O, /obj/item/reagent_containers/food/snacks/deepfryholder) && !(O.resistance_flags & (FIRE_PROOF|INDESTRUCTIBLE)))
|
||||
O.loc.visible_message("<span class='warning'>[O] rapidly fries as it's splashed with hot oil! Somehow.</span>")
|
||||
var/obj/item/reagent_containers/food/snacks/deepfryholder/F = new(O.drop_location(), O)
|
||||
F.fry(volume)
|
||||
F.reagents.add_reagent("cooking_oil", reac_volume)
|
||||
|
||||
/datum/reagent/consumable/cooking_oil/reaction_mob(mob/living/M, method = TOUCH, reac_volume, show_message = 1, touch_protection = 0)
|
||||
if(!istype(M))
|
||||
return
|
||||
if(holder && holder.chem_temp >= fry_temperature)
|
||||
boiling = TRUE
|
||||
if(method == VAPOR || method == TOUCH) //Directly coats the mob, and doesn't go into their bloodstream
|
||||
if(boiling)
|
||||
M.visible_message("<span class='warning'>The boiling oil sizzles as it covers [M]!</span>", \
|
||||
"<span class='userdanger'>You're covered in boiling oil!</span>")
|
||||
M.emote("scream")
|
||||
playsound(M, 'sound/machines/fryer/deep_fryer_emerge.ogg', 25, TRUE)
|
||||
var/oil_damage = (holder.chem_temp / fry_temperature) * 0.33 //Damage taken per unit
|
||||
M.adjustFireLoss(min(35, oil_damage * reac_volume)) //Damage caps at 35
|
||||
else
|
||||
..()
|
||||
return TRUE
|
||||
|
||||
/datum/reagent/consumable/cooking_oil/reaction_turf(turf/open/T, reac_volume)
|
||||
if(!istype(T))
|
||||
return
|
||||
if(reac_volume >= 5)
|
||||
T.MakeSlippery(TURF_WET_LUBE, min_wet_time = 10 SECONDS, wet_time_to_add = reac_volume * 1.5 SECONDS)
|
||||
T.name = "deep-fried [initial(T.name)]"
|
||||
T.add_atom_colour(color, TEMPORARY_COLOUR_PRIORITY)
|
||||
|
||||
/datum/reagent/consumable/sugar
|
||||
name = "Sugar"
|
||||
id = "sugar"
|
||||
description = "The organic compound commonly known as table sugar and sometimes called saccharose. This white, odorless, crystalline powder has a pleasing, sweet taste."
|
||||
reagent_state = SOLID
|
||||
color = "#FFFFFF" // rgb: 255, 255, 255
|
||||
taste_mult = 1.5 // stop sugar drowning out other flavours
|
||||
nutriment_factor = 10 * REAGENTS_METABOLISM
|
||||
metabolization_rate = 2 * REAGENTS_METABOLISM
|
||||
overdose_threshold = 200 // Hyperglycaemic shock
|
||||
taste_description = "sweetness"
|
||||
|
||||
/datum/reagent/consumable/sugar/overdose_start(mob/living/M)
|
||||
to_chat(M, "<span class='userdanger'>You go into hyperglycaemic shock! Lay off the twinkies!</span>")
|
||||
M.AdjustSleeping(600, FALSE)
|
||||
. = 1
|
||||
|
||||
/datum/reagent/consumable/sugar/overdose_process(mob/living/M)
|
||||
M.AdjustSleeping(40, FALSE)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/consumable/virus_food
|
||||
name = "Virus Food"
|
||||
id = "virusfood"
|
||||
description = "A mixture of water and milk. Virus cells can use this mixture to reproduce."
|
||||
nutriment_factor = 2 * REAGENTS_METABOLISM
|
||||
color = "#899613" // rgb: 137, 150, 19
|
||||
taste_description = "watery milk"
|
||||
|
||||
/datum/reagent/consumable/soysauce
|
||||
name = "Soysauce"
|
||||
id = "soysauce"
|
||||
description = "A salty sauce made from the soy plant."
|
||||
nutriment_factor = 2 * REAGENTS_METABOLISM
|
||||
color = "#792300" // rgb: 121, 35, 0
|
||||
taste_description = "umami"
|
||||
|
||||
/datum/reagent/consumable/ketchup
|
||||
name = "Ketchup"
|
||||
id = "ketchup"
|
||||
description = "Ketchup, catsup, whatever. It's tomato paste."
|
||||
nutriment_factor = 5 * REAGENTS_METABOLISM
|
||||
color = "#731008" // rgb: 115, 16, 8
|
||||
taste_description = "ketchup"
|
||||
|
||||
|
||||
/datum/reagent/consumable/capsaicin
|
||||
name = "Capsaicin Oil"
|
||||
id = "capsaicin"
|
||||
description = "This is what makes chilis hot."
|
||||
color = "#B31008" // rgb: 179, 16, 8
|
||||
taste_description = "hot peppers"
|
||||
taste_mult = 1.5
|
||||
|
||||
/datum/reagent/consumable/capsaicin/on_mob_life(mob/living/carbon/M)
|
||||
var/heating = 0
|
||||
switch(current_cycle)
|
||||
if(1 to 15)
|
||||
heating = 5 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(holder.has_reagent("cryostylane"))
|
||||
holder.remove_reagent("cryostylane", 5)
|
||||
if(isslime(M))
|
||||
heating = rand(5,20)
|
||||
if(15 to 25)
|
||||
heating = 10 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(isslime(M))
|
||||
heating = rand(10,20)
|
||||
if(25 to 35)
|
||||
heating = 15 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(isslime(M))
|
||||
heating = rand(15,20)
|
||||
if(35 to INFINITY)
|
||||
heating = 20 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(isslime(M))
|
||||
heating = rand(20,25)
|
||||
M.adjust_bodytemperature(heating)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/frostoil
|
||||
name = "Frost Oil"
|
||||
id = "frostoil"
|
||||
description = "A special oil that noticably chills the body. Extracted from Icepeppers and slimes."
|
||||
color = "#8BA6E9" // rgb: 139, 166, 233
|
||||
taste_description = "mint"
|
||||
pH = 13 //HMM! I wonder
|
||||
|
||||
/datum/reagent/consumable/frostoil/on_mob_life(mob/living/carbon/M)
|
||||
var/cooling = 0
|
||||
switch(current_cycle)
|
||||
if(1 to 15)
|
||||
cooling = -10 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(holder.has_reagent("capsaicin"))
|
||||
holder.remove_reagent("capsaicin", 5)
|
||||
if(isslime(M))
|
||||
cooling = -rand(5,20)
|
||||
if(15 to 25)
|
||||
cooling = -20 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(isslime(M))
|
||||
cooling = -rand(10,20)
|
||||
if(25 to 35)
|
||||
cooling = -30 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(prob(1))
|
||||
M.emote("shiver")
|
||||
if(isslime(M))
|
||||
cooling = -rand(15,20)
|
||||
if(35 to INFINITY)
|
||||
cooling = -40 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(prob(5))
|
||||
M.emote("shiver")
|
||||
if(isslime(M))
|
||||
cooling = -rand(20,25)
|
||||
M.adjust_bodytemperature(cooling, 50)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/frostoil/reaction_turf(turf/T, reac_volume)
|
||||
if(reac_volume >= 5)
|
||||
for(var/mob/living/simple_animal/slime/M in T)
|
||||
M.adjustToxLoss(rand(15,30))
|
||||
if(reac_volume >= 1) // Make Freezy Foam and anti-fire grenades!
|
||||
if(isopenturf(T))
|
||||
var/turf/open/OT = T
|
||||
OT.MakeSlippery(wet_setting=TURF_WET_ICE, min_wet_time=100, wet_time_to_add=reac_volume SECONDS) // Is less effective in high pressure/high heat capacity environments. More effective in low pressure.
|
||||
OT.air.temperature -= MOLES_CELLSTANDARD*100*reac_volume/OT.air.heat_capacity() // reduces environment temperature by 5K per unit.
|
||||
|
||||
/datum/reagent/consumable/condensedcapsaicin
|
||||
name = "Condensed Capsaicin"
|
||||
id = "condensedcapsaicin"
|
||||
description = "A chemical agent used for self-defense and in police work."
|
||||
color = "#B31008" // rgb: 179, 16, 8
|
||||
taste_description = "scorching agony"
|
||||
pH = 7.4
|
||||
|
||||
/datum/reagent/consumable/condensedcapsaicin/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
if(!ishuman(M) && !ismonkey(M))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/victim = M
|
||||
if(method == TOUCH || method == VAPOR)
|
||||
//check for protection
|
||||
var/mouth_covered = 0
|
||||
var/eyes_covered = 0
|
||||
var/obj/item/safe_thing = null
|
||||
|
||||
//monkeys and humans can have masks
|
||||
if( victim.wear_mask )
|
||||
if ( victim.wear_mask.flags_cover & MASKCOVERSEYES )
|
||||
eyes_covered = 1
|
||||
safe_thing = victim.wear_mask
|
||||
if ( victim.wear_mask.flags_cover & MASKCOVERSMOUTH )
|
||||
mouth_covered = 1
|
||||
safe_thing = victim.wear_mask
|
||||
|
||||
//only humans can have helmets and glasses
|
||||
if(ishuman(victim))
|
||||
var/mob/living/carbon/human/H = victim
|
||||
if( H.head )
|
||||
if ( H.head.flags_cover & HEADCOVERSEYES )
|
||||
eyes_covered = 1
|
||||
safe_thing = H.head
|
||||
if ( H.head.flags_cover & HEADCOVERSMOUTH )
|
||||
mouth_covered = 1
|
||||
safe_thing = H.head
|
||||
if(H.glasses)
|
||||
eyes_covered = 1
|
||||
if ( !safe_thing )
|
||||
safe_thing = H.glasses
|
||||
|
||||
//actually handle the pepperspray effects
|
||||
if ( eyes_covered && mouth_covered )
|
||||
return
|
||||
else if ( mouth_covered ) // Reduced effects if partially protected
|
||||
if(prob(5))
|
||||
victim.emote("scream")
|
||||
victim.blur_eyes(3)
|
||||
victim.blind_eyes(2)
|
||||
victim.confused = max(M.confused, 3)
|
||||
victim.damageoverlaytemp = 60
|
||||
victim.Knockdown(80, override_hardstun = 0.1, override_stamdmg = min(reac_volume * 3, 15))
|
||||
return
|
||||
else if ( eyes_covered ) // Eye cover is better than mouth cover
|
||||
victim.blur_eyes(3)
|
||||
victim.damageoverlaytemp = 30
|
||||
return
|
||||
else // Oh dear :D
|
||||
if(prob(5))
|
||||
victim.emote("scream")
|
||||
victim.blur_eyes(5)
|
||||
victim.blind_eyes(3)
|
||||
victim.confused = max(M.confused, 6)
|
||||
victim.damageoverlaytemp = 75
|
||||
victim.Knockdown(80, override_hardstun = 0.1, override_stamdmg = min(reac_volume * 5, 25))
|
||||
victim.update_damage_hud()
|
||||
|
||||
/datum/reagent/consumable/condensedcapsaicin/on_mob_life(mob/living/carbon/M)
|
||||
if(prob(5))
|
||||
M.visible_message("<span class='warning'>[M] [pick("dry heaves!","coughs!","splutters!")]</span>")
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/sodiumchloride
|
||||
name = "Table Salt"
|
||||
id = "sodiumchloride"
|
||||
description = "A salt made of sodium chloride. Commonly used to season food."
|
||||
reagent_state = SOLID
|
||||
color = "#FFFFFF" // rgb: 255,255,255
|
||||
taste_description = "salt"
|
||||
|
||||
/datum/reagent/consumable/sodiumchloride/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
if(!istype(M))
|
||||
return
|
||||
if(M.has_bane(BANE_SALT))
|
||||
M.mind.disrupt_spells(-200)
|
||||
|
||||
/datum/reagent/consumable/sodiumchloride/reaction_turf(turf/T, reac_volume) //Creates an umbra-blocking salt pile
|
||||
if(!istype(T))
|
||||
return
|
||||
if(reac_volume < 1)
|
||||
return
|
||||
new/obj/effect/decal/cleanable/salt(T)
|
||||
|
||||
/datum/reagent/consumable/blackpepper
|
||||
name = "Black Pepper"
|
||||
id = "blackpepper"
|
||||
description = "A powder ground from peppercorns. *AAAACHOOO*"
|
||||
reagent_state = SOLID
|
||||
// no color (ie, black)
|
||||
taste_description = "pepper"
|
||||
|
||||
/datum/reagent/consumable/coco
|
||||
name = "Coco Powder"
|
||||
id = "cocoa"
|
||||
description = "A fatty, bitter paste made from coco beans."
|
||||
reagent_state = SOLID
|
||||
nutriment_factor = 5 * REAGENTS_METABOLISM
|
||||
color = "#302000" // rgb: 48, 32, 0
|
||||
taste_description = "bitterness"
|
||||
|
||||
/datum/reagent/consumable/hot_coco
|
||||
name = "Hot Chocolate"
|
||||
id = "hot_coco"
|
||||
description = "Made with love! And coco beans."
|
||||
nutriment_factor = 3 * REAGENTS_METABOLISM
|
||||
color = "#403010" // rgb: 64, 48, 16
|
||||
taste_description = "creamy chocolate"
|
||||
glass_icon_state = "chocolateglass"
|
||||
glass_name = "glass of chocolate"
|
||||
glass_desc = "Tasty."
|
||||
|
||||
/datum/reagent/consumable/hot_coco/on_mob_life(mob/living/carbon/M)
|
||||
M.adjust_bodytemperature(5 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, BODYTEMP_NORMAL)
|
||||
..()
|
||||
|
||||
/datum/reagent/drug/mushroomhallucinogen
|
||||
name = "Mushroom Hallucinogen"
|
||||
id = "mushroomhallucinogen"
|
||||
description = "A strong hallucinogenic drug derived from certain species of mushroom."
|
||||
color = "#E700E7" // rgb: 231, 0, 231
|
||||
metabolization_rate = 0.2 * REAGENTS_METABOLISM
|
||||
taste_description = "mushroom"
|
||||
pH = 11
|
||||
|
||||
/datum/reagent/drug/mushroomhallucinogen/on_mob_life(mob/living/carbon/M)
|
||||
M.slurring = max(M.slurring,50)
|
||||
switch(current_cycle)
|
||||
if(1 to 5)
|
||||
M.Dizzy(5)
|
||||
M.set_drugginess(30)
|
||||
if(prob(10))
|
||||
M.emote(pick("twitch","giggle"))
|
||||
if(5 to 10)
|
||||
M.Jitter(10)
|
||||
M.Dizzy(10)
|
||||
M.set_drugginess(35)
|
||||
if(prob(20))
|
||||
M.emote(pick("twitch","giggle"))
|
||||
if (10 to INFINITY)
|
||||
M.Jitter(20)
|
||||
M.Dizzy(20)
|
||||
M.set_drugginess(40)
|
||||
if(prob(30))
|
||||
M.emote(pick("twitch","giggle"))
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/sprinkles
|
||||
name = "Sprinkles"
|
||||
id = "sprinkles"
|
||||
description = "Multi-colored little bits of sugar, commonly found on donuts. Loved by cops."
|
||||
color = "#FF00FF" // rgb: 255, 0, 255
|
||||
taste_description = "childhood whimsy"
|
||||
|
||||
/datum/reagent/consumable/sprinkles/on_mob_life(mob/living/carbon/M)
|
||||
if(M.mind && HAS_TRAIT(M.mind, TRAIT_LAW_ENFORCEMENT_METABOLISM))
|
||||
M.heal_bodypart_damage(1,1, 0)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/peanut_butter
|
||||
name = "Peanut Butter"
|
||||
id = "peanut_butter"
|
||||
description = "A popular food paste made from ground dry-roasted peanuts."
|
||||
color = "#C29261"
|
||||
nutriment_factor = 15 * REAGENTS_METABOLISM
|
||||
taste_description = "peanuts"
|
||||
|
||||
/datum/reagent/consumable/cornoil
|
||||
name = "Corn Oil"
|
||||
id = "cornoil"
|
||||
description = "An oil derived from various types of corn."
|
||||
nutriment_factor = 20 * REAGENTS_METABOLISM
|
||||
color = "#302000" // rgb: 48, 32, 0
|
||||
taste_description = "slime"
|
||||
|
||||
/datum/reagent/consumable/cornoil/reaction_turf(turf/open/T, reac_volume)
|
||||
if (!istype(T))
|
||||
return
|
||||
T.MakeSlippery(TURF_WET_LUBE, min_wet_time = 10 SECONDS, wet_time_to_add = reac_volume*2 SECONDS)
|
||||
var/obj/effect/hotspot/hotspot = (locate(/obj/effect/hotspot) in T)
|
||||
if(hotspot)
|
||||
var/datum/gas_mixture/lowertemp = T.remove_air(T.air.total_moles())
|
||||
lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0)
|
||||
lowertemp.react(src)
|
||||
T.assume_air(lowertemp)
|
||||
qdel(hotspot)
|
||||
|
||||
/datum/reagent/consumable/enzyme
|
||||
name = "Universal Enzyme"
|
||||
id = "enzyme"
|
||||
description = "A universal enzyme used in the preperation of certain chemicals and foods."
|
||||
color = "#365E30" // rgb: 54, 94, 48
|
||||
taste_description = "sweetness"
|
||||
|
||||
/datum/reagent/consumable/dry_ramen
|
||||
name = "Dry Ramen"
|
||||
id = "dry_ramen"
|
||||
description = "Space age food, since August 25, 1958. Contains dried noodles, vegetables, and chemicals that boil in contact with water."
|
||||
reagent_state = SOLID
|
||||
color = "#302000" // rgb: 48, 32, 0
|
||||
taste_description = "dry and cheap noodles"
|
||||
|
||||
/datum/reagent/consumable/hot_ramen
|
||||
name = "Hot Ramen"
|
||||
id = "hot_ramen"
|
||||
description = "The noodles are boiled, the flavors are artificial, just like being back in school."
|
||||
nutriment_factor = 5 * REAGENTS_METABOLISM
|
||||
color = "#302000" // rgb: 48, 32, 0
|
||||
taste_description = "wet and cheap noodles"
|
||||
|
||||
/datum/reagent/consumable/hot_ramen/on_mob_life(mob/living/carbon/M)
|
||||
M.adjust_bodytemperature(10 * TEMPERATURE_DAMAGE_COEFFICIENT, 0, BODYTEMP_NORMAL)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/hell_ramen
|
||||
name = "Hell Ramen"
|
||||
id = "hell_ramen"
|
||||
description = "The noodles are boiled, the flavors are artificial, just like being back in school."
|
||||
nutriment_factor = 5 * REAGENTS_METABOLISM
|
||||
color = "#302000" // rgb: 48, 32, 0
|
||||
taste_description = "wet and cheap noodles on fire"
|
||||
|
||||
/datum/reagent/consumable/hell_ramen/on_mob_life(mob/living/carbon/M)
|
||||
M.adjust_bodytemperature(10 * TEMPERATURE_DAMAGE_COEFFICIENT)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/flour
|
||||
name = "Flour"
|
||||
id = "flour"
|
||||
description = "This is what you rub all over yourself to pretend to be a ghost."
|
||||
reagent_state = SOLID
|
||||
color = "#FFFFFF" // rgb: 0, 0, 0
|
||||
taste_description = "chalky wheat"
|
||||
|
||||
/datum/reagent/consumable/flour/reaction_turf(turf/T, reac_volume)
|
||||
if(!isspaceturf(T))
|
||||
var/obj/effect/decal/cleanable/flour/reagentdecal = new/obj/effect/decal/cleanable/flour(T)
|
||||
reagentdecal = locate() in T //Might have merged with flour already there.
|
||||
if(reagentdecal)
|
||||
reagentdecal.reagents.add_reagent("flour", reac_volume)
|
||||
|
||||
/datum/reagent/consumable/cherryjelly
|
||||
name = "Cherry Jelly"
|
||||
id = "cherryjelly"
|
||||
description = "Totally the best. Only to be spread on foods with excellent lateral symmetry."
|
||||
color = "#801E28" // rgb: 128, 30, 40
|
||||
taste_description = "cherry"
|
||||
|
||||
/datum/reagent/consumable/bluecherryjelly
|
||||
name = "Blue Cherry Jelly"
|
||||
id = "bluecherryjelly"
|
||||
description = "Blue and tastier kind of cherry jelly."
|
||||
color = "#00F0FF"
|
||||
taste_description = "blue cherry"
|
||||
|
||||
/datum/reagent/consumable/rice
|
||||
name = "Rice"
|
||||
id = "rice"
|
||||
description = "tiny nutritious grains"
|
||||
reagent_state = SOLID
|
||||
nutriment_factor = 3 * REAGENTS_METABOLISM
|
||||
color = "#FFFFFF" // rgb: 0, 0, 0
|
||||
taste_description = "rice"
|
||||
|
||||
/datum/reagent/consumable/vanilla
|
||||
name = "Vanilla Powder"
|
||||
id = "vanilla"
|
||||
description = "A fatty, bitter paste made from vanilla pods."
|
||||
reagent_state = SOLID
|
||||
nutriment_factor = 5 * REAGENTS_METABOLISM
|
||||
color = "#FFFACD"
|
||||
taste_description = "vanilla"
|
||||
|
||||
/datum/reagent/consumable/eggyolk
|
||||
name = "Egg Yolk"
|
||||
id = "eggyolk"
|
||||
description = "It's full of protein."
|
||||
nutriment_factor = 3 * REAGENTS_METABOLISM
|
||||
color = "#FFB500"
|
||||
taste_description = "egg"
|
||||
|
||||
/datum/reagent/consumable/corn_starch
|
||||
name = "Corn Starch"
|
||||
id = "corn_starch"
|
||||
description = "A slippery solution."
|
||||
color = "#f7f6e4"
|
||||
taste_description = "slime"
|
||||
|
||||
/datum/reagent/consumable/corn_syrup
|
||||
name = "Corn Syrup"
|
||||
id = "corn_syrup"
|
||||
description = "Decays into sugar."
|
||||
color = "#fff882"
|
||||
metabolization_rate = 3 * REAGENTS_METABOLISM
|
||||
taste_description = "sweet slime"
|
||||
|
||||
/datum/reagent/consumable/corn_syrup/on_mob_life(mob/living/carbon/M)
|
||||
holder.add_reagent("sugar", 3)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/honey
|
||||
name = "honey"
|
||||
id = "honey"
|
||||
description = "Sweet sweet honey that decays into sugar. Has antibacterial and natural healing properties."
|
||||
color = "#d3a308"
|
||||
nutriment_factor = 15 * REAGENTS_METABOLISM
|
||||
metabolization_rate = 1 * REAGENTS_METABOLISM
|
||||
taste_description = "sweetness"
|
||||
|
||||
/datum/reagent/consumable/honey/on_mob_life(mob/living/carbon/M)
|
||||
M.reagents.add_reagent("sugar",3)
|
||||
if(prob(55))
|
||||
M.adjustBruteLoss(-1*REM, 0)
|
||||
M.adjustFireLoss(-1*REM, 0)
|
||||
M.adjustOxyLoss(-1*REM, 0)
|
||||
M.adjustToxLoss(-1*REM, 0)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/honey/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
if(iscarbon(M) && (method in list(TOUCH, VAPOR, PATCH)))
|
||||
var/mob/living/carbon/C = M
|
||||
for(var/s in C.surgeries)
|
||||
var/datum/surgery/S = s
|
||||
S.success_multiplier = max(0.6, S.success_multiplier) // +60% success probability on each step, compared to bacchus' blessing's ~46%
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/mayonnaise
|
||||
name = "Mayonnaise"
|
||||
id = "mayonnaise"
|
||||
description = "An white and oily mixture of mixed egg yolks."
|
||||
color = "#DFDFDF"
|
||||
taste_description = "mayonnaise"
|
||||
|
||||
/datum/reagent/consumable/tearjuice
|
||||
name = "Tear Juice"
|
||||
id = "tearjuice"
|
||||
description = "A blinding substance extracted from certain onions."
|
||||
color = "#c0c9a0"
|
||||
taste_description = "bitterness"
|
||||
pH = 5
|
||||
|
||||
/datum/reagent/consumable/tearjuice/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
if(!istype(M))
|
||||
return
|
||||
var/unprotected = FALSE
|
||||
switch(method)
|
||||
if(INGEST)
|
||||
unprotected = TRUE
|
||||
if(INJECT)
|
||||
unprotected = FALSE
|
||||
else //Touch or vapor
|
||||
if(!M.is_mouth_covered() && !M.is_eyes_covered())
|
||||
unprotected = TRUE
|
||||
if(unprotected)
|
||||
if(!M.getorganslot(ORGAN_SLOT_EYES)) //can't blind somebody with no eyes
|
||||
to_chat(M, "<span class = 'notice'>Your eye sockets feel wet.</span>")
|
||||
else
|
||||
if(!M.eye_blurry)
|
||||
to_chat(M, "<span class = 'warning'>Tears well up in your eyes!</span>")
|
||||
M.blind_eyes(2)
|
||||
M.blur_eyes(5)
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/tearjuice/on_mob_life(mob/living/carbon/M)
|
||||
..()
|
||||
if(M.eye_blurry) //Don't worsen vision if it was otherwise fine
|
||||
M.blur_eyes(4)
|
||||
if(prob(10))
|
||||
to_chat(M, "<span class = 'warning'>Your eyes sting!</span>")
|
||||
M.blind_eyes(2)
|
||||
|
||||
|
||||
/datum/reagent/consumable/nutriment/stabilized
|
||||
name = "Stabilized Nutriment"
|
||||
id = "stabilizednutriment"
|
||||
description = "A bioengineered protien-nutrient structure designed to decompose in high saturation. In layman's terms, it won't get you fat."
|
||||
reagent_state = SOLID
|
||||
nutriment_factor = 15 * REAGENTS_METABOLISM
|
||||
color = "#664330" // rgb: 102, 67, 48
|
||||
|
||||
/datum/reagent/consumable/nutriment/stabilized/on_mob_life(mob/living/carbon/M)
|
||||
if(M.nutrition > NUTRITION_LEVEL_FULL - 25)
|
||||
M.nutrition -= 3*nutriment_factor
|
||||
..()
|
||||
|
||||
////Lavaland Flora Reagents////
|
||||
|
||||
|
||||
/datum/reagent/consumable/entpoly
|
||||
name = "Entropic Polypnium"
|
||||
id = "entpoly"
|
||||
description = "An ichor, derived from a certain mushroom, makes for a bad time."
|
||||
color = "#1d043d"
|
||||
taste_description = "bitter mushroom"
|
||||
pH = 12
|
||||
|
||||
/datum/reagent/consumable/entpoly/on_mob_life(mob/living/carbon/M)
|
||||
if(current_cycle >= 10)
|
||||
M.Unconscious(40, 0)
|
||||
. = 1
|
||||
if(prob(20))
|
||||
M.losebreath += 4
|
||||
M.adjustBrainLoss(2*REM, 150)
|
||||
M.adjustToxLoss(3*REM,0)
|
||||
M.adjustStaminaLoss(10*REM,0)
|
||||
M.blur_eyes(5)
|
||||
. = TRUE
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/tinlux
|
||||
name = "Tinea Luxor"
|
||||
id = "tinlux"
|
||||
description = "A stimulating ichor which causes luminescent fungi to grow on the skin. "
|
||||
color = "#b5a213"
|
||||
taste_description = "tingling mushroom"
|
||||
pH = 11.2
|
||||
|
||||
/datum/reagent/consumable/tinlux/reaction_mob(mob/living/M)
|
||||
M.set_light(2)
|
||||
|
||||
/datum/reagent/consumable/tinlux/on_mob_end_metabolize(mob/living/M)
|
||||
M.set_light(-2)
|
||||
|
||||
/datum/reagent/consumable/vitfro
|
||||
name = "Vitrium Froth"
|
||||
id = "vitfro"
|
||||
description = "A bubbly paste that heals wounds of the skin."
|
||||
color = "#d3a308"
|
||||
nutriment_factor = 3 * REAGENTS_METABOLISM
|
||||
taste_description = "fruity mushroom"
|
||||
pH = 10.4
|
||||
|
||||
/datum/reagent/consumable/vitfro/on_mob_life(mob/living/carbon/M)
|
||||
if(prob(80))
|
||||
M.adjustBruteLoss(-1*REM, 0)
|
||||
M.adjustFireLoss(-1*REM, 0)
|
||||
. = TRUE
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/clownstears
|
||||
name = "Clown's Tears"
|
||||
id = "clownstears"
|
||||
description = "The sorrow and melancholy of a thousand bereaved clowns, forever denied their Honkmechs."
|
||||
nutriment_factor = 5 * REAGENTS_METABOLISM
|
||||
color = "#eef442" // rgb: 238, 244, 66
|
||||
taste_description = "mournful honking"
|
||||
pH = 9.2
|
||||
|
||||
/datum/reagent/consumable/astrotame
|
||||
name = "Astrotame"
|
||||
id = "astrotame"
|
||||
description = "A space age artifical sweetener."
|
||||
nutriment_factor = 0
|
||||
metabolization_rate = 2 * REAGENTS_METABOLISM
|
||||
reagent_state = SOLID
|
||||
color = "#FFFFFF" // rgb: 255, 255, 255
|
||||
taste_mult = 8
|
||||
taste_description = "sweetness"
|
||||
overdose_threshold = 17
|
||||
|
||||
/datum/reagent/consumable/astrotame/overdose_process(mob/living/carbon/M)
|
||||
if(M.disgust < 80)
|
||||
M.adjust_disgust(10)
|
||||
..()
|
||||
. = TRUE
|
||||
|
||||
/datum/reagent/consumable/secretsauce
|
||||
name = "secret sauce"
|
||||
id = "secret_sauce"
|
||||
description = "What could it be."
|
||||
nutriment_factor = 2 * REAGENTS_METABOLISM
|
||||
color = "#792300"
|
||||
taste_description = "indescribable"
|
||||
quality = FOOD_AMAZING
|
||||
taste_mult = 100
|
||||
can_synth = FALSE
|
||||
pH = 6.1
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,286 @@
|
||||
|
||||
/datum/reagent/thermite
|
||||
name = "Thermite"
|
||||
id = "thermite"
|
||||
description = "Thermite produces an aluminothermic reaction known as a thermite reaction. Can be used to melt walls."
|
||||
reagent_state = SOLID
|
||||
color = "#550000"
|
||||
taste_description = "sweet tasting metal"
|
||||
|
||||
/datum/reagent/thermite/reaction_turf(turf/T, reac_volume)
|
||||
if(reac_volume >= 1)
|
||||
T.AddComponent(/datum/component/thermite, reac_volume)
|
||||
|
||||
/datum/reagent/thermite/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustFireLoss(1, 0)
|
||||
..()
|
||||
return TRUE
|
||||
|
||||
/datum/reagent/nitroglycerin
|
||||
name = "Nitroglycerin"
|
||||
id = "nitroglycerin"
|
||||
description = "Nitroglycerin is a heavy, colorless, oily, explosive liquid obtained by nitrating glycerol."
|
||||
color = "#808080" // rgb: 128, 128, 128
|
||||
taste_description = "oil"
|
||||
|
||||
/datum/reagent/stabilizing_agent
|
||||
name = "Stabilizing Agent"
|
||||
id = "stabilizing_agent"
|
||||
description = "Keeps unstable chemicals stable. This does not work on everything."
|
||||
reagent_state = LIQUID
|
||||
color = "#FFFF00"
|
||||
taste_description = "metal"
|
||||
|
||||
/datum/reagent/clf3
|
||||
name = "Chlorine Trifluoride"
|
||||
id = "clf3"
|
||||
description = "Makes a temporary 3x3 fireball when it comes into existence, so be careful when mixing. ClF3 applied to a surface burns things that wouldn't otherwise burn, sometimes through the very floors of the station and exposing it to the vacuum of space."
|
||||
reagent_state = LIQUID
|
||||
color = "#FFC8C8"
|
||||
metabolization_rate = 4
|
||||
taste_description = "burning"
|
||||
|
||||
/datum/reagent/clf3/on_mob_life(mob/living/carbon/M)
|
||||
M.adjust_fire_stacks(2)
|
||||
var/burndmg = max(0.3*M.fire_stacks, 0.3)
|
||||
M.adjustFireLoss(burndmg, 0)
|
||||
..()
|
||||
return TRUE
|
||||
|
||||
/datum/reagent/clf3/reaction_turf(turf/T, reac_volume)
|
||||
if(isplatingturf(T))
|
||||
var/turf/open/floor/plating/F = T
|
||||
if(prob(10 + F.burnt + 5*F.broken)) //broken or burnt plating is more susceptible to being destroyed
|
||||
F.ScrapeAway()
|
||||
if(isfloorturf(T))
|
||||
var/turf/open/floor/F = T
|
||||
if(prob(reac_volume))
|
||||
F.make_plating()
|
||||
else if(prob(reac_volume))
|
||||
F.burn_tile()
|
||||
if(isfloorturf(F))
|
||||
for(var/turf/turf in range(1,F))
|
||||
if(!locate(/obj/effect/hotspot) in turf)
|
||||
new /obj/effect/hotspot(F)
|
||||
if(iswallturf(T))
|
||||
var/turf/closed/wall/W = T
|
||||
if(prob(reac_volume))
|
||||
W.ScrapeAway()
|
||||
|
||||
/datum/reagent/clf3/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
if(istype(M))
|
||||
if(method != INGEST && method != INJECT)
|
||||
M.adjust_fire_stacks(min(reac_volume/5, 10))
|
||||
M.IgniteMob()
|
||||
if(!locate(/obj/effect/hotspot) in M.loc)
|
||||
new /obj/effect/hotspot(M.loc)
|
||||
|
||||
/datum/reagent/sorium
|
||||
name = "Sorium"
|
||||
id = "sorium"
|
||||
description = "Sends everything flying from the detonation point."
|
||||
reagent_state = LIQUID
|
||||
color = "#5A64C8"
|
||||
taste_description = "air and bitterness"
|
||||
|
||||
/datum/reagent/liquid_dark_matter
|
||||
name = "Liquid Dark Matter"
|
||||
id = "liquid_dark_matter"
|
||||
description = "Sucks everything into the detonation point."
|
||||
reagent_state = LIQUID
|
||||
color = "#210021"
|
||||
taste_description = "compressed bitterness"
|
||||
|
||||
/datum/reagent/blackpowder
|
||||
name = "Black Powder"
|
||||
id = "blackpowder"
|
||||
description = "Explodes. Violently."
|
||||
reagent_state = LIQUID
|
||||
color = "#000000"
|
||||
metabolization_rate = 0.05
|
||||
taste_description = "salt"
|
||||
|
||||
/datum/reagent/blackpowder/on_mob_life(mob/living/carbon/M)
|
||||
..()
|
||||
if(isplasmaman(M))
|
||||
M.hallucination += 5
|
||||
|
||||
/datum/reagent/blackpowder/on_ex_act()
|
||||
var/location = get_turf(holder.my_atom)
|
||||
var/datum/effect_system/reagents_explosion/e = new()
|
||||
e.set_up(1 + round(volume/6, 1), location, 0, 0, message = 0)
|
||||
e.start()
|
||||
holder.clear_reagents()
|
||||
|
||||
/datum/reagent/flash_powder
|
||||
name = "Flash Powder"
|
||||
id = "flash_powder"
|
||||
description = "Makes a very bright flash."
|
||||
reagent_state = LIQUID
|
||||
color = "#C8C8C8"
|
||||
taste_description = "salt"
|
||||
|
||||
/datum/reagent/smoke_powder
|
||||
name = "Smoke Powder"
|
||||
id = "smoke_powder"
|
||||
description = "Makes a large cloud of smoke that can carry reagents."
|
||||
reagent_state = LIQUID
|
||||
color = "#C8C8C8"
|
||||
taste_description = "smoke"
|
||||
|
||||
/datum/reagent/sonic_powder
|
||||
name = "Sonic Powder"
|
||||
id = "sonic_powder"
|
||||
description = "Makes a deafening noise."
|
||||
reagent_state = LIQUID
|
||||
color = "#C8C8C8"
|
||||
taste_description = "loud noises"
|
||||
|
||||
/datum/reagent/phlogiston
|
||||
name = "Phlogiston"
|
||||
id = "phlogiston"
|
||||
description = "Catches you on fire and makes you ignite."
|
||||
reagent_state = LIQUID
|
||||
color = "#FA00AF"
|
||||
taste_description = "burning"
|
||||
|
||||
/datum/reagent/phlogiston/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
M.adjust_fire_stacks(1)
|
||||
var/burndmg = max(0.3*M.fire_stacks, 0.3)
|
||||
M.adjustFireLoss(burndmg, 0)
|
||||
M.IgniteMob()
|
||||
..()
|
||||
|
||||
/datum/reagent/phlogiston/on_mob_life(mob/living/carbon/M)
|
||||
M.adjust_fire_stacks(1)
|
||||
var/burndmg = max(0.3*M.fire_stacks, 0.3)
|
||||
M.adjustFireLoss(burndmg, 0)
|
||||
..()
|
||||
return TRUE
|
||||
|
||||
/datum/reagent/napalm
|
||||
name = "Napalm"
|
||||
id = "napalm"
|
||||
description = "Very flammable."
|
||||
reagent_state = LIQUID
|
||||
color = "#FA00AF"
|
||||
taste_description = "burning"
|
||||
|
||||
/datum/reagent/napalm/on_mob_life(mob/living/carbon/M)
|
||||
M.adjust_fire_stacks(1)
|
||||
..()
|
||||
|
||||
/datum/reagent/napalm/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
if(istype(M))
|
||||
if(method != INGEST && method != INJECT)
|
||||
M.adjust_fire_stacks(min(reac_volume/4, 20))
|
||||
|
||||
/datum/reagent/cryostylane
|
||||
name = "Cryostylane"
|
||||
id = "cryostylane"
|
||||
description = "Comes into existence at 20K. As long as there is sufficient oxygen for it to react with, Cryostylane slowly cools all other reagents in the container 0K."
|
||||
color = "#0000DC"
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
taste_description = "bitterness"
|
||||
|
||||
|
||||
/datum/reagent/cryostylane/on_mob_life(mob/living/carbon/M) //TODO: code freezing into an ice cube
|
||||
if(M.reagents.has_reagent("oxygen"))
|
||||
M.reagents.remove_reagent("oxygen", 0.5)
|
||||
M.adjust_bodytemperature(-15)
|
||||
..()
|
||||
|
||||
/datum/reagent/cryostylane/reaction_turf(turf/T, reac_volume)
|
||||
if(reac_volume >= 5)
|
||||
for(var/mob/living/simple_animal/slime/M in T)
|
||||
M.adjustToxLoss(rand(15,30))
|
||||
|
||||
/datum/reagent/pyrosium
|
||||
name = "Pyrosium"
|
||||
id = "pyrosium"
|
||||
description = "Comes into existence at 20K. As long as there is sufficient oxygen for it to react with, Pyrosium slowly heats all other reagents in the container."
|
||||
color = "#64FAC8"
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
taste_description = "bitterness"
|
||||
|
||||
/datum/reagent/pyrosium/on_mob_life(mob/living/carbon/M)
|
||||
if(M.reagents.has_reagent("oxygen"))
|
||||
M.reagents.remove_reagent("oxygen", 0.5)
|
||||
M.adjust_bodytemperature(15)
|
||||
..()
|
||||
|
||||
/datum/reagent/teslium //Teslium. Causes periodic shocks, and makes shocks against the target much more effective.
|
||||
name = "Teslium"
|
||||
id = "teslium"
|
||||
description = "An unstable, electrically-charged metallic slurry. Periodically electrocutes its victim, and makes electrocutions against them more deadly. Excessively heating teslium results in dangerous destabilization. Do not allow to come into contact with water."
|
||||
reagent_state = LIQUID
|
||||
color = "#20324D" //RGB: 32, 50, 77
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
taste_description = "charged metal"
|
||||
var/shock_timer = 0
|
||||
|
||||
/datum/reagent/teslium/on_mob_life(mob/living/carbon/M)
|
||||
shock_timer++
|
||||
if(shock_timer >= rand(5,30)) //Random shocks are wildly unpredictable
|
||||
shock_timer = 0
|
||||
M.electrocute_act(rand(5,20), "Teslium in their body", 1, 1) //Override because it's caused from INSIDE of you
|
||||
playsound(M, "sparks", 50, 1)
|
||||
..()
|
||||
|
||||
/datum/reagent/teslium/energized_jelly
|
||||
name = "Energized Jelly"
|
||||
id = "energized_jelly"
|
||||
description = "Electrically-charged jelly. Boosts jellypeople's nervous system, but only shocks other lifeforms."
|
||||
reagent_state = LIQUID
|
||||
color = "#CAFF43"
|
||||
taste_description = "jelly"
|
||||
|
||||
/datum/reagent/teslium/energized_jelly/on_mob_life(mob/living/carbon/M)
|
||||
if(isjellyperson(M))
|
||||
shock_timer = 0 //immune to shocks
|
||||
M.AdjustStun(-40, 0)
|
||||
M.AdjustKnockdown(-40, 0)
|
||||
M.AdjustUnconscious(-40, 0)
|
||||
M.adjustStaminaLoss(-2, 0)
|
||||
if(isluminescent(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/species/jelly/luminescent/L = H.dna.species
|
||||
L.extract_cooldown = max(0, L.extract_cooldown - 20)
|
||||
..()
|
||||
|
||||
/datum/reagent/firefighting_foam
|
||||
name = "Firefighting Foam"
|
||||
id = "firefighting_foam"
|
||||
description = "A historical fire suppressant. Originally believed to simply displace oxygen to starve fires, it actually interferes with the combustion reaction itself. Vastly superior to the cheap water-based extinguishers found on NT vessels."
|
||||
reagent_state = LIQUID
|
||||
color = "#A6FAFF55"
|
||||
taste_description = "the inside of a fire extinguisher"
|
||||
|
||||
/datum/reagent/firefighting_foam/reaction_turf(turf/open/T, reac_volume)
|
||||
if (!istype(T))
|
||||
return
|
||||
|
||||
if(reac_volume >= 1)
|
||||
var/obj/effect/particle_effect/foam/firefighting/F = (locate(/obj/effect/particle_effect/foam) in T)
|
||||
if(!F)
|
||||
F = new(T)
|
||||
else if(istype(F))
|
||||
F.lifetime = initial(F.lifetime) //reduce object churn a little bit when using smoke by keeping existing foam alive a bit longer
|
||||
|
||||
var/obj/effect/hotspot/hotspot = (locate(/obj/effect/hotspot) in T)
|
||||
if(hotspot && !isspaceturf(T))
|
||||
if(T.air)
|
||||
var/datum/gas_mixture/G = T.air
|
||||
if(G.temperature > T20C)
|
||||
G.temperature = max(G.temperature/2,T20C)
|
||||
G.react(src)
|
||||
qdel(hotspot)
|
||||
|
||||
/datum/reagent/firefighting_foam/reaction_obj(obj/O, reac_volume)
|
||||
O.extinguish()
|
||||
|
||||
/datum/reagent/firefighting_foam/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
if(method in list(VAPOR, TOUCH))
|
||||
M.adjust_fire_stacks(-reac_volume)
|
||||
M.ExtinguishMob()
|
||||
..()
|
||||
@@ -0,0 +1,971 @@
|
||||
|
||||
//////////////////////////Poison stuff (Toxins & Acids)///////////////////////
|
||||
|
||||
/datum/reagent/toxin
|
||||
name = "Toxin"
|
||||
id = "toxin"
|
||||
description = "A toxic chemical."
|
||||
color = "#CF3600" // rgb: 207, 54, 0
|
||||
taste_description = "bitterness"
|
||||
taste_mult = 1.2
|
||||
var/toxpwr = 1.5
|
||||
|
||||
/datum/reagent/toxin/on_mob_life(mob/living/carbon/M)
|
||||
if(toxpwr)
|
||||
M.adjustToxLoss(toxpwr*REM, 0)
|
||||
. = TRUE
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/amatoxin
|
||||
name = "Amatoxin"
|
||||
id = "amatoxin"
|
||||
description = "A powerful poison derived from certain species of mushroom."
|
||||
color = "#792300" // rgb: 121, 35, 0
|
||||
toxpwr = 2.5
|
||||
taste_description = "mushroom"
|
||||
pH = 13
|
||||
|
||||
/datum/reagent/toxin/mutagen
|
||||
name = "Unstable mutagen"
|
||||
id = "mutagen"
|
||||
description = "Might cause unpredictable mutations. Keep away from children."
|
||||
color = "#00FF00"
|
||||
toxpwr = 0
|
||||
taste_description = "slime"
|
||||
taste_mult = 0.9
|
||||
pH = 2
|
||||
|
||||
/datum/reagent/toxin/mutagen/reaction_mob(mob/living/carbon/M, method=TOUCH, reac_volume)
|
||||
if(!..())
|
||||
return
|
||||
if(!M.has_dna())
|
||||
return //No robots, AIs, aliens, Ians or other mobs should be affected by this.
|
||||
if((method==VAPOR && prob(min(33, reac_volume))) || method==INGEST || method==PATCH || method==INJECT)
|
||||
M.randmuti()
|
||||
if(prob(98))
|
||||
M.randmutb()
|
||||
else
|
||||
M.randmutg()
|
||||
M.updateappearance()
|
||||
M.domutcheck()
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/mutagen/on_mob_life(mob/living/carbon/C)
|
||||
C.apply_effect(5,EFFECT_IRRADIATE,0)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/toxin/plasma
|
||||
name = "Plasma"
|
||||
id = "plasma"
|
||||
description = "Plasma in its liquid form."
|
||||
taste_description = "bitterness"
|
||||
specific_heat = SPECIFIC_HEAT_PLASMA
|
||||
taste_mult = 1.5
|
||||
color = "#8228A0"
|
||||
toxpwr = 3
|
||||
pH = 4
|
||||
|
||||
/datum/reagent/toxin/plasma/on_mob_life(mob/living/carbon/C)
|
||||
if(holder.has_reagent("epinephrine"))
|
||||
holder.remove_reagent("epinephrine", 2*REM)
|
||||
C.adjustPlasma(20)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/toxin/plasma/reaction_obj(obj/O, reac_volume)
|
||||
if((!O) || (!reac_volume))
|
||||
return 0
|
||||
var/temp = holder ? holder.chem_temp : T20C
|
||||
O.atmos_spawn_air("plasma=[reac_volume];TEMP=[temp]")
|
||||
|
||||
/datum/reagent/toxin/plasma/reaction_turf(turf/open/T, reac_volume)
|
||||
if(istype(T))
|
||||
var/temp = holder ? holder.chem_temp : T20C
|
||||
T.atmos_spawn_air("plasma=[reac_volume];TEMP=[temp]")
|
||||
return
|
||||
|
||||
/datum/reagent/toxin/plasma/reaction_mob(mob/living/M, method=TOUCH, reac_volume)//Splashing people with plasma is stronger than fuel!
|
||||
if(method == TOUCH || method == VAPOR)
|
||||
M.adjust_fire_stacks(reac_volume / 5)
|
||||
return
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/lexorin
|
||||
name = "Lexorin"
|
||||
id = "lexorin"
|
||||
description = "A powerful poison used to stop respiration."
|
||||
color = "#7DC3A0"
|
||||
toxpwr = 0
|
||||
taste_description = "acid"
|
||||
pH = 1.2
|
||||
|
||||
/datum/reagent/toxin/lexorin/on_mob_life(mob/living/carbon/C)
|
||||
. = TRUE
|
||||
|
||||
if(HAS_TRAIT(C, TRAIT_NOBREATH))
|
||||
. = FALSE
|
||||
|
||||
if(.)
|
||||
C.adjustOxyLoss(5, 0)
|
||||
C.losebreath += 2
|
||||
if(prob(20))
|
||||
C.emote("gasp")
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/slimejelly
|
||||
name = "Slime Jelly"
|
||||
id = "slimejelly"
|
||||
description = "A gooey semi-liquid produced from one of the deadliest lifeforms in existence. SO REAL."
|
||||
color = "#801E28" // rgb: 128, 30, 40
|
||||
toxpwr = 0
|
||||
taste_description = "slime"
|
||||
taste_mult = 1.3
|
||||
pH = 10
|
||||
|
||||
/datum/reagent/toxin/slimejelly/on_mob_life(mob/living/carbon/M)
|
||||
if(prob(10))
|
||||
to_chat(M, "<span class='danger'>Your insides are burning!</span>")
|
||||
M.adjustToxLoss(rand(20,60)*REM, 0)
|
||||
. = 1
|
||||
else if(prob(40))
|
||||
M.heal_bodypart_damage(5*REM)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/minttoxin
|
||||
name = "Mint Toxin"
|
||||
id = "minttoxin"
|
||||
description = "Useful for dealing with undesirable customers."
|
||||
color = "#CF3600" // rgb: 207, 54, 0
|
||||
toxpwr = 0
|
||||
taste_description = "mint"
|
||||
pH = 8
|
||||
|
||||
/datum/reagent/toxin/minttoxin/on_mob_life(mob/living/carbon/M)
|
||||
if(HAS_TRAIT(M, TRAIT_FAT))
|
||||
M.gib()
|
||||
return ..()
|
||||
|
||||
/datum/reagent/toxin/carpotoxin
|
||||
name = "Carpotoxin"
|
||||
id = "carpotoxin"
|
||||
description = "A deadly neurotoxin produced by the dreaded spess carp."
|
||||
color = "#003333" // rgb: 0, 51, 51
|
||||
toxpwr = 2
|
||||
taste_description = "fish"
|
||||
pH = 12
|
||||
|
||||
/datum/reagent/toxin/zombiepowder
|
||||
name = "Zombie Powder"
|
||||
id = "zombiepowder"
|
||||
description = "A strong neurotoxin that puts the subject into a death-like state."
|
||||
reagent_state = SOLID
|
||||
color = "#669900" // rgb: 102, 153, 0
|
||||
toxpwr = 0.5
|
||||
taste_description = "death"
|
||||
pH = 13
|
||||
|
||||
/datum/reagent/toxin/zombiepowder/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
L.fakedeath(id)
|
||||
|
||||
/datum/reagent/toxin/zombiepowder/on_mob_end_metabolize(mob/living/L)
|
||||
L.cure_fakedeath(id)
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/zombiepowder/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustOxyLoss(0.5*REM, 0)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/toxin/ghoulpowder
|
||||
name = "Ghoul Powder"
|
||||
id = "ghoulpowder"
|
||||
description = "A strong neurotoxin that slows metabolism to a death-like state, while keeping the patient fully active. Causes toxin buildup if used too long."
|
||||
reagent_state = SOLID
|
||||
color = "#664700" // rgb: 102, 71, 0
|
||||
toxpwr = 0.8
|
||||
taste_description = "death"
|
||||
pH = 14.5
|
||||
|
||||
/datum/reagent/toxin/ghoulpowder/on_mob_metabolize(mob/living/L)
|
||||
..()
|
||||
ADD_TRAIT(L, TRAIT_FAKEDEATH, id)
|
||||
|
||||
/datum/reagent/toxin/ghoulpowder/on_mob_end_metabolize(mob/living/L)
|
||||
REMOVE_TRAIT(L, TRAIT_FAKEDEATH, id)
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/ghoulpowder/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustOxyLoss(1*REM, 0)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/toxin/mindbreaker
|
||||
name = "Mindbreaker Toxin"
|
||||
id = "mindbreaker"
|
||||
description = "A powerful hallucinogen. Not a thing to be messed with. For some mental patients. it counteracts their symptoms and anchors them to reality."
|
||||
color = "#B31008" // rgb: 139, 166, 233
|
||||
toxpwr = 0
|
||||
taste_description = "sourness"
|
||||
pH = 11
|
||||
|
||||
/datum/reagent/toxin/mindbreaker/on_mob_life(mob/living/carbon/M)
|
||||
M.hallucination += 5
|
||||
return ..()
|
||||
|
||||
/datum/reagent/toxin/plantbgone
|
||||
name = "Plant-B-Gone"
|
||||
id = "plantbgone"
|
||||
description = "A harmful toxic mixture to kill plantlife. Do not ingest!"
|
||||
color = "#49002E" // rgb: 73, 0, 46
|
||||
toxpwr = 1
|
||||
taste_mult = 1
|
||||
pH = 2
|
||||
|
||||
/datum/reagent/toxin/plantbgone/reaction_obj(obj/O, reac_volume)
|
||||
if(istype(O, /obj/structure/alien/weeds))
|
||||
var/obj/structure/alien/weeds/alien_weeds = O
|
||||
alien_weeds.take_damage(rand(15,35), BRUTE, 0) // Kills alien weeds pretty fast
|
||||
else if(istype(O, /obj/structure/glowshroom)) //even a small amount is enough to kill it
|
||||
qdel(O)
|
||||
else if(istype(O, /obj/structure/spacevine))
|
||||
var/obj/structure/spacevine/SV = O
|
||||
SV.on_chem_effect(src)
|
||||
|
||||
/datum/reagent/toxin/plantbgone/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
if(method == VAPOR)
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
if(!C.wear_mask) // If not wearing a mask
|
||||
var/damage = min(round(0.4*reac_volume, 0.1),10)
|
||||
C.adjustToxLoss(damage)
|
||||
|
||||
/datum/reagent/toxin/plantbgone/weedkiller
|
||||
name = "Weed Killer"
|
||||
id = "weedkiller"
|
||||
description = "A harmful toxic mixture to kill weeds. Do not ingest!"
|
||||
color = "#4B004B" // rgb: 75, 0, 75
|
||||
pH = 3
|
||||
|
||||
/datum/reagent/toxin/pestkiller
|
||||
name = "Pest Killer"
|
||||
id = "pestkiller"
|
||||
description = "A harmful toxic mixture to kill pests. Do not ingest!"
|
||||
color = "#4B004B" // rgb: 75, 0, 75
|
||||
toxpwr = 1
|
||||
pH = 3.2
|
||||
|
||||
/datum/reagent/toxin/pestkiller/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
..()
|
||||
if(MOB_BUG in M.mob_biotypes)
|
||||
var/damage = min(round(0.4*reac_volume, 0.1),10)
|
||||
M.adjustToxLoss(damage)
|
||||
|
||||
/datum/reagent/toxin/spore
|
||||
name = "Spore Toxin"
|
||||
id = "spore"
|
||||
description = "A natural toxin produced by blob spores that inhibits vision when ingested."
|
||||
color = "#9ACD32"
|
||||
toxpwr = 1
|
||||
pH = 11
|
||||
|
||||
/datum/reagent/toxin/spore/on_mob_life(mob/living/carbon/C)
|
||||
C.damageoverlaytemp = 60
|
||||
C.update_damage_hud()
|
||||
C.blur_eyes(3)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/toxin/spore_burning
|
||||
name = "Burning Spore Toxin"
|
||||
id = "spore_burning"
|
||||
description = "A natural toxin produced by blob spores that induces combustion in its victim."
|
||||
color = "#9ACD32"
|
||||
toxpwr = 0.5
|
||||
taste_description = "burning"
|
||||
pH = 13
|
||||
|
||||
/datum/reagent/toxin/spore_burning/on_mob_life(mob/living/carbon/M)
|
||||
M.adjust_fire_stacks(2)
|
||||
M.IgniteMob()
|
||||
return ..()
|
||||
|
||||
/datum/reagent/toxin/chloralhydrate
|
||||
name = "Chloral Hydrate"
|
||||
id = "chloralhydrate"
|
||||
description = "A powerful sedative that induces confusion and drowsiness before putting its target to sleep."
|
||||
reagent_state = SOLID
|
||||
color = "#000067" // rgb: 0, 0, 103
|
||||
toxpwr = 0
|
||||
metabolization_rate = 1.5 * REAGENTS_METABOLISM
|
||||
pH = 11
|
||||
|
||||
/datum/reagent/toxin/chloralhydrate/on_mob_life(mob/living/carbon/M)
|
||||
switch(current_cycle)
|
||||
if(1 to 10)
|
||||
M.confused += 2
|
||||
M.drowsyness += 2
|
||||
if(10 to 50)
|
||||
M.Sleeping(40, 0)
|
||||
. = 1
|
||||
if(51 to INFINITY)
|
||||
M.Sleeping(40, 0)
|
||||
M.adjustToxLoss((current_cycle - 50)*REM, 0)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/chloralhydratedelayed //sedates half as quickly and does not cause toxloss. same name/desc so it doesn't give away sleepypens
|
||||
name = "Chloral Hydrate"
|
||||
id = "chloralhydratedelayed"
|
||||
description = "A powerful sedative that induces confusion and drowsiness before putting its target to sleep."
|
||||
reagent_state = SOLID
|
||||
color = "#000067" // rgb: 0, 0, 103
|
||||
toxpwr = 0
|
||||
metabolization_rate = 1 * REAGENTS_METABOLISM
|
||||
|
||||
/datum/reagent/toxin/chloralhydratedelayed/on_mob_life(mob/living/carbon/M)
|
||||
switch(current_cycle)
|
||||
if(10 to 20)
|
||||
M.confused += 1
|
||||
M.drowsyness += 1
|
||||
M.adjustStaminaLoss(7.5)
|
||||
if(20 to INFINITY)
|
||||
M.Sleeping(40, 0)
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/fakebeer //disguised as normal beer for use by emagged brobots
|
||||
name = "Beer"
|
||||
id = "fakebeer"
|
||||
description = "A specially-engineered sedative disguised as beer. It induces instant sleep in its target."
|
||||
color = "#664300" // rgb: 102, 67, 0
|
||||
metabolization_rate = 1.5 * REAGENTS_METABOLISM
|
||||
taste_description = "piss water"
|
||||
glass_icon_state = "beerglass"
|
||||
glass_name = "glass of beer"
|
||||
glass_desc = "A freezing pint of beer."
|
||||
pH = 2
|
||||
|
||||
/datum/reagent/toxin/fakebeer/on_mob_life(mob/living/carbon/M)
|
||||
switch(current_cycle)
|
||||
if(1 to 50)
|
||||
M.Sleeping(40, 0)
|
||||
if(51 to INFINITY)
|
||||
M.Sleeping(40, 0)
|
||||
M.adjustToxLoss((current_cycle - 50)*REM, 0)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/toxin/coffeepowder
|
||||
name = "Coffee Grounds"
|
||||
id = "coffeepowder"
|
||||
description = "Finely ground coffee beans, used to make coffee."
|
||||
reagent_state = SOLID
|
||||
color = "#5B2E0D" // rgb: 91, 46, 13
|
||||
toxpwr = 0.5
|
||||
pH = 4.2
|
||||
|
||||
/datum/reagent/toxin/teapowder
|
||||
name = "Ground Tea Leaves"
|
||||
id = "teapowder"
|
||||
description = "Finely shredded tea leaves, used for making tea."
|
||||
reagent_state = SOLID
|
||||
color = "#7F8400" // rgb: 127, 132, 0
|
||||
toxpwr = 0.5
|
||||
pH = 4.9
|
||||
|
||||
/datum/reagent/toxin/mutetoxin //the new zombie powder.
|
||||
name = "Mute Toxin"
|
||||
id = "mutetoxin"
|
||||
description = "A nonlethal poison that inhibits speech in its victim."
|
||||
color = "#F0F8FF" // rgb: 240, 248, 255
|
||||
toxpwr = 0
|
||||
taste_description = "silence"
|
||||
pH = 12.2
|
||||
|
||||
/datum/reagent/toxin/mutetoxin/on_mob_life(mob/living/carbon/M)
|
||||
M.silent = max(M.silent, 3)
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/staminatoxin
|
||||
name = "Tirizene"
|
||||
id = "tirizene"
|
||||
description = "A nonlethal poison that causes extreme fatigue and weakness in its victim."
|
||||
color = "#6E2828"
|
||||
data = 13
|
||||
toxpwr = 0
|
||||
|
||||
/datum/reagent/toxin/staminatoxin/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustStaminaLoss(REM * data, 0)
|
||||
data = max(data - 1, 3)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/toxin/polonium
|
||||
name = "Polonium"
|
||||
id = "polonium"
|
||||
description = "An extremely radioactive material in liquid form. Ingestion results in fatal irradiation."
|
||||
reagent_state = LIQUID
|
||||
color = "#787878"
|
||||
metabolization_rate = 0.125 * REAGENTS_METABOLISM
|
||||
toxpwr = 0
|
||||
|
||||
/datum/reagent/toxin/polonium/on_mob_life(mob/living/carbon/M)
|
||||
M.radiation += 4
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/histamine
|
||||
name = "Histamine"
|
||||
id = "histamine"
|
||||
description = "Histamine's effects become more dangerous depending on the dosage amount. They range from mildly annoying to incredibly lethal."
|
||||
reagent_state = LIQUID
|
||||
color = "#FA6464"
|
||||
metabolization_rate = 0.25 * REAGENTS_METABOLISM
|
||||
overdose_threshold = 30
|
||||
toxpwr = 0
|
||||
|
||||
/datum/reagent/toxin/histamine/on_mob_life(mob/living/carbon/M)
|
||||
if(prob(50))
|
||||
switch(pick(1, 2, 3, 4))
|
||||
if(1)
|
||||
to_chat(M, "<span class='danger'>You can barely see!</span>")
|
||||
M.blur_eyes(3)
|
||||
if(2)
|
||||
M.emote("cough")
|
||||
if(3)
|
||||
M.emote("sneeze")
|
||||
if(4)
|
||||
if(prob(75))
|
||||
to_chat(M, "You scratch at an itch.")
|
||||
M.adjustBruteLoss(2*REM, 0)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/histamine/overdose_process(mob/living/M)
|
||||
M.adjustOxyLoss(2*REM, 0)
|
||||
M.adjustBruteLoss(2*REM, 0)
|
||||
M.adjustToxLoss(2*REM, 0)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
/datum/reagent/toxin/formaldehyde
|
||||
name = "Formaldehyde"
|
||||
id = "formaldehyde"
|
||||
description = "Formaldehyde, on its own, is a fairly weak toxin. It contains trace amounts of Histamine, very rarely making it decay into Histamine."
|
||||
reagent_state = LIQUID
|
||||
color = "#B4004B"
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
toxpwr = 1
|
||||
|
||||
/datum/reagent/toxin/formaldehyde/on_mob_life(mob/living/carbon/M)
|
||||
if(prob(5))
|
||||
holder.add_reagent("histamine", pick(5,15))
|
||||
holder.remove_reagent("formaldehyde", 1.2)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/datum/reagent/toxin/venom
|
||||
name = "Venom"
|
||||
id = "venom"
|
||||
description = "An exotic poison extracted from highly toxic fauna. Causes scaling amounts of toxin damage and bruising depending and dosage. Often decays into Histamine."
|
||||
reagent_state = LIQUID
|
||||
color = "#F0FFF0"
|
||||
metabolization_rate = 0.25 * REAGENTS_METABOLISM
|
||||
toxpwr = 0
|
||||
|
||||
/datum/reagent/toxin/venom/on_mob_life(mob/living/carbon/M)
|
||||
toxpwr = 0.2*volume
|
||||
M.adjustBruteLoss((0.3*volume)*REM, 0)
|
||||
. = 1
|
||||
if(prob(15))
|
||||
M.reagents.add_reagent("histamine", pick(5,10))
|
||||
M.reagents.remove_reagent("venom", 1.1)
|
||||
else
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/fentanyl
|
||||
name = "Fentanyl"
|
||||
id = "fentanyl"
|
||||
description = "Fentanyl will inhibit brain function and cause toxin damage before eventually knocking out its victim."
|
||||
reagent_state = LIQUID
|
||||
color = "#64916E"
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
toxpwr = 0
|
||||
|
||||
/datum/reagent/toxin/fentanyl/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustBrainLoss(3*REM, 150)
|
||||
if(M.toxloss <= 60)
|
||||
M.adjustToxLoss(1*REM, 0)
|
||||
if(current_cycle >= 18)
|
||||
M.Sleeping(40, 0)
|
||||
..()
|
||||
return TRUE
|
||||
|
||||
/datum/reagent/toxin/cyanide
|
||||
name = "Cyanide"
|
||||
id = "cyanide"
|
||||
description = "An infamous poison known for its use in assassination. Causes small amounts of toxin damage with a small chance of oxygen damage or a stun."
|
||||
reagent_state = LIQUID
|
||||
color = "#00B4FF"
|
||||
metabolization_rate = 0.125 * REAGENTS_METABOLISM
|
||||
toxpwr = 1.25
|
||||
|
||||
/datum/reagent/toxin/cyanide/on_mob_life(mob/living/carbon/M)
|
||||
if(prob(5))
|
||||
M.losebreath += 1
|
||||
if(prob(8))
|
||||
to_chat(M, "You feel horrendously weak!")
|
||||
M.Stun(40, 0)
|
||||
M.adjustToxLoss(2*REM, 0)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/toxin/bad_food
|
||||
name = "Bad Food"
|
||||
id = "bad_food"
|
||||
description = "The result of some abomination of cookery, food so bad it's toxic."
|
||||
reagent_state = LIQUID
|
||||
color = "#d6d6d8"
|
||||
metabolization_rate = 0.25 * REAGENTS_METABOLISM
|
||||
toxpwr = 0.5
|
||||
taste_description = "bad cooking"
|
||||
|
||||
/datum/reagent/toxin/itching_powder
|
||||
name = "Itching Powder"
|
||||
id = "itching_powder"
|
||||
description = "A powder that induces itching upon contact with the skin. Causes the victim to scratch at their itches and has a very low chance to decay into Histamine."
|
||||
reagent_state = LIQUID
|
||||
color = "#C8C8C8"
|
||||
metabolization_rate = 0.4 * REAGENTS_METABOLISM
|
||||
toxpwr = 0
|
||||
|
||||
/datum/reagent/toxin/itching_powder/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
if(method == TOUCH || method == VAPOR)
|
||||
M.reagents.add_reagent("itching_powder", reac_volume)
|
||||
|
||||
/datum/reagent/toxin/itching_powder/on_mob_life(mob/living/carbon/M)
|
||||
if(prob(15))
|
||||
to_chat(M, "You scratch at your head.")
|
||||
M.adjustBruteLoss(0.2*REM, 0)
|
||||
. = 1
|
||||
if(prob(15))
|
||||
to_chat(M, "You scratch at your leg.")
|
||||
M.adjustBruteLoss(0.2*REM, 0)
|
||||
. = 1
|
||||
if(prob(15))
|
||||
to_chat(M, "You scratch at your arm.")
|
||||
M.adjustBruteLoss(0.2*REM, 0)
|
||||
. = 1
|
||||
if(prob(3))
|
||||
M.reagents.add_reagent("histamine",rand(1,3))
|
||||
M.reagents.remove_reagent("itching_powder",1.2)
|
||||
return
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/initropidril
|
||||
name = "Initropidril"
|
||||
id = "initropidril"
|
||||
description = "A powerful poison with insidious effects. It can cause stuns, lethal breathing failure, and cardiac arrest."
|
||||
reagent_state = LIQUID
|
||||
color = "#7F10C0"
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
toxpwr = 2.5
|
||||
|
||||
/datum/reagent/toxin/initropidril/on_mob_life(mob/living/carbon/C)
|
||||
if(prob(25))
|
||||
var/picked_option = rand(1,3)
|
||||
switch(picked_option)
|
||||
if(1)
|
||||
C.Knockdown(60, 0)
|
||||
. = TRUE
|
||||
if(2)
|
||||
C.losebreath += 10
|
||||
C.adjustOxyLoss(rand(5,25), 0)
|
||||
. = TRUE
|
||||
if(3)
|
||||
if(!C.undergoing_cardiac_arrest() && C.can_heartattack())
|
||||
C.set_heartattack(TRUE)
|
||||
if(C.stat == CONSCIOUS)
|
||||
C.visible_message("<span class='userdanger'>[C] clutches at [C.p_their()] chest as if [C.p_their()] heart stopped!</span>")
|
||||
else
|
||||
C.losebreath += 10
|
||||
C.adjustOxyLoss(rand(5,25), 0)
|
||||
. = TRUE
|
||||
return ..() || .
|
||||
|
||||
/datum/reagent/toxin/pancuronium
|
||||
name = "Pancuronium"
|
||||
id = "pancuronium"
|
||||
description = "An undetectable toxin that swiftly incapacitates its victim. May also cause breathing failure."
|
||||
reagent_state = LIQUID
|
||||
color = "#195096"
|
||||
metabolization_rate = 0.25 * REAGENTS_METABOLISM
|
||||
toxpwr = 0
|
||||
taste_mult = 0 // undetectable, I guess?
|
||||
|
||||
/datum/reagent/toxin/pancuronium/on_mob_life(mob/living/carbon/M)
|
||||
if(current_cycle >= 10)
|
||||
M.Stun(40, 0)
|
||||
. = TRUE
|
||||
if(prob(20))
|
||||
M.losebreath += 4
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/sodium_thiopental
|
||||
name = "Sodium Thiopental"
|
||||
id = "sodium_thiopental"
|
||||
description = "Sodium Thiopental induces heavy weakness in its target as well as unconsciousness."
|
||||
reagent_state = LIQUID
|
||||
color = "#6496FA"
|
||||
metabolization_rate = 0.75 * REAGENTS_METABOLISM
|
||||
toxpwr = 0
|
||||
|
||||
/datum/reagent/toxin/sodium_thiopental/on_mob_life(mob/living/carbon/M)
|
||||
if(current_cycle >= 10)
|
||||
M.Sleeping(40, 0)
|
||||
M.adjustStaminaLoss(10*REM, 0)
|
||||
..()
|
||||
return TRUE
|
||||
|
||||
/datum/reagent/toxin/sulfonal
|
||||
name = "Sulfonal"
|
||||
id = "sulfonal"
|
||||
description = "A stealthy poison that deals minor toxin damage and eventually puts the target to sleep."
|
||||
reagent_state = LIQUID
|
||||
color = "#7DC3A0"
|
||||
metabolization_rate = 0.125 * REAGENTS_METABOLISM
|
||||
toxpwr = 0.5
|
||||
|
||||
/datum/reagent/toxin/sulfonal/on_mob_life(mob/living/carbon/M)
|
||||
if(current_cycle >= 22)
|
||||
M.Sleeping(40, 0)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/toxin/amanitin
|
||||
name = "Amanitin"
|
||||
id = "amanitin"
|
||||
description = "A very powerful delayed toxin. Upon full metabolization, a massive amount of toxin damage will be dealt depending on how long it has been in the victim's bloodstream."
|
||||
reagent_state = LIQUID
|
||||
color = "#FFFFFF"
|
||||
toxpwr = 0
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
|
||||
/datum/reagent/toxin/amanitin/on_mob_end_metabolize(mob/living/M)
|
||||
var/toxdamage = current_cycle*3*REM
|
||||
M.log_message("has taken [toxdamage] toxin damage from amanitin toxin", LOG_ATTACK)
|
||||
M.adjustToxLoss(toxdamage)
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/lipolicide
|
||||
name = "Lipolicide"
|
||||
id = "lipolicide"
|
||||
description = "A powerful toxin that will destroy fat cells, massively reducing body weight in a short time. Deadly to those without nutriment in their body."
|
||||
taste_description = "mothballs"
|
||||
reagent_state = LIQUID
|
||||
color = "#F0FFF0"
|
||||
metabolization_rate = 0.5 * REAGENTS_METABOLISM
|
||||
toxpwr = 0
|
||||
|
||||
/datum/reagent/toxin/lipolicide/on_mob_life(mob/living/carbon/M)
|
||||
if(M.nutrition <= NUTRITION_LEVEL_STARVING)
|
||||
M.adjustToxLoss(1*REM, 0)
|
||||
M.nutrition = max(M.nutrition - 3, 0) // making the chef more valuable, one meme trap at a time
|
||||
M.overeatduration = 0
|
||||
return ..()
|
||||
|
||||
/datum/reagent/toxin/coniine
|
||||
name = "Coniine"
|
||||
id = "coniine"
|
||||
description = "Coniine metabolizes extremely slowly, but deals high amounts of toxin damage and stops breathing."
|
||||
reagent_state = LIQUID
|
||||
color = "#7DC3A0"
|
||||
metabolization_rate = 0.06 * REAGENTS_METABOLISM
|
||||
toxpwr = 1.75
|
||||
|
||||
/datum/reagent/toxin/coniine/on_mob_life(mob/living/carbon/M)
|
||||
M.losebreath += 5
|
||||
return ..()
|
||||
|
||||
/datum/reagent/toxin/spewium
|
||||
name = "Spewium"
|
||||
id = "spewium"
|
||||
description = "A powerful emetic, causes uncontrollable vomiting. May result in vomiting organs at high doses."
|
||||
reagent_state = LIQUID
|
||||
color = "#2f6617" //A sickly green color
|
||||
metabolization_rate = REAGENTS_METABOLISM
|
||||
overdose_threshold = 29
|
||||
toxpwr = 0
|
||||
taste_description = "vomit"
|
||||
|
||||
/datum/reagent/toxin/spewium/on_mob_life(mob/living/carbon/C)
|
||||
.=..()
|
||||
if(current_cycle >=11 && prob(min(50,current_cycle)))
|
||||
C.vomit(10, prob(10), prob(50), rand(0,4), TRUE, prob(30))
|
||||
for(var/datum/reagent/toxin/R in C.reagents.reagent_list)
|
||||
if(R != src)
|
||||
C.reagents.remove_reagent(R.id,1)
|
||||
|
||||
/datum/reagent/toxin/spewium/overdose_process(mob/living/carbon/C)
|
||||
. = ..()
|
||||
if(current_cycle >=33 && prob(15))
|
||||
C.spew_organ()
|
||||
C.vomit(0, TRUE, TRUE, 4)
|
||||
to_chat(C, "<span class='userdanger'>You feel something lumpy come up as you vomit.</span>")
|
||||
|
||||
/datum/reagent/toxin/curare
|
||||
name = "Curare"
|
||||
id = "curare"
|
||||
description = "Causes slight toxin damage followed by chain-stunning and oxygen damage."
|
||||
reagent_state = LIQUID
|
||||
color = "#191919"
|
||||
metabolization_rate = 0.125 * REAGENTS_METABOLISM
|
||||
toxpwr = 1
|
||||
|
||||
/datum/reagent/toxin/curare/on_mob_life(mob/living/carbon/M)
|
||||
if(current_cycle >= 11)
|
||||
M.Knockdown(60, 0)
|
||||
M.adjustOxyLoss(1*REM, 0)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/heparin //Based on a real-life anticoagulant. I'm not a doctor, so this won't be realistic.
|
||||
name = "Heparin"
|
||||
id = "heparin"
|
||||
description = "A powerful anticoagulant. Victims will bleed uncontrollably and suffer scaling bruising."
|
||||
reagent_state = LIQUID
|
||||
color = "#C8C8C8" //RGB: 200, 200, 200
|
||||
metabolization_rate = 0.2 * REAGENTS_METABOLISM
|
||||
toxpwr = 0
|
||||
|
||||
/datum/reagent/toxin/heparin/on_mob_life(mob/living/carbon/M)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.bleed_rate = min(H.bleed_rate + 2, 8)
|
||||
H.adjustBruteLoss(1, 0) //Brute damage increases with the amount they're bleeding
|
||||
. = 1
|
||||
return ..() || .
|
||||
|
||||
|
||||
/datum/reagent/toxin/rotatium //Rotatium. Fucks up your rotation and is hilarious
|
||||
name = "Rotatium"
|
||||
id = "rotatium"
|
||||
description = "A constantly swirling, oddly colourful fluid. Causes the consumer's sense of direction and hand-eye coordination to become wild."
|
||||
reagent_state = LIQUID
|
||||
color = "#AC88CA" //RGB: 172, 136, 202
|
||||
metabolization_rate = 0.6 * REAGENTS_METABOLISM
|
||||
toxpwr = 0.5
|
||||
taste_description = "spinning"
|
||||
|
||||
/datum/reagent/toxin/rotatium/on_mob_life(mob/living/carbon/M)
|
||||
if(M.hud_used)
|
||||
if(current_cycle >= 20 && current_cycle%20 == 0)
|
||||
var/list/screens = list(M.hud_used.plane_masters["[FLOOR_PLANE]"], M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"])
|
||||
var/rotation = min(round(current_cycle/20), 89) // By this point the player is probably puking and quitting anyway
|
||||
for(var/whole_screen in screens)
|
||||
animate(whole_screen, transform = matrix(rotation, MATRIX_ROTATE), time = 5, easing = QUAD_EASING, loop = -1)
|
||||
animate(transform = matrix(-rotation, MATRIX_ROTATE), time = 5, easing = QUAD_EASING)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/toxin/rotatium/on_mob_end_metabolize(mob/living/M)
|
||||
if(M && M.hud_used)
|
||||
var/list/screens = list(M.hud_used.plane_masters["[FLOOR_PLANE]"], M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"])
|
||||
for(var/whole_screen in screens)
|
||||
animate(whole_screen, transform = matrix(), time = 5, easing = QUAD_EASING)
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/skewium
|
||||
name = "Skewium"
|
||||
id = "skewium"
|
||||
description = "A strange, dull coloured liquid that appears to warp back and forth inside its container. Causes any consumer to experience a visual phenomena similar to said warping."
|
||||
reagent_state = LIQUID
|
||||
color = "#ADBDCD"
|
||||
metabolization_rate = 0.8 * REAGENTS_METABOLISM
|
||||
toxpwr = 0.25
|
||||
taste_description = "skewing"
|
||||
|
||||
/datum/reagent/toxin/skewium/on_mob_life(mob/living/carbon/M)
|
||||
/*
|
||||
if(M.hud_used)
|
||||
if(current_cycle >= 5 && current_cycle % 3 == 0)
|
||||
var/list/screens = list(M.hud_used.plane_masters["[FLOOR_PLANE]"], M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"])
|
||||
var/matrix/skew = matrix()
|
||||
var/intensity = 8
|
||||
skew.set_skew(rand(-intensity,intensity), rand(-intensity,intensity))
|
||||
var/matrix/newmatrix = skew
|
||||
|
||||
if(prob(33)) // 1/3rd of the time, let's make it stack with the previous matrix! Mwhahahaha!
|
||||
var/obj/screen/plane_master/PM = M.hud_used.plane_masters["[GAME_PLANE]"]
|
||||
newmatrix = skew * PM.transform
|
||||
|
||||
for(var/whole_screen in screens)
|
||||
animate(whole_screen, transform = newmatrix, time = 5, easing = QUAD_EASING, loop = -1)
|
||||
animate(transform = -newmatrix, time = 5, easing = QUAD_EASING)
|
||||
*/
|
||||
return ..()
|
||||
|
||||
/datum/reagent/toxin/skewium/on_mob_end_metabolize(mob/living/M)
|
||||
if(M && M.hud_used)
|
||||
var/list/screens = list(M.hud_used.plane_masters["[FLOOR_PLANE]"], M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"])
|
||||
for(var/whole_screen in screens)
|
||||
animate(whole_screen, transform = matrix(), time = 5, easing = QUAD_EASING)
|
||||
..()
|
||||
|
||||
|
||||
/datum/reagent/toxin/anacea
|
||||
name = "Anacea"
|
||||
id = "anacea"
|
||||
description = "A toxin that quickly purges medicines and metabolizes very slowly."
|
||||
reagent_state = LIQUID
|
||||
color = "#3C5133"
|
||||
metabolization_rate = 0.08 * REAGENTS_METABOLISM
|
||||
toxpwr = 0.15
|
||||
|
||||
/datum/reagent/toxin/anacea/on_mob_life(mob/living/carbon/M)
|
||||
var/remove_amt = 5
|
||||
if(holder.has_reagent("calomel") || holder.has_reagent("pen_acid") || holder.has_reagent("pen_jelly"))
|
||||
remove_amt = 0.5
|
||||
for(var/datum/reagent/medicine/R in M.reagents.reagent_list)
|
||||
M.reagents.remove_reagent(R.id,remove_amt)
|
||||
return ..()
|
||||
|
||||
//ACID
|
||||
|
||||
|
||||
/datum/reagent/toxin/acid
|
||||
name = "Sulphuric acid"
|
||||
id = "sacid"
|
||||
description = "A strong mineral acid with the molecular formula H2SO4."
|
||||
color = "#00FF32"
|
||||
toxpwr = 1
|
||||
var/acidpwr = 10 //the amount of protection removed from the armour
|
||||
taste_description = "acid"
|
||||
self_consuming = TRUE
|
||||
pH = 2.75
|
||||
|
||||
/datum/reagent/toxin/acid/reaction_mob(mob/living/carbon/C, method=TOUCH, reac_volume)
|
||||
if(!istype(C))
|
||||
return
|
||||
reac_volume = round(reac_volume,0.1)
|
||||
if(method == INGEST)
|
||||
C.adjustBruteLoss(min(6*toxpwr, reac_volume * toxpwr))
|
||||
return
|
||||
if(method == INJECT)
|
||||
C.adjustBruteLoss(1.5 * min(6*toxpwr, reac_volume * toxpwr))
|
||||
return
|
||||
C.acid_act(acidpwr, reac_volume)
|
||||
|
||||
/datum/reagent/toxin/acid/reaction_obj(obj/O, reac_volume)
|
||||
if(ismob(O.loc)) //handled in human acid_act()
|
||||
return
|
||||
reac_volume = round(reac_volume,0.1)
|
||||
O.acid_act(acidpwr, reac_volume)
|
||||
|
||||
/datum/reagent/toxin/acid/reaction_turf(turf/T, reac_volume)
|
||||
if (!istype(T))
|
||||
return
|
||||
reac_volume = round(reac_volume,0.1)
|
||||
T.acid_act(acidpwr, reac_volume)
|
||||
|
||||
/datum/reagent/toxin/acid/fluacid
|
||||
name = "Fluorosulfuric acid"
|
||||
id = "facid"
|
||||
description = "Fluorosulfuric acid is an extremely corrosive chemical substance."
|
||||
color = "#5050FF"
|
||||
toxpwr = 2
|
||||
acidpwr = 42.0
|
||||
|
||||
/datum/reagent/toxin/acid/fluacid/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustFireLoss(current_cycle/10, 0)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/delayed
|
||||
name = "Toxin Microcapsules"
|
||||
id = "delayed_toxin"
|
||||
description = "Causes heavy toxin damage after a brief time of inactivity."
|
||||
reagent_state = LIQUID
|
||||
metabolization_rate = 0 //stays in the system until active.
|
||||
var/actual_metaboliztion_rate = REAGENTS_METABOLISM
|
||||
toxpwr = 0
|
||||
var/actual_toxpwr = 5
|
||||
var/delay = 30
|
||||
|
||||
/datum/reagent/toxin/delayed/on_mob_life(mob/living/carbon/M)
|
||||
if(current_cycle > delay)
|
||||
holder.remove_reagent(id, actual_metaboliztion_rate * M.metabolism_efficiency)
|
||||
M.adjustToxLoss(actual_toxpwr*REM, 0)
|
||||
if(prob(10))
|
||||
M.Knockdown(20, 0)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/mimesbane
|
||||
name = "Mime's Bane"
|
||||
id = "mimesbane"
|
||||
description = "A nonlethal neurotoxin that interferes with the victim's ability to gesture."
|
||||
color = "#F0F8FF" // rgb: 240, 248, 255
|
||||
toxpwr = 0
|
||||
taste_description = "stillness"
|
||||
|
||||
/datum/reagent/toxin/mimesbane/on_mob_metabolize(mob/living/L)
|
||||
ADD_TRAIT(L, TRAIT_EMOTEMUTE, id)
|
||||
|
||||
/datum/reagent/toxin/mimesbane/on_mob_end_metabolize(mob/living/L)
|
||||
REMOVE_TRAIT(L, TRAIT_EMOTEMUTE, id)
|
||||
|
||||
/datum/reagent/toxin/bonehurtingjuice //oof ouch
|
||||
name = "Bone Hurting Juice"
|
||||
id = "bonehurtingjuice"
|
||||
description = "A strange substance that looks a lot like water. Drinking it is oddly tempting. Oof ouch."
|
||||
color = "#AAAAAA77" //RGBA: 170, 170, 170, 77
|
||||
toxpwr = 0
|
||||
taste_description = "bone hurting"
|
||||
overdose_threshold = 20
|
||||
|
||||
/datum/reagent/toxin/bonehurtingjuice/on_mob_add(mob/living/carbon/M)
|
||||
M.say("oof ouch my bones", forced = /datum/reagent/toxin/bonehurtingjuice)
|
||||
|
||||
/datum/reagent/toxin/bonehurtingjuice/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustStaminaLoss(7.5, 0)
|
||||
if(HAS_TRAIT(M, TRAIT_CALCIUM_HEALER))
|
||||
M.adjustBruteLoss(3.5, 0)
|
||||
if(prob(12))
|
||||
switch(rand(1, 3))
|
||||
if(1)
|
||||
var/list/possible_says = list("oof.", "ouch!", "my bones.", "oof ouch.", "oof ouch my bones.")
|
||||
M.say(pick(possible_says), forced = /datum/reagent/toxin/bonehurtingjuice)
|
||||
if(2)
|
||||
var/list/possible_mes = list("oofs softly.", "looks like their bones hurt.", "grimaces, as though their bones hurt.")
|
||||
M.say("*custom " + pick(possible_mes), forced = /datum/reagent/toxin/bonehurtingjuice)
|
||||
if(3)
|
||||
to_chat(M, "<span class='warning'>Your bones hurt!</span>")
|
||||
return ..()
|
||||
|
||||
/datum/reagent/toxin/bonehurtingjuice/overdose_process(mob/living/carbon/M)
|
||||
if(prob(6) && iscarbon(M)) //big oof
|
||||
var/selected_part
|
||||
switch(rand(1, 4)) //God help you if the same limb gets picked twice quickly.
|
||||
if(1)
|
||||
selected_part = BODY_ZONE_L_ARM
|
||||
if(2)
|
||||
selected_part = BODY_ZONE_R_ARM
|
||||
if(3)
|
||||
selected_part = BODY_ZONE_L_LEG
|
||||
if(4)
|
||||
selected_part = BODY_ZONE_R_LEG
|
||||
var/obj/item/bodypart/bp = M.get_bodypart(selected_part)
|
||||
if(M.dna.species.type != /datum/species/skeleton || M.dna.species.type != /datum/species/plasmaman || M.dna.species.type != /datum/species/golem/bone) //We're so sorry skeletons, you're so misunderstood
|
||||
if(bp)
|
||||
bp.receive_damage(0, 0, 200)
|
||||
playsound(M, get_sfx("desceration"), 50, TRUE, -1)
|
||||
M.visible_message("<span class='warning'>[M]'s bones hurt too much!!</span>", "<span class='danger'>Your bones hurt too much!!</span>")
|
||||
M.say("OOF!!", forced = /datum/reagent/toxin/bonehurtingjuice)
|
||||
else //SUCH A LUST FOR REVENGE!!!
|
||||
to_chat(M, "<span class='warning'>A phantom limb hurts!</span>")
|
||||
M.say("Why are we still here, just to suffer?", forced = /datum/reagent/toxin/bonehurtingjuice)
|
||||
else //you just want to socialize
|
||||
if(bp)
|
||||
playsound(M, get_sfx("desceration"), 50, TRUE, -1)
|
||||
M.visible_message("<span class='warning'>[M] rattles loudly and flails around!!</span>", "<span class='danger'>Your bones hurt so much that your missing muscles spasm!!</span>")
|
||||
M.say("OOF!!", forced=/datum/reagent/toxin/bonehurtingjuice)
|
||||
bp.receive_damage(200, 0, 0) //But I don't think we should
|
||||
else
|
||||
to_chat(M, "<span class='warning'>Your missing arm aches from wherever you left it.</span>")
|
||||
M.emote("sigh")
|
||||
return ..()
|
||||
@@ -0,0 +1,97 @@
|
||||
/datum/chemical_reaction
|
||||
var/name = null
|
||||
var/id = null
|
||||
var/list/results = new/list()
|
||||
var/list/required_reagents = new/list()
|
||||
var/list/required_catalysts = new/list()
|
||||
|
||||
// Both of these variables are mostly going to be used with slime cores - but if you want to, you can use them for other things
|
||||
var/required_container = null // the exact container path required for the reaction to happen
|
||||
var/required_other = 0 // an integer required for the reaction to happen
|
||||
|
||||
var/mob_react = TRUE //Determines if a chemical reaction can occur inside a mob
|
||||
|
||||
var/required_temp = 0
|
||||
var/is_cold_recipe = 0 // Set to 1 if you want the recipe to only react when it's BELOW the required temp.
|
||||
var/special_react = FALSE //Determines if the recipe has special conditions for it to react. Mainly used for ling blood tests
|
||||
var/mix_message = "The solution begins to bubble." //The message shown to nearby people upon mixing, if applicable
|
||||
var/mix_sound = 'sound/effects/bubbles.ogg' //The sound played upon mixing, if applicable
|
||||
|
||||
//FermiChem!
|
||||
var/OptimalTempMin = 200 // Lower area of bell curve for determining heat based rate reactions
|
||||
var/OptimalTempMax = 800 // Upper end for above
|
||||
var/ExplodeTemp = 900 // Temperature at which reaction explodes - If any reaction is this hot, it explodes!
|
||||
var/OptimalpHMin = 5 // Lowest value of pH determining pH a 1 value for pH based rate reactions (Plateu phase)
|
||||
var/OptimalpHMax = 10 // Higest value for above
|
||||
var/ReactpHLim = 3 // How far out pH wil react, giving impurity place (Exponential phase)
|
||||
var/CatalystFact = 0 // How much the catalyst affects the reaction (0 = no catalyst)//Not implemented yet
|
||||
var/CurveSharpT = 2 // How sharp the temperature exponential curve is (to the power of value)
|
||||
var/CurveSharppH = 2 // How sharp the pH exponential curve is (to the power of value)
|
||||
var/ThermicConstant = 1 // Temperature change per 1u produced
|
||||
var/HIonRelease = 0.1 // pH change per 1u reaction
|
||||
var/RateUpLim = 10 // Optimal/max rate possible if all conditions are perfect
|
||||
var/FermiChem = FALSE // If the chemical uses the Fermichem reaction mechanics//If the chemical uses the Fermichem reaction mechanics
|
||||
var/FermiExplode = FALSE // If the chemical explodes in a special way
|
||||
var/PurityMin = 0.15 //If purity is below 0.15, it explodes too. Set to 0 to disable this.
|
||||
|
||||
|
||||
/datum/chemical_reaction/proc/on_reaction(datum/reagents/holder, created_volume, specialreact)
|
||||
return
|
||||
//I recommend you set the result amount to the total volume of all components.
|
||||
|
||||
/datum/chemical_reaction/proc/check_special_react(datum/reagents/holder)
|
||||
return
|
||||
|
||||
/datum/chemical_reaction/proc/chemical_mob_spawn(datum/reagents/holder, amount_to_spawn, reaction_name, mob_class = HOSTILE_SPAWN, mob_faction = "chemicalsummon")
|
||||
if(holder && holder.my_atom)
|
||||
var/atom/A = holder.my_atom
|
||||
var/turf/T = get_turf(A)
|
||||
var/message = "A [reaction_name] reaction has occurred in [ADMIN_VERBOSEJMP(T)]"
|
||||
message += " (<A HREF='?_src_=vars;Vars=[REF(A)]'>VV</A>)"
|
||||
|
||||
var/mob/M = get(A, /mob)
|
||||
if(M)
|
||||
message += " - Carried By: [ADMIN_LOOKUPFLW(M)]"
|
||||
else
|
||||
message += " - Last Fingerprint: [(A.fingerprintslast ? A.fingerprintslast : "N/A")]"
|
||||
|
||||
message_admins(message, 0, 1)
|
||||
log_game("[reaction_name] chemical mob spawn reaction occuring at [AREACOORD(T)] carried by [key_name(M)] with last fingerprint [A.fingerprintslast? A.fingerprintslast : "N/A"]")
|
||||
|
||||
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
|
||||
|
||||
for(var/mob/living/carbon/C in viewers(get_turf(holder.my_atom), null))
|
||||
C.flash_act()
|
||||
|
||||
for(var/i in 1 to amount_to_spawn)
|
||||
var/mob/living/simple_animal/S = create_random_mob(get_turf(holder.my_atom), mob_class)
|
||||
S.faction |= mob_faction
|
||||
if(prob(50))
|
||||
for(var/j = 1, j <= rand(1, 3), j++)
|
||||
step(S, pick(NORTH,SOUTH,EAST,WEST))
|
||||
|
||||
/datum/chemical_reaction/proc/goonchem_vortex(turf/T, setting_type, range)
|
||||
for(var/atom/movable/X in orange(range, T))
|
||||
if(iseffect(X))
|
||||
continue
|
||||
if(!X.anchored)
|
||||
var/distance = get_dist(X, T)
|
||||
var/moving_power = max(range - distance, 1)
|
||||
if(moving_power > 2) //if the vortex is powerful and we're close, we get thrown
|
||||
if(setting_type)
|
||||
var/atom/throw_target = get_edge_target_turf(X, get_dir(X, get_step_away(X, T)))
|
||||
X.throw_at(throw_target, moving_power, 1)
|
||||
else
|
||||
X.throw_at(T, moving_power, 1)
|
||||
else
|
||||
spawn(0) //so everything moves at the same time.
|
||||
if(setting_type)
|
||||
for(var/i = 0, i < moving_power, i++)
|
||||
sleep(2)
|
||||
if(!step_away(X, T))
|
||||
break
|
||||
else
|
||||
for(var/i = 0, i < moving_power, i++)
|
||||
sleep(2)
|
||||
if(!step_towards(X, T))
|
||||
break
|
||||
@@ -0,0 +1,64 @@
|
||||
/datum/chemical_reaction/space_drugs
|
||||
name = "Space Drugs"
|
||||
id = "space_drugs"
|
||||
results = list("space_drugs" = 3)
|
||||
required_reagents = list("mercury" = 1, "sugar" = 1, "lithium" = 1)
|
||||
|
||||
/datum/chemical_reaction/crank
|
||||
name = "Crank"
|
||||
id = "crank"
|
||||
results = list("crank" = 5)
|
||||
required_reagents = list("diphenhydramine" = 1, "ammonia" = 1, "lithium" = 1, "sacid" = 1, "welding_fuel" = 1)
|
||||
mix_message = "The mixture violently reacts, leaving behind a few crystalline shards."
|
||||
required_temp = 390
|
||||
|
||||
|
||||
/datum/chemical_reaction/krokodil
|
||||
name = "Krokodil"
|
||||
id = "krokodil"
|
||||
results = list("krokodil" = 6)
|
||||
required_reagents = list("diphenhydramine" = 1, "morphine" = 1, "cleaner" = 1, "potassium" = 1, "phosphorus" = 1, "welding_fuel" = 1)
|
||||
mix_message = "The mixture dries into a pale blue powder."
|
||||
required_temp = 380
|
||||
|
||||
/datum/chemical_reaction/methamphetamine
|
||||
name = "methamphetamine"
|
||||
id = "methamphetamine"
|
||||
results = list("methamphetamine" = 4)
|
||||
required_reagents = list("ephedrine" = 1, "iodine" = 1, "phosphorus" = 1, "hydrogen" = 1)
|
||||
required_temp = 374
|
||||
|
||||
/datum/chemical_reaction/bath_salts
|
||||
name = "bath_salts"
|
||||
id = "bath_salts"
|
||||
results = list("bath_salts" = 7)
|
||||
required_reagents = list("bad_food" = 1, "saltpetre" = 1, "nutriment" = 1, "cleaner" = 1, "enzyme" = 1, "tea" = 1, "mercury" = 1)
|
||||
required_temp = 374
|
||||
|
||||
/datum/chemical_reaction/aranesp
|
||||
name = "aranesp"
|
||||
id = "aranesp"
|
||||
results = list("aranesp" = 3)
|
||||
required_reagents = list("epinephrine" = 1, "atropine" = 1, "morphine" = 1)
|
||||
|
||||
/datum/chemical_reaction/happiness
|
||||
name = "Happiness"
|
||||
id = "happiness"
|
||||
results = list("happiness" = 4)
|
||||
required_reagents = list("nitrous_oxide" = 2, "epinephrine" = 1, "ethanol" = 1)
|
||||
required_catalysts = list("plasma" = 5)
|
||||
|
||||
/datum/chemical_reaction/skooma
|
||||
name = "skooma"
|
||||
id = "skooma"
|
||||
results = list("skooma" = 2, "moonshine" = 4, "sugar" = 4)
|
||||
required_temp = 280
|
||||
is_cold_recipe = TRUE
|
||||
required_reagents = list("moonsugar" = 10, "morphine" = 5)
|
||||
|
||||
/datum/chemical_reaction/skoomarevert
|
||||
name = "skoomarevert"
|
||||
id = "skoomarevert"
|
||||
results = list("moonsugar" = 1, "morphine" = 2.5)
|
||||
required_temp = 315 //a little above normal body temperature
|
||||
required_reagents = list("skooma" = 1)
|
||||
@@ -0,0 +1,272 @@
|
||||
|
||||
/datum/chemical_reaction/leporazine
|
||||
name = "Leporazine"
|
||||
id = "leporazine"
|
||||
results = list("leporazine" = 2)
|
||||
required_reagents = list("silicon" = 1, "copper" = 1)
|
||||
required_catalysts = list("plasma" = 5)
|
||||
|
||||
/datum/chemical_reaction/rezadone
|
||||
name = "Rezadone"
|
||||
id = "rezadone"
|
||||
results = list("rezadone" = 3)
|
||||
required_reagents = list("carpotoxin" = 1, "cryptobiolin" = 1, "copper" = 1)
|
||||
|
||||
/datum/chemical_reaction/spaceacillin
|
||||
name = "Spaceacillin"
|
||||
id = "spaceacillin"
|
||||
results = list("spaceacillin" = 2)
|
||||
required_reagents = list("cryptobiolin" = 1, "epinephrine" = 1)
|
||||
|
||||
/datum/chemical_reaction/inacusiate
|
||||
name = "inacusiate"
|
||||
id = "inacusiate"
|
||||
results = list("inacusiate" = 2)
|
||||
required_reagents = list("water" = 1, "carbon" = 1, "charcoal" = 1)
|
||||
|
||||
/datum/chemical_reaction/synaptizine
|
||||
name = "Synaptizine"
|
||||
id = "synaptizine"
|
||||
results = list("synaptizine" = 3)
|
||||
required_reagents = list("sugar" = 1, "lithium" = 1, "water" = 1)
|
||||
|
||||
/datum/chemical_reaction/charcoal
|
||||
name = "Charcoal"
|
||||
id = "charcoal"
|
||||
results = list("charcoal" = 2)
|
||||
required_reagents = list("ash" = 1, "sodiumchloride" = 1)
|
||||
mix_message = "The mixture yields a fine black powder."
|
||||
required_temp = 380
|
||||
|
||||
/datum/chemical_reaction/silver_sulfadiazine
|
||||
name = "Silver Sulfadiazine"
|
||||
id = "silver_sulfadiazine"
|
||||
results = list("silver_sulfadiazine" = 5)
|
||||
required_reagents = list("ammonia" = 1, "silver" = 1, "sulfur" = 1, "oxygen" = 1, "chlorine" = 1)
|
||||
|
||||
/datum/chemical_reaction/salglu_solution
|
||||
name = "Saline-Glucose Solution"
|
||||
id = "salglu_solution"
|
||||
results = list("salglu_solution" = 3)
|
||||
required_reagents = list("sodiumchloride" = 1, "water" = 1, "sugar" = 1)
|
||||
|
||||
/datum/chemical_reaction/mine_salve
|
||||
name = "Miner's Salve"
|
||||
id = "mine_salve"
|
||||
results = list("mine_salve" = 3)
|
||||
required_reagents = list("oil" = 1, "water" = 1, "iron" = 1)
|
||||
|
||||
/datum/chemical_reaction/mine_salve2
|
||||
name = "Miner's Salve"
|
||||
id = "mine_salve"
|
||||
results = list("mine_salve" = 15)
|
||||
required_reagents = list("plasma" = 5, "iron" = 5, "sugar" = 1) // A sheet of plasma, a twinkie and a sheet of metal makes four of these
|
||||
|
||||
/datum/chemical_reaction/synthflesh
|
||||
name = "Synthflesh"
|
||||
id = "synthflesh"
|
||||
results = list("synthflesh" = 3)
|
||||
required_reagents = list("blood" = 1, "carbon" = 1, "styptic_powder" = 1)
|
||||
|
||||
/datum/chemical_reaction/styptic_powder
|
||||
name = "Styptic Powder"
|
||||
id = "styptic_powder"
|
||||
results = list("styptic_powder" = 4)
|
||||
required_reagents = list("aluminium" = 1, "hydrogen" = 1, "oxygen" = 1, "sacid" = 1)
|
||||
mix_message = "The solution yields an astringent powder."
|
||||
|
||||
/datum/chemical_reaction/calomel
|
||||
name = "Calomel"
|
||||
id = "calomel"
|
||||
results = list("calomel" = 2)
|
||||
required_reagents = list("mercury" = 1, "chlorine" = 1)
|
||||
required_temp = 374
|
||||
|
||||
/datum/chemical_reaction/potass_iodide
|
||||
name = "Potassium Iodide"
|
||||
id = "potass_iodide"
|
||||
results = list("potass_iodide" = 2)
|
||||
required_reagents = list("potassium" = 1, "iodine" = 1)
|
||||
|
||||
/datum/chemical_reaction/pen_acid
|
||||
name = "Pentetic Acid"
|
||||
id = "pen_acid"
|
||||
results = list("pen_acid" = 6)
|
||||
required_reagents = list("welding_fuel" = 1, "chlorine" = 1, "ammonia" = 1, "formaldehyde" = 1, "sodium" = 1, "cyanide" = 1)
|
||||
|
||||
/datum/chemical_reaction/pen_jelly
|
||||
name = "Pentetic Jelly"
|
||||
id = "pen_jelly"
|
||||
results = list("pen_jelly" = 2)
|
||||
required_reagents = list("pen_acid" = 1, "slimejelly" = 1)
|
||||
|
||||
/datum/chemical_reaction/sal_acid
|
||||
name = "Salicyclic Acid"
|
||||
id = "sal_acid"
|
||||
results = list("sal_acid" = 5)
|
||||
required_reagents = list("sodium" = 1, "phenol" = 1, "carbon" = 1, "oxygen" = 1, "sacid" = 1)
|
||||
|
||||
/datum/chemical_reaction/oxandrolone
|
||||
name = "Oxandrolone"
|
||||
id = "oxandrolone"
|
||||
results = list("oxandrolone" = 6)
|
||||
required_reagents = list("carbon" = 3, "phenol" = 1, "hydrogen" = 1, "oxygen" = 1)
|
||||
|
||||
/datum/chemical_reaction/salbutamol
|
||||
name = "Salbutamol"
|
||||
id = "salbutamol"
|
||||
results = list("salbutamol" = 5)
|
||||
required_reagents = list("sal_acid" = 1, "lithium" = 1, "aluminium" = 1, "bromine" = 1, "ammonia" = 1)
|
||||
|
||||
/datum/chemical_reaction/perfluorodecalin
|
||||
name = "Perfluorodecalin"
|
||||
id = "perfluorodecalin"
|
||||
results = list("perfluorodecalin" = 3)
|
||||
required_reagents = list("hydrogen" = 1, "fluorine" = 1, "oil" = 1)
|
||||
required_temp = 370
|
||||
mix_message = "The mixture rapidly turns into a dense pink liquid."
|
||||
|
||||
/datum/chemical_reaction/ephedrine
|
||||
name = "Ephedrine"
|
||||
id = "ephedrine"
|
||||
results = list("ephedrine" = 4)
|
||||
required_reagents = list("sugar" = 1, "oil" = 1, "hydrogen" = 1, "diethylamine" = 1)
|
||||
mix_message = "The solution fizzes and gives off toxic fumes."
|
||||
|
||||
/datum/chemical_reaction/diphenhydramine
|
||||
name = "Diphenhydramine"
|
||||
id = "diphenhydramine"
|
||||
results = list("diphenhydramine" = 4)
|
||||
required_reagents = list("oil" = 1, "carbon" = 1, "bromine" = 1, "diethylamine" = 1, "ethanol" = 1)
|
||||
mix_message = "The mixture dries into a pale blue powder."
|
||||
|
||||
/datum/chemical_reaction/oculine
|
||||
name = "Oculine"
|
||||
id = "oculine"
|
||||
results = list("oculine" = 3)
|
||||
required_reagents = list("charcoal" = 1, "carbon" = 1, "hydrogen" = 1)
|
||||
mix_message = "The mixture sputters loudly and becomes a pale pink color."
|
||||
|
||||
/datum/chemical_reaction/atropine
|
||||
name = "Atropine"
|
||||
id = "atropine"
|
||||
results = list("atropine" = 5)
|
||||
required_reagents = list("ethanol" = 1, "acetone" = 1, "diethylamine" = 1, "phenol" = 1, "sacid" = 1)
|
||||
|
||||
/datum/chemical_reaction/epinephrine
|
||||
name = "Epinephrine"
|
||||
id = "epinephrine"
|
||||
results = list("epinephrine" = 6)
|
||||
required_reagents = list("phenol" = 1, "acetone" = 1, "diethylamine" = 1, "oxygen" = 1, "chlorine" = 1, "hydrogen" = 1)
|
||||
|
||||
/datum/chemical_reaction/strange_reagent
|
||||
name = "Strange Reagent"
|
||||
id = "strange_reagent"
|
||||
results = list("strange_reagent" = 3)
|
||||
required_reagents = list("omnizine" = 1, "holywater" = 1, "mutagen" = 1)
|
||||
|
||||
/datum/chemical_reaction/mannitol
|
||||
name = "Mannitol"
|
||||
id = "mannitol"
|
||||
results = list("mannitol" = 3)
|
||||
required_reagents = list("sugar" = 1, "hydrogen" = 1, "water" = 1)
|
||||
mix_message = "The solution slightly bubbles, becoming thicker."
|
||||
|
||||
/datum/chemical_reaction/mutadone
|
||||
name = "Mutadone"
|
||||
id = "mutadone"
|
||||
results = list("mutadone" = 3)
|
||||
required_reagents = list("mutagen" = 1, "acetone" = 1, "bromine" = 1)
|
||||
|
||||
/datum/chemical_reaction/neurine
|
||||
name = "Neurine"
|
||||
id = "neurine"
|
||||
results = list("neurine" = 3)
|
||||
required_reagents = list("mannitol" = 1, "acetone" = 1, "oxygen" = 1)
|
||||
|
||||
/datum/chemical_reaction/antihol
|
||||
name = "antihol"
|
||||
id = "antihol"
|
||||
results = list("antihol" = 3)
|
||||
required_reagents = list("ethanol" = 1, "charcoal" = 1, "copper" = 1)
|
||||
|
||||
/datum/chemical_reaction/cryoxadone
|
||||
name = "Cryoxadone"
|
||||
id = "cryoxadone"
|
||||
results = list("cryoxadone" = 3)
|
||||
required_reagents = list("stable_plasma" = 1, "acetone" = 1, "mutagen" = 1)
|
||||
|
||||
/datum/chemical_reaction/pyroxadone
|
||||
name = "Pyroxadone"
|
||||
id = "pyroxadone"
|
||||
results = list("pyroxadone" = 2)
|
||||
required_reagents = list("cryoxadone" = 1, "slimejelly" = 1)
|
||||
|
||||
/datum/chemical_reaction/clonexadone
|
||||
name = "Clonexadone"
|
||||
id = "clonexadone"
|
||||
results = list("clonexadone" = 2)
|
||||
required_reagents = list("cryoxadone" = 1, "sodium" = 1)
|
||||
required_catalysts = list("plasma" = 5)
|
||||
|
||||
/datum/chemical_reaction/haloperidol
|
||||
name = "Haloperidol"
|
||||
id = "haloperidol"
|
||||
results = list("haloperidol" = 5)
|
||||
required_reagents = list("chlorine" = 1, "fluorine" = 1, "aluminium" = 1, "potass_iodide" = 1, "oil" = 1)
|
||||
|
||||
/datum/chemical_reaction/bicaridine
|
||||
name = "Bicaridine"
|
||||
id = "bicaridine"
|
||||
results = list("bicaridine" = 3)
|
||||
required_reagents = list("carbon" = 1, "oxygen" = 1, "sugar" = 1)
|
||||
|
||||
/datum/chemical_reaction/kelotane
|
||||
name = "Kelotane"
|
||||
id = "kelotane"
|
||||
results = list("kelotane" = 2)
|
||||
required_reagents = list("carbon" = 1, "silicon" = 1)
|
||||
|
||||
/datum/chemical_reaction/antitoxin
|
||||
name = "Antitoxin"
|
||||
id = "antitoxin"
|
||||
results = list("antitoxin" = 3)
|
||||
required_reagents = list("nitrogen" = 1, "silicon" = 1, "potassium" = 1)
|
||||
|
||||
/datum/chemical_reaction/tricordrazine
|
||||
name = "Tricordrazine"
|
||||
id = "tricordrazine"
|
||||
results = list("tricordrazine" = 3)
|
||||
required_reagents = list("bicaridine" = 1, "kelotane" = 1, "antitoxin" = 1)
|
||||
|
||||
/datum/chemical_reaction/regen_jelly
|
||||
name = "Regenerative Jelly"
|
||||
id = "regen_jelly"
|
||||
results = list("regen_jelly" = 2)
|
||||
required_reagents = list("tricordrazine" = 1, "slimejelly" = 1)
|
||||
|
||||
/datum/chemical_reaction/corazone
|
||||
name = "Corazone"
|
||||
id = "corazone"
|
||||
results = list("corazone" = 3)
|
||||
required_reagents = list("phenol" = 2, "lithium" = 1)
|
||||
|
||||
/datum/chemical_reaction/morphine
|
||||
name = "Morphine"
|
||||
id = "morphine"
|
||||
results = list("morphine" = 2)
|
||||
required_reagents = list("carbon" = 2, "hydrogen" = 2, "ethanol" = 1, "oxygen" = 1)
|
||||
required_temp = 480
|
||||
|
||||
/datum/chemical_reaction/modafinil
|
||||
name = "Modafinil"
|
||||
id = "modafinil"
|
||||
results = list("modafinil" = 5)
|
||||
required_reagents = list("diethylamine" = 1, "ammonia" = 1, "phenol" = 1, "acetone" = 1, "sacid" = 1)
|
||||
required_catalysts = list("bromine" = 1) // as close to the real world synthesis as possible
|
||||
|
||||
/datum/chemical_reaction/psicodine
|
||||
name = "Psicodine"
|
||||
id = "psicodine"
|
||||
results = list("psicodine" = 5)
|
||||
required_reagents = list( "mannitol" = 2, "water" = 2, "impedrezene" = 1)
|
||||
@@ -0,0 +1,637 @@
|
||||
|
||||
/datum/chemical_reaction/sterilizine
|
||||
name = "Sterilizine"
|
||||
id = "sterilizine"
|
||||
results = list("sterilizine" = 3)
|
||||
required_reagents = list("ethanol" = 1, "charcoal" = 1, "chlorine" = 1)
|
||||
|
||||
/datum/chemical_reaction/lube
|
||||
name = "Space Lube"
|
||||
id = "lube"
|
||||
results = list("lube" = 4)
|
||||
required_reagents = list("water" = 1, "silicon" = 1, "oxygen" = 1)
|
||||
|
||||
/datum/chemical_reaction/spraytan
|
||||
name = "Spray Tan"
|
||||
id = "spraytan"
|
||||
results = list("spraytan" = 2)
|
||||
required_reagents = list("orangejuice" = 1, "oil" = 1)
|
||||
|
||||
/datum/chemical_reaction/spraytan2
|
||||
name = "Spray Tan"
|
||||
id = "spraytan"
|
||||
results = list("spraytan" = 2)
|
||||
required_reagents = list("orangejuice" = 1, "cornoil" = 1)
|
||||
|
||||
/datum/chemical_reaction/impedrezene
|
||||
name = "Impedrezene"
|
||||
id = "impedrezene"
|
||||
results = list("impedrezene" = 2)
|
||||
required_reagents = list("mercury" = 1, "oxygen" = 1, "sugar" = 1)
|
||||
|
||||
/datum/chemical_reaction/cryptobiolin
|
||||
name = "Cryptobiolin"
|
||||
id = "cryptobiolin"
|
||||
results = list("cryptobiolin" = 3)
|
||||
required_reagents = list("potassium" = 1, "oxygen" = 1, "sugar" = 1)
|
||||
|
||||
/datum/chemical_reaction/glycerol
|
||||
name = "Glycerol"
|
||||
id = "glycerol"
|
||||
results = list("glycerol" = 1)
|
||||
required_reagents = list("cornoil" = 3, "sacid" = 1)
|
||||
|
||||
/datum/chemical_reaction/sodiumchloride
|
||||
name = "Sodium Chloride"
|
||||
id = "sodiumchloride"
|
||||
results = list("sodiumchloride" = 3)
|
||||
required_reagents = list("water" = 1, "sodium" = 1, "chlorine" = 1)
|
||||
|
||||
/datum/chemical_reaction/plasmasolidification
|
||||
name = "Solid Plasma"
|
||||
id = "solidplasma"
|
||||
required_reagents = list("iron" = 5, "frostoil" = 5, "plasma" = 20)
|
||||
mob_react = FALSE
|
||||
|
||||
/datum/chemical_reaction/plasmasolidification/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
for(var/i = 1, i <= created_volume, i++)
|
||||
new /obj/item/stack/sheet/mineral/plasma(location)
|
||||
|
||||
/datum/chemical_reaction/goldsolidification
|
||||
name = "Solid Gold"
|
||||
id = "solidgold"
|
||||
required_reagents = list("frostoil" = 5, "gold" = 20, "iron" = 1)
|
||||
mob_react = FALSE
|
||||
|
||||
/datum/chemical_reaction/goldsolidification/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
for(var/i = 1, i <= created_volume, i++)
|
||||
new /obj/item/stack/sheet/mineral/gold(location)
|
||||
|
||||
/datum/chemical_reaction/capsaicincondensation
|
||||
name = "Capsaicincondensation"
|
||||
id = "capsaicincondensation"
|
||||
results = list("condensedcapsaicin" = 5)
|
||||
required_reagents = list("capsaicin" = 1, "ethanol" = 5)
|
||||
|
||||
/datum/chemical_reaction/soapification
|
||||
name = "Soapification"
|
||||
id = "soapification"
|
||||
required_reagents = list("liquidgibs" = 10, "lye" = 10) // requires two scooped gib tiles
|
||||
required_temp = 374
|
||||
mob_react = FALSE
|
||||
|
||||
/datum/chemical_reaction/soapification/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
for(var/i = 1, i <= created_volume, i++)
|
||||
new /obj/item/soap/homemade(location)
|
||||
|
||||
/datum/chemical_reaction/candlefication
|
||||
name = "Candlefication"
|
||||
id = "candlefication"
|
||||
required_reagents = list("liquidgibs" = 5, "oxygen" = 5) //
|
||||
required_temp = 374
|
||||
mob_react = FALSE
|
||||
|
||||
/datum/chemical_reaction/candlefication/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
for(var/i = 1, i <= created_volume, i++)
|
||||
new /obj/item/candle(location)
|
||||
|
||||
/datum/chemical_reaction/meatification
|
||||
name = "Meatification"
|
||||
id = "meatification"
|
||||
required_reagents = list("liquidgibs" = 10, "nutriment" = 10, "carbon" = 10)
|
||||
mob_react = FALSE
|
||||
|
||||
/datum/chemical_reaction/meatification/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
for(var/i = 1, i <= created_volume, i++)
|
||||
new /obj/item/reagent_containers/food/snacks/meat/slab/meatproduct(location)
|
||||
return
|
||||
|
||||
/datum/chemical_reaction/carbondioxide
|
||||
name = "Direct Carbon Oxidation"
|
||||
id = "burningcarbon"
|
||||
results = list("co2" = 3)
|
||||
required_reagents = list("carbon" = 1, "oxygen" = 2)
|
||||
required_temp = 777 // pure carbon isn't especially reactive.
|
||||
|
||||
/datum/chemical_reaction/nitrous_oxide
|
||||
name = "Nitrous Oxide"
|
||||
id = "nitrous_oxide"
|
||||
results = list("nitrous_oxide" = 5)
|
||||
required_reagents = list("ammonia" = 2, "nitrogen" = 1, "oxygen" = 2)
|
||||
required_temp = 525
|
||||
|
||||
//Technically a mutation toxin
|
||||
/datum/chemical_reaction/mulligan
|
||||
name = "Mulligan"
|
||||
id = "mulligan"
|
||||
results = list("mulligan" = 1)
|
||||
required_reagents = list("slime_toxin" = 1, "mutagen" = 1)
|
||||
|
||||
|
||||
/datum/chemical_reaction/fermis_plush
|
||||
name = "Fermis plush"
|
||||
id = "fermis_plush"
|
||||
required_reagents = list("sugar" = 10, "blood" = 10, "stable_plasma" = 10)
|
||||
mob_react = FALSE
|
||||
required_temp = 400
|
||||
|
||||
/datum/chemical_reaction/fermis_plush/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
for(var/i = 1, i <= created_volume, i+=10)
|
||||
new /obj/item/toy/plush/catgirl/fermis(location)
|
||||
|
||||
////////////////////////////////// VIROLOGY //////////////////////////////////////////
|
||||
|
||||
/datum/chemical_reaction/virus_food
|
||||
name = "Virus Food"
|
||||
id = "virusfood"
|
||||
results = list("virusfood" = 15)
|
||||
required_reagents = list("water" = 5, "milk" = 5)
|
||||
|
||||
/datum/chemical_reaction/virus_food_mutagen
|
||||
name = "mutagenic agar"
|
||||
id = "mutagenvirusfood"
|
||||
results = list("mutagenvirusfood" = 1)
|
||||
required_reagents = list("mutagen" = 1, "virusfood" = 1)
|
||||
|
||||
/datum/chemical_reaction/virus_food_synaptizine
|
||||
name = "virus rations"
|
||||
id = "synaptizinevirusfood"
|
||||
results = list("synaptizinevirusfood" = 1)
|
||||
required_reagents = list("synaptizine" = 1, "virusfood" = 1)
|
||||
|
||||
/datum/chemical_reaction/virus_food_plasma
|
||||
name = "virus plasma"
|
||||
id = "plasmavirusfood"
|
||||
results = list("plasmavirusfood" = 1)
|
||||
required_reagents = list("plasma" = 1, "virusfood" = 1)
|
||||
|
||||
/datum/chemical_reaction/virus_food_plasma_synaptizine
|
||||
name = "weakened virus plasma"
|
||||
id = "weakplasmavirusfood"
|
||||
results = list("weakplasmavirusfood" = 2)
|
||||
required_reagents = list("synaptizine" = 1, "plasmavirusfood" = 1)
|
||||
|
||||
/datum/chemical_reaction/virus_food_mutagen_sugar
|
||||
name = "sucrose agar"
|
||||
id = "sugarvirusfood"
|
||||
results = list("sugarvirusfood" = 2)
|
||||
required_reagents = list("sugar" = 1, "mutagenvirusfood" = 1)
|
||||
|
||||
/datum/chemical_reaction/virus_food_mutagen_salineglucose
|
||||
name = "sucrose agar"
|
||||
id = "salineglucosevirusfood"
|
||||
results = list("sugarvirusfood" = 2)
|
||||
required_reagents = list("salglu_solution" = 1, "mutagenvirusfood" = 1)
|
||||
|
||||
/datum/chemical_reaction/virus_food_uranium
|
||||
name = "Decaying uranium gel"
|
||||
id = "uraniumvirusfood"
|
||||
results = list("uraniumvirusfood" = 1)
|
||||
required_reagents = list("uranium" = 1, "virusfood" = 1)
|
||||
|
||||
/datum/chemical_reaction/virus_food_uranium_plasma
|
||||
name = "Unstable uranium gel"
|
||||
id = "uraniumvirusfood_plasma"
|
||||
results = list("uraniumplasmavirusfood_unstable" = 1)
|
||||
required_reagents = list("uranium" = 5, "plasmavirusfood" = 1)
|
||||
|
||||
/datum/chemical_reaction/virus_food_uranium_plasma_gold
|
||||
name = "Stable uranium gel"
|
||||
id = "uraniumvirusfood_gold"
|
||||
results = list("uraniumplasmavirusfood_stable" = 1)
|
||||
required_reagents = list("uranium" = 10, "gold" = 10, "plasma" = 1)
|
||||
|
||||
/datum/chemical_reaction/virus_food_uranium_plasma_silver
|
||||
name = "Stable uranium gel"
|
||||
id = "uraniumvirusfood_silver"
|
||||
results = list("uraniumplasmavirusfood_stable" = 1)
|
||||
required_reagents = list("uranium" = 10, "silver" = 10, "plasma" = 1)
|
||||
|
||||
/datum/chemical_reaction/mix_virus
|
||||
name = "Mix Virus"
|
||||
id = "mixvirus"
|
||||
results = list("blood" = 1)
|
||||
required_reagents = list("virusfood" = 1)
|
||||
required_catalysts = list("blood" = 1)
|
||||
var/level_min = 1
|
||||
var/level_max = 2
|
||||
|
||||
/datum/chemical_reaction/mix_virus/on_reaction(datum/reagents/holder, created_volume)
|
||||
|
||||
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"]
|
||||
if(D)
|
||||
D.Evolve(level_min, level_max)
|
||||
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_2
|
||||
|
||||
name = "Mix Virus 2"
|
||||
id = "mixvirus2"
|
||||
required_reagents = list("mutagen" = 1)
|
||||
level_min = 2
|
||||
level_max = 4
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_3
|
||||
|
||||
name = "Mix Virus 3"
|
||||
id = "mixvirus3"
|
||||
required_reagents = list("plasma" = 1)
|
||||
level_min = 4
|
||||
level_max = 6
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_4
|
||||
|
||||
name = "Mix Virus 4"
|
||||
id = "mixvirus4"
|
||||
required_reagents = list("uranium" = 1)
|
||||
level_min = 5
|
||||
level_max = 6
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_5
|
||||
|
||||
name = "Mix Virus 5"
|
||||
id = "mixvirus5"
|
||||
required_reagents = list("mutagenvirusfood" = 1)
|
||||
level_min = 3
|
||||
level_max = 3
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_6
|
||||
|
||||
name = "Mix Virus 6"
|
||||
id = "mixvirus6"
|
||||
required_reagents = list("sugarvirusfood" = 1)
|
||||
level_min = 4
|
||||
level_max = 4
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_7
|
||||
|
||||
name = "Mix Virus 7"
|
||||
id = "mixvirus7"
|
||||
required_reagents = list("weakplasmavirusfood" = 1)
|
||||
level_min = 5
|
||||
level_max = 5
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_8
|
||||
|
||||
name = "Mix Virus 8"
|
||||
id = "mixvirus8"
|
||||
required_reagents = list("plasmavirusfood" = 1)
|
||||
level_min = 6
|
||||
level_max = 6
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_9
|
||||
|
||||
name = "Mix Virus 9"
|
||||
id = "mixvirus9"
|
||||
required_reagents = list("synaptizinevirusfood" = 1)
|
||||
level_min = 1
|
||||
level_max = 1
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_10
|
||||
|
||||
name = "Mix Virus 10"
|
||||
id = "mixvirus10"
|
||||
required_reagents = list("uraniumvirusfood" = 1)
|
||||
level_min = 6
|
||||
level_max = 7
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_11
|
||||
|
||||
name = "Mix Virus 11"
|
||||
id = "mixvirus11"
|
||||
required_reagents = list("uraniumplasmavirusfood_unstable" = 1)
|
||||
level_min = 7
|
||||
level_max = 7
|
||||
|
||||
/datum/chemical_reaction/mix_virus/mix_virus_12
|
||||
|
||||
name = "Mix Virus 12"
|
||||
id = "mixvirus12"
|
||||
required_reagents = list("uraniumplasmavirusfood_stable" = 1)
|
||||
level_min = 8
|
||||
level_max = 8
|
||||
|
||||
/datum/chemical_reaction/mix_virus/rem_virus
|
||||
|
||||
name = "Devolve Virus"
|
||||
id = "remvirus"
|
||||
required_reagents = list("synaptizine" = 1)
|
||||
required_catalysts = list("blood" = 1)
|
||||
|
||||
/datum/chemical_reaction/mix_virus/rem_virus/on_reaction(datum/reagents/holder, created_volume)
|
||||
|
||||
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"]
|
||||
if(D)
|
||||
D.Devolve()
|
||||
|
||||
/datum/chemical_reaction/mix_virus/neuter_virus
|
||||
name = "Neuter Virus"
|
||||
id = "neutervirus"
|
||||
required_reagents = list("formaldehyde" = 1)
|
||||
required_catalysts = list("blood" = 1)
|
||||
|
||||
/datum/chemical_reaction/mix_virus/neuter_virus/on_reaction(datum/reagents/holder, created_volume)
|
||||
|
||||
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"]
|
||||
if(D)
|
||||
D.Neuter()
|
||||
|
||||
|
||||
|
||||
////////////////////////////////// foam and foam precursor ///////////////////////////////////////////////////
|
||||
|
||||
|
||||
/datum/chemical_reaction/surfactant
|
||||
name = "Foam surfactant"
|
||||
id = "foam surfactant"
|
||||
results = list("fluorosurfactant" = 5)
|
||||
required_reagents = list("fluorine" = 2, "carbon" = 2, "sacid" = 1)
|
||||
|
||||
/datum/chemical_reaction/foam
|
||||
name = "Foam"
|
||||
id = "foam"
|
||||
required_reagents = list("fluorosurfactant" = 1, "water" = 1)
|
||||
mob_react = FALSE
|
||||
|
||||
/datum/chemical_reaction/foam/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
for(var/mob/M in viewers(5, location))
|
||||
to_chat(M, "<span class='danger'>The solution spews out foam!</span>")
|
||||
var/datum/effect_system/foam_spread/s = new()
|
||||
s.set_up(created_volume*2, location, holder)
|
||||
s.start()
|
||||
holder.clear_reagents()
|
||||
return
|
||||
|
||||
|
||||
/datum/chemical_reaction/metalfoam
|
||||
name = "Metal Foam"
|
||||
id = "metalfoam"
|
||||
required_reagents = list("aluminium" = 3, "foaming_agent" = 1, "facid" = 1)
|
||||
mob_react = FALSE
|
||||
|
||||
/datum/chemical_reaction/metalfoam/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
|
||||
for(var/mob/M in viewers(5, location))
|
||||
to_chat(M, "<span class='danger'>The solution spews out a metallic foam!</span>")
|
||||
|
||||
var/datum/effect_system/foam_spread/metal/s = new()
|
||||
s.set_up(created_volume*5, location, holder, 1)
|
||||
s.start()
|
||||
holder.clear_reagents()
|
||||
|
||||
/datum/chemical_reaction/smart_foam
|
||||
name = "Smart Metal Foam"
|
||||
id = "smart_metal_foam"
|
||||
required_reagents = list("aluminium" = 3, "smart_foaming_agent" = 1, "facid" = 1)
|
||||
mob_react = TRUE
|
||||
|
||||
/datum/chemical_reaction/smart_foam/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/turf/location = get_turf(holder.my_atom)
|
||||
location.visible_message("<span class='danger'>The solution spews out metallic foam!</span>")
|
||||
var/datum/effect_system/foam_spread/metal/smart/s = new()
|
||||
s.set_up(created_volume * 5, location, holder, TRUE)
|
||||
s.start()
|
||||
holder.clear_reagents()
|
||||
|
||||
/datum/chemical_reaction/ironfoam
|
||||
name = "Iron Foam"
|
||||
id = "ironlfoam"
|
||||
required_reagents = list("iron" = 3, "foaming_agent" = 1, "facid" = 1)
|
||||
mob_react = FALSE
|
||||
|
||||
/datum/chemical_reaction/ironfoam/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
for(var/mob/M in viewers(5, location))
|
||||
to_chat(M, "<span class='danger'>The solution spews out a metallic foam!</span>")
|
||||
var/datum/effect_system/foam_spread/metal/s = new()
|
||||
s.set_up(created_volume*5, location, holder, 2)
|
||||
s.start()
|
||||
holder.clear_reagents()
|
||||
|
||||
/datum/chemical_reaction/foaming_agent
|
||||
name = "Foaming Agent"
|
||||
id = "foaming_agent"
|
||||
results = list("foaming_agent" = 1)
|
||||
required_reagents = list("lithium" = 1, "hydrogen" = 1)
|
||||
|
||||
/datum/chemical_reaction/smart_foaming_agent
|
||||
name = "Smart foaming Agent"
|
||||
id = "smart_foaming_agent"
|
||||
results = list("smart_foaming_agent" = 3)
|
||||
required_reagents = list("foaming_agent" = 3, "acetone" = 1, "iron" = 1)
|
||||
mix_message = "The solution mixes into a frothy metal foam and conforms to the walls of its container."
|
||||
|
||||
|
||||
/////////////////////////////// Cleaning and hydroponics /////////////////////////////////////////////////
|
||||
|
||||
/datum/chemical_reaction/ammonia
|
||||
name = "Ammonia"
|
||||
id = "ammonia"
|
||||
results = list("ammonia" = 3)
|
||||
required_reagents = list("hydrogen" = 3, "nitrogen" = 1)
|
||||
|
||||
/datum/chemical_reaction/diethylamine
|
||||
name = "Diethylamine"
|
||||
id = "diethylamine"
|
||||
results = list("diethylamine" = 2)
|
||||
required_reagents = list ("ammonia" = 1, "ethanol" = 1)
|
||||
|
||||
/datum/chemical_reaction/space_cleaner
|
||||
name = "Space cleaner"
|
||||
id = "cleaner"
|
||||
results = list("cleaner" = 2)
|
||||
required_reagents = list("ammonia" = 1, "water" = 1)
|
||||
|
||||
/datum/chemical_reaction/plantbgone
|
||||
name = "Plant-B-Gone"
|
||||
id = "plantbgone"
|
||||
results = list("plantbgone" = 5)
|
||||
required_reagents = list("toxin" = 1, "water" = 4)
|
||||
|
||||
/datum/chemical_reaction/weedkiller
|
||||
name = "Weed Killer"
|
||||
id = "weedkiller"
|
||||
results = list("weedkiller" = 5)
|
||||
required_reagents = list("toxin" = 1, "ammonia" = 4)
|
||||
|
||||
/datum/chemical_reaction/pestkiller
|
||||
name = "Pest Killer"
|
||||
id = "pestkiller"
|
||||
results = list("pestkiller" = 5)
|
||||
required_reagents = list("toxin" = 1, "ethanol" = 4)
|
||||
|
||||
/datum/chemical_reaction/drying_agent
|
||||
name = "Drying agent"
|
||||
id = "drying_agent"
|
||||
results = list("drying_agent" = 3)
|
||||
required_reagents = list("stable_plasma" = 2, "ethanol" = 1, "sodium" = 1)
|
||||
|
||||
//////////////////////////////////// Other goon stuff ///////////////////////////////////////////
|
||||
|
||||
/datum/chemical_reaction/acetone
|
||||
name = "acetone"
|
||||
id = "acetone"
|
||||
results = list("acetone" = 3)
|
||||
required_reagents = list("oil" = 1, "welding_fuel" = 1, "oxygen" = 1)
|
||||
|
||||
/datum/chemical_reaction/carpet
|
||||
name = "carpet"
|
||||
id = "carpet"
|
||||
results = list("carpet" = 2)
|
||||
required_reagents = list("space_drugs" = 1, "blood" = 1)
|
||||
|
||||
/datum/chemical_reaction/oil
|
||||
name = "Oil"
|
||||
id = "oil"
|
||||
results = list("oil" = 3)
|
||||
required_reagents = list("welding_fuel" = 1, "carbon" = 1, "hydrogen" = 1)
|
||||
|
||||
/datum/chemical_reaction/phenol
|
||||
name = "phenol"
|
||||
id = "phenol"
|
||||
results = list("phenol" = 3)
|
||||
required_reagents = list("water" = 1, "chlorine" = 1, "oil" = 1)
|
||||
|
||||
/datum/chemical_reaction/ash
|
||||
name = "Ash"
|
||||
id = "ash"
|
||||
results = list("ash" = 1)
|
||||
required_reagents = list("oil" = 1)
|
||||
required_temp = 480
|
||||
|
||||
/datum/chemical_reaction/colorful_reagent
|
||||
name = "colorful_reagent"
|
||||
id = "colorful_reagent"
|
||||
results = list("colorful_reagent" = 5)
|
||||
required_reagents = list("stable_plasma" = 1, "radium" = 1, "space_drugs" = 1, "cryoxadone" = 1, "triple_citrus" = 1)
|
||||
|
||||
/datum/chemical_reaction/life
|
||||
name = "Life"
|
||||
id = "life"
|
||||
required_reagents = list("strange_reagent" = 1, "synthflesh" = 1, "blood" = 1)
|
||||
required_temp = 374
|
||||
|
||||
/datum/chemical_reaction/life/on_reaction(datum/reagents/holder, created_volume)
|
||||
chemical_mob_spawn(holder, rand(1, round(created_volume, 1)), "Life") // Lol.
|
||||
|
||||
//This is missing, I'm adding it back (see tgwiki). Not sure why we don't have it.
|
||||
/datum/chemical_reaction/life_friendly
|
||||
name = "Life (Friendly)"
|
||||
id = "life_friendly"
|
||||
required_reagents = list("strange_reagent" = 1, "synthflesh" = 1, "sugar" = 1)
|
||||
required_temp = 374
|
||||
|
||||
/datum/chemical_reaction/life_friendly/on_reaction(datum/reagents/holder, created_volume)
|
||||
chemical_mob_spawn(holder, rand(1, round(created_volume, 1)), "Life (friendly)", FRIENDLY_SPAWN) //Pray for cute cats
|
||||
|
||||
/datum/chemical_reaction/corgium
|
||||
name = "corgium"
|
||||
id = "corgium"
|
||||
required_reagents = list("nutriment" = 1, "colorful_reagent" = 1, "strange_reagent" = 1, "blood" = 1)
|
||||
required_temp = 374
|
||||
|
||||
/datum/chemical_reaction/corgium/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
for(var/i = rand(1, created_volume), i <= created_volume, i++) // More lulz.
|
||||
new /mob/living/simple_animal/pet/dog/corgi(location)
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/hair_dye
|
||||
name = "hair_dye"
|
||||
id = "hair_dye"
|
||||
results = list("hair_dye" = 5)
|
||||
required_reagents = list("colorful_reagent" = 1, "radium" = 1, "space_drugs" = 1)
|
||||
|
||||
/datum/chemical_reaction/barbers_aid
|
||||
name = "barbers_aid"
|
||||
id = "barbers_aid"
|
||||
results = list("barbers_aid" = 5)
|
||||
required_reagents = list("carpet" = 1, "radium" = 1, "space_drugs" = 1)
|
||||
|
||||
/datum/chemical_reaction/concentrated_barbers_aid
|
||||
name = "concentrated_barbers_aid"
|
||||
id = "concentrated_barbers_aid"
|
||||
results = list("concentrated_barbers_aid" = 2)
|
||||
required_reagents = list("barbers_aid" = 1, "mutagen" = 1)
|
||||
|
||||
/datum/chemical_reaction/saltpetre
|
||||
name = "saltpetre"
|
||||
id = "saltpetre"
|
||||
results = list("saltpetre" = 3)
|
||||
required_reagents = list("potassium" = 1, "nitrogen" = 1, "oxygen" = 3)
|
||||
|
||||
/datum/chemical_reaction/lye
|
||||
name = "lye"
|
||||
id = "lye"
|
||||
results = list("lye" = 3)
|
||||
required_reagents = list("sodium" = 1, "hydrogen" = 1, "oxygen" = 1)
|
||||
|
||||
/datum/chemical_reaction/lye2
|
||||
name = "lye"
|
||||
id = "lye"
|
||||
results = list("lye" = 2)
|
||||
required_reagents = list("ash" = 1, "water" = 1, "carbon" = 1)
|
||||
|
||||
/datum/chemical_reaction/royal_bee_jelly
|
||||
name = "royal bee jelly"
|
||||
id = "royal_bee_jelly"
|
||||
results = list("royal_bee_jelly" = 5)
|
||||
required_reagents = list("mutagen" = 10, "honey" = 40)
|
||||
|
||||
/datum/chemical_reaction/laughter
|
||||
name = "laughter"
|
||||
id = "laughter"
|
||||
results = list("laughter" = 10) // Fuck it. I'm not touching this one.
|
||||
required_reagents = list("sugar" = 1, "banana" = 1)
|
||||
|
||||
/datum/chemical_reaction/plastic_polymers
|
||||
name = "plastic polymers"
|
||||
id = "plastic_polymers"
|
||||
required_reagents = list("oil" = 5, "sacid" = 2, "ash" = 3)
|
||||
required_temp = 374 //lazily consistent with soap & other crafted objects generically created with heat.
|
||||
|
||||
/datum/chemical_reaction/plastic_polymers/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
for(var/i in 1 to created_volume)
|
||||
new /obj/item/stack/sheet/plastic(location)
|
||||
|
||||
/datum/chemical_reaction/pax
|
||||
name = "pax"
|
||||
id = "pax"
|
||||
results = list("pax" = 3)
|
||||
required_reagents = list("mindbreaker" = 1, "synaptizine" = 1, "water" = 1)
|
||||
|
||||
/datum/chemical_reaction/cat
|
||||
name = "felined mutation toxic"
|
||||
id = "cats"
|
||||
results = list("felinidmutationtoxin" = 1)
|
||||
required_reagents = list("mindbreaker" = 1, "ammonia" = 1, "water" = 1, "aphro" = 10, "stablemutationtoxin" = 1) // Maybe aphro+ if it becomes a shitty meme
|
||||
required_temp = 450
|
||||
|
||||
/datum/chemical_reaction/moff
|
||||
name = "moth mutation toxic"
|
||||
id = "moffs"
|
||||
results = list("mothmutationtoxin" = 1)
|
||||
required_reagents = list("liquid_dark_matter" = 2, "ammonia" = 5, "lithium" = 1, "stablemutationtoxin" = 1)
|
||||
required_temp = 320
|
||||
|
||||
/datum/chemical_reaction/notlight //Harder to make do to it being a hard race to play
|
||||
name = "shadow muatatuin toxic"
|
||||
id = "notlight"
|
||||
results = list("shadowmutationtoxin" = 1)
|
||||
required_reagents = list("liquid_dark_matter" = 5, "synaptizine" = 10, "oculine" = 10, "stablemutationtoxin" = 1)
|
||||
required_temp = 600
|
||||
@@ -0,0 +1,498 @@
|
||||
/datum/chemical_reaction/reagent_explosion
|
||||
name = "Generic explosive"
|
||||
id = "reagent_explosion"
|
||||
var/strengthdiv = 10
|
||||
var/modifier = 0
|
||||
var/noexplosion = FALSE
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/on_reaction(datum/reagents/holder, created_volume, turf/override)
|
||||
if(!noexplosion)
|
||||
var/turf/T = override || get_turf(holder.my_atom)
|
||||
var/inside_msg
|
||||
if(ismob(holder.my_atom))
|
||||
var/mob/M = holder.my_atom
|
||||
inside_msg = " inside [ADMIN_LOOKUPFLW(M)]"
|
||||
var/lastkey = holder.my_atom.fingerprintslast
|
||||
var/touch_msg = "N/A"
|
||||
if(lastkey)
|
||||
var/mob/toucher = get_mob_by_key(lastkey)
|
||||
touch_msg = "[ADMIN_LOOKUPFLW(toucher)]"
|
||||
message_admins("Reagent explosion reaction occurred at [ADMIN_VERBOSEJMP(T)][inside_msg]. Last Fingerprint: [touch_msg].")
|
||||
log_game("Reagent explosion reaction occurred at [AREACOORD(T)]. Last Fingerprint: [lastkey ? lastkey : "N/A"]." )
|
||||
var/datum/effect_system/reagents_explosion/e = new()
|
||||
e.set_up(modifier + round(created_volume/strengthdiv, 1), T, 0, 0)
|
||||
e.start()
|
||||
holder.clear_reagents()
|
||||
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/nitroglycerin
|
||||
name = "Nitroglycerin"
|
||||
id = "nitroglycerin"
|
||||
results = list("nitroglycerin" = 2)
|
||||
required_reagents = list("glycerol" = 1, "facid" = 1, "sacid" = 1)
|
||||
strengthdiv = 2
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/nitroglycerin/on_reaction(datum/reagents/holder, created_volume)
|
||||
if(holder.has_reagent("stabilizing_agent"))
|
||||
return
|
||||
holder.remove_reagent("nitroglycerin", created_volume*2)
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/nitroglycerin_explosion
|
||||
name = "Nitroglycerin explosion"
|
||||
id = "nitroglycerin_explosion"
|
||||
required_reagents = list("nitroglycerin" = 1)
|
||||
required_temp = 474
|
||||
strengthdiv = 2
|
||||
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/potassium_explosion
|
||||
name = "Explosion"
|
||||
id = "potassium_explosion"
|
||||
required_reagents = list("water" = 1, "potassium" = 1)
|
||||
strengthdiv = 10
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/potassium_explosion/holyboom
|
||||
name = "Holy Explosion"
|
||||
id = "holyboom"
|
||||
required_reagents = list("holywater" = 1, "potassium" = 1)
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/potassium_explosion/holyboom/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
if(created_volume >= 150)
|
||||
playsound(get_turf(holder.my_atom), 'sound/effects/pray.ogg', 80, 0, round(created_volume/48))
|
||||
strengthdiv = 8
|
||||
for(var/mob/living/simple_animal/revenant/R in get_hearers_in_view(7,get_turf(holder.my_atom)))
|
||||
var/deity
|
||||
if(GLOB.deity)
|
||||
deity = GLOB.deity
|
||||
else
|
||||
deity = "Christ"
|
||||
to_chat(R, "<span class='userdanger'>The power of [deity] compels you!</span>")
|
||||
R.stun(20)
|
||||
R.reveal(100)
|
||||
R.adjustHealth(50)
|
||||
sleep(20)
|
||||
for(var/mob/living/carbon/C in get_hearers_in_view(round(created_volume/48,1),get_turf(holder.my_atom)))
|
||||
if(iscultist(C))
|
||||
to_chat(C, "<span class='userdanger'>The divine explosion sears you!</span>")
|
||||
C.Knockdown(40)
|
||||
C.adjust_fire_stacks(5)
|
||||
C.IgniteMob()
|
||||
..(holder, created_volume, T)
|
||||
|
||||
|
||||
/datum/chemical_reaction/blackpowder
|
||||
name = "Black Powder"
|
||||
id = "blackpowder"
|
||||
results = list("blackpowder" = 3)
|
||||
required_reagents = list("saltpetre" = 1, "charcoal" = 1, "sulfur" = 1)
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/blackpowder_explosion
|
||||
name = "Black Powder Kaboom"
|
||||
id = "blackpowder_explosion"
|
||||
required_reagents = list("blackpowder" = 1)
|
||||
required_temp = 474
|
||||
strengthdiv = 6
|
||||
modifier = 1
|
||||
mix_message = "<span class='boldannounce'>Sparks start flying around the black powder!</span>"
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/blackpowder_explosion/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
sleep(rand(50,100))
|
||||
..(holder, created_volume, T)
|
||||
|
||||
/datum/chemical_reaction/thermite
|
||||
name = "Thermite"
|
||||
id = "thermite"
|
||||
results = list("thermite" = 3)
|
||||
required_reagents = list("aluminium" = 1, "iron" = 1, "oxygen" = 1)
|
||||
|
||||
/datum/chemical_reaction/emp_pulse
|
||||
name = "EMP Pulse"
|
||||
id = "emp_pulse"
|
||||
required_reagents = list("uranium" = 1, "iron" = 1) // Yes, laugh, it's the best recipe I could think of that makes a little bit of sense
|
||||
|
||||
/datum/chemical_reaction/emp_pulse/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
// 100 created volume = 4 heavy range & 7 light range. A few tiles smaller than traitor EMP grandes.
|
||||
// 200 created volume = 8 heavy range & 14 light range. 4 tiles larger than traitor EMP grenades.
|
||||
empulse(location, round(created_volume / 12), round(created_volume / 7), 1)
|
||||
holder.clear_reagents()
|
||||
|
||||
|
||||
/datum/chemical_reaction/beesplosion
|
||||
name = "Bee Explosion"
|
||||
id = "beesplosion"
|
||||
required_reagents = list("honey" = 1, "strange_reagent" = 1, "radium" = 1)
|
||||
|
||||
/datum/chemical_reaction/beesplosion/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = holder.my_atom.drop_location()
|
||||
if(created_volume < 5)
|
||||
playsound(location,'sound/effects/sparks1.ogg', 100, TRUE)
|
||||
else
|
||||
playsound(location,'sound/creatures/bee.ogg', 100, TRUE)
|
||||
var/list/beeagents = list()
|
||||
for(var/X in holder.reagent_list)
|
||||
var/datum/reagent/R = X
|
||||
if(required_reagents[R.id])
|
||||
continue
|
||||
beeagents += R
|
||||
var/bee_amount = round(created_volume * 0.2)
|
||||
for(var/i in 1 to bee_amount)
|
||||
var/mob/living/simple_animal/hostile/poison/bees/short/new_bee = new(location)
|
||||
if(LAZYLEN(beeagents))
|
||||
new_bee.assign_reagent(pick(beeagents))
|
||||
|
||||
|
||||
/datum/chemical_reaction/stabilizing_agent
|
||||
name = "stabilizing_agent"
|
||||
id = "stabilizing_agent"
|
||||
results = list("stabilizing_agent" = 3)
|
||||
required_reagents = list("iron" = 1, "oxygen" = 1, "hydrogen" = 1)
|
||||
|
||||
/datum/chemical_reaction/clf3
|
||||
name = "Chlorine Trifluoride"
|
||||
id = "clf3"
|
||||
results = list("clf3" = 4)
|
||||
required_reagents = list("chlorine" = 1, "fluorine" = 3)
|
||||
required_temp = 424
|
||||
|
||||
/datum/chemical_reaction/clf3/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
for(var/turf/turf in range(1,T))
|
||||
new /obj/effect/hotspot(turf)
|
||||
holder.chem_temp = 1000 // hot as shit
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/methsplosion
|
||||
name = "Meth explosion"
|
||||
id = "methboom1"
|
||||
required_temp = 380 //slightly above the meth mix time.
|
||||
required_reagents = list("methamphetamine" = 1)
|
||||
strengthdiv = 6
|
||||
modifier = 1
|
||||
mob_react = FALSE
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/methsplosion/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
for(var/turf/turf in range(1,T))
|
||||
new /obj/effect/hotspot(turf)
|
||||
holder.chem_temp = 1000 // hot as shit
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/methsplosion/methboom2
|
||||
id = "methboom2"
|
||||
required_reagents = list("diethylamine" = 1, "iodine" = 1, "phosphorus" = 1, "hydrogen" = 1) //diethylamine is often left over from mixing the ephedrine.
|
||||
required_temp = 300 //room temperature, chilling it even a little will prevent the explosion
|
||||
|
||||
/datum/chemical_reaction/sorium
|
||||
name = "Sorium"
|
||||
id = "sorium"
|
||||
results = list("sorium" = 4)
|
||||
required_reagents = list("mercury" = 1, "oxygen" = 1, "nitrogen" = 1, "carbon" = 1)
|
||||
|
||||
/datum/chemical_reaction/sorium/on_reaction(datum/reagents/holder, created_volume)
|
||||
if(holder.has_reagent("stabilizing_agent"))
|
||||
return
|
||||
holder.remove_reagent("sorium", created_volume*4)
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
var/range = CLAMP(sqrt(created_volume*4), 1, 6)
|
||||
goonchem_vortex(T, 1, range)
|
||||
|
||||
/datum/chemical_reaction/sorium_vortex
|
||||
name = "sorium_vortex"
|
||||
id = "sorium_vortex"
|
||||
required_reagents = list("sorium" = 1)
|
||||
required_temp = 474
|
||||
|
||||
/datum/chemical_reaction/sorium_vortex/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
var/range = CLAMP(sqrt(created_volume), 1, 6)
|
||||
goonchem_vortex(T, 1, range)
|
||||
|
||||
/datum/chemical_reaction/liquid_dark_matter
|
||||
name = "Liquid Dark Matter"
|
||||
id = "liquid_dark_matter"
|
||||
results = list("liquid_dark_matter" = 3)
|
||||
required_reagents = list("stable_plasma" = 1, "radium" = 1, "carbon" = 1)
|
||||
|
||||
/datum/chemical_reaction/liquid_dark_matter/on_reaction(datum/reagents/holder, created_volume)
|
||||
if(holder.has_reagent("stabilizing_agent"))
|
||||
return
|
||||
holder.remove_reagent("liquid_dark_matter", created_volume*3)
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
var/range = CLAMP(sqrt(created_volume*3), 1, 6)
|
||||
goonchem_vortex(T, 0, range)
|
||||
|
||||
/datum/chemical_reaction/ldm_vortex
|
||||
name = "LDM Vortex"
|
||||
id = "ldm_vortex"
|
||||
required_reagents = list("liquid_dark_matter" = 1)
|
||||
required_temp = 474
|
||||
|
||||
/datum/chemical_reaction/ldm_vortex/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
var/range = CLAMP(sqrt(created_volume/2), 1, 6)
|
||||
goonchem_vortex(T, 0, range)
|
||||
|
||||
/datum/chemical_reaction/flash_powder
|
||||
name = "Flash powder"
|
||||
id = "flash_powder"
|
||||
results = list("flash_powder" = 3)
|
||||
required_reagents = list("aluminium" = 1, "potassium" = 1, "sulfur" = 1 )
|
||||
|
||||
/datum/chemical_reaction/flash_powder/on_reaction(datum/reagents/holder, created_volume)
|
||||
if(holder.has_reagent("stabilizing_agent"))
|
||||
return
|
||||
var/location = get_turf(holder.my_atom)
|
||||
do_sparks(2, TRUE, location)
|
||||
var/range = created_volume/3
|
||||
if(isatom(holder.my_atom))
|
||||
var/atom/A = holder.my_atom
|
||||
A.flash_lighting_fx(_range = (range + 2), _reset_lighting = FALSE)
|
||||
for(var/mob/living/carbon/C in get_hearers_in_view(range, location))
|
||||
if(C.flash_act())
|
||||
if(get_dist(C, location) < 4)
|
||||
C.Knockdown(60)
|
||||
else
|
||||
C.Stun(100)
|
||||
holder.remove_reagent("flash_powder", created_volume*3)
|
||||
|
||||
/datum/chemical_reaction/flash_powder_flash
|
||||
name = "Flash powder activation"
|
||||
id = "flash_powder_flash"
|
||||
required_reagents = list("flash_powder" = 1)
|
||||
required_temp = 374
|
||||
|
||||
/datum/chemical_reaction/flash_powder_flash/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
do_sparks(2, TRUE, location)
|
||||
var/range = created_volume/10
|
||||
if(isatom(holder.my_atom))
|
||||
var/atom/A = holder.my_atom
|
||||
A.flash_lighting_fx(_range = (range + 2), _reset_lighting = FALSE)
|
||||
for(var/mob/living/carbon/C in get_hearers_in_view(range, location))
|
||||
if(C.flash_act())
|
||||
if(get_dist(C, location) < 4)
|
||||
C.Knockdown(60)
|
||||
else
|
||||
C.Stun(100)
|
||||
|
||||
/datum/chemical_reaction/smoke_powder
|
||||
name = "smoke_powder"
|
||||
id = "smoke_powder"
|
||||
results = list("smoke_powder" = 3)
|
||||
required_reagents = list("potassium" = 1, "sugar" = 1, "phosphorus" = 1)
|
||||
|
||||
/datum/chemical_reaction/smoke_powder/on_reaction(datum/reagents/holder, created_volume)
|
||||
if(holder.has_reagent("stabilizing_agent"))
|
||||
return
|
||||
holder.remove_reagent("smoke_powder", created_volume*3)
|
||||
var/smoke_radius = round(sqrt(created_volume * 1.5), 1)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
var/datum/effect_system/smoke_spread/chem/S = new
|
||||
S.attach(location)
|
||||
playsound(location, 'sound/effects/smoke.ogg', 50, 1, -3)
|
||||
if(S)
|
||||
S.set_up(holder, smoke_radius, location, 0)
|
||||
S.start()
|
||||
if(holder && holder.my_atom)
|
||||
holder.clear_reagents()
|
||||
|
||||
/datum/chemical_reaction/smoke_powder_smoke
|
||||
name = "smoke_powder_smoke"
|
||||
id = "smoke_powder_smoke"
|
||||
required_reagents = list("smoke_powder" = 1)
|
||||
required_temp = 374
|
||||
mob_react = FALSE
|
||||
|
||||
/datum/chemical_reaction/smoke_powder_smoke/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
var/smoke_radius = round(sqrt(created_volume / 2), 1)
|
||||
var/datum/effect_system/smoke_spread/chem/S = new
|
||||
S.attach(location)
|
||||
playsound(location, 'sound/effects/smoke.ogg', 50, 1, -3)
|
||||
if(S)
|
||||
S.set_up(holder, smoke_radius, location, 0)
|
||||
S.start()
|
||||
if(holder && holder.my_atom)
|
||||
holder.clear_reagents()
|
||||
|
||||
/datum/chemical_reaction/sonic_powder
|
||||
name = "sonic_powder"
|
||||
id = "sonic_powder"
|
||||
results = list("sonic_powder" = 3)
|
||||
required_reagents = list("oxygen" = 1, "cola" = 1, "phosphorus" = 1)
|
||||
|
||||
/datum/chemical_reaction/sonic_powder/on_reaction(datum/reagents/holder, created_volume)
|
||||
if(holder.has_reagent("stabilizing_agent"))
|
||||
return
|
||||
holder.remove_reagent("sonic_powder", created_volume*3)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
playsound(location, 'sound/effects/bang.ogg', 25, 1)
|
||||
for(var/mob/living/carbon/C in get_hearers_in_view(created_volume/3, location))
|
||||
C.soundbang_act(1, 100, rand(0, 5))
|
||||
|
||||
/datum/chemical_reaction/sonic_powder_deafen
|
||||
name = "sonic_powder_deafen"
|
||||
id = "sonic_powder_deafen"
|
||||
required_reagents = list("sonic_powder" = 1)
|
||||
required_temp = 374
|
||||
|
||||
/datum/chemical_reaction/sonic_powder_deafen/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
playsound(location, 'sound/effects/bang.ogg', 25, 1)
|
||||
for(var/mob/living/carbon/C in get_hearers_in_view(created_volume/10, location))
|
||||
C.soundbang_act(1, 100, rand(0, 5))
|
||||
|
||||
/datum/chemical_reaction/phlogiston
|
||||
name = "phlogiston"
|
||||
id = "phlogiston"
|
||||
results = list("phlogiston" = 3)
|
||||
required_reagents = list("phosphorus" = 1, "sacid" = 1, "stable_plasma" = 1)
|
||||
|
||||
/datum/chemical_reaction/phlogiston/on_reaction(datum/reagents/holder, created_volume)
|
||||
if(holder.has_reagent("stabilizing_agent"))
|
||||
return
|
||||
var/turf/open/T = get_turf(holder.my_atom)
|
||||
if(istype(T))
|
||||
T.atmos_spawn_air("plasma=[created_volume];TEMP=1000")
|
||||
holder.clear_reagents()
|
||||
return
|
||||
|
||||
/datum/chemical_reaction/napalm
|
||||
name = "Napalm"
|
||||
id = "napalm"
|
||||
results = list("napalm" = 3)
|
||||
required_reagents = list("oil" = 1, "welding_fuel" = 1, "ethanol" = 1 )
|
||||
|
||||
/datum/chemical_reaction/cryostylane
|
||||
name = "cryostylane"
|
||||
id = "cryostylane"
|
||||
results = list("cryostylane" = 3)
|
||||
required_reagents = list("water" = 1, "stable_plasma" = 1, "nitrogen" = 1)
|
||||
|
||||
/datum/chemical_reaction/cryostylane/on_reaction(datum/reagents/holder, created_volume)
|
||||
holder.chem_temp = 20 // cools the fuck down
|
||||
return
|
||||
|
||||
/datum/chemical_reaction/cryostylane_oxygen
|
||||
name = "ephemeral cryostylane reaction"
|
||||
id = "cryostylane_oxygen"
|
||||
results = list("cryostylane" = 1)
|
||||
required_reagents = list("cryostylane" = 1, "oxygen" = 1)
|
||||
mob_react = FALSE
|
||||
|
||||
/datum/chemical_reaction/cryostylane_oxygen/on_reaction(datum/reagents/holder, created_volume)
|
||||
holder.chem_temp = max(holder.chem_temp - 10*created_volume,0)
|
||||
|
||||
/datum/chemical_reaction/pyrosium_oxygen
|
||||
name = "ephemeral pyrosium reaction"
|
||||
id = "pyrosium_oxygen"
|
||||
results = list("pyrosium" = 1)
|
||||
required_reagents = list("pyrosium" = 1, "oxygen" = 1)
|
||||
mob_react = FALSE
|
||||
|
||||
/datum/chemical_reaction/pyrosium_oxygen/on_reaction(datum/reagents/holder, created_volume)
|
||||
holder.chem_temp += 10*created_volume
|
||||
|
||||
/datum/chemical_reaction/pyrosium
|
||||
name = "pyrosium"
|
||||
id = "pyrosium"
|
||||
results = list("pyrosium" = 3)
|
||||
required_reagents = list("stable_plasma" = 1, "radium" = 1, "phosphorus" = 1)
|
||||
|
||||
/datum/chemical_reaction/pyrosium/on_reaction(datum/reagents/holder, created_volume)
|
||||
holder.chem_temp = 20 // also cools the fuck down
|
||||
return
|
||||
|
||||
/datum/chemical_reaction/teslium
|
||||
name = "Teslium"
|
||||
id = "teslium"
|
||||
results = list("teslium" = 3)
|
||||
required_reagents = list("stable_plasma" = 1, "silver" = 1, "blackpowder" = 1)
|
||||
mix_message = "<span class='danger'>A jet of sparks flies from the mixture as it merges into a flickering slurry.</span>"
|
||||
required_temp = 400
|
||||
|
||||
/datum/chemical_reaction/energized_jelly
|
||||
name = "Energized Jelly"
|
||||
id = "energized_jelly"
|
||||
results = list("energized_jelly" = 2)
|
||||
required_reagents = list("slimejelly" = 1, "teslium" = 1)
|
||||
mix_message = "<span class='danger'>The slime jelly starts glowing intermittently.</span>"
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/teslium_lightning
|
||||
name = "Teslium Destabilization"
|
||||
id = "teslium_lightning"
|
||||
required_reagents = list("teslium" = 1, "water" = 1)
|
||||
strengthdiv = 100
|
||||
modifier = -100
|
||||
noexplosion = TRUE
|
||||
mix_message = "<span class='boldannounce'>The teslium starts to spark as electricity arcs away from it!</span>"
|
||||
mix_sound = 'sound/machines/defib_zap.ogg'
|
||||
var/tesla_flags = TESLA_MOB_DAMAGE | TESLA_OBJ_DAMAGE | TESLA_MOB_STUN
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/teslium_lightning/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/T1 = created_volume * 20 //100 units : Zap 3 times, with powers 2000/5000/12000. Tesla revolvers have a power of 10000 for comparison.
|
||||
var/T2 = created_volume * 50
|
||||
var/T3 = created_volume * 120
|
||||
sleep(5)
|
||||
if(created_volume >= 75)
|
||||
tesla_zap(holder.my_atom, 7, T1, tesla_flags)
|
||||
playsound(holder.my_atom, 'sound/machines/defib_zap.ogg', 50, 1)
|
||||
sleep(15)
|
||||
if(created_volume >= 40)
|
||||
tesla_zap(holder.my_atom, 7, T2, tesla_flags)
|
||||
playsound(holder.my_atom, 'sound/machines/defib_zap.ogg', 50, 1)
|
||||
sleep(15)
|
||||
if(created_volume >= 10) //10 units minimum for lightning, 40 units for secondary blast, 75 units for tertiary blast.
|
||||
tesla_zap(holder.my_atom, 7, T3, tesla_flags)
|
||||
playsound(holder.my_atom, 'sound/machines/defib_zap.ogg', 50, 1)
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/teslium_lightning/heat
|
||||
id = "teslium_lightning2"
|
||||
required_temp = 474
|
||||
required_reagents = list("teslium" = 1)
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/nitrous_oxide
|
||||
name = "N2O explosion"
|
||||
id = "n2o_explosion"
|
||||
required_reagents = list("nitrous_oxide" = 1)
|
||||
strengthdiv = 7
|
||||
required_temp = 575
|
||||
modifier = 1
|
||||
|
||||
/datum/chemical_reaction/firefighting_foam
|
||||
name = "Firefighting Foam"
|
||||
id = "firefighting_foam"
|
||||
results = list("firefighting_foam" = 3)
|
||||
required_reagents = list("stabilizing_agent" = 1,"fluorosurfactant" = 1,"carbon" = 1)
|
||||
required_temp = 200
|
||||
is_cold_recipe = 1
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/lingblood
|
||||
name = "Changeling Blood Reaction"
|
||||
id = "ling_blood_reaction"
|
||||
results = list("ash" = 1)
|
||||
required_reagents = list("blood" = 1)
|
||||
strengthdiv = 4 //The explosion should be somewhat strong if a full 15u is heated within a syringe. !!fun!!
|
||||
required_temp = 666
|
||||
special_react = TRUE
|
||||
mix_sound = 'sound/effects/lingbloodhiss.ogg'
|
||||
mix_message = "The blood bubbles and sizzles violently!"
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/lingblood/check_special_react(datum/reagents/holder)
|
||||
if(!holder)
|
||||
return FALSE
|
||||
var/list/D = holder.get_data("blood")
|
||||
if(D && D["changeling_loudness"])
|
||||
return (D["changeling_loudness"] >= 4 ? D["changeling_loudness"] : FALSE)
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/datum/chemical_reaction/reagent_explosion/lingblood/on_reaction(datum/reagents/holder, created_volume, specialreact)
|
||||
if(specialreact >= 10)
|
||||
return ..()
|
||||
else
|
||||
return FALSE
|
||||
@@ -0,0 +1,678 @@
|
||||
|
||||
/datum/chemical_reaction/slime
|
||||
var/deletes_extract = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/on_reaction(datum/reagents/holder)
|
||||
SSblackbox.record_feedback("tally", "slime_cores_used", 1, "type")
|
||||
if(deletes_extract)
|
||||
delete_extract(holder)
|
||||
|
||||
/datum/chemical_reaction/slime/proc/delete_extract(datum/reagents/holder)
|
||||
var/obj/item/slime_extract/M = holder.my_atom
|
||||
if(M.Uses <= 0 && !results.len) //if the slime doesn't output chemicals
|
||||
qdel(M)
|
||||
|
||||
//Grey
|
||||
/datum/chemical_reaction/slime/slimespawn
|
||||
name = "Slime Spawn"
|
||||
id = "m_spawn"
|
||||
required_reagents = list("plasma" = 1)
|
||||
required_container = /obj/item/slime_extract/grey
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimespawn/on_reaction(datum/reagents/holder)
|
||||
var/mob/living/simple_animal/slime/S = new(get_turf(holder.my_atom), "grey")
|
||||
S.visible_message("<span class='danger'>Infused with plasma, the core begins to quiver and grow, and a new baby slime emerges from it!</span>")
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/slime/slimeinaprov
|
||||
name = "Slime epinephrine"
|
||||
id = "m_inaprov"
|
||||
results = list("epinephrine" = 3)
|
||||
required_reagents = list("water" = 5)
|
||||
required_other = TRUE
|
||||
required_container = /obj/item/slime_extract/grey
|
||||
|
||||
/datum/chemical_reaction/slime/slimemonkey
|
||||
name = "Slime Monkey"
|
||||
id = "m_monkey"
|
||||
required_reagents = list("blood" = 1)
|
||||
required_container = /obj/item/slime_extract/grey
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimemonkey/on_reaction(datum/reagents/holder)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/reagent_containers/food/snacks/monkeycube(get_turf(holder.my_atom))
|
||||
..()
|
||||
|
||||
//Green
|
||||
/datum/chemical_reaction/slime/slimemutate
|
||||
name = "Mutation Toxin"
|
||||
id = "slimetoxin"
|
||||
results = list("slime_toxin" = 1)
|
||||
required_reagents = list("plasma" = 1)
|
||||
required_other = TRUE
|
||||
required_container = /obj/item/slime_extract/green
|
||||
|
||||
/datum/chemical_reaction/slime/slimehuman
|
||||
name = "Human Mutation Toxin"
|
||||
id = "humanmuttoxin"
|
||||
results = list("stablemutationtoxin" = 1)
|
||||
required_reagents = list("blood" = 1)
|
||||
required_other = TRUE
|
||||
required_container = /obj/item/slime_extract/green
|
||||
|
||||
/datum/chemical_reaction/slime/slimelizard
|
||||
name = "Lizard Mutation Toxin"
|
||||
id = "lizardmuttoxin"
|
||||
results = list("lizardmutationtoxin" = 1)
|
||||
required_reagents = list("radium" = 1)
|
||||
required_other = TRUE
|
||||
required_container = /obj/item/slime_extract/green
|
||||
|
||||
//Metal
|
||||
/datum/chemical_reaction/slime/slimemetal
|
||||
name = "Slime Metal"
|
||||
id = "m_metal"
|
||||
required_reagents = list("plasma" = 1)
|
||||
required_container = /obj/item/slime_extract/metal
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimemetal/on_reaction(datum/reagents/holder)
|
||||
var/turf/location = get_turf(holder.my_atom)
|
||||
new /obj/item/stack/sheet/plasteel(location, 5)
|
||||
new /obj/item/stack/sheet/metal(location, 15)
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/slime/slimeglass
|
||||
name = "Slime Glass"
|
||||
id = "m_glass"
|
||||
required_reagents = list("water" = 1)
|
||||
required_container = /obj/item/slime_extract/metal
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimeglass/on_reaction(datum/reagents/holder)
|
||||
var/turf/location = get_turf(holder.my_atom)
|
||||
new /obj/item/stack/sheet/rglass(location, 5)
|
||||
new /obj/item/stack/sheet/glass(location, 15)
|
||||
..()
|
||||
|
||||
//Gold
|
||||
/datum/chemical_reaction/slime/slimemobspawn
|
||||
name = "Slime Crit"
|
||||
id = "m_tele"
|
||||
required_reagents = list("plasma" = 1)
|
||||
required_container = /obj/item/slime_extract/gold
|
||||
required_other = TRUE
|
||||
deletes_extract = FALSE //we do delete, but we don't do so instantly
|
||||
|
||||
/datum/chemical_reaction/slime/slimemobspawn/on_reaction(datum/reagents/holder)
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
summon_mobs(holder, T)
|
||||
var/obj/item/slime_extract/M = holder.my_atom
|
||||
deltimer(M.qdel_timer)
|
||||
..()
|
||||
M.qdel_timer = addtimer(CALLBACK(src, .proc/delete_extract, holder), 55, TIMER_STOPPABLE)
|
||||
|
||||
/datum/chemical_reaction/slime/slimemobspawn/proc/summon_mobs(datum/reagents/holder, turf/T)
|
||||
T.visible_message("<span class='danger'>The slime extract begins to vibrate violently!</span>")
|
||||
addtimer(CALLBACK(src, .proc/chemical_mob_spawn, holder, 5, "Gold Slime", HOSTILE_SPAWN), 50)
|
||||
|
||||
/datum/chemical_reaction/slime/slimemobspawn/lesser
|
||||
name = "Slime Crit Lesser"
|
||||
id = "m_tele3"
|
||||
required_reagents = list("blood" = 1)
|
||||
|
||||
/datum/chemical_reaction/slime/slimemobspawn/lesser/summon_mobs(datum/reagents/holder, turf/T)
|
||||
T.visible_message("<span class='danger'>The slime extract begins to vibrate violently!</span>")
|
||||
addtimer(CALLBACK(src, .proc/chemical_mob_spawn, holder, 3, "Lesser Gold Slime", HOSTILE_SPAWN, "neutral"), 50)
|
||||
|
||||
/datum/chemical_reaction/slime/slimemobspawn/friendly
|
||||
name = "Slime Crit Friendly"
|
||||
id = "m_tele5"
|
||||
required_reagents = list("water" = 1)
|
||||
|
||||
/datum/chemical_reaction/slime/slimemobspawn/friendly/summon_mobs(datum/reagents/holder, turf/T)
|
||||
T.visible_message("<span class='danger'>The slime extract begins to vibrate adorably!</span>")
|
||||
addtimer(CALLBACK(src, .proc/chemical_mob_spawn, holder, 1, "Friendly Gold Slime", FRIENDLY_SPAWN, "neutral"), 50)
|
||||
|
||||
//Silver
|
||||
/datum/chemical_reaction/slime/slimebork
|
||||
name = "Slime Bork"
|
||||
id = "m_tele2"
|
||||
required_reagents = list("plasma" = 1)
|
||||
required_container = /obj/item/slime_extract/silver
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimebork/on_reaction(datum/reagents/holder)
|
||||
//BORK BORK BORK
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
|
||||
playsound(T, 'sound/effects/phasein.ogg', 100, 1)
|
||||
|
||||
for(var/mob/living/carbon/C in viewers(T, null))
|
||||
C.flash_act()
|
||||
|
||||
for(var/i in 1 to 4 + rand(1,2))
|
||||
var/chosen = getbork()
|
||||
var/obj/B = new chosen(T)
|
||||
if(prob(5))//Fry it!
|
||||
var/obj/item/reagent_containers/food/snacks/deepfryholder/fried
|
||||
fried = new(T, B)
|
||||
fried.fry() // actually set the name and colour it
|
||||
B = fried
|
||||
if(prob(50))
|
||||
for(var/j in 1 to rand(1, 3))
|
||||
step(B, pick(NORTH,SOUTH,EAST,WEST))
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/slime/slimebork/proc/getbork()
|
||||
return get_random_food()
|
||||
|
||||
/datum/chemical_reaction/slime/slimebork/drinks
|
||||
name = "Slime Bork 2"
|
||||
id = "m_tele4"
|
||||
required_reagents = list("water" = 1)
|
||||
|
||||
/datum/chemical_reaction/slime/slimebork/drinks/getbork()
|
||||
return get_random_drink()
|
||||
|
||||
//Blue
|
||||
/datum/chemical_reaction/slime/slimefrost
|
||||
name = "Slime Frost Oil"
|
||||
id = "m_frostoil"
|
||||
results = list("frostoil" = 10)
|
||||
required_reagents = list("plasma" = 1)
|
||||
required_container = /obj/item/slime_extract/blue
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimestabilizer
|
||||
name = "Slime Stabilizer"
|
||||
id = "m_slimestabilizer"
|
||||
required_reagents = list("blood" = 1)
|
||||
required_container = /obj/item/slime_extract/blue
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimestabilizer/on_reaction(datum/reagents/holder)
|
||||
new /obj/item/slimepotion/slime/stabilizer(get_turf(holder.my_atom))
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/slime/slimefoam
|
||||
name = "Slime Foam"
|
||||
id = "m_foam"
|
||||
results = list("fluorosurfactant" = 20, "water" = 20)
|
||||
required_reagents = list("water" = 5)
|
||||
required_container = /obj/item/slime_extract/blue
|
||||
required_other = TRUE
|
||||
|
||||
//Dark Blue
|
||||
/datum/chemical_reaction/slime/slimefreeze
|
||||
name = "Slime Freeze"
|
||||
id = "m_freeze"
|
||||
required_reagents = list("plasma" = 1)
|
||||
required_container = /obj/item/slime_extract/darkblue
|
||||
required_other = TRUE
|
||||
deletes_extract = FALSE
|
||||
|
||||
/datum/chemical_reaction/slime/slimefreeze/on_reaction(datum/reagents/holder)
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
T.visible_message("<span class='danger'>The slime extract starts to feel extremely cold!</span>")
|
||||
addtimer(CALLBACK(src, .proc/freeze, holder), 50)
|
||||
var/obj/item/slime_extract/M = holder.my_atom
|
||||
deltimer(M.qdel_timer)
|
||||
..()
|
||||
M.qdel_timer = addtimer(CALLBACK(src, .proc/delete_extract, holder), 55, TIMER_STOPPABLE)
|
||||
|
||||
/datum/chemical_reaction/slime/slimefreeze/proc/freeze(datum/reagents/holder)
|
||||
if(holder && holder.my_atom)
|
||||
var/turf/open/T = get_turf(holder.my_atom)
|
||||
if(istype(T))
|
||||
var/datum/gas/gastype = /datum/gas/nitrogen
|
||||
T.atmos_spawn_air("[initial(gastype.id)]=50;TEMP=2.7")
|
||||
|
||||
/datum/chemical_reaction/slime/slimefireproof
|
||||
name = "Slime Fireproof"
|
||||
id = "m_fireproof"
|
||||
required_reagents = list("water" = 1)
|
||||
required_container = /obj/item/slime_extract/darkblue
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimefireproof/on_reaction(datum/reagents/holder)
|
||||
new /obj/item/slimepotion/fireproof(get_turf(holder.my_atom))
|
||||
..()
|
||||
|
||||
//Orange
|
||||
/datum/chemical_reaction/slime/slimecasp
|
||||
name = "Slime Capsaicin Oil"
|
||||
id = "m_capsaicinoil"
|
||||
results = list("capsaicin" = 10)
|
||||
required_reagents = list("blood" = 1)
|
||||
required_container = /obj/item/slime_extract/orange
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimefire
|
||||
name = "Slime fire"
|
||||
id = "m_fire"
|
||||
required_reagents = list("plasma" = 1)
|
||||
required_container = /obj/item/slime_extract/orange
|
||||
required_other = TRUE
|
||||
deletes_extract = FALSE
|
||||
|
||||
/datum/chemical_reaction/slime/slimefire/on_reaction(datum/reagents/holder)
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
T.visible_message("<span class='danger'>The slime extract begins to vibrate adorably!</span>")
|
||||
addtimer(CALLBACK(src, .proc/slime_burn, holder), 50)
|
||||
var/obj/item/slime_extract/M = holder.my_atom
|
||||
deltimer(M.qdel_timer)
|
||||
..()
|
||||
M.qdel_timer = addtimer(CALLBACK(src, .proc/delete_extract, holder), 55, TIMER_STOPPABLE)
|
||||
|
||||
/datum/chemical_reaction/slime/slimefire/proc/slime_burn(datum/reagents/holder)
|
||||
if(holder && holder.my_atom)
|
||||
var/turf/open/T = get_turf(holder.my_atom)
|
||||
if(istype(T))
|
||||
T.atmos_spawn_air("plasma=50;TEMP=1000")
|
||||
|
||||
|
||||
/datum/chemical_reaction/slime/slimesmoke
|
||||
name = "Slime Smoke"
|
||||
id = "m_smoke"
|
||||
results = list("phosphorus" = 10, "potassium" = 10, "sugar" = 10)
|
||||
required_reagents = list("water" = 5)
|
||||
required_container = /obj/item/slime_extract/orange
|
||||
required_other = TRUE
|
||||
|
||||
//Yellow
|
||||
/datum/chemical_reaction/slime/slimeoverload
|
||||
name = "Slime EMP"
|
||||
id = "m_emp"
|
||||
required_reagents = list("blood" = 1)
|
||||
required_container = /obj/item/slime_extract/yellow
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimeoverload/on_reaction(datum/reagents/holder, created_volume)
|
||||
empulse(get_turf(holder.my_atom), 3, 7)
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/slime/slimecell
|
||||
name = "Slime Powercell"
|
||||
id = "m_cell"
|
||||
required_reagents = list("plasma" = 1)
|
||||
required_container = /obj/item/slime_extract/yellow
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimecell/on_reaction(datum/reagents/holder, created_volume)
|
||||
new /obj/item/stock_parts/cell/high/slime(get_turf(holder.my_atom))
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/slime/slimeglow
|
||||
name = "Slime Glow"
|
||||
id = "m_glow"
|
||||
required_reagents = list("water" = 1)
|
||||
required_container = /obj/item/slime_extract/yellow
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimeglow/on_reaction(datum/reagents/holder)
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
T.visible_message("<span class='danger'>The slime begins to emit a soft light. Squeezing it will cause it to grow brightly.</span>")
|
||||
new /obj/item/flashlight/slime(T)
|
||||
..()
|
||||
|
||||
//Purple
|
||||
/datum/chemical_reaction/slime/slimepsteroid
|
||||
name = "Slime Steroid"
|
||||
id = "m_steroid"
|
||||
required_reagents = list("plasma" = 1)
|
||||
required_container = /obj/item/slime_extract/purple
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimepsteroid/on_reaction(datum/reagents/holder)
|
||||
new /obj/item/slimepotion/slime/steroid(get_turf(holder.my_atom))
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/slime/slimeregen
|
||||
name = "Slime Regen"
|
||||
id = "m_regen"
|
||||
results = list("regen_jelly" = 5)
|
||||
required_reagents = list("blood" = 1)
|
||||
required_container = /obj/item/slime_extract/purple
|
||||
required_other = TRUE
|
||||
|
||||
//Dark Purple
|
||||
/datum/chemical_reaction/slime/slimeplasma
|
||||
name = "Slime Plasma"
|
||||
id = "m_plasma"
|
||||
required_reagents = list("plasma" = 1)
|
||||
required_container = /obj/item/slime_extract/darkpurple
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimeplasma/on_reaction(datum/reagents/holder)
|
||||
new /obj/item/stack/sheet/mineral/plasma(get_turf(holder.my_atom), 3)
|
||||
..()
|
||||
|
||||
//Red
|
||||
/datum/chemical_reaction/slime/slimemutator
|
||||
name = "Slime Mutator"
|
||||
id = "m_slimemutator"
|
||||
required_reagents = list("plasma" = 1)
|
||||
required_container = /obj/item/slime_extract/red
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimemutator/on_reaction(datum/reagents/holder)
|
||||
new /obj/item/slimepotion/slime/mutator(get_turf(holder.my_atom))
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/slime/slimebloodlust
|
||||
name = "Bloodlust"
|
||||
id = "m_bloodlust"
|
||||
required_reagents = list("blood" = 1)
|
||||
required_container = /obj/item/slime_extract/red
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimebloodlust/on_reaction(datum/reagents/holder)
|
||||
for(var/mob/living/simple_animal/slime/slime in viewers(get_turf(holder.my_atom), null))
|
||||
if(slime.docile) //Undoes docility, but doesn't make rabid.
|
||||
slime.visible_message("<span class='danger'>[slime] forgets its training, becoming wild once again!</span>")
|
||||
slime.docile = FALSE
|
||||
slime.update_name()
|
||||
continue
|
||||
slime.rabid = 1
|
||||
slime.visible_message("<span class='danger'>The [slime] is driven into a frenzy!</span>")
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/slime/slimespeed
|
||||
name = "Slime Speed"
|
||||
id = "m_speed"
|
||||
required_reagents = list("water" = 1)
|
||||
required_container = /obj/item/slime_extract/red
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimespeed/on_reaction(datum/reagents/holder)
|
||||
new /obj/item/slimepotion/speed(get_turf(holder.my_atom))
|
||||
..()
|
||||
|
||||
//Pink
|
||||
/datum/chemical_reaction/slime/docility
|
||||
name = "Docility Potion"
|
||||
id = "m_potion"
|
||||
required_reagents = list("plasma" = 1)
|
||||
required_container = /obj/item/slime_extract/pink
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/docility/on_reaction(datum/reagents/holder)
|
||||
new /obj/item/slimepotion/slime/docility(get_turf(holder.my_atom))
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/slime/gender
|
||||
name = "Gender Potion"
|
||||
id = "m_gender"
|
||||
required_reagents = list("blood" = 1)
|
||||
required_container = /obj/item/slime_extract/pink
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/gender/on_reaction(datum/reagents/holder)
|
||||
new /obj/item/slimepotion/genderchange(get_turf(holder.my_atom))
|
||||
..()
|
||||
|
||||
//Black
|
||||
/datum/chemical_reaction/slime/slimemutate2
|
||||
name = "Advanced Mutation Toxin"
|
||||
id = "mutationtoxin2"
|
||||
results = list("amutationtoxin" = 1)
|
||||
required_reagents = list("plasma" = 1)
|
||||
required_other = TRUE
|
||||
required_container = /obj/item/slime_extract/black
|
||||
|
||||
//Oil
|
||||
/datum/chemical_reaction/slime/slimeexplosion
|
||||
name = "Slime Explosion"
|
||||
id = "m_explosion"
|
||||
required_reagents = list("plasma" = 1)
|
||||
required_container = /obj/item/slime_extract/oil
|
||||
required_other = TRUE
|
||||
deletes_extract = FALSE
|
||||
|
||||
/datum/chemical_reaction/slime/slimeexplosion/on_reaction(datum/reagents/holder)
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
var/lastkey = holder.my_atom.fingerprintslast
|
||||
var/touch_msg = "N/A"
|
||||
if(lastkey)
|
||||
var/mob/toucher = get_mob_by_key(lastkey)
|
||||
touch_msg = "[ADMIN_LOOKUPFLW(toucher)]."
|
||||
message_admins("Slime Explosion reaction started at [ADMIN_VERBOSEJMP(T)]. Last Fingerprint: [touch_msg]")
|
||||
log_game("Slime Explosion reaction started at [AREACOORD(T)]. Last Fingerprint: [lastkey ? lastkey : "N/A"].")
|
||||
T.visible_message("<span class='danger'>The slime extract begins to vibrate violently !</span>")
|
||||
addtimer(CALLBACK(src, .proc/boom, holder), 50)
|
||||
var/obj/item/slime_extract/M = holder.my_atom
|
||||
deltimer(M.qdel_timer)
|
||||
..()
|
||||
M.qdel_timer = addtimer(CALLBACK(src, .proc/delete_extract, holder), 55, TIMER_STOPPABLE)
|
||||
|
||||
/datum/chemical_reaction/slime/slimeexplosion/proc/boom(datum/reagents/holder)
|
||||
if(holder && holder.my_atom)
|
||||
explosion(get_turf(holder.my_atom), 1 ,3, 6)
|
||||
|
||||
|
||||
/datum/chemical_reaction/slime/slimecornoil
|
||||
name = "Slime Corn Oil"
|
||||
id = "m_cornoil"
|
||||
results = list("cornoil" = 10)
|
||||
required_reagents = list("blood" = 1)
|
||||
required_container = /obj/item/slime_extract/oil
|
||||
required_other = TRUE
|
||||
|
||||
//Light Pink
|
||||
/datum/chemical_reaction/slime/slimepotion2
|
||||
name = "Slime Potion 2"
|
||||
id = "m_potion2"
|
||||
required_container = /obj/item/slime_extract/lightpink
|
||||
required_reagents = list("plasma" = 1)
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimepotion2/on_reaction(datum/reagents/holder)
|
||||
new /obj/item/slimepotion/slime/sentience(get_turf(holder.my_atom))
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/slime/renaming
|
||||
name = "Renaming Potion"
|
||||
id = "m_renaming_potion"
|
||||
required_container = /obj/item/slime_extract/lightpink
|
||||
required_reagents = list("water" = 1)
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/renaming/on_reaction(datum/reagents/holder)
|
||||
new /obj/item/slimepotion/slime/renaming(holder.my_atom.drop_location())
|
||||
..()
|
||||
|
||||
|
||||
//Adamantine
|
||||
/datum/chemical_reaction/slime/adamantine
|
||||
name = "Adamantine"
|
||||
id = "adamantine"
|
||||
required_reagents = list("plasma" = 1)
|
||||
required_container = /obj/item/slime_extract/adamantine
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/adamantine/on_reaction(datum/reagents/holder)
|
||||
new /obj/item/stack/sheet/mineral/adamantine(get_turf(holder.my_atom))
|
||||
..()
|
||||
|
||||
//Bluespace
|
||||
/datum/chemical_reaction/slime/slimefloor2
|
||||
name = "Bluespace Floor"
|
||||
id = "m_floor2"
|
||||
required_reagents = list("blood" = 1)
|
||||
required_container = /obj/item/slime_extract/bluespace
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimefloor2/on_reaction(datum/reagents/holder, created_volume)
|
||||
new /obj/item/stack/tile/bluespace(get_turf(holder.my_atom), 25)
|
||||
..()
|
||||
|
||||
|
||||
/datum/chemical_reaction/slime/slimecrystal
|
||||
name = "Slime Crystal"
|
||||
id = "m_crystal"
|
||||
required_reagents = list("plasma" = 1)
|
||||
required_container = /obj/item/slime_extract/bluespace
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimecrystal/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/obj/item/stack/ore/bluespace_crystal/BC = new (get_turf(holder.my_atom))
|
||||
BC.visible_message("<span class='notice'>The [BC.name] appears out of thin air!</span>")
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/slime/slimeradio
|
||||
name = "Slime Radio"
|
||||
id = "m_radio"
|
||||
required_reagents = list("water" = 1)
|
||||
required_container = /obj/item/slime_extract/bluespace
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimeradio/on_reaction(datum/reagents/holder, created_volume)
|
||||
new /obj/item/slimepotion/slime/slimeradio(get_turf(holder.my_atom))
|
||||
..()
|
||||
|
||||
//Cerulean
|
||||
/datum/chemical_reaction/slime/slimepsteroid2
|
||||
name = "Slime Steroid 2"
|
||||
id = "m_steroid2"
|
||||
required_reagents = list("plasma" = 1)
|
||||
required_container = /obj/item/slime_extract/cerulean
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimepsteroid2/on_reaction(datum/reagents/holder)
|
||||
new /obj/item/slimepotion/enhancer(get_turf(holder.my_atom))
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/slime/slime_territory
|
||||
name = "Slime Territory"
|
||||
id = "s_territory"
|
||||
required_reagents = list("blood" = 1)
|
||||
required_container = /obj/item/slime_extract/cerulean
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slime_territory/on_reaction(datum/reagents/holder)
|
||||
new /obj/item/areaeditor/blueprints/slime(get_turf(holder.my_atom))
|
||||
..()
|
||||
|
||||
//Sepia
|
||||
/datum/chemical_reaction/slime/slimestop
|
||||
name = "Slime Stop"
|
||||
id = "m_stop"
|
||||
required_reagents = list("plasma" = 1)
|
||||
required_container = /obj/item/slime_extract/sepia
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimestop/on_reaction(datum/reagents/holder)
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
var/list/M = list(get_mob_by_key(holder.my_atom.fingerprintslast))
|
||||
new /obj/effect/timestop(T, null, null, M)
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/slime/slimecamera
|
||||
name = "Slime Camera"
|
||||
id = "m_camera"
|
||||
required_reagents = list("water" = 1)
|
||||
required_container = /obj/item/slime_extract/sepia
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimecamera/on_reaction(datum/reagents/holder)
|
||||
new /obj/item/camera(get_turf(holder.my_atom))
|
||||
new /obj/item/camera_film(get_turf(holder.my_atom))
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/slime/slimefloor
|
||||
name = "Sepia Floor"
|
||||
id = "m_floor"
|
||||
required_reagents = list("blood" = 1)
|
||||
required_container = /obj/item/slime_extract/sepia
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimefloor/on_reaction(datum/reagents/holder)
|
||||
new /obj/item/stack/tile/sepia(get_turf(holder.my_atom), 25)
|
||||
..()
|
||||
|
||||
//Pyrite
|
||||
/datum/chemical_reaction/slime/slimepaint
|
||||
name = "Slime Paint"
|
||||
id = "s_paint"
|
||||
required_reagents = list("plasma" = 1)
|
||||
required_container = /obj/item/slime_extract/pyrite
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimepaint/on_reaction(datum/reagents/holder)
|
||||
var/chosen = pick(subtypesof(/obj/item/paint))
|
||||
new chosen(get_turf(holder.my_atom))
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/slime/slimecrayon
|
||||
name = "Slime Crayon"
|
||||
id = "s_crayon"
|
||||
required_reagents = list("blood" = 1)
|
||||
required_container = /obj/item/slime_extract/pyrite
|
||||
required_other = TRUE
|
||||
|
||||
/datum/chemical_reaction/slime/slimecrayon/on_reaction(datum/reagents/holder)
|
||||
var/chosen = pick(difflist(subtypesof(/obj/item/toy/crayon),typesof(/obj/item/toy/crayon/spraycan)))
|
||||
new chosen(get_turf(holder.my_atom))
|
||||
..()
|
||||
|
||||
//Rainbow :o)
|
||||
/datum/chemical_reaction/slime/slimeRNG
|
||||
name = "Random Core"
|
||||
id = "slimerng"
|
||||
required_reagents = list("plasma" = 1)
|
||||
required_other = TRUE
|
||||
required_container = /obj/item/slime_extract/rainbow
|
||||
|
||||
/datum/chemical_reaction/slime/slimeRNG/on_reaction(datum/reagents/holder, created_volume)
|
||||
if(created_volume >= 5)
|
||||
var/obj/item/grenade/clusterbuster/slime/S = new (get_turf(holder.my_atom))
|
||||
S.visible_message("<span class='danger'>Infused with plasma, the core begins to expand uncontrollably!</span>")
|
||||
S.icon_state = "[S.base_state]_active"
|
||||
S.active = TRUE
|
||||
addtimer(CALLBACK(S, /obj/item/grenade.proc/prime), rand(15,60))
|
||||
qdel(holder.my_atom) //deleto
|
||||
else
|
||||
var/mob/living/simple_animal/slime/random/S = new (get_turf(holder.my_atom))
|
||||
S.visible_message("<span class='danger'>Infused with plasma, the core begins to quiver and grow, and a new baby slime emerges from it!</span>")
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/slime/slimebomb
|
||||
name = "Clusterblorble"
|
||||
id = "slimebomb"
|
||||
required_reagents = list("slimejelly" = 1)
|
||||
required_other = TRUE
|
||||
required_container = /obj/item/slime_extract/rainbow
|
||||
|
||||
/datum/chemical_reaction/slime/slimebomb/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/obj/item/grenade/clusterbuster/slime/volatile/S = new (holder.my_atom.loc)
|
||||
S.visible_message("<span class='danger'>Infused with slime jelly, the core begins to expand uncontrollably!</span>")
|
||||
S.icon_state = "[S.base_state]_active"
|
||||
S.active = TRUE
|
||||
addtimer(CALLBACK(S, /obj/item/grenade.proc/prime), rand(15,60))
|
||||
qdel(holder.my_atom) //deleto
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/slime/slime_transfer
|
||||
name = "Transfer Potion"
|
||||
id = "slimetransfer"
|
||||
required_reagents = list("blood" = 1)
|
||||
required_other = TRUE
|
||||
required_container = /obj/item/slime_extract/rainbow
|
||||
|
||||
/datum/chemical_reaction/slime/slime_transfer/on_reaction(datum/reagents/holder)
|
||||
new /obj/item/slimepotion/transference(get_turf(holder.my_atom))
|
||||
..()
|
||||
|
||||
/datum/chemical_reaction/slime/flight_potion
|
||||
name = "Flight Potion"
|
||||
id = "flightpotion"
|
||||
required_reagents = list("holywater" = 5, "uranium" = 5)
|
||||
required_other = TRUE
|
||||
required_container = /obj/item/slime_extract/rainbow
|
||||
|
||||
/datum/chemical_reaction/slime/flight_potion/on_reaction(datum/reagents/holder)
|
||||
new /obj/item/reagent_containers/glass/bottle/potion/flight(get_turf(holder.my_atom))
|
||||
..()
|
||||
@@ -0,0 +1,212 @@
|
||||
GLOBAL_LIST_INIT(food_reagents, build_reagents_to_food()) //reagentid = related food types
|
||||
|
||||
/proc/build_reagents_to_food()
|
||||
. = list()
|
||||
for (var/type in subtypesof(/obj/item/reagent_containers/food))
|
||||
var/obj/item/reagent_containers/food/item = new type()
|
||||
for(var/r in item.list_reagents)
|
||||
if (!.[r])
|
||||
.[r] = list()
|
||||
.[r] += type
|
||||
qdel(item)
|
||||
//dang plant snowflake
|
||||
for (var/type in subtypesof(/obj/item/seeds))
|
||||
var/obj/item/seeds/item = new type()
|
||||
for(var/r in item.reagents_add)
|
||||
if (!.[r])
|
||||
.[r] = list()
|
||||
.[r] += type
|
||||
qdel(item)
|
||||
|
||||
|
||||
#define RNGCHEM_INPUT "input"
|
||||
#define RNGCHEM_CATALYSTS "catalysts"
|
||||
#define RNGCHEM_OUTPUT "output"
|
||||
|
||||
/datum/chemical_reaction/randomized
|
||||
name = "semi randomized reaction"
|
||||
|
||||
var/persistent = FALSE
|
||||
var/persistence_period = 7 //Will reset every x days
|
||||
var/created //creation timestamp
|
||||
|
||||
var/randomize_container = FALSE
|
||||
var/list/possible_containers = list()
|
||||
|
||||
var/randomize_req_temperature = TRUE
|
||||
var/min_temp = 1
|
||||
var/max_temp = 600
|
||||
|
||||
var/randomize_inputs = TRUE
|
||||
var/min_input_reagent_amount = 1
|
||||
var/max_input_reagent_amount = 10
|
||||
var/min_input_reagents = 2
|
||||
var/max_input_reagents = 5
|
||||
var/list/possible_reagents = list()
|
||||
var/min_catalysts = 0
|
||||
var/max_catalysts = 2
|
||||
var/list/possible_catalysts = list()
|
||||
|
||||
var/randomize_results = FALSE
|
||||
var/min_output_reagent_amount = 1
|
||||
var/max_output_reagent_amount = 5
|
||||
var/min_result_reagents = 1
|
||||
var/max_result_reagents = 1
|
||||
var/list/possible_results = list()
|
||||
|
||||
/datum/chemical_reaction/randomized/proc/GenerateRecipe()
|
||||
created = world.time
|
||||
if(randomize_container)
|
||||
required_container = pick(possible_containers)
|
||||
if(randomize_req_temperature)
|
||||
required_temp = rand(min_temp,max_temp)
|
||||
is_cold_recipe = pick(TRUE,FALSE)
|
||||
|
||||
if(randomize_results)
|
||||
results = list()
|
||||
var/list/remaining_possible_results = GetPossibleReagents(RNGCHEM_OUTPUT)
|
||||
var/out_reagent_count = min(rand(min_result_reagents,max_result_reagents),remaining_possible_results.len)
|
||||
for(var/i in 1 to out_reagent_count)
|
||||
var/r_id = pick_n_take(remaining_possible_results)
|
||||
results[r_id] = rand(min_output_reagent_amount,max_output_reagent_amount)
|
||||
|
||||
if(randomize_inputs)
|
||||
var/list/remaining_possible_reagents = GetPossibleReagents(RNGCHEM_INPUT)
|
||||
var/list/remaining_possible_catalysts = GetPossibleReagents(RNGCHEM_CATALYSTS)
|
||||
|
||||
//We're going to assume we're not doing any weird partial reactions for now.
|
||||
for(var/reagent_type in results)
|
||||
remaining_possible_catalysts -= reagent_type
|
||||
remaining_possible_reagents -= reagent_type
|
||||
|
||||
var/in_reagent_count = min(rand(min_input_reagents,max_input_reagents),remaining_possible_reagents.len)
|
||||
if(in_reagent_count <= 0)
|
||||
return FALSE
|
||||
|
||||
required_reagents = list()
|
||||
for(var/i in 1 to in_reagent_count)
|
||||
var/r_id = pick_n_take(remaining_possible_reagents)
|
||||
required_reagents[r_id] = rand(min_input_reagent_amount,max_input_reagent_amount)
|
||||
remaining_possible_catalysts -= r_id //Can't have same reagents both as catalyst and reagent. Or can we ?
|
||||
|
||||
required_catalysts = list()
|
||||
var/in_catalyst_count = min(rand(min_catalysts,max_catalysts),remaining_possible_catalysts.len)
|
||||
for(var/i in 1 to in_catalyst_count)
|
||||
var/r_id = pick_n_take(remaining_possible_catalysts)
|
||||
required_catalysts[r_id] = rand(min_input_reagent_amount,max_input_reagent_amount)
|
||||
|
||||
return TRUE
|
||||
|
||||
/datum/chemical_reaction/randomized/proc/GetPossibleReagents(kind)
|
||||
switch(kind)
|
||||
if(RNGCHEM_INPUT)
|
||||
return possible_reagents.Copy()
|
||||
if(RNGCHEM_CATALYSTS)
|
||||
return possible_catalysts.Copy()
|
||||
if(RNGCHEM_OUTPUT)
|
||||
return possible_results.Copy()
|
||||
|
||||
/datum/chemical_reaction/randomized/proc/HasConflicts()
|
||||
for(var/x in required_reagents)
|
||||
for(var/datum/chemical_reaction/R in GLOB.chemical_reactions_list[x])
|
||||
if(chem_recipes_do_conflict(R,src))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/chemical_reaction/randomized/proc/unwrap_reagent_list(list/textreagents)
|
||||
. = list()
|
||||
for(var/R in textreagents)
|
||||
var/pathR = text2path(R)
|
||||
if(!pathR)
|
||||
return null
|
||||
.[pathR] = textreagents[R]
|
||||
|
||||
/datum/chemical_reaction/randomized/proc/LoadOldRecipe(recipe_data)
|
||||
created = text2num(recipe_data["timestamp"])
|
||||
|
||||
var/req_reag = unwrap_reagent_list(recipe_data["required_reagents"])
|
||||
if(!req_reag)
|
||||
return FALSE
|
||||
required_reagents = req_reag
|
||||
|
||||
var/req_catalysts = unwrap_reagent_list(recipe_data["required_catalysts"])
|
||||
if(!req_catalysts)
|
||||
return FALSE
|
||||
required_catalysts = req_catalysts
|
||||
|
||||
required_temp = recipe_data["required_temp"]
|
||||
is_cold_recipe = recipe_data["is_cold_recipe"]
|
||||
|
||||
var/temp_results = unwrap_reagent_list(recipe_data["results"])
|
||||
if(!temp_results)
|
||||
return FALSE
|
||||
results = temp_results
|
||||
var/containerpath = text2path(recipe_data["required_container"])
|
||||
if(!containerpath)
|
||||
return FALSE
|
||||
required_container = containerpath
|
||||
return TRUE
|
||||
|
||||
/datum/chemical_reaction/randomized/secret_sauce
|
||||
name = "secret sauce creation"
|
||||
id = "secretsauce"
|
||||
persistent = TRUE
|
||||
persistence_period = 7 //Reset every week
|
||||
randomize_container = TRUE
|
||||
possible_containers = list(/obj/item/reagent_containers/glass/bucket) //easy way to ensure no common conflicts
|
||||
randomize_req_temperature = TRUE
|
||||
results = list("secret_sauce" =1)
|
||||
|
||||
/datum/chemical_reaction/randomized/secret_sauce/GetPossibleReagents(kind)
|
||||
switch(kind)
|
||||
if(RNGCHEM_INPUT,RNGCHEM_CATALYSTS)
|
||||
var/food_reagent_ids = list()
|
||||
for(var/key in GLOB.food_reagents)
|
||||
food_reagent_ids += key
|
||||
return food_reagent_ids
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/paper/secretrecipe
|
||||
name = "old recipe"
|
||||
var/recipe_id = "secretsauce"
|
||||
|
||||
/obj/item/paper/secretrecipe/examine(mob/user) //Extra secret
|
||||
if(isobserver(user))
|
||||
return
|
||||
. = ..()
|
||||
|
||||
/obj/item/paper/secretrecipe/Initialize()
|
||||
. = ..()
|
||||
if(SSpersistence.initialized)
|
||||
UpdateInfo()
|
||||
else
|
||||
SSticker.OnRoundstart(CALLBACK(src,.proc/UpdateInfo))
|
||||
|
||||
/obj/item/paper/secretrecipe/proc/UpdateInfo()
|
||||
var/datum/chemical_reaction/recipe = get_chemical_reaction(recipe_id)
|
||||
if(!recipe)
|
||||
info = "This recipe is illegible."
|
||||
var/list/dat = list("<ul>")
|
||||
for(var/rid in recipe.required_reagents)
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[rid]
|
||||
dat += "<li>[recipe.required_reagents[rid]]u of [R.name]</li>"
|
||||
dat += "</ul>"
|
||||
if(recipe.required_catalysts.len)
|
||||
dat += "With following present: <ul>"
|
||||
for(var/rid in recipe.required_catalysts)
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[rid]
|
||||
dat += "<li>[recipe.required_catalysts[rid]]u of [R.name]</li>"
|
||||
dat += "</ul>"
|
||||
dat += "Mix slowly"
|
||||
if(recipe.required_container)
|
||||
var/obj/item/I = recipe.required_container
|
||||
dat += " in [initial(I.name)]"
|
||||
if(recipe.required_temp != 0)
|
||||
if(recipe.is_cold_recipe)
|
||||
dat += " below [recipe.required_temp] degrees"
|
||||
else
|
||||
dat += " above [recipe.required_temp] degrees"
|
||||
dat += "."
|
||||
info = dat.Join("")
|
||||
update_icon()
|
||||
@@ -0,0 +1,128 @@
|
||||
|
||||
/datum/chemical_reaction/formaldehyde
|
||||
name = "formaldehyde"
|
||||
id = "Formaldehyde"
|
||||
results = list("formaldehyde" = 3)
|
||||
required_reagents = list("ethanol" = 1, "oxygen" = 1, "silver" = 1)
|
||||
required_temp = 420
|
||||
|
||||
/datum/chemical_reaction/fentanyl
|
||||
name = "fentanyl"
|
||||
id = "fentanyl"
|
||||
results = list("fentanyl" = 1)
|
||||
required_reagents = list("space_drugs" = 1)
|
||||
required_temp = 674
|
||||
|
||||
/datum/chemical_reaction/cyanide
|
||||
name = "Cyanide"
|
||||
id = "cyanide"
|
||||
results = list("cyanide" = 3)
|
||||
required_reagents = list("oil" = 1, "ammonia" = 1, "oxygen" = 1)
|
||||
required_temp = 380
|
||||
|
||||
/datum/chemical_reaction/itching_powder
|
||||
name = "Itching Powder"
|
||||
id = "itching_powder"
|
||||
results = list("itching_powder" = 3)
|
||||
required_reagents = list("welding_fuel" = 1, "ammonia" = 1, "charcoal" = 1)
|
||||
|
||||
/datum/chemical_reaction/facid
|
||||
name = "Fluorosulfuric acid"
|
||||
id = "facid"
|
||||
results = list("facid" = 4)
|
||||
required_reagents = list("sacid" = 1, "fluorine" = 1, "hydrogen" = 1, "potassium" = 1)
|
||||
required_temp = 380
|
||||
|
||||
/datum/chemical_reaction/sulfonal
|
||||
name = "sulfonal"
|
||||
id = "sulfonal"
|
||||
results = list("sulfonal" = 3)
|
||||
required_reagents = list("acetone" = 1, "diethylamine" = 1, "sulfur" = 1)
|
||||
|
||||
/datum/chemical_reaction/lipolicide
|
||||
name = "lipolicide"
|
||||
id = "lipolicide"
|
||||
results = list("lipolicide" = 3)
|
||||
required_reagents = list("mercury" = 1, "diethylamine" = 1, "ephedrine" = 1)
|
||||
|
||||
/datum/chemical_reaction/mutagen
|
||||
name = "Unstable mutagen"
|
||||
id = "mutagen"
|
||||
results = list("mutagen" = 3)
|
||||
required_reagents = list("radium" = 1, "phosphorus" = 1, "chlorine" = 1)
|
||||
|
||||
/datum/chemical_reaction/lexorin
|
||||
name = "Lexorin"
|
||||
id = "lexorin"
|
||||
results = list("lexorin" = 3)
|
||||
required_reagents = list("plasma" = 1, "hydrogen" = 1, "oxygen" = 1)
|
||||
|
||||
/datum/chemical_reaction/chloralhydrate
|
||||
name = "Chloral Hydrate"
|
||||
id = "chloralhydrate"
|
||||
results = list("chloralhydrate" = 1)
|
||||
required_reagents = list("ethanol" = 1, "chlorine" = 3, "water" = 1)
|
||||
|
||||
/datum/chemical_reaction/mutetoxin //i'll just fit this in here snugly between other unfun chemicals :v
|
||||
name = "Mute Toxin"
|
||||
id = "mutetoxin"
|
||||
results = list("mutetoxin" = 2)
|
||||
required_reagents = list("uranium" = 2, "water" = 1, "carbon" = 1)
|
||||
|
||||
/datum/chemical_reaction/zombiepowder
|
||||
name = "Zombie Powder"
|
||||
id = "zombiepowder"
|
||||
results = list("zombiepowder" = 2)
|
||||
required_reagents = list("carpotoxin" = 5, "morphine" = 5, "copper" = 5)
|
||||
|
||||
/datum/chemical_reaction/ghoulpowder
|
||||
name = "Ghoul Powder"
|
||||
id = "ghoulpowder"
|
||||
results = list("ghoulpowder" = 2)
|
||||
required_reagents = list("zombiepowder" = 1, "epinephrine" = 1)
|
||||
|
||||
/datum/chemical_reaction/mindbreaker
|
||||
name = "Mindbreaker Toxin"
|
||||
id = "mindbreaker"
|
||||
results = list("mindbreaker" = 5)
|
||||
required_reagents = list("silicon" = 1, "hydrogen" = 1, "charcoal" = 1)
|
||||
|
||||
/datum/chemical_reaction/heparin
|
||||
name = "Heparin"
|
||||
id = "Heparin"
|
||||
results = list("heparin" = 4)
|
||||
required_reagents = list("formaldehyde" = 1, "sodium" = 1, "chlorine" = 1, "lithium" = 1)
|
||||
mix_message = "<span class='danger'>The mixture thins and loses all color.</span>"
|
||||
|
||||
/datum/chemical_reaction/rotatium
|
||||
name = "Rotatium"
|
||||
id = "Rotatium"
|
||||
results = list("rotatium" = 3)
|
||||
required_reagents = list("mindbreaker" = 1, "teslium" = 1, "fentanyl" = 1)
|
||||
mix_message = "<span class='danger'>After sparks, fire, and the smell of mindbreaker, the mix is constantly spinning with no stop in sight.</span>"
|
||||
|
||||
/datum/chemical_reaction/skewium
|
||||
name = "Skewium"
|
||||
id = "Skewium"
|
||||
results = list("skewium" = 5)
|
||||
required_reagents = list("rotatium" = 2, "plasma" = 2, "sacid" = 1)
|
||||
mix_message = "<span class='danger'>Wow! it turns out if you mix rotatium with some plasma and sulphuric acid, it gets even worse!</span>"
|
||||
|
||||
/datum/chemical_reaction/anacea
|
||||
name = "Anacea"
|
||||
id = "anacea"
|
||||
results = list("anacea" = 3)
|
||||
required_reagents = list("haloperidol" = 1, "impedrezene" = 1, "radium" = 1)
|
||||
|
||||
/datum/chemical_reaction/mimesbane
|
||||
name = "Mime's Bane"
|
||||
id = "mimesbane"
|
||||
results = list("mimesbane" = 3)
|
||||
required_reagents = list("radium" = 1, "mutetoxin" = 1, "nothing" = 1)
|
||||
|
||||
/datum/chemical_reaction/bonehurtingjuice
|
||||
name = "Bone Hurting Juice"
|
||||
id = "bonehurtingjuice"
|
||||
results = list("bonehurtingjuice" = 5)
|
||||
required_reagents = list("mutagen" = 1, "itching_powder" = 3, "milk" = 1)
|
||||
mix_message = "<span class='danger'>The mixture suddenly becomes clear and looks a lot like water. You feel a strong urge to drink it.</span>"
|
||||
@@ -0,0 +1,177 @@
|
||||
#define PH_WEAK (1 << 0)
|
||||
#define TEMP_WEAK (1 << 1)
|
||||
|
||||
/obj/item/reagent_containers
|
||||
name = "Container"
|
||||
desc = "..."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = null
|
||||
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/volume = 30
|
||||
var/reagent_flags
|
||||
var/list/list_reagents = null
|
||||
var/spawned_disease = null
|
||||
var/disease_amount = 20
|
||||
var/spillable = FALSE
|
||||
var/beaker_weakness_bitflag = NONE//Bitflag!
|
||||
var/container_HP = 2
|
||||
|
||||
/obj/item/reagent_containers/Initialize(mapload, vol)
|
||||
. = ..()
|
||||
if(isnum(vol) && vol > 0)
|
||||
volume = vol
|
||||
create_reagents(volume, reagent_flags)
|
||||
if(spawned_disease)
|
||||
var/datum/disease/F = new spawned_disease()
|
||||
var/list/data = list("viruses"= list(F))
|
||||
reagents.add_reagent("blood", disease_amount, data)
|
||||
|
||||
add_initial_reagents()
|
||||
|
||||
/obj/item/reagent_containers/proc/add_initial_reagents()
|
||||
if(list_reagents)
|
||||
reagents.add_reagent_list(list_reagents)
|
||||
|
||||
/obj/item/reagent_containers/attack_self(mob/user)
|
||||
if(possible_transfer_amounts.len)
|
||||
var/i=0
|
||||
for(var/A in possible_transfer_amounts)
|
||||
i++
|
||||
if(A == amount_per_transfer_from_this)
|
||||
if(i<possible_transfer_amounts.len)
|
||||
amount_per_transfer_from_this = possible_transfer_amounts[i+1]
|
||||
else
|
||||
amount_per_transfer_from_this = possible_transfer_amounts[1]
|
||||
to_chat(user, "<span class='notice'>[src]'s transfer amount is now [amount_per_transfer_from_this] units.</span>")
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/attack(mob/M, mob/user, def_zone)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/proc/canconsume(mob/eater, mob/user)
|
||||
if(!iscarbon(eater))
|
||||
return 0
|
||||
var/mob/living/carbon/C = eater
|
||||
var/covered = ""
|
||||
if(C.is_mouth_covered(head_only = 1))
|
||||
covered = "headgear"
|
||||
else if(C.is_mouth_covered(mask_only = 1))
|
||||
covered = "mask"
|
||||
if(covered)
|
||||
var/who = (isnull(user) || eater == user) ? "your" : "[eater.p_their()]"
|
||||
to_chat(user, "<span class='warning'>You have to remove [who] [covered] first!</span>")
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/reagent_containers/ex_act()
|
||||
if(reagents)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
R.on_ex_act()
|
||||
if(!QDELETED(src))
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/fire_act(exposed_temperature, exposed_volume)
|
||||
reagents.expose_temperature(exposed_temperature)
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/throw_impact(atom/target)
|
||||
. = ..()
|
||||
SplashReagents(target, TRUE)
|
||||
|
||||
/obj/item/reagent_containers/proc/bartender_check(atom/target)
|
||||
. = FALSE
|
||||
if(target.CanPass(src, get_turf(src)) && thrownby && thrownby.actions)
|
||||
for(var/datum/action/innate/drink_fling/D in thrownby.actions)
|
||||
if(D.active)
|
||||
return TRUE
|
||||
|
||||
/obj/item/reagent_containers/proc/ForceResetRotation()
|
||||
transform = initial(transform)
|
||||
|
||||
/obj/item/reagent_containers/proc/SplashReagents(atom/target, thrown = FALSE)
|
||||
if(!reagents || !reagents.total_volume || !spillable)
|
||||
return
|
||||
|
||||
if(ismob(target) && target.reagents)
|
||||
if(thrown)
|
||||
reagents.total_volume *= rand(5,10) * 0.1 //Not all of it makes contact with the target
|
||||
var/mob/M = target
|
||||
var/R
|
||||
target.visible_message("<span class='danger'>[M] has been splashed with something!</span>", \
|
||||
"<span class='userdanger'>[M] has been splashed with something!</span>")
|
||||
for(var/datum/reagent/A in reagents.reagent_list)
|
||||
R += A.id + " ("
|
||||
R += num2text(A.volume) + "),"
|
||||
|
||||
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)]")
|
||||
log_game("[key_name(thrownby)] splashed (thrown) [english_list(reagents.reagent_list)] on [target] in [AREACOORD(target)].")
|
||||
message_admins("[ADMIN_LOOKUPFLW(thrownby)] splashed (thrown) [english_list(reagents.reagent_list)] on [target] in [ADMIN_VERBOSEJMP(target)].")
|
||||
visible_message("<span class='notice'>[src] spills its contents all over [target].</span>")
|
||||
reagents.reaction(target, TOUCH)
|
||||
if(QDELETED(src))
|
||||
return
|
||||
|
||||
reagents.clear_reagents()
|
||||
|
||||
//melts plastic beakers
|
||||
/obj/item/reagent_containers/microwave_act(obj/machinery/microwave/M)
|
||||
reagents.expose_temperature(1000)
|
||||
if(beaker_weakness_bitflag & TEMP_WEAK)
|
||||
var/list/seen = viewers(5, get_turf(src))
|
||||
var/iconhtml = icon2html(src, seen)
|
||||
for(var/mob/H in seen)
|
||||
to_chat(H, "<span class='notice'>[iconhtml] \The [src]'s melts from the temperature!</span>")
|
||||
playsound(get_turf(src), 'sound/FermiChem/heatmelt.ogg', 80, 1)
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
//melts plastic beakers
|
||||
/obj/item/reagent_containers/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
reagents.expose_temperature(exposed_temperature)
|
||||
temp_check()
|
||||
|
||||
/obj/item/reagent_containers/proc/temp_check()
|
||||
if(beaker_weakness_bitflag & TEMP_WEAK)
|
||||
if(reagents.chem_temp >= 444)//assuming polypropylene
|
||||
var/list/seen = viewers(5, get_turf(src))
|
||||
var/iconhtml = icon2html(src, seen)
|
||||
for(var/mob/M in seen)
|
||||
to_chat(M, "<span class='notice'>[iconhtml] \The [src]'s melts from the temperature!</span>")
|
||||
playsound(get_turf(src), 'sound/FermiChem/heatmelt.ogg', 80, 1)
|
||||
to_chat(M, "<span class='warning'><i>[iconhtml] Have you tried using glass or meta beakers for high temperature reactions? These are immune to temperature effects.</i></span>")
|
||||
SSblackbox.record_feedback("tally", "fermi_chem", 1, "Times beakers have melted from temperature")
|
||||
qdel(src)
|
||||
|
||||
//melts glass beakers
|
||||
/obj/item/reagent_containers/proc/pH_check()
|
||||
if(beaker_weakness_bitflag & PH_WEAK)
|
||||
if((reagents.pH < 0.5) || (reagents.pH > 13.5))
|
||||
var/list/seen = viewers(5, get_turf(src))
|
||||
var/iconhtml = icon2html(src, seen)
|
||||
container_HP--
|
||||
if(container_HP <= 0)
|
||||
for(var/mob/M in seen)
|
||||
to_chat(M, "<span class='notice'>[iconhtml] \The [src]'s melts from the extreme pH!</span>")
|
||||
playsound(get_turf(src), 'sound/FermiChem/acidmelt.ogg', 80, 1)
|
||||
SSblackbox.record_feedback("tally", "fermi_chem", 1, "Times beakers have melted from pH")
|
||||
qdel(src)
|
||||
else
|
||||
for(var/mob/M in seen)
|
||||
to_chat(M, "<span class='notice'>[iconhtml] \The [src]'s is damaged by the extreme pH and begins to deform!</span>")
|
||||
playsound(get_turf(src), 'sound/FermiChem/bufferadd.ogg', 50, 1)
|
||||
to_chat(M, "<span class='warning'><i>[iconhtml] Have you tried using plastic beakers (XL) or metabeakers for high pH reactions? These beakers are immune to pH effects.</i></span>")
|
||||
@@ -0,0 +1,92 @@
|
||||
/obj/item/reagent_containers/blood
|
||||
name = "blood pack"
|
||||
desc = "Contains blood used for transfusion. Must be attached to an IV drip."
|
||||
icon = 'icons/obj/bloodpack.dmi'
|
||||
icon_state = "bloodpack"
|
||||
volume = 200
|
||||
var/blood_type = null
|
||||
var/labelled = 0
|
||||
|
||||
/obj/item/reagent_containers/blood/Initialize()
|
||||
. = ..()
|
||||
if(blood_type != null)
|
||||
reagents.add_reagent("blood", 200, list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=blood_type,"resistances"=null,"trace_chem"=null))
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/blood/on_reagent_change(changetype)
|
||||
if(reagents)
|
||||
var/datum/reagent/blood/B = reagents.has_reagent("blood")
|
||||
if(B && B.data && B.data["blood_type"])
|
||||
blood_type = B.data["blood_type"]
|
||||
else
|
||||
blood_type = null
|
||||
update_pack_name()
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/blood/proc/update_pack_name()
|
||||
if(!labelled)
|
||||
if(blood_type)
|
||||
name = "blood pack - [blood_type]"
|
||||
else
|
||||
name = "blood pack"
|
||||
|
||||
/obj/item/reagent_containers/blood/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
var/v = min(round(reagents.total_volume / volume * 10), 10)
|
||||
if(v > 0)
|
||||
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "bloodpack1")
|
||||
filling.icon_state = "bloodpack[v]"
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling)
|
||||
|
||||
/obj/item/reagent_containers/blood/random
|
||||
icon_state = "random_bloodpack"
|
||||
|
||||
/obj/item/reagent_containers/blood/random/Initialize()
|
||||
icon_state = "bloodpack"
|
||||
blood_type = pick("A+", "A-", "B+", "B-", "O+", "O-", "L")
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/blood/APlus
|
||||
blood_type = "A+"
|
||||
|
||||
/obj/item/reagent_containers/blood/AMinus
|
||||
blood_type = "A-"
|
||||
|
||||
/obj/item/reagent_containers/blood/BPlus
|
||||
blood_type = "B+"
|
||||
|
||||
/obj/item/reagent_containers/blood/BMinus
|
||||
blood_type = "B-"
|
||||
|
||||
/obj/item/reagent_containers/blood/OPlus
|
||||
blood_type = "O+"
|
||||
|
||||
/obj/item/reagent_containers/blood/OMinus
|
||||
blood_type = "O-"
|
||||
|
||||
/obj/item/reagent_containers/blood/lizard
|
||||
blood_type = "L"
|
||||
|
||||
/obj/item/reagent_containers/blood/universal
|
||||
blood_type = "U"
|
||||
|
||||
/obj/item/reagent_containers/blood/attackby(obj/item/I, mob/user, params)
|
||||
if (istype(I, /obj/item/pen) || istype(I, /obj/item/toy/crayon))
|
||||
if(!user.is_literate())
|
||||
to_chat(user, "<span class='notice'>You scribble illegibly on the label of [src]!</span>")
|
||||
return
|
||||
var/t = stripped_input(user, "What would you like to label the blood pack?", name, null, 53)
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
if(user.get_active_held_item() != I)
|
||||
return
|
||||
if(t)
|
||||
labelled = 1
|
||||
name = "blood pack - [t]"
|
||||
else
|
||||
labelled = 0
|
||||
update_pack_name()
|
||||
else
|
||||
return ..()
|
||||
@@ -0,0 +1,257 @@
|
||||
/*
|
||||
Contains:
|
||||
Borg Hypospray
|
||||
Borg Shaker
|
||||
Nothing to do with hydroponics in here. Sorry to dissapoint you.
|
||||
*/
|
||||
|
||||
/*
|
||||
Borg Hypospray
|
||||
*/
|
||||
/obj/item/reagent_containers/borghypo
|
||||
name = "cyborg hypospray"
|
||||
desc = "An advanced chemical synthesizer and injection system, designed for heavy-duty medical equipment."
|
||||
icon = 'icons/obj/syringe.dmi'
|
||||
item_state = "hypo"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
icon_state = "borghypo"
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 30
|
||||
possible_transfer_amounts = list()
|
||||
var/mode = 1
|
||||
var/charge_cost = 50
|
||||
var/charge_tick = 0
|
||||
var/recharge_time = 5 //Time it takes for shots to recharge (in seconds)
|
||||
var/bypass_protection = 0 //If the hypospray can go through armor or thick material
|
||||
|
||||
var/list/datum/reagents/reagent_list = list()
|
||||
var/list/reagent_ids = list("dexalin", "kelotane", "bicaridine", "antitoxin", "epinephrine", "spaceacillin", "salglu_solution")
|
||||
var/accepts_reagent_upgrades = TRUE //If upgrades can increase number of reagents dispensed.
|
||||
var/list/modes = list() //Basically the inverse of reagent_ids. Instead of having numbers as "keys" and strings as values it has strings as keys and numbers as values.
|
||||
//Used as list for input() in shakers.
|
||||
|
||||
|
||||
/obj/item/reagent_containers/borghypo/Initialize()
|
||||
. = ..()
|
||||
|
||||
for(var/R in reagent_ids)
|
||||
add_reagent(R)
|
||||
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
/obj/item/reagent_containers/borghypo/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/reagent_containers/borghypo/process() //Every [recharge_time] seconds, recharge some reagents for the cyborg
|
||||
charge_tick++
|
||||
if(charge_tick >= recharge_time)
|
||||
regenerate_reagents()
|
||||
charge_tick = 0
|
||||
|
||||
//update_icon()
|
||||
return 1
|
||||
|
||||
// Use this to add more chemicals for the borghypo to produce.
|
||||
/obj/item/reagent_containers/borghypo/proc/add_reagent(reagent)
|
||||
reagent_ids |= reagent
|
||||
var/datum/reagents/RG = new(30)
|
||||
RG.my_atom = src
|
||||
reagent_list += RG
|
||||
|
||||
var/datum/reagents/R = reagent_list[reagent_list.len]
|
||||
R.add_reagent(reagent, 30)
|
||||
|
||||
modes[reagent] = modes.len + 1
|
||||
|
||||
/obj/item/reagent_containers/borghypo/proc/del_reagent(reagent)
|
||||
reagent_ids -= reagent
|
||||
var/datum/reagents/RG
|
||||
var/datum/reagents/TRG
|
||||
for(var/i in 1 to reagent_ids.len)
|
||||
TRG = reagent_list[i]
|
||||
if (TRG.has_reagent(reagent))
|
||||
RG = TRG
|
||||
break
|
||||
if (RG)
|
||||
reagent_list -= RG
|
||||
RG.del_reagent(reagent)
|
||||
|
||||
modes[reagent] = modes.len - 1
|
||||
|
||||
/obj/item/reagent_containers/borghypo/proc/regenerate_reagents()
|
||||
if(iscyborg(src.loc))
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
if(R && R.cell)
|
||||
for(var/i in 1 to reagent_ids.len)
|
||||
var/datum/reagents/RG = reagent_list[i]
|
||||
if(RG.total_volume < RG.maximum_volume) //Don't recharge reagents and drain power if the storage is full.
|
||||
R.cell.use(charge_cost) //Take power from borg...
|
||||
RG.add_reagent(reagent_ids[i], 5) //And fill hypo with reagent.
|
||||
|
||||
/obj/item/reagent_containers/borghypo/attack(mob/living/carbon/M, mob/user)
|
||||
var/datum/reagents/R = reagent_list[mode]
|
||||
if(!R.total_volume)
|
||||
to_chat(user, "<span class='notice'>The injector is empty.</span>")
|
||||
return
|
||||
if(!istype(M))
|
||||
return
|
||||
if(R.total_volume && M.can_inject(user, 1, user.zone_selected,bypass_protection))
|
||||
to_chat(M, "<span class='warning'>You feel a tiny prick!</span>")
|
||||
to_chat(user, "<span class='notice'>You inject [M] with the injector.</span>")
|
||||
var/fraction = min(amount_per_transfer_from_this/R.total_volume, 1)
|
||||
R.reaction(M, INJECT, fraction)
|
||||
if(M.reagents)
|
||||
var/trans = R.trans_to(M, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>[trans] unit\s injected. [R.total_volume] unit\s remaining.</span>")
|
||||
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/RG in R.reagent_list)
|
||||
injected += RG.name
|
||||
log_combat(user, M, "injected", src, "(CHEMICALS: [english_list(injected)])")
|
||||
|
||||
/obj/item/reagent_containers/borghypo/attack_self(mob/user)
|
||||
var/chosen_reagent = modes[input(user, "What reagent do you want to dispense?") as null|anything in reagent_ids]
|
||||
if(!chosen_reagent)
|
||||
return
|
||||
mode = chosen_reagent
|
||||
playsound(loc, 'sound/effects/pop.ogg', 50, 0)
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[reagent_ids[mode]]
|
||||
to_chat(user, "<span class='notice'>[src] is now dispensing '[R.name]'.</span>")
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/borghypo/examine(mob/user)
|
||||
usr = user
|
||||
..()
|
||||
DescribeContents() //Because using the standardized reagents datum was just too cool for whatever fuckwit wrote this
|
||||
|
||||
/obj/item/reagent_containers/borghypo/proc/DescribeContents()
|
||||
var/empty = 1
|
||||
|
||||
for(var/datum/reagents/RS in reagent_list)
|
||||
var/datum/reagent/R = locate() in RS.reagent_list
|
||||
if(R)
|
||||
to_chat(usr, "<span class='notice'>It currently has [R.volume] unit\s of [R.name] stored.</span>")
|
||||
empty = 0
|
||||
|
||||
if(empty)
|
||||
to_chat(usr, "<span class='warning'>It is currently empty! Allow some time for the internal syntheszier to produce more.</span>")
|
||||
|
||||
/obj/item/reagent_containers/borghypo/hacked
|
||||
icon_state = "borghypo_s"
|
||||
reagent_ids = list ("facid", "mutetoxin", "cyanide", "sodium_thiopental", "heparin", "lexorin")
|
||||
accepts_reagent_upgrades = FALSE
|
||||
|
||||
/obj/item/reagent_containers/borghypo/clown
|
||||
name = "laughter injector"
|
||||
desc = "Keeps the crew happy and productive!"
|
||||
reagent_ids = list("laughter")
|
||||
accepts_reagent_upgrades = FALSE
|
||||
|
||||
/obj/item/reagent_containers/borghypo/clown/hacked
|
||||
name = "laughter injector"
|
||||
desc = "Keeps the crew so happy they don't work!"
|
||||
reagent_ids = list("superlaughter")
|
||||
accepts_reagent_upgrades = FALSE
|
||||
|
||||
/obj/item/reagent_containers/borghypo/syndicate
|
||||
name = "syndicate cyborg hypospray"
|
||||
desc = "An experimental piece of Syndicate technology used to produce powerful restorative nanites used to very quickly restore injuries of all types. Also metabolizes potassium iodide, for radiation poisoning, and morphine, for offense."
|
||||
icon_state = "borghypo_s"
|
||||
charge_cost = 20
|
||||
recharge_time = 2
|
||||
reagent_ids = list("syndicate_nanites", "potass_iodide", "morphine")
|
||||
bypass_protection = 1
|
||||
accepts_reagent_upgrades = FALSE
|
||||
|
||||
/*
|
||||
Borg Shaker
|
||||
*/
|
||||
/obj/item/reagent_containers/borghypo/borgshaker
|
||||
name = "cyborg shaker"
|
||||
desc = "An advanced drink synthesizer and mixer."
|
||||
icon = 'icons/obj/drinks.dmi'
|
||||
icon_state = "shaker"
|
||||
possible_transfer_amounts = list(5,10,20)
|
||||
charge_cost = 20 //Lots of reagents all regenerating at once, so the charge cost is lower. They also regenerate faster.
|
||||
recharge_time = 3
|
||||
accepts_reagent_upgrades = FALSE
|
||||
|
||||
reagent_ids = list("beer", "orangejuice", "grenadine", "limejuice", "tomatojuice", "cola", "tonic", "sodawater", "ice", "cream", "whiskey", "vodka", "rum", "gin", "tequila", "vermouth", "wine", "kahlua", "cognac", "ale", "milk", "coffee", "banana", "lemonjuice")
|
||||
|
||||
/obj/item/reagent_containers/borghypo/borgshaker/attack(mob/M, mob/user)
|
||||
return //Can't inject stuff with a shaker, can we? //not with that attitude
|
||||
|
||||
/obj/item/reagent_containers/borghypo/borgshaker/regenerate_reagents()
|
||||
if(iscyborg(src.loc))
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
if(R && R.cell)
|
||||
for(var/i in modes) //Lots of reagents in this one, so it's best to regenrate them all at once to keep it from being tedious.
|
||||
var/valueofi = modes[i]
|
||||
var/datum/reagents/RG = reagent_list[valueofi]
|
||||
if(RG.total_volume < RG.maximum_volume)
|
||||
R.cell.use(charge_cost)
|
||||
RG.add_reagent(reagent_ids[valueofi], 5)
|
||||
|
||||
/obj/item/reagent_containers/borghypo/borgshaker/afterattack(obj/target, mob/user, proximity)
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
else if(target.is_refillable())
|
||||
var/datum/reagents/R = reagent_list[mode]
|
||||
if(!R.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is currently out of this ingredient! Please allow some time for the synthesizer to produce more.</span>")
|
||||
return
|
||||
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
var/trans = R.trans_to(target, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You transfer [trans] unit\s of the solution to [target].</span>")
|
||||
|
||||
/obj/item/reagent_containers/borghypo/borgshaker/DescribeContents()
|
||||
var/empty = 1
|
||||
|
||||
var/datum/reagents/RS = reagent_list[mode]
|
||||
var/datum/reagent/R = locate() in RS.reagent_list
|
||||
if(R)
|
||||
to_chat(usr, "<span class='notice'>It currently has [R.volume] unit\s of [R.name] stored.</span>")
|
||||
empty = 0
|
||||
|
||||
if(empty)
|
||||
to_chat(usr, "<span class='warning'>It is currently empty! Please allow some time for the synthesizer to produce more.</span>")
|
||||
|
||||
/obj/item/reagent_containers/borghypo/borgshaker/hacked
|
||||
name = "cyborg shaker"
|
||||
desc = "Will mix drinks that knock them dead."
|
||||
icon = 'icons/obj/drinks.dmi'
|
||||
icon_state = "threemileislandglass"
|
||||
possible_transfer_amounts = list(5,10,20)
|
||||
charge_cost = 20 //Lots of reagents all regenerating at once, so the charge cost is lower. They also regenerate faster.
|
||||
recharge_time = 3
|
||||
accepts_reagent_upgrades = FALSE
|
||||
|
||||
reagent_ids = list("fakebeer", "fernet")
|
||||
|
||||
/obj/item/reagent_containers/borghypo/peace
|
||||
name = "Peace Hypospray"
|
||||
|
||||
reagent_ids = list("dizzysolution","tiresolution","synthpax")
|
||||
accepts_reagent_upgrades = FALSE
|
||||
|
||||
/obj/item/reagent_containers/borghypo/peace/hacked
|
||||
desc = "Everything's peaceful in death!"
|
||||
icon_state = "borghypo_s"
|
||||
reagent_ids = list("dizzysolution","tiresolution","synthpax","tirizene","sulfonal","sodium_thiopental","cyanide","fentanyl")
|
||||
accepts_reagent_upgrades = FALSE
|
||||
|
||||
/obj/item/reagent_containers/borghypo/epi
|
||||
name = "epinephrine injector"
|
||||
desc = "An advanced chemical synthesizer and injection system, designed to stabilize patients."
|
||||
reagent_ids = list("epinephrine")
|
||||
accepts_reagent_upgrades = FALSE
|
||||
@@ -0,0 +1,406 @@
|
||||
//Not to be confused with /obj/item/reagent_containers/food/drinks/bottle
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle
|
||||
name = "bottle"
|
||||
desc = "A small bottle."
|
||||
icon_state = "bottle"
|
||||
item_state = "atoxinbottle"
|
||||
possible_transfer_amounts = list(5,10,15,25,30)
|
||||
volume = 30
|
||||
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/Initialize()
|
||||
. = ..()
|
||||
if(!icon_state)
|
||||
icon_state = "bottle"
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/on_reagent_change(changetype)
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/update_icon()
|
||||
cut_overlays()
|
||||
if(reagents.total_volume)
|
||||
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "[icon_state]-10")
|
||||
|
||||
var/percent = round((reagents.total_volume / volume) * 100)
|
||||
switch(percent)
|
||||
if(0 to 9)
|
||||
filling.icon_state = "[icon_state]-10"
|
||||
if(10 to 29)
|
||||
filling.icon_state = "[icon_state]25"
|
||||
if(30 to 49)
|
||||
filling.icon_state = "[icon_state]50"
|
||||
if(50 to 69)
|
||||
filling.icon_state = "[icon_state]75"
|
||||
if(70 to INFINITY)
|
||||
filling.icon_state = "[icon_state]100"
|
||||
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling)
|
||||
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/epinephrine
|
||||
name = "epinephrine bottle"
|
||||
desc = "A small bottle. Contains epinephrine - used to stabilize patients."
|
||||
list_reagents = list("epinephrine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/toxin
|
||||
name = "toxin bottle"
|
||||
desc = "A small bottle of toxins. Do not drink, it is poisonous."
|
||||
list_reagents = list("toxin" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/cyanide
|
||||
name = "cyanide bottle"
|
||||
desc = "A small bottle of cyanide. Bitter almonds?"
|
||||
list_reagents = list("cyanide" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/spewium
|
||||
name = "spewium bottle"
|
||||
desc = "A small bottle of spewium."
|
||||
list_reagents = list("spewium" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/morphine
|
||||
name = "morphine bottle"
|
||||
desc = "A small bottle of morphine."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
list_reagents = list("morphine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/chloralhydrate
|
||||
name = "Chloral Hydrate Bottle"
|
||||
desc = "A small bottle of Choral Hydrate. Mickey's Favorite!"
|
||||
icon_state = "bottle20"
|
||||
list_reagents = list("chloralhydrate" = 15)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/charcoal
|
||||
name = "charcoal bottle"
|
||||
desc = "A small bottle of charcoal, which removes toxins and other chemicals from the bloodstream."
|
||||
list_reagents = list("charcoal" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/mutagen
|
||||
name = "unstable mutagen bottle"
|
||||
desc = "A small bottle of unstable mutagen. Randomly changes the DNA structure of whoever comes in contact."
|
||||
list_reagents = list("mutagen" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/plasma
|
||||
name = "liquid plasma bottle"
|
||||
desc = "A small bottle of liquid plasma. Extremely toxic and reacts with micro-organisms inside blood."
|
||||
list_reagents = list("plasma" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/synaptizine
|
||||
name = "synaptizine bottle"
|
||||
desc = "A small bottle of synaptizine."
|
||||
list_reagents = list("synaptizine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/formaldehyde
|
||||
name = "formaldehyde bottle"
|
||||
desc = "A small bottle of formaldehyde."
|
||||
list_reagents = list("formaldehyde" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/ammonia
|
||||
name = "ammonia bottle"
|
||||
desc = "A small bottle of ammonia."
|
||||
list_reagents = list("ammonia" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/diethylamine
|
||||
name = "diethylamine bottle"
|
||||
desc = "A small bottle of diethylamine."
|
||||
list_reagents = list("diethylamine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/facid
|
||||
name = "Fluorosulfuric Acid Bottle"
|
||||
desc = "A small bottle. Contains a small amount of fluorosulfuric acid."
|
||||
list_reagents = list("facid" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/adminordrazine
|
||||
name = "Adminordrazine Bottle"
|
||||
desc = "A small bottle. Contains the liquid essence of the gods."
|
||||
icon = 'icons/obj/drinks.dmi'
|
||||
icon_state = "holyflask"
|
||||
list_reagents = list("adminordrazine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/capsaicin
|
||||
name = "Capsaicin Bottle"
|
||||
desc = "A small bottle. Contains hot sauce."
|
||||
list_reagents = list("capsaicin" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/frostoil
|
||||
name = "Frost Oil Bottle"
|
||||
desc = "A small bottle. Contains cold sauce."
|
||||
list_reagents = list("frostoil" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/traitor
|
||||
name = "syndicate bottle"
|
||||
desc = "A small bottle. Contains a random nasty chemical."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
var/extra_reagent = null
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/traitor/Initialize()
|
||||
. = ..()
|
||||
extra_reagent = pick("polonium", "histamine", "formaldehyde", "venom", "fentanyl", "cyanide")
|
||||
reagents.add_reagent("[extra_reagent]", 3)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/polonium
|
||||
name = "polonium bottle"
|
||||
desc = "A small bottle. Contains Polonium."
|
||||
list_reagents = list("polonium" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/magillitis
|
||||
name = "magillitis bottle"
|
||||
desc = "A small bottle. Contains a serum known only as 'magillitis'."
|
||||
list_reagents = list("magillitis" = 5)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/venom
|
||||
name = "venom bottle"
|
||||
desc = "A small bottle. Contains Venom."
|
||||
list_reagents = list("venom" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/fentanyl
|
||||
name = "fentanyl bottle"
|
||||
desc = "A small bottle. Contains Fentanyl."
|
||||
list_reagents = list("fentanyl" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/formaldehyde
|
||||
name = "formaldehyde bottle"
|
||||
desc = "A small bottle. Contains Formaldehyde."
|
||||
list_reagents = list("formaldehyde" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/initropidril
|
||||
name = "initropidril bottle"
|
||||
desc = "A small bottle. Contains initropidril."
|
||||
list_reagents = list("initropidril" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/pancuronium
|
||||
name = "pancuronium bottle"
|
||||
desc = "A small bottle. Contains pancuronium."
|
||||
list_reagents = list("pancuronium" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/sodium_thiopental
|
||||
name = "sodium thiopental bottle"
|
||||
desc = "A small bottle. Contains sodium thiopental."
|
||||
list_reagents = list("sodium_thiopental" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/coniine
|
||||
name = "coniine bottle"
|
||||
desc = "A small bottle. Contains coniine."
|
||||
list_reagents = list("coniine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/curare
|
||||
name = "curare bottle"
|
||||
desc = "A small bottle. Contains curare."
|
||||
list_reagents = list("curare" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/amanitin
|
||||
name = "amanitin bottle"
|
||||
desc = "A small bottle. Contains amanitin."
|
||||
list_reagents = list("amanitin" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/histamine
|
||||
name = "histamine bottle"
|
||||
desc = "A small bottle. Contains Histamine."
|
||||
list_reagents = list("histamine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/diphenhydramine
|
||||
name = "antihistamine bottle"
|
||||
desc = "A small bottle of diphenhydramine."
|
||||
list_reagents = list("diphenhydramine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/potass_iodide
|
||||
name = "anti-radiation bottle"
|
||||
desc = "A small bottle of potassium iodide."
|
||||
list_reagents = list("potass_iodide" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/salglu_solution
|
||||
name = "saline-glucose solution bottle"
|
||||
desc = "A small bottle of saline-glucose solution."
|
||||
icon_state = "bottle1"
|
||||
list_reagents = list("salglu_solution" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/atropine
|
||||
name = "atropine bottle"
|
||||
desc = "A small bottle of atropine."
|
||||
list_reagents = list("atropine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/romerol
|
||||
name = "romerol bottle"
|
||||
desc = "A small bottle of Romerol. The REAL zombie powder."
|
||||
list_reagents = list("romerol" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/random_virus
|
||||
name = "Experimental disease culture bottle"
|
||||
desc = "A small bottle. Contains an untested viral culture in synthblood medium."
|
||||
spawned_disease = /datum/disease/advance/random
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/pierrot_throat
|
||||
name = "Pierrot's Throat culture bottle"
|
||||
desc = "A small bottle. Contains H0NI<42 virion culture in synthblood medium."
|
||||
spawned_disease = /datum/disease/pierrot_throat
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/cold
|
||||
name = "Rhinovirus culture bottle"
|
||||
desc = "A small bottle. Contains XY-rhinovirus culture in synthblood medium."
|
||||
spawned_disease = /datum/disease/advance/cold
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/flu_virion
|
||||
name = "Flu virion culture bottle"
|
||||
desc = "A small bottle. Contains H13N1 flu virion culture in synthblood medium."
|
||||
spawned_disease = /datum/disease/advance/flu
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/retrovirus
|
||||
name = "Retrovirus culture bottle"
|
||||
desc = "A small bottle. Contains a retrovirus culture in a synthblood medium."
|
||||
spawned_disease = /datum/disease/dna_retrovirus
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/gbs
|
||||
name = "GBS culture bottle"
|
||||
desc = "A small bottle. Contains Gravitokinetic Bipotential SADS+ culture in synthblood medium."//Or simply - General BullShit
|
||||
amount_per_transfer_from_this = 5
|
||||
spawned_disease = /datum/disease/gbs
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/fake_gbs
|
||||
name = "GBS culture bottle"
|
||||
desc = "A small bottle. Contains Gravitokinetic Bipotential SADS- culture in synthblood medium."//Or simply - General BullShit
|
||||
spawned_disease = /datum/disease/fake_gbs
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/brainrot
|
||||
name = "Brainrot culture bottle"
|
||||
desc = "A small bottle. Contains Cryptococcus Cosmosis culture in synthblood medium."
|
||||
icon_state = "bottle3"
|
||||
spawned_disease = /datum/disease/brainrot
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/magnitis
|
||||
name = "Magnitis culture bottle"
|
||||
desc = "A small bottle. Contains a small dosage of Fukkos Miracos."
|
||||
spawned_disease = /datum/disease/magnitis
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/wizarditis
|
||||
name = "Wizarditis culture bottle"
|
||||
desc = "A small bottle. Contains a sample of Rincewindus Vulgaris."
|
||||
spawned_disease = /datum/disease/wizarditis
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/anxiety
|
||||
name = "Severe Anxiety culture bottle"
|
||||
desc = "A small bottle. Contains a sample of Lepidopticides."
|
||||
spawned_disease = /datum/disease/anxiety
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/beesease
|
||||
name = "Beesease culture bottle"
|
||||
desc = "A small bottle. Contains a sample of invasive Apidae."
|
||||
spawned_disease = /datum/disease/beesease
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/fluspanish
|
||||
name = "Spanish flu culture bottle"
|
||||
desc = "A small bottle. Contains a sample of Inquisitius."
|
||||
spawned_disease = /datum/disease/fluspanish
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/tuberculosis
|
||||
name = "Fungal Tuberculosis culture bottle"
|
||||
desc = "A small bottle. Contains a sample of Fungal Tubercle bacillus."
|
||||
spawned_disease = /datum/disease/tuberculosis
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/tuberculosiscure
|
||||
name = "BVAK bottle"
|
||||
desc = "A small bottle containing Bio Virus Antidote Kit."
|
||||
list_reagents = list("atropine" = 5, "epinephrine" = 5, "salbutamol" = 10, "spaceacillin" = 10)
|
||||
|
||||
//Oldstation.dmm chemical storage bottles
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/hydrogen
|
||||
name = "hydrogen bottle"
|
||||
list_reagents = list("hydrogen" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/lithium
|
||||
name = "lithium bottle"
|
||||
list_reagents = list("lithium" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/carbon
|
||||
name = "carbon bottle"
|
||||
list_reagents = list("carbon" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/nitrogen
|
||||
name = "nitrogen bottle"
|
||||
list_reagents = list("nitrogen" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/oxygen
|
||||
name = "oxygen bottle"
|
||||
list_reagents = list("oxygen" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/fluorine
|
||||
name = "fluorine bottle"
|
||||
list_reagents = list("fluorine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/sodium
|
||||
name = "sodium bottle"
|
||||
list_reagents = list("sodium" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/aluminium
|
||||
name = "aluminium bottle"
|
||||
list_reagents = list("aluminium" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/silicon
|
||||
name = "silicon bottle"
|
||||
list_reagents = list("silicon" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/phosphorus
|
||||
name = "phosphorus bottle"
|
||||
list_reagents = list("phosphorus" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/sulfur
|
||||
name = "sulfur bottle"
|
||||
list_reagents = list("sulfur" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/chlorine
|
||||
name = "chlorine bottle"
|
||||
list_reagents = list("chlorine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/potassium
|
||||
name = "potassium bottle"
|
||||
list_reagents = list("potassium" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/iron
|
||||
name = "iron bottle"
|
||||
list_reagents = list("iron" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/copper
|
||||
name = "copper bottle"
|
||||
list_reagents = list("copper" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/mercury
|
||||
name = "mercury bottle"
|
||||
list_reagents = list("mercury" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/radium
|
||||
name = "radium bottle"
|
||||
list_reagents = list("radium" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/water
|
||||
name = "water bottle"
|
||||
list_reagents = list("water" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/ethanol
|
||||
name = "ethanol bottle"
|
||||
list_reagents = list("ethanol" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/sugar
|
||||
name = "sugar bottle"
|
||||
list_reagents = list("sugar" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/sacid
|
||||
name = "sulphuric acid bottle"
|
||||
list_reagents = list("sacid" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/welding_fuel
|
||||
name = "welding fuel bottle"
|
||||
list_reagents = list("welding_fuel" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/silver
|
||||
name = "silver bottle"
|
||||
list_reagents = list("silver" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/iodine
|
||||
name = "iodine bottle"
|
||||
list_reagents = list("iodine" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/bottle/bromine
|
||||
name = "bromine bottle"
|
||||
list_reagents = list("bromine" = 30)
|
||||
@@ -0,0 +1,102 @@
|
||||
/obj/item/reagent_containers/dropper
|
||||
name = "dropper"
|
||||
desc = "A dropper. Holds up to 5 units."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "dropper0"
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list(1, 2, 3, 4, 5)
|
||||
volume = 5
|
||||
reagent_flags = TRANSPARENT
|
||||
|
||||
/obj/item/reagent_containers/dropper/afterattack(obj/target, mob/user , proximity)
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
return
|
||||
if(!target.reagents)
|
||||
return
|
||||
|
||||
if(reagents.total_volume > 0)
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
if(!target.is_injectable())
|
||||
to_chat(user, "<span class='warning'>You cannot directly fill [target]!</span>")
|
||||
return
|
||||
|
||||
var/trans = 0
|
||||
var/fraction = min(amount_per_transfer_from_this/reagents.total_volume, 1)
|
||||
|
||||
if(ismob(target))
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/victim = target
|
||||
|
||||
var/obj/item/safe_thing = null
|
||||
if(victim.wear_mask)
|
||||
if(victim.wear_mask.flags_cover & MASKCOVERSEYES)
|
||||
safe_thing = victim.wear_mask
|
||||
if(victim.head)
|
||||
if(victim.head.flags_cover & MASKCOVERSEYES)
|
||||
safe_thing = victim.head
|
||||
if(victim.glasses)
|
||||
if(!safe_thing)
|
||||
safe_thing = victim.glasses
|
||||
|
||||
if(safe_thing)
|
||||
if(!safe_thing.reagents)
|
||||
safe_thing.create_reagents(100)
|
||||
|
||||
reagents.reaction(safe_thing, TOUCH, fraction)
|
||||
trans = reagents.trans_to(safe_thing, amount_per_transfer_from_this)
|
||||
|
||||
target.visible_message("<span class='danger'>[user] tries to squirt something into [target]'s eyes, but fails!</span>", \
|
||||
"<span class='userdanger'>[user] tries to squirt something into [target]'s eyes, but fails!</span>")
|
||||
|
||||
to_chat(user, "<span class='notice'>You transfer [trans] unit\s of the solution.</span>")
|
||||
update_icon()
|
||||
return
|
||||
else if(isalien(target)) //hiss-hiss has no eyes!
|
||||
to_chat(target, "<span class='danger'>[target] does not seem to have any eyes!</span>")
|
||||
return
|
||||
|
||||
target.visible_message("<span class='danger'>[user] squirts something into [target]'s eyes!</span>", \
|
||||
"<span class='userdanger'>[user] squirts something into [target]'s eyes!</span>")
|
||||
|
||||
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.id + " ("
|
||||
R += num2text(A.volume) + "),"
|
||||
log_combat(user, M, "squirted", R)
|
||||
|
||||
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>")
|
||||
update_icon()
|
||||
|
||||
else
|
||||
|
||||
if(!target.is_drawable(FALSE)) //No drawing from mobs here
|
||||
to_chat(user, "<span class='notice'>You cannot directly remove reagents from [target].</span>")
|
||||
return
|
||||
|
||||
if(!target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty!</span>")
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
|
||||
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [trans] unit\s of the solution.</span>")
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/dropper/update_icon()
|
||||
cut_overlays()
|
||||
if(reagents.total_volume)
|
||||
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "dropper")
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling)
|
||||
|
||||
/obj/item/reagent_containers/dropper/get_belt_overlay()
|
||||
return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "pouch")
|
||||
@@ -0,0 +1,363 @@
|
||||
/obj/item/reagent_containers/glass
|
||||
name = "glass"
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5, 10, 15, 20, 25, 30, 50)
|
||||
volume = 50
|
||||
reagent_flags = OPENCONTAINER
|
||||
spillable = TRUE
|
||||
resistance_flags = ACID_PROOF
|
||||
container_HP = 3
|
||||
|
||||
|
||||
/obj/item/reagent_containers/glass/attack(mob/M, mob/user, obj/target)
|
||||
if(!canconsume(M, user))
|
||||
return
|
||||
|
||||
if(!spillable)
|
||||
return
|
||||
|
||||
if(!reagents || !reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return
|
||||
|
||||
if(istype(M))
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
var/R
|
||||
M.visible_message("<span class='danger'>[user] splashes the contents of [src] onto [M]!</span>", \
|
||||
"<span class='userdanger'>[user] splashes the contents of [src] onto [M]!</span>")
|
||||
if(reagents)
|
||||
for(var/datum/reagent/A in reagents.reagent_list)
|
||||
R += A.id + " ("
|
||||
R += num2text(A.volume) + "),"
|
||||
if(isturf(target) && reagents.reagent_list.len && thrownby)
|
||||
log_combat(thrownby, target, "splashed (thrown) [english_list(reagents.reagent_list)]")
|
||||
message_admins("[ADMIN_LOOKUPFLW(thrownby)] splashed (thrown) [english_list(reagents.reagent_list)] on [target] at [ADMIN_VERBOSEJMP(target)].")
|
||||
reagents.reaction(M, TOUCH)
|
||||
log_combat(user, M, "splashed", R)
|
||||
reagents.clear_reagents()
|
||||
else
|
||||
if(M != user)
|
||||
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))
|
||||
return
|
||||
if(!reagents || !reagents.total_volume)
|
||||
return // The drink might be empty after the delay, such as by spam-feeding
|
||||
M.visible_message("<span class='danger'>[user] feeds something to [M].</span>", "<span class='userdanger'>[user] feeds something to you.</span>")
|
||||
log_combat(user, M, "fed", reagents.log_list())
|
||||
else
|
||||
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)
|
||||
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
|
||||
|
||||
/obj/item/reagent_containers/glass/afterattack(obj/target, mob/user, proximity)
|
||||
. = ..()
|
||||
if((!proximity) || !check_allowed_items(target,target_self=1))
|
||||
return
|
||||
|
||||
if(target.is_refillable()) //Something like a glass. Player probably wants to transfer TO it.
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return
|
||||
|
||||
if(target.reagents.holder_full())
|
||||
to_chat(user, "<span class='warning'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
var/trans = reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
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.
|
||||
if(!target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty and can't be refilled!</span>")
|
||||
return
|
||||
|
||||
if(reagents.holder_full())
|
||||
to_chat(user, "<span class='warning'>[src] is full.</span>")
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [trans] unit\s of the contents of [target].</span>")
|
||||
|
||||
else if(reagents.total_volume)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
user.visible_message("<span class='danger'>[user] splashes the contents of [src] onto [target]!</span>", \
|
||||
"<span class='notice'>You splash the contents of [src] onto [target].</span>")
|
||||
reagents.reaction(target, TOUCH)
|
||||
reagents.clear_reagents()
|
||||
|
||||
/obj/item/reagent_containers/glass/attackby(obj/item/I, mob/user, params)
|
||||
var/hotness = I.is_hot()
|
||||
if(hotness && reagents)
|
||||
reagents.expose_temperature(hotness)
|
||||
to_chat(user, "<span class='notice'>You heat [name] with [I]!</span>")
|
||||
|
||||
if(istype(I, /obj/item/reagent_containers/food/snacks/egg)) //breaking eggs
|
||||
var/obj/item/reagent_containers/food/snacks/egg/E = I
|
||||
if(reagents)
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
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)
|
||||
qdel(E)
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker
|
||||
name = "beaker"
|
||||
desc = "A beaker. It can hold up to 50 units. Unable to withstand extreme pHes"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "beaker"
|
||||
item_state = "beaker"
|
||||
materials = list(MAT_GLASS=500)
|
||||
beaker_weakness_bitflag = PH_WEAK
|
||||
container_HP = 5
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/get_part_rating()
|
||||
return reagents.maximum_volume
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/on_reagent_change(changetype)
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
if(reagents.total_volume)
|
||||
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "[icon_state]10")
|
||||
|
||||
var/percent = round((reagents.total_volume / volume) * 100)
|
||||
switch(percent)
|
||||
if(0 to 9)
|
||||
filling.icon_state = "[icon_state]-10"
|
||||
if(10 to 24)
|
||||
filling.icon_state = "[icon_state]10"
|
||||
if(25 to 49)
|
||||
filling.icon_state = "[icon_state]25"
|
||||
if(50 to 74)
|
||||
filling.icon_state = "[icon_state]50"
|
||||
if(75 to 79)
|
||||
filling.icon_state = "[icon_state]75"
|
||||
if(80 to 90)
|
||||
filling.icon_state = "[icon_state]80"
|
||||
if(91 to INFINITY)
|
||||
filling.icon_state = "[icon_state]100"
|
||||
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling)
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/jar
|
||||
name = "honey jar"
|
||||
desc = "A jar for honey. It can hold up to 50 units of sweet delight. Unable to withstand reagents of an extreme pH."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "vapour"
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/large
|
||||
name = "large beaker"
|
||||
desc = "A large beaker. Can hold up to 100 units. Unable to withstand reagents of an extreme pH."
|
||||
icon_state = "beakerlarge"
|
||||
materials = list(MAT_GLASS=2500)
|
||||
volume = 100
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,50,100)
|
||||
container_HP = 6
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/plastic
|
||||
name = "x-large beaker"
|
||||
desc = "An extra-large beaker. Can hold up to 150 units. Is able to resist acid and alkaline solutions, but melts at 444K"
|
||||
icon_state = "beakerwhite"
|
||||
materials = list(MAT_GLASS=2500, MAT_PLASTIC=3000)
|
||||
volume = 150
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,50,100,150)
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/plastic/Initialize()
|
||||
beaker_weakness_bitflag &= ~PH_WEAK
|
||||
beaker_weakness_bitflag |= TEMP_WEAK
|
||||
. = ..()
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/plastic/update_icon()
|
||||
icon_state = "beakerlarge" // hack to lets us reuse the large beaker reagent fill states
|
||||
..()
|
||||
icon_state = "beakerwhite"
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/meta
|
||||
name = "metamaterial beaker"
|
||||
desc = "A large beaker. Can hold up to 200 units. Is able to withstand all chemical situations."
|
||||
icon_state = "beakergold"
|
||||
materials = list(MAT_GLASS=2500, MAT_PLASTIC=3000, MAT_GOLD=1000, MAT_TITANIUM=1000)
|
||||
volume = 200
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,50,100,200)
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/meta/Initialize()
|
||||
beaker_weakness_bitflag &= ~PH_WEAK
|
||||
. = ..()
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/noreact
|
||||
name = "cryostasis beaker"
|
||||
desc = "A cryostasis beaker that allows for chemical storage without \
|
||||
reactions. Can hold up to 50 units."
|
||||
icon_state = "beakernoreact"
|
||||
materials = list(MAT_METAL=3000)
|
||||
reagent_flags = OPENCONTAINER | NO_REACT
|
||||
volume = 50
|
||||
amount_per_transfer_from_this = 10
|
||||
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 \
|
||||
and Element Cuban combined with the Compound Pete. Can hold up to \
|
||||
300 units. Unable to withstand reagents of an extreme pH."
|
||||
icon_state = "beakerbluespace"
|
||||
materials = list(MAT_GLASS=3000)
|
||||
volume = 300
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,50,100,300)
|
||||
container_HP = 8
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/cryoxadone
|
||||
list_reagents = list("cryoxadone" = 30)
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/sulphuric
|
||||
list_reagents = list("sacid" = 50)
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/slime
|
||||
list_reagents = list("slimejelly" = 50)
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/large/styptic
|
||||
name = "styptic reserve tank"
|
||||
list_reagents = list("styptic_powder" = 50)
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/large/silver_sulfadiazine
|
||||
name = "silver sulfadiazine reserve tank"
|
||||
list_reagents = list("silver_sulfadiazine" = 50)
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/large/charcoal
|
||||
name = "charcoal reserve tank"
|
||||
list_reagents = list("charcoal" = 50)
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/large/epinephrine
|
||||
name = "epinephrine reserve tank"
|
||||
list_reagents = list("epinephrine" = 50)
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/synthflesh
|
||||
list_reagents = list("synthflesh" = 50)
|
||||
|
||||
/obj/item/reagent_containers/glass/bucket
|
||||
name = "bucket"
|
||||
desc = "It's a bucket."
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "bucket"
|
||||
item_state = "bucket"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/custodial_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi'
|
||||
materials = list(MAT_METAL=200)
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
amount_per_transfer_from_this = 20
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,50,70)
|
||||
volume = 70
|
||||
flags_inv = HIDEHAIR
|
||||
slot_flags = ITEM_SLOT_HEAD
|
||||
resistance_flags = NONE
|
||||
armor = list("melee" = 10, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 75, "acid" = 50) //Weak melee protection, because you can wear it on your head
|
||||
slot_equipment_priority = list( \
|
||||
SLOT_BACK, SLOT_WEAR_ID,\
|
||||
SLOT_W_UNIFORM, SLOT_WEAR_SUIT,\
|
||||
SLOT_WEAR_MASK, SLOT_HEAD, SLOT_NECK,\
|
||||
SLOT_SHOES, SLOT_GLOVES,\
|
||||
SLOT_EARS, SLOT_GLASSES,\
|
||||
SLOT_BELT, SLOT_S_STORE,\
|
||||
SLOT_L_STORE, SLOT_R_STORE,\
|
||||
SLOT_GENERC_DEXTROUS_STORAGE
|
||||
)
|
||||
container_HP = 2
|
||||
|
||||
/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)
|
||||
to_chat(user, "<span class='notice'>You wet [O] in [src].</span>")
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
else if(isprox(O))
|
||||
to_chat(user, "<span class='notice'>You add [O] to [src].</span>")
|
||||
qdel(O)
|
||||
qdel(src)
|
||||
user.put_in_hands(new /obj/item/bot_assembly/cleanbot)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/glass/bucket/equipped(mob/user, slot)
|
||||
..()
|
||||
if (slot == SLOT_HEAD)
|
||||
if(reagents.total_volume)
|
||||
to_chat(user, "<span class='userdanger'>[src]'s contents spill all over you!</span>")
|
||||
reagents.reaction(user, TOUCH)
|
||||
reagents.clear_reagents()
|
||||
reagent_flags = NONE
|
||||
|
||||
/obj/item/reagent_containers/glass/bucket/dropped(mob/user)
|
||||
. = ..()
|
||||
reagent_flags = initial(reagent_flags)
|
||||
|
||||
/obj/item/reagent_containers/glass/bucket/equip_to_best_slot(var/mob/M)
|
||||
if(reagents.total_volume) //If there is water in a bucket, don't quick equip it to the head
|
||||
var/index = slot_equipment_priority.Find(SLOT_HEAD)
|
||||
slot_equipment_priority.Remove(SLOT_HEAD)
|
||||
. = ..()
|
||||
slot_equipment_priority.Insert(index, SLOT_HEAD)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/waterbottle
|
||||
name = "bottle of water"
|
||||
desc = "A bottle of water filled at an old Earth bottling facility."
|
||||
icon = 'icons/obj/drinks.dmi'
|
||||
icon_state = "smallbottle"
|
||||
item_state = "bottle"
|
||||
list_reagents = list("water" = 49.5, "fluorine" = 0.5)//see desc, don't think about it too hard
|
||||
materials = list(MAT_GLASS=0)
|
||||
volume = 50
|
||||
amount_per_transfer_from_this = 10
|
||||
container_HP = 2
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/waterbottle/Initialize()
|
||||
beaker_weakness_bitflag |= TEMP_WEAK
|
||||
. = ..()
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/waterbottle/empty
|
||||
list_reagents = list()
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/waterbottle/large
|
||||
desc = "A fresh commercial-sized bottle of water."
|
||||
icon_state = "largebottle"
|
||||
materials = list(MAT_GLASS=0)
|
||||
list_reagents = list("water" = 100)
|
||||
volume = 100
|
||||
amount_per_transfer_from_this = 20
|
||||
container_HP = 2
|
||||
|
||||
/obj/item/reagent_containers/glass/beaker/waterbottle/large/empty
|
||||
list_reagents = list()
|
||||
|
||||
/obj/item/reagent_containers/glass/get_belt_overlay()
|
||||
return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "bottle")
|
||||
@@ -0,0 +1,183 @@
|
||||
/obj/item/reagent_containers/hypospray
|
||||
name = "hypospray"
|
||||
desc = "The DeForest Medical Corporation hypospray is a sterile, air-needle autoinjector for rapid administration of drugs to patients."
|
||||
icon = 'icons/obj/syringe.dmi'
|
||||
item_state = "hypo"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
icon_state = "hypo"
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 30
|
||||
possible_transfer_amounts = list()
|
||||
resistance_flags = ACID_PROOF
|
||||
reagent_flags = OPENCONTAINER
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
var/ignore_flags = 0
|
||||
var/infinite = FALSE
|
||||
|
||||
/obj/item/reagent_containers/hypospray/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/attack(mob/living/M, mob/user)
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return
|
||||
if(!iscarbon(M))
|
||||
return
|
||||
|
||||
//Always log attemped injects for admins
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
injected += R.name
|
||||
var/contained = english_list(injected)
|
||||
log_combat(user, M, "attempted to inject", src, "([contained])")
|
||||
|
||||
if(reagents.total_volume && (ignore_flags || M.can_inject(user, 1))) // Ignore flag should be checked first or there will be an error message.
|
||||
to_chat(M, "<span class='warning'>You feel a tiny prick!</span>")
|
||||
to_chat(user, "<span class='notice'>You inject [M] with [src].</span>")
|
||||
|
||||
var/fraction = min(amount_per_transfer_from_this/reagents.total_volume, 1)
|
||||
reagents.reaction(M, INJECT, fraction)
|
||||
if(M.reagents)
|
||||
var/trans = 0
|
||||
if(!infinite)
|
||||
trans = reagents.trans_to(M, amount_per_transfer_from_this)
|
||||
else
|
||||
trans = reagents.copy_to(M, amount_per_transfer_from_this)
|
||||
|
||||
to_chat(user, "<span class='notice'>[trans] unit\s injected. [reagents.total_volume] unit\s remaining in [src].</span>")
|
||||
|
||||
|
||||
log_combat(user, M, "injected", src, "([contained])")
|
||||
|
||||
/obj/item/reagent_containers/hypospray/CMO
|
||||
list_reagents = list("omnizine" = 30)
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/reagent_containers/hypospray/combat
|
||||
name = "combat stimulant injector"
|
||||
desc = "A modified air-needle autoinjector, used by support operatives to quickly heal injuries in combat."
|
||||
amount_per_transfer_from_this = 10
|
||||
icon_state = "combat_hypo"
|
||||
volume = 90
|
||||
ignore_flags = 1 // So they can heal their comrades.
|
||||
list_reagents = list("epinephrine" = 30, "omnizine" = 30, "leporazine" = 15, "atropine" = 15)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/combat/nanites
|
||||
desc = "A modified air-needle autoinjector for use in combat situations. Prefilled with experimental medical compounds for rapid healing."
|
||||
volume = 100
|
||||
list_reagents = list("quantum_heal" = 80, "synaptizine" = 20)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/magillitis
|
||||
name = "experimental autoinjector"
|
||||
desc = "A modified air-needle autoinjector with a small single-use reservoir. It contains an experimental serum."
|
||||
icon_state = "combat_hypo"
|
||||
volume = 5
|
||||
reagent_flags = NONE
|
||||
list_reagents = list("magillitis" = 5)
|
||||
|
||||
//MediPens
|
||||
|
||||
/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."
|
||||
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
|
||||
ignore_flags = 1 //so you can medipen through hardsuits
|
||||
reagent_flags = DRAWABLE
|
||||
flags_1 = null
|
||||
list_reagents = list("epinephrine" = 10)
|
||||
|
||||
/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>")
|
||||
return OXYLOSS//ironic. he could save others from oxyloss, but not himself.
|
||||
|
||||
/obj/item/reagent_containers/hypospray/medipen/attack(mob/M, mob/user)
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return
|
||||
..()
|
||||
if(!iscyborg(user))
|
||||
reagents.maximum_volume = 0 //Makes them useless afterwards
|
||||
reagent_flags = NONE
|
||||
update_icon()
|
||||
addtimer(CALLBACK(src, .proc/cyborg_recharge, user), 80)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/medipen/proc/cyborg_recharge(mob/living/silicon/robot/user)
|
||||
if(!reagents.total_volume && iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(R.cell.use(100))
|
||||
reagents.add_reagent_list(list_reagents)
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/hypospray/medipen/update_icon()
|
||||
if(reagents.total_volume > 0)
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]0"
|
||||
|
||||
/obj/item/reagent_containers/hypospray/medipen/examine()
|
||||
..()
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
to_chat(usr, "<span class='notice'>It is currently loaded.</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>It is spent.</span>")
|
||||
|
||||
/obj/item/reagent_containers/hypospray/medipen/stimpack //goliath kiting
|
||||
name = "stimpack medipen"
|
||||
desc = "A rapid way to stimulate your body's adrenaline, allowing for freer movement in restrictive armor."
|
||||
icon_state = "stimpen"
|
||||
volume = 20
|
||||
amount_per_transfer_from_this = 20
|
||||
list_reagents = list("ephedrine" = 10, "coffee" = 10)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/medipen/stimpack/traitor
|
||||
desc = "A modified stimulants autoinjector for use in combat situations. Has a mild healing effect."
|
||||
list_reagents = list("stimulants" = 10, "omnizine" = 10)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/medipen/morphine
|
||||
name = "morphine medipen"
|
||||
desc = "A rapid way to get you out of a tight situation and fast! You'll feel rather drowsy, though."
|
||||
list_reagents = list("morphine" = 10)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/medipen/tuberculosiscure
|
||||
name = "BVAK autoinjector"
|
||||
desc = "Bio Virus Antidote Kit autoinjector. Has a two use system for yourself, and someone else. Inject when infected."
|
||||
icon_state = "stimpen"
|
||||
volume = 60
|
||||
amount_per_transfer_from_this = 30
|
||||
list_reagents = list("atropine" = 10, "epinephrine" = 10, "salbutamol" = 20, "spaceacillin" = 20)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/medipen/survival
|
||||
name = "survival medipen"
|
||||
desc = "A medipen for surviving in the harshest of environments, heals and protects from environmental hazards. WARNING: Do not inject more than one pen in quick succession."
|
||||
icon_state = "stimpen"
|
||||
volume = 52
|
||||
amount_per_transfer_from_this = 52
|
||||
list_reagents = list("salbutamol" = 10, "leporazine" = 15, "neo_jelly" = 15, "epinephrine" = 10, "lavaland_extract" = 2)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/medipen/species_mutator
|
||||
name = "species mutator medipen"
|
||||
desc = "Embark on a whirlwind tour of racial insensitivity by \
|
||||
literally appropriating other races."
|
||||
volume = 1
|
||||
amount_per_transfer_from_this = 1
|
||||
list_reagents = list("unstablemutationtoxin" = 1)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/medipen/firelocker
|
||||
name = "fire treatment medipen"
|
||||
desc = "A medipen that has been fulled with burn healing chemicals for personnel without advanced medical knowledge."
|
||||
volume = 15
|
||||
amount_per_transfer_from_this = 15
|
||||
list_reagents = list("oxandrolone" = 5, "kelotane" = 10)
|
||||
|
||||
/obj/item/reagent_containers/hypospray/combat/heresypurge
|
||||
name = "holy water autoinjector"
|
||||
desc = "A modified air-needle autoinjector for use in combat situations. Prefilled with 5 doses of a holy water mixture."
|
||||
volume = 250
|
||||
list_reagents = list("holywater" = 150, "tiresolution" = 50, "dizzysolution" = 50)
|
||||
amount_per_transfer_from_this = 50
|
||||
@@ -0,0 +1,91 @@
|
||||
/obj/item/reagent_containers/medspray
|
||||
name = "medical spray"
|
||||
desc = "A medical spray bottle, designed for precision application, with an unscrewable cap."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "medspray"
|
||||
item_state = "spraycan"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/hydroponics_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi'
|
||||
item_flags = NOBLUDGEON
|
||||
obj_flags = UNIQUE_RENAME
|
||||
reagent_flags = OPENCONTAINER
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
amount_per_transfer_from_this = 10
|
||||
volume = 60
|
||||
var/can_fill_from_container = TRUE
|
||||
var/apply_type = PATCH
|
||||
var/apply_method = "spray"
|
||||
var/self_delay = 30
|
||||
var/squirt_mode = 0
|
||||
var/squirt_amount = 5
|
||||
|
||||
/obj/item/reagent_containers/medspray/attack_self(mob/user)
|
||||
squirt_mode = !squirt_mode
|
||||
if(squirt_mode)
|
||||
amount_per_transfer_from_this = squirt_amount
|
||||
else
|
||||
amount_per_transfer_from_this = initial(amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You will now apply the medspray's contents in [squirt_mode ? "short bursts":"extended sprays"]. You'll now use [amount_per_transfer_from_this] units per use.</span>")
|
||||
|
||||
/obj/item/reagent_containers/medspray/attack(mob/M, mob/user, def_zone)
|
||||
if(!reagents || !reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return
|
||||
|
||||
if(M == user)
|
||||
M.visible_message("<span class='notice'>[user] attempts to [apply_method] [src] on [user.p_them()]self.</span>")
|
||||
if(self_delay)
|
||||
if(!do_mob(user, M, self_delay))
|
||||
return
|
||||
if(!reagents || !reagents.total_volume)
|
||||
return
|
||||
to_chat(M, "<span class='notice'>You [apply_method] yourself with [src].</span>")
|
||||
|
||||
else
|
||||
log_combat(user, M, "attempted to apply", src, reagents.log_list())
|
||||
M.visible_message("<span class='danger'>[user] attempts to [apply_method] [src] on [M].</span>", \
|
||||
"<span class='userdanger'>[user] attempts to [apply_method] [src] on [M].</span>")
|
||||
if(!do_mob(user, M))
|
||||
return
|
||||
if(!reagents || !reagents.total_volume)
|
||||
return
|
||||
M.visible_message("<span class='danger'>[user] [apply_method]s [M] down with [src].</span>", \
|
||||
"<span class='userdanger'>[user] [apply_method]s [M] down with [src].</span>")
|
||||
|
||||
if(!reagents || !reagents.total_volume)
|
||||
return
|
||||
|
||||
else
|
||||
log_combat(user, M, "applied", src, reagents.log_list())
|
||||
playsound(src, 'sound/effects/spray2.ogg', 50, 1, -6)
|
||||
var/fraction = min(amount_per_transfer_from_this/reagents.total_volume, 1)
|
||||
reagents.reaction(M, apply_type, fraction)
|
||||
reagents.trans_to(M, amount_per_transfer_from_this)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/medspray/styptic
|
||||
name = "medical spray (styptic powder)"
|
||||
desc = "A medical spray bottle, designed for precision application, with an unscrewable cap. This one contains styptic powder, for treating cuts and bruises."
|
||||
icon_state = "brutespray"
|
||||
list_reagents = list("styptic_powder" = 60)
|
||||
|
||||
/obj/item/reagent_containers/medspray/silver_sulf
|
||||
name = "medical spray (silver sulfadiazine)"
|
||||
desc = "A medical spray bottle, designed for precision application, with an unscrewable cap. This one contains silver sulfadiazine, useful for treating burns."
|
||||
icon_state = "burnspray"
|
||||
list_reagents = list("silver_sulfadiazine" = 60)
|
||||
|
||||
/obj/item/reagent_containers/medspray/synthflesh
|
||||
name = "medical spray (synthflesh)"
|
||||
desc = "A medical spray bottle, designed for precision application, with an unscrewable cap. This one contains synthflesh, an apex brute and burn healing agent."
|
||||
icon_state = "synthspray"
|
||||
list_reagents = list("synthflesh" = 60)
|
||||
|
||||
/obj/item/reagent_containers/medspray/sterilizine
|
||||
name = "sterilizer spray"
|
||||
desc = "Spray bottle loaded with non-toxic sterilizer. Useful in preparation for surgery."
|
||||
list_reagents = list("sterilizine" = 60)
|
||||
@@ -0,0 +1,45 @@
|
||||
/obj/item/reagent_containers/pill/patch
|
||||
name = "chemical patch"
|
||||
desc = "A chemical patch for touch based applications."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bandaid"
|
||||
item_state = "bandaid"
|
||||
possible_transfer_amounts = list()
|
||||
volume = 40
|
||||
apply_type = PATCH
|
||||
apply_method = "apply"
|
||||
self_delay = 30 // three seconds
|
||||
dissolvable = FALSE
|
||||
|
||||
/obj/item/reagent_containers/pill/patch/attack(mob/living/L, mob/user)
|
||||
if(ishuman(L))
|
||||
var/obj/item/bodypart/affecting = L.get_bodypart(check_zone(user.zone_selected))
|
||||
if(!affecting)
|
||||
to_chat(user, "<span class='warning'>The limb is missing!</span>")
|
||||
return
|
||||
if(!L.can_inject(user, TRUE, user.zone_selected, FALSE, TRUE)) //stopped by clothing, not by species immunity.
|
||||
return
|
||||
if(affecting.status != BODYPART_ORGANIC)
|
||||
to_chat(user, "<span class='notice'>Medicine won't work on a robotic limb!</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/pill/patch/canconsume(mob/eater, mob/user)
|
||||
if(!iscarbon(eater))
|
||||
return 0
|
||||
return 1 // Masks were stopping people from "eating" patches. Thanks, inheritance.
|
||||
|
||||
/obj/item/reagent_containers/pill/patch/styptic
|
||||
name = "brute patch"
|
||||
desc = "Helps with brute injuries."
|
||||
list_reagents = list("styptic_powder" = 20)
|
||||
icon_state = "bandaid_brute"
|
||||
|
||||
/obj/item/reagent_containers/pill/patch/silver_sulf
|
||||
name = "burn patch"
|
||||
desc = "Helps with burn injuries."
|
||||
list_reagents = list("silver_sulfadiazine" = 20)
|
||||
icon_state = "bandaid_burn"
|
||||
|
||||
/obj/item/reagent_containers/pill/patch/get_belt_overlay()
|
||||
return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "pouch")
|
||||
@@ -0,0 +1,259 @@
|
||||
/obj/item/reagent_containers/pill
|
||||
name = "pill"
|
||||
desc = "A tablet or capsule."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "pill"
|
||||
item_state = "pill"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
possible_transfer_amounts = list()
|
||||
volume = 50
|
||||
grind_results = list()
|
||||
var/apply_type = INGEST
|
||||
var/apply_method = "swallow"
|
||||
var/roundstart = 0
|
||||
var/self_delay = 0 //pills are instant, this is because patches inheret their aplication from pills
|
||||
var/dissolvable = TRUE
|
||||
|
||||
/obj/item/reagent_containers/pill/Initialize()
|
||||
. = ..()
|
||||
if(!icon_state)
|
||||
icon_state = "pill[rand(1,20)]"
|
||||
if(reagents.total_volume && roundstart)
|
||||
name += " ([reagents.total_volume]u)"
|
||||
|
||||
|
||||
/obj/item/reagent_containers/pill/attack_self(mob/user)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/reagent_containers/pill/attack(mob/M, mob/user, def_zone)
|
||||
if(!canconsume(M, user))
|
||||
return 0
|
||||
|
||||
if(M == user)
|
||||
M.visible_message("<span class='notice'>[user] attempts to [apply_method] [src].</span>")
|
||||
if(self_delay)
|
||||
if(!do_mob(user, M, self_delay))
|
||||
return 0
|
||||
to_chat(M, "<span class='notice'>You [apply_method] [src].</span>")
|
||||
|
||||
else
|
||||
M.visible_message("<span class='danger'>[user] attempts to force [M] to [apply_method] [src].</span>", \
|
||||
"<span class='userdanger'>[user] attempts to force [M] to [apply_method] [src].</span>")
|
||||
if(!do_mob(user, M))
|
||||
return 0
|
||||
M.visible_message("<span class='danger'>[user] forces [M] to [apply_method] [src].</span>", \
|
||||
"<span class='userdanger'>[user] forces [M] to [apply_method] [src].</span>")
|
||||
|
||||
var/makes_me_think = pick(strings("redpill.json", "redpill_questions"))
|
||||
if(icon_state == "pill4" && prob(5)) //you take the red pill - you stay in Wonderland, and I show you how deep the rabbit hole goes
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /proc/to_chat, M, "<span class='notice'>[makes_me_think]</span>"), 50)
|
||||
|
||||
log_combat(user, M, "fed", reagents.log_list())
|
||||
if(reagents.total_volume)
|
||||
reagents.reaction(M, apply_type)
|
||||
reagents.trans_to(M, reagents.total_volume)
|
||||
qdel(src)
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/reagent_containers/pill/afterattack(obj/target, mob/user , proximity)
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
return
|
||||
if(!dissolvable || !target.is_refillable())
|
||||
return
|
||||
if(target.is_drainable() && !target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty! There's nothing to dissolve [src] in.</span>")
|
||||
return
|
||||
|
||||
if(target.reagents.holder_full())
|
||||
to_chat(user, "<span class='warning'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You dissolve [src] in [target].</span>")
|
||||
for(var/mob/O in viewers(2, user)) //viewers is necessary here because of the small radius
|
||||
to_chat(O, "<span class='warning'>[user] slips something into [target]!</span>")
|
||||
reagents.trans_to(target, reagents.total_volume)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/reagent_containers/pill/tox
|
||||
name = "toxins pill"
|
||||
desc = "Highly toxic."
|
||||
icon_state = "pill5"
|
||||
list_reagents = list("toxin" = 50)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/cyanide
|
||||
name = "cyanide pill"
|
||||
desc = "Don't swallow this."
|
||||
icon_state = "pill5"
|
||||
list_reagents = list("cyanide" = 50)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/adminordrazine
|
||||
name = "adminordrazine pill"
|
||||
desc = "It's magic. We don't have to explain it."
|
||||
icon_state = "pill16"
|
||||
list_reagents = list("adminordrazine" = 50)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/morphine
|
||||
name = "morphine pill"
|
||||
desc = "Commonly used to treat insomnia."
|
||||
icon_state = "pill8"
|
||||
list_reagents = list("morphine" = 30)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/stimulant
|
||||
name = "stimulant pill"
|
||||
desc = "Often taken by overworked employees, athletes, and the inebriated. You'll snap to attention immediately!"
|
||||
icon_state = "pill19"
|
||||
list_reagents = list("ephedrine" = 10, "antihol" = 10, "coffee" = 30)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/salbutamol
|
||||
name = "salbutamol pill"
|
||||
desc = "Used to treat oxygen deprivation."
|
||||
icon_state = "pill16"
|
||||
list_reagents = list("salbutamol" = 30)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/charcoal
|
||||
name = "charcoal pill"
|
||||
desc = "Neutralizes many common toxins."
|
||||
icon_state = "pill17"
|
||||
list_reagents = list("charcoal" = 10)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/epinephrine
|
||||
name = "epinephrine pill"
|
||||
desc = "Used to stabilize patients."
|
||||
icon_state = "pill5"
|
||||
list_reagents = list("epinephrine" = 15)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/mannitol
|
||||
name = "mannitol pill"
|
||||
desc = "Used to treat brain damage."
|
||||
icon_state = "pill17"
|
||||
list_reagents = list("mannitol" = 50)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/mutadone
|
||||
name = "mutadone pill"
|
||||
desc = "Used to treat genetic damage."
|
||||
icon_state = "pill20"
|
||||
list_reagents = list("mutadone" = 50)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/salicyclic
|
||||
name = "salicylic acid pill"
|
||||
desc = "Used to dull pain."
|
||||
icon_state = "pill9"
|
||||
list_reagents = list("sal_acid" = 24)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/oxandrolone
|
||||
name = "oxandrolone pill"
|
||||
desc = "Used to stimulate burn healing."
|
||||
icon_state = "pill11"
|
||||
list_reagents = list("oxandrolone" = 24)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/insulin
|
||||
name = "insulin pill"
|
||||
desc = "Handles hyperglycaemic coma."
|
||||
icon_state = "pill18"
|
||||
list_reagents = list("insulin" = 50)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/psicodine
|
||||
name = "psicodine pill"
|
||||
desc = "Used to treat mental instability and traumas."
|
||||
list_reagents = list("psicodine" = 10)
|
||||
icon_state = "pill22"
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/antirad
|
||||
name = "potassium iodide pill"
|
||||
desc = "Used to treat radition used to counter radiation poisoning."
|
||||
icon_state = "pill18"
|
||||
list_reagents = list("potass_iodide" = 50)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/antirad_plus
|
||||
name = "prussian blue pill"
|
||||
desc = "Used to treat heavy radition poisoning."
|
||||
icon = 'modular_citadel/icons/obj/modularpills.dmi'
|
||||
icon_state = "prussian_blue"
|
||||
list_reagents = list("prussian_blue" = 25, "water" = 10)
|
||||
roundstart = 1
|
||||
|
||||
/obj/item/reagent_containers/pill/mutarad
|
||||
name = "radiation treatment deluxe pill"
|
||||
desc = "Used to treat heavy radition poisoning and genetic defects."
|
||||
icon = 'modular_citadel/icons/obj/modularpills.dmi'
|
||||
icon_state = "anit_rad_fixgene"
|
||||
list_reagents = list("prussian_blue" = 15, "potass_iodide" = 15, "mutadone" = 15, "water" = 5)
|
||||
roundstart = 1
|
||||
|
||||
///////////////////////////////////////// this pill is used only in a legion mob drop
|
||||
/obj/item/reagent_containers/pill/shadowtoxin
|
||||
name = "black pill"
|
||||
desc = "I wouldn't eat this if I were you."
|
||||
icon_state = "pill9"
|
||||
color = "#454545"
|
||||
list_reagents = list("shadowmutationtoxin" = 1)
|
||||
//////////////////////////////////////// drugs
|
||||
/obj/item/reagent_containers/pill/zoom
|
||||
name = "zoom pill"
|
||||
list_reagents = list("synaptizine" = 10, "nicotine" = 10, "methamphetamine" = 1)
|
||||
|
||||
|
||||
/obj/item/reagent_containers/pill/happy
|
||||
name = "happy pill"
|
||||
list_reagents = list("sugar" = 10, "space_drugs" = 10)
|
||||
|
||||
|
||||
/obj/item/reagent_containers/pill/lsd
|
||||
name = "hallucinogen pill"
|
||||
list_reagents = list("mushroomhallucinogen" = 15, "mindbreaker" = 15)
|
||||
|
||||
|
||||
/obj/item/reagent_containers/pill/aranesp
|
||||
name = "speedy pill"
|
||||
list_reagents = list("aranesp" = 10)
|
||||
|
||||
/obj/item/reagent_containers/pill/happiness
|
||||
name = "happiness pill"
|
||||
desc = "It has a creepy smiling face on it."
|
||||
icon_state = "pill_happy"
|
||||
list_reagents = list("happiness" = 10)
|
||||
|
||||
/obj/item/reagent_containers/pill/floorpill
|
||||
name = "floorpill"
|
||||
desc = "A strange pill found in the depths of maintenance"
|
||||
icon_state = "pill21"
|
||||
var/static/list/names = list("maintenance pill","floorpill","mystery pill","suspicious pill","strange pill")
|
||||
var/static/list/descs = list("Your feeling is telling you no, but...","Drugs are expensive, you can't afford not to eat any pills that you find."\
|
||||
, "Surely, there's no way this could go bad.")
|
||||
|
||||
/obj/item/reagent_containers/pill/floorpill/Initialize()
|
||||
list_reagents = list(get_random_reagent_id() = rand(10,50))
|
||||
. = ..()
|
||||
name = pick(names)
|
||||
if(prob(20))
|
||||
desc = pick(descs)
|
||||
|
||||
/obj/item/reagent_containers/pill/get_belt_overlay()
|
||||
return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "pouch")
|
||||
|
||||
/obj/item/reagent_containers/pill/penis_enlargement
|
||||
name = "penis enlargement pill"
|
||||
list_reagents = list("penis_enlarger" = 10)
|
||||
|
||||
/obj/item/reagent_containers/pill/breast_enlargement
|
||||
name = "breast enlargement pill"
|
||||
list_reagents = list("breast_enlarger" = 10)
|
||||
@@ -0,0 +1,177 @@
|
||||
/obj/item/reagent_containers/rag
|
||||
name = "damp rag"
|
||||
desc = "For cleaning up messes, you suppose."
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "rag"
|
||||
item_flags = NOBLUDGEON
|
||||
reagent_flags = OPENCONTAINER
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list()
|
||||
volume = 5
|
||||
spillable = FALSE
|
||||
var/wipe_sound
|
||||
var/soak_efficiency = 1
|
||||
var/extinguish_efficiency = 0
|
||||
var/action_speed = 3 SECONDS
|
||||
var/damp_threshold = 0.5
|
||||
|
||||
/obj/item/reagent_containers/rag/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is smothering [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (OXYLOSS)
|
||||
|
||||
/obj/item/reagent_containers/rag/examine(mob/user)
|
||||
. = ..()
|
||||
if(reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>Alt-Click to squeeze the liquids out of it.</span>")
|
||||
|
||||
/obj/item/reagent_containers/rag/afterattack(atom/A as obj|turf|area, mob/user,proximity)
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
return
|
||||
if(iscarbon(A) && A.reagents && reagents.total_volume)
|
||||
var/mob/living/carbon/C = A
|
||||
var/reagentlist = pretty_string_from_reagent_list(reagents)
|
||||
var/log_object = "a damp rag containing [reagentlist]"
|
||||
if(user.a_intent == INTENT_HARM && !C.is_mouth_covered())
|
||||
reagents.reaction(C, INGEST)
|
||||
reagents.trans_to(C, 5)
|
||||
C.visible_message("<span class='danger'>[user] has smothered \the [C] with \the [src]!</span>", "<span class='userdanger'>[user] has smothered you with \the [src]!</span>", "<span class='italics'>You hear some struggling and muffled cries of surprise.</span>")
|
||||
log_combat(user, C, "smothered", log_object)
|
||||
else
|
||||
reagents.reaction(C, TOUCH)
|
||||
reagents.remove_all(5)
|
||||
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)
|
||||
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>")
|
||||
SEND_SIGNAL(A, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_MEDIUM)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/rag/pre_altattackby(mob/living/M, mob/living/user, params)
|
||||
if(istype(M) && user.a_intent == INTENT_HELP)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(M.on_fire)
|
||||
user.visible_message("<span class='warning'>\The [user] uses \the [src] to pat out [M == user ? "[user.p_their()]" : "\the [M]'s"] flames!</span>")
|
||||
if(hitsound)
|
||||
playsound(M, hitsound, 25, 1)
|
||||
M.adjust_fire_stacks(-min(extinguish_efficiency, M.fire_stacks))
|
||||
else
|
||||
if(reagents.total_volume > (volume * damp_threshold))
|
||||
to_chat(user, "<span class='warning'>\The [src] is too drenched to be used to dry [user == M ? "yourself" : "\the [M]"] off.</span>")
|
||||
return TRUE
|
||||
user.visible_message("<span class='notice'>\The [user] starts drying [M == user ? "[user.p_them()]self" : "\the [M]"] off with \the [src]...</span>")
|
||||
if(do_mob(user, M, action_speed))
|
||||
if(reagents.total_volume > (volume * damp_threshold))
|
||||
return
|
||||
user.visible_message("<span class='notice'>\The [user] dries [M == user ? "[user.p_them()]self" : "\the [M]"] off with \the [src].</span>")
|
||||
if(wipe_sound)
|
||||
playsound(M, wipe_sound, 25, 1)
|
||||
if(M.fire_stacks)
|
||||
var/minus_plus = M.fire_stacks < 0 ? 1 : -1
|
||||
var/amount = min(abs(M.fire_stacks), soak_efficiency)
|
||||
var/r_id = "fuel"
|
||||
if(M.fire_stacks < 0)
|
||||
r_id = "water"
|
||||
reagents.add_reagent(r_id, amount * 0.3)
|
||||
M.adjust_fire_stacks(minus_plus * amount)
|
||||
M.wash_cream()
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/rag/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(reagents.total_volume && user.canUseTopic(src, BE_CLOSE))
|
||||
to_chat(user, "<span class='notice'>You start squeezing the liquids out of \the [src]...</span>")
|
||||
if(do_after(user, action_speed, TRUE, src))
|
||||
to_chat(user, "<span class='notice'>You squeeze \the [src] dry.</span>")
|
||||
var/atom/react_loc = get_turf(src)
|
||||
if(ismob(react_loc))
|
||||
react_loc = react_loc.loc
|
||||
if(react_loc)
|
||||
reagents.reaction(react_loc, TOUCH)
|
||||
reagents.clear_reagents()
|
||||
|
||||
/obj/item/reagent_containers/rag/towel
|
||||
name = "towel"
|
||||
desc = "A soft cotton towel."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "towel"
|
||||
item_state = "towel"
|
||||
slot_flags = ITEM_SLOT_HEAD | ITEM_SLOT_BELT | ITEM_SLOT_OCLOTHING
|
||||
item_flags = NOBLUDGEON | NO_UNIFORM_REQUIRED //so it can be worn on the belt slot even with no uniform.
|
||||
force = 1
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
attack_verb = list("whipped")
|
||||
hitsound = 'sound/items/towelwhip.ogg'
|
||||
volume = 10
|
||||
total_mass = 2
|
||||
wipe_sound = 'sound/items/towelwipe.ogg'
|
||||
soak_efficiency = 4
|
||||
extinguish_efficiency = 3
|
||||
var/flat_icon = "towel_flat"
|
||||
var/folded_icon = "towel"
|
||||
var/list/possible_colors
|
||||
|
||||
/obj/item/reagent_containers/rag/towel/Initialize()
|
||||
. = ..()
|
||||
if(possible_colors)
|
||||
add_atom_colour(pick(possible_colors), FIXED_COLOUR_PRIORITY)
|
||||
|
||||
/obj/item/reagent_containers/rag/towel/attack(mob/living/M, mob/living/user)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
DISABLE_BITFIELD(item_flags, NOBLUDGEON)
|
||||
. = TRUE
|
||||
..()
|
||||
if(.)
|
||||
ENABLE_BITFIELD(item_flags, NOBLUDGEON)
|
||||
|
||||
/obj/item/reagent_containers/rag/towel/equipped(mob/living/user, slot)
|
||||
. = ..()
|
||||
switch(slot)
|
||||
if(SLOT_BELT)
|
||||
body_parts_covered = GROIN|LEGS
|
||||
if(SLOT_WEAR_SUIT)
|
||||
body_parts_covered = CHEST|GROIN|LEGS
|
||||
if(SLOT_HEAD)
|
||||
body_parts_covered = HEAD
|
||||
flags_inv = HIDEHAIR
|
||||
|
||||
/obj/item/reagent_containers/rag/towel/dropped(mob/user)
|
||||
. = ..()
|
||||
body_parts_covered = NONE
|
||||
flags_inv = NONE
|
||||
|
||||
/obj/item/reagent_containers/rag/towel/attack_self(mob/user)
|
||||
if(!user.CanReach(src) || !user.dropItemToGround(src))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You lay out \the [src] flat on the ground.</span>")
|
||||
icon_state = flat_icon
|
||||
layer = BELOW_OBJ_LAYER
|
||||
|
||||
/obj/item/reagent_containers/rag/towel/pickup(mob/living/user)
|
||||
. = ..()
|
||||
icon_state = folded_icon
|
||||
layer = initial(layer)
|
||||
|
||||
/obj/item/reagent_containers/rag/towel/on_reagent_change(changetype)
|
||||
force = initial(force) + round(reagents.total_volume * 0.5)
|
||||
|
||||
/obj/item/reagent_containers/rag/towel/random
|
||||
possible_colors = list("#FF0000","#FF7F00","#FFFF00","#00FF00","#0000FF","#4B0082","#8F00FF")
|
||||
|
||||
/obj/item/reagent_containers/rag/towel/syndicate
|
||||
name = "syndicate towel"
|
||||
desc = "Truly a weapon of mass destruction."
|
||||
possible_colors = list("#DD1A1A", "#DB4325", "#E02700")
|
||||
force = 4
|
||||
armour_penetration = 10
|
||||
volume = 20
|
||||
soak_efficiency = 6
|
||||
extinguish_efficiency = 5
|
||||
action_speed = 15
|
||||
damp_threshold = 0.8
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 20, "bio" = 20, "rad" = 20, "fire" = 50, "acid" = 50) //items don't provide armor to wearers unlike clothing yet.
|
||||
@@ -0,0 +1,315 @@
|
||||
/obj/item/reagent_containers/spray
|
||||
name = "spray bottle"
|
||||
desc = "A spray bottle, with an unscrewable top."
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "cleaner"
|
||||
item_state = "cleaner"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/custodial_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi'
|
||||
item_flags = NOBLUDGEON
|
||||
reagent_flags = OPENCONTAINER
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
var/stream_mode = 0 //whether we use the more focused mode
|
||||
var/current_range = 3 //the range of tiles the sprayer will reach.
|
||||
var/spray_range = 3 //the range of tiles the sprayer will reach when in spray mode.
|
||||
var/stream_range = 1 //the range of tiles the sprayer will reach when in stream mode.
|
||||
var/stream_amount = 10 //the amount of reagents transfered when in stream mode.
|
||||
var/spray_delay = 3 //The amount of sleep() delay between each chempuff step.
|
||||
var/can_fill_from_container = TRUE
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 250
|
||||
possible_transfer_amounts = list(5,10,15,20,25,30,50,100)
|
||||
|
||||
/obj/item/reagent_containers/spray/afterattack(atom/A, mob/user)
|
||||
. = ..()
|
||||
if(istype(A, /obj/structure/sink) || istype(A, /obj/structure/janitorialcart) || istype(A, /obj/machinery/hydroponics))
|
||||
return
|
||||
|
||||
if((A.is_drainable() && !A.is_refillable()) && get_dist(src,A) <= 1 && can_fill_from_container)
|
||||
if(!A.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[A] is empty.</span>")
|
||||
return
|
||||
|
||||
if(reagents.holder_full())
|
||||
to_chat(user, "<span class='warning'>[src] is full.</span>")
|
||||
return
|
||||
|
||||
var/trans = A.reagents.trans_to(src, 50) //transfer 50u , using the spray's transfer amount would take too long to refill
|
||||
to_chat(user, "<span class='notice'>You fill \the [src] with [trans] units of the contents of \the [A].</span>")
|
||||
return
|
||||
|
||||
if(reagents.total_volume < amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return
|
||||
|
||||
spray(A)
|
||||
|
||||
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6)
|
||||
user.changeNext_move(CLICK_CD_RANGE*2)
|
||||
user.newtonian_move(get_dir(A, user))
|
||||
var/turf/T = get_turf(src)
|
||||
if(reagents.has_reagent("sacid"))
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] fired sulphuric acid from \a [src] at [ADMIN_VERBOSEJMP(T)].")
|
||||
log_game("[key_name(user)] fired sulphuric acid from \a [src] at [AREACOORD(T)].")
|
||||
if(reagents.has_reagent("facid"))
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] fired Fluacid from \a [src] at [ADMIN_VERBOSEJMP(T)].")
|
||||
log_game("[key_name(user)] fired Fluacid from \a [src] at [AREACOORD(T)].")
|
||||
if(reagents.has_reagent("lube"))
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] fired Space lube from \a [src] at [ADMIN_VERBOSEJMP(T)].")
|
||||
log_game("[key_name(user)] fired Space lube from \a [src] at [AREACOORD(T)].")
|
||||
return
|
||||
|
||||
|
||||
/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)
|
||||
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)
|
||||
puff_reagent_left = 1
|
||||
else
|
||||
reagents.trans_to(D, amount_per_transfer_from_this, 1/range)
|
||||
D.color = mix_color_from_reagents(D.reagents.reagent_list)
|
||||
var/wait_step = max(round(2+ spray_delay * INVERSE(range)), 2)
|
||||
do_spray(A, wait_step, D, range, puff_reagent_left)
|
||||
|
||||
/obj/item/reagent_containers/spray/proc/do_spray(atom/A, wait_step, obj/effect/decal/chempuff/D, range, puff_reagent_left)
|
||||
set waitfor = FALSE
|
||||
var/range_left = range
|
||||
for(var/i=0, i<range, i++)
|
||||
range_left--
|
||||
step_towards(D,A)
|
||||
sleep(wait_step)
|
||||
|
||||
for(var/atom/T in get_turf(D))
|
||||
if(T == D || T.invisibility) //we ignore the puff itself and stuff below the floor
|
||||
continue
|
||||
if(puff_reagent_left <= 0)
|
||||
break
|
||||
|
||||
if(stream_mode)
|
||||
if(ismob(T))
|
||||
var/mob/M = T
|
||||
if(!M.lying || !range_left)
|
||||
D.reagents.reaction(M, VAPOR)
|
||||
puff_reagent_left -= 1
|
||||
else if(!range_left)
|
||||
D.reagents.reaction(T, VAPOR)
|
||||
else
|
||||
D.reagents.reaction(T, VAPOR)
|
||||
if(ismob(T))
|
||||
puff_reagent_left -= 1
|
||||
|
||||
if(puff_reagent_left > 0 && (!stream_mode || !range_left))
|
||||
D.reagents.reaction(get_turf(D), VAPOR)
|
||||
puff_reagent_left -= 1
|
||||
|
||||
if(puff_reagent_left <= 0) // we used all the puff so we delete it.
|
||||
qdel(D)
|
||||
return
|
||||
qdel(D)
|
||||
|
||||
/obj/item/reagent_containers/spray/attack_self(mob/user)
|
||||
stream_mode = !stream_mode
|
||||
if(stream_mode)
|
||||
amount_per_transfer_from_this = stream_amount
|
||||
current_range = stream_range
|
||||
else
|
||||
amount_per_transfer_from_this = initial(amount_per_transfer_from_this)
|
||||
current_range = spray_range
|
||||
to_chat(user, "<span class='notice'>You switch the nozzle setting to [stream_mode ? "\"stream\"":"\"spray\""]. You'll now use [amount_per_transfer_from_this] units per use.</span>")
|
||||
|
||||
/obj/item/reagent_containers/spray/attackby(obj/item/I, mob/user, params)
|
||||
var/hotness = I.is_hot()
|
||||
if(hotness && reagents)
|
||||
reagents.expose_temperature(hotness)
|
||||
to_chat(user, "<span class='notice'>You heat [name] with [I]!</span>")
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/spray/verb/empty()
|
||||
set name = "Empty Spray Bottle"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
if (alert(usr, "Are you sure you want to empty that?", "Empty Bottle:", "Yes", "No") != "Yes")
|
||||
return
|
||||
if(isturf(usr.loc) && src.loc == usr)
|
||||
to_chat(usr, "<span class='notice'>You empty \the [src] onto the floor.</span>")
|
||||
reagents.reaction(usr.loc)
|
||||
src.reagents.clear_reagents()
|
||||
|
||||
//space cleaner
|
||||
/obj/item/reagent_containers/spray/cleaner
|
||||
name = "space cleaner"
|
||||
desc = "BLAM!-brand non-foaming space cleaner!"
|
||||
volume = 100
|
||||
list_reagents = list("cleaner" = 100)
|
||||
amount_per_transfer_from_this = 2
|
||||
stream_amount = 5
|
||||
|
||||
/obj/item/reagent_containers/spray/cleaner/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is putting the nozzle of \the [src] in [user.p_their()] mouth. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
if(do_mob(user,user,30))
|
||||
if(reagents.total_volume >= amount_per_transfer_from_this)//if not empty
|
||||
user.visible_message("<span class='suicide'>[user] pulls the trigger!</span>")
|
||||
src.spray(user)
|
||||
return BRUTELOSS
|
||||
else
|
||||
user.visible_message("<span class='suicide'>[user] pulls the trigger...but \the [src] is empty!</span>")
|
||||
return SHAME
|
||||
else
|
||||
user.visible_message("<span class='suicide'>[user] decided life was worth living.</span>")
|
||||
return
|
||||
|
||||
//Drying Agent
|
||||
/obj/item/reagent_containers/spray/drying_agent
|
||||
name = "drying agent spray"
|
||||
desc = "A spray bottle for drying agent."
|
||||
volume = 100
|
||||
list_reagents = list("drying_agent" = 100)
|
||||
amount_per_transfer_from_this = 2
|
||||
stream_amount = 5
|
||||
|
||||
//spray tan
|
||||
/obj/item/reagent_containers/spray/spraytan
|
||||
name = "spray tan"
|
||||
volume = 50
|
||||
desc = "Gyaro brand spray tan. Do not spray near eyes or other orifices."
|
||||
list_reagents = list("spraytan" = 50)
|
||||
|
||||
|
||||
//pepperspray
|
||||
/obj/item/reagent_containers/spray/pepper
|
||||
name = "pepperspray"
|
||||
desc = "Manufactured by UhangInc, used to blind and down an opponent quickly."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "pepperspray"
|
||||
item_state = "pepperspray"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/security_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/security_righthand.dmi'
|
||||
volume = 40
|
||||
stream_range = 4
|
||||
spray_delay = 1
|
||||
amount_per_transfer_from_this = 5
|
||||
list_reagents = list("condensedcapsaicin" = 40)
|
||||
|
||||
/obj/item/reagent_containers/spray/pepper/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] begins huffing \the [src]! It looks like [user.p_theyre()] getting a dirty high!</span>")
|
||||
return OXYLOSS
|
||||
|
||||
// Fix pepperspraying yourself
|
||||
/obj/item/reagent_containers/spray/pepper/afterattack(atom/A as mob|obj, mob/user)
|
||||
if (A.loc == user)
|
||||
return
|
||||
. = ..()
|
||||
|
||||
//water flower
|
||||
/obj/item/reagent_containers/spray/waterflower
|
||||
name = "water flower"
|
||||
desc = "A seemingly innocent sunflower...with a twist."
|
||||
icon = 'icons/obj/hydroponics/harvest.dmi'
|
||||
icon_state = "sunflower"
|
||||
item_state = "sunflower"
|
||||
amount_per_transfer_from_this = 1
|
||||
volume = 10
|
||||
list_reagents = list("water" = 10)
|
||||
|
||||
/obj/item/reagent_containers/spray/waterflower/attack_self(mob/user) //Don't allow changing how much the flower sprays
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/spray/waterflower/cyborg
|
||||
reagent_flags = NONE
|
||||
volume = 100
|
||||
list_reagents = list("water" = 100)
|
||||
var/generate_amount = 5
|
||||
var/generate_type = "water"
|
||||
var/last_generate = 0
|
||||
var/generate_delay = 10 //deciseconds
|
||||
can_fill_from_container = FALSE
|
||||
|
||||
/obj/item/reagent_containers/spray/waterflower/cyborg/hacked
|
||||
name = "nova flower"
|
||||
desc = "This doesn't look safe at all..."
|
||||
list_reagents = list("clf3" = 3)
|
||||
volume = 3
|
||||
generate_type = "clf3"
|
||||
generate_amount = 1
|
||||
generate_delay = 40 //deciseconds
|
||||
|
||||
/obj/item/reagent_containers/spray/waterflower/cyborg/Initialize()
|
||||
. = ..()
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
|
||||
/obj/item/reagent_containers/spray/waterflower/cyborg/Destroy()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/reagent_containers/spray/waterflower/cyborg/process()
|
||||
if(world.time < last_generate + generate_delay)
|
||||
return
|
||||
last_generate = world.time
|
||||
generate_reagents()
|
||||
|
||||
/obj/item/reagent_containers/spray/waterflower/cyborg/empty()
|
||||
to_chat(usr, "<span class='warning'>You can not empty this!</span>")
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/spray/waterflower/cyborg/proc/generate_reagents()
|
||||
reagents.add_reagent(generate_type, generate_amount)
|
||||
|
||||
//chemsprayer
|
||||
/obj/item/reagent_containers/spray/chemsprayer
|
||||
name = "chem sprayer"
|
||||
desc = "A utility used to spray large amounts of reagents in a given area."
|
||||
icon = 'icons/obj/guns/projectile.dmi'
|
||||
icon_state = "chemsprayer"
|
||||
item_state = "chemsprayer"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/guns_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/guns_righthand.dmi'
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
stream_mode = 1
|
||||
current_range = 7
|
||||
spray_range = 4
|
||||
stream_range = 7
|
||||
amount_per_transfer_from_this = 10
|
||||
volume = 600
|
||||
|
||||
/obj/item/reagent_containers/spray/chemsprayer/afterattack(atom/A as mob|obj, mob/user)
|
||||
// Make it so the bioterror spray doesn't spray yourself when you click your inventory items
|
||||
if (A.loc == user)
|
||||
return
|
||||
. = ..()
|
||||
|
||||
/obj/item/reagent_containers/spray/chemsprayer/spray(atom/A)
|
||||
var/direction = get_dir(src, A)
|
||||
var/turf/T = get_turf(A)
|
||||
var/turf/T1 = get_step(T,turn(direction, 90))
|
||||
var/turf/T2 = get_step(T,turn(direction, -90))
|
||||
var/list/the_targets = list(T,T1,T2)
|
||||
|
||||
for(var/i=1, i<=3, i++) // intialize sprays
|
||||
if(reagents.total_volume < 1)
|
||||
return
|
||||
..(the_targets[i])
|
||||
|
||||
/obj/item/reagent_containers/spray/chemsprayer/bioterror
|
||||
list_reagents = list("sodium_thiopental" = 100, "coniine" = 100, "venom" = 100, "condensedcapsaicin" = 100, "initropidril" = 100, "polonium" = 100)
|
||||
|
||||
// Plant-B-Gone
|
||||
/obj/item/reagent_containers/spray/plantbgone // -- Skie
|
||||
name = "Plant-B-Gone"
|
||||
desc = "Kills those pesky weeds!"
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "plantbgone"
|
||||
item_state = "plantbgone"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/hydroponics_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/hydroponics_righthand.dmi'
|
||||
volume = 100
|
||||
list_reagents = list("plantbgone" = 100)
|
||||
@@ -0,0 +1,350 @@
|
||||
/obj/item/reagent_containers/syringe
|
||||
name = "syringe"
|
||||
desc = "A syringe that can hold up to 15 units."
|
||||
icon = 'icons/obj/syringe.dmi'
|
||||
item_state = "syringe_0"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
icon_state = "0"
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list()
|
||||
volume = 15
|
||||
var/mode = SYRINGE_DRAW
|
||||
var/busy = FALSE // needed for delayed drawing of blood
|
||||
var/proj_piercing = 0 //does it pierce through thick clothes when shot with syringe gun
|
||||
materials = list(MAT_METAL=10, MAT_GLASS=20)
|
||||
reagent_flags = TRANSPARENT
|
||||
|
||||
/obj/item/reagent_containers/syringe/Initialize()
|
||||
. = ..()
|
||||
if(list_reagents) //syringe starts in inject mode if its already got something inside
|
||||
mode = SYRINGE_INJECT
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/on_reagent_change(changetype)
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/pickup(mob/user)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/dropped(mob/user)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/attack_self(mob/user)
|
||||
mode = !mode
|
||||
update_icon()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/reagent_containers/syringe/attack_hand()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/reagent_containers/syringe/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/reagent_containers/syringe/attackby(obj/item/I, mob/user, params)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/syringe/afterattack(atom/target, mob/user , proximity)
|
||||
. = ..()
|
||||
if(busy)
|
||||
return
|
||||
if(!proximity)
|
||||
return
|
||||
if(!target.reagents)
|
||||
return
|
||||
|
||||
var/mob/living/L
|
||||
if(isliving(target))
|
||||
L = target
|
||||
if(!L.can_inject(user, 1))
|
||||
return
|
||||
|
||||
// chance of monkey retaliation
|
||||
if(ismonkey(target) && prob(MONKEY_SYRINGE_RETALIATION_PROB))
|
||||
var/mob/living/carbon/monkey/M
|
||||
M = target
|
||||
M.retaliate(user)
|
||||
|
||||
switch(mode)
|
||||
if(SYRINGE_DRAW)
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>The syringe is full.</span>")
|
||||
return
|
||||
|
||||
if(L) //living mob
|
||||
var/drawn_amount = reagents.maximum_volume - reagents.total_volume
|
||||
if(target != user)
|
||||
target.visible_message("<span class='danger'>[user] is trying to take a blood sample from [target]!</span>", \
|
||||
"<span class='userdanger'>[user] is trying to take a blood sample from [target]!</span>")
|
||||
busy = TRUE
|
||||
if(!do_mob(user, target, extra_checks=CALLBACK(L, /mob/living/proc/can_inject,user,1)))
|
||||
busy = FALSE
|
||||
return
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
return
|
||||
busy = FALSE
|
||||
if(L.transfer_blood_to(src, drawn_amount))
|
||||
user.visible_message("[user] takes a blood sample from [L].")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You are unable to draw any blood from [L]!</span>")
|
||||
|
||||
else //if not mob
|
||||
if(!target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty!</span>")
|
||||
return
|
||||
|
||||
if(!target.is_drawable())
|
||||
to_chat(user, "<span class='warning'>You cannot directly remove reagents from [target]!</span>")
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) // transfer from, transfer to - who cares?
|
||||
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [trans] units of the solution. It now contains [reagents.total_volume] units.</span>")
|
||||
if (reagents.total_volume >= reagents.maximum_volume)
|
||||
mode=!mode
|
||||
update_icon()
|
||||
|
||||
if(SYRINGE_INJECT)
|
||||
// Always log attemped injections for admins
|
||||
var/contained = reagents.log_list()
|
||||
log_combat(user, target, "attempted to inject", src, addition="which had [contained]")
|
||||
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>[src] is empty.</span>")
|
||||
return
|
||||
|
||||
if(!L && !target.is_injectable()) //only checks on non-living mobs, due to how can_inject() handles
|
||||
to_chat(user, "<span class='warning'>You cannot directly fill [target]!</span>")
|
||||
return
|
||||
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>[target] is full.</span>")
|
||||
return
|
||||
|
||||
if(L) //living mob
|
||||
if(!L.can_inject(user, TRUE))
|
||||
return
|
||||
if(L != user)
|
||||
L.visible_message("<span class='danger'>[user] is trying to inject [L]!</span>", \
|
||||
"<span class='userdanger'>[user] is trying to inject [L]!</span>")
|
||||
if(!do_mob(user, L, extra_checks=CALLBACK(L, /mob/living/proc/can_inject,user,1)))
|
||||
return
|
||||
if(!reagents.total_volume)
|
||||
return
|
||||
if(L.reagents.total_volume >= L.reagents.maximum_volume)
|
||||
return
|
||||
L.visible_message("<span class='danger'>[user] injects [L] with the syringe!", \
|
||||
"<span class='userdanger'>[user] injects [L] with the syringe!</span>")
|
||||
|
||||
if(L != user)
|
||||
log_combat(user, L, "injected", src, addition="which had [contained]")
|
||||
else
|
||||
L.log_message("injected themselves ([contained]) with [src.name]", LOG_ATTACK, color="orange")
|
||||
var/fraction = min(amount_per_transfer_from_this/reagents.total_volume, 1)
|
||||
reagents.reaction(L, INJECT, fraction)
|
||||
reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You inject [amount_per_transfer_from_this] units of the solution. The syringe now contains [reagents.total_volume] units.</span>")
|
||||
if (reagents.total_volume <= 0 && mode==SYRINGE_INJECT)
|
||||
mode = SYRINGE_DRAW
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/reagent_containers/syringe/update_icon()
|
||||
cut_overlays()
|
||||
var/rounded_vol
|
||||
if(reagents && reagents.total_volume)
|
||||
rounded_vol = CLAMP(round((reagents.total_volume / volume * 15),5), 1, 15)
|
||||
var/image/filling_overlay = mutable_appearance('icons/obj/reagentfillings.dmi', "syringe[rounded_vol]")
|
||||
filling_overlay.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling_overlay)
|
||||
else
|
||||
rounded_vol = 0
|
||||
icon_state = "[rounded_vol]"
|
||||
item_state = "syringe_[rounded_vol]"
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
var/injoverlay
|
||||
switch(mode)
|
||||
if (SYRINGE_DRAW)
|
||||
injoverlay = "draw"
|
||||
if (SYRINGE_INJECT)
|
||||
injoverlay = "inject"
|
||||
add_overlay(injoverlay)
|
||||
M.update_inv_hands()
|
||||
|
||||
/obj/item/reagent_containers/syringe/epinephrine
|
||||
name = "syringe (epinephrine)"
|
||||
desc = "Contains epinephrine - used to stabilize patients."
|
||||
list_reagents = list("epinephrine" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/charcoal
|
||||
name = "syringe (charcoal)"
|
||||
desc = "Contains charcoal."
|
||||
list_reagents = list("charcoal" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/antiviral
|
||||
name = "syringe (spaceacillin)"
|
||||
desc = "Contains antiviral agents."
|
||||
list_reagents = list("spaceacillin" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/bioterror
|
||||
name = "bioterror syringe"
|
||||
desc = "Contains several paralyzing reagents."
|
||||
list_reagents = list("neurotoxin" = 5, "mutetoxin" = 5, "sodium_thiopental" = 5)
|
||||
|
||||
/obj/item/reagent_containers/syringe/stimulants
|
||||
name = "Stimpack"
|
||||
desc = "Contains stimulants."
|
||||
amount_per_transfer_from_this = 50
|
||||
volume = 50
|
||||
list_reagents = list("stimulants" = 50)
|
||||
|
||||
/obj/item/reagent_containers/syringe/calomel
|
||||
name = "syringe (calomel)"
|
||||
desc = "Contains calomel."
|
||||
list_reagents = list("calomel" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/plasma
|
||||
name = "syringe (plasma)"
|
||||
desc = "Contains plasma."
|
||||
list_reagents = list("plasma" = 15)
|
||||
|
||||
/obj/item/reagent_containers/syringe/lethal
|
||||
name = "lethal injection syringe"
|
||||
desc = "A syringe used for lethal injections. It can hold up to 50 units."
|
||||
amount_per_transfer_from_this = 50
|
||||
volume = 50
|
||||
|
||||
/obj/item/reagent_containers/syringe/lethal/choral
|
||||
list_reagents = list("chloralhydrate" = 50)
|
||||
|
||||
/obj/item/reagent_containers/syringe/lethal/execution
|
||||
list_reagents = list("amatoxin" = 15, "formaldehyde" = 15, "cyanide" = 10, "facid" = 10) //Citadel edit, changing out plasma from lethals
|
||||
|
||||
/obj/item/reagent_containers/syringe/mulligan
|
||||
name = "Mulligan"
|
||||
desc = "A syringe used to completely change the users identity."
|
||||
amount_per_transfer_from_this = 1
|
||||
volume = 1
|
||||
list_reagents = list("mulligan" = 1)
|
||||
|
||||
/obj/item/reagent_containers/syringe/gluttony
|
||||
name = "Gluttony's Blessing"
|
||||
desc = "A syringe recovered from a dread place. It probably isn't wise to use."
|
||||
amount_per_transfer_from_this = 1
|
||||
volume = 1
|
||||
list_reagents = list("gluttonytoxin" = 1)
|
||||
|
||||
/obj/item/reagent_containers/syringe/bluespace
|
||||
name = "bluespace syringe"
|
||||
desc = "An advanced syringe that can hold 60 units of chemicals."
|
||||
amount_per_transfer_from_this = 20
|
||||
volume = 60
|
||||
|
||||
/obj/item/reagent_containers/syringe/noreact
|
||||
name = "cryo syringe"
|
||||
desc = "An advanced syringe that stops reagents inside from reacting. It can hold up to 20 units."
|
||||
volume = 20
|
||||
reagent_flags = TRANSPARENT | NO_REACT
|
||||
|
||||
/obj/item/reagent_containers/syringe/piercing
|
||||
name = "piercing syringe"
|
||||
desc = "A diamond-tipped syringe that pierces armor when launched at high velocity. It can hold up to 10 units."
|
||||
volume = 10
|
||||
proj_piercing = 1
|
||||
|
||||
/obj/item/reagent_containers/syringe/get_belt_overlay()
|
||||
return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "pouch")
|
||||
|
||||
/obj/item/reagent_containers/syringe/dart
|
||||
name = "medicinal smartdart"
|
||||
desc = "A non-harmful dart that can administer medication from a range. Once it hits a patient using it's smart nanofilter technology only medicines contained within the dart are administered to the patient. Additonally, due to capillary action, injection of chemicals past the overdose limit is prevented."
|
||||
volume = 20
|
||||
amount_per_transfer_from_this = 20
|
||||
icon_state = "empty"
|
||||
item_state = "syringe_empty"
|
||||
var/emptrig = FALSE
|
||||
|
||||
/obj/item/reagent_containers/syringe/dart/afterattack(atom/target, mob/user , proximity)
|
||||
|
||||
if(busy)
|
||||
return
|
||||
if(!proximity)
|
||||
return
|
||||
if(!target.reagents)
|
||||
return
|
||||
|
||||
var/mob/living/L
|
||||
if(isliving(target))
|
||||
L = target
|
||||
if(!L.can_inject(user, 1))
|
||||
return
|
||||
|
||||
switch(mode)
|
||||
if(SYRINGE_DRAW)
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>The dart is full!</span>")
|
||||
return
|
||||
|
||||
if(L) //living mob
|
||||
to_chat(user, "<span class='warning'>You can't draw blood using a dart!</span>")
|
||||
return
|
||||
|
||||
else //if not mob
|
||||
if(!target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty!</span>")
|
||||
return
|
||||
|
||||
if(!target.is_drawable())
|
||||
to_chat(user, "<span class='warning'>You cannot directly remove reagents from [target]!</span>")
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
|
||||
|
||||
to_chat(user, "<span class='notice'>You soak the [src] with [trans] units of the solution. It now contains [reagents.total_volume] units.</span>")
|
||||
if (reagents.total_volume >= reagents.maximum_volume)
|
||||
mode=!mode
|
||||
update_icon()
|
||||
|
||||
if(SYRINGE_INJECT)
|
||||
src.visible_message("<span class='danger'>The smartdart gives a frustrated boop! It's fully saturated; You need to shoot someone with it!</span>")
|
||||
|
||||
/obj/item/reagent_containers/syringe/dart/attack_self(mob/user)
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/syringe/dart/update_icon()
|
||||
cut_overlays()
|
||||
var/rounded_vol
|
||||
|
||||
rounded_vol = "empty"
|
||||
if(reagents && reagents.total_volume)
|
||||
if(volume/reagents.total_volume == 1)
|
||||
rounded_vol="full"
|
||||
|
||||
icon_state = "[rounded_vol]"
|
||||
item_state = "syringe_[rounded_vol]"
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
var/injoverlay
|
||||
switch(mode)
|
||||
if (SYRINGE_DRAW)
|
||||
injoverlay = "draw"
|
||||
if (SYRINGE_INJECT)
|
||||
injoverlay = "ready"
|
||||
add_overlay(injoverlay)
|
||||
M.update_inv_hands()
|
||||
|
||||
/obj/item/reagent_containers/syringe/dart/emp_act(severity)
|
||||
emptrig = TRUE
|
||||
..()
|
||||
|
||||
/obj/item/reagent_containers/syringe/dart/bluespace
|
||||
name = "bluespace smartdart"
|
||||
desc = "A non-harmful dart that can administer medication from a range. Once it hits a patient using it's smart nanofilter technology only medicines contained within the dart are administered to the patient. Additonally, due to capillary action, injection of chemicals past the overdose limit is prevented. Has an extended volume capacity thanks to bluespace foam."
|
||||
amount_per_transfer_from_this = 50
|
||||
volume = 50
|
||||
@@ -0,0 +1,191 @@
|
||||
/obj/structure/reagent_dispensers
|
||||
name = "Dispenser"
|
||||
desc = "..."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "water"
|
||||
density = TRUE
|
||||
anchored = FALSE
|
||||
pressure_resistance = 2*ONE_ATMOSPHERE
|
||||
max_integrity = 300
|
||||
var/tank_volume = 1000 //In units, how much the dispenser can hold
|
||||
var/reagent_id = "water" //The ID of the reagent that the dispenser uses
|
||||
|
||||
/obj/structure/reagent_dispensers/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
. = ..()
|
||||
if(. && obj_integrity > 0)
|
||||
if(tank_volume && (damage_flag == "bullet" || damage_flag == "laser"))
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/attackby(obj/item/W, mob/user, params)
|
||||
if(W.is_refillable())
|
||||
return 0 //so we can refill them via their afterattack.
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/reagent_dispensers/Initialize()
|
||||
create_reagents(tank_volume, DRAINABLE | AMOUNT_VISIBLE)
|
||||
reagents.add_reagent(reagent_id, tank_volume)
|
||||
. = ..()
|
||||
|
||||
/obj/structure/reagent_dispensers/proc/boom()
|
||||
visible_message("<span class='danger'>\The [src] ruptures!</span>")
|
||||
chem_splash(loc, 5, list(reagents))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/reagent_dispensers/deconstruct(disassembled = TRUE)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
if(!disassembled)
|
||||
boom()
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/reagent_dispensers/watertank
|
||||
name = "water tank"
|
||||
desc = "A water tank."
|
||||
icon_state = "water"
|
||||
|
||||
/obj/structure/reagent_dispensers/watertank/high
|
||||
name = "high-capacity water tank"
|
||||
desc = "A highly pressurized water tank made to hold gargantuan amounts of water."
|
||||
icon_state = "water_high" //I was gonna clean my room...
|
||||
tank_volume = 100000
|
||||
|
||||
/obj/structure/reagent_dispensers/foamtank
|
||||
name = "firefighting foam tank"
|
||||
desc = "A tank full of firefighting foam."
|
||||
icon_state = "foam"
|
||||
reagent_id = "firefighting_foam"
|
||||
tank_volume = 500
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank
|
||||
name = "fuel tank"
|
||||
desc = "A tank full of industrial welding fuel. Do not consume."
|
||||
icon_state = "fuel"
|
||||
reagent_id = "welding_fuel"
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/boom()
|
||||
explosion(get_turf(src), 0, 1, 5, flame_range = 5)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/blob_act(obj/structure/blob/B)
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/ex_act()
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/fire_act(exposed_temperature, exposed_volume)
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/tesla_act()
|
||||
..() //extend the zap
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/bullet_act(obj/item/projectile/P)
|
||||
..()
|
||||
if(!QDELETED(src)) //wasn't deleted by the projectile's effects.
|
||||
if(!P.nodamage && ((P.damage_type == BURN) || (P.damage_type == BRUTE)))
|
||||
var/boom_message = "[ADMIN_LOOKUPFLW(P.firer)] triggered a fueltank explosion via projectile."
|
||||
GLOB.bombers += boom_message
|
||||
message_admins(boom_message)
|
||||
P.firer.log_message("triggered a fueltank explosion via projectile.", LOG_ATTACK)
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/weldingtool))
|
||||
if(!reagents.has_reagent("welding_fuel"))
|
||||
to_chat(user, "<span class='warning'>[src] is out of fuel!</span>")
|
||||
return
|
||||
var/obj/item/weldingtool/W = I
|
||||
if(!W.welding)
|
||||
if(W.reagents.has_reagent("welding_fuel", W.max_fuel))
|
||||
to_chat(user, "<span class='warning'>Your [W.name] is already full!</span>")
|
||||
return
|
||||
reagents.trans_to(W, W.max_fuel)
|
||||
user.visible_message("<span class='notice'>[user] refills [user.p_their()] [W.name].</span>", "<span class='notice'>You refill [W].</span>")
|
||||
playsound(src, 'sound/effects/refill.ogg', 50, 1)
|
||||
W.update_icon()
|
||||
else
|
||||
var/turf/T = get_turf(src)
|
||||
user.visible_message("<span class='warning'>[user] catastrophically fails at refilling [user.p_their()] [W.name]!</span>", "<span class='userdanger'>That was stupid of you.</span>")
|
||||
|
||||
var/message_admins = "[ADMIN_LOOKUPFLW(user)] triggered a fueltank explosion via welding tool at [ADMIN_VERBOSEJMP(T)]."
|
||||
GLOB.bombers += message_admins
|
||||
message_admins(message_admins)
|
||||
|
||||
user.log_message("triggered a fueltank explosion via welding tool.", LOG_ATTACK)
|
||||
boom()
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/reagent_dispensers/peppertank
|
||||
name = "pepper spray refiller"
|
||||
desc = "Contains condensed capsaicin for use in law \"enforcement.\""
|
||||
icon_state = "pepper"
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
reagent_id = "condensedcapsaicin"
|
||||
|
||||
/obj/structure/reagent_dispensers/peppertank/Initialize()
|
||||
. = ..()
|
||||
if(prob(1))
|
||||
desc = "IT'S PEPPER TIME, BITCH!"
|
||||
|
||||
|
||||
/obj/structure/reagent_dispensers/water_cooler
|
||||
name = "liquid cooler"
|
||||
desc = "A machine that dispenses liquid to drink."
|
||||
icon = 'icons/obj/vending.dmi'
|
||||
icon_state = "water_cooler"
|
||||
anchored = TRUE
|
||||
tank_volume = 500
|
||||
var/paper_cups = 25 //Paper cups left from the cooler
|
||||
|
||||
/obj/structure/reagent_dispensers/water_cooler/examine(mob/user)
|
||||
..()
|
||||
if (paper_cups > 1)
|
||||
to_chat(user, "There are [paper_cups] paper cups left.")
|
||||
else if (paper_cups == 1)
|
||||
to_chat(user, "There is one paper cup left.")
|
||||
else
|
||||
to_chat(user, "There are no paper cups left.")
|
||||
|
||||
/obj/structure/reagent_dispensers/water_cooler/attack_hand(mob/living/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(!paper_cups)
|
||||
to_chat(user, "<span class='warning'>There aren't any cups left!</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] takes a cup from [src].</span>", "<span class='notice'>You take a paper cup from [src].</span>")
|
||||
var/obj/item/reagent_containers/food/drinks/sillycup/S = new(get_turf(src))
|
||||
user.put_in_hands(S)
|
||||
paper_cups--
|
||||
|
||||
/obj/structure/reagent_dispensers/beerkeg
|
||||
name = "beer keg"
|
||||
desc = "Beer is liquid bread, it's good for you..."
|
||||
icon_state = "beer"
|
||||
reagent_id = "beer"
|
||||
|
||||
/obj/structure/reagent_dispensers/beerkeg/blob_act(obj/structure/blob/B)
|
||||
explosion(src.loc,0,3,5,7,10)
|
||||
if(!QDELETED(src))
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/reagent_dispensers/virusfood
|
||||
name = "virus food dispenser"
|
||||
desc = "A dispenser of low-potency virus mutagenic."
|
||||
icon_state = "virus_food"
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
reagent_id = "virusfood"
|
||||
|
||||
|
||||
/obj/structure/reagent_dispensers/cooking_oil
|
||||
name = "vat of cooking oil"
|
||||
desc = "A huge metal vat with a tap on the front. Filled with cooking oil for use in frying food."
|
||||
icon_state = "vat"
|
||||
anchored = TRUE
|
||||
reagent_id = "cooking_oil"
|
||||
Reference in New Issue
Block a user