Removes ventcrawl blenders (#15480)

This commit is contained in:
Sniblet
2023-01-29 12:32:25 +01:00
committed by GitHub
parent b0d4fc7cf9
commit e3a01fc8f7
2 changed files with 6 additions and 75 deletions
@@ -23,81 +23,6 @@
L.ventcrawl_layer = layer
. = ..()
/obj/machinery/atmospherics/binary/pump/Entered(atom/movable/AM)
. = ..()
Blend(AM, network2)
/obj/machinery/atmospherics/unary/vent_scrubber/Entered(atom/movable/AM)
. = ..()
Blend(AM, null)
/obj/machinery/atmospherics/unary/outlet_injector/Entered(atom/movable/AM)
. = ..()
Blend(AM, null)
//Blends a mob AM and outputs the contents via vents in pipe_network N
// If the network is not set, creates a local cloud
/obj/machinery/atmospherics/proc/Blend(atom/movable/AM, var/datum/pipe_network/N)
//If its not small or the device isnt enabled, it wont blend
if(!issmall(AM) || !use_power)
return FALSE
//Get the things we need to create the "output"
var/mob/living/L = AM
if(L.mob_size > MOB_TINY)
return
var/blood_color = "#A10808"
if(L.blood_color)
blood_color = L.blood_color
if(iscarbon(AM))
var/mob/living/carbon/C = AM
blood_color = C.species.blood_color
var/reagent_amount = L.mob_size * 2
//Blend the Mob
to_chat(AM, SPAN_DANGER("\The [src] blends you to a fine dust."))
L.death()
qdel(L)
//Output what´s left through the connected vents
if(N)
var/count = 0
for(var/V in N.normal_members)
CHECK_TICK
if(count > reagent_amount)
return TRUE
var/obj/machinery/atmospherics/unary/vent_pump/vent = V
if(istype(V, /obj/machinery/atmospherics/unary/vent_pump) && vent.loc && !vent.is_welded())
var/datum/reagents/R = new/datum/reagents(reagent_amount)
R.my_atom = vent
R.add_reagent(/singleton/reagent/blood, reagent_amount, list("blood_colour" = blood_color))
var/datum/effect/effect/system/smoke_spread/chem/smoke = new
smoke.show_log = 0 // This displays a log on creation
smoke.show_touch_log = 1 // This displays a log when a player is chemically affected
smoke.set_up(R, 3, 0, vent, 20)
playsound(vent.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
smoke.start()
qdel(R)
count++
else
var/datum/reagents/R = new/datum/reagents(reagent_amount)
R.my_atom = src
R.add_reagent(/singleton/reagent/blood, reagent_amount, list("blood_colour" = blood_color))
var/datum/effect/effect/system/smoke_spread/chem/smoke = new
smoke.show_log = 0 // This displays a log on creation
smoke.show_touch_log = 1 // This displays a log when a player is chemically affected
smoke.set_up(R, 3, 0, src, 20)
playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
smoke.start()
qdel(R)
return TRUE
/obj/machinery/atmospherics/relaymove(mob/living/user, direction)
if(user.loc != src || !(direction & initialize_directions)) //can't go in a way we aren't connecting to
return