Merge pull request #602 from Citadel-Station-13/upstream-merge-26373

[MIRROR] Fixes being unable to empty an emagged cloning pod via manual ejection.
This commit is contained in:
LetterJay
2017-05-02 11:14:14 -05:00
committed by GitHub
3 changed files with 41 additions and 7 deletions
+8 -6
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
@@ -342,7 +342,7 @@
if(mess) //Clean that mess and dump those gibs!
mess = FALSE
new /obj/effect/gibspawner/generic(loc)
new /obj/effect/gibspawner/generic(loc)
audible_message("<span class='italics'>You hear a splat.</span>")
icon_state = "pod_0"
return
@@ -355,7 +355,7 @@
to_chat(occupant, "<span class='notice'><b>There is a bright flash!</b><br><i>You feel like a new being.</i></span>")
occupant.flash_act()
var/turf/T = get_turf(src)
var/turf/T = get_turf(src)
occupant.forceMove(T)
icon_state = "pod_0"
occupant.domutcheck(1) //Waiting until they're out before possible monkeyizing. The 1 argument forces powers to manifest.
@@ -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)
@@ -375,16 +377,16 @@
to_chat(occupant, "<span class='warning'><b>Agony blazes across your consciousness as your body is torn apart.</b><br><i>Is this what dying is like? Yes it is.</i></span>")
playsound(src.loc, 'sound/machines/warning-buzzer.ogg', 50, 0)
occupant << sound('sound/hallucinations/veryfar_noise.ogg',0,1,50)
QDEL_IN(occupant, 40)
QDEL_IN(occupant, 40)
/obj/machinery/clonepod/relaymove(mob/user)
if(user.stat == CONSCIOUS)
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()
..()
+28
View File
@@ -0,0 +1,28 @@
diff a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm (rejected hunks)
@@ -343,7 +343,7 @@
if(mess) //Clean that mess and dump those gibs!
mess = FALSE
for(var/obj/A in contents)
- if(istype(A, /obj/item/organ) || istype(A, /obj/effect/decal/cleanable/blood/gibs))
+ if(istype(A, /obj/effect/decal/cleanable/blood/gibs))
A.forceMove(T)
audible_message("<span class='italics'>You hear a splat.</span>")
icon_state = "pod_0"
@@ -378,10 +378,13 @@
to_chat(occupant, "<span class='warning'><b>Agony blazes across your consciousness as your body is torn apart.</b><br><i>Is this what dying is like? Yes it is.</i></span>")
playsound(src.loc, 'sound/machines/warning-buzzer.ogg', 50, 0)
occupant << sound('sound/hallucinations/veryfar_noise.ogg',0,1,50)
- var/obj/item/organ/brain/B = occupant.getorganslot("brain")
- B.Remove(occupant)
- B.forceMove(src)
- occupant.gib(TRUE, TRUE, TRUE)
+ addtimer(CALLBACK(src, .proc/end_malfunction, occupant), 40)
+
+/obj/machinery/clonepod/proc/end_malfunction(mob/victim)
+ if(!istype(victim)) //Where the hell did they go?
+ return
+ victim.ghostize(FALSE)
+ victim.gib(TRUE, TRUE, TRUE)
/obj/machinery/clonepod/relaymove(mob/user)
if(user.stat == CONSCIOUS)
+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)