More change for the staff of change

Better item dropping
elseif instead of if
No more create_new_xenomorph
And a span class
Yay for named xenos
This commit is contained in:
Kelenius
2015-03-30 10:11:41 +03:00
parent 47ad072225
commit bb2ad4efdb

View File

@@ -16,12 +16,6 @@
if(M.has_brain_worms())
return //Borer stuff - RR
M.monkeyizing = 1
M.canmove = 0
M.icon = null
M.overlays.Cut()
M.invisibility = 101
if(istype(M, /mob/living/silicon/robot))
var/mob/living/silicon/robot/Robot = M
if(Robot.mmi)
@@ -31,9 +25,7 @@
if(istype(W, /obj/item/weapon/implant)) //TODO: Carn. give implants a dropped() or something
del(W)
continue
W.layer = initial(W.layer)
W.loc = M.loc
W.dropped(M)
M.drop_from_inventory(W)
var/mob/living/new_mob
@@ -42,14 +34,14 @@
options += t
options -= "Xenomorph Queen"
options -= "Xenomorph"
if(isrobot(M))
options -= "robot"
if(isslime(M))
options -= "slime"
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.species)
options -= H.species.name
else if(isrobot(M))
options -= "robot"
else if(isslime(M))
options -= "slime"
var/randomize = pick(options)
switch(randomize)
@@ -64,35 +56,42 @@
if("slime")
new_mob = new /mob/living/carbon/slime(M.loc)
new_mob.universal_speak = 1
if("Xenomorph Hunter", "Xenomorph Sentinel", "Xenomorph Drone")
new_mob = create_new_xenomorph(copytext(randomize, 11), M.loc)
new_mob.universal_speak = 1
else
new_mob = new /mob/living/carbon/human(M.loc, randomize)
if(M.gender == MALE)
new_mob.gender = MALE
new_mob.name = pick(first_names_male)
var/mob/living/carbon/human/H
if(ishuman(M))
H = M
else
new_mob.gender = FEMALE
new_mob.name = pick(first_names_female)
new_mob.name += " [pick(last_names)]"
new_mob.real_name = new_mob.name
new_mob = new /mob/living/carbon/human(M.loc)
H = new_mob
var/datum/preferences/A = new() //Randomize appearance for the human
A.randomize_appearance_for(new_mob)
if(M.gender == MALE)
H.gender = MALE
H.name = pick(first_names_male)
else
H.gender = FEMALE
H.name = pick(first_names_female)
H.name += " [pick(last_names)]"
H.real_name = H.name
H.set_species(randomize)
H.universal_speak = 1
var/datum/preferences/A = new() //Randomize appearance for the human
A.randomize_appearance_for(H)
if(new_mob)
for (var/obj/effect/proc_holder/spell/S in M.spell_list)
new_mob.spell_list += new S.type
new_mob.a_intent = "hurt"
if(M.mind)
M.mind.transfer_to(new_mob)
else
return
new_mob.key = M.key
for (var/obj/effect/proc_holder/spell/S in M.spell_list)
new_mob.spell_list += new S.type
new_mob << "<span class='warning'>Your form morphs into that of \a [lowertext(randomize)].</span>"
new_mob.a_intent = "hurt"
if(M.mind)
M.mind.transfer_to(new_mob)
del(M)
return
else
new_mob.key = M.key
new_mob << "<B>Your form morphs into that of a [lowertext(randomize)].</B>"
del(M)
return new_mob
M << "<span class='warning'>Your form morphs into that of \a [lowertext(randomize)].</span>"
return