diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 34ead71eb01..28b611c58c5 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -533,6 +533,13 @@ . = ..() if(.) events.fireEvent("onMove",get_turf(src)) + //NSV13 - hacky AI fixes + if(silicon_pilot) + var/mob/living/silicon/ai/aipilot = occupant //qed + if(isAI(aipilot)) //safety + aipilot?.eyeobj?.setLoc(get_turf(src), FALSE, null, TRUE) //Ok so basically we NEED our eyeobj to move so our camera chunks update or the mech pilot has a bad time. + aipilot?.update_camera_location() //Ok so basically we NEED to update the AI core camera here because it doesn't get "moved" normally due to contents. + //NSV13 end. if (internal_tank?.disconnect()) // Something moved us and broke connection occupant_message("Air port connection teared off!") log_message("Lost connection to gas port.", LOG_MECHA) @@ -809,6 +816,7 @@ to_chat(user, "Transfer successful: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed.") card.AI = null ai_enter_mech(AI, interaction) + card.update_icon() //NSV13 - make card look empty. //Hack and From Card interactions share some code, so leave that here for both to use. /obj/mecha/proc/ai_enter_mech(mob/living/silicon/ai/AI, interaction) diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm index ce24e1f98db..fb64c59771d 100644 --- a/code/modules/mob/living/silicon/ai/freelook/eye.dm +++ b/code/modules/mob/living/silicon/ai/freelook/eye.dm @@ -73,9 +73,9 @@ // Use this when setting the ai_eye's location. // It will also stream the chunk that the new loc is in. -/mob/camera/ai_eye/proc/setLoc(destination, force_update = FALSE, dir) //NSV13 - AI Custom Holographic Form +/mob/camera/ai_eye/proc/setLoc(destination, force_update = FALSE, dir, ai_mecha_override) //NSV13 - AI Custom Holographic Form || also AI mecha fixes - basically we need the fourth arg to ONLY allow the mecha AI movement and lock normal actions. if(ai) - if(!isturf(ai.loc)) + if(!isturf(ai.loc) && (!ismecha(ai.loc) || !ai_mecha_override)) //NSV13 - hacky ancient bugfixes (eye needs moving even if core is mech'd to update cam chunks). return destination = get_turf(destination) if(!force_update && (destination == get_turf(src)) ) diff --git a/nsv13/code/__HELPERS/overmap.dm b/nsv13/code/__HELPERS/overmap.dm index 7d260c5f532..82132589db3 100644 --- a/nsv13/code/__HELPERS/overmap.dm +++ b/nsv13/code/__HELPERS/overmap.dm @@ -23,6 +23,8 @@ Helper method to get what ship an observer belongs to for stuff like parallax. */ /mob/proc/update_overmap() + if(!loc) //Being deleted or cursed things. + return var/obj/structure/overmap/OM = loc.get_overmap() //Accounts for things like fighters and for being in nullspace because having no loc is bad. if(OM == last_overmap) return