diff --git a/code/game/machinery/podmen.dm b/code/game/machinery/podmen.dm index abf5c52aa81..9b8aab80e76 100644 --- a/code/game/machinery/podmen.dm +++ b/code/game/machinery/podmen.dm @@ -23,6 +23,8 @@ Growing it to term with nothing injected will grab a ghost from the observers. * var/realName = null var/mob/living/carbon/human/source //Donor of blood, if any. gender = MALE + var/obj/machinery/hydroponics/parent + var/found_player = 0 /obj/item/seeds/replicapod/attackby(obj/item/weapon/W as obj, mob/user as mob) @@ -64,49 +66,58 @@ Growing it to term with nothing injected will grab a ghost from the observers. * /obj/item/seeds/replicapod/harvest(mob/user = usr) var/obj/machinery/hydroponics/parent = loc - var/mob/ghost - var/list/candidates = list() + var/found_player = 0 - user.visible_message("\blue You carefully begin to open the pod...","[user] carefully begins to open the pod...") + user.visible_message("\blue [user] carefully begins to open the pod...","\blue You carefully begin to open the pod...") //If a sample is injected (and revival is allowed) the plant will be controlled by the original donor. - if(source && source.mind && source.ckey && config.revival_pod_plants) - ghost = source + if(source && source.stat == 2 && source.client && source.ckey && config.revival_pod_plants) + transfer_personality(source.client) else // If no sample was injected or revival is not allowed, we grab an interested observer. - for(var/mob/dead/observer/O in player_list) - if(O.client && O.client.prefs.be_special & BE_PLANT) - var/response = alert(O, "Someone is harvesting a replica pod. Would you like to play as a Dionaea?", "Replica pod harvest", "Yes", "No", "Never for this round.") - if(response == "Yes") - candidates += O - else if(response == "Never for this round") - O.client.prefs.be_special ^= BE_PLANT + request_player() - if(!do_after(user, 100)) - return + spawn(75) //If we don't have a ghost or the ghost is now unplayed, we just give the harvester some seeds. + if(!found_player) + parent.visible_message("The pod has formed badly, and all you can do is salvage some of the seeds.") + var/seed_count = 1 - if(candidates.len) - ghost = pick(candidates) + if(prob(yield * parent.yieldmod * 20)) + seed_count++ - //If we don't have a ghost or the ghost is now unplayed, we just give the harvester some seeds. - if(!ghost || !(ghost.ckey) || ghost.stat != 2) - user << "The pod has formed badly, and all you can do is salvage some of the seeds." - var/seed_count = 1 + for(var/i=0,iYou awaken slowly, feeling your sap stir into sluggish motion as the warm air caresses your bark." + if(source && ckey && podman.ckey == ckey) + podman << "Memories of a life as [source] drift oddly through a mind unsuited for them, like a skin of oil over a fathomless lake." + podman << "You are now one of the Dionaea, a race of drifting interstellar plantlike creatures that sometimes share their seeds with human traders." + podman << "Too much darkness will send you into shock and starve you, but light will help you heal." + if(!realName) + var/newname = input(podman,"Enter a name, or leave blank for the default name.", "Name change","") as text + if (newname != "") + podman.real_name = newname - spawn(0) - podman << "\green You awaken slowly, feeling your sap stir into sluggish motion as the warm air caresses your bark." - if(source && ckey && podman.ckey == ckey) - podman << "Memories of a life as [source] drift oddly through a mind unsuited for them, like a skin of oil over a fathomless lake." - podman << "You are now one of the Dionaea, a race of drifting interstellar plantlike creatures that sometimes share their seeds with human traders." - podman << "Too much darkness will send you into shock and starve you, but light will help you heal." - - if(!realName) - var/newname = input(podman,"Enter a name, or leave blank for the default name.", "Name change","") as text - if (newname != "") - podman.real_name = newname - parent.update_tray() \ No newline at end of file + parent.visible_message("\blue The pod disgorges a fully-formed plant person!") + parent.update_tray()