adds transfer potion to xenobio rainbow core + blood, potion and reaction

This commit is contained in:
uraniummeltdown
2017-01-17 17:40:42 +04:00
parent bf4303992a
commit f7f926e1fa
2 changed files with 57 additions and 1 deletions
@@ -661,4 +661,18 @@
var/mob/living/carbon/slime/S = new /mob/living/carbon/slime
S.colour = pick("grey","orange", "metal", "blue", "purple", "dark purple", "dark blue", "green", "silver", "yellow", "gold", "yellow", "red", "silver", "pink", "cerulean", "sepia", "bluespace", "pyrite", "light pink", "oil", "adamantine", "black")
S.forceMove(get_turf(holder.my_atom))
S.visible_message("<span class='danger'>Infused with plasma, the core begins to quiver and grow, and soon a new baby slime emerges from it!</span>")
S.visible_message("<span class='danger'>Infused with plasma, the core begins to quiver and grow, and soon a new baby slime emerges from it!</span>")
/datum/chemical_reaction/slime_transfer
name = "Transfer Potion"
id = "slimetransfer"
result = null
required_reagents = list("blood" = 1)
result_amount = 1
required_other = 1
required_container = /obj/item/slime_extract/rainbow
/datum/chemical_reaction/slime_transfer/on_reaction(datum/reagents/holder)
feedback_add_details("slime_cores_used","[type]")
var/obj/item/slimepotion/transference/P = new /obj/item/slimepotion/transference
P.forceMove(get_turf(holder.my_atom))
@@ -221,6 +221,48 @@
being_used = 0
..()
/obj/item/slimepotion/transference
name = "consciousness transference potion"
desc = "A strange slime-based chemical that, when used, allows the user to transfer their consciousness to a lesser being."
icon = 'icons/obj/chemical.dmi'
icon_state = "bottle19"
origin_tech = "biotech=6"
var/prompted = FALSE
var/animal_type = SENTIENCE_ORGANIC
/obj/item/slimepotion/transference/afterattack(mob/living/M, mob/user)
if(prompted || !ismob(M))
return
if(!isanimal(M) || M.ckey) //much like sentience, these will not work on something that is already player controlled
user << "<span class='warning'>[M] already has a higher consciousness!</span>"
return ..()
if(M.stat)
user << "<span class='warning'>[M] is dead!</span>"
return ..()
var/mob/living/simple_animal/SM = M
if(SM.sentience_type != animal_type)
to_chat(user, "<span class='warning'>You cannot transfer your consciousness to [SM].</span>") //no controlling machines
return ..()
if(jobban_isbanned(user, ROLE_SENTIENT))
to_chat(user, "<span class='warning'>Your mind goes blank as you attempt to use the potion.</span>")
return
prompted = TRUE
if(alert("This will permanently transfer your consciousness to [SM]. Are you sure you want to do this?",,"Yes","No")=="No")
prompted = FALSE
return
to_chat(user, "<span class='notice'>You drink the potion then place your hands on [SM]...</span>")
user.mind.transfer_to(SM)
SM.universal_speak = 1
SM.faction = user.faction
SM.sentience_act() //Same deal here as with sentience
user.death()
to_chat(SM, "<span class='notice'>In a quick flash, you feel your consciousness flow into [SM]!</span>")
to_chat(SM, "<span class='warning'>You are now [SM]. Your allegiances, alliances, and roles are still the same as they were prior to consciousness transfer!</span>")
SM.name = "[SM.name] as [user.real_name]"
qdel(src)
/obj/item/slimepotion/steroid
name = "slime steroid"
desc = "A potent chemical mix that will cause a baby slime to generate more extract."