Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #28022: mecha/AI/hologram bugs from #25078 #28026

Merged
merged 2 commits into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion code/_onclick/ai_onclick.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
// But we return here since we don't want to do regular dblclick handling
return

if(control_disabled || stat) return
if(control_disabled || stat)
return
if(ismecha(loc))
return

if(ismob(A))
ai_actual_track(A, TRUE)
Expand Down
2 changes: 2 additions & 0 deletions code/game/machinery/hologram.dm
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ GLOBAL_LIST_EMPTY(holopads)
return
if(istype(robot))
interact(robot)
if(ismecha(ai.loc)) // AIs must exit mechs before activating holopads.
return
/*There are pretty much only three ways to interact here.
I don't need to check for client since they're clicking on an object.
This may change in the future but for now will suffice.*/
Expand Down
5 changes: 5 additions & 0 deletions code/game/mecha/mecha.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,10 @@

//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)
var/mob/camera/eye/hologram/hologram_eye = AI.remote_control
if(istype(hologram_eye))
hologram_eye.release_control()
qdel(hologram_eye)
AI.aiRestorePowerRoutine = 0
AI.forceMove(src)
occupant = AI
Expand Down Expand Up @@ -1315,6 +1319,7 @@
RemoveActions(occupant, 1)
mob_container = AI
newloc = get_turf(AI.linked_core)
AI.eyeobj?.set_loc(newloc)
qdel(AI.linked_core)
else
return
Expand Down
1 change: 0 additions & 1 deletion code/modules/mob/camera/eye/hologram_eye.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
name = "Inactive Hologram Eye"
ai_detector_visible = FALSE
acceleration = FALSE
relay_speech = TRUE
var/obj/machinery/hologram/holopad/holopad

/mob/camera/eye/hologram/Initialize(mapload, owner_name, camera_origin, mob/living/user)
Expand Down
Loading