This commit is contained in:
Seris02
2020-01-27 08:33:38 +08:00
296 changed files with 16424 additions and 11376 deletions
@@ -148,8 +148,8 @@
/obj/machinery/chem_master/on_deconstruction()
var/atom/A = drop_location()
beaker.forceMove(A)
bottle.forceMove(A)
beaker?.forceMove(A)
bottle?.forceMove(A)
return ..()
/obj/machinery/chem_master/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
@@ -887,7 +887,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
/datum/reagent/consumable/ethanol/barefoot/on_mob_life(mob/living/carbon/M)
if(ishuman(M)) //Barefoot causes the imbiber to quickly regenerate brute trauma if they're not wearing shoes.
var/mob/living/carbon/human/H = M
if(!H.shoes)
if(!H.shoes || !(H.shoes.body_parts_covered & FEET))
H.adjustBruteLoss(-3, 0)
. = 1
return ..() || .
@@ -565,9 +565,16 @@
required_other = TRUE
/datum/chemical_reaction/slime/slimestop/on_reaction(datum/reagents/holder)
sleep(50)
var/obj/item/slime_extract/sepia/extract = holder.my_atom
var/turf/T = get_turf(holder.my_atom)
var/list/M = list(get_mob_by_key(holder.my_atom.fingerprintslast))
new /obj/effect/timestop(T, null, null, M)
new /obj/effect/timestop(T, null, null, null)
if(istype(extract))
if(extract.Uses > 0)
var/mob/lastheld = get_mob_by_key(holder.my_atom.fingerprintslast)
if(lastheld && !lastheld.equip_to_slot_if_possible(extract, SLOT_HANDS, disable_warning = TRUE))
extract.forceMove(get_turf(lastheld))
..()
/datum/chemical_reaction/slime/slimecamera
@@ -186,6 +186,7 @@ GLOBAL_LIST_INIT(food_reagents, build_reagents_to_food()) //reagentid = related
var/datum/chemical_reaction/recipe = get_chemical_reaction(recipe_id)
if(!recipe)
info = "This recipe is illegible."
return
var/list/dat = list("<ul>")
for(var/rid in recipe.required_reagents)
var/datum/reagent/R = GLOB.chemical_reagents_list[rid]
+6 -4
View File
@@ -108,10 +108,12 @@
/obj/item/reagent_containers/proc/bartender_check(atom/target)
. = FALSE
if(target.CanPass(src, get_turf(src)) && thrownby && thrownby.actions)
for(var/datum/action/innate/drink_fling/D in thrownby.actions)
if(D.active)
return TRUE
var/turf/T = get_turf(src)
if(!T || target.CanPass(src, T) || !thrownby || !thrownby.actions)
return
for(var/datum/action/innate/drink_fling/D in thrownby.actions)
if(D.active)
return TRUE
/obj/item/reagent_containers/proc/ForceResetRotation()
transform = initial(transform)
@@ -8,7 +8,6 @@
resistance_flags = ACID_PROOF
container_HP = 2
/obj/item/reagent_containers/glass/attack(mob/M, mob/user, obj/target)
if(!canconsume(M, user))
return
@@ -22,13 +21,9 @@
if(istype(M))
if(user.a_intent == INTENT_HARM)
var/R
M.visible_message("<span class='danger'>[user] splashes the contents of [src] onto [M]!</span>", \
"<span class='userdanger'>[user] splashes the contents of [src] onto [M]!</span>")
if(reagents)
for(var/datum/reagent/A in reagents.reagent_list)
R += A.type + " ("
R += num2text(A.volume) + "),"
var/R = reagents?.log_list()
if(isturf(target) && reagents.reagent_list.len && thrownby)
log_combat(thrownby, target, "splashed (thrown) [english_list(reagents.reagent_list)]")
message_admins("[ADMIN_LOOKUPFLW(thrownby)] splashed (thrown) [english_list(reagents.reagent_list)] on [target] at [ADMIN_VERBOSEJMP(target)].")
@@ -106,7 +101,6 @@
return
..()
/obj/item/reagent_containers/glass/beaker
name = "beaker"
desc = "A beaker. It can hold up to 60 units. Unable to withstand extreme pHes."
@@ -159,8 +153,37 @@
/obj/item/reagent_containers/glass/beaker/jar
name = "honey jar"
desc = "A jar for honey. It can hold up to 60 units of sweet delight. Unable to withstand reagents of an extreme pH."
icon = 'icons/obj/chemical.dmi'
icon_state = "vapour"
icon_state = "honey"
/obj/item/reagent_containers/glass/beaker/glass_dish
name = "glass dish"
desc = "A tiny glass dish. It can hold up to 3 units. Unable to withstand reagents of an extreme pH."
materials = list(MAT_GLASS=500)
icon_state = "glass_disk"
possible_transfer_amounts = list(0.1,0.5,0.75,1,2,3)
volume = 3
/obj/item/reagent_containers/glass/beaker/flask/large
name = "large flask"
desc = "A large flask. It can hold up to 80 units. Unable to withstand reagents of an extreme pH."
materials = list(MAT_GLASS=2500)
icon_state = "flasklarge"
volume = 80
/obj/item/reagent_containers/glass/beaker/flask
name = "small flask"
desc = "A small flask. It can hold up to 40 units. Unable to withstand reagents of an extreme pH."
materials = list(MAT_GLASS=1000)
icon_state = "flasksmall"
volume = 40
/obj/item/reagent_containers/glass/beaker/flask/spouty
name = "flask with spout"
desc = "A flask with a spout! It can hold up to 120 units. Unable to withstand reagents of an extreme pH."
materials = list(MAT_GLASS=2500)
icon_state = "flaskspouty"
possible_transfer_amounts = list(1,2,3,4,5,10,15,20,25,30,50,100,120)
volume = 120
/obj/item/reagent_containers/glass/beaker/large
name = "large beaker"
@@ -362,30 +362,14 @@
return
/obj/item/hypospray/mkii/afterattack(atom/target, mob/user, proximity)
if(!vial)
if(!vial || !proximity || !isliving(target))
return
var/mob/living/L = target
if(!L.reagents || !L.can_inject(user, TRUE, user.zone_selected, penetrates))
return
if(!proximity)
return
if(!ismob(target))
return
var/mob/living/L
if(isliving(target))
L = target
if(!penetrates && !L.can_inject(user, 1)) //This check appears another four times, since otherwise the penetrating sprays will break in do_mob.
return
if(!L && !target.is_injectable()) //only checks on non-living mobs, due to how can_inject() handles
to_chat(user, "<span class='warning'>You cannot directly fill [target]!</span>")
return
if(target.reagents.total_volume >= target.reagents.maximum_volume)
to_chat(user, "<span class='notice'>[target] is full.</span>")
return
if(ishuman(L))
if(iscarbon(L))
var/obj/item/bodypart/affecting = L.get_bodypart(check_zone(user.zone_selected))
if(!affecting)
to_chat(user, "<span class='warning'>The limb is missing!</span>")
@@ -394,84 +378,40 @@
to_chat(user, "<span class='notice'>Medicine won't work on a robotic limb!</span>")
return
//Always log attemped injections for admins
var/contained = vial.reagents.log_list()
log_combat(user, L, "attemped to inject", src, addition="which had [contained]")
//Always log attemped injections for admins
if(vial != null)
switch(mode)
if(HYPO_INJECT)
if(L) //living mob
if(L != user)
L.visible_message("<span class='danger'>[user] is trying to inject [L] with [src]!</span>", \
"<span class='userdanger'>[user] is trying to inject [L] with [src]!</span>")
if(!do_mob(user, L, inject_wait))
return
if(!penetrates && !L.can_inject(user, 1))
return
if(!vial.reagents.total_volume)
return
if(L.reagents.total_volume >= L.reagents.maximum_volume)
return
L.visible_message("<span class='danger'>[user] uses the [src] on [L]!</span>", \
"<span class='userdanger'>[user] uses the [src] on [L]!</span>")
else
if(!do_mob(user, L, inject_self))
return
if(!penetrates && !L.can_inject(user, 1))
return
if(!vial.reagents.total_volume)
return
if(L.reagents.total_volume >= L.reagents.maximum_volume)
return
log_attack("<font color='red'>[user.name] ([user.ckey]) applied [src] to [L.name] ([L.ckey]), which had [contained] (INTENT: [uppertext(user.a_intent)]) (MODE: [src.mode])</font>")
L.log_message("<font color='orange'>applied [src] to themselves ([contained]).</font>", INDIVIDUAL_ATTACK_LOG)
var/fraction = min(vial.amount_per_transfer_from_this/vial.reagents.total_volume, 1)
vial.reagents.reaction(L, INJECT, fraction)
vial.reagents.trans_to(target, vial.amount_per_transfer_from_this)
if(vial.amount_per_transfer_from_this >= 15)
playsound(loc,'sound/items/hypospray_long.ogg',50, 1, -1)
if(vial.amount_per_transfer_from_this < 15)
playsound(loc, pick('sound/items/hypospray.ogg','sound/items/hypospray2.ogg'), 50, 1, -1)
to_chat(user, "<span class='notice'>You inject [vial.amount_per_transfer_from_this] units of the solution. The hypospray's cartridge now contains [vial.reagents.total_volume] units.</span>")
if(HYPO_SPRAY)
if(L) //living mob
if(L != user)
L.visible_message("<span class='danger'>[user] is trying to spray [L] with [src]!</span>", \
"<span class='userdanger'>[user] is trying to spray [L] with [src]!</span>")
if(!do_mob(user, L, spray_wait))
return
if(!penetrates && !L.can_inject(user, 1))
return
if(!vial.reagents.total_volume)
return
if(L.reagents.total_volume >= L.reagents.maximum_volume)
return
L.visible_message("<span class='danger'>[user] uses the [src] on [L]!</span>", \
"<span class='userdanger'>[user] uses the [src] on [L]!</span>")
else
if(!do_mob(user, L, spray_self))
return
if(!penetrates && !L.can_inject(user, 1))
return
if(!vial.reagents.total_volume)
return
if(L.reagents.total_volume >= L.reagents.maximum_volume)
return
log_attack("<font color='red'>[user.name] ([user.ckey]) applied [src] to [L.name] ([L.ckey]), which had [contained] (INTENT: [uppertext(user.a_intent)]) (MODE: [src.mode])</font>")
L.log_message("<font color='orange'>applied [src] to themselves ([contained]).</font>", INDIVIDUAL_ATTACK_LOG)
var/fraction = min(vial.amount_per_transfer_from_this/vial.reagents.total_volume, 1)
vial.reagents.reaction(L, PATCH, fraction)
vial.reagents.trans_to(target, vial.amount_per_transfer_from_this)
if(vial.amount_per_transfer_from_this >= 15)
playsound(loc,'sound/items/hypospray_long.ogg',50, 1, -1)
if(vial.amount_per_transfer_from_this < 15)
playsound(loc, pick('sound/items/hypospray.ogg','sound/items/hypospray2.ogg'), 50, 1, -1)
to_chat(user, "<span class='notice'>You spray [vial.amount_per_transfer_from_this] units of the solution. The hypospray's cartridge now contains [vial.reagents.total_volume] units.</span>")
else
to_chat(user, "<span class='notice'>[src] doesn't work here!</span>")
if(!vial)
to_chat(user, "<span class='notice'>[src] doesn't have any vial installed!</span>")
return
if(!vial.reagents.total_volume)
to_chat(user, "<span class='notice'>[src]'s vial is empty!</span>")
return
var/fp_verb = mode == HYPO_SPRAY ? "spray" : "inject"
var/method = mode == HYPO_SPRAY ? TOUCH : INJECT
if(L != user)
L.visible_message("<span class='danger'>[user] is trying to [fp_verb] [L] with [src]!</span>", \
"<span class='userdanger'>[user] is trying to [fp_verb] you with [src]!</span>")
if(!do_mob(user, L, inject_wait, extra_checks = CALLBACK(L, /mob/living/proc/can_inject, user, FALSE, user.zone_selected, penetrates)))
return
if(!vial.reagents.total_volume)
return
log_attack("<font color='red'>[user.name] ([user.ckey]) applied [src] to [L.name] ([L.ckey]), which had [contained] (INTENT: [uppertext(user.a_intent)]) (MODE: [mode])</font>")
if(L != user)
L.visible_message("<span class='danger'>[user] uses the [src] on [L]!</span>", \
"<span class='userdanger'>[user] uses the [src] on you!</span>")
else
L.log_message("<font color='orange'>applied [src] to themselves ([contained]).</font>", INDIVIDUAL_ATTACK_LOG)
var/fraction = min(vial.amount_per_transfer_from_this/vial.reagents.total_volume, 1)
vial.reagents.reaction(L, method, fraction)
vial.reagents.trans_to(target, vial.amount_per_transfer_from_this)
var/long_sound = vial.amount_per_transfer_from_this >= 15
playsound(loc, long_sound ? 'sound/items/hypospray_long.ogg' : pick('sound/items/hypospray.ogg','sound/items/hypospray2.ogg'), 50, 1, -1)
to_chat(user, "<span class='notice'>You [fp_verb] [vial.amount_per_transfer_from_this] units of the solution. The hypospray's cartridge now contains [vial.reagents.total_volume] units.</span>")
/obj/item/hypospray/mkii/attack_self(mob/living/user)
if(user)
@@ -118,6 +118,7 @@
item_flags = NOBLUDGEON | NO_UNIFORM_REQUIRED //so it can be worn on the belt slot even with no uniform.
force = 1
w_class = WEIGHT_CLASS_NORMAL
mutantrace_variation = STYLE_DIGITIGRADE
attack_verb = list("whipped")
hitsound = 'sound/items/towelwhip.ogg'
volume = 10