mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-27 06:54:18 +01:00
Chemistry commit
I messed something in the git
This commit is contained in:
+4
-3
@@ -32,6 +32,7 @@
|
||||
#include "code\__HELPERS\type2type.dm"
|
||||
#include "code\__HELPERS\unsorted.dm"
|
||||
#include "code\__HELPERS\vector.dm"
|
||||
#include "code\_defines\chemical_effects.dm"
|
||||
#include "code\_onclick\adjacent.dm"
|
||||
#include "code\_onclick\ai.dm"
|
||||
#include "code\_onclick\click.dm"
|
||||
@@ -504,7 +505,6 @@
|
||||
#include "code\game\objects\weapons.dm"
|
||||
#include "code\game\objects\effects\aliens.dm"
|
||||
#include "code\game\objects\effects\bump_teleporter.dm"
|
||||
#include "code\game\objects\effects\chemsmoke.dm"
|
||||
#include "code\game\objects\effects\effect_system.dm"
|
||||
#include "code\game\objects\effects\explosion_particles.dm"
|
||||
#include "code\game\objects\effects\gibs.dm"
|
||||
@@ -517,6 +517,9 @@
|
||||
#include "code\game\objects\effects\portals.dm"
|
||||
#include "code\game\objects\effects\spiders.dm"
|
||||
#include "code\game\objects\effects\step_triggers.dm"
|
||||
#include "code\game\objects\effects\chem\chemsmoke.dm"
|
||||
#include "code\game\objects\effects\chem\foam.dm"
|
||||
#include "code\game\objects\effects\chem\water.dm"
|
||||
#include "code\game\objects\effects\decals\cleanable.dm"
|
||||
#include "code\game\objects\effects\decals\contraband.dm"
|
||||
#include "code\game\objects\effects\decals\crayon.dm"
|
||||
@@ -1397,7 +1400,6 @@
|
||||
#include "code\modules\reagents\Chemistry-Holder.dm"
|
||||
#include "code\modules\reagents\Chemistry-Machinery.dm"
|
||||
#include "code\modules\reagents\Chemistry-Readme.dm"
|
||||
#include "code\modules\reagents\Chemistry-Reagents-Antidepressants.dm"
|
||||
#include "code\modules\reagents\Chemistry-Reagents.dm"
|
||||
#include "code\modules\reagents\Chemistry-Recipes.dm"
|
||||
#include "code\modules\reagents\reagent_containers.dm"
|
||||
@@ -1415,7 +1417,6 @@
|
||||
#include "code\modules\reagents\reagent_containers\glass.dm"
|
||||
#include "code\modules\reagents\reagent_containers\hypospray.dm"
|
||||
#include "code\modules\reagents\reagent_containers\pill.dm"
|
||||
#include "code\modules\reagents\reagent_containers\robodropper.dm"
|
||||
#include "code\modules\reagents\reagent_containers\spray.dm"
|
||||
#include "code\modules\reagents\reagent_containers\syringes.dm"
|
||||
#include "code\modules\reagents\reagent_containers\food\cans.dm"
|
||||
|
||||
@@ -430,6 +430,34 @@ datum/projectile_data
|
||||
var/b = mixOneColor(weights, blues)
|
||||
return rgb(r,g,b)
|
||||
|
||||
/proc/mixOneColor(var/list/weight, var/list/color)
|
||||
if (!weight || !color || length(weight)!=length(color))
|
||||
return 0
|
||||
|
||||
var/contents = length(weight)
|
||||
var/i
|
||||
|
||||
//normalize weights
|
||||
var/listsum = 0
|
||||
for(i=1; i<=contents; i++)
|
||||
listsum += weight[i]
|
||||
for(i=1; i<=contents; i++)
|
||||
weight[i] /= listsum
|
||||
|
||||
//mix them
|
||||
var/mixedcolor = 0
|
||||
for(i=1; i<=contents; i++)
|
||||
mixedcolor += weight[i]*color[i]
|
||||
mixedcolor = round(mixedcolor)
|
||||
|
||||
//until someone writes a formal proof for this algorithm, let's keep this in
|
||||
// if(mixedcolor<0x00 || mixedcolor>0xFF)
|
||||
// return 0
|
||||
//that's not the kind of operation we are running here, nerd
|
||||
mixedcolor=min(max(mixedcolor,0),255)
|
||||
|
||||
return mixedcolor
|
||||
|
||||
/**
|
||||
* Gets the highest and lowest pressures from the tiles in cardinal directions
|
||||
* around us, then checks the difference.
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#define CE_STABLE "stable" // Inaprovaline
|
||||
#define CE_ANTIBIOTIC "antibiotic" // Spaceacilin
|
||||
#define CE_BLOODRESTORE "bloodrestore" // Iron/nutriment
|
||||
#define CE_PAINKILLER "painkiller"
|
||||
#define CE_ALCOHOL "alcohol" // Liver filtering
|
||||
#define CE_ALCOHOL_TOXIC "alcotoxic" // Liver damage
|
||||
#define CE_SPEEDBOOST "gofast" // Hyperzine
|
||||
@@ -94,7 +94,7 @@
|
||||
/datum/recipe/proc/make(var/obj/container as obj)
|
||||
var/obj/result_obj = new result(container)
|
||||
for (var/obj/O in (container.contents-result_obj))
|
||||
O.reagents.trans_to(result_obj, O.reagents.total_volume)
|
||||
O.reagents.trans_to_obj(result_obj, O.reagents.total_volume)
|
||||
del(O)
|
||||
container.reagents.clear_reagents()
|
||||
return result_obj
|
||||
@@ -109,7 +109,7 @@
|
||||
if (O.reagents)
|
||||
O.reagents.del_reagent("nutriment")
|
||||
O.reagents.update_total()
|
||||
O.reagents.trans_to(result_obj, O.reagents.total_volume)
|
||||
O.reagents.trans_to_obj(result_obj, O.reagents.total_volume)
|
||||
del(O)
|
||||
container.reagents.clear_reagents()
|
||||
return result_obj
|
||||
|
||||
@@ -598,8 +598,7 @@
|
||||
inject_amount = 0
|
||||
if (inject_amount > 50)
|
||||
inject_amount = 50
|
||||
connected.beaker.reagents.trans_to(connected.occupant, inject_amount)
|
||||
connected.beaker.reagents.reaction(connected.occupant)
|
||||
connected.beaker.reagents.trans_to_mob(connected.occupant, inject_amount, CHEM_BLOOD)
|
||||
return 1 // return 1 forces an update to all Nano uis attached to src
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
@@ -191,10 +191,10 @@
|
||||
if(beaker.reagents.total_volume < beaker.reagents.maximum_volume)
|
||||
var/pumped = 0
|
||||
for(var/datum/reagent/x in src.occupant.reagents.reagent_list)
|
||||
src.occupant.reagents.trans_to(beaker, 3)
|
||||
src.occupant.reagents.trans_to_obj(beaker, 3)
|
||||
pumped++
|
||||
if (ishuman(src.occupant))
|
||||
src.occupant.vessel.trans_to(beaker, pumped + 1)
|
||||
src.occupant.vessel.trans_to_obj(beaker, pumped + 1)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
|
||||
@@ -466,12 +466,7 @@
|
||||
var splashAmount = min(70,tank.reagents.total_volume)
|
||||
src.visible_message("\red [src] splashes [target] with a bucket of water!")
|
||||
playsound(src.loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
if ( prob(50) )
|
||||
tank.reagents.reaction(target, TOUCH) //splash the human!
|
||||
else
|
||||
tank.reagents.reaction(target.loc, TOUCH) //splash the human's roots!
|
||||
spawn(5)
|
||||
tank.reagents.remove_any(splashAmount)
|
||||
tank.reagents.splash_mob(target, splashAmount)
|
||||
|
||||
mode = FARMBOT_MODE_WAITING
|
||||
spawn(FARMBOT_EMAG_DELAY)
|
||||
|
||||
@@ -428,8 +428,7 @@
|
||||
spawn(30)
|
||||
if ((get_dist(src, src.patient) <= 1) && (src.on))
|
||||
if((reagent_id == "internal_beaker") && (src.reagent_glass) && (src.reagent_glass.reagents.total_volume))
|
||||
src.reagent_glass.reagents.trans_to(src.patient,src.injection_amount) //Inject from beaker instead.
|
||||
src.reagent_glass.reagents.reaction(src.patient, 2)
|
||||
src.reagent_glass.reagents.trans_to_mob(src.patient, src.injection_amount, CHEM_BLOOD) //Inject from beaker instead.
|
||||
else
|
||||
src.patient.reagents.add_reagent(reagent_id,src.injection_amount)
|
||||
visible_message("\red <B>[src] injects [src.patient] with the syringe!</B>")
|
||||
|
||||
@@ -230,8 +230,7 @@
|
||||
var/has_clonexa = occupant.reagents.get_reagent_amount("clonexadone") >= 1
|
||||
var/has_cryo_medicine = has_cryo || has_clonexa
|
||||
if(beaker && !has_cryo_medicine)
|
||||
beaker.reagents.trans_to(occupant, 1, 10)
|
||||
beaker.reagents.reaction(occupant)
|
||||
beaker.reagents.trans_to_mob(occupant, 1, CHEM_BLOOD, 10)
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/proc/heat_gas_contents()
|
||||
if(air_contents.total_moles < 1)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
if(80 to 90) filling.icon_state = "reagent80"
|
||||
if(91 to INFINITY) filling.icon_state = "reagent100"
|
||||
|
||||
filling.icon += mix_color_from_reagents(reagents.reagent_list)
|
||||
filling.icon += reagents.get_color()
|
||||
overlays += filling
|
||||
|
||||
/obj/machinery/iv_drip/MouseDrop(over_object, src_location, over_location)
|
||||
@@ -82,11 +82,11 @@
|
||||
// Give blood
|
||||
if(mode)
|
||||
if(src.beaker.volume > 0)
|
||||
var/transfer_amount = REAGENTS_METABOLISM
|
||||
var/transfer_amount = REM
|
||||
if(istype(src.beaker, /obj/item/weapon/reagent_containers/blood))
|
||||
// speed up transfer on blood packs
|
||||
transfer_amount = 4
|
||||
src.beaker.reagents.trans_to(src.attached, transfer_amount)
|
||||
src.beaker.reagents.trans_to_mob(src.attached, transfer_amount, CHEM_BLOOD)
|
||||
update_icon()
|
||||
|
||||
// Take blood
|
||||
|
||||
@@ -210,7 +210,7 @@
|
||||
new_meat.reagents.add_reagent("nutriment",slab_nutrition)
|
||||
|
||||
if(src.occupant.reagents)
|
||||
src.occupant.reagents.trans_to(new_meat, round(occupant.reagents.total_volume/slab_count,1))
|
||||
src.occupant.reagents.trans_to_obj(new_meat, round(occupant.reagents.total_volume/slab_count,1))
|
||||
|
||||
src.occupant.attack_log += "\[[time_stamp()]\] Was gibbed by <b>[user]/[user.ckey]</b>" //One shall not simply gib a mob unnoticed!
|
||||
user.attack_log += "\[[time_stamp()]\] Gibbed <b>[src.occupant]/[src.occupant.ckey]</b>"
|
||||
|
||||
@@ -439,7 +439,7 @@
|
||||
var/turf/trg = get_turf(target)
|
||||
var/obj/item/weapon/reagent_containers/syringe/S = syringes[1]
|
||||
S.forceMove(get_turf(chassis))
|
||||
reagents.trans_to(S, min(S.volume, reagents.total_volume))
|
||||
reagents.trans_to_obj(S, min(S.volume, reagents.total_volume))
|
||||
syringes -= S
|
||||
S.icon = 'icons/obj/chemical.dmi'
|
||||
S.icon_state = "syringeproj"
|
||||
@@ -458,7 +458,7 @@
|
||||
if(M)
|
||||
S.icon_state = initial(S.icon_state)
|
||||
S.icon = initial(S.icon)
|
||||
S.reagents.trans_to(M, S.reagents.total_volume)
|
||||
S.reagents.trans_to_mob(M, S.reagents.total_volume, CHEM_BLOOD)
|
||||
M.take_organ_damage(2)
|
||||
S.visible_message("<span class=\"attack\"> [M] was hit by the syringe!</span>")
|
||||
break
|
||||
@@ -587,7 +587,7 @@
|
||||
if(!(D.CanPass(S,src.loc)))
|
||||
occupant_message("Unable to load syringe.")
|
||||
return 0
|
||||
S.reagents.trans_to(src, S.reagents.total_volume)
|
||||
S.reagents.trans_to_obj(src, S.reagents.total_volume)
|
||||
S.forceMove(src)
|
||||
syringes += S
|
||||
occupant_message("Syringe loaded.")
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
if(do_after_cooldown(target))
|
||||
if( istype(target, /obj/structure/reagent_dispensers/watertank) && get_dist(chassis,target) <= 1)
|
||||
var/obj/o = target
|
||||
var/amount = o.reagents.trans_to(src, 200)
|
||||
var/amount = o.reagents.trans_to_obj(src, 200)
|
||||
occupant_message("\blue [amount] units transferred into internal tank.")
|
||||
playsound(chassis, 'sound/effects/refill.ogg', 50, 1, -6)
|
||||
return
|
||||
@@ -213,29 +213,24 @@
|
||||
|
||||
var/list/the_targets = list(T,T1,T2)
|
||||
|
||||
for(var/a=0, a<5, a++)
|
||||
for(var/a = 1 to 5)
|
||||
spawn(0)
|
||||
var/obj/effect/effect/water/W = new /obj/effect/effect/water( get_turf(chassis) )
|
||||
var/turf/my_target = pick(the_targets)
|
||||
var/datum/reagents/R = new/datum/reagents(5)
|
||||
if(!W) return
|
||||
W.reagents = R
|
||||
R.my_atom = W
|
||||
if(!W || !src) return
|
||||
src.reagents.trans_to(W,1)
|
||||
for(var/b=0, b<5, b++)
|
||||
step_towards(W,my_target)
|
||||
if(!W || !W.reagents) return
|
||||
W.reagents.reaction(get_turf(W))
|
||||
for(var/atom/atm in get_turf(W))
|
||||
if(!W)
|
||||
return
|
||||
if(!W.reagents)
|
||||
break
|
||||
W.reagents.reaction(atm)
|
||||
if(W.loc == my_target) break
|
||||
sleep(2)
|
||||
W.delete()
|
||||
var/obj/effect/effect/water/W = new /obj/effect/effect/water(get_turf(chassis))
|
||||
var/turf/my_target
|
||||
if(a == 1)
|
||||
my_target = T
|
||||
else if(a == 2)
|
||||
my_target = T1
|
||||
else if(a == 3)
|
||||
my_target = T2
|
||||
else
|
||||
my_target = pick(the_targets)
|
||||
W.create_reagents(5)
|
||||
if(!src)
|
||||
return
|
||||
reagents.trans_to_obj(W, spray_amount)
|
||||
W.set_color()
|
||||
W.set_up(my_target)
|
||||
return 1
|
||||
|
||||
get_equip_info()
|
||||
|
||||
+32
-101
@@ -5,13 +5,11 @@
|
||||
icon = 'icons/effects/chemsmoke.dmi'
|
||||
opacity = 0
|
||||
time_to_live = 300
|
||||
pass_flags = PASSTABLE | PASSGRILLE | PASSGLASS //PASSGLASS is fine here, it's just so the visual effect can "flow" around glass
|
||||
pass_flags = PASSTABLE | PASSGRILLE | PASSGLASS //PASSGLASS is fine here, it's just so the visual effect can "flow" around glass
|
||||
|
||||
/obj/effect/effect/smoke/chem/New()
|
||||
..()
|
||||
var/datum/reagents/R = new/datum/reagents(500)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
create_reagents(500)
|
||||
return
|
||||
|
||||
/datum/effect/effect/system/smoke_spread/chem
|
||||
@@ -37,21 +35,16 @@
|
||||
/datum/effect/effect/system/smoke_spread/chem/New()
|
||||
..()
|
||||
chemholder = new/obj()
|
||||
var/datum/reagents/R = new/datum/reagents(500)
|
||||
chemholder.reagents = R
|
||||
R.my_atom = chemholder
|
||||
chemholder.create_reagents(500)
|
||||
|
||||
//------------------------------------------
|
||||
//Sets up the chem smoke effect
|
||||
//
|
||||
// Calculates the max range smoke can travel, then gets all turfs in that view range.
|
||||
// Culls the selected turfs to a (roughly) circle shape, then calls smokeFlow() to make
|
||||
// sure the smoke can actually path to the turfs. This culls any turfs it can't reach.
|
||||
//------------------------------------------
|
||||
/datum/effect/effect/system/smoke_spread/chem/set_up(var/datum/reagents/carry = null, n = 10, c = 0, loca, direct)
|
||||
range = n * 0.3
|
||||
cardinals = c
|
||||
carry.copy_to(chemholder, carry.total_volume)
|
||||
carry.trans_to_obj(chemholder, carry.total_volume, copy = 1)
|
||||
|
||||
if(istype(loca, /turf/))
|
||||
location = loca
|
||||
@@ -62,28 +55,19 @@
|
||||
|
||||
targetTurfs = new()
|
||||
|
||||
//build affected area list
|
||||
for(var/turf/T in view(range, location))
|
||||
//cull turfs to circle
|
||||
if(cheap_pythag(T.x - location.x, T.y - location.y) <= range)
|
||||
for(var/turf/T in view(range, location)) //build affected area list
|
||||
if(cheap_pythag(T.x - location.x, T.y - location.y) <= range) //cull turfs to circle
|
||||
targetTurfs += T
|
||||
|
||||
//make secondary list for reagents that affect walls
|
||||
if(chemholder.reagents.has_reagent("thermite") || chemholder.reagents.has_reagent("plantbgone"))
|
||||
wallList = new()
|
||||
wallList = new()
|
||||
|
||||
//pathing check
|
||||
smokeFlow(location, targetTurfs, wallList)
|
||||
smokeFlow() //pathing check
|
||||
|
||||
//set the density of the cloud - for diluting reagents
|
||||
density = max(1, targetTurfs.len / 4) //clamp the cloud density minimum to 1 so it cant multiply the reagents
|
||||
density = max(1, targetTurfs.len / 4) //clamp the cloud density minimum to 1 so it cant multiply the reagents
|
||||
|
||||
//Admin messaging
|
||||
var/contained = ""
|
||||
for(var/reagent in carry.reagent_list)
|
||||
contained += " [reagent] "
|
||||
if(contained)
|
||||
contained = "\[[contained]\]"
|
||||
var/contained = carry.get_reagents()
|
||||
var/area/A = get_area(location)
|
||||
|
||||
var/where = "[A.name] | [location.x], [location.y]"
|
||||
@@ -101,61 +85,27 @@
|
||||
message_admins("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1)
|
||||
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.")
|
||||
|
||||
|
||||
//------------------------------------------
|
||||
//Runs the chem smoke effect
|
||||
//
|
||||
// Spawns damage over time loop for each reagent held in the cloud.
|
||||
// Applies reagents to walls that affect walls (only thermite and plant-b-gone at the moment).
|
||||
// Also calculates target locations to spawn the visual smoke effect on, so the whole area
|
||||
// is covered fairly evenly.
|
||||
//------------------------------------------
|
||||
/datum/effect/effect/system/smoke_spread/chem/start()
|
||||
|
||||
if(!location) //kill grenade if it somehow ends up in nullspace
|
||||
if(!location)
|
||||
return
|
||||
|
||||
//reagent application - only run if there are extra reagents in the smoke
|
||||
if(chemholder.reagents.reagent_list.len)
|
||||
for(var/datum/reagent/R in chemholder.reagents.reagent_list)
|
||||
var/proba = 100
|
||||
var/runs = 5
|
||||
if(chemholder.reagents.reagent_list.len) //reagent application - only run if there are extra reagents in the smoke
|
||||
for(var/turf/T in wallList)
|
||||
chemholder.reagents.touch_turf(T)
|
||||
for(var/turf/T in targetTurfs)
|
||||
chemholder.reagents.touch_turf(T)
|
||||
for(var/atom/A in T.contents)
|
||||
if(istype(A, /obj/effect/effect/smoke/chem) || istype(A, /mob))
|
||||
continue
|
||||
else if(isobj(A))
|
||||
chemholder.reagents.touch_obj(A)
|
||||
|
||||
//dilute the reagents according to cloud density
|
||||
R.volume /= density
|
||||
chemholder.reagents.update_total()
|
||||
|
||||
//apply wall affecting reagents to walls
|
||||
if(R.id in list("thermite", "plantbgone"))
|
||||
for(var/turf/T in wallList)
|
||||
R.reaction_turf(T, R.volume)
|
||||
|
||||
//reagents that should be applied to turfs in a random pattern
|
||||
if(R.id == "carbon")
|
||||
proba = 75
|
||||
else if(R.id in list("blood", "radium", "uranium"))
|
||||
proba = 25
|
||||
|
||||
spawn(0)
|
||||
for(var/i = 0, i < runs, i++)
|
||||
for(var/turf/T in targetTurfs)
|
||||
if(prob(proba))
|
||||
R.reaction_turf(T, R.volume)
|
||||
for(var/atom/A in T.contents)
|
||||
if(istype(A, /obj/effect/effect/smoke/chem)) //skip the item if it is chem smoke
|
||||
continue
|
||||
else if(istype(A, /mob))
|
||||
var/dist = cheap_pythag(T.x - location.x, T.y - location.y)
|
||||
if(!dist)
|
||||
dist = 1
|
||||
R.reaction_mob(A, volume = R.volume / dist)
|
||||
else if(istype(A, /obj))
|
||||
R.reaction_obj(A, R.volume)
|
||||
sleep(30)
|
||||
|
||||
|
||||
//build smoke icon
|
||||
var/color = mix_color_from_reagents(chemholder.reagents.reagent_list)
|
||||
var/color = chemholder.reagents.get_color() //build smoke icon
|
||||
var/icon/I
|
||||
if(color)
|
||||
I = icon('icons/effects/chemsmoke.dmi')
|
||||
@@ -163,13 +113,9 @@
|
||||
else
|
||||
I = icon('icons/effects/96x96.dmi', "smoke")
|
||||
|
||||
var/const/arcLength = 2.3559 //distance between each smoke cloud
|
||||
|
||||
//distance between each smoke cloud
|
||||
var/const/arcLength = 2.3559
|
||||
|
||||
|
||||
//calculate positions for smoke coverage - then spawn smoke
|
||||
for(var/i = 0, i < range, i++)
|
||||
for(var/i = 0, i < range, i++) //calculate positions for smoke coverage - then spawn smoke
|
||||
var/radius = i * 1.5
|
||||
if(!radius)
|
||||
spawn(0)
|
||||
@@ -194,25 +140,16 @@
|
||||
spawn(0)
|
||||
spawnSmoke(T, I, range)
|
||||
|
||||
//------------------------------------------
|
||||
// Randomizes and spawns the smoke effect.
|
||||
// Also handles deleting the smoke once the effect is finished.
|
||||
//------------------------------------------
|
||||
/datum/effect/effect/system/smoke_spread/chem/proc/spawnSmoke(var/turf/T, var/icon/I, var/dist = 1, var/obj/effect/effect/smoke/chem/passed_smoke)
|
||||
|
||||
var/obj/effect/effect/smoke/chem/smoke
|
||||
if(passed_smoke)
|
||||
smoke = passed_smoke
|
||||
else
|
||||
smoke = new(location)
|
||||
/datum/effect/effect/system/smoke_spread/chem/proc/spawnSmoke(var/turf/T, var/icon/I, var/dist = 1) // Randomizes and spawns the smoke effect. Also handles deleting the smoke once the effect is finished.
|
||||
var/obj/effect/effect/smoke/chem/smoke = new(location)
|
||||
|
||||
if(chemholder.reagents.reagent_list.len)
|
||||
chemholder.reagents.copy_to(smoke, chemholder.reagents.total_volume / dist, safety = 1) //copy reagents to the smoke so mob/breathe() can handle inhaling the reagents
|
||||
chemholder.reagents.trans_to_obj(smoke, chemholder.reagents.total_volume / dist, copy = 1) //copy reagents to the smoke so mob/breathe() can handle inhaling the reagents
|
||||
smoke.icon = I
|
||||
smoke.layer = 6
|
||||
smoke.set_dir(pick(cardinal))
|
||||
smoke.pixel_x = -32 + rand(-8,8)
|
||||
smoke.pixel_y = -32 + rand(-8,8)
|
||||
smoke.pixel_x = -32 + rand(-8, 8)
|
||||
smoke.pixel_y = -32 + rand(-8, 8)
|
||||
walk_to(smoke, T)
|
||||
smoke.opacity = 1 //switching opacity on after the smoke has spawned, and then
|
||||
sleep(150+rand(0,20)) // turning it off before it is deleted results in cleaner
|
||||
@@ -225,21 +162,15 @@
|
||||
spores.name = "cloud of [seed.seed_name] [seed.seed_noun]"
|
||||
..(T, I, dist, spores)
|
||||
|
||||
//------------------------------------------
|
||||
// Fades out the smoke smoothly using it's alpha variable.
|
||||
//------------------------------------------
|
||||
/datum/effect/effect/system/smoke_spread/chem/proc/fadeOut(var/atom/A, var/frames = 16)
|
||||
/datum/effect/effect/system/smoke_spread/chem/proc/fadeOut(var/atom/A, var/frames = 16) // Fades out the smoke smoothly using it's alpha variable.
|
||||
var/step = A.alpha / frames
|
||||
for(var/i = 0, i < frames, i++)
|
||||
A.alpha -= step
|
||||
sleep(world.tick_lag)
|
||||
return
|
||||
|
||||
//------------------------------------------
|
||||
// Smoke pathfinder. Uses a flood fill method based on zones to
|
||||
// quickly check what turfs the smoke (airflow) can actually reach.
|
||||
//------------------------------------------
|
||||
/datum/effect/effect/system/smoke_spread/chem/proc/smokeFlow()
|
||||
|
||||
/datum/effect/effect/system/smoke_spread/chem/proc/smokeFlow() // Smoke pathfinder. Uses a flood fill method based on zones to quickly check what turfs the smoke (airflow) can actually reach.
|
||||
|
||||
var/list/pending = new()
|
||||
var/list/complete = new()
|
||||
@@ -0,0 +1,184 @@
|
||||
// Foam
|
||||
// Similar to smoke, but spreads out more
|
||||
// metal foams leave behind a foamed metal wall
|
||||
|
||||
/obj/effect/effect/foam
|
||||
name = "foam"
|
||||
icon_state = "foam"
|
||||
opacity = 0
|
||||
anchored = 1
|
||||
density = 0
|
||||
layer = OBJ_LAYER + 0.9
|
||||
mouse_opacity = 0
|
||||
animate_movement = 0
|
||||
var/amount = 3
|
||||
var/expand = 1
|
||||
var/metal = 0
|
||||
|
||||
/obj/effect/effect/foam/New(var/loc, var/ismetal = 0)
|
||||
..(loc)
|
||||
icon_state = "[ismetal? "m" : ""]foam"
|
||||
metal = ismetal
|
||||
playsound(src, 'sound/effects/bubbles2.ogg', 80, 1, -3)
|
||||
spawn(3 + metal * 3)
|
||||
process()
|
||||
checkReagents()
|
||||
spawn(120)
|
||||
processing_objects.Remove(src)
|
||||
sleep(30)
|
||||
if(metal)
|
||||
var/obj/structure/foamedmetal/M = new(src.loc)
|
||||
M.metal = metal
|
||||
M.updateicon()
|
||||
flick("[icon_state]-disolve", src)
|
||||
sleep(5)
|
||||
delete()
|
||||
return
|
||||
|
||||
/obj/effect/effect/foam/proc/checkReagents() // transfer any reagents to the floor
|
||||
if(!metal && reagents)
|
||||
var/turf/T = get_turf(src)
|
||||
reagents.touch_turf(T)
|
||||
|
||||
/obj/effect/effect/foam/process()
|
||||
if(--amount < 0)
|
||||
return
|
||||
|
||||
for(var/direction in cardinal)
|
||||
var/turf/T = get_step(src, direction)
|
||||
if(!T)
|
||||
continue
|
||||
|
||||
if(!T.Enter(src))
|
||||
continue
|
||||
|
||||
var/obj/effect/effect/foam/F = locate() in T
|
||||
if(F)
|
||||
continue
|
||||
|
||||
F = new(T, metal)
|
||||
F.amount = amount
|
||||
if(!metal)
|
||||
F.create_reagents(10)
|
||||
if(reagents)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
F.reagents.add_reagent(R.id, 1, safety = 1) //added safety check since reagents in the foam have already had a chance to react
|
||||
|
||||
/obj/effect/effect/foam/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) // foam disolves when heated, except metal foams
|
||||
if(!metal && prob(max(0, exposed_temperature - 475)))
|
||||
flick("[icon_state]-disolve", src)
|
||||
|
||||
spawn(5)
|
||||
delete()
|
||||
|
||||
/obj/effect/effect/foam/Crossed(var/atom/movable/AM)
|
||||
if(metal)
|
||||
return
|
||||
if(istype(AM, /mob/living))
|
||||
var/mob/living/M = AM
|
||||
M.slip("the foam", 6)
|
||||
|
||||
/datum/effect/effect/system/foam_spread
|
||||
var/amount = 5 // the size of the foam spread.
|
||||
var/list/carried_reagents // the IDs of reagents present when the foam was mixed
|
||||
var/metal = 0 // 0 = foam, 1 = metalfoam, 2 = ironfoam
|
||||
|
||||
/datum/effect/effect/system/foam_spread/set_up(amt=5, loca, var/datum/reagents/carry = null, var/metalfoam = 0)
|
||||
amount = round(sqrt(amt / 3), 1)
|
||||
if(istype(loca, /turf/))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
|
||||
carried_reagents = list()
|
||||
metal = metalfoam
|
||||
|
||||
// bit of a hack here. Foam carries along any reagent also present in the glass it is mixed with (defaults to water if none is present). Rather than actually transfer the reagents, this makes a list of the reagent ids and spawns 1 unit of that reagent when the foam disolves.
|
||||
|
||||
if(carry && !metal)
|
||||
for(var/datum/reagent/R in carry.reagent_list)
|
||||
carried_reagents += R.id
|
||||
|
||||
/datum/effect/effect/system/foam_spread/start()
|
||||
spawn(0)
|
||||
var/obj/effect/effect/foam/F = locate() in location
|
||||
if(F)
|
||||
F.amount += amount
|
||||
return
|
||||
|
||||
F = new(location, metal)
|
||||
F.amount = amount
|
||||
|
||||
if(!metal) // don't carry other chemicals if a metal foam
|
||||
F.create_reagents(10)
|
||||
|
||||
if(carried_reagents)
|
||||
for(var/id in carried_reagents)
|
||||
F.reagents.add_reagent(id, 1, safety = 1) //makes a safety call because all reagents should have already reacted anyway
|
||||
else
|
||||
F.reagents.add_reagent("water", 1, safety = 1)
|
||||
|
||||
// wall formed by metal foams, dense and opaque, but easy to break
|
||||
|
||||
/obj/structure/foamedmetal
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "metalfoam"
|
||||
density = 1
|
||||
opacity = 1 // changed in New()
|
||||
anchored = 1
|
||||
name = "foamed metal"
|
||||
desc = "A lightweight foamed metal wall."
|
||||
var/metal = 1 // 1 = aluminum, 2 = iron
|
||||
|
||||
/obj/structure/foamedmetal/New()
|
||||
..()
|
||||
update_nearby_tiles(1)
|
||||
|
||||
/obj/structure/foamedmetal/Del()
|
||||
density = 0
|
||||
update_nearby_tiles(1)
|
||||
..()
|
||||
|
||||
/obj/structure/foamedmetal/proc/updateicon()
|
||||
if(metal == 1)
|
||||
icon_state = "metalfoam"
|
||||
else
|
||||
icon_state = "ironfoam"
|
||||
|
||||
/obj/structure/foamedmetal/ex_act(severity)
|
||||
del(src)
|
||||
|
||||
/obj/structure/foamedmetal/blob_act()
|
||||
del(src)
|
||||
|
||||
/obj/structure/foamedmetal/bullet_act()
|
||||
if(metal == 1 || prob(50))
|
||||
del(src)
|
||||
|
||||
/obj/structure/foamedmetal/attack_hand(var/mob/user)
|
||||
if ((HULK in user.mutations) || (prob(75 - metal * 25)))
|
||||
user.visible_message("<span class='warning'>[user] smashes through the foamed metal.</span>", "<span class='notice'>You smash through the metal foam wall.</span>")
|
||||
del(src)
|
||||
else
|
||||
user << "<span class='notice'>You hit the metal foam but bounce off it.</span>"
|
||||
return
|
||||
|
||||
/obj/structure/foamedmetal/attackby(var/obj/item/I, var/mob/user)
|
||||
if(istype(I, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = I
|
||||
G.affecting.loc = src.loc
|
||||
visible_message("<span class='warning'>[G.assailant] smashes [G.affecting] through the foamed metal wall.</span>")
|
||||
del(I)
|
||||
del(src)
|
||||
return
|
||||
|
||||
if(prob(I.force * 20 - metal * 25))
|
||||
user.visible_message("<span class='warning'>[user] smashes through the foamed metal.</span>", "<span class='notice'>You smash through the foamed metal with \the [I].</span>")
|
||||
del(src)
|
||||
else
|
||||
user << "<span class='notice'>You hit the metal foam to no effect.</span>"
|
||||
|
||||
/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
||||
if(air_group)
|
||||
return 0
|
||||
return !density
|
||||
@@ -0,0 +1,50 @@
|
||||
/obj/effect/effect/water
|
||||
name = "water"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "extinguish"
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/effect/effect/water/New(loc)
|
||||
..()
|
||||
spawn(150) // In case whatever made it forgets to delete it
|
||||
if(src)
|
||||
delete()
|
||||
|
||||
/obj/effect/effect/water/proc/set_color() // Call it after you move reagents to it
|
||||
icon += reagents.get_color()
|
||||
|
||||
/obj/effect/effect/water/proc/set_up(var/turf/target, var/step_count = 5, var/delay = 5)
|
||||
if(!target)
|
||||
return
|
||||
for(var/i = 1 to step_count)
|
||||
step_towards(src, target)
|
||||
var/turf/T = get_turf(src)
|
||||
reagents.touch_turf(T)
|
||||
var/mob/M = locate() in T
|
||||
if(M)
|
||||
reagents.splash_mob(M, reagents.total_volume)
|
||||
break
|
||||
for(var/atom/A in T)
|
||||
reagents.touch(A)
|
||||
if(T == get_turf(target))
|
||||
break
|
||||
sleep(delay)
|
||||
sleep(10)
|
||||
delete()
|
||||
|
||||
/obj/effect/effect/water/Move(turf/newloc)
|
||||
if(newloc.density)
|
||||
return 0
|
||||
. = ..()
|
||||
|
||||
/obj/effect/effect/water/Bump(atom/A)
|
||||
if(reagents)
|
||||
reagents.touch(A)
|
||||
return ..()
|
||||
|
||||
//Used by spraybottles.
|
||||
/obj/effect/effect/water/chempuff
|
||||
name = "chemicals"
|
||||
icon = 'icons/obj/chempuff.dmi'
|
||||
icon_state = ""
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
@@ -11,10 +11,4 @@
|
||||
/obj/effect/decal/spraystill
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 50
|
||||
|
||||
//Used by spraybottles.
|
||||
/obj/effect/decal/chempuff
|
||||
name = "chemicals"
|
||||
icon = 'icons/obj/chempuff.dmi'
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
layer = 50
|
||||
@@ -13,36 +13,12 @@ would spawn and follow the beaker, even if it is carried or thrown.
|
||||
unacidable = 1//So effect are not targeted by alien acid.
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
|
||||
/obj/effect/effect/water
|
||||
name = "water"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "extinguish"
|
||||
var/life = 15.0
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/effect/proc/delete()
|
||||
loc = null
|
||||
if(reagents)
|
||||
reagents.delete()
|
||||
return
|
||||
|
||||
/obj/effect/effect/water/Move(turf/newloc)
|
||||
//var/turf/T = src.loc
|
||||
//if (istype(T, /turf))
|
||||
// T.firelevel = 0 //TODO: FIX
|
||||
if (--src.life < 1)
|
||||
//SN src = null
|
||||
delete()
|
||||
if(newloc.density)
|
||||
return 0
|
||||
.=..()
|
||||
|
||||
/obj/effect/effect/water/Bump(atom/A)
|
||||
if(reagents)
|
||||
reagents.reaction(A)
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/effect/effect/system
|
||||
var/number = 3
|
||||
var/cardinals = 0
|
||||
@@ -482,227 +458,6 @@ steam.start() -- spawns the effect
|
||||
src.processing = 0
|
||||
src.on = 0
|
||||
|
||||
|
||||
|
||||
// Foam
|
||||
// Similar to smoke, but spreads out more
|
||||
// metal foams leave behind a foamed metal wall
|
||||
|
||||
/obj/effect/effect/foam
|
||||
name = "foam"
|
||||
icon_state = "foam"
|
||||
opacity = 0
|
||||
anchored = 1
|
||||
density = 0
|
||||
layer = OBJ_LAYER + 0.9
|
||||
mouse_opacity = 0
|
||||
var/amount = 3
|
||||
var/expand = 1
|
||||
animate_movement = 0
|
||||
var/metal = 0
|
||||
|
||||
|
||||
/obj/effect/effect/foam/New(loc, var/ismetal=0)
|
||||
..(loc)
|
||||
icon_state = "[ismetal ? "m":""]foam"
|
||||
metal = ismetal
|
||||
playsound(src, 'sound/effects/bubbles2.ogg', 80, 1, -3)
|
||||
spawn(3 + metal*3)
|
||||
process()
|
||||
checkReagents()
|
||||
spawn(120)
|
||||
processing_objects.Remove(src)
|
||||
sleep(30)
|
||||
|
||||
if(metal)
|
||||
var/obj/structure/foamedmetal/M = new(src.loc)
|
||||
M.metal = metal
|
||||
M.updateicon()
|
||||
|
||||
flick("[icon_state]-disolve", src)
|
||||
sleep(5)
|
||||
delete()
|
||||
return
|
||||
|
||||
// transfer any reagents to the floor
|
||||
/obj/effect/effect/foam/proc/checkReagents()
|
||||
if(!metal && reagents)
|
||||
for(var/atom/A in src.loc.contents)
|
||||
if(A == src)
|
||||
continue
|
||||
reagents.reaction(A, 1, 1)
|
||||
|
||||
/obj/effect/effect/foam/process()
|
||||
if(--amount < 0)
|
||||
return
|
||||
|
||||
|
||||
for(var/direction in cardinal)
|
||||
|
||||
|
||||
var/turf/T = get_step(src,direction)
|
||||
if(!T)
|
||||
continue
|
||||
|
||||
if(!T.Enter(src))
|
||||
continue
|
||||
|
||||
var/obj/effect/effect/foam/F = locate() in T
|
||||
if(F)
|
||||
continue
|
||||
|
||||
F = new(T, metal)
|
||||
F.amount = amount
|
||||
if(!metal)
|
||||
F.create_reagents(10)
|
||||
if (reagents)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
F.reagents.add_reagent(R.id, 1, safety = 1) //added safety check since reagents in the foam have already had a chance to react
|
||||
|
||||
// foam disolves when heated
|
||||
// except metal foams
|
||||
/obj/effect/effect/foam/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(!metal && prob(max(0, exposed_temperature - 475)))
|
||||
flick("[icon_state]-disolve", src)
|
||||
|
||||
spawn(5)
|
||||
delete()
|
||||
|
||||
|
||||
/obj/effect/effect/foam/Crossed(var/atom/movable/AM)
|
||||
if(metal)
|
||||
return
|
||||
if(istype(AM, /mob/living))
|
||||
var/mob/living/M = AM
|
||||
M.slip("the foam",6)
|
||||
|
||||
/datum/effect/effect/system/foam_spread
|
||||
var/amount = 5 // the size of the foam spread.
|
||||
var/list/carried_reagents // the IDs of reagents present when the foam was mixed
|
||||
var/metal = 0 // 0=foam, 1=metalfoam, 2=ironfoam
|
||||
|
||||
|
||||
|
||||
|
||||
set_up(amt=5, loca, var/datum/reagents/carry = null, var/metalfoam = 0)
|
||||
amount = round(sqrt(amt / 3), 1)
|
||||
if(istype(loca, /turf/))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
|
||||
carried_reagents = list()
|
||||
metal = metalfoam
|
||||
|
||||
|
||||
// bit of a hack here. Foam carries along any reagent also present in the glass it is mixed
|
||||
// with (defaults to water if none is present). Rather than actually transfer the reagents,
|
||||
// this makes a list of the reagent ids and spawns 1 unit of that reagent when the foam disolves.
|
||||
|
||||
|
||||
if(carry && !metal)
|
||||
for(var/datum/reagent/R in carry.reagent_list)
|
||||
carried_reagents += R.id
|
||||
|
||||
start()
|
||||
spawn(0)
|
||||
var/obj/effect/effect/foam/F = locate() in location
|
||||
if(F)
|
||||
F.amount += amount
|
||||
return
|
||||
|
||||
F = new(src.location, metal)
|
||||
F.amount = amount
|
||||
|
||||
if(!metal) // don't carry other chemicals if a metal foam
|
||||
F.create_reagents(10)
|
||||
|
||||
if(carried_reagents)
|
||||
for(var/id in carried_reagents)
|
||||
F.reagents.add_reagent(id, 1, null, 1) //makes a safety call because all reagents should have already reacted anyway
|
||||
else
|
||||
F.reagents.add_reagent("water", 1, safety = 1)
|
||||
|
||||
// wall formed by metal foams
|
||||
// dense and opaque, but easy to break
|
||||
|
||||
/obj/structure/foamedmetal
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "metalfoam"
|
||||
density = 1
|
||||
opacity = 1 // changed in New()
|
||||
anchored = 1
|
||||
name = "foamed metal"
|
||||
desc = "A lightweight foamed metal wall."
|
||||
var/metal = 1 // 1=aluminum, 2=iron
|
||||
|
||||
New()
|
||||
..()
|
||||
update_nearby_tiles(1)
|
||||
|
||||
|
||||
|
||||
Del()
|
||||
|
||||
density = 0
|
||||
update_nearby_tiles(1)
|
||||
..()
|
||||
|
||||
proc/updateicon()
|
||||
if(metal == 1)
|
||||
icon_state = "metalfoam"
|
||||
else
|
||||
icon_state = "ironfoam"
|
||||
|
||||
|
||||
ex_act(severity)
|
||||
del(src)
|
||||
|
||||
blob_act()
|
||||
del(src)
|
||||
|
||||
bullet_act()
|
||||
if(metal==1 || prob(50))
|
||||
del(src)
|
||||
|
||||
attack_hand(var/mob/user)
|
||||
if ((HULK in user.mutations) || (prob(75 - metal*25)))
|
||||
user << "\blue You smash through the metal foam wall."
|
||||
for(var/mob/O in oviewers(user))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [user] smashes through the foamed metal."
|
||||
|
||||
del(src)
|
||||
else
|
||||
user << "\blue You hit the metal foam but bounce off it."
|
||||
return
|
||||
|
||||
|
||||
attackby(var/obj/item/I, var/mob/user)
|
||||
|
||||
if (istype(I, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = I
|
||||
G.affecting.loc = src.loc
|
||||
for(var/mob/O in viewers(src))
|
||||
if (O.client)
|
||||
O << "\red [G.assailant] smashes [G.affecting] through the foamed metal wall."
|
||||
del(I)
|
||||
del(src)
|
||||
return
|
||||
|
||||
if(prob(I.force*20 - metal*25))
|
||||
user << "\blue You smash through the foamed metal with \the [I]."
|
||||
for(var/mob/O in oviewers(user))
|
||||
if ((O.client && !( O.blinded )))
|
||||
O << "\red [user] smashes through the foamed metal."
|
||||
del(src)
|
||||
else
|
||||
user << "\blue You hit the metal foam to no effect."
|
||||
|
||||
CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
||||
if(air_group) return 0
|
||||
return !density
|
||||
|
||||
/datum/effect/effect/system/reagents_explosion
|
||||
var/amount // TNT equivalent
|
||||
var/flashing = 0 // does explosion creates flash effect?
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
/obj/item/toy/balloon/afterattack(atom/A as mob|obj, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
if (istype(A, /obj/structure/reagent_dispensers/watertank) && get_dist(src,A) <= 1)
|
||||
A.reagents.trans_to(src, 10)
|
||||
A.reagents.trans_to_obj(src, 10)
|
||||
user << "\blue You fill the balloon with the contents of [A]."
|
||||
src.desc = "A translucent balloon with some form of liquid sloshing around in it."
|
||||
src.update_icon()
|
||||
@@ -62,21 +62,21 @@
|
||||
else if(O.reagents.total_volume >= 1)
|
||||
if(O.reagents.has_reagent("pacid", 1))
|
||||
user << "The acid chews through the balloon!"
|
||||
O.reagents.reaction(user)
|
||||
O.reagents.splash_mob(user, reagents.total_volume)
|
||||
del(src)
|
||||
else
|
||||
src.desc = "A translucent balloon with some form of liquid sloshing around in it."
|
||||
user << "\blue You fill the balloon with the contents of [O]."
|
||||
O.reagents.trans_to(src, 10)
|
||||
O.reagents.trans_to_obj(src, 10)
|
||||
src.update_icon()
|
||||
return
|
||||
|
||||
/obj/item/toy/balloon/throw_impact(atom/hit_atom)
|
||||
if(src.reagents.total_volume >= 1)
|
||||
src.visible_message("\red The [src] bursts!","You hear a pop and a splash.")
|
||||
src.reagents.reaction(get_turf(hit_atom))
|
||||
src.reagents.touch_turf(get_turf(hit_atom))
|
||||
for(var/atom/A in get_turf(hit_atom))
|
||||
src.reagents.reaction(A)
|
||||
src.reagents.touch(A)
|
||||
src.icon_state = "burst"
|
||||
spawn(5)
|
||||
if(src)
|
||||
@@ -482,15 +482,15 @@
|
||||
D.icon = 'icons/obj/chemical.dmi'
|
||||
D.icon_state = "chempuff"
|
||||
D.create_reagents(5)
|
||||
src.reagents.trans_to(D, 1)
|
||||
src.reagents.trans_to_obj(D, 1)
|
||||
playsound(src.loc, 'sound/effects/spray3.ogg', 50, 1, -6)
|
||||
|
||||
spawn(0)
|
||||
for(var/i=0, i<1, i++)
|
||||
step_towards(D,A)
|
||||
D.reagents.reaction(get_turf(D))
|
||||
D.reagents.touch_turf(get_turf(D))
|
||||
for(var/atom/T in get_turf(D))
|
||||
D.reagents.reaction(T)
|
||||
D.reagents.touch(T)
|
||||
if(ismob(T) && T:client)
|
||||
T:client << "\red [user] has sprayed you with water!"
|
||||
sleep(4)
|
||||
|
||||
@@ -114,10 +114,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
return
|
||||
|
||||
reagents.trans_to(C, REAGENTS_METABOLISM, 0.2) // Most of it is not inhaled... balance reasons.
|
||||
reagents.reaction(C)
|
||||
reagents.trans_to_mob(C, REM, CHEM_INGEST, 0.2) // Most of it is not inhaled... balance reasons.
|
||||
else // else just remove some of the reagents
|
||||
reagents.remove_any(REAGENTS_METABOLISM)
|
||||
reagents.remove_any(REM)
|
||||
|
||||
/obj/item/clothing/mask/smokable/proc/light(var/flavor_text = "[usr] lights the [name].")
|
||||
if(!src.lit)
|
||||
@@ -176,7 +175,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
M.update_inv_l_hand(0)
|
||||
M.update_inv_r_hand(1)
|
||||
processing_objects.Remove(src)
|
||||
|
||||
|
||||
/obj/item/clothing/mask/smokable/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(isflamesource(W))
|
||||
@@ -221,7 +220,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(istype(W, /obj/item/weapon/melee/energy/sword))
|
||||
var/obj/item/weapon/melee/energy/sword/S = W
|
||||
if(S.active)
|
||||
light("<span class='warning'>[user] swings their [W], barely missing their nose. They light their [name] in the process.</span>")
|
||||
light("<span class='warning'>[user] swings their [W], barely missing their nose. They light their [name] in the process.</span>")
|
||||
|
||||
return
|
||||
|
||||
@@ -230,7 +229,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(!proximity)
|
||||
return
|
||||
if(istype(glass)) //you can dip cigarettes into beakers
|
||||
var/transfered = glass.reagents.trans_to(src, chem_volume)
|
||||
var/transfered = glass.reagents.trans_to_obj(src, chem_volume)
|
||||
if(transfered) //if reagents were transfered, show the message
|
||||
user << "<span class='notice'>You dip \the [src] into \the [glass].</span>"
|
||||
else //if not, either the beaker was empty, or the cigarette was full
|
||||
@@ -375,7 +374,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
return
|
||||
smoketime = 1000
|
||||
if(G.reagents)
|
||||
G.reagents.trans_to(src, G.reagents.total_volume)
|
||||
G.reagents.trans_to_obj(src, G.reagents.total_volume)
|
||||
name = "[G.name]-packed [initial(name)]"
|
||||
del(G)
|
||||
|
||||
|
||||
@@ -31,15 +31,11 @@
|
||||
w_class = 2.0
|
||||
force = 3.0
|
||||
max_water = 60
|
||||
spray_particles = 6
|
||||
spray_amount = 2
|
||||
sprite_name = "miniFE"
|
||||
|
||||
/obj/item/weapon/extinguisher/New()
|
||||
var/datum/reagents/R = new/datum/reagents(max_water)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
R.add_reagent("water", max_water)
|
||||
create_reagents(max_water)
|
||||
reagents.add_reagent("water", max_water)
|
||||
|
||||
/obj/item/weapon/extinguisher/examine(mob/user)
|
||||
if(..(user, 0))
|
||||
@@ -53,19 +49,19 @@
|
||||
user << "The safety is [safety ? "on" : "off"]."
|
||||
return
|
||||
|
||||
/obj/item/weapon/extinguisher/afterattack(atom/target, mob/user , flag)
|
||||
/obj/item/weapon/extinguisher/afterattack(var/atom/target, var/mob/user, var/flag)
|
||||
//TODO; Add support for reagents in water.
|
||||
|
||||
if( istype(target, /obj/structure/reagent_dispensers/watertank) && get_dist(src,target) <= 1)
|
||||
if( istype(target, /obj/structure/reagent_dispensers/watertank) && flag)
|
||||
var/obj/o = target
|
||||
var/amount = o.reagents.trans_to(src, 50)
|
||||
user << "\blue You fill [src] with [amount] units of the contents of [target]."
|
||||
var/amount = o.reagents.trans_to_obj(src, 50)
|
||||
user << "<span class='notice'>You fill [src] with [amount] units of the contents of [target].</span>"
|
||||
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
|
||||
return
|
||||
|
||||
if (!safety)
|
||||
if (src.reagents.total_volume < 1)
|
||||
usr << "\red \The [src] is empty."
|
||||
usr << "<span class='notice'>\The [src] is empty.</span>"
|
||||
return
|
||||
|
||||
if (world.time < src.last_use + 20)
|
||||
@@ -77,35 +73,35 @@
|
||||
|
||||
var/direction = get_dir(src,target)
|
||||
|
||||
if(usr.buckled && isobj(usr.buckled) && !usr.buckled.anchored )
|
||||
if(user.buckled && isobj(user.buckled) && !user.buckled.anchored )
|
||||
spawn(0)
|
||||
var/obj/structure/bed/chair/C = null
|
||||
if(istype(usr.buckled, /obj/structure/bed/chair))
|
||||
C = usr.buckled
|
||||
var/obj/B = usr.buckled
|
||||
if(istype(user.buckled, /obj/structure/bed/chair))
|
||||
C = user.buckled
|
||||
var/obj/B = user.buckled
|
||||
var/movementdirection = turn(direction,180)
|
||||
if(C) C.propelled = 4
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
sleep(1)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
if(C) C.propelled = 3
|
||||
sleep(1)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
sleep(1)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
if(C) C.propelled = 2
|
||||
sleep(2)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
if(C) C.propelled = 1
|
||||
sleep(2)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
if(C) C.propelled = 0
|
||||
sleep(3)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
sleep(3)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
sleep(3)
|
||||
B.Move(get_step(usr,movementdirection), movementdirection)
|
||||
B.Move(get_step(user,movementdirection), movementdirection)
|
||||
|
||||
var/turf/T = get_turf(target)
|
||||
var/turf/T1 = get_step(T,turn(direction, 90))
|
||||
@@ -113,33 +109,24 @@
|
||||
|
||||
var/list/the_targets = list(T,T1,T2)
|
||||
|
||||
for(var/a=0, a < spray_particles, a++)
|
||||
for(var/a = 1 to spray_particles)
|
||||
spawn(0)
|
||||
var/obj/effect/effect/water/W = new /obj/effect/effect/water( get_turf(src) )
|
||||
var/turf/my_target = pick(the_targets)
|
||||
var/datum/reagents/R = new/datum/reagents(spray_amount)
|
||||
if(!W) return
|
||||
W.reagents = R
|
||||
R.my_atom = W
|
||||
if(!W || !src) return
|
||||
src.reagents.trans_to(W, spray_amount)
|
||||
|
||||
for(var/b=0, b<5, b++)
|
||||
step_towards(W,my_target)
|
||||
if(!W || !W.reagents) return
|
||||
W.reagents.reaction(get_turf(W))
|
||||
for(var/atom/atm in get_turf(W))
|
||||
if(!W)
|
||||
return
|
||||
if(!W.reagents)
|
||||
break
|
||||
W.reagents.reaction(atm)
|
||||
if(isliving(atm)) //For extinguishing mobs on fire
|
||||
var/mob/living/M = atm
|
||||
M.ExtinguishMob()
|
||||
if(W.loc == my_target) break
|
||||
sleep(2)
|
||||
W.delete()
|
||||
var/obj/effect/effect/water/W = new /obj/effect/effect/water(get_turf(src))
|
||||
var/turf/my_target
|
||||
if(a == 1)
|
||||
my_target = T
|
||||
else if(a == 2)
|
||||
my_target = T1
|
||||
else if(a == 3)
|
||||
my_target = T2
|
||||
else
|
||||
my_target = pick(the_targets)
|
||||
W.create_reagents(spray_amount)
|
||||
if(!src)
|
||||
return
|
||||
reagents.trans_to_obj(W, spray_amount)
|
||||
W.set_color()
|
||||
W.set_up(my_target)
|
||||
|
||||
if((istype(usr.loc, /turf/space)) || (usr.lastarea.has_gravity == 0))
|
||||
user.inertia_dir = get_dir(target, user)
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
|
||||
for(var/atom/A in view(affected_area, src.loc))
|
||||
if( A == src ) continue
|
||||
src.reagents.reaction(A, 1, 10)
|
||||
src.reagents.touch(A)
|
||||
|
||||
if(istype(loc, /mob/living/carbon)) //drop dat grenade if it goes off in your hand
|
||||
var/mob/living/carbon/C = loc
|
||||
|
||||
@@ -291,7 +291,7 @@ the implant may become unstable and either pre-maturely inject the subject or si
|
||||
activate(var/cause)
|
||||
if((!cause) || (!src.imp_in)) return 0
|
||||
var/mob/living/carbon/R = src.imp_in
|
||||
src.reagents.trans_to(R, cause)
|
||||
src.reagents.trans_to_mob(R, cause, CHEM_BLOOD)
|
||||
R << "You hear a faint *beep*."
|
||||
if(!src.reagents.total_volume)
|
||||
R << "You hear a faint click from your chest."
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
user << "\red [src] is full."
|
||||
else
|
||||
spawn(5)
|
||||
I.reagents.trans_to(src.imp, 5)
|
||||
I.reagents.trans_to_mob(src.imp, 5)
|
||||
user << "\blue You inject 5 units of the solution. The syringe now contains [I.reagents.total_volume] units."
|
||||
else if (istype(I, /obj/item/weapon/implanter))
|
||||
var/obj/item/weapon/implanter/M = I
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
return ..()
|
||||
|
||||
if (reagents.total_volume > 0)
|
||||
reagents.trans_to_ingest(M, reagents.total_volume)
|
||||
reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST)
|
||||
if(M == user)
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\blue [] eats some [] from \the [].", user, loaded, src), 1)
|
||||
|
||||
@@ -25,9 +25,7 @@
|
||||
for(var/obj/effect/O in src)
|
||||
if(istype(O,/obj/effect/rune) || istype(O,/obj/effect/decal/cleanable) || istype(O,/obj/effect/overlay))
|
||||
del(O)
|
||||
source.reagents.reaction(src, TOUCH, 10) //10 is the multiplier for the reaction effect. probably needed to wet the floor properly.
|
||||
source.reagents.remove_any(1) //reaction() doesn't use up the reagents
|
||||
|
||||
source.reagents.trans_to_turf(src, 1, 10) //10 is the multiplier for the reaction effect. probably needed to wet the floor properly.
|
||||
|
||||
/obj/item/weapon/mop/afterattack(atom/A, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
|
||||
@@ -20,11 +20,8 @@ var/global/list/cached_icons = list()
|
||||
afterattack(turf/simulated/target, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
if(istype(target) && reagents.total_volume > 5)
|
||||
for(var/mob/O in viewers(user))
|
||||
O.show_message("\red \The [target] has been splashed with something by [user]!", 1)
|
||||
spawn(5)
|
||||
reagents.reaction(target, TOUCH)
|
||||
reagents.remove_any(5)
|
||||
user.visible_message("<span class='warning'>\The [target] has been splashed with something by [user]!</span>")
|
||||
reagents.trans_to_turf(target, 5)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
/obj/item/weapon/storage/fancy/cigarettes/remove_from_storage(obj/item/W as obj, atom/new_location)
|
||||
var/obj/item/clothing/mask/smokable/cigarette/C = W
|
||||
if(!istype(C)) return // what
|
||||
reagents.trans_to(C, (reagents.total_volume/contents.len))
|
||||
reagents.trans_to_obj(C, (reagents.total_volume/contents.len))
|
||||
..()
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
@@ -167,7 +167,7 @@
|
||||
|
||||
if(M == user && user.zone_sel.selecting == "mouth" && contents.len > 0 && !user.wear_mask)
|
||||
var/obj/item/clothing/mask/smokable/cigarette/W = new /obj/item/clothing/mask/smokable/cigarette(user)
|
||||
reagents.trans_to(W, (reagents.total_volume/contents.len))
|
||||
reagents.trans_to_obj(W, (reagents.total_volume/contents.len))
|
||||
user.equip_to_slot_if_possible(W, slot_wear_mask)
|
||||
reagents.maximum_volume = 15 * contents.len
|
||||
contents.len--
|
||||
@@ -213,7 +213,7 @@
|
||||
/obj/item/weapon/storage/fancy/cigar/remove_from_storage(obj/item/W as obj, atom/new_location)
|
||||
var/obj/item/clothing/mask/smokable/cigarette/cigar/C = W
|
||||
if(!istype(C)) return
|
||||
reagents.trans_to(C, (reagents.total_volume/contents.len))
|
||||
reagents.trans_to_obj(C, (reagents.total_volume/contents.len))
|
||||
..()
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigar/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
@@ -222,7 +222,7 @@
|
||||
|
||||
if(M == user && user.zone_sel.selecting == "mouth" && contents.len > 0 && !user.wear_mask)
|
||||
var/obj/item/clothing/mask/smokable/cigarette/cigar/W = new /obj/item/clothing/mask/smokable/cigarette/cigar(user)
|
||||
reagents.trans_to(W, (reagents.total_volume/contents.len))
|
||||
reagents.trans_to_obj(W, (reagents.total_volume/contents.len))
|
||||
user.equip_to_slot_if_possible(W, slot_wear_mask)
|
||||
reagents.maximum_volume = 15 * contents.len
|
||||
contents.len--
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
/obj/item/weapon/weldingtool/afterattack(obj/O as obj, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1 && !src.welding)
|
||||
O.reagents.trans_to(src, max_fuel)
|
||||
O.reagents.trans_to_obj(src, max_fuel)
|
||||
user << "\blue Welder refueled"
|
||||
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
|
||||
return
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
else
|
||||
if(T.welding)
|
||||
user << "\red That was close!"
|
||||
src.reagents.trans_to(W, T.max_fuel)
|
||||
src.reagents.trans_to_obj(W, T.max_fuel)
|
||||
user << "\blue Welder refilled!"
|
||||
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
|
||||
return
|
||||
@@ -38,7 +38,7 @@
|
||||
if(!proximity) // this replaces and improves the get_dist(src,O) <= 1 checks used previously
|
||||
return
|
||||
if (istype(O, /obj/structure/reagent_dispensers/fueltank) && src.reagents.total_volume < max_fuel)
|
||||
O.reagents.trans_to(src, max_fuel)
|
||||
O.reagents.trans_to_obj(src, max_fuel)
|
||||
user << "\blue You crack the cap off the top of the pack and fill it back up again from the tank."
|
||||
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
|
||||
return
|
||||
|
||||
@@ -286,8 +286,8 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/weapon/reagent_containers/ld50_syringe/choral(src)
|
||||
new /obj/item/weapon/reagent_containers/ld50_syringe/choral(src)
|
||||
new /obj/item/weapon/reagent_containers/syringe/ld50_syringe/choral(src)
|
||||
new /obj/item/weapon/reagent_containers/syringe/ld50_syringe/choral(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
if(reagents.total_volume < 1)
|
||||
user << "[src] is out of water!</span>"
|
||||
else
|
||||
reagents.trans_to(I, 5) //
|
||||
reagents.trans_to_obj(I, 5) //
|
||||
user << "<span class='notice'>You wet [I] in [src].</span>"
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
return
|
||||
@@ -186,7 +186,7 @@
|
||||
/obj/structure/bed/chair/janicart/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/mop))
|
||||
if(reagents.total_volume > 1)
|
||||
reagents.trans_to(I, 2)
|
||||
reagents.trans_to_obj(I, 2)
|
||||
user << "<span class='notice'>You wet [I] in the [callme].</span>"
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
else
|
||||
|
||||
@@ -22,6 +22,6 @@
|
||||
if(reagents.total_volume < 1)
|
||||
user << "[src] is out of water!</span>"
|
||||
else
|
||||
reagents.trans_to(I, 5)
|
||||
reagents.trans_to_obj(I, 5)
|
||||
user << "<span class='notice'>You wet [I] in [src].</span>"
|
||||
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
|
||||
|
||||
@@ -446,10 +446,8 @@
|
||||
if (M != user && user.ckey == "nerezza") //Woah now, you better be careful partner
|
||||
user << "\blue You don't want to contaminate the autoinjector."
|
||||
return
|
||||
src.reagents.reaction(M, INGEST)
|
||||
if(M.reagents)
|
||||
var/trans = reagents.trans_to(M, amount_per_transfer_from_this)
|
||||
user << "\blue [trans] units injected. [reagents.total_volume] units remaining in \the [src]."
|
||||
var/trans = reagents.trans_to_mob(M, amount_per_transfer_from_this, CHEM_BLOOD)
|
||||
user << "\blue [trans] units injected. [reagents.total_volume] units remaining in \the [src]."
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/fluff/asher_spock_1/examine(mob/user as mob)
|
||||
|
||||
@@ -31,8 +31,7 @@
|
||||
/obj/item/weapon/reagent_containers/glass/rag/attack(atom/target as obj|turf|area, mob/user as mob , flag)
|
||||
if(ismob(target) && target.reagents && reagents.total_volume)
|
||||
user.visible_message("\red \The [target] has been smothered with \the [src] by \the [user]!", "\red You smother \the [target] with \the [src]!", "You hear some struggling and muffled cries of surprise")
|
||||
src.reagents.reaction(target, TOUCH)
|
||||
spawn(5) src.reagents.clear_reagents()
|
||||
reagents.trans_to_mob(target, reagents.total_volume, CHEM_INGEST)
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -23,10 +23,6 @@
|
||||
verbs += /mob/living/proc/ventcrawl
|
||||
verbs += /mob/living/proc/hide
|
||||
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
name = "[initial(name)] ([rand(1, 1000)])"
|
||||
real_name = name
|
||||
regenerate_icons()
|
||||
|
||||
@@ -105,7 +105,18 @@
|
||||
|
||||
proc/handle_chemicals_in_body()
|
||||
|
||||
if(reagents) reagents.metabolize(src)
|
||||
chem_effects.Cut()
|
||||
analgesic = 0
|
||||
|
||||
if(touching)
|
||||
touching.metabolize(0, CHEM_TOUCH)
|
||||
if(ingested)
|
||||
ingested.metabolize(0, CHEM_INGEST)
|
||||
if(reagents)
|
||||
reagents.metabolize(0, CHEM_BLOOD)
|
||||
|
||||
if(CE_PAINKILLER in chem_effects)
|
||||
analgesic = chem_effects[CE_PAINKILLER]
|
||||
|
||||
confused = max(0, confused - 1)
|
||||
// decrement dizziness counter, clamped to 0
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
var/datum/gas_mixture/breath = null
|
||||
|
||||
//First, check if we can breathe at all
|
||||
if(health < config.health_threshold_crit && !reagents.has_reagent("inaprovaline")) //crit aka circulatory shock
|
||||
if(health < config.health_threshold_crit && !(CE_STABLE in chem_effects)) //crit aka circulatory shock
|
||||
losebreath++
|
||||
|
||||
if(losebreath>0) //Suffocating so do not take a breath
|
||||
@@ -65,11 +65,9 @@
|
||||
|
||||
for(var/obj/effect/effect/smoke/chem/smoke in view(1, src))
|
||||
if(smoke.reagents.total_volume)
|
||||
smoke.reagents.reaction(src, INGEST)
|
||||
spawn(5)
|
||||
if(smoke)
|
||||
//maybe check air pressure here or something to see if breathing in smoke is even possible.
|
||||
smoke.reagents.copy_to(src, 10) // I dunno, maybe the reagents enter the blood stream through the lungs?
|
||||
smoke.reagents.trans_to_mob(src, 10, CHEM_INGEST, copy = 1)
|
||||
//maybe check air pressure here or something to see if breathing in smoke is even possible.
|
||||
// I dunno, maybe the reagents enter the blood stream through the lungs?
|
||||
break // If they breathe in the nasty stuff once, no need to continue checking
|
||||
|
||||
/mob/living/carbon/proc/handle_breath(datum/gas_mixture/breath)
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
/mob/living/carbon/New()
|
||||
create_reagents(1000)
|
||||
var/datum/reagents/R1 = new/datum/reagents(1000)
|
||||
var/datum/reagents/R2 = new/datum/reagents(1000)
|
||||
ingested = R1
|
||||
touching = R2
|
||||
R1.my_atom = src
|
||||
R2.my_atom = src
|
||||
..()
|
||||
|
||||
/mob/living/carbon/Life()
|
||||
..()
|
||||
|
||||
@@ -550,4 +560,10 @@
|
||||
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
Stun(stun_duration)
|
||||
Weaken(Floor(stun_duration/2))
|
||||
return 1
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/proc/add_chemical_effect(var/effect, var/magnitude = 1)
|
||||
if(effect in chem_effects)
|
||||
chem_effects[effect] += magnitude
|
||||
else
|
||||
chem_effects[effect] = magnitude
|
||||
|
||||
@@ -17,5 +17,8 @@
|
||||
var/datum/surgery_status/op_stage = new/datum/surgery_status
|
||||
//Active emote/pose
|
||||
var/pose = null
|
||||
var/list/chem_effects = list()
|
||||
var/datum/reagents/ingested = null
|
||||
var/datum/reagents/touching = null
|
||||
|
||||
var/pulse = PULSE_NORM //current pulse level
|
||||
|
||||
@@ -20,10 +20,6 @@
|
||||
else
|
||||
set_species()
|
||||
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudhealth100")
|
||||
hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudhealthy")
|
||||
hud_list[LIFE_HUD] = image('icons/mob/hud.dmi', src, "hudhealthy")
|
||||
|
||||
@@ -10,9 +10,8 @@
|
||||
if(embedded_flag)
|
||||
handle_embedded_objects() //Moving with objects stuck in you can cause bad times.
|
||||
|
||||
if(reagents.has_reagent("hyperzine")) return -1
|
||||
|
||||
if(reagents.has_reagent("nuka_cola")) return -1
|
||||
if(CE_SPEEDBOOST in chem_effects)
|
||||
return -1
|
||||
|
||||
var/health_deficiency = (100 - health)
|
||||
if(health_deficiency >= 40) tally += (health_deficiency / 25)
|
||||
|
||||
@@ -855,10 +855,16 @@
|
||||
proc/handle_chemicals_in_body()
|
||||
|
||||
if(reagents && !(species.flags & IS_SYNTHETIC)) //Synths don't process reagents.
|
||||
chem_effects.Cut()
|
||||
analgesic = 0
|
||||
var/alien = 0
|
||||
if(species && species.reagent_tag)
|
||||
alien = species.reagent_tag
|
||||
reagents.metabolize(src,alien)
|
||||
touching.metabolize(alien, CHEM_TOUCH)
|
||||
ingested.metabolize(alien, CHEM_INGEST)
|
||||
reagents.metabolize(alien, CHEM_BLOOD)
|
||||
if(CE_PAINKILLER in chem_effects)
|
||||
analgesic = chem_effects[CE_PAINKILLER]
|
||||
|
||||
var/total_phoronloss = 0
|
||||
for(var/obj/item/I in src)
|
||||
@@ -945,9 +951,6 @@
|
||||
silent = 0
|
||||
return 1
|
||||
|
||||
// the analgesic effect wears off slowly
|
||||
analgesic = max(0, analgesic - 1)
|
||||
|
||||
//UNCONSCIOUS. NO-ONE IS HOME
|
||||
if( (getOxyLoss() > 50) || (config.health_threshold_crit > health) )
|
||||
Paralyse(3)
|
||||
@@ -1224,7 +1227,7 @@
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
if(healths)
|
||||
if (analgesic)
|
||||
if (analgesic > 100)
|
||||
healths.icon_state = "health_health_numb"
|
||||
else
|
||||
switch(hal_screwyhud)
|
||||
@@ -1409,7 +1412,7 @@
|
||||
handle_shock()
|
||||
..()
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
if(analgesic || (species && species.flags & NO_PAIN)) return // analgesic avoids all traumatic shock temporarily
|
||||
if(species && species.flags & NO_PAIN) return
|
||||
|
||||
if(health < config.health_threshold_softcrit)// health 0 makes you immediately collapse
|
||||
shock_stage = max(shock_stage, 61)
|
||||
@@ -1485,7 +1488,7 @@
|
||||
if(R.id in heartstopper) //To avoid using fakedeath
|
||||
temp = PULSE_NONE
|
||||
if(R.id in cheartstopper) //Conditional heart-stoppage
|
||||
if(R.volume >= R.overdose)
|
||||
if(R.volume >= R.overdose_blood)
|
||||
temp = PULSE_NONE
|
||||
|
||||
return temp
|
||||
|
||||
@@ -82,8 +82,18 @@
|
||||
return temp_change
|
||||
|
||||
/mob/living/carbon/slime/proc/handle_chemicals_in_body()
|
||||
chem_effects.Cut()
|
||||
analgesic = 0
|
||||
|
||||
if(reagents) reagents.metabolize(src)
|
||||
if(touching)
|
||||
touching.metabolize(0, CHEM_TOUCH)
|
||||
if(ingested)
|
||||
ingested.metabolize(0, CHEM_INGEST)
|
||||
if(reagents)
|
||||
reagents.metabolize(0, CHEM_BLOOD)
|
||||
|
||||
if(CE_PAINKILLER in chem_effects)
|
||||
analgesic = chem_effects[CE_PAINKILLER]
|
||||
|
||||
src.updatehealth()
|
||||
|
||||
|
||||
@@ -61,8 +61,6 @@
|
||||
|
||||
verbs += /mob/living/proc/ventcrawl
|
||||
|
||||
create_reagents(100)
|
||||
|
||||
src.colour = colour
|
||||
number = rand(1, 1000)
|
||||
name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])"
|
||||
@@ -412,14 +410,6 @@
|
||||
adjustToxLoss(-10)
|
||||
nutrition = max(nutrition, get_max_nutrition())
|
||||
|
||||
/mob/living/carbon/slime/proc/apply_water(var/amount)
|
||||
adjustToxLoss(15 + amount)
|
||||
if (!client)
|
||||
if (Target) // Like cats
|
||||
Target = null
|
||||
++Discipline
|
||||
return
|
||||
|
||||
/mob/living/carbon/slime/can_use_vents()
|
||||
if(Victim)
|
||||
return "You cannot ventcrawl while feeding."
|
||||
|
||||
@@ -304,9 +304,18 @@
|
||||
adjustFireLoss(5.0*discomfort)
|
||||
|
||||
proc/handle_chemicals_in_body()
|
||||
chem_effects.Cut()
|
||||
analgesic = 0
|
||||
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
reagents.metabolize(src)
|
||||
if(touching)
|
||||
touching.metabolize(0, CHEM_TOUCH)
|
||||
if(ingested)
|
||||
ingested.metabolize(0, CHEM_INGEST)
|
||||
if(reagents)
|
||||
reagents.metabolize(0, CHEM_BLOOD)
|
||||
|
||||
if(CE_PAINKILLER in chem_effects)
|
||||
analgesic = chem_effects[CE_PAINKILLER]
|
||||
|
||||
if (drowsyness)
|
||||
drowsyness--
|
||||
|
||||
@@ -47,10 +47,6 @@
|
||||
|
||||
verbs += /mob/living/proc/ventcrawl
|
||||
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
species = all_species[greaterform]
|
||||
add_language(species.language)
|
||||
|
||||
|
||||
@@ -13,24 +13,11 @@
|
||||
1.5 * src.getFireLoss() + \
|
||||
1.2 * src.getBruteLoss() + \
|
||||
1.7 * src.getCloneLoss() + \
|
||||
2 * src.halloss
|
||||
2 * src.halloss + \
|
||||
-1 * src.analgesic
|
||||
|
||||
if(reagents.has_reagent("alkysine"))
|
||||
src.traumatic_shock -= 10
|
||||
if(reagents.has_reagent("inaprovaline"))
|
||||
src.traumatic_shock -= 25
|
||||
if(reagents.has_reagent("synaptizine"))
|
||||
src.traumatic_shock -= 40
|
||||
if(reagents.has_reagent("paracetamol"))
|
||||
src.traumatic_shock -= 50
|
||||
if(reagents.has_reagent("tramadol"))
|
||||
src.traumatic_shock -= 80
|
||||
if(reagents.has_reagent("oxycodone"))
|
||||
src.traumatic_shock -= 200
|
||||
if(src.slurring)
|
||||
src.traumatic_shock -= 20
|
||||
if(src.analgesic)
|
||||
src.traumatic_shock = 0
|
||||
|
||||
// broken or ripped off organs will add quite a bit of pain
|
||||
if(istype(src,/mob/living/carbon/human))
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
src.modules += new /obj/item/roller_holder(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/borghypo/crisis(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/glass/beaker/large(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/robodropper(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/dropper/industrial(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/syringe(src)
|
||||
src.modules += new /obj/item/weapon/extinguisher/mini(src)
|
||||
src.emag = new /obj/item/weapon/reagent_containers/spray(src)
|
||||
@@ -321,7 +321,7 @@
|
||||
M.stored_matter = 30
|
||||
src.modules += M
|
||||
|
||||
src.modules += new /obj/item/weapon/reagent_containers/robodropper(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/dropper/industrial(src)
|
||||
|
||||
var/obj/item/weapon/flame/lighter/zippo/L = new /obj/item/weapon/flame/lighter/zippo(src)
|
||||
L.lit = 1
|
||||
|
||||
@@ -55,12 +55,8 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
break
|
||||
|
||||
B.volume += 0.1 // regenerate blood VERY slowly
|
||||
if (reagents.has_reagent("nutriment")) //Getting food speeds it up
|
||||
B.volume += 0.4
|
||||
reagents.remove_reagent("nutriment", 0.1)
|
||||
if (reagents.has_reagent("iron")) //Hematogen candy anyone?
|
||||
B.volume += 0.8
|
||||
reagents.remove_reagent("iron", 0.1)
|
||||
if(CE_BLOODRESTORE in chem_effects)
|
||||
B.volume += chem_effects[CE_BLOODRESTORE]
|
||||
|
||||
// Damaged heart virtually reduces the blood volume, as the blood isn't
|
||||
// being pumped properly anymore.
|
||||
@@ -200,9 +196,8 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
vessel.remove_reagent("blood",amount) // Removes blood if human
|
||||
|
||||
//Transfers blood from container ot vessels
|
||||
/mob/living/carbon/proc/inject_blood(obj/item/weapon/reagent_containers/container, var/amount)
|
||||
var/datum/reagent/blood/injected = get_blood(container.reagents)
|
||||
if (!injected)
|
||||
/mob/living/carbon/proc/inject_blood(var/datum/reagent/blood/injected, var/amount)
|
||||
if (!injected || !istype(injected))
|
||||
return
|
||||
var/list/sniffles = virus_copylist(injected.data["virus2"])
|
||||
for(var/ID in sniffles)
|
||||
@@ -216,12 +211,8 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
|
||||
src.reagents.add_reagent(C, (text2num(chems[C]) / 560) * amount)//adds trace chemicals to owner's blood
|
||||
reagents.update_total()
|
||||
|
||||
container.reagents.remove_reagent("blood", amount)
|
||||
|
||||
//Transfers blood from container ot vessels, respecting blood types compatability.
|
||||
/mob/living/carbon/human/inject_blood(obj/item/weapon/reagent_containers/container, var/amount)
|
||||
|
||||
var/datum/reagent/blood/injected = get_blood(container.reagents)
|
||||
//Transfers blood from reagents to vessel, respecting blood types compatability.
|
||||
/mob/living/carbon/human/inject_blood(var/datum/reagent/blood/injected, var/amount)
|
||||
|
||||
if(species && species.flags & NO_BLOOD)
|
||||
reagents.add_reagent("blood", amount, injected.data)
|
||||
|
||||
@@ -208,20 +208,12 @@
|
||||
if(is_broken())
|
||||
filter_effect -= 2
|
||||
|
||||
// Do some reagent filtering/processing.
|
||||
for(var/datum/reagent/R in owner.reagents.reagent_list)
|
||||
// Damaged liver means some chemicals are very dangerous
|
||||
// The liver is also responsible for clearing out alcohol and toxins.
|
||||
// Ethanol and all drinks are bad.K
|
||||
if(istype(R, /datum/reagent/ethanol))
|
||||
if(filter_effect < 3)
|
||||
owner.adjustToxLoss(0.1 * PROCESS_ACCURACY)
|
||||
owner.reagents.remove_reagent(R.id, R.custom_metabolism*filter_effect)
|
||||
// Can't cope with toxins at all
|
||||
else if(istype(R, /datum/reagent/toxin))
|
||||
if(filter_effect < 3)
|
||||
owner.adjustToxLoss(0.3 * PROCESS_ACCURACY)
|
||||
owner.reagents.remove_reagent(R.id, ALCOHOL_METABOLISM*filter_effect)
|
||||
// Do some reagent processing.
|
||||
if(owner.chem_effects[CE_ALCOHOL_TOXIC])
|
||||
if(filter_effect < 3)
|
||||
owner.adjustToxLoss(owner.chem_effects[CE_ALCOHOL_TOXIC] * 0.1 * PROCESS_ACCURACY)
|
||||
else
|
||||
take_damage(owner.chem_effects[CE_ALCOHOL_TOXIC] * 0.1 * PROCESS_ACCURACY, prob(1)) // Chance to warn them
|
||||
|
||||
/datum/organ/internal/kidney
|
||||
name = "kidneys"
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
organ_data.rejecting = null
|
||||
var/datum/reagent/blood/organ_blood = locate(/datum/reagent/blood) in reagents.reagent_list
|
||||
if(!organ_blood || !organ_blood.data["blood_DNA"])
|
||||
target.vessel.trans_to(src, 5, 1, 1)
|
||||
target.vessel.trans_to_obj(src, 5, 1, 1)
|
||||
|
||||
if(target && user && organ_data.vital)
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> removed a vital organ ([src]) from [target.name] ([target.ckey]) (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
@@ -265,7 +265,7 @@
|
||||
O.icon_state = dead_icon ? dead_icon : icon_state
|
||||
|
||||
// Pass over the blood.
|
||||
reagents.trans_to(O, reagents.total_volume)
|
||||
reagents.trans_to_obj(O, reagents.total_volume)
|
||||
|
||||
if(fingerprints) O.fingerprints = fingerprints.Copy()
|
||||
if(fingerprintshidden) O.fingerprintshidden = fingerprintshidden.Copy()
|
||||
|
||||
@@ -9,13 +9,7 @@ mob/var/next_pain_time = 0
|
||||
// amount is a num from 1 to 100
|
||||
mob/living/carbon/proc/pain(var/partname, var/amount, var/force, var/burning = 0)
|
||||
if(stat >= 2) return
|
||||
if(reagents.has_reagent("paracetamol"))
|
||||
return
|
||||
if(reagents.has_reagent("tramadol"))
|
||||
return
|
||||
if(reagents.has_reagent("oxycodone"))
|
||||
return
|
||||
if(analgesic)
|
||||
if(analgesic > 40)
|
||||
return
|
||||
if(world.time < next_pain_time && !force)
|
||||
return
|
||||
@@ -80,11 +74,7 @@ mob/living/carbon/human/proc/handle_pain()
|
||||
if(species && species.flags & NO_PAIN) return
|
||||
|
||||
if(stat >= 2) return
|
||||
if(reagents.has_reagent("tramadol"))
|
||||
return
|
||||
if(reagents.has_reagent("oxycodone"))
|
||||
return
|
||||
if(analgesic)
|
||||
if(analgesic > 70)
|
||||
return
|
||||
var/maxdam = 0
|
||||
var/datum/organ/external/damaged_organ = null
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
return
|
||||
..()
|
||||
if(reagents.total_volume)
|
||||
if(M.reagents) reagents.trans_to(M, 50) //used to be 150
|
||||
if(M.reagents) reagents.trans_to_mob(M, 50, CHEM_BLOOD) //used to be 150
|
||||
return
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
|
||||
if(M.can_inject(user,1))
|
||||
if(reagents.total_volume)
|
||||
if(M.reagents) reagents.trans_to(M, 50)
|
||||
if(M.reagents) reagents.trans_to_mob(M, 50, CHEM_BLOOD)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
//unfortuately we don't know where the dart will actually hit, since that's done by the parent.
|
||||
if(L.can_inject())
|
||||
if(syringe.reagents)
|
||||
syringe.reagents.trans_to(L, 15)
|
||||
syringe.reagents.trans_to_mob(L, 15, CHEM_BLOOD)
|
||||
|
||||
syringe.break_syringe(iscarbon(hit_atom)? hit_atom : null)
|
||||
syringe.update_icon()
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
if(blocked < 2 && isliving(target))
|
||||
var/mob/living/L = target
|
||||
if(L.can_inject(target_zone=def_zone))
|
||||
reagents.trans_to(L, reagent_amount)
|
||||
reagents.trans_to_mob(L, reagent_amount, CHEM_BLOOD)
|
||||
|
||||
/obj/item/ammo_casing/chemdart
|
||||
name = "chemical dart"
|
||||
@@ -124,7 +124,7 @@
|
||||
if(mixing.len)
|
||||
var/mix_amount = dart.reagent_amount/mixing.len
|
||||
for(var/obj/item/weapon/reagent_containers/glass/beaker/B in mixing)
|
||||
B.reagents.trans_to(dart, mix_amount)
|
||||
B.reagents.trans_to_obj(dart, mix_amount)
|
||||
|
||||
/obj/item/weapon/gun/projectile/dartgun/attack_self(mob/user)
|
||||
user.set_machine(src)
|
||||
|
||||
@@ -1,66 +1,23 @@
|
||||
/proc/mix_color_from_reagents(var/list/reagent_list)
|
||||
if(!reagent_list || !length(reagent_list))
|
||||
return 0
|
||||
/datum/reagents/proc/get_color()
|
||||
if(!reagent_list || !reagent_list.len)
|
||||
return "#ffffffff"
|
||||
if(reagent_list.len == 1) // It's pretty common and saves a lot of work
|
||||
var/datum/reagent/R = reagent_list[1]
|
||||
return R.color
|
||||
|
||||
var/contents = length(reagent_list)
|
||||
var/list/weight = new /list(contents)
|
||||
var/list/redcolor = new /list(contents)
|
||||
var/list/greencolor = new /list(contents)
|
||||
var/list/bluecolor = new /list(contents)
|
||||
var/i
|
||||
var/list/colors = list(0, 0, 0, 0)
|
||||
var/tot_w = 0
|
||||
for(var/datum/reagent/R in reagent_list)
|
||||
var/hex = uppertext(R.color)
|
||||
if(length(hex) == 7)
|
||||
hex += "FF"
|
||||
if(length(hex) != 9) // PANIC PANIC PANIC
|
||||
warning("Reagent [R.id] has an incorrect color set ([R.color])")
|
||||
hex = "#FFFFFFFF"
|
||||
colors[1] += hex2num(copytext(hex, 2, 4)) * R.volume * R.color_weight
|
||||
colors[2] += hex2num(copytext(hex, 4, 6)) * R.volume * R.color_weight
|
||||
colors[3] += hex2num(copytext(hex, 6, 8)) * R.volume * R.color_weight
|
||||
colors[4] += hex2num(copytext(hex, 8, 10)) * R.volume * R.color_weight
|
||||
tot_w += R.volume * R.color_weight
|
||||
|
||||
//fill the list of weights
|
||||
for(i=1; i<=contents; i++)
|
||||
var/datum/reagent/re = reagent_list[i]
|
||||
var/reagentweight = re.volume
|
||||
if(istype(re, /datum/reagent/paint))
|
||||
reagentweight *= 20 //Paint colours a mixture twenty times as much
|
||||
weight[i] = reagentweight
|
||||
|
||||
|
||||
//fill the lists of colours
|
||||
for(i=1; i<=contents; i++)
|
||||
var/datum/reagent/re = reagent_list[i]
|
||||
var/hue = re.color
|
||||
if(length(hue) != 7)
|
||||
return 0
|
||||
redcolor[i]=hex2num(copytext(hue,2,4))
|
||||
greencolor[i]=hex2num(copytext(hue,4,6))
|
||||
bluecolor[i]=hex2num(copytext(hue,6,8))
|
||||
|
||||
//mix all the colors
|
||||
var/red = mixOneColor(weight,redcolor)
|
||||
var/green = mixOneColor(weight,greencolor)
|
||||
var/blue = mixOneColor(weight,bluecolor)
|
||||
|
||||
//assemble all the pieces
|
||||
var/finalcolor = rgb(red, green, blue)
|
||||
return finalcolor
|
||||
|
||||
/proc/mixOneColor(var/list/weight, var/list/color)
|
||||
if (!weight || !color || length(weight)!=length(color))
|
||||
return 0
|
||||
|
||||
var/contents = length(weight)
|
||||
var/i
|
||||
|
||||
//normalize weights
|
||||
var/listsum = 0
|
||||
for(i=1; i<=contents; i++)
|
||||
listsum += weight[i]
|
||||
for(i=1; i<=contents; i++)
|
||||
weight[i] /= listsum
|
||||
|
||||
//mix them
|
||||
var/mixedcolor = 0
|
||||
for(i=1; i<=contents; i++)
|
||||
mixedcolor += weight[i]*color[i]
|
||||
mixedcolor = round(mixedcolor)
|
||||
|
||||
//until someone writes a formal proof for this algorithm, let's keep this in
|
||||
// if(mixedcolor<0x00 || mixedcolor>0xFF)
|
||||
// return 0
|
||||
//that's not the kind of operation we are running here, nerd
|
||||
mixedcolor=min(max(mixedcolor,0),255)
|
||||
|
||||
return mixedcolor
|
||||
return rgb(colors[1] / tot_w, colors[2] / tot_w, colors[3] / tot_w, colors[4] / tot_w)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -189,7 +189,7 @@
|
||||
P.pixel_x = rand(-7, 7) //random position
|
||||
P.pixel_y = rand(-7, 7)
|
||||
P.icon_state = "pill"+pillsprite
|
||||
reagents.trans_to(P,amount_per_pill)
|
||||
reagents.trans_to_obj(P,amount_per_pill)
|
||||
if(src.loaded_pill_bottle)
|
||||
if(loaded_pill_bottle.contents.len < loaded_pill_bottle.storage_slots)
|
||||
P.loc = loaded_pill_bottle
|
||||
@@ -204,11 +204,11 @@
|
||||
P.pixel_x = rand(-7, 7) //random position
|
||||
P.pixel_y = rand(-7, 7)
|
||||
P.icon_state = bottlesprite
|
||||
reagents.trans_to(P,60)
|
||||
reagents.trans_to_obj(P,60)
|
||||
P.update_icon()
|
||||
else
|
||||
var/obj/item/weapon/reagent_containers/food/condiment/P = new/obj/item/weapon/reagent_containers/food/condiment(src.loc)
|
||||
reagents.trans_to(P,50)
|
||||
reagents.trans_to_obj(P,50)
|
||||
else if(href_list["change_pill"])
|
||||
#define MAX_PILL_SPRITE 20 //max icon state of the pill sprites
|
||||
var/dat = "<table>"
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
#define ANTIDEPRESSANT_MESSAGE_DELAY 5*60*10
|
||||
|
||||
/datum/reagent/antidepressant/methylphenidate
|
||||
name = "Methylphenidate"
|
||||
id = "methylphenidate"
|
||||
description = "Improves the ability to concentrate."
|
||||
reagent_state = LIQUID
|
||||
color = "#BF80BF"
|
||||
custom_metabolism = 0.01
|
||||
data = 0
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
if(src.volume <= 0.1) if(data != -1)
|
||||
data = -1
|
||||
M << "\red You lose focus.."
|
||||
else
|
||||
if(world.time > data + ANTIDEPRESSANT_MESSAGE_DELAY)
|
||||
data = world.time
|
||||
M << "\blue Your mind feels focused and undivided."
|
||||
..()
|
||||
return
|
||||
|
||||
/datum/chemical_reaction/methylphenidate
|
||||
name = "Methylphenidate"
|
||||
id = "methylphenidate"
|
||||
result = "methylphenidate"
|
||||
required_reagents = list("mindbreaker" = 1, "hydrogen" = 1)
|
||||
result_amount = 3
|
||||
|
||||
/datum/reagent/antidepressant/citalopram
|
||||
name = "Citalopram"
|
||||
id = "citalopram"
|
||||
description = "Stabilizes the mind a little."
|
||||
reagent_state = LIQUID
|
||||
color = "#FF80FF"
|
||||
custom_metabolism = 0.01
|
||||
data = 0
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
if(src.volume <= 0.1) if(data != -1)
|
||||
data = -1
|
||||
M << "\red Your mind feels a little less stable.."
|
||||
else
|
||||
if(world.time > data + ANTIDEPRESSANT_MESSAGE_DELAY)
|
||||
data = world.time
|
||||
M << "\blue Your mind feels stable.. a little stable."
|
||||
..()
|
||||
return
|
||||
|
||||
/datum/chemical_reaction/citalopram
|
||||
name = "Citalopram"
|
||||
id = "citalopram"
|
||||
result = "citalopram"
|
||||
required_reagents = list("mindbreaker" = 1, "carbon" = 1)
|
||||
result_amount = 3
|
||||
|
||||
|
||||
/datum/reagent/antidepressant/paroxetine
|
||||
name = "Paroxetine"
|
||||
id = "paroxetine"
|
||||
description = "Stabilizes the mind greatly, but has a chance of adverse effects."
|
||||
reagent_state = LIQUID
|
||||
color = "#FF80BF"
|
||||
custom_metabolism = 0.01
|
||||
data = 0
|
||||
|
||||
on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
if(src.volume <= 0.1) if(data != -1)
|
||||
data = -1
|
||||
M << "\red Your mind feels much less stable.."
|
||||
else
|
||||
if(world.time > data + ANTIDEPRESSANT_MESSAGE_DELAY)
|
||||
data = world.time
|
||||
if(prob(90))
|
||||
M << "\blue Your mind feels much more stable."
|
||||
else
|
||||
M << "\red Your mind breaks apart.."
|
||||
M.hallucination += 200
|
||||
..()
|
||||
return
|
||||
|
||||
/datum/chemical_reaction/paroxetine
|
||||
name = "Paroxetine"
|
||||
id = "paroxetine"
|
||||
result = "paroxetine"
|
||||
required_reagents = list("mindbreaker" = 1, "oxygen" = 1, "inaprovaline" = 1)
|
||||
result_amount = 3
|
||||
+4057
-4379
File diff suppressed because it is too large
Load Diff
+1857
-2168
File diff suppressed because it is too large
Load Diff
@@ -13,39 +13,134 @@
|
||||
set category = "Object"
|
||||
set src in range(0)
|
||||
var/N = input("Amount per transfer from this:","[src]") as null|anything in possible_transfer_amounts
|
||||
if (N)
|
||||
if(N)
|
||||
amount_per_transfer_from_this = N
|
||||
|
||||
/obj/item/weapon/reagent_containers/New()
|
||||
..()
|
||||
if (!possible_transfer_amounts)
|
||||
if(!possible_transfer_amounts)
|
||||
src.verbs -= /obj/item/weapon/reagent_containers/verb/set_APTFT
|
||||
var/datum/reagents/R = new/datum/reagents(volume)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
create_reagents(volume)
|
||||
|
||||
/obj/item/weapon/reagent_containers/attack_self(mob/user as mob)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/attack(mob/M as mob, mob/user as mob, def_zone)
|
||||
if(can_operate(M)) //Checks if mob is lying down on table for surgery
|
||||
if(do_surgery(M,user,src))
|
||||
/obj/item/weapon/reagent_containers/attack(mob/M as mob, mob/user as mob, def_zone)
|
||||
if(can_operate(M))//Checks if mob is lying down on table for surgery
|
||||
if(do_surgery(M, user, src))
|
||||
return
|
||||
|
||||
// this prevented pills, food, and other things from being picked up by bags.
|
||||
// possibly intentional, but removing it allows us to not duplicate functionality.
|
||||
// -Sayu (storage conslidation)
|
||||
/*
|
||||
/obj/item/weapon/reagent_containers/attackby(obj/item/I as obj, mob/user as mob)
|
||||
return
|
||||
*/
|
||||
/obj/item/weapon/reagent_containers/afterattack(obj/target, mob/user , flag)
|
||||
/obj/item/weapon/reagent_containers/afterattack(obj/target, mob/user, flag)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/proc/reagentlist(var/obj/item/weapon/reagent_containers/snack) //Attack logs for regents in pills
|
||||
var/data
|
||||
if(snack.reagents.reagent_list && snack.reagents.reagent_list.len) //find a reagent list if there is and check if it has entries
|
||||
for (var/datum/reagent/R in snack.reagents.reagent_list) //no reagents will be left behind
|
||||
data += "[R.id]([R.volume] units); " //Using IDs because SOME chemicals(I'm looking at you, chlorhydrate-beer) have the same names as other chemicals.
|
||||
return data
|
||||
else return "No reagents"
|
||||
/obj/item/weapon/reagent_containers/proc/reagentlist() // For attack logs
|
||||
if(reagents)
|
||||
return reagents.get_reagents()
|
||||
return "No reagent holder"
|
||||
|
||||
/obj/item/weapon/reagent_containers/proc/standard_dispenser_refill(var/mob/user, var/obj/structure/reagent_dispensers/target) // This goes into afterattack
|
||||
if(!istype(target))
|
||||
return 0
|
||||
|
||||
if(!target.reagents || !target.reagents.total_volume)
|
||||
user << "<span class='notice'>[target] is empty.</span>"
|
||||
return 1
|
||||
|
||||
if(reagents && !reagents.get_free_space())
|
||||
user << "<span class='notice'>[src] is full.</span>"
|
||||
return 1
|
||||
|
||||
var/trans = target.reagents.trans_to_obj(src, target:amount_per_transfer_from_this)
|
||||
user << "<span class='notice'>You fill [src] with [trans] units of the contents of [target].</span>"
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/reagent_containers/proc/standard_splash_mob(var/mob/user, var/mob/target) // This goes into afterattack
|
||||
if(!istype(target))
|
||||
return
|
||||
|
||||
if(!reagents || !reagents.total_volume)
|
||||
user << "<span class='notice'>[src] is empty.</span>"
|
||||
return 1
|
||||
|
||||
if(target.reagents && !target.reagents.get_free_space())
|
||||
user << "<span class='notice'>[target] is full.</span>"
|
||||
return 1
|
||||
|
||||
var/contained = reagentlist()
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been splashed with [name] by [user.name] ([user.ckey]). Reagents: [contained]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to splash [target.name] ([target.key]). Reagents: [contained]</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) splashed [target.name] ([target.key]) with [name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
user.visible_message("<span class='danger'>[target] has been splashed with something by [user]!", "<span class = 'notice'>You splash the solution onto [target].</span>")
|
||||
reagents.splash_mob(target, reagents.total_volume)
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/reagent_containers/proc/self_feed_message(var/mob/user)
|
||||
user << "<span class='notice'>You eat \the [src]</span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/proc/other_feed_message_start(var/mob/user, var/mob/target)
|
||||
user.visible_message("<span class='warning'>[user] is trying to feed [target] \the [src]!")
|
||||
|
||||
/obj/item/weapon/reagent_containers/proc/other_feed_message_finish(var/mob/user, var/mob/target)
|
||||
user.visible_message("<span class='warning'>[user] has fed [target] \the [src]!")
|
||||
|
||||
/obj/item/weapon/reagent_containers/proc/feed_sound(var/mob/user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/proc/standard_feed_mob(var/mob/user, var/mob/target) // This goes into attack
|
||||
if(!istype(target))
|
||||
return 0
|
||||
|
||||
if(!reagents || !reagents.total_volume)
|
||||
user << "<span class='notice'>\The [src] is empty.</span>"
|
||||
return 1
|
||||
|
||||
if(target == user)
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
H << "<span class='notice'>You have a monitor for a head, where do you think you're going to put that?</span>"
|
||||
return 1
|
||||
|
||||
self_feed_message(user)
|
||||
reagents.trans_to_mob(user, amount_per_transfer_from_this, CHEM_INGEST)
|
||||
feed_sound(user)
|
||||
return 1
|
||||
else
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
H << "<span class='notice'>They have a monitor for a head, where do you think you're going to put that?</span>"
|
||||
return
|
||||
|
||||
other_feed_message_start(user, target)
|
||||
|
||||
if(!do_mob(user, target))
|
||||
return
|
||||
|
||||
other_feed_message_finish(user, target)
|
||||
|
||||
var/contained = reagentlist()
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [name] by [user.name] ([user.ckey]). Reagents: [contained]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [name] by [target.name] ([target.ckey]). Reagents: [contained]</font>")
|
||||
msg_admin_attack("[key_name(user)] fed [key_name(target)] with [name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
reagents.trans_to_mob(target, amount_per_transfer_from_this, CHEM_INGEST)
|
||||
feed_sound(user)
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/reagent_containers/proc/standard_pour_into(var/mob/user, var/atom/target) // This goes into afterattack and yes, it's atom-level
|
||||
if(!target.is_open_container() || !target.reagents)
|
||||
return 0
|
||||
|
||||
if(!reagents || !reagents.total_volume)
|
||||
user << "<span class='notice'>[src] is empty.</span>"
|
||||
return 1
|
||||
|
||||
if(!target.reagents.get_free_space())
|
||||
user << "<span class='notice'>[target] is full.</span>"
|
||||
return 1
|
||||
|
||||
var/trans = reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
user << "<span class='notice'>You transfer [trans] units of the solution to [target].</span>"
|
||||
return 1
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo
|
||||
name = "Cyborg Hypospray"
|
||||
desc = "An advanced chemical synthesizer and injection system, designed for heavy-duty medical equipment."
|
||||
@@ -15,7 +14,6 @@
|
||||
|
||||
var/list/datum/reagents/reagent_list = list()
|
||||
var/list/reagent_ids = list("tricordrazine", "inaprovaline", "spaceacillin")
|
||||
//var/list/reagent_ids = list("dexalin", "kelotane", "bicaridine", "anti_toxin", "inaprovaline", "spaceacillin")
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/surgeon
|
||||
reagent_ids = list("bicaridine", "inaprovaline", "dexalin")
|
||||
@@ -40,23 +38,15 @@
|
||||
if(charge_tick < recharge_time) return 0
|
||||
charge_tick = 0
|
||||
|
||||
if(isrobot(src.loc))
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
if(isrobot(loc))
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
if(R && R.cell)
|
||||
var/datum/reagents/RG = reagent_list[mode]
|
||||
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[mode], 5) //And fill hypo with reagent.
|
||||
//update_icon()
|
||||
return 1
|
||||
|
||||
// Purely for testing purposes I swear~
|
||||
/*
|
||||
/obj/item/weapon/reagent_containers/borghypo/verb/add_cyanide()
|
||||
set src in world
|
||||
add_reagent("cyanide")
|
||||
*/
|
||||
|
||||
// Use this to add more chemicals for the borghypo to produce.
|
||||
/obj/item/weapon/reagent_containers/borghypo/proc/add_reagent(var/reagent)
|
||||
reagent_ids |= reagent
|
||||
@@ -70,19 +60,18 @@
|
||||
/obj/item/weapon/reagent_containers/borghypo/attack(mob/living/M as mob, mob/user as mob)
|
||||
var/datum/reagents/R = reagent_list[mode]
|
||||
if(!R.total_volume)
|
||||
user << "\red The injector is empty."
|
||||
user << "<span class='warning'>The injector is empty.</span>"
|
||||
return
|
||||
if (!(istype(M)))
|
||||
if (!istype(M))
|
||||
return
|
||||
|
||||
if (R.total_volume && M.can_inject(user,1))
|
||||
user << "\blue You inject [M] with the injector."
|
||||
M << "\red You feel a tiny prick!"
|
||||
if (R.total_volume && M.can_inject(user, 1))
|
||||
user << "<span class='notice'>You inject [M] with the injector.</span>"
|
||||
M << "<span class='notice'>You feel a tiny prick!</span>"
|
||||
|
||||
R.reaction(M, INGEST)
|
||||
if(M.reagents)
|
||||
var/trans = R.trans_to(M, amount_per_transfer_from_this)
|
||||
user << "\blue [trans] units injected. [R.total_volume] units remaining."
|
||||
var/trans = R.trans_to_mob(M, amount_per_transfer_from_this, CHEM_BLOOD)
|
||||
user << "<span class='notice'>[trans] units injected. [R.total_volume] units remaining.</span>"
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/attack_self(mob/user as mob)
|
||||
@@ -93,7 +82,7 @@
|
||||
|
||||
charge_tick = 0 //Prevents wasted chems/cell charge if you're cycling through modes.
|
||||
var/datum/reagent/R = chemical_reagents_list[reagent_ids[mode]]
|
||||
user << "\blue Synthesizer is now producing '[R.name]'."
|
||||
user << "<span class='notice'>Synthesizer is now producing '[R.name]'.</span>"
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/examine(mob/user)
|
||||
@@ -105,8 +94,8 @@
|
||||
for(var/datum/reagents/RS in reagent_list)
|
||||
var/datum/reagent/R = locate() in RS.reagent_list
|
||||
if(R)
|
||||
user << "\blue It currently has [R.volume] units of [R.name] stored."
|
||||
user << "<span class='notice'>It currently has [R.volume] units of [R.name] stored.</span>"
|
||||
empty = 0
|
||||
|
||||
if(empty)
|
||||
user << "\blue It is currently empty. Allow some time for the internal syntheszier to produce more."
|
||||
user << "<span class='notice'>It is currently empty. Allow some time for the internal syntheszier to produce more.</span>"
|
||||
|
||||
@@ -10,19 +10,18 @@
|
||||
possible_transfer_amounts = list(1,2,3,4,5)
|
||||
w_class = 1
|
||||
volume = 5
|
||||
var/filled = 0
|
||||
|
||||
afterattack(obj/target, mob/user , flag)
|
||||
afterattack(var/obj/target, var/mob/user, var/flag)
|
||||
if(!target.reagents || !flag) return
|
||||
|
||||
if(filled)
|
||||
if(reagents.total_volume)
|
||||
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
user << "\red [target] is full."
|
||||
if(!target.reagents.get_free_space())
|
||||
user << "<span class='notice'>[target] is full.</span>"
|
||||
return
|
||||
|
||||
if(!target.is_open_container() && !ismob(target) && !istype(target,/obj/item/weapon/reagent_containers/food) && !istype(target, /obj/item/clothing/mask/smokable/cigarette)) //You can inject humans and food but you cant remove the shit.
|
||||
user << "\red You cannot directly fill this object."
|
||||
if(!target.is_open_container() && !ismob(target) && !istype(target, /obj/item/weapon/reagent_containers/food) && !istype(target, /obj/item/clothing/mask/smokable/cigarette)) //You can inject humans and food but you cant remove the shit.
|
||||
user << "<span class='notice'>You cannot directly fill this object.</span>"
|
||||
return
|
||||
|
||||
var/trans = 0
|
||||
@@ -30,80 +29,76 @@
|
||||
if(ismob(target))
|
||||
|
||||
var/time = 20 //2/3rds the time of a syringe
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message(text("\red <B>[] is trying to squirt something into []'s eyes!</B>", user, target), 1)
|
||||
user.visible_message("<span class='warning'>[user] is trying to squirt something into [target]'s eyes!")
|
||||
|
||||
if(!do_mob(user, target, time)) return
|
||||
if(!do_mob(user, target, time))
|
||||
return
|
||||
|
||||
if(istype(target , /mob/living/carbon/human))
|
||||
if(istype(target, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/victim = target
|
||||
|
||||
var/obj/item/safe_thing = null
|
||||
if( victim.wear_mask )
|
||||
if ( victim.wear_mask.flags & MASKCOVERSEYES )
|
||||
if(victim.wear_mask)
|
||||
if (victim.wear_mask.flags & MASKCOVERSEYES)
|
||||
safe_thing = victim.wear_mask
|
||||
if( victim.head )
|
||||
if ( victim.head.flags & MASKCOVERSEYES )
|
||||
if(victim.head)
|
||||
if (victim.head.flags & MASKCOVERSEYES)
|
||||
safe_thing = victim.head
|
||||
if(victim.glasses)
|
||||
if ( !safe_thing )
|
||||
if (!safe_thing)
|
||||
safe_thing = victim.glasses
|
||||
|
||||
if(safe_thing)
|
||||
if(!safe_thing.reagents)
|
||||
safe_thing.create_reagents(100)
|
||||
trans = src.reagents.trans_to(safe_thing, amount_per_transfer_from_this)
|
||||
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message(text("\red <B>[] tries to squirt something into []'s eyes, but fails!</B>", user, target), 1)
|
||||
spawn(5)
|
||||
src.reagents.reaction(safe_thing, TOUCH)
|
||||
|
||||
user << "\blue You transfer [trans] units of the solution."
|
||||
if (src.reagents.total_volume<=0)
|
||||
filled = 0
|
||||
icon_state = "dropper[filled]"
|
||||
trans = reagents.trans_to_obj(safe_thing, amount_per_transfer_from_this)
|
||||
user.visible_message("<span class='warning'>[user] tries to squirt something into [target]'s eyes, but fails!</span>", "<span class='notice'>You transfer [trans] units of the solution.</span>")
|
||||
return
|
||||
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message(text("\red <B>[] squirts something into []'s eyes!</B>", user, target), 1)
|
||||
src.reagents.reaction(target, TOUCH)
|
||||
trans = reagents.trans_to_mob(target, reagents.total_volume, CHEM_INGEST)
|
||||
user.visible_message("<span class='warning'>[user] squirts something into [target]'s eyes!</span>", "<span class='notice'>You transfer [trans] units of the solution.</span>")
|
||||
|
||||
var/mob/living/M = target
|
||||
var/contained = reagentlist()
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been squirted with [name] by [user.name] ([user.ckey]). Reagents: [contained]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to squirt [M.name] ([M.key]). Reagents: [contained]</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) squirted [M.name] ([M.key]) with [name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
return
|
||||
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/R in src.reagents.reagent_list)
|
||||
injected += R.name
|
||||
var/contained = english_list(injected)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been squirted with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to squirt [M.name] ([M.key]). Reagents: [contained]</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) squirted [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
else
|
||||
trans = reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
user << "<span class='notice'>You transfer [trans] units of the solution.</span>"
|
||||
|
||||
trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
user << "\blue You transfer [trans] units of the solution."
|
||||
if (src.reagents.total_volume<=0)
|
||||
filled = 0
|
||||
icon_state = "dropper[filled]"
|
||||
|
||||
else
|
||||
else // Taking from something
|
||||
|
||||
if(!target.is_open_container() && !istype(target,/obj/structure/reagent_dispensers))
|
||||
user << "\red You cannot directly remove reagents from [target]."
|
||||
user << "<span class='notice'>You cannot directly remove reagents from [target].</span>"
|
||||
return
|
||||
|
||||
if(!target.reagents.total_volume)
|
||||
user << "\red [target] is empty."
|
||||
if(!target.reagents || !target.reagents.total_volume)
|
||||
user << "<span class='notice'>[target] is empty.</span>"
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
|
||||
var/trans = target.reagents.trans_to_obj(src, amount_per_transfer_from_this)
|
||||
|
||||
user << "\blue You fill the dropper with [trans] units of the solution."
|
||||
|
||||
filled = 1
|
||||
icon_state = "dropper[filled]"
|
||||
user << "<span class='notice'>You fill the dropper with [trans] units of the solution.</span>"
|
||||
|
||||
return
|
||||
|
||||
on_reagent_change()
|
||||
update_icon()
|
||||
|
||||
update_icon()
|
||||
if(reagents.total_volume)
|
||||
icon_state = "dropper1"
|
||||
else
|
||||
icon_state = "dropper0"
|
||||
|
||||
/obj/item/weapon/reagent_containers/dropper/industrial
|
||||
name = "Industrial Dropper"
|
||||
desc = "A larger dropper. Transfers 10 units."
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(1,2,3,4,5,6,7,8,9,10)
|
||||
volume = 10
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Droppers. END
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -1,104 +1,39 @@
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans
|
||||
var canopened = 0
|
||||
amount_per_transfer_from_this = 5
|
||||
flags = 0
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
if (canopened == 0)
|
||||
playsound(src.loc,'sound/effects/canopen.ogg', rand(10,50), 1)
|
||||
if (!is_open_container())
|
||||
playsound(loc,'sound/effects/canopen.ogg', rand(10,50), 1)
|
||||
user << "<span class='notice'>You open the drink with an audible pop!</span>"
|
||||
canopened = 1
|
||||
flags |= OPENCONTAINER
|
||||
else
|
||||
return
|
||||
|
||||
attack(mob/M as mob, mob/user as mob, def_zone)
|
||||
if (canopened == 0)
|
||||
if(!is_open_container())
|
||||
user << "<span class='notice'>You need to open the drink!</span>"
|
||||
return
|
||||
var/datum/reagents/R = src.reagents
|
||||
var/fillevel = gulp_size
|
||||
|
||||
if(!R.total_volume || !R)
|
||||
user << "\red The [src.name] is empty!"
|
||||
return 0
|
||||
|
||||
if(M == user)
|
||||
M << "\blue You swallow a gulp of [src]."
|
||||
if(reagents.total_volume)
|
||||
reagents.trans_to_ingest(M, gulp_size)
|
||||
reagents.reaction(M, INGEST)
|
||||
spawn(5)
|
||||
reagents.trans_to(M, gulp_size)
|
||||
|
||||
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
|
||||
return 1
|
||||
else if( istype(M, /mob/living/carbon/human) )
|
||||
if (canopened == 0)
|
||||
user << "<span class='notice'>You need to open the drink!</span>"
|
||||
return
|
||||
|
||||
else if (canopened == 1)
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message("\red [user] attempts to feed [M] [src].", 1)
|
||||
if(!do_mob(user, M)) return
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message("\red [user] feeds [M] [src].", 1)
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [M.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]</font>")
|
||||
msg_admin_attack("[key_name(user)] fed [key_name(M)] with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
if(reagents.total_volume)
|
||||
reagents.trans_to_ingest(M, gulp_size)
|
||||
|
||||
if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell
|
||||
var/mob/living/silicon/robot/bro = user
|
||||
bro.cell.use(30)
|
||||
var/refill = R.get_master_reagent_id()
|
||||
spawn(600)
|
||||
R.add_reagent(refill, fillevel)
|
||||
|
||||
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
|
||||
afterattack(obj/target, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
|
||||
if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
|
||||
if (canopened == 0)
|
||||
if(!is_open_container())
|
||||
user << "<span class='notice'>You need to open the drink!</span>"
|
||||
return
|
||||
|
||||
|
||||
else if(target.is_open_container()) //Something like a glass. Player probably wants to transfer TO it.
|
||||
if (canopened == 0)
|
||||
if(!is_open_container())
|
||||
user << "<span class='notice'>You need to open the drink!</span>"
|
||||
return
|
||||
|
||||
if (istype(target, /obj/item/weapon/reagent_containers/food/drinks/cans))
|
||||
var/obj/item/weapon/reagent_containers/food/drinks/cans/cantarget = target
|
||||
if(cantarget.canopened == 0)
|
||||
user << "<span class='notice'>You need to open the drink you want to pour into!</span>"
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
/* examine(mob/user)
|
||||
if(!..(user, 1))
|
||||
return
|
||||
if(!reagents || reagents.total_volume==0)
|
||||
user << "\blue \The [src] is empty!"
|
||||
else if (reagents.total_volume<=src.volume/4)
|
||||
user << "\blue \The [src] is almost empty!"
|
||||
else if (reagents.total_volume<=src.volume*0.66)
|
||||
user << "\blue \The [src] is half full!"
|
||||
else if (reagents.total_volume<=src.volume*0.90)
|
||||
user << "\blue \The [src] is almost full!"
|
||||
else
|
||||
user << "\blue \The [src] is full!"*/
|
||||
|
||||
|
||||
//DRINKS
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/cola
|
||||
|
||||
@@ -15,72 +15,39 @@
|
||||
center_of_mass = list("x"=16, "y"=6)
|
||||
volume = 50
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
return
|
||||
attack_self(mob/user as mob)
|
||||
return
|
||||
attack(mob/M as mob, mob/user as mob, def_zone)
|
||||
var/datum/reagents/R = src.reagents
|
||||
|
||||
if(!R || !R.total_volume)
|
||||
user << "\red The [src.name] is empty!"
|
||||
return 0
|
||||
|
||||
if(M == user)
|
||||
M << "\blue You swallow some of contents of the [src]."
|
||||
if(reagents.total_volume)
|
||||
reagents.trans_to_ingest(M, 10)
|
||||
|
||||
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
|
||||
return 1
|
||||
else if( istype(M, /mob/living/carbon/human) )
|
||||
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message("\red [user] attempts to feed [M] [src].", 1)
|
||||
if(!do_mob(user, M)) return
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message("\red [user] feeds [M] [src].", 1)
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [src.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
if(reagents.total_volume)
|
||||
reagents.trans_to_ingest(M, 10)
|
||||
|
||||
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
attackby(obj/item/I as obj, mob/user as mob)
|
||||
|
||||
attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
return
|
||||
|
||||
afterattack(obj/target, mob/user , flag)
|
||||
if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
|
||||
attack_self(var/mob/user as mob)
|
||||
return
|
||||
|
||||
if(!target.reagents.total_volume)
|
||||
user << "\red [target] is empty."
|
||||
attack(var/mob/M as mob, var/mob/user as mob, var/def_zone)
|
||||
if(standard_feed_mob(user, M))
|
||||
return
|
||||
|
||||
afterattack(var/obj/target, var/mob/user, var/flag)
|
||||
if(standard_dispenser_refill(user, target))
|
||||
return
|
||||
if(standard_pour_into(user, target))
|
||||
return
|
||||
|
||||
if(istype(target, /obj/item/weapon/reagent_containers/food/snacks)) // These are not opencontainers but we can transfer to them
|
||||
if(!reagents || !reagents.total_volume)
|
||||
user << "<span class='notice'>There is no condiment left in \the [src].</span>"
|
||||
return
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
user << "\red [src] is full."
|
||||
if(!target.reagents.get_free_space())
|
||||
user << "<span class='notice'>You can't add more condiment to \the [target].</span>"
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, target:amount_per_transfer_from_this)
|
||||
user << "\blue You fill [src] with [trans] units of the contents of [target]."
|
||||
var/trans = reagents.trans_to_obj(target, amount_per_transfer_from_this)
|
||||
user << "<span class='notice'>You add [trans] units of the condiment to \the [target].</span>"
|
||||
|
||||
//Something like a glass or a food item. Player probably wants to transfer TO it.
|
||||
else if(target.is_open_container() || istype(target, /obj/item/weapon/reagent_containers/food/snacks))
|
||||
if(!reagents.total_volume)
|
||||
user << "\red [src] is empty."
|
||||
return
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
user << "\red you can't add anymore to [target]."
|
||||
return
|
||||
var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
user << "\blue You transfer [trans] units of the condiment to [target]."
|
||||
feed_sound(var/mob/user)
|
||||
playsound(user.loc, 'sound/items/drink.ogg', rand(10, 50), 1)
|
||||
|
||||
self_feed_message(var/mob/user)
|
||||
user << "<span class='notice'>You swallow some of contents of \the [src].</span>"
|
||||
|
||||
on_reagent_change()
|
||||
if(icon_state == "saltshakersmall" || icon_state == "peppermillsmall")
|
||||
|
||||
@@ -7,134 +7,63 @@
|
||||
icon = 'icons/obj/drinks.dmi'
|
||||
icon_state = null
|
||||
flags = OPENCONTAINER
|
||||
var/gulp_size = 5 //This is now officially broken ... need to think of a nice way to fix it.
|
||||
possible_transfer_amounts = list(5,10,25)
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 50
|
||||
|
||||
on_reagent_change()
|
||||
if (gulp_size < 5) gulp_size = 5
|
||||
else gulp_size = max(round(reagents.total_volume / 5), 5)
|
||||
return
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
return
|
||||
|
||||
attack(mob/M as mob, mob/user as mob, def_zone)
|
||||
var/datum/reagents/R = src.reagents
|
||||
var/fillevel = gulp_size
|
||||
|
||||
if(!R.total_volume || !R)
|
||||
user << "\red The [src.name] is empty!"
|
||||
return 0
|
||||
|
||||
if(M == user)
|
||||
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
H << "\red You have a monitor for a head, where do you think you're going to put that?"
|
||||
return
|
||||
|
||||
M << "\blue You swallow a gulp from \the [src]."
|
||||
if(reagents.total_volume)
|
||||
reagents.trans_to_ingest(M, gulp_size)
|
||||
|
||||
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
|
||||
return 1
|
||||
else if( istype(M, /mob/living/carbon/human) )
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
H << "\red They have a monitor for a head, where do you think you're going to put that?"
|
||||
return
|
||||
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message("\red [user] attempts to feed [M] [src].", 1)
|
||||
if(!do_mob(user, M)) return
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message("\red [user] feeds [M] [src].", 1)
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [M.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]</font>")
|
||||
msg_admin_attack("[key_name(user)] fed [key_name(M)] with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
if(reagents.total_volume)
|
||||
reagents.trans_to_ingest(M, gulp_size)
|
||||
|
||||
if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell
|
||||
var/mob/living/silicon/robot/bro = user
|
||||
bro.cell.use(30)
|
||||
var/refill = R.get_master_reagent_id()
|
||||
spawn(600)
|
||||
R.add_reagent(refill, fillevel)
|
||||
|
||||
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
|
||||
return 1
|
||||
if(standard_feed_mob(user, M))
|
||||
robot_refill(user)
|
||||
return
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
afterattack(obj/target, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
|
||||
if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
|
||||
|
||||
if(!target.reagents.total_volume)
|
||||
user << "\red [target] is empty."
|
||||
return
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
user << "\red [src] is full."
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, target:amount_per_transfer_from_this)
|
||||
user << "\blue You fill [src] with [trans] units of the contents of [target]."
|
||||
|
||||
else if(target.is_open_container()) //Something like a glass. Player probably wants to transfer TO it.
|
||||
if(!reagents.total_volume)
|
||||
user << "\red [src] is empty."
|
||||
return
|
||||
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
user << "\red [target] is full."
|
||||
return
|
||||
|
||||
|
||||
|
||||
var/datum/reagent/refill
|
||||
var/datum/reagent/refillName
|
||||
if(isrobot(user))
|
||||
refill = reagents.get_master_reagent_id()
|
||||
refillName = reagents.get_master_reagent_name()
|
||||
|
||||
var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
user << "\blue You transfer [trans] units of the solution to [target]."
|
||||
|
||||
if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell
|
||||
var/mob/living/silicon/robot/bro = user
|
||||
var/chargeAmount = max(30,4*trans)
|
||||
bro.cell.use(chargeAmount)
|
||||
user << "Now synthesizing [trans] units of [refillName]..."
|
||||
|
||||
|
||||
spawn(300)
|
||||
reagents.add_reagent(refill, trans)
|
||||
user << "Cyborg [src] refilled."
|
||||
if(standard_dispenser_refill(user, target))
|
||||
return
|
||||
if(standard_pour_into(user, target))
|
||||
robot_refill(user)
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
proc/robot_refill(var/mob/living/silicon/robot/user)
|
||||
if(!istype(user))
|
||||
return 0
|
||||
|
||||
user.cell.use(30)
|
||||
var/refill = reagents.get_master_reagent_id()
|
||||
user << "Now synthesizing [amount_per_transfer_from_this] units of [refill]..."
|
||||
spawn(300)
|
||||
reagents.add_reagent(refill, amount_per_transfer_from_this)
|
||||
user << "Cyborg [src] refilled."
|
||||
|
||||
self_feed_message(var/mob/user)
|
||||
user << "<span class='notice'>You swallow a gulp from \the [src].</span>"
|
||||
|
||||
feed_sound(var/mob/user)
|
||||
playsound(user.loc, 'sound/items/drink.ogg', rand(10, 50), 1)
|
||||
|
||||
examine(mob/user)
|
||||
if(!..(user, 1))
|
||||
return
|
||||
if(!reagents || reagents.total_volume==0)
|
||||
user << "\blue \The [src] is empty!"
|
||||
else if (reagents.total_volume<=src.volume/4)
|
||||
user << "\blue \The [src] is almost empty!"
|
||||
else if (reagents.total_volume<=src.volume*0.66)
|
||||
user << "\blue \The [src] is half full!"
|
||||
else if (reagents.total_volume<=src.volume*0.90)
|
||||
user << "\blue \The [src] is almost full!"
|
||||
if(!reagents || reagents.total_volume == 0)
|
||||
user << "<span class='notice'>\The [src] is empty!</span>"
|
||||
else if (reagents.total_volume <= volume * 0.25)
|
||||
user << "<span class='notice'>\The [src] is almost empty!</span>"
|
||||
else if (reagents.total_volume <= volume * 0.66)
|
||||
user << "<span class='notice'>\The [src] is half full!</span>"
|
||||
else if (reagents.total_volume <= volume * 0.90)
|
||||
user << "<span class='notice'>\The [src] is almost full!</span>"
|
||||
else
|
||||
user << "\blue \The [src] is full!"
|
||||
user << "<span class='notice'>\The [src] is full!</span>"
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
///////////////////////////////////////////////Alchohol bottles! -Agouri //////////////////////////
|
||||
//Functionally identical to regular drinks. The only difference is that the default bottle size is 100. - Darem
|
||||
//Bottles now weaken and break when smashed on people's heads. - Giacom
|
||||
@@ -78,10 +76,9 @@
|
||||
msg_admin_attack("[user.name] ([user.ckey]) attacked [target.name] ([target.ckey]) with a bottle. (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
//The reagents in the bottle splash all over the target, thanks for the idea Nodrak
|
||||
if(src.reagents)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\blue <B>The contents of the [src] splashes all over [target]!</B>"), 1)
|
||||
src.reagents.reaction(target, TOUCH)
|
||||
if(reagents)
|
||||
user.visible_message("<span class='notice'>The contents of the [src] splash all over [target]!</span>")
|
||||
reagents.trans_to_mob(target, reagents.total_volume)
|
||||
|
||||
//Finally, smash the bottle. This kills (del) the bottle.
|
||||
src.smash(target, user)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
else if(istype(W,/obj/item/weapon/reagent_containers/food/snacks))
|
||||
user << "\blue You layer [W] over \the [src]."
|
||||
var/obj/item/weapon/reagent_containers/F = W
|
||||
F.reagents.trans_to(src, F.reagents.total_volume)
|
||||
F.reagents.trans_to_obj(src, F.reagents.total_volume)
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
ingredients += W
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/attack(mob/M as mob, mob/user as mob, def_zone)
|
||||
|
||||
if(!reagents.total_volume)
|
||||
user << "<span class='danger'>None of [src] left!</span>"
|
||||
user.drop_from_inventory(src)
|
||||
@@ -94,15 +93,9 @@
|
||||
playsound(M.loc,'sound/items/eatfood.ogg', rand(10,50), 1)
|
||||
if(reagents.total_volume)
|
||||
if(reagents.total_volume > bitesize)
|
||||
/*
|
||||
* I totally cannot understand what this code supposed to do.
|
||||
* Right now every snack consumes in 2 bites, my popcorn does not work right, so I simplify it. -- rastaf0
|
||||
var/temp_bitesize = max(reagents.total_volume /2, bitesize)
|
||||
reagents.trans_to(M, temp_bitesize)
|
||||
*/
|
||||
reagents.trans_to_ingest(M, bitesize)
|
||||
reagents.trans_to_mob(M, bitesize, CHEM_INGEST)
|
||||
else
|
||||
reagents.trans_to_ingest(M, reagents.total_volume)
|
||||
reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST)
|
||||
bitecount++
|
||||
On_Consume(M)
|
||||
return 1
|
||||
@@ -149,7 +142,7 @@
|
||||
I.color = src.filling_color
|
||||
U.overlays += I
|
||||
|
||||
reagents.trans_to(U,min(reagents.total_volume,5))
|
||||
reagents.trans_to_obj(U, min(reagents.total_volume,5))
|
||||
|
||||
if (reagents.total_volume <= 0)
|
||||
del(src)
|
||||
@@ -188,7 +181,7 @@
|
||||
var/reagents_per_slice = reagents.total_volume/slices_num
|
||||
for(var/i=1 to (slices_num-slices_lost))
|
||||
var/obj/slice = new slice_path (src.loc)
|
||||
reagents.trans_to(slice,reagents_per_slice)
|
||||
reagents.trans_to_obj(slice, reagents_per_slice)
|
||||
del(src)
|
||||
return
|
||||
|
||||
@@ -210,7 +203,7 @@
|
||||
user.visible_message("<b>[user]</b> nibbles away at \the [src].","You nibble away at \the [src].")
|
||||
bitecount++
|
||||
if(reagents && user.reagents)
|
||||
reagents.trans_to_ingest(user, bitesize)
|
||||
reagents.trans_to_mob(user, bitesize, CHEM_INGEST)
|
||||
spawn(5)
|
||||
if(!src && !user.client)
|
||||
user.custom_emote(1,"[pick("burps", "cries for more", "burps twice", "looks at the area where the food was")]")
|
||||
@@ -484,7 +477,7 @@
|
||||
/obj/item/weapon/reagent_containers/food/snacks/egg/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
new/obj/effect/decal/cleanable/egg_smudge(src.loc)
|
||||
src.reagents.reaction(hit_atom, TOUCH)
|
||||
src.reagents.trans_to(hit_atom, reagents.total_volume)
|
||||
src.visible_message("\red [src.name] has been squashed.","\red You hear a smack.")
|
||||
del(src)
|
||||
|
||||
@@ -2049,7 +2042,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("minttoxin", 1)
|
||||
reagents.add_reagent("mint", 1)
|
||||
bitesize = 1
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/mushroomsoup
|
||||
|
||||
@@ -41,116 +41,71 @@
|
||||
/obj/machinery/sleeper,
|
||||
/obj/machinery/smartfridge/,
|
||||
/obj/machinery/biogenerator,
|
||||
/obj/machinery/constructable_frame
|
||||
/obj/machinery/constructable_frame,
|
||||
/obj/machinery/bunsen_burner,
|
||||
/obj/machinery/radiocarbon_spectrometer
|
||||
)
|
||||
|
||||
New()
|
||||
..()
|
||||
base_name = name
|
||||
|
||||
examine(mob/user)
|
||||
examine(var/mob/user)
|
||||
if(!..(user, 2))
|
||||
return
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
user << "\blue It contains [src.reagents.total_volume] units of liquid."
|
||||
user << "<span class='notice'>It contains [reagents.total_volume] units of liquid.</span>"
|
||||
else
|
||||
user << "\blue It is empty."
|
||||
if (!is_open_container())
|
||||
user << "\blue Airtight lid seals it completely."
|
||||
user << "<span class='notice'>It is empty.</span>"
|
||||
if(!is_open_container())
|
||||
user << "<span class='notice'>Airtight lid seals it completely.</span>"
|
||||
|
||||
attack_self()
|
||||
..()
|
||||
if (is_open_container())
|
||||
usr << "<span class = 'notice'>You put the lid on \the [src]."
|
||||
if(is_open_container())
|
||||
usr << "<span class = 'notice'>You put the lid on \the [src].</span>"
|
||||
flags ^= OPENCONTAINER
|
||||
else
|
||||
usr << "<span class = 'notice'>You take the lid off \the [src]."
|
||||
usr << "<span class = 'notice'>You take the lid off \the [src].</span>"
|
||||
flags |= OPENCONTAINER
|
||||
update_icon()
|
||||
|
||||
afterattack(obj/target, mob/user , flag)
|
||||
afterattack(var/obj/target, var/mob/user, var/flag)
|
||||
|
||||
if (!is_open_container() || !flag)
|
||||
if(!is_open_container() || !flag)
|
||||
return
|
||||
|
||||
for(var/type in src.can_be_placed_into)
|
||||
for(var/type in can_be_placed_into)
|
||||
if(istype(target, type))
|
||||
return
|
||||
|
||||
if(ismob(target) && target.reagents && reagents.total_volume)
|
||||
user << "\blue You splash the solution onto [target]."
|
||||
|
||||
var/mob/living/M = target
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/R in src.reagents.reagent_list)
|
||||
injected += R.name
|
||||
var/contained = english_list(injected)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been splashed with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to splash [M.name] ([M.key]). Reagents: [contained]</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) splashed [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message(text("\red [] has been splashed with something by []!", target, user), 1)
|
||||
src.reagents.reaction(target, TOUCH)
|
||||
spawn(5) src.reagents.clear_reagents()
|
||||
if(standard_splash_mob(user, target))
|
||||
return
|
||||
else if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
|
||||
target.add_fingerprint(user)
|
||||
|
||||
if(!target.reagents.total_volume && target.reagents)
|
||||
user << "\red [target] is empty."
|
||||
return
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
user << "\red [src] is full."
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, target:amount_per_transfer_from_this)
|
||||
user << "\blue You fill [src] with [trans] units of the contents of [target]."
|
||||
|
||||
else if(target.is_open_container() && target.reagents) //Something like a glass. Player probably wants to transfer TO it.
|
||||
|
||||
if(!reagents.total_volume)
|
||||
user << "\red [src] is empty."
|
||||
return
|
||||
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
user << "\red [target] is full."
|
||||
return
|
||||
|
||||
var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
user << "\blue You transfer [trans] units of the solution to [target]."
|
||||
|
||||
else if(istype(target, /obj/machinery/bunsen_burner))
|
||||
if(standard_dispenser_refill(user, target))
|
||||
return
|
||||
if(standard_pour_into(user, target))
|
||||
return
|
||||
|
||||
else if(istype(target, /obj/machinery/smartfridge))
|
||||
return
|
||||
|
||||
else if(istype(target, /obj/machinery/radiocarbon_spectrometer))
|
||||
return
|
||||
|
||||
else if(reagents.total_volume)
|
||||
user << "\blue You splash the solution onto [target]."
|
||||
src.reagents.reaction(target, TOUCH)
|
||||
spawn(5) src.reagents.clear_reagents()
|
||||
if(reagents.total_volume)
|
||||
user << "<span class='notice'>You splash the solution onto [target].</span>"
|
||||
reagents.trans_to(target, reagents.total_volume)
|
||||
return
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/pen) || istype(W, /obj/item/device/flashlight/pen))
|
||||
var/tmp_label = sanitize(copytext(input(user, "Enter a label for [src.name]","Label",src.label_text), 1, MAX_NAME_LEN))
|
||||
var/tmp_label = sanitize(copytext(input(user, "Enter a label for \the [name]", "Label", label_text), 1, MAX_NAME_LEN))
|
||||
if(length(tmp_label) > 10)
|
||||
user << "\red The label can be at most 10 characters long."
|
||||
user << "<span class='notice'>The label can be at most 10 characters long.</span>"
|
||||
else
|
||||
user << "\blue You set the label to \"[tmp_label]\"."
|
||||
src.label_text = tmp_label
|
||||
src.update_name_label()
|
||||
user << "<span class='notice'>You set the label to \"[tmp_label]\".</span>"
|
||||
label_text = tmp_label
|
||||
update_name_label()
|
||||
|
||||
proc/update_name_label()
|
||||
if(src.label_text == "")
|
||||
src.name = src.base_name
|
||||
if(label_text == "")
|
||||
name = base_name
|
||||
else
|
||||
src.name = "[src.base_name] ([src.label_text])"
|
||||
name = "[base_name] ([label_text])"
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker
|
||||
name = "beaker"
|
||||
@@ -195,7 +150,7 @@
|
||||
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)
|
||||
filling.color = reagents.get_color()
|
||||
overlays += filling
|
||||
|
||||
if (!is_open_container())
|
||||
@@ -231,7 +186,6 @@
|
||||
possible_transfer_amounts = list(5,10,15,25,30,60,120,300)
|
||||
flags = OPENCONTAINER
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/vial
|
||||
name = "vial"
|
||||
desc = "A small glass vial."
|
||||
@@ -282,18 +236,6 @@
|
||||
var/image/lid = image(icon, src, "lid_[initial(icon_state)]")
|
||||
overlays += lid
|
||||
|
||||
// vials are defined twice, what?
|
||||
/*
|
||||
/obj/item/weapon/reagent_containers/glass/beaker/vial
|
||||
name = "vial"
|
||||
desc = "Small glass vial. Looks fragile."
|
||||
icon_state = "vial"
|
||||
g_amt = 500
|
||||
volume = 15
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = list(1,5,15)
|
||||
flags = OPENCONTAINER */
|
||||
|
||||
/*
|
||||
/obj/item/weapon/reagent_containers/glass/blender_jug
|
||||
name = "Blender Jug"
|
||||
@@ -324,21 +266,4 @@
|
||||
amount_per_transfer_from_this = 20
|
||||
possible_transfer_amounts = list(10,20,30,60)
|
||||
volume = 120
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/dispenser
|
||||
name = "reagent glass"
|
||||
desc = "A reagent glass."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "beaker0"
|
||||
amount_per_transfer_from_this = 10
|
||||
flags = OPENCONTAINER
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/dispenser/surfactant
|
||||
name = "reagent glass (surfactant)"
|
||||
icon_state = "liquid"
|
||||
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("fluorosurfactant", 20)
|
||||
|
||||
*/
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
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)
|
||||
filling.color = reagents.get_color()
|
||||
overlays += filling
|
||||
|
||||
if (!is_open_container())
|
||||
|
||||
@@ -21,27 +21,22 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/hypospray/attack(mob/M as mob, mob/user as mob)
|
||||
if(!reagents.total_volume)
|
||||
user << "\red [src] is empty."
|
||||
user << "<span class='warning'>[src] is empty.</span>"
|
||||
return
|
||||
if (!( istype(M, /mob) ))
|
||||
if (!istype(M))
|
||||
return
|
||||
if (reagents.total_volume)
|
||||
user << "\blue You inject [M] with [src]."
|
||||
M << "\red You feel a tiny prick!"
|
||||
user << "<span class='notice'>You inject [M] with [src].</span>"
|
||||
M << "<span class='notice'>You feel a tiny prick!</span>"
|
||||
|
||||
src.reagents.reaction(M, INGEST)
|
||||
if(M.reagents)
|
||||
if(M.reagents)
|
||||
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/R in src.reagents.reagent_list)
|
||||
injected += R.name
|
||||
var/contained = english_list(injected)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to inject [M.name] ([M.key]). Reagents: [contained]</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) injected [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
var/contained = reagentlist()
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [name] by [user.name] ([user.ckey]). Reagents: [contained]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to inject [M.name] ([M.key]). Reagents: [contained]</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) injected [M.name] ([M.key]) with [name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
var/trans = reagents.trans_to(M, amount_per_transfer_from_this)
|
||||
user << "\blue [trans] units injected. [reagents.total_volume] units remaining in [src]."
|
||||
var/trans = reagents.trans_to_mob(M, amount_per_transfer_from_this, CHEM_BLOOD)
|
||||
user << "<span class='notice'>[trans] units injected. [reagents.total_volume] units remaining in \the [src].</span>"
|
||||
|
||||
return
|
||||
|
||||
@@ -76,6 +71,6 @@
|
||||
/obj/item/weapon/reagent_containers/hypospray/autoinjector/examine(mob/user)
|
||||
..(user)
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
user << "\blue It is currently loaded."
|
||||
user << "<span class='notice'>It is currently loaded.</span>"
|
||||
else
|
||||
user << "\blue It is spent."
|
||||
user << "<span class='notice'>It is spent.</span>"
|
||||
|
||||
@@ -14,53 +14,47 @@
|
||||
New()
|
||||
..()
|
||||
if(!icon_state)
|
||||
icon_state = "pill[rand(1,20)]"
|
||||
icon_state = "pill[rand(1, 20)]"
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
return
|
||||
attack(mob/M as mob, mob/user as mob, def_zone)
|
||||
if(M == user)
|
||||
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
H << "\red You have a monitor for a head, where do you think you're going to put that?"
|
||||
H << "<span class='notice'>You have a monitor for a head, where do you think you're going to put that?</span>"
|
||||
return
|
||||
|
||||
M << "\blue You swallow [src]."
|
||||
M << "<span class='notice'>You swallow \the [src].</span>"
|
||||
M.drop_from_inventory(src) //icon update
|
||||
if(reagents.total_volume)
|
||||
reagents.trans_to_ingest(M, reagents.total_volume)
|
||||
del(src)
|
||||
else
|
||||
del(src)
|
||||
reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST)
|
||||
del(src)
|
||||
return 1
|
||||
|
||||
else if(istype(M, /mob/living/carbon/human) )
|
||||
else if(istype(M, /mob/living/carbon/human))
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
H << "\red They have a monitor for a head, where do you think you're going to put that?"
|
||||
H << "<span class='notice'>They have a monitor for a head, where do you think you're going to put that?</span>"
|
||||
return
|
||||
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message("\red [user] attempts to force [M] to swallow [src].", 1)
|
||||
user.visible_message("<span class='warning'>[user] attempts to force [M] to swallow \the [src].</span>")
|
||||
|
||||
if(!do_mob(user, M)) return
|
||||
if(!do_mob(user, M))
|
||||
return
|
||||
|
||||
user.drop_from_inventory(src) //icon update
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message("\red [user] forces [M] to swallow [src].", 1)
|
||||
user.visible_message("<span class='warning'>[user] forces [M] to swallow \the [src].</span>")
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [M.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
var/contained = reagentlist()
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [name] by [user.name] ([user.ckey]) Reagents: [contained]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [name] by [M.name] ([M.ckey]) Reagents: [contained]</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [name] Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
if(reagents.total_volume)
|
||||
reagents.trans_to_ingest(M, reagents.total_volume)
|
||||
del(src)
|
||||
else
|
||||
del(src)
|
||||
reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST)
|
||||
del(src)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -69,21 +63,20 @@
|
||||
afterattack(obj/target, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
|
||||
if(target.is_open_container() != 0 && target.reagents)
|
||||
if(target.is_open_container() && target.reagents)
|
||||
if(!target.reagents.total_volume)
|
||||
user << "\red [target] is empty. Cant dissolve pill."
|
||||
user << "<span class='notice'>[target] is empty. Can't dissolve \the [src].</span>"
|
||||
return
|
||||
user << "\blue You dissolve the pill in [target]"
|
||||
user << "<span class='notice'>You dissolve \the [src] in [target].</span>"
|
||||
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Spiked \a [target] with a pill. Reagents: [reagentlist(src)]</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) spiked \a [target] with a pill. Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Spiked \a [target] with a pill. Reagents: [reagentlist()]</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) spiked \a [target] with a pill. Reagents: [reagentlist()] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
reagents.trans_to(target, reagents.total_volume)
|
||||
for(var/mob/O in viewers(2, user))
|
||||
O.show_message("\red [user] puts something in \the [target].", 1)
|
||||
O.show_message("<span class='warning'>[user] puts something in \the [target].</span>", 1)
|
||||
|
||||
spawn(5)
|
||||
del(src)
|
||||
del(src)
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/robodropper
|
||||
name = "Industrial Dropper"
|
||||
desc = "A larger dropper. Transfers 10 units."
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "dropper0"
|
||||
amount_per_transfer_from_this = 10
|
||||
possible_transfer_amounts = list(1,2,3,4,5,6,7,8,9,10)
|
||||
volume = 10
|
||||
var/filled = 0
|
||||
|
||||
afterattack(obj/target, mob/user , flag)
|
||||
if(!target.reagents) return
|
||||
|
||||
if(filled)
|
||||
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
user << "\red [target] is full."
|
||||
return
|
||||
|
||||
if(!target.is_open_container() && !ismob(target) && !istype(target,/obj/item/weapon/reagent_containers/food)) //You can inject humans and food but you cant remove the shit.
|
||||
user << "\red You cannot directly fill this object."
|
||||
return
|
||||
|
||||
|
||||
var/trans = 0
|
||||
|
||||
if(ismob(target))
|
||||
if(istype(target , /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/victim = target
|
||||
|
||||
var/obj/item/safe_thing = null
|
||||
if( victim.wear_mask )
|
||||
if ( victim.wear_mask.flags & MASKCOVERSEYES )
|
||||
safe_thing = victim.wear_mask
|
||||
if( victim.head )
|
||||
if ( victim.head.flags & 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)
|
||||
trans = src.reagents.trans_to(safe_thing, amount_per_transfer_from_this)
|
||||
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message(text("\red <B>[] tries to squirt something into []'s eyes, but fails!</B>", user, target), 1)
|
||||
spawn(5)
|
||||
src.reagents.reaction(safe_thing, TOUCH)
|
||||
|
||||
|
||||
user << "\blue You transfer [trans] units of the solution."
|
||||
if (src.reagents.total_volume<=0)
|
||||
filled = 0
|
||||
icon_state = "dropper[filled]"
|
||||
return
|
||||
|
||||
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message(text("\red <B>[] squirts something into []'s eyes!</B>", user, target), 1)
|
||||
src.reagents.reaction(target, TOUCH)
|
||||
|
||||
var/mob/M = target
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/R in src.reagents.reagent_list)
|
||||
injected += R.name
|
||||
var/contained = english_list(injected)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been squirted with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to squirt [M.name] ([M.key]). Reagents: [contained]</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) squirted [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
|
||||
trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
user << "\blue You transfer [trans] units of the solution."
|
||||
if (src.reagents.total_volume<=0)
|
||||
filled = 0
|
||||
icon_state = "dropper[filled]"
|
||||
|
||||
else
|
||||
|
||||
if(!target.is_open_container() && !istype(target,/obj/structure/reagent_dispensers))
|
||||
user << "\red You cannot directly remove reagents from [target]."
|
||||
return
|
||||
|
||||
if(!target.reagents.total_volume)
|
||||
user << "\red [target] is empty."
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
|
||||
|
||||
user << "\blue You fill the dropper with [trans] units of the solution."
|
||||
|
||||
filled = 1
|
||||
icon_state = "dropper[filled]"
|
||||
|
||||
return
|
||||
@@ -16,32 +16,21 @@
|
||||
var/list/spray_sizes = list(1,3)
|
||||
volume = 250
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/New()
|
||||
..()
|
||||
src.verbs -= /obj/item/weapon/reagent_containers/verb/set_APTFT
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/afterattack(atom/A as mob|obj, mob/user as mob, proximity)
|
||||
if(istype(A, /obj/item/weapon/storage) || istype(A, /obj/structure/table) || istype(A, /obj/structure/closet) \
|
||||
|| istype(A, /obj/item/weapon/reagent_containers) || istype(A, /obj/structure/sink) || istype(A, /obj/structure/janitorialcart))
|
||||
if(istype(A, /obj/item/weapon/storage) || istype(A, /obj/structure/table) || istype(A, /obj/structure/closet) || istype(A, /obj/item/weapon/reagent_containers) || istype(A, /obj/structure/sink) || istype(A, /obj/structure/janitorialcart))
|
||||
return
|
||||
|
||||
if(istype(A, /obj/effect/proc_holder/spell))
|
||||
return
|
||||
|
||||
if(istype(A, /obj/structure/reagent_dispensers) && get_dist(src,A) <= 1) //this block copypasted from reagent_containers/glass, for lack of a better solution
|
||||
if(!A.reagents.total_volume && A.reagents)
|
||||
user << "<span class='notice'>\The [A] is empty.</span>"
|
||||
if(proximity)
|
||||
if(standard_dispenser_refill(user, A))
|
||||
return
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
user << "<span class='notice'>\The [src] is full.</span>"
|
||||
return
|
||||
|
||||
var/trans = A.reagents.trans_to(src, A:amount_per_transfer_from_this)
|
||||
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)
|
||||
user << "<span class='notice'>\The [src] is empty!</span>"
|
||||
return
|
||||
@@ -64,36 +53,17 @@
|
||||
/obj/item/weapon/reagent_containers/spray/proc/Spray_at(atom/A as mob|obj, mob/user as mob, proximity)
|
||||
if (A.density && proximity)
|
||||
A.visible_message("[usr] sprays [A] with [src].")
|
||||
var/obj/D = new/obj()
|
||||
D.create_reagents(amount_per_transfer_from_this)
|
||||
reagents.trans_to(D, amount_per_transfer_from_this)
|
||||
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
|
||||
spawn(0)
|
||||
D.reagents.reaction(A)
|
||||
sleep(5)
|
||||
del(D)
|
||||
reagents.trans_to(A, amount_per_transfer_from_this)
|
||||
else
|
||||
var/obj/effect/decal/chempuff/D = new/obj/effect/decal/chempuff(get_turf(src))
|
||||
D.create_reagents(amount_per_transfer_from_this)
|
||||
reagents.trans_to(D, amount_per_transfer_from_this, 1/spray_size)
|
||||
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
|
||||
|
||||
var/turf/A_turf = get_turf(A)//BS12
|
||||
|
||||
spawn(0)
|
||||
for(var/i=0, i<spray_size, i++)
|
||||
step_towards(D,A)
|
||||
D.reagents.reaction(get_turf(D))
|
||||
for(var/atom/T in get_turf(D))
|
||||
D.reagents.reaction(T)
|
||||
|
||||
// When spraying against the wall, also react with the wall, but
|
||||
// not its contents. BS12
|
||||
if(get_dist(D, A_turf) == 1 && A_turf.density)
|
||||
D.reagents.reaction(A_turf)
|
||||
sleep(2)
|
||||
sleep(3)
|
||||
del(D)
|
||||
var/obj/effect/effect/water/chempuff/D = new/obj/effect/effect/water/chempuff(get_turf(src))
|
||||
var/turf/my_target = get_turf(A)
|
||||
D.create_reagents(amount_per_transfer_from_this)
|
||||
if(!src)
|
||||
return
|
||||
reagents.trans_to_obj(D, amount_per_transfer_from_this)
|
||||
D.set_color()
|
||||
D.set_up(my_target, spray_size, 10)
|
||||
|
||||
return
|
||||
|
||||
@@ -104,10 +74,9 @@
|
||||
spray_size = next_in_list(spray_size, spray_sizes)
|
||||
user << "<span class='notice'>You adjusted the pressure nozzle. You'll now use [amount_per_transfer_from_this] units per spray.</span>"
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/examine(mob/user)
|
||||
if(..(user, 0) && user==src.loc)
|
||||
user << "[round(src.reagents.total_volume)] units left."
|
||||
if(..(user, 0) && loc == user)
|
||||
user << "[round(reagents.total_volume)] units left."
|
||||
return
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/verb/empty()
|
||||
@@ -120,8 +89,7 @@
|
||||
return
|
||||
if(isturf(usr.loc))
|
||||
usr << "<span class='notice'>You empty \the [src] onto the floor.</span>"
|
||||
reagents.reaction(usr.loc)
|
||||
spawn(5) src.reagents.clear_reagents()
|
||||
reagents.trans_to(usr.loc, reagents.total_volume)
|
||||
|
||||
//space cleaner
|
||||
/obj/item/weapon/reagent_containers/spray/cleaner
|
||||
@@ -135,8 +103,8 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/cleaner/New()
|
||||
..()
|
||||
reagents.add_reagent("cleaner", src.volume)
|
||||
//pepperspray
|
||||
reagents.add_reagent("cleaner", volume)
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/pepper
|
||||
name = "pepperspray"
|
||||
desc = "Manufactured by UhangInc, used to blind and down an opponent quickly."
|
||||
@@ -147,7 +115,6 @@
|
||||
volume = 40
|
||||
var/safety = 1
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/pepper/New()
|
||||
..()
|
||||
reagents.add_reagent("condensedcapsaicin", 40)
|
||||
@@ -166,7 +133,6 @@
|
||||
return
|
||||
..()
|
||||
|
||||
//water flower
|
||||
/obj/item/weapon/reagent_containers/spray/waterflower
|
||||
name = "water flower"
|
||||
desc = "A seemingly innocent sunflower...with a twist."
|
||||
@@ -181,7 +147,6 @@
|
||||
..()
|
||||
reagents.add_reagent("water", 10)
|
||||
|
||||
//chemsprayer
|
||||
/obj/item/weapon/reagent_containers/spray/chemsprayer
|
||||
name = "chem sprayer"
|
||||
desc = "A utility used to spray large amounts of reagent in a given area."
|
||||
@@ -194,47 +159,27 @@
|
||||
volume = 600
|
||||
origin_tech = "combat=3;materials=3;engineering=3"
|
||||
|
||||
|
||||
//this is a big copypasta clusterfuck, but it's still better than it used to be!
|
||||
/obj/item/weapon/reagent_containers/spray/chemsprayer/Spray_at(atom/A as mob|obj)
|
||||
var/Sprays[3]
|
||||
for(var/i=1, i<=3, i++) // intialize sprays
|
||||
if(src.reagents.total_volume < 1) break
|
||||
var/obj/effect/decal/chempuff/D = new/obj/effect/decal/chempuff(get_turf(src))
|
||||
D.create_reagents(amount_per_transfer_from_this)
|
||||
src.reagents.trans_to(D, amount_per_transfer_from_this)
|
||||
|
||||
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
|
||||
|
||||
Sprays[i] = D
|
||||
|
||||
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<=Sprays.len, i++)
|
||||
spawn()
|
||||
var/obj/effect/decal/chempuff/D = Sprays[i]
|
||||
if(!D) continue
|
||||
|
||||
// Spreads the sprays a little bit
|
||||
var/turf/my_target = pick(the_targets)
|
||||
the_targets -= my_target
|
||||
|
||||
for(var/j=1, j<=rand(6,8), j++)
|
||||
step_towards(D, my_target)
|
||||
D.reagents.reaction(get_turf(D))
|
||||
for(var/atom/t in get_turf(D))
|
||||
D.reagents.reaction(t)
|
||||
sleep(2)
|
||||
del(D)
|
||||
var/list/the_targets = list(T, T1, T2)
|
||||
|
||||
for(var/a = 1 to 3)
|
||||
spawn(0)
|
||||
if(reagents.total_volume < 1) break
|
||||
var/obj/effect/effect/water/chempuff/D = new/obj/effect/effect/water/chempuff(get_turf(src))
|
||||
var/turf/my_target = the_targets[a]
|
||||
D.create_reagents(amount_per_transfer_from_this)
|
||||
if(!src)
|
||||
return
|
||||
reagents.trans_to_obj(D, amount_per_transfer_from_this)
|
||||
D.set_color()
|
||||
D.set_up(my_target, rand(6, 8), 2)
|
||||
return
|
||||
|
||||
// Plant-B-Gone
|
||||
/obj/item/weapon/reagent_containers/spray/plantbgone // -- Skie
|
||||
/obj/item/weapon/reagent_containers/spray/plantbgone
|
||||
name = "Plant-B-Gone"
|
||||
desc = "Kills those pesky weeds!"
|
||||
icon = 'icons/obj/hydroponics_machines.dmi'
|
||||
@@ -242,16 +187,14 @@
|
||||
item_state = "plantbgone"
|
||||
volume = 100
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/plantbgone/New()
|
||||
..()
|
||||
reagents.add_reagent("plantbgone", 100)
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/spray/plantbgone/afterattack(atom/A as mob|obj, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
|
||||
if (istype(A, /obj/effect/blob)) // blob damage in blob code
|
||||
if(istype(A, /obj/effect/blob)) // blob damage in blob code
|
||||
return
|
||||
|
||||
..()
|
||||
@@ -13,12 +13,14 @@
|
||||
icon_state = "0"
|
||||
matter = list("glass" = 150)
|
||||
amount_per_transfer_from_this = 5
|
||||
possible_transfer_amounts = null //list(5,10,15)
|
||||
possible_transfer_amounts = null
|
||||
volume = 15
|
||||
w_class = 1
|
||||
sharp = 1
|
||||
var/mode = SYRINGE_DRAW
|
||||
var/image/filling //holds a reference to the current filling overlay
|
||||
var/visible_name = "a syringe"
|
||||
var/time = 30
|
||||
|
||||
on_reagent_change()
|
||||
update_icon()
|
||||
@@ -47,18 +49,17 @@
|
||||
update_icon()
|
||||
|
||||
attackby(obj/item/I as obj, mob/user as mob)
|
||||
|
||||
return
|
||||
|
||||
afterattack(obj/target, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
if(!target.reagents) return
|
||||
|
||||
if(mode == SYRINGE_BROKEN)
|
||||
user << "\red This syringe is broken!"
|
||||
if(!proximity || !target.reagents)
|
||||
return
|
||||
|
||||
if (user.a_intent == "hurt" && ismob(target))
|
||||
if(mode == SYRINGE_BROKEN)
|
||||
user << "<span class='warning'>This syringe is broken!</span>"
|
||||
return
|
||||
|
||||
if(user.a_intent == "hurt" && ismob(target))
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
target = user
|
||||
syringestab(target, user)
|
||||
@@ -68,86 +69,89 @@
|
||||
switch(mode)
|
||||
if(SYRINGE_DRAW)
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
user << "\red The syringe is full."
|
||||
if(!reagents.get_free_space())
|
||||
user << "<span class='warning'>The syringe is full.</span>"
|
||||
mode = SYRINGE_INJECT
|
||||
return
|
||||
|
||||
if(ismob(target))//Blood!
|
||||
if(istype(target, /mob/living/carbon/slime))
|
||||
user << "\red You are unable to locate any blood."
|
||||
if(reagents.has_reagent("blood"))
|
||||
user << "<span class='notice'>There is already a blood sample in this syringe.</span>"
|
||||
return
|
||||
if(src.reagents.has_reagent("blood"))
|
||||
user << "\red There is already a blood sample in this syringe"
|
||||
return
|
||||
if(istype(target, /mob/living/carbon))//maybe just add a blood reagent to all mobs. Then you can suck them dry...With hundreds of syringes. Jolly good idea.
|
||||
var/amount = src.reagents.maximum_volume - src.reagents.total_volume
|
||||
if(istype(target, /mob/living/carbon))
|
||||
if(istype(target, /mob/living/carbon/slime))
|
||||
user << "<span class='warning'>You are unable to locate any blood.</span>"
|
||||
return
|
||||
var/amount = reagents.get_free_space()
|
||||
var/mob/living/carbon/T = target
|
||||
if(!T.dna)
|
||||
usr << "You are unable to locate any blood. (To be specific, your target seems to be missing their DNA datum)"
|
||||
user << "<span class='warning'>You are unable to locate any blood. (To be specific, your target seems to be missing their DNA datum).</span>"
|
||||
return
|
||||
if(NOCLONE in T.mutations) //target done been et, no more blood in him
|
||||
user << "\red You are unable to locate any blood."
|
||||
user << "<span class='warning'>You are unable to locate any blood.</span>"
|
||||
return
|
||||
|
||||
var/datum/reagent/B
|
||||
if(istype(T,/mob/living/carbon/human))
|
||||
if(istype(T, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = T
|
||||
if(H.species && H.species.flags & NO_BLOOD)
|
||||
H.reagents.trans_to(src,amount)
|
||||
H.reagents.trans_to_obj(src, amount)
|
||||
else
|
||||
B = T.take_blood(src,amount)
|
||||
B = T.take_blood(src, amount)
|
||||
else
|
||||
B = T.take_blood(src,amount)
|
||||
|
||||
if (B)
|
||||
src.reagents.reagent_list += B
|
||||
src.reagents.update_total()
|
||||
src.on_reagent_change()
|
||||
src.reagents.handle_reactions()
|
||||
user << "\blue You take a blood sample from [target]"
|
||||
reagents.reagent_list += B
|
||||
reagents.update_total()
|
||||
on_reagent_change()
|
||||
reagents.handle_reactions()
|
||||
user << "<span class='notice'>You take a blood sample from [target].</span>"
|
||||
for(var/mob/O in viewers(4, user))
|
||||
O.show_message("\red [user] takes a blood sample from [target].", 1)
|
||||
O.show_message("<span class='notice'>[user] takes a blood sample from [target].</span>", 1)
|
||||
|
||||
else //if not mob
|
||||
if(!target.reagents.total_volume)
|
||||
user << "\red [target] is empty."
|
||||
user << "<span class='notice'>[target] is empty.</span>"
|
||||
return
|
||||
|
||||
if(!target.is_open_container() && !istype(target,/obj/structure/reagent_dispensers) && !istype(target,/obj/item/slime_extract))
|
||||
user << "\red You cannot directly remove reagents from this object."
|
||||
if(!target.is_open_container() && !istype(target, /obj/structure/reagent_dispensers) && !istype(target, /obj/item/slime_extract))
|
||||
user << "<span class='notice'>You cannot directly remove reagents from this object.</span>"
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) // transfer from, transfer to - who cares?
|
||||
var/trans = target.reagents.trans_to_obj(src, amount_per_transfer_from_this)
|
||||
user << "<span class='notice'>You fill the syringe with [trans] units of the solution.</span>"
|
||||
update_icon()
|
||||
|
||||
user << "\blue You fill the syringe with [trans] units of the solution."
|
||||
if (reagents.total_volume >= reagents.maximum_volume)
|
||||
mode=!mode
|
||||
if(!reagents.get_free_space())
|
||||
mode = SYRINGE_INJECT
|
||||
update_icon()
|
||||
|
||||
if(SYRINGE_INJECT)
|
||||
if(!reagents.total_volume)
|
||||
user << "\red The syringe is empty."
|
||||
user << "<span class='notice'>The syringe is empty.</span>"
|
||||
mode = SYRINGE_DRAW
|
||||
return
|
||||
if(istype(target, /obj/item/weapon/implantcase/chem))
|
||||
return
|
||||
|
||||
if(!target.is_open_container() && !ismob(target) && !istype(target, /obj/item/weapon/reagent_containers/food) && !istype(target, /obj/item/slime_extract) && !istype(target, /obj/item/clothing/mask/smokable/cigarette) && !istype(target, /obj/item/weapon/storage/fancy/cigarettes))
|
||||
user << "\red You cannot directly fill this object."
|
||||
user << "<span class='notice'>You cannot directly fill this object.</span>"
|
||||
return
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
user << "\red [target] is full."
|
||||
if(!target.reagents.get_free_space())
|
||||
user << "<span class='notice'>[target] is full.</span>"
|
||||
return
|
||||
|
||||
if(ismob(target) && target != user)
|
||||
|
||||
var/time = 30 //Injecting through a hardsuit takes longer due to needing to find a port.
|
||||
var/injtime = time //Injecting through a hardsuit takes longer due to needing to find a port.
|
||||
|
||||
if(istype(target,/mob/living/carbon/human))
|
||||
if(istype(target, /mob/living/carbon/human))
|
||||
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(H.wear_suit)
|
||||
if(istype(H.wear_suit,/obj/item/clothing/suit/space))
|
||||
time = 60
|
||||
if(istype(H.wear_suit, /obj/item/clothing/suit/space))
|
||||
injtime = injtime * 2
|
||||
else if(!H.can_inject(user, 1))
|
||||
return
|
||||
|
||||
@@ -157,55 +161,43 @@
|
||||
if(!M.can_inject(user, 1))
|
||||
return
|
||||
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
if(time == 30)
|
||||
O.show_message(text("\red <B>[] is trying to inject []!</B>", user, target), 1)
|
||||
else
|
||||
O.show_message(text("\red <B>[] begins hunting for an injection port on []'s suit!</B>", user, target), 1)
|
||||
|
||||
if(!do_mob(user, target, time)) return
|
||||
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message(text("\red [] injects [] with the syringe!", user, target), 1)
|
||||
|
||||
if(istype(target,/mob/living))
|
||||
var/mob/living/M = target
|
||||
var/list/injected = list()
|
||||
for(var/datum/reagent/R in src.reagents.reagent_list)
|
||||
injected += R.name
|
||||
var/contained = english_list(injected)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to inject [M.name] ([M.key]). Reagents: [contained]</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) injected [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
src.reagents.reaction(target, INGEST)
|
||||
if(ismob(target) && target == user)
|
||||
src.reagents.reaction(target, INGEST)
|
||||
spawn(5)
|
||||
var/datum/reagent/blood/B
|
||||
for(var/datum/reagent/blood/d in src.reagents.reagent_list)
|
||||
B = d
|
||||
break
|
||||
var/trans
|
||||
if(B && istype(target,/mob/living/carbon))
|
||||
var/mob/living/carbon/C = target
|
||||
C.inject_blood(src,5)
|
||||
if(injtime == time)
|
||||
user.visible_message("<span class='warning'>[user] is trying to inject [target] with [visible_name]!</span>")
|
||||
else
|
||||
trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
user << "\blue You inject [trans] units of the solution. The syringe now contains [src.reagents.total_volume] units."
|
||||
if (reagents.total_volume <= 0 && mode==SYRINGE_INJECT)
|
||||
mode = SYRINGE_DRAW
|
||||
update_icon()
|
||||
user.visible_message("<span class='warning'>[user] begins hunting for an injection port on [target]'s suit!</span>")
|
||||
|
||||
if(!do_mob(user, target, injtime))
|
||||
return
|
||||
|
||||
user.visible_message("<span class='warning'>[user] injects [target] with the syringe!</span>")
|
||||
|
||||
if(istype(target, /mob/living))
|
||||
var/mob/living/M = target
|
||||
var/contained = reagentlist()
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [name] by [user.name] ([user.ckey]). Reagents: [contained]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to inject [M.name] ([M.key]). Reagents: [contained]</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) injected [M.name] ([M.key]) with [name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
var/trans
|
||||
if(ismob(target))
|
||||
trans = reagents.trans_to_mob(target, amount_per_transfer_from_this, CHEM_BLOOD)
|
||||
else
|
||||
trans = reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
user << "<span class='notice'>You inject [trans] units of the solution. The syringe now contains [src.reagents.total_volume] units.</span>"
|
||||
if (reagents.total_volume <= 0 && mode == SYRINGE_INJECT)
|
||||
mode = SYRINGE_DRAW
|
||||
update_icon()
|
||||
|
||||
return
|
||||
|
||||
update_icon()
|
||||
overlays.Cut()
|
||||
|
||||
if(mode == SYRINGE_BROKEN)
|
||||
icon_state = "broken"
|
||||
overlays.Cut()
|
||||
return
|
||||
var/rounded_vol = round(reagents.total_volume,5)
|
||||
overlays.Cut()
|
||||
|
||||
var/rounded_vol = round(reagents.total_volume, round(reagents.maximum_volume / 3))
|
||||
if(ismob(loc))
|
||||
var/injoverlay
|
||||
switch(mode)
|
||||
@@ -222,10 +214,9 @@
|
||||
|
||||
filling.icon_state = "syringe[rounded_vol]"
|
||||
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
filling.color = reagents.get_color()
|
||||
overlays += filling
|
||||
|
||||
|
||||
proc/syringestab(mob/living/carbon/target as mob, mob/living/carbon/user as mob)
|
||||
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [target.name] ([target.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
@@ -234,8 +225,10 @@
|
||||
|
||||
if(istype(target, /mob/living/carbon/human))
|
||||
|
||||
var/mob/living/carbon/human/H = target
|
||||
|
||||
var/target_zone = ran_zone(check_zone(user.zone_sel.selecting, target))
|
||||
var/datum/organ/external/affecting = target:get_organ(target_zone)
|
||||
var/datum/organ/external/affecting = H.get_organ(target_zone)
|
||||
|
||||
if (!affecting)
|
||||
return
|
||||
@@ -244,160 +237,58 @@
|
||||
return
|
||||
var/hit_area = affecting.display_name
|
||||
|
||||
var/mob/living/carbon/human/H = target
|
||||
if((user != target) && H.check_shields(7, "the [src.name]"))
|
||||
return
|
||||
|
||||
if (target != user && target.getarmor(target_zone, "melee") > 5 && prob(50))
|
||||
if (target != user && H.getarmor(target_zone, "melee") > 5 && prob(50))
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message(text("\red <B>[user] tries to stab [target] in \the [hit_area] with [src.name], but the attack is deflected by armor!</B>"), 1)
|
||||
user.u_equip(src)
|
||||
del(src)
|
||||
return
|
||||
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message(text("\red <B>[user] stabs [target] in \the [hit_area] with [src.name]!</B>"), 1)
|
||||
user.visible_message("<span class='danger'>[user] stabs [target] in \the [hit_area] with [src.name]!</span>")
|
||||
|
||||
if(affecting.take_damage(3))
|
||||
target:UpdateDamageIcon()
|
||||
H.UpdateDamageIcon()
|
||||
|
||||
else
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message(text("\red <B>[user] stabs [target] with [src.name]!</B>"), 1)
|
||||
user.visible_message("<span class='danger'>[user] stabs [target] with [src.name]!</span>")
|
||||
target.take_organ_damage(3)// 7 is the same as crowbar punch
|
||||
|
||||
src.reagents.reaction(target, INGEST)
|
||||
var/syringestab_amount_transferred = rand(0, (reagents.total_volume - 5)) //nerfed by popular demand
|
||||
src.reagents.trans_to(target, syringestab_amount_transferred)
|
||||
src.break_syringe(target, user)
|
||||
|
||||
reagents.trans_to_mob(target, syringestab_amount_transferred, CHEM_BLOOD)
|
||||
break_syringe(target, user)
|
||||
|
||||
proc/break_syringe(mob/living/carbon/target, mob/living/carbon/user)
|
||||
src.desc += " It is broken."
|
||||
src.mode = SYRINGE_BROKEN
|
||||
desc += " It is broken."
|
||||
mode = SYRINGE_BROKEN
|
||||
if(target)
|
||||
src.add_blood(target)
|
||||
add_blood(target)
|
||||
if(user)
|
||||
src.add_fingerprint(user)
|
||||
src.update_icon()
|
||||
add_fingerprint(user)
|
||||
update_icon()
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/ld50_syringe
|
||||
/obj/item/weapon/reagent_containers/syringe/ld50_syringe
|
||||
name = "Lethal Injection Syringe"
|
||||
desc = "A syringe used for lethal injections."
|
||||
icon = 'icons/obj/syringe.dmi'
|
||||
item_state = "syringe_0"
|
||||
icon_state = "0"
|
||||
amount_per_transfer_from_this = 50
|
||||
possible_transfer_amounts = null //list(5,10,15)
|
||||
volume = 50
|
||||
var/mode = SYRINGE_DRAW
|
||||
visible_name = "a giant syringe"
|
||||
time = 300
|
||||
|
||||
on_reagent_change()
|
||||
update_icon()
|
||||
|
||||
pickup(mob/user)
|
||||
afterattack(obj/target, mob/user, flag)
|
||||
if(mode == SYRINGE_DRAW && ismob(target)) // No drawing 50 units of blood at once
|
||||
user << "<span class='notice'>This needle isn't designed for drawing blood.</span>"
|
||||
return
|
||||
if(user.a_intent == "hurt" && ismob(target)) // No instant injecting
|
||||
user << "<span class='notice'>This syringe is too big to stab someone with it.</span>"
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
dropped(mob/user)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
mode = !mode
|
||||
update_icon()
|
||||
|
||||
attack_hand()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
attackby(obj/item/I as obj, mob/user as mob)
|
||||
|
||||
return
|
||||
|
||||
afterattack(obj/target, mob/user , flag)
|
||||
if(!target.reagents) return
|
||||
|
||||
switch(mode)
|
||||
if(SYRINGE_DRAW)
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
user << "\red The syringe is full."
|
||||
return
|
||||
|
||||
if(ismob(target))
|
||||
if(istype(target, /mob/living/carbon))//I Do not want it to suck 50 units out of people
|
||||
usr << "This needle isn't designed for drawing blood."
|
||||
return
|
||||
else //if not mob
|
||||
if(!target.reagents.total_volume)
|
||||
user << "\red [target] is empty."
|
||||
return
|
||||
|
||||
if(!target.is_open_container() && !istype(target,/obj/structure/reagent_dispensers))
|
||||
user << "\red You cannot directly remove reagents from this object."
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) // transfer from, transfer to - who cares?
|
||||
|
||||
user << "\blue You fill the syringe with [trans] units of the solution."
|
||||
if (reagents.total_volume >= reagents.maximum_volume)
|
||||
mode=!mode
|
||||
update_icon()
|
||||
|
||||
if(SYRINGE_INJECT)
|
||||
if(!reagents.total_volume)
|
||||
user << "\red The Syringe is empty."
|
||||
return
|
||||
if(istype(target, /obj/item/weapon/implantcase/chem))
|
||||
return
|
||||
if(!target.is_open_container() && !ismob(target) && !istype(target, /obj/item/weapon/reagent_containers/food))
|
||||
user << "\red You cannot directly fill this object."
|
||||
return
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
user << "\red [target] is full."
|
||||
return
|
||||
|
||||
if(ismob(target) && target != user)
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message(text("\red <B>[] is trying to inject [] with a giant syringe!</B>", user, target), 1)
|
||||
if(!do_mob(user, target, 300)) return
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message(text("\red [] injects [] with a giant syringe!", user, target), 1)
|
||||
src.reagents.reaction(target, INGEST)
|
||||
if(ismob(target) && target == user)
|
||||
src.reagents.reaction(target, INGEST)
|
||||
spawn(5)
|
||||
var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
user << "\blue You inject [trans] units of the solution. The syringe now contains [src.reagents.total_volume] units."
|
||||
if (reagents.total_volume >= reagents.maximum_volume && mode==SYRINGE_INJECT)
|
||||
mode = SYRINGE_DRAW
|
||||
update_icon()
|
||||
return
|
||||
|
||||
|
||||
update_icon()
|
||||
var/rounded_vol = round(reagents.total_volume,50)
|
||||
if(ismob(loc))
|
||||
var/mode_t
|
||||
switch(mode)
|
||||
if (SYRINGE_DRAW)
|
||||
mode_t = "d"
|
||||
if (SYRINGE_INJECT)
|
||||
mode_t = "i"
|
||||
icon_state = "[mode_t][rounded_vol]"
|
||||
else
|
||||
icon_state = "[rounded_vol]"
|
||||
item_state = "syringe_[rounded_vol]"
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Syringes. END
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/inaprovaline
|
||||
name = "Syringe (inaprovaline)"
|
||||
desc = "Contains inaprovaline - used to stabilize patients."
|
||||
@@ -436,40 +327,9 @@
|
||||
mode = SYRINGE_INJECT
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/ld50_syringe/choral
|
||||
/obj/item/weapon/reagent_containers/syringe/ld50_syringe/choral
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("chloralhydrate", 50)
|
||||
mode = SYRINGE_INJECT
|
||||
update_icon()
|
||||
|
||||
|
||||
//Robot syringes
|
||||
//Not special in any way, code wise. They don't have added variables or procs.
|
||||
/obj/item/weapon/reagent_containers/syringe/robot/antitoxin
|
||||
name = "Syringe (anti-toxin)"
|
||||
desc = "Contains anti-toxins."
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("anti_toxin", 15)
|
||||
mode = SYRINGE_INJECT
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/robot/inoprovaline
|
||||
name = "Syringe (inoprovaline)"
|
||||
desc = "Contains inaprovaline - used to stabilize patients."
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("inaprovaline", 15)
|
||||
mode = SYRINGE_INJECT
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/reagent_containers/syringe/robot/mixed
|
||||
name = "Syringe (mixed)"
|
||||
desc = "Contains inaprovaline & anti-toxins."
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("inaprovaline", 7)
|
||||
reagents.add_reagent("anti_toxin", 8)
|
||||
mode = SYRINGE_INJECT
|
||||
update_icon()
|
||||
@@ -66,7 +66,7 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
|
||||
/obj/machinery/r_n_d/circuit_imprinter/dismantle()
|
||||
for(var/obj/I in component_parts)
|
||||
if(istype(I, /obj/item/weapon/reagent_containers/glass/beaker))
|
||||
reagents.trans_to(I, reagents.total_volume)
|
||||
reagents.trans_to_obj(I, reagents.total_volume)
|
||||
if(g_amount >= 3750)
|
||||
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(loc)
|
||||
G.amount = round(g_amount / 3750)
|
||||
|
||||
@@ -61,7 +61,7 @@ Note: Must be placed west/left of and R&D console to function.
|
||||
/obj/machinery/r_n_d/protolathe/dismantle()
|
||||
for(var/obj/I in component_parts)
|
||||
if(istype(I, /obj/item/weapon/reagent_containers/glass/beaker))
|
||||
reagents.trans_to(I, reagents.total_volume)
|
||||
reagents.trans_to_obj(I, reagents.total_volume)
|
||||
if(m_amount >= 3750)
|
||||
var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(loc)
|
||||
G.amount = round(m_amount / G.perunit)
|
||||
|
||||
@@ -1,74 +1,5 @@
|
||||
|
||||
//chemistry stuff here so that it can be easily viewed/modified
|
||||
datum
|
||||
reagent
|
||||
tungsten
|
||||
name = "Tungsten"
|
||||
id = "tungsten"
|
||||
description = "A chemical element, and a strong oxidising agent."
|
||||
reagent_state = SOLID
|
||||
color = "#DCDCDC" // rgb: 220, 220, 220, silver
|
||||
|
||||
lithiumsodiumtungstate
|
||||
name = "Lithium Sodium Tungstate"
|
||||
id = "lithiumsodiumtungstate"
|
||||
description = "A reducing agent for geological compounds."
|
||||
reagent_state = LIQUID
|
||||
color = "#C0C0C0" // rgb: 192, 192, 192, darker silver
|
||||
|
||||
ground_rock
|
||||
name = "Ground Rock"
|
||||
id = "ground_rock"
|
||||
description = "A fine dust made of ground up rock."
|
||||
reagent_state = SOLID
|
||||
color = "#A0522D" //rgb: 160, 82, 45, brown
|
||||
|
||||
density_separated_sample
|
||||
name = "Density separated sample"
|
||||
id = "density_separated_sample"
|
||||
description = "A watery paste used in chemical analysis, there are some chunks floating in it."
|
||||
reagent_state = LIQUID
|
||||
color = "#DEB887" //rgb: 222, 184, 135, light brown
|
||||
|
||||
analysis_sample
|
||||
name = "Analysis liquid"
|
||||
id = "analysis_sample"
|
||||
description = "A watery paste used in chemical analysis."
|
||||
reagent_state = LIQUID
|
||||
color = "#F5FFFA" //rgb: 245, 255, 250, almost white
|
||||
|
||||
chemical_waste
|
||||
name = "Chemical Waste"
|
||||
id = "chemical_waste"
|
||||
description = "A viscous, toxic liquid left over from many chemical processes."
|
||||
reagent_state = LIQUID
|
||||
color = "#ADFF2F" //rgb: 173, 255, 47, toxic green
|
||||
|
||||
datum
|
||||
chemical_reaction
|
||||
lithiumsodiumtungstate //LiNa2WO4, not the easiest chem to mix
|
||||
name = "Lithium Sodium Tungstate"
|
||||
id = "lithiumsodiumtungstate"
|
||||
result = "lithiumsodiumtungstate"
|
||||
required_reagents = list("lithium" = 1, "sodium" = 2, "tungsten" = 1, "oxygen" = 4)
|
||||
result_amount = 8
|
||||
|
||||
density_separated_liquid
|
||||
name = "Density separated sample"
|
||||
id = "density_separated_sample"
|
||||
result = "density_separated_sample"
|
||||
secondary_results = list("chemical_waste" = 1)
|
||||
required_reagents = list("ground_rock" = 1, "lithiumsodiumtungstate" = 2)
|
||||
result_amount = 2
|
||||
|
||||
analysis_liquid
|
||||
name = "Analysis sample"
|
||||
id = "analysis_sample"
|
||||
result = "analysis_sample"
|
||||
secondary_results = list("chemical_waste" = 1)
|
||||
required_reagents = list("density_separated_sample" = 5)
|
||||
result_amount = 4
|
||||
requires_heating = 1
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/solution_tray
|
||||
name = "solution tray"
|
||||
|
||||
@@ -1,20 +1,3 @@
|
||||
|
||||
datum/reagent/coolant
|
||||
name = "Coolant"
|
||||
id = "coolant"
|
||||
description = "Industrial cooling substance."
|
||||
reagent_state = LIQUID
|
||||
color = "#C8A5DC" // rgb: 200, 165, 220
|
||||
|
||||
datum/chemical_reaction/coolant
|
||||
name = "Coolant"
|
||||
id = "coolant"
|
||||
result = "coolant"
|
||||
required_reagents = list("tungsten" = 1, "oxygen" = 1, "water" = 1)
|
||||
result_amount = 3
|
||||
|
||||
|
||||
|
||||
/obj/structure/reagent_dispensers/coolanttank
|
||||
name = "coolant tank"
|
||||
desc = "A tank of industrial coolant"
|
||||
|
||||
@@ -144,9 +144,8 @@
|
||||
|
||||
var/obj/item/weapon/reagent_containers/container = tool
|
||||
|
||||
var/trans = container.reagents.trans_to(target, container.amount_per_transfer_from_this)
|
||||
var/trans = container.reagents.trans_to_mob(target, container.amount_per_transfer_from_this, CHEM_BLOOD) //technically it's contact, but the reagents are being applied to internal tissue
|
||||
if (trans > 0)
|
||||
container.reagents.reaction(target, INGEST) //technically it's contact, but the reagents are being applied to internal tissue
|
||||
|
||||
if(container.reagents.has_reagent("peridaxon"))
|
||||
affected.status &= ~ORGAN_DEAD
|
||||
@@ -162,8 +161,7 @@
|
||||
|
||||
var/obj/item/weapon/reagent_containers/container = tool
|
||||
|
||||
var/trans = container.reagents.trans_to(target, container.amount_per_transfer_from_this)
|
||||
container.reagents.reaction(target, INGEST) //technically it's contact, but the reagents are being applied to internal tissue
|
||||
var/trans = container.reagents.trans_to_mob(target, container.amount_per_transfer_from_this, CHEM_BLOOD)
|
||||
|
||||
user.visible_message("\red [user]'s hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.display_name] with the [tool]!" , \
|
||||
"\red Your hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.display_name] with the [tool]!")
|
||||
|
||||
@@ -55,10 +55,10 @@ datum/reagent/antibodies
|
||||
reagent_state = LIQUID
|
||||
color = "#0050F0"
|
||||
|
||||
reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
|
||||
reaction_mob(var/mob/M, var/method=CHEM_TOUCH, var/volume)
|
||||
if(istype(M,/mob/living/carbon))
|
||||
var/mob/living/carbon/C = M
|
||||
if(src.data && method == INGEST)
|
||||
if(src.data && method == CHEM_INGEST)
|
||||
//if(C.virus2) if(src.data["antibodies"] & C.virus2.antigen)
|
||||
// C.virus2.dead = 1
|
||||
C.antibodies |= src.data["antibodies"]
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
|
||||
if (locate(/datum/reagent/toxin) in beaker.reagents.reagent_list)
|
||||
for(var/datum/reagent/toxin/T in beaker.reagents.reagent_list)
|
||||
toxins += max(T.toxpwr,1)
|
||||
toxins += max(T.strength,1)
|
||||
beaker.reagents.remove_reagent(T.id,1)
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@
|
||||
if(c_data)
|
||||
data = c_data
|
||||
else
|
||||
data = pick("bicaridine", "kelotane", "dylovene", "inaprovaline", "space_drugs", "sugar",
|
||||
data = pick("bicaridine", "kelotane", "anti_toxin", "inaprovaline", "space_drugs", "sugar",
|
||||
"tramadol", "dexalin", "cryptobiolin", "impedrezene", "hyperzine", "ethylredoxrazine",
|
||||
"mindbreaker", "nutriment")
|
||||
var/datum/reagent/R = chemical_reagents_list[data]
|
||||
|
||||
+9
-7
@@ -94,9 +94,15 @@
|
||||
#define DOOR_CRUSH_DAMAGE 10
|
||||
|
||||
#define HUNGER_FACTOR 0.05 // Factor of how fast mob nutrition decreases
|
||||
#define REAGENTS_METABOLISM 0.2 // How many units of reagent are consumed per tick, by default.
|
||||
#define REAGENTS_EFFECT_MULTIPLIER (REAGENTS_METABOLISM / 0.4) // By defining the effect multiplier this way, it'll exactly adjust
|
||||
// all effects according to how they originally were with the 0.4 metabolism
|
||||
#define REM 0.2 // Means 'Reagent Effect Multiplier'. This is how many units of reagent are consumed per tick
|
||||
#define CHEM_TOUCH 1
|
||||
#define CHEM_INGEST 2
|
||||
#define CHEM_BLOOD 3
|
||||
#define MINIMUM_CHEMICAL_VOLUME 0.01
|
||||
#define SOLID 1
|
||||
#define LIQUID 2
|
||||
#define GAS 3
|
||||
#define REAGENTS_OVERDOSE 30
|
||||
|
||||
#define MINIMUM_AIR_RATIO_TO_SUSPEND 0.05 // Minimum ratio of air that must move to/from a tile to suspend group processing
|
||||
#define MINIMUM_AIR_TO_SUSPEND (MOLES_CELLSTANDARD * MINIMUM_AIR_RATIO_TO_SUSPEND) // Minimum amount of air that has to move before a group processing can be suspended
|
||||
@@ -733,10 +739,6 @@ var/list/be_special_flags = list(
|
||||
#define ATMOS_DEFAULT_VOLUME_MIXER 200 // L.
|
||||
#define ATMOS_DEFAULT_VOLUME_PIPE 70 // L.
|
||||
|
||||
// Reagent metabolism defines.
|
||||
#define FOOD_METABOLISM 0.4
|
||||
#define ALCOHOL_METABOLISM 0.1
|
||||
|
||||
// Chemistry.
|
||||
#define CHEM_SYNTH_ENERGY 500 // How much energy does it take to synthesize 1 unit of chemical, in Joules.
|
||||
|
||||
|
||||
+3
-3
@@ -221,8 +221,8 @@
|
||||
"aem" = (/obj/structure/cable/green{d1 = 2; d2 = 4; icon_state = "2-4"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/structure/cable/green{d1 = 1; d2 = 4; icon_state = "1-4"},/turf/simulated/floor,/area/security/main)
|
||||
"aen" = (/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/turf/simulated/floor{dir = 2; icon_state = "redcorner"},/area/security/main)
|
||||
"aeo" = (/obj/machinery/door/airlock/security{name = "Evidence Storage"; req_access = list(1)},/turf/simulated/floor,/area/security/brig)
|
||||
"aep" = (/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 10},/turf/simulated/floor{dir = 8; icon_state = "redcorner"},/area/security/main)
|
||||
"aeq" = (/obj/structure/bed/chair/office/dark{dir = 4},/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor,/area/security/main)
|
||||
"aep" = (/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 10},/turf/simulated/floor{dir = 8; icon_state = "redcorner"},/area/security/main)
|
||||
"aeq" = (/obj/structure/bed/chair/office/dark{dir = 4},/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor,/area/security/main)
|
||||
"aer" = (/obj/structure/table,/obj/item/weapon/folder/red,/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor,/area/security/main)
|
||||
"aes" = (/obj/structure/table,/obj/item/weapon/book/manual/security_space_law,/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/obj/structure/cable/green{d1 = 2; d2 = 4; icon_state = "2-4"},/turf/simulated/floor,/area/security/main)
|
||||
"aet" = (/obj/structure/bed/chair/office/dark{dir = 8},/obj/structure/cable/green{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/structure/cable/green{d1 = 2; d2 = 8; icon_state = "2-8"},/turf/simulated/floor,/area/security/main)
|
||||
@@ -907,7 +907,7 @@
|
||||
"arw" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 8},/obj/structure/cable/green,/turf/simulated/floor/plating,/area/security/prison)
|
||||
"arx" = (/turf/simulated/wall/r_wall,/area/security/lobby)
|
||||
"ary" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 9},/obj/effect/decal/cleanable/blood/oil,/turf/simulated/floor/plating,/area/maintenance/security_starboard)
|
||||
"arz" = (/obj/structure/closet/crate/secure{name = "FOR DISPOSAL"; req_access = list(58)},/obj/item/clothing/glasses/sunglasses/blindfold,/obj/item/clothing/mask/balaclava,/obj/effect/decal/cleanable/cobweb2,/obj/item/clothing/mask/muzzle,/obj/item/weapon/reagent_containers/ld50_syringe/choral,/obj/effect/landmark{name = "blobstart"},/turf/simulated/floor/plating,/area/maintenance/security_port)
|
||||
"arz" = (/obj/structure/closet/crate/secure{name = "FOR DISPOSAL"; req_access = list(58)},/obj/item/clothing/glasses/sunglasses/blindfold,/obj/item/clothing/mask/balaclava,/obj/effect/decal/cleanable/cobweb2,/obj/item/clothing/mask/muzzle,/obj/item/weapon/reagent_containers/syringe/ld50_syringe/choral,/obj/effect/landmark{name = "blobstart"},/turf/simulated/floor/plating,/area/maintenance/security_port)
|
||||
"arA" = (/turf/simulated/wall/r_wall,/area/hallway/primary/fore)
|
||||
"arB" = (/obj/structure/cable/yellow{d2 = 4; icon_state = "0-4"},/turf/simulated/floor/plating/airless,/area/solar/fore)
|
||||
"arC" = (/obj/machinery/door/firedoor/border_only{dir = 2},/obj/machinery/door/airlock/maintenance{name = "Security Maintenance"; req_access = list(1)},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/obj/structure/cable/green{d1 = 4; d2 = 8; icon_state = "4-8"},/turf/simulated/floor/plating,/area/security/main)
|
||||
|
||||
Reference in New Issue
Block a user