diff --git a/code/__DEFINES/traits/declarations.dm b/code/__DEFINES/traits/declarations.dm index 7446d150f0d..19adcc1c0d2 100644 --- a/code/__DEFINES/traits/declarations.dm +++ b/code/__DEFINES/traits/declarations.dm @@ -291,6 +291,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai /// Allows you to hear speech through walls #define TRAIT_XRAY_HEARING "xray_hearing" +/// This mob can not enter or move on a shuttle +#define TRAIT_BLOCK_SHUTTLE_MOVEMENT "block_shuttle_movement" + /// Lets us scan reagents #define TRAIT_REAGENT_SCANNER "reagent_scanner" /// Lets us scan machine parts and tech unlocks diff --git a/code/_globalvars/traits/_traits.dm b/code/_globalvars/traits/_traits.dm index f4a3be4aee5..cd1e7904623 100644 --- a/code/_globalvars/traits/_traits.dm +++ b/code/_globalvars/traits/_traits.dm @@ -140,9 +140,10 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_BATON_RESISTANCE" = TRAIT_BATON_RESISTANCE, "TRAIT_BEING_BLADE_SHIELDED" = TRAIT_BEING_BLADE_SHIELDED, "TRAIT_BLOB_ALLY" = TRAIT_BLOB_ALLY, + "TRAIT_BLOCK_SHUTTLE_MOVEMENT" = TRAIT_BLOCK_SHUTTLE_MOVEMENT, + "TRAIT_BLOOD_CLANS" = TRAIT_BLOOD_CLANS, "TRAIT_BLOODSHOT_EYES" = TRAIT_BLOODSHOT_EYES, "TRAIT_BLOODY_MESS" = TRAIT_BLOODY_MESS, - "TRAIT_BLOOD_CLANS" = TRAIT_BLOOD_CLANS, "TRAIT_BOMBIMMUNE" = TRAIT_BOMBIMMUNE, "TRAIT_BONSAI" = TRAIT_BONSAI, "TRAIT_BOOZE_SLIDER" = TRAIT_BOOZE_SLIDER, diff --git a/code/_globalvars/traits/admin_tooling.dm b/code/_globalvars/traits/admin_tooling.dm index 61ef99d124c..7a0d78a9f7c 100644 --- a/code/_globalvars/traits/admin_tooling.dm +++ b/code/_globalvars/traits/admin_tooling.dm @@ -36,6 +36,7 @@ GLOBAL_LIST_INIT(admin_visible_traits, list( "TRAIT_BADTOUCH" = TRAIT_BADTOUCH, "TRAIT_BALD" = TRAIT_BALD, "TRAIT_BATON_RESISTANCE" = TRAIT_BATON_RESISTANCE, + "TRAIT_BLOCK_SHUTTLE_MOVEMENT" = TRAIT_BLOCK_SHUTTLE_MOVEMENT, "TRAIT_BLOOD_CLANS" = TRAIT_BLOOD_CLANS, "TRAIT_BLOODSHOT_EYES" = TRAIT_BLOODSHOT_EYES, "TRAIT_BOMBIMMUNE" = TRAIT_BOMBIMMUNE, diff --git a/code/datums/brain_damage/imaginary_friend.dm b/code/datums/brain_damage/imaginary_friend.dm index 251414241c9..aa39c9ada61 100644 --- a/code/datums/brain_damage/imaginary_friend.dm +++ b/code/datums/brain_damage/imaginary_friend.dm @@ -86,8 +86,6 @@ var/mob/living/owner var/bubble_icon = "default" - - /mob/camera/imaginary_friend/Login() . = ..() if(!. || !client) diff --git a/code/modules/antagonists/blob/overmind.dm b/code/modules/antagonists/blob/overmind.dm index 929a3b5c4ff..e4bba052423 100644 --- a/code/modules/antagonists/blob/overmind.dm +++ b/code/modules/antagonists/blob/overmind.dm @@ -12,7 +12,7 @@ GLOBAL_LIST_EMPTY(blob_nodes) icon = 'icons/mob/silicon/cameramob.dmi' icon_state = "marker" mouse_opacity = MOUSE_OPACITY_ICON - move_on_shuttle = 1 + move_on_shuttle = TRUE invisibility = INVISIBILITY_OBSERVER layer = FLY_LAYER plane = ABOVE_GAME_PLANE diff --git a/code/modules/mob/camera/camera.dm b/code/modules/mob/camera/camera.dm index c9d44aa2973..b4ddc8cd9c8 100644 --- a/code/modules/mob/camera/camera.dm +++ b/code/modules/mob/camera/camera.dm @@ -8,13 +8,16 @@ mouse_opacity = MOUSE_OPACITY_TRANSPARENT invisibility = INVISIBILITY_ABSTRACT // No one can see us sight = SEE_SELF - move_on_shuttle = FALSE + /// Toggles if the camera can move on shuttles + var/move_on_shuttle = FALSE /// Toggles if the camera can use emotes var/has_emotes = FALSE /mob/camera/Initialize(mapload) . = ..() SSpoints_of_interest.make_point_of_interest(src) + if(!move_on_shuttle) + ADD_TRAIT(src, TRAIT_BLOCK_SHUTTLE_MOVEMENT, INNATE_TRAIT) /mob/camera/experience_pressure_difference() return diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 2a5be377ecd..a0658c3a02b 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -134,9 +134,6 @@ /// What job does this mob have var/job = null//Living - /// Can this mob enter shuttles - var/move_on_shuttle = 1 - /// bitflags defining which status effects can be inflicted (replaces canknockdown, canstun, etc) var/status_flags = CANSTUN|CANKNOCKDOWN|CANUNCONSCIOUS|CANPUSH diff --git a/code/modules/shuttle/arrivals.dm b/code/modules/shuttle/arrivals.dm index bd50a6b6895..70e06bbb097 100644 --- a/code/modules/shuttle/arrivals.dm +++ b/code/modules/shuttle/arrivals.dm @@ -112,14 +112,9 @@ return FALSE /obj/docking_port/mobile/arrivals/proc/PersonCheck() - for(var/V in GLOB.player_list) - var/mob/M = V - if((get_area(M) in areas) && M.stat != DEAD) - if(!iscameramob(M)) - return TRUE - var/mob/camera/C = M - if(C.move_on_shuttle) - return TRUE + for(var/mob/player as anything in GLOB.player_list) + if((get_area(player) in areas) && (player.stat != DEAD) && !HAS_TRAIT(player, TRAIT_BLOCK_SHUTTLE_MOVEMENT)) + return TRUE return FALSE /obj/docking_port/mobile/arrivals/proc/NukeDiskCheck() diff --git a/code/modules/shuttle/on_move.dm b/code/modules/shuttle/on_move.dm index 56f99e270a4..4c73b7bd263 100644 --- a/code/modules/shuttle/on_move.dm +++ b/code/modules/shuttle/on_move.dm @@ -264,12 +264,12 @@ All ShuttleMove procs go here /************************************Mob move procs************************************/ /mob/onShuttleMove(turf/newT, turf/oldT, list/movement_force, move_dir, obj/docking_port/stationary/old_dock, obj/docking_port/mobile/moving_dock) - if(!move_on_shuttle) + if(HAS_TRAIT(src, TRAIT_BLOCK_SHUTTLE_MOVEMENT)) return . = ..() /mob/afterShuttleMove(turf/oldT, list/movement_force, shuttle_dir, shuttle_preferred_direction, move_dir, rotation) - if(!move_on_shuttle) + if(HAS_TRAIT(src, TRAIT_BLOCK_SHUTTLE_MOVEMENT)) return . = ..() if(client && movement_force)