Adds checks to make sure that both the AI and Modsuit wearer are present and in character to allow for mind swap + 1 bug fix (#2700)

## About The Pull Request
Title + fixes a bug where cryoing as the suit ai as the original wearer
of the modsuit would then cause the original AI to be stuck in limbo
when deactivating the suit
## Why It's Good For The Game
bugs
## Proof Of Testing

![image](https://github.com/user-attachments/assets/c932a2e2-4530-45cd-b21c-e375375aa9b9)
<details>
<summary>Screenshots/Videos</summary>

</details>

## Changelog
🆑
fix: AIs can no long control a host body and themself at the same time
fix: if the original wearer becomes the AI and cryo's, the original AI
will no longer be stuck in limbo
/🆑
This commit is contained in:
Odairu
2024-12-16 09:22:28 -07:00
committed by GitHub
parent 83d46125d1
commit cbbf831bc7
@@ -74,6 +74,12 @@
if(!mod.ai_assistant)
balloon_alert(mod.wearer, "no AI present")
return
if(isnull(mod.wearer.client))
balloon_alert(mod.ai_assistant, "host is unresponsive")
return
if(isnull(mod.ai_assistant.client))
balloon_alert(mod.wearer, "AI is unresponsive")
return
return ..()
/obj/item/mod/module/mind_swap/on_activation()
@@ -85,12 +91,17 @@
/obj/item/mod/module/mind_swap/on_suit_activation()
ai_key = mod.ai_assistant?.key
wearer_key = mod.wearer.key
ai_control = FALSE
/obj/item/mod/module/mind_swap/on_suit_deactivation(deleting = FALSE)
if(wearer_key != mod.wearer.key)
swap_minds()
/obj/item/mod/module/mind_swap/proc/swap_minds()
if(!mod.ai_assistant)
mod.wearer.ghostize(FALSE)
mod.ai_assistant.key = ai_key
return
mod.wearer.ghostize(FALSE)
mod.ai_assistant.ghostize(FALSE)
if(ai_control)