Merge branch 'master' of https://github.com/tgstation/-tg-station into EmergencyResponseTeam

This commit is contained in:
Steelpoint
2015-01-07 12:10:11 +08:00
37 changed files with 3789 additions and 1829 deletions
+23 -7
View File
@@ -793,16 +793,29 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
/obj/item/seeds/replicapod/harvest(mob/user = usr) //now that one is fun -- Urist
var/obj/machinery/hydroponics/parent = loc
var/make_podman = 0
if(ckey && config.revival_pod_plants)
for(var/mob/M in player_list)
if(M.ckey == ckey && M.stat == 2 && !M.suiciding)
var/ckey_holder = null
if(config.revival_pod_plants)
if(ckey)
for(var/mob/M in player_list)
if(istype(M, /mob/dead/observer))
var/mob/dead/observer/O = M
if(O.can_reenter_corpse)
if(O.ckey == ckey && O.can_reenter_corpse)
make_podman = 1
break
else
if(M.ckey == ckey && M.stat == 2 && !M.suiciding)
make_podman = 1
break
else //If the player has ghosted from his corpse before blood was drawn, his ckey is no longer attached to the mob, so we need to match up the cloned player through the mind key
for(var/mob/M in player_list)
if(ckey(M.mind.key) == ckey(mind.key) && M.ckey && M.client && M.stat == 2 && !M.suiciding)
if(istype(M, /mob/dead/observer))
var/mob/dead/observer/O = M
if(!O.can_reenter_corpse)
break
make_podman = 1
ckey_holder = M.ckey
break
make_podman = 1
break
if(make_podman) //all conditions met!
var/mob/living/carbon/human/podman = new /mob/living/carbon/human(parent.loc)
@@ -811,7 +824,10 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
else
podman.real_name = "Pod Person [rand(0,999)]"
mind.transfer_to(podman)
podman.ckey = ckey
if(ckey)
podman.ckey = ckey
else
podman.ckey = ckey_holder
podman.gender = blood_gender
podman.faction |= factions
hardset_dna(podman,null,null,podman.real_name,blood_type,/datum/species/plant/pod,"#59CE00")//Discard SE's and UI's, podman cloning is inaccurate, and always make them a podman
+3 -1
View File
@@ -81,10 +81,11 @@
var/blood_gender = null
var/blood_type = null
var/factions = null
var/contains_sample = 0
/obj/item/seeds/replicapod/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/reagent_containers/syringe))
if(ckey == null)
if(!contains_sample)
for(var/datum/reagent/blood/bloodSample in W.reagents.reagent_list)
if(bloodSample.data["mind"] && bloodSample.data["cloneable"] == 1)
mind = bloodSample.data["mind"]
@@ -95,6 +96,7 @@
factions = bloodSample.data["factions"]
W.reagents.clear_reagents()
user << "You inject the contents of the syringe into the seeds."
contains_sample = 1
else
user << "The seeds reject the sample!"
else
@@ -314,3 +314,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
dat += data_core.get_manifest()
src << browse(dat, "window=manifest;size=370x420;can_close=1")
/mob/dead/observer/Topic(href, href_list)
if(href_list["follow"])
var/atom/movable/target = locate(href_list["follow"])
if((usr == src) && istype(target) && (target != src)) //for safety against href exploits
ManualFollow(target)
+2 -1
View File
@@ -17,4 +17,5 @@
. = src.say_dead(message)
/mob/dead/observer/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq)
src << message
src << "<a href=?src=\ref[src];follow=\ref[speaker]>(F)</a> [message]"