Merge pull request #10534 from VOREStation/Fixes/14063

Fixes #10463
This commit is contained in:
Aronai Sieyes
2021-06-02 12:01:30 -04:00
committed by GitHub
3 changed files with 23 additions and 5 deletions
@@ -305,7 +305,11 @@ var/global/list/disallowed_protean_accessories = list(
)
// Helpers - Unsafe, WILL perform change.
/mob/living/carbon/human/proc/nano_intoblob()
/mob/living/carbon/human/proc/nano_intoblob(force)
if(!force && !isturf(loc))
to_chat(src,"<span class='warning'>You can't change forms while inside something.</span>")
return
var/panel_was_up = FALSE
if(client?.statpanel == "Protean")
panel_was_up = TRUE
@@ -398,7 +402,11 @@ var/global/list/disallowed_protean_accessories = list(
if(istype(I, /obj/item/weapon/holder))
root.remove_from_mob(I)
/mob/living/carbon/human/proc/nano_outofblob(var/mob/living/simple_mob/protean_blob/blob)
/mob/living/carbon/human/proc/nano_outofblob(var/mob/living/simple_mob/protean_blob/blob, force)
if(!force && !isturf(loc))
to_chat(src,"<span class='warning'>You can't change forms while inside something.</span>")
return
if(!istype(blob))
return
@@ -12,13 +12,16 @@
to_chat(src,"<span class='warning'>You must be awake and standing to perform this action!</span>")
return
if(!isturf(loc))
to_chat(src,"<span class='warning'>You need more space to perform this action!</span>")
return
var/obj/item/organ/internal/nano/refactory/refactory = nano_get_refactory()
//Missing the organ that does this
if(!istype(refactory))
to_chat(src,"<span class='warning'>You don't have a working refactory module!</span>")
return
var/choice = input(src,"Pick the bodypart to change:", "Refactor - One Bodypart") as null|anything in species.has_limbs
if(!choice)
return
@@ -91,6 +94,10 @@
to_chat(src,"<span class='warning'>You must be awake and standing to perform this action!</span>")
return
if(!isturf(loc))
to_chat(src,"<span class='warning'>You need more space to perform this action!</span>")
return
var/obj/item/organ/internal/nano/refactory/refactory = nano_get_refactory()
//Missing the organ that does this
if(!istype(refactory))
@@ -232,6 +239,10 @@
set category = "Abilities"
set hidden = TRUE
if(!isturf(loc))
to_chat(src,"<span class='warning'>You need more space to perform this action!</span>")
return
//Blob form
if(temporary_form)
if(health < maxHealth*0.5)
@@ -183,7 +183,6 @@
/datum/species/protean/handle_environment_special(var/mob/living/carbon/human/H)
if((H.getActualBruteLoss() + H.getActualFireLoss()) > H.maxHealth*0.5 && isturf(H.loc)) //So, only if we're not a blob (we're in nullspace) or in someone (or a locker, really, but whatever)
H.nano_intoblob()
return ..() //Any instakill shot runtimes since there are no organs after this. No point to not skip these checks, going to nullspace anyway.
var/obj/item/organ/internal/nano/refactory/refactory = locate() in H.internal_organs