diff --git a/code/modules/antagonists/blob/overmind.dm b/code/modules/antagonists/blob/overmind.dm index afe49f81549..8ec47663256 100644 --- a/code/modules/antagonists/blob/overmind.dm +++ b/code/modules/antagonists/blob/overmind.dm @@ -107,7 +107,16 @@ GLOBAL_LIST_EMPTY(blob_nodes) to_chat(src, "The [blobstrain.name] strain [blobstrain.effectdesc]") /mob/camera/blob/can_z_move(direction, turf/start, turf/destination, z_move_flags = NONE, mob/living/rider) - return FALSE + if(placed) // The blob can't expand vertically (yet) + return FALSE + . = ..() + if(!.) + return + var/turf/target_turf = . + if(!is_valid_turf(target_turf)) // Allows unplaced blobs to travel through station z-levels + if(z_move_flags & ZMOVE_FEEDBACK) + to_chat(src, "Your destination is invalid. Move somewhere else and try again.") + return null /mob/camera/blob/proc/is_valid_turf(turf/T) var/area/A = get_area(T) diff --git a/code/modules/antagonists/blob/powers.dm b/code/modules/antagonists/blob/powers.dm index 75a4ad31473..c0bef7be1ff 100644 --- a/code/modules/antagonists/blob/powers.dm +++ b/code/modules/antagonists/blob/powers.dm @@ -28,8 +28,7 @@ if(T.density) to_chat(src, span_warning("This spot is too dense to place a blob core on!")) return FALSE - var/area/A = get_area(T) - if(isspaceturf(T) || A && !(A.area_flags & BLOBS_ALLOWED)) + if(!is_valid_turf(T)) to_chat(src, span_warning("You cannot place your core here!")) return FALSE for(var/obj/O in T) diff --git a/code/modules/antagonists/disease/disease_mob.dm b/code/modules/antagonists/disease/disease_mob.dm index f8344cfadcf..5b2513dd6b1 100644 --- a/code/modules/antagonists/disease/disease_mob.dm +++ b/code/modules/antagonists/disease/disease_mob.dm @@ -135,6 +135,8 @@ the new instance inside the host to be updated to the template's stats. last_move_tick = world.time /mob/camera/disease/can_z_move(direction, turf/start, turf/destination, z_move_flags = NONE, mob/living/rider) + if(freemove) + return ..() return FALSE /mob/camera/disease/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, list/message_mods = list()) diff --git a/code/modules/mob/camera/camera.dm b/code/modules/mob/camera/camera.dm index 2a9ef0491b8..2d1ea422c7a 100644 --- a/code/modules/mob/camera/camera.dm +++ b/code/modules/mob/camera/camera.dm @@ -21,5 +21,23 @@ /mob/camera/canUseStorage() return FALSE +/mob/camera/up() + set name = "Move Upwards" + set category = "IC" + + if(zMove(UP, z_move_flags = ZMOVE_FEEDBACK)) + to_chat(src, span_notice("You move upwards.")) + +/mob/camera/down() + set name = "Move Down" + set category = "IC" + + if(zMove(DOWN, z_move_flags = ZMOVE_FEEDBACK)) + to_chat(src, span_notice("You move down.")) + +/mob/camera/can_z_move(direction, turf/start, turf/destination, z_move_flags = NONE, mob/living/rider) + z_move_flags |= ZMOVE_IGNORE_OBSTACLES //cameras do not respect these FLOORS you speak so much of + return ..() + /mob/camera/emote(act, m_type=1, message = null, intentional = FALSE, force_silence = FALSE) return FALSE diff --git a/code/modules/mob/living/living_movement.dm b/code/modules/mob/living/living_movement.dm index a44df90545a..f23512353ff 100644 --- a/code/modules/mob/living/living_movement.dm +++ b/code/modules/mob/living/living_movement.dm @@ -78,6 +78,11 @@ to_chat(rider || src, span_warning("[rider ? src : "You"] can't do that right now!")) return FALSE if(!buckled || !(z_move_flags & ZMOVE_ALLOW_BUCKLED)) + if(!(z_move_flags & ZMOVE_FALL_CHECKS) && incorporeal_move && (!rider || rider.incorporeal_move)) + //An incorporeal mob will ignore obstacles unless it's a potential fall (it'd suck hard) or is carrying corporeal mobs. + //Coupled with flying/floating, this allows the mob to move up and down freely. + //By itself, it only allows the mob to move down. + z_move_flags |= ZMOVE_IGNORE_OBSTACLES return ..() switch(SEND_SIGNAL(buckled, COMSIG_BUCKLED_CAN_Z_MOVE, direction, start, destination, z_move_flags, src)) if(COMPONENT_RIDDEN_ALLOW_Z_MOVE) // Can be ridden. diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm index 3c4ae16317e..b3eb58b4875 100644 --- a/code/modules/mob/living/silicon/ai/freelook/eye.dm +++ b/code/modules/mob/living/silicon/ai/freelook/eye.dm @@ -106,10 +106,6 @@ if(.) setLoc(loc, force_update = TRUE) -/mob/camera/ai_eye/can_z_move(direction, turf/start, turf/destination, z_move_flags = NONE, mob/living/rider) - z_move_flags |= ZMOVE_IGNORE_OBSTACLES //cameras do not respect these FLOORS you speak so much of - return ..() - /mob/camera/ai_eye/Move() return