Xenobio Additions

This commit is contained in:
Fox-McCloud
2016-04-13 01:50:11 -04:00
parent 1d030c5824
commit 81ed1467d7
4 changed files with 82 additions and 5 deletions
+5
View File
@@ -5,11 +5,16 @@
/obj/item/weapon/stock_parts/cell/New()
..()
processing_objects.Add(src)
charge = maxcharge
spawn(5)
updateicon()
/obj/item/weapon/stock_parts/cell/Destroy()
processing_objects.Remove(src)
return ..()
/obj/item/weapon/stock_parts/cell/proc/updateicon()
if(isnull(src.overlay_image))
src.overlay_image = image('icons/obj/power.dmi')
@@ -662,3 +662,17 @@
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>")
/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))
@@ -223,6 +223,49 @@
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 = "bottle6"
origin_tech = "biotech=6"
var/prompted = 0
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)
user << "<span class='warning'>You cannot transfer your consciousness to [SM].</span>" //no controlling machines
return ..()
if(jobban_isbanned(user, ROLE_SENTIENT))
user << "<span class='warning'>Your mind goes blank as you attempt to use the potion.</span>"
return
prompted = 1
if(alert("This will permanently transfer your consciousness to [SM]. Are you sure you want to do this?",,"Yes","No")=="No")
prompted = 0
return
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()
SM << "<span class='notice'>In a quick flash, you feel your consciousness flow into [SM]!</span>"
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"