mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 04:26:03 +01:00
Merge pull request #6818 from Ergovisavi/more_pod_cloning
Some replica pod cloning fixes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user