From 6e27f2e4ff7821faa9d4237487aceb7c8a7b1308 Mon Sep 17 00:00:00 2001 From: "kortgstation@gmail.com" Date: Wed, 21 Dec 2011 03:55:30 +0000 Subject: [PATCH] Fixed a bug I caused (where the Staff of Change was unable to fire). The Staff of Change no longer works on dead targets (to prevent resurrection when the new mob is created and the ckey transferred). The Staff of Change can now cause a mob to change into a human (and a chance for said human to be a lizardman/metroidman/plantman/golem/normal human) git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2756 316c924e-a436-60f5-8080-3fe189b3f50e --- .../projectiles/guns/energy/special.dm | 2 +- code/modules/projectiles/projectile/change.dm | 40 +++++++++++++++++-- 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 5bbf52b0fc8..828c05db823 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -27,7 +27,7 @@ obj/item/weapon/gun/energy/staff icon_state = "staffofchange" item_state = "staffofchange" fire_sound = 'emitter.ogg' - flags = FPRINT | TABLEPASS | CONDUCT | ONBACK + flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK w_class = 4.0 charge_cost = 200 projectile_type = "/obj/item/projectile/change" diff --git a/code/modules/projectiles/projectile/change.dm b/code/modules/projectiles/projectile/change.dm index ac3f03eeda3..48e501026c4 100644 --- a/code/modules/projectiles/projectile/change.dm +++ b/code/modules/projectiles/projectile/change.dm @@ -19,10 +19,10 @@ /obj/item/projectile/change/proc/wabbajack (mob/M as mob in world) - if(istype(M, /mob/living)) + if(istype(M, /mob/living) && M.stat != 2) for(var/obj/item/W in M) M.drop_from_slot(W) - var/randomize = pick("monkey","robot","metroid","alien") + var/randomize = pick("monkey","robot","metroid","alien","human") switch(randomize) if("monkey") if (M.monkeyizing) @@ -33,7 +33,6 @@ M.icon = null M.invisibility = 101 var/mob/living/carbon/monkey/O = new /mob/living/carbon/monkey( M.loc ) - O.name = "monkey" if (M.client) M.client.mob = O @@ -66,7 +65,6 @@ O.invisibility = 0 O.name = "Cyborg" O.real_name = "Cyborg" - O.lastKnownIP = M.client.address ? M.client.address : null if (M.mind) M.mind.transfer_to(O) if (M.mind.assigned_role == "Cyborg") @@ -148,5 +146,39 @@ new_xeno << "You are now an alien." del(M) return new_xeno + if("human") + if (M.monkeyizing) + return + M.update_clothing() + M.monkeyizing = 1 + M.canmove = 0 + M.icon = null + M.invisibility = 101 + var/mob/living/carbon/human/O = new /mob/living/carbon/human( M.loc ) + + var/first = pick(first_names_male) + var/last = pick(last_names) + O.name = "[first] [last]" + O.real_name = "[first] [last]" + var/race = pick("lizard","golem","metroid","plant","normal") + switch(race) + if("lizard") + O.mutantrace = "lizard" + if("golem") + O.mutantrace = "golem" + if("metroid") + O.mutantrace = "metroid" + if("plant") + O.mutantrace = "plant" + if("normal") + O.mutantrace = "" + if (M.client) + M.client.mob = O + if(M.mind) + M.mind.transfer_to(O) + O.a_intent = "hurt" + O << "You are now a human." + del(M) + return O return