diff --git a/code/game/machinery/computer/camera_advanced.dm b/code/game/machinery/computer/camera_advanced.dm index c2a4f722ea2..66bacfee9fa 100644 --- a/code/game/machinery/computer/camera_advanced.dm +++ b/code/game/machinery/computer/camera_advanced.dm @@ -11,6 +11,10 @@ var/list/networks = list("ss13") var/datum/action/innate/camera_off/off_action = new var/datum/action/innate/camera_jump/jump_action = new + ///Camera action button to move up a Z level + var/datum/action/innate/camera_multiz_up/move_up_action = new + ///Camera action button to move down a Z level + var/datum/action/innate/camera_multiz_down/move_down_action = new var/list/actions = list() ///Should we supress any view changes? var/should_supress_view_changes = TRUE @@ -57,6 +61,16 @@ jump_action.Grant(user) actions += jump_action + if(move_up_action) + move_up_action.target = user + move_up_action.Grant(user) + actions += move_up_action + + if(move_down_action) + move_down_action.target = user + move_down_action.Grant(user) + actions += move_down_action + /obj/machinery/proc/remove_eye_control(mob/living/user) CRASH("[type] does not implement ai eye handling") @@ -74,12 +88,12 @@ user.reset_perspective(null) if(eyeobj.visible_icon && user.client) user.client.images -= eyeobj.user_image + user.client.view_size.unsupress() + eyeobj.eye_user = null user.remote_control = null - current_user = null user.unset_machine() - user.client.view_size.unsupress() playsound(src, 'sound/machines/terminal_off.ogg', 25, FALSE) /obj/machinery/computer/camera_advanced/check_eye(mob/user) @@ -195,6 +209,12 @@ return eye_user.client return null +/mob/camera/ai_eye/remote/xenobio/canZMove(direction, turf/target) + var/area/new_area = get_area(target) + if(new_area && new_area.name == allowed_area || new_area && (new_area.area_flags & XENOBIOLOGY_COMPATIBLE)) + return TRUE + return FALSE + /mob/camera/ai_eye/remote/setLoc(T) if(eye_user) T = get_turf(T) @@ -282,3 +302,32 @@ else playsound(origin, 'sound/machines/terminal_prompt_deny.ogg', 25, FALSE) +/datum/action/innate/camera_multiz_up + name = "Move up a floor" + icon_icon = 'icons/mob/actions/actions_silicon.dmi' + button_icon_state = "move_up" + +/datum/action/innate/camera_multiz_up/Activate() + if(!target || !isliving(target)) + return + var/mob/living/user_mob = target + var/mob/camera/ai_eye/remote/remote_eye = user_mob.remote_control + if(remote_eye.zMove(UP, FALSE)) + to_chat(user_mob, "You move upwards.") + else + to_chat(user_mob, "You couldn't move upwards!") + +/datum/action/innate/camera_multiz_down + name = "Move down a floor" + icon_icon = 'icons/mob/actions/actions_silicon.dmi' + button_icon_state = "move_down" + +/datum/action/innate/camera_multiz_down/Activate() + if(!target || !isliving(target)) + return + var/mob/living/user_mob = target + var/mob/camera/ai_eye/remote/remote_eye = user_mob.remote_control + if(remote_eye.zMove(DOWN, FALSE)) + to_chat(user_mob, "You move downwards.") + else + to_chat(user_mob, "You couldn't move downwards!") diff --git a/icons/mob/actions/actions_silicon.dmi b/icons/mob/actions/actions_silicon.dmi index 352eae21cff..8a03ef91cab 100644 Binary files a/icons/mob/actions/actions_silicon.dmi and b/icons/mob/actions/actions_silicon.dmi differ