The Tubes, They Wheel (#29268)

* Consolidates sanity for loading people into medbay machinery

* Adds conveyor_act()

* Can multitool set output tile for Cryo and Cloner

* Conveyorbay only works on lying subjects

* Cryobelt accepts non-lying targets if they have clone damage

* powerhouse.ogg

* Create powerhouse.ogg
This commit is contained in:
help-maint
2021-04-26 13:11:46 -03:00
committed by GitHub
parent 23bd823651
commit 2917764d01
7 changed files with 255 additions and 173 deletions

View File

@@ -893,3 +893,7 @@ its easier to just keep the beam vertical.
return 1 return 1
/atom/proc/setPersistenceAge() /atom/proc/setPersistenceAge()
return return
//Called when a conveyor belt is pointing into us and an atom is coming in.
/atom/proc/conveyor_act(var/atom/movable/AM, var/obj/machinery/conveyor/CB)
return

View File

@@ -168,43 +168,11 @@
return return
if(!Adjacent(user) || !user.Adjacent(src) || user.contents.Find(src)) // is the mob too far away from you, or are you too far away from the source if(!Adjacent(user) || !user.Adjacent(src) || user.contents.Find(src)) // is the mob too far away from you, or are you too far away from the source
return return
if(O.locked_to)
var/datum/locking_category/category = O.locked_to.get_lock_cat_for(O)
if(!istype(category, /datum/locking_category/buckle/bed/roller))
return
else if(O.anchored)
return
if(istype(O, /mob/living/simple_animal) || istype(O, /mob/living/silicon)) //animals and robutts dont fit
return
if(!ishigherbeing(user) && !isrobot(user)) //No ghosts or mice putting people into the scanner
return
if(occupant)
to_chat(user, "<span class='notice'>\The [src] is already occupied!</span>")
return
if(ismanifested(O))
to_chat(usr, "<span class='notice'> For some reason, the scanner is unable to read that person's genes.</span>")//to prevent a loophole that allows cultist to turn manifested ghosts into normal humans
return
if(isrobot(user))
var/mob/living/silicon/robot/robit = usr
if(!HAS_MODULE_QUIRK(robit, MODULE_CAN_HANDLE_MEDICAL))
to_chat(user, "<span class='warning'>You do not have the means to do this!</span>")
return
var/mob/living/L = O var/mob/living/L = O
if(!istype(L)) if(!istype(L))
return return
for(var/mob/living/carbon/slime/M in range(1,L))
if(M.Victim == L)
to_chat(usr, "[L.name] will not fit into the DNA Scanner because they have a slime latched onto their head.")
return
if(L == user)
visible_message("[user] climbs into \the [src].")
else
visible_message("[user] places [L] into \the [src].")
L.unlock_from() //We checked above that they can ONLY be buckled to a rollerbed to allow this to happen!
if(user.pulling == L)
user.stop_pulling()
put_in(L) put_in(L)
/obj/machinery/dna_scannernew/MouseDropFrom(over_object, src_location, var/turf/over_location, src_control, over_control, params) /obj/machinery/dna_scannernew/MouseDropFrom(over_object, src_location, var/turf/over_location, src_control, over_control, params)
@@ -254,29 +222,66 @@
var/obj/item/weapon/grab/G = item var/obj/item/weapon/grab/G = item
if (!ismob(G.affecting)) if (!ismob(G.affecting))
return return
if (src.occupant) if(put_in(G.affecting, user))
to_chat(user, "<span class='notice'><B>The scanner is already occupied!</B></span>") qdel(G)
return
/*if (G.affecting.abiotic())
to_chat(user, "<span class='notice'><B>Subject cannot have abiotic items on.</B></span>")
return*/
if(G.affecting.locked_to)
return
put_in(G.affecting)
src.add_fingerprint(user)
qdel(G)
return 1 return 1
return ..() return ..()
/obj/machinery/dna_scannernew/proc/put_in(var/mob/M) /obj/machinery/dna_scannernew/proc/put_in(var/mob/M, var/mob/user)
if(!istype(M))
return FALSE
if(M.locked_to)
var/datum/locking_category/category = M.locked_to.get_lock_cat_for(M)
if(!istype(category, /datum/locking_category/buckle/bed/roller))
return FALSE
else if(M.anchored)
return FALSE
if(ismanifested(M) || !iscarbon(M))
if(user)
to_chat(user, "<span class='notice'>For some reason, the scanner is unable to read that person's genes.</span>")
return
if(user)
if(!ishigherbeing(user) && !isrobot(user)) //No ghosts or mice putting people into the scanner
return
if(isrobot(user))
var/mob/living/silicon/robot/robit = user
if(!HAS_MODULE_QUIRK(robit, MODULE_CAN_HANDLE_MEDICAL))
to_chat(user, "<span class='warning'>You do not have the means to do this!</span>")
return
for(var/mob/living/carbon/slime/S in range(1,M))
if(S.Victim == M)
if(user)
to_chat(user, "<span class='warning'>[M] will not fit into \the [src] because they have a slime latched onto their head.</span>")
return
if(occupant)
if(user)
to_chat(user, "<span class='notice'>\The [src] is already occupied!</span>")
return FALSE
if(user && user.pulling == M)
user.stop_pulling()
if(user)
add_fingerprint(user)
M.unlock_from() //We checked above that they can ONLY be buckled to a rollerbed to allow this to happen!
M.forceMove(src) M.forceMove(src)
M.reset_view() M.reset_view()
src.occupant = M src.occupant = M
src.icon_state = "scanner_1" src.icon_state = "scanner_1"
if(connected) if(connected)
nanomanager.update_uis(connected) nanomanager.update_uis(connected)
if(user)
if(M == user)
visible_message("[user] climbs into \the [src].")
else
visible_message("[user] places [M] into \the [src].")
else
visible_message("\the [M] is placed into \the [src].")
// search for ghosts, if the corpse is empty and the scanner is connected to a cloner // search for ghosts, if the corpse is empty and the scanner is connected to a cloner
for(dir in cardinal) for(dir in cardinal)
var/obj/machinery/computer/cloning/C = locate(/obj/machinery/computer/cloning) in get_step(src, dir) var/obj/machinery/computer/cloning/C = locate(/obj/machinery/computer/cloning) in get_step(src, dir)
@@ -293,7 +298,15 @@
(Verbs -> Ghost -> Re-enter corpse, or <a href='?src=\ref[ghost];reentercorpse=1'>click here!</a>)</span>") (Verbs -> Ghost -> Re-enter corpse, or <a href='?src=\ref[ghost];reentercorpse=1'>click here!</a>)</span>")
break break
break break
return return TRUE
/obj/machinery/dna_scannernew/conveyor_act(var/atom/movable/AM, var/obj/machinery/conveyor/CB)
if(isliving(AM))
var/mob/living/L = AM
if(L.lying)
if(put_in(L))
return TRUE
return FALSE
#define DNASCANNER_MESSAGE_INTERVAL 1 SECONDS #define DNASCANNER_MESSAGE_INTERVAL 1 SECONDS

View File

@@ -167,47 +167,43 @@
add_fingerprint(usr) add_fingerprint(usr)
return return
/obj/machinery/sleeper/MouseDropTo(atom/movable/O as mob|obj, mob/user as mob) /obj/machinery/sleeper/proc/put_mob(mob/living/L, mob/user)
if(!ismob(O)) //mobs only
return
if(O.loc == user || !isturf(O.loc) || !isturf(user.loc) || !user.Adjacent(O)) //no you can't pull things out of your ass
return
if(user.incapacitated() || user.lying) //are you cuffed, dying, lying, stunned or other
return
if(!Adjacent(user) || !user.Adjacent(src) || user.contents.Find(src)) // is the mob too far away from you, or are you too far away from the source
return
if(O.locked_to)
var/datum/locking_category/category = O.locked_to.get_lock_cat_for(O)
if(!istype(category, /datum/locking_category/buckle/bed/roller))
return
else if(O.anchored)
return
if(istype(O, /mob/living/simple_animal) || istype(O, /mob/living/silicon)) //animals and robutts dont fit
return
if(!ishigherbeing(user) && !isrobot(user)) //No ghosts or mice putting people into the sleeper
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
if(occupant)
to_chat(user, "<span class='notice'>\The [src] is already occupied!</span>")
return
if(isrobot(user))
var/mob/living/silicon/robot/robit = usr
if(!HAS_MODULE_QUIRK(robit, MODULE_CAN_HANDLE_MEDICAL))
to_chat(user, "<span class='warning'>You do not have the means to do this!</span>")
return
var/mob/living/L = O
if(!istype(L)) if(!istype(L))
return return
for(var/mob/living/carbon/slime/M in range(1,L)) if(istype(L, /mob/living/simple_animal) || istype(L, /mob/living/silicon)) //animals and robutts dont fit
if(M.Victim == L) return
to_chat(usr, "[L.name] will not fit into the sleeper because they have a slime latched onto their head.")
if(L.locked_to)
var/datum/locking_category/category = L.locked_to.get_lock_cat_for(L)
if(!istype(category, /datum/locking_category/buckle/bed/roller))
return
else if(L.anchored)
return
if(user)
if(!ishigherbeing(user) && !isrobot(user)) //No ghosts or mice putting people into the sleeper
return
if(isrobot(user))
var/mob/living/silicon/robot/robit = usr
if(!HAS_MODULE_QUIRK(robit, MODULE_CAN_HANDLE_MEDICAL))
to_chat(user, "<span class='warning'>You do not have the means to do this!</span>")
return
for(var/mob/living/carbon/slime/S in range(1,L))
if(S.Victim == L)
if(user)
to_chat(user, "<span class='warning'>[L] will not fit into \the [src] because they have a slime latched onto their head.</span>")
return return
if(L == user) if(occupant)
visible_message("[user] climbs into \the [src].") if(user)
else to_chat(user, "<span class='notice'>\The [src] is already occupied!</span>")
visible_message("[user] places [L.name] into \the [src].") return
if(user && user.pulling == L)
user.stop_pulling()
if(user)
add_fingerprint(user)
L.unlock_from() //We checked above that they can ONLY be buckled to a rollerbed to allow this to happen! L.unlock_from() //We checked above that they can ONLY be buckled to a rollerbed to allow this to happen!
L.forceMove(src) L.forceMove(src)
L.reset_view() L.reset_view()
@@ -219,12 +215,35 @@
add_fingerprint(user) add_fingerprint(user)
if(!(stat & (BROKEN|NOPOWER))) if(!(stat & (BROKEN|NOPOWER)))
set_light(light_range_on, light_power_on) set_light(light_range_on, light_power_on)
sedativeblock = TRUE
update_icon() update_icon()
if(user)
if(L == user)
visible_message("[user] climbs into \the [src].")
else
visible_message("[user] places \the [L] into \the [src].")
else
visible_message("\the [L] is placed into \the [src].")
sedativeblock = TRUE
sleep(drag_delay) sleep(drag_delay)
sedativeblock = FALSE sedativeblock = FALSE
return
/obj/machinery/sleeper/MouseDropTo(atom/movable/O as mob|obj, mob/user as mob)
if(!ismob(O)) //mobs only
return
if(O.loc == user || !isturf(O.loc) || !isturf(user.loc) || !user.Adjacent(O)) //no you can't pull things out of your ass
return
if(user.incapacitated() || user.lying) //are you cuffed, dying, lying, stunned or other
return
if(!Adjacent(user) || !user.Adjacent(src) || user.contents.Find(src)) // is the mob too far away from you, or are you too far away from the source
return
var/mob/living/L = O
if(!istype(L))
return
put_mob(L, user)
/obj/machinery/sleeper/MouseDropFrom(over_object, src_location, var/turf/over_location, src_control, over_control, params) /obj/machinery/sleeper/MouseDropFrom(over_object, src_location, var/turf/over_location, src_control, over_control, params)
if(!ishigherbeing(usr) && !isrobot(usr) || usr.incapacitated() || usr.lying) if(!ishigherbeing(usr) && !isrobot(usr) || usr.incapacitated() || usr.lying)
@@ -255,6 +274,15 @@
visible_message("[usr] removes [occupant.name] from \the [src].") visible_message("[usr] removes [occupant.name] from \the [src].")
go_out(over_location, ejector = usr) go_out(over_location, ejector = usr)
/obj/machinery/sleeper/conveyor_act(var/atom/movable/AM, var/obj/machinery/conveyor/CB)
if(isliving(AM))
var/mob/living/L = AM
if(L.lying)
if(put_mob(L))
return TRUE
return FALSE
/obj/machinery/sleeper/allow_drop() /obj/machinery/sleeper/allow_drop()
return FALSE return FALSE
@@ -296,25 +324,9 @@
visible_message("[user] places [tar_grab.affecting.name] into \the [src].") visible_message("[user] places [tar_grab.affecting.name] into \the [src].")
var/mob/tar_mob = tar_grab.affecting var/mob/tar_mob = tar_grab.affecting
if(!isliving(tar_mob) || tar_mob.locked_to) if(!isliving(tar_mob))
return return
tar_mob.forceMove(src) put_mob(tar_mob, user)
tar_mob.reset_view()
occupant = tar_mob
to_chat(tar_mob, "<span class='notice'><b>You feel an anaesthetising air surround you. You go numb as your senses turn inward.</b></span>")
process()
for(var/obj/tar_obj in src)
tar_obj.forceMove(loc)
add_fingerprint(user)
qdel(tar_grab)
if(!(stat & (BROKEN|NOPOWER)))
set_light(light_range_on, light_power_on)
update_icon()
sedativeblock = TRUE
spawn(drag_delay)
sedativeblock = FALSE
return
/obj/machinery/sleeper/attack_hand(mob/user) /obj/machinery/sleeper/attack_hand(mob/user)
if(!isobserver(user) && (user.loc == src || (!Adjacent(user)&&!issilicon(user)) || user.incapacitated())) if(!isobserver(user) && (user.loc == src || (!Adjacent(user)&&!issilicon(user)) || user.incapacitated()))

View File

@@ -27,6 +27,8 @@ var/global/list/cryo_health_indicator = list( "full" = image("icon" = 'icons/obj
var/current_heat_capacity = 50 var/current_heat_capacity = 50
var/running_bob_animation = 0 // This is used to prevent threads from building up if update_icons is called multiple times var/running_bob_animation = 0 // This is used to prevent threads from building up if update_icons is called multiple times
var/output_dir //Which direction to try to place our patients onto, should they eject naturally.
machine_flags = SCREWTOGGLE | CROWDESTROY machine_flags = SCREWTOGGLE | CROWDESTROY
light_color = LIGHT_COLOR_HALOGEN light_color = LIGHT_COLOR_HALOGEN
@@ -73,51 +75,17 @@ var/global/list/cryo_health_indicator = list( "full" = image("icon" = 'icons/obj
..() ..()
/obj/machinery/atmospherics/unary/cryo_cell/MouseDropTo(atom/movable/O as mob|obj, mob/user as mob) /obj/machinery/atmospherics/unary/cryo_cell/MouseDropTo(atom/movable/O as mob|obj, mob/user as mob)
if(!ismob(O))
return
if(O.loc == user || !isturf(O.loc) || !isturf(user.loc) || !user.Adjacent(O)) //no you can't pull things out of your ass if(O.loc == user || !isturf(O.loc) || !isturf(user.loc) || !user.Adjacent(O)) //no you can't pull things out of your ass
return return
if(user.incapacitated() || user.lying) //are you cuffed, dying, lying, stunned or other if(user.incapacitated() || user.lying) //are you cuffed, dying, lying, stunned or other
return return
if(!Adjacent(user) || !user.Adjacent(src) || user.contents.Find(src)) // is the mob too far away from you, or are you too far away from the source if(!Adjacent(user) || !user.Adjacent(src) || user.contents.Find(src)) // is the mob too far away from you, or are you too far away from the source
return return
if(O.locked_to)
var/datum/locking_category/category = O.locked_to.get_lock_cat_for(O)
if(!istype(category, /datum/locking_category/buckle/bed/roller))
return
else if(O.anchored)
return
if(issilicon(O)) //robutts dont fit
return
if(!ishigherbeing(user) && !isrobot(user)) //No ghosts or mice putting people into the sleeper
return
if(occupant)
to_chat(user, "<span class='bnotice'>The cryo cell is already occupied!</span>")
return
if(panel_open)
to_chat(usr, "<span class='bnotice'>Close the maintenance panel first.</span>")
return
if(isrobot(user))
var/mob/living/silicon/robot/robit = usr
if(!HAS_MODULE_QUIRK(robit, MODULE_CAN_HANDLE_MEDICAL))
to_chat(user, "<span class='warning'>You do not have the means to do this!</span>")
return
var/mob/living/L = O var/mob/living/L = O
if(!istype(L)) if(!istype(L))
return return
for(var/mob/living/carbon/slime/M in range(1,L)) put_mob(L, user)
if(M.Victim == L)
to_chat(usr, "[L.name] will not fit into the cryo cell because they have a slime latched onto their head.")
return
L.unlock_from() //We checked above that they can ONLY be buckled to a rollerbed to allow this to happen!
if(put_mob(L))
if(L == user)
visible_message("[user] climbs into \the [src].")
else
visible_message("[user] puts [L.name] into \the [src].")
if(user.pulling == L)
user.pulling = null
/obj/machinery/atmospherics/unary/cryo_cell/MouseDropFrom(over_object, src_location, var/turf/over_location, src_control, over_control, params) /obj/machinery/atmospherics/unary/cryo_cell/MouseDropFrom(over_object, src_location, var/turf/over_location, src_control, over_control, params)
if(!ishigherbeing(usr) && !isrobot(usr) || occupant == usr || usr.incapacitated() || usr.lying) if(!ishigherbeing(usr) && !isrobot(usr) || occupant == usr || usr.incapacitated() || usr.lying)
@@ -362,7 +330,10 @@ var/global/list/cryo_health_indicator = list( "full" = image("icon" = 'icons/obj
investigation_log(I_CHEMS, "was loaded with \a [G] by [key_name(user)], containing [G.reagents.get_reagent_ids(1)]") investigation_log(I_CHEMS, "was loaded with \a [G] by [key_name(user)], containing [G.reagents.get_reagent_ids(1)]")
update_icon() update_icon()
if(ismultitool(G) && Adjacent(user))
output_dir = get_dir(src, user)
to_chat(user, "<span class='notice'>[bicon(src)]Output location set.</span>")
return
if(G.is_wrench(user))//FUCK YOU PARENT, YOU AREN'T MY REAL DAD if(G.is_wrench(user))//FUCK YOU PARENT, YOU AREN'T MY REAL DAD
return return
if(G.is_screwdriver(user)) if(G.is_screwdriver(user))
@@ -376,17 +347,10 @@ var/global/list/cryo_health_indicator = list( "full" = image("icon" = 'icons/obj
interact(user) interact(user)
return 1 return 1
if(istype(G, /obj/item/weapon/grab)) if(istype(G, /obj/item/weapon/grab))
if(panel_open)
to_chat(user, "<span class='bnotice'>Close the maintenance panel first.</span>")
return
if(!ismob(G:affecting)) if(!ismob(G:affecting))
return return
for(var/mob/living/carbon/slime/M in range(1,G:affecting))
if(M.Victim == G:affecting)
to_chat(usr, "[G:affecting:name] will not fit into the cryo because they have a slime latched onto their head.")
return
var/mob/M = G:affecting var/mob/M = G:affecting
if(put_mob(M)) if(put_mob(M, user))
qdel(G) qdel(G)
G = null G = null
updateUsrDialog() updateUsrDialog()
@@ -541,9 +505,11 @@ var/global/list/cryo_health_indicator = list( "full" = image("icon" = 'icons/obj
//expel_gas.temperature = T20C // Lets expel hot gas and see if that helps people not die as they are removed //expel_gas.temperature = T20C // Lets expel hot gas and see if that helps people not die as they are removed
//loc.assume_air(expel_gas) //loc.assume_air(expel_gas)
/obj/machinery/atmospherics/unary/cryo_cell/proc/go_out(var/exit = src.loc, var/ejector) /obj/machinery/atmospherics/unary/cryo_cell/proc/go_out(var/exit, var/ejector)
if(!occupant || ejecting) if(!occupant || ejecting)
return 0 return 0
if(!exit)
exit = output_turf()
if (occupant.bodytemperature > T0C+31) if (occupant.bodytemperature > T0C+31)
boot_contents(exit, FALSE, ejector) //No temperature regulation cycle required boot_contents(exit, FALSE, ejector) //No temperature regulation cycle required
else else
@@ -582,26 +548,59 @@ var/global/list/cryo_health_indicator = list( "full" = image("icon" = 'icons/obj
nanomanager.update_uis(src) nanomanager.update_uis(src)
/obj/machinery/atmospherics/unary/cryo_cell/proc/put_mob(mob/living/M as mob) /obj/machinery/atmospherics/unary/cryo_cell/proc/put_mob(mob/living/M as mob, mob/living/user)
if (!istype(M)) if(!istype(M))
to_chat(usr, "<span class='danger'>The cryo cell cannot handle such a lifeform!</span>") if(user)
return to_chat(user, "<span class='danger'>The cryo cell cannot handle such a lifeform!</span>")
return FALSE
if(M.size > SIZE_NORMAL) if(M.size > SIZE_NORMAL)
to_chat(usr, "<span class='danger'>\The [src] cannot fit such a large lifeform!</span>") if(user)
return to_chat(user, "<span class='danger'>\The [src] cannot fit such a large lifeform!</span>")
if (occupant) return FALSE
to_chat(usr, "<span class='danger'>The cryo cell is already occupied!</span>") if(issilicon(M)) //robutts dont fit
return return FALSE
/*if (M.abiotic())
to_chat(usr, "<span class='warning'>Subject may not have abiotic items on.</span>")
return*/
if(M.locked_to) if(M.locked_to)
M.unlock_from() var/datum/locking_category/category = M.locked_to.get_lock_cat_for(M)
if(!istype(category, /datum/locking_category/buckle/bed/roller))
return FALSE
else if(M.anchored)
return FALSE
if(user)
if(!ishigherbeing(user) && !isrobot(user)) //No ghosts or mice putting people into the sleeper
return
if(isrobot(user))
var/mob/living/silicon/robot/robit = usr
if(!HAS_MODULE_QUIRK(robit, MODULE_CAN_HANDLE_MEDICAL))
to_chat(user, "<span class='warning'>You do not have the means to do this!</span>")
return FALSE
for(var/mob/living/carbon/slime/S in range(1,M))
if(S.Victim == M)
if(user)
to_chat(user, "<span class='warning'>[M.name] will not fit into the cryo cell because they have a slime latched onto their head.</span>")
return FALSE
if (occupant)
if(user)
to_chat(user, "<span class='danger'>The cryo cell is already occupied!</span>")
return FALSE
if(panel_open)
if(user)
to_chat(user, "<span class='bnotice'>Close the maintenance panel first.</span>")
return FALSE
if(!node1) if(!node1)
to_chat(usr, "<span class='warning'>The cell is not correctly connected to its pipe network!</span>") if(user)
return to_chat(user, "<span class='warning'>The cell is not correctly connected to its pipe network!</span>")
if(usr.pulling == M) return FALSE
usr.stop_pulling()
if(M.locked_to)
M.unlock_from() //We checked above that this can only happen if they're locked to a rollerbed.
if(user && user.pulling == M)
user.stop_pulling()
if(user)
add_fingerprint(user)
M.stop_pulling() M.stop_pulling()
M.forceMove(src) M.forceMove(src)
M.reset_view() M.reset_view()
@@ -610,12 +609,18 @@ var/global/list/cryo_health_indicator = list( "full" = image("icon" = 'icons/obj
occupant = M occupant = M
for(var/obj/item/I in M.held_items) for(var/obj/item/I in M.held_items)
M.drop_item(I) // to avoid visual fuckery bobing. Doesn't do anything to items with cant_drop to avoid magic healing tube abuse. M.drop_item(I) // to avoid visual fuckery bobing. Doesn't do anything to items with cant_drop to avoid magic healing tube abuse.
//M.metabslow = 1
add_fingerprint(usr)
update_icon() update_icon()
nanomanager.update_uis(src) nanomanager.update_uis(src)
M.ExtinguishMob() M.ExtinguishMob()
return 1
if(user)
if(M == user)
visible_message("[user] climbs into \the [src].")
else
visible_message("[user] places [M] into \the [src].")
else
visible_message("\the [M] is placed into \the [src].")
return TRUE
/obj/machinery/atmospherics/unary/cryo_cell/verb/move_eject() /obj/machinery/atmospherics/unary/cryo_cell/verb/move_eject()
set name = "Eject occupant" set name = "Eject occupant"
@@ -692,6 +697,23 @@ var/global/list/cryo_health_indicator = list( "full" = image("icon" = 'icons/obj
detach() detach()
add_fingerprint(user) add_fingerprint(user)
/obj/machinery/atmospherics/unary/cryo_cell/proc/output_turf()
if(!output_dir || !isturf(loc))
return loc
var/turf/T = get_step(get_turf(src), output_dir)
if(!T || is_blocked_turf(T))
return loc
return T
/obj/machinery/atmospherics/unary/cryo_cell/conveyor_act(var/atom/movable/AM, var/obj/machinery/conveyor/CB)
if(isliving(AM))
var/mob/living/L = AM
if(L.lying || L.getCloneLoss())
if(put_mob(L))
return TRUE
return FALSE
/datum/data/function/proc/reset() /datum/data/function/proc/reset()
return return

View File

@@ -28,6 +28,7 @@
id_tag = "clone_pod" id_tag = "clone_pod"
var/upgraded = 0 //if fully upgraded with T4 components, it will drastically improve and allow for some stuff var/upgraded = 0 //if fully upgraded with T4 components, it will drastically improve and allow for some stuff
var/obj/machinery/computer/cloning/cloning_computer = null var/obj/machinery/computer/cloning/cloning_computer = null
var/output_dir //Which direction to try to place our patients onto, should they eject naturally.
machine_flags = EMAGGABLE | SCREWTOGGLE | CROWDESTROY | MULTITOOL_MENU machine_flags = EMAGGABLE | SCREWTOGGLE | CROWDESTROY | MULTITOOL_MENU
@@ -41,7 +42,7 @@
biomass = CLONE_BIOMASS // * 3 - N3X biomass = CLONE_BIOMASS // * 3 - N3X
/obj/machinery/cloning/clonepod/multitool_menu(var/mob/user, var/obj/item/device/multitool/P) /obj/machinery/cloning/clonepod/multitool_menu(var/mob/user, var/obj/item/device/multitool/P)
return "" return "(<a href='?src=\ref[src];set_output_dir=1'>Set Output Direction</a>)"
/******************************************************************** /********************************************************************
** Adding Stock Parts to VV so preconstructed shit has its candy ** ** Adding Stock Parts to VV so preconstructed shit has its candy **
@@ -416,14 +417,17 @@
add_fingerprint(usr) add_fingerprint(usr)
return return
/obj/machinery/cloning/clonepod/proc/go_out(var/exit = loc) /obj/machinery/cloning/clonepod/proc/go_out(var/exit)
if (locked) if (locked)
return return
if(!exit)
exit = output_turf()
if (mess) //Clean that mess and dump those gibs! if (mess) //Clean that mess and dump those gibs!
mess = FALSE mess = FALSE
working = FALSE //NOW we're done. working = FALSE //NOW we're done.
gibs(loc) gibs(exit)
icon_state = "pod_0" icon_state = "pod_0"
return return
@@ -434,6 +438,9 @@
occupant.client.eye = occupant.client.mob occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE occupant.client.perspective = MOB_PERSPECTIVE
occupant.forceMove(exit) occupant.forceMove(exit)
var/obj/machinery/conveyor/C = locate() in exit
if(C && C.operating != 0)
occupant << sound('sound/ambience/powerhouse.ogg') //the ride begins
icon_state = "pod_0" icon_state = "pod_0"
eject_wait = FALSE //If it's still set somehow. eject_wait = FALSE //If it's still set somehow.
//do early ejection damage //do early ejection damage
@@ -577,6 +584,25 @@
locked = FALSE locked = FALSE
go_out() go_out()
/obj/machinery/cloning/clonepod/proc/output_turf()
if(!output_dir || !isturf(loc))
return loc
var/turf/T = get_step(get_turf(src), output_dir)
if(!T || is_blocked_turf(T))
return loc
return T
/obj/machinery/cloning/clonepod/Topic(href,href_list)
if(..())
return
if(href_list["set_output_dir"])
if(!Adjacent(usr))
to_chat(usr, "<span class='warning'>Cannot set output location: Out of range.</span>")
return 1
output_dir = get_dir(src, usr)
to_chat(usr, "<span class='notice'>[bicon(src)]Output location set.</span>")
/* /*
* Diskette Box * Diskette Box
*/ */

View File

@@ -247,9 +247,14 @@
for(var/atom/movable/A in affecting) for(var/atom/movable/A in affecting)
if(!A.anchored) if(!A.anchored)
if(A.loc == src.loc) // prevents the object from being affected if it's not currently here. if(A.loc == src.loc) // prevents the object from being affected if it's not currently here.
A.set_glide_size(DELAY2GLIDESIZE(SS_WAIT_FAST_MACHINERY)) for(var/atom/dest in get_step(src, movedir)) //Should/can this be optimized to not check ALL atoms?
step(A,movedir) if(dest.conveyor_act(A, src))
items_moved++ items_moved++
break
if(A && A.loc == src.loc) //Check that our location didn't check from conveyor_acting on machinery.
A.set_glide_size(DELAY2GLIDESIZE(SS_WAIT_FAST_MACHINERY))
step(A,movedir)
items_moved++
if(items_moved >= max_moved) if(items_moved >= max_moved)
break break

Binary file not shown.