Merge pull request #552 from dumpdavidson/monkeyize

Monkey - Human transformation
This commit is contained in:
Cael Aislinn
2013-06-10 02:27:52 -07:00
9 changed files with 245 additions and 269 deletions
+14
View File
@@ -649,6 +649,20 @@ client
if("left") A.dir = turn(A.dir, 45)
href_list["datumrefresh"] = href_list["rotatedatum"]
else if(href_list["makehuman"])
if(!check_rights(0)) return
var/mob/living/carbon/monkey/Mo = locate(href_list["makehuman"])
if(!istype(Mo))
usr << "This can only be done to instances of type /mob/living/carbon/monkey"
return
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
if(!Mo)
usr << "Mob doesn't exist anymore"
return
holder.Topic(href, list("humanone"=href_list["makehuman"]))
else if(href_list["makemonkey"])
if(!check_rights(0)) return
+14 -17
View File
@@ -765,7 +765,7 @@ datum/mind
return
switch(href_list["monkey"])
if("healthy")
if (usr.client.holder.rights & R_ADMIN)
if (check_rights(R_ADMIN))
var/mob/living/carbon/human/H = current
var/mob/living/carbon/monkey/M = current
if (istype(H))
@@ -780,7 +780,7 @@ datum/mind
D.cure(0)
sleep(0) //because deleting of virus is done through spawn(0)
if("infected")
if (usr.client.holder.rights & R_ADMIN)
if (check_rights(R_ADMIN, 0))
var/mob/living/carbon/human/H = current
var/mob/living/carbon/monkey/M = current
if (istype(H))
@@ -793,21 +793,18 @@ datum/mind
else if (istype(M))
current.contract_disease(new /datum/disease/jungle_fever,1,0)
if("human")
var/mob/living/carbon/monkey/M = current
if (istype(M))
for(var/datum/disease/D in M.viruses)
if (istype(D,/datum/disease/jungle_fever))
D.cure(0)
sleep(0) //because deleting of virus is doing throught spawn(0)
log_admin("[key_name(usr)] attempting to humanize [key_name(current)]")
message_admins("\blue [key_name_admin(usr)] attempting to humanize [key_name_admin(current)]")
var/obj/item/weapon/dnainjector/m2h/m2h = new
var/obj/item/weapon/implant/mobfinder = new(M) //hack because humanizing deletes mind --rastaf0
src = null
m2h.inject(M)
src = mobfinder.loc:mind
del(mobfinder)
current.radiation -= 50
if (check_rights(R_ADMIN, 0))
var/mob/living/carbon/human/H = current
var/mob/living/carbon/monkey/M = current
if (istype(M))
for(var/datum/disease/D in M.viruses)
if (istype(D,/datum/disease/jungle_fever))
D.cure(0)
sleep(0) //because deleting of virus is doing throught spawn(0)
log_admin("[key_name(usr)] attempting to humanize [key_name(current)]")
message_admins("\blue [key_name_admin(usr)] attempting to humanize [key_name_admin(current)]")
H = M.humanize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPDAMAGE | TR_KEEPVIRUS | TR_DEFAULTMSG)
src = H.mind
else if (href_list["silicon"])
switch(href_list["silicon"])