Fixes being unable to empty an emagged cloning pod via manual ejection. (#26373)

* Fixes being unable to empty an emag'd cloning pod via manual ejection.

* No longer keeps the brain, prevents people from getting back into a body which doesn't exist any more, lets people suffer in an emagged cloner a little longer

* Better prevention of re-entering body
This commit is contained in:
QualityVan
2017-04-27 10:25:45 -04:00
committed by Leo
parent 7375d97833
commit 3f602025ef
2 changed files with 10 additions and 4 deletions
+5 -3
View File
@@ -314,7 +314,7 @@
return
else
connected_message("Authorized Ejection")
SPEAK("An authorized ejection of [occupant.real_name] has occurred.")
SPEAK("An authorized ejection of [clonemind.name] has occurred.")
to_chat(user, "<span class='notice'>You force an emergency ejection. </span>")
go_out()
else
@@ -367,6 +367,8 @@
SPEAK("Critical error! Please contact a Thinktronic Systems \
technician, as your warranty may be affected.")
mess = TRUE
for(var/obj/item/O in unattached_flesh)
qdel(O)
icon_state = "pod_g"
if(occupant.mind != clonemind)
clonemind.transfer_to(occupant)
@@ -382,9 +384,9 @@
go_out()
/obj/machinery/clonepod/emp_act(severity)
if(prob(100/(severity*efficiency)))
if((occupant || mess) && prob(100/(severity*efficiency)))
connected_message(Gibberish("EMP-caused Accidental Ejection", 0))
SPEAK(Gibberish("Exposure to electromagnetic fields has caused the ejection of [occupant.real_name] prematurely." ,0))
SPEAK(Gibberish("Exposure to electromagnetic fields has caused the ejection of [clonemind.name] prematurely." ,0))
go_out()
..()
+5 -1
View File
@@ -24,7 +24,8 @@
if(!no_bodyparts)
if(no_organs)//so the organs don't get transfered inside the bodyparts we'll drop.
for(var/X in internal_organs)
qdel(X)
if(no_brain || !istype(X, /obj/item/organ/brain))
qdel(X)
else //we're going to drop all bodyparts except chest, so the only organs that needs spilling are those inside it.
for(var/X in internal_organs)
var/obj/item/organ/O = X
@@ -42,6 +43,9 @@
if(no_brain && istype(I, /obj/item/organ/brain))
qdel(I)
continue
if(no_organs && !istype(I, /obj/item/organ/brain))
qdel(I)
continue
I.Remove(src)
I.forceMove(get_turf(src))
I.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,3),5)