Fixes vamp shapeshifting a bit (#13562)
* fixes vamp shapeshifting a bit Title. Buncha weird stuff happening. * ghom's request moves the check to ../bat/cast(), adds type safety
This commit is contained in:
@@ -153,16 +153,33 @@
|
||||
to_chat(caster, "<span class='warning'>You're already shapeshifted!</span>")
|
||||
return
|
||||
|
||||
if(!ishuman(caster))
|
||||
to_chat(caster, "<span class='warning'>You need to be humanoid to be able to do this!</span>")
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/human_caster = caster
|
||||
var/mob/living/shape = new shapeshift_type(caster.loc)
|
||||
H = new(shape,src,caster)
|
||||
H = new(shape,src,human_caster)
|
||||
if(istype(H, /mob/living/simple_animal))
|
||||
var/mob/living/simple_animal/SA = H
|
||||
if((caster.blood_volume >= (BLOOD_VOLUME_BAD*caster.blood_ratio)) || (ventcrawl_nude_only && length(caster.get_equipped_items(include_pockets = TRUE))))
|
||||
if((human_caster.blood_volume <= (BLOOD_VOLUME_BAD*human_caster.blood_ratio)) || (ventcrawl_nude_only && length(human_caster.get_equipped_items(include_pockets = TRUE))))
|
||||
SA.ventcrawler = FALSE
|
||||
if(transfer_name)
|
||||
H.name = caster.name
|
||||
H.name = human_caster.name
|
||||
|
||||
|
||||
clothes_req = NONE
|
||||
mobs_whitelist = null
|
||||
mobs_blacklist = null
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/shapeshift/bat/cast(list/targets, mob/user = usr)
|
||||
if(!(locate(/obj/shapeshift_holder) in targets[1]))
|
||||
if(!ishuman(user))
|
||||
to_chat(user, "<span class='warning'>You need to be humanoid to be able to do this!</span>")
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/human_user = user
|
||||
if(!(human_user.dna?.species?.id == SPECIES_VAMPIRE))
|
||||
to_chat(user, "<span class='warning'>You don't seem to be able to shapeshift..</span>")
|
||||
return
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user