diff --git a/code/__DEFINES/_flags/interaction_flags.dm b/code/__DEFINES/_flags/interaction_flags.dm index 319a6672ddd..91f13fe31b5 100644 --- a/code/__DEFINES/_flags/interaction_flags.dm +++ b/code/__DEFINES/_flags/interaction_flags.dm @@ -1,7 +1,5 @@ -//? interaction_flags_atom on /atom /// whether can_interact() checks for anchored. only works on movables. #define INTERACT_ATOM_REQUIRES_ANCHORED (1<<0) -/* /// calls try_interact() on attack_hand() and returns that. #define INTERACT_ATOM_ATTACK_HAND (1<<1) /// automatically calls and returns ui_interact() on interact(). @@ -14,27 +12,44 @@ #define INTERACT_ATOM_IGNORE_RESTRAINED (1<<5) /// incapacitated check checks grab #define INTERACT_ATOM_CHECK_GRAB (1<<6) -*/ -/// prevents leaving fingerprints automatically on attack_hand, put in hands, other touch procs -#define INTERACT_ATOM_NO_FINGERPRINT_ON_TOUCH (1<<7) +/// prevents leaving fingerprints automatically on attack_hand +#define INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND (1<<7) /// adds hiddenprints instead of fingerprints on interact #define INTERACT_ATOM_NO_FINGERPRINT_INTERACT (1<<8) +/// allows this atom to skip the adjacency check +#define INTERACT_ATOM_ALLOW_USER_LOCATION (1<<9) +/// ignores mobility check +#define INTERACT_ATOM_IGNORE_MOBILITY (1<<10) +// Bypass all adjacency checks for mouse drop +#define INTERACT_ATOM_MOUSEDROP_IGNORE_ADJACENT (1<<11) +/// Bypass all can_perform_action checks for mouse drop +#define INTERACT_ATOM_MOUSEDROP_IGNORE_USABILITY (1<<12) +/// Bypass all adjacency and other checks for mouse drop +#define INTERACT_ATOM_MOUSEDROP_IGNORE_CHECKS (INTERACT_ATOM_MOUSEDROP_IGNORE_ADJACENT | INTERACT_ATOM_MOUSEDROP_IGNORE_USABILITY) +/// calls try_interact() on attack_paw() and returns that. +#define INTERACT_ATOM_ATTACK_PAW (1<<13) DEFINE_BITFIELD(interaction_flags_atom, list( BITFIELD(INTERACT_ATOM_REQUIRES_ANCHORED), - BITFIELD(INTERACT_ATOM_NO_FINGERPRINT_ON_TOUCH), + BITFIELD(INTERACT_ATOM_ATTACK_HAND), + BITFIELD(INTERACT_ATOM_UI_INTERACT), + BITFIELD(INTERACT_ATOM_REQUIRES_DEXTERITY), + BITFIELD(INTERACT_ATOM_IGNORE_INCAPACITATED), + BITFIELD(INTERACT_ATOM_IGNORE_RESTRAINED), + BITFIELD(INTERACT_ATOM_CHECK_GRAB), + BITFIELD(INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND), BITFIELD(INTERACT_ATOM_NO_FINGERPRINT_INTERACT), + BITFIELD(INTERACT_ATOM_ALLOW_USER_LOCATION), + BITFIELD(INTERACT_ATOM_IGNORE_MOBILITY), + BITFIELD(INTERACT_ATOM_MOUSEDROP_IGNORE_ADJACENT), + BITFIELD(INTERACT_ATOM_MOUSEDROP_IGNORE_USABILITY), + BITFIELD(INTERACT_ATOM_ATTACK_PAW), )) //? interaction_flags_item on /obj/item /// on attack self, pass to interact #define INTERACT_ITEM_ATTACK_SELF (1<<0) -/* -/// attempt pickup on attack_hand for items -#define INTERACT_ITEM_ATTACK_HAND_PICKUP (1<<0) -*/ - //? interaction_flags_machine on /obj/machinery /// can_interact() while open diff --git a/code/game/click/other_mobs.dm b/code/game/click/other_mobs.dm index 3dfbc78ff41..fe39f987d33 100644 --- a/code/game/click/other_mobs.dm +++ b/code/game/click/other_mobs.dm @@ -37,6 +37,9 @@ // todo: better desc // todo: e_args is not specified all the time, yet. /atom/proc/attack_hand(mob/user, datum/event_args/actor/clickchain/e_args) + . = FALSE + if(!(interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND)) + add_fingerprint(user) // todo: remove if(isnull(e_args)) e_args = user.default_clickchain_event_args(src, TRUE) @@ -45,7 +48,8 @@ return TRUE if(user.a_intent == INTENT_HARM) return user.melee_attack_chain(e_args) - . = _try_interact(user) + if(interaction_flags_atom & INTERACT_ATOM_ATTACK_HAND) + . = _try_interact(user) /** * Override this instead of attack_hand. @@ -61,25 +65,26 @@ //Return a non FALSE value to cancel whatever called this from propagating, if it respects it. /atom/proc/_try_interact(mob/user) - // if(isAdminGhostAI(user)) //admin abuse - // return interact(user) + if(isAdminGhostAI(user)) //admin abuse + return interact(user) if(can_interact(user)) return interact(user) return FALSE -/atom/proc/can_interact(mob/user) - // if(!user.can_interact_with(src)) - // return FALSE - // if((interaction_flags_atom & INTERACT_ATOM_REQUIRES_DEXTERITY) && !user.IsAdvancedToolUser()) - // to_chat(user, "You don't have the dexterity to do this!") - // return FALSE - // if(!(interaction_flags_atom & INTERACT_ATOM_IGNORE_INCAPACITATED) && user.incapacitated((interaction_flags_atom & INTERACT_ATOM_IGNORE_RESTRAINED), !(interaction_flags_atom & INTERACT_ATOM_CHECK_GRAB))) - // return FALSE +/atom/proc/can_interact(mob/user, require_adjacent_turf = TRUE) + if(!user.can_interact_with(src, interaction_flags_atom & INTERACT_ATOM_ALLOW_USER_LOCATION)) + return FALSE + if((interaction_flags_atom & INTERACT_ATOM_REQUIRES_DEXTERITY) && !user.IsAdvancedToolUser()) + to_chat(user, SPAN_WARNING("You don't have the dexterity to do this!")) + return FALSE + if(!(interaction_flags_atom & INTERACT_ATOM_IGNORE_INCAPACITATED) && user.incapacitated((interaction_flags_atom & INTERACT_ATOM_IGNORE_RESTRAINED), !(interaction_flags_atom & INTERACT_ATOM_CHECK_GRAB))) + return FALSE return TRUE /atom/ui_status(mob/user, datum/ui_state/state) . = ..() - if(!can_interact(user) && !IsAdminGhost(user)) + //Check if both user and atom are at the same location + if(!can_interact(user)) . = min(., UI_UPDATE) /atom/movable/can_interact(mob/user) @@ -94,9 +99,10 @@ add_hiddenprint(user) else add_fingerprint(user) - // if(interaction_flags_atom & INTERACT_ATOM_UI_INTERACT) - return (ui_interact(user) || nano_ui_interact(user)) - // return FALSE + if(interaction_flags_atom & INTERACT_ATOM_UI_INTERACT) + // SEND_SIGNAL(src, COMSIG_ATOM_UI_INTERACT, user) + return (ui_interact(user) || nano_ui_interact(user)) + return FALSE /mob/living/carbon/human/RangedAttack(atom/A) . = ..() diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm index 158757a4ecf..02ab60fc861 100644 --- a/code/game/machinery/_machinery.dm +++ b/code/game/machinery/_machinery.dm @@ -100,11 +100,15 @@ /obj/machinery name = "machinery" icon = 'icons/obj/stationobjs.dmi' + desc = "Some kind of machine." + abstract_type = /obj/machinery w_class = WEIGHT_CLASS_HUGE layer = UNDER_JUNK_LAYER // todo: don't block rad contents and just have component parts be unable to be contaminated while inside // todo: wow rad contents is a weird system rad_flags = RAD_BLOCK_CONTENTS + interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT + blocks_emissive = EMISSIVE_BLOCK_GENERIC // todo: anchored / unanchored should be replaced by movement force someday, how to handle that? //* Construction / Deconstruction diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 1176ee8c744..ea54a5c4b4c 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -16,6 +16,9 @@ // todo: rad_insulation_open/closed pass_flags_self = NONE + interaction_flags_atom = INTERACT_ATOM_UI_INTERACT + blocks_emissive = EMISSIVE_BLOCK_UNIQUE + integrity = 300 integrity_max = 300 integrity_failure = 100 diff --git a/code/game/machinery/holopad.dm b/code/game/machinery/holopad.dm index 806e2a7b2e8..3c1153178ad 100644 --- a/code/game/machinery/holopad.dm +++ b/code/game/machinery/holopad.dm @@ -28,6 +28,7 @@ GLOBAL_VAR_INIT(holopad_connectivity_rebuild_queued, FALSE) atom_flags = ATOM_HEAR show_messages = TRUE circuit = /obj/item/circuitboard/machine/holopad + interaction_flags_atom = parent_type::interaction_flags_atom | INTERACT_ATOM_IGNORE_MOBILITY plane = TURF_PLANE layer = ABOVE_TURF_LAYER use_power = USE_POWER_IDLE diff --git a/code/game/machinery/lathes/autolathe.dm b/code/game/machinery/lathes/autolathe.dm index 89e3dee4a10..949736be004 100644 --- a/code/game/machinery/lathes/autolathe.dm +++ b/code/game/machinery/lathes/autolathe.dm @@ -13,6 +13,7 @@ circuit = /obj/item/circuitboard/machine/lathe/autolathe design_holder = /datum/design_holder/lathe/autolathe lathe_type = LATHE_TYPE_AUTOLATHE + interaction_flags_atom = parent_type::interaction_flags_atom | INTERACT_ATOM_MOUSEDROP_IGNORE_CHECKS has_interface = TRUE active_icon_state = "active" print_icon_state = "print" diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index f950518faeb..78516c8879f 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -5,6 +5,10 @@ icon_state = "blueprints" attack_verb = list("attacked", "bapped", "hit") preserve_item = 1 + + integrity_flags = INTEGRITY_INDESTRUCTIBLE | INTEGRITY_LAVAPROOF | INTEGRITY_FIREPROOF | INTEGRITY_ACIDPROOF + interaction_flags_atom = parent_type::interaction_flags_atom | INTERACT_ATOM_ALLOW_USER_LOCATION | INTERACT_ATOM_IGNORE_MOBILITY + var/const/AREA_ERRNONE = 0 var/const/AREA_STATION = 1 var/const/AREA_SPACE = 2 diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 2833de79e52..fe5ba5570bf 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -29,6 +29,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list( icon_state = "walkietalkie" item_state = "radio" suit_storage_class = SUIT_STORAGE_CLASS_SOFTWEAR | SUIT_STORAGE_CLASS_HARDWEAR + interaction_flags_atom = parent_type::interaction_flags_atom | INTERACT_ATOM_ALLOW_USER_LOCATION | INTERACT_ATOM_IGNORE_MOBILITY ///FALSE for off var/on = TRUE diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 7ecd8ff2e31..fa84a425b48 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -1,8 +1,11 @@ /obj/structure icon = 'icons/obj/structures.dmi' + abstract_type = /obj/structure w_class = WEIGHT_CLASS_HUGE pass_flags = ATOM_PASS_BUCKLED + interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT + // todo: rename to default_unanchor, allow generic structure unanchoring. var/allow_unanchor = FALSE var/breakable = FALSE diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index 9c8fd5b3e79..cc100ca565f 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -16,6 +16,7 @@ FLOOR SAFES icon_state = "safe" anchored = TRUE density = TRUE + interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT integrity_flags = INTEGRITY_INDESTRUCTIBLE | INTEGRITY_LAVAPROOF | INTEGRITY_FIREPROOF | INTEGRITY_ACIDPROOF /// The maximum combined w_class of stuff in the safe diff --git a/code/game/rendering/screen.dm b/code/game/rendering/screen.dm index 17e9b7feb8d..65a1603d62a 100644 --- a/code/game/rendering/screen.dm +++ b/code/game/rendering/screen.dm @@ -8,6 +8,7 @@ appearance_flags = APPEARANCE_UI var/obj/master = null //A reference to the object in the slot. Grabs or items, generally. var/datum/hud/hud_legacy = null // A reference to the owner HUD, if any. + interaction_flags_atom = parent_type::interaction_flags_atom | INTERACT_ATOM_MOUSEDROP_IGNORE_CHECKS /** * called to resync to a hud_style datum diff --git a/code/modules/artwork/items/crayon.dm b/code/modules/artwork/items/crayon.dm index 438b63c9a39..e41bb1ea6c4 100644 --- a/code/modules/artwork/items/crayon.dm +++ b/code/modules/artwork/items/crayon.dm @@ -9,6 +9,7 @@ pickup_sound = 'sound/items/pickup/gloves.ogg' pen_color = "#FF0000" //RGB clickable = FALSE + interaction_flags_atom = parent_type::interaction_flags_atom | INTERACT_ATOM_IGNORE_MOBILITY // todo: reorganize vars /// color name diff --git a/code/modules/atmospherics/machinery/machinery.dm b/code/modules/atmospherics/machinery/machinery.dm index bce4d67312c..295f22a63f7 100644 --- a/code/modules/atmospherics/machinery/machinery.dm +++ b/code/modules/atmospherics/machinery/machinery.dm @@ -23,6 +23,7 @@ Pipelines + Other Objects -> Pipe network depth_projected = FALSE hides_underfloor = OBJ_UNDERFLOOR_UNLESS_PLACED_ONTOP hides_underfloor_defaulting = FALSE + interaction_flags_atom = parent_type::interaction_flags_atom | INTERACT_ATOM_IGNORE_MOBILITY //* Underfloor *// /// automatically update_underlays() during update_underfloor diff --git a/code/modules/industry/disposals/disposal/chute.dm b/code/modules/industry/disposals/disposal/chute.dm index cfcee9f665a..cda20830867 100644 --- a/code/modules/industry/disposals/disposal/chute.dm +++ b/code/modules/industry/disposals/disposal/chute.dm @@ -20,6 +20,8 @@ anchored = TRUE density = TRUE pass_flags_self = ATOM_PASS_OVERHEAD_THROW + interaction_flags_machine = INTERACT_MACHINE_OPEN | INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON + var/datum/gas_mixture/air_contents // internal reservoir var/mode = 1 // item mode 0=off 1=charging 2=charged var/flush = FALSE // true if flush handle is pulled diff --git a/code/modules/instruments/instruments/stationary.dm b/code/modules/instruments/instruments/stationary.dm index 1adf54e84ac..a956d60ef27 100644 --- a/code/modules/instruments/instruments/stationary.dm +++ b/code/modules/instruments/instruments/stationary.dm @@ -1,7 +1,7 @@ /obj/structure/musician name = "Not A Piano" desc = "Something broke, contact coderbus." - //interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT | INTERACT_ATOM_REQUIRES_DEXTERITY + interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT | INTERACT_ATOM_REQUIRES_DEXTERITY var/can_play_unanchored = FALSE var/list/allowed_instrument_ids var/datum/song/song diff --git a/code/modules/mining/misc/abandonedcrates.dm b/code/modules/mining/misc/abandonedcrates.dm index ed643f2d23c..8c9e61e23ab 100644 --- a/code/modules/mining/misc/abandonedcrates.dm +++ b/code/modules/mining/misc/abandonedcrates.dm @@ -1,3 +1,5 @@ +//Originally coded by ISaidNo, later modified by Kelenius. Ported from Baystation12. + /obj/structure/closet/crate/secure/loot name = "abandoned crate" desc = "What could be inside?" @@ -9,6 +11,7 @@ var/attempts = 10 var/codelen = 4 locked = 1 + interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND /obj/structure/closet/crate/secure/loot/Initialize(mapload) . = ..() diff --git a/code/modules/mob/freelook/eye.dm b/code/modules/mob/freelook/eye.dm index 22063859d01..f159e35316e 100644 --- a/code/modules/mob/freelook/eye.dm +++ b/code/modules/mob/freelook/eye.dm @@ -18,6 +18,7 @@ see_in_dark = 7 plane = OBSERVER_PLANE status_flags = STATUS_GODMODE + interaction_range = INFINITY var/mob/owner = null var/list/visibleChunks = list() diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index b9622b5492b..2c9fc05edeb 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -445,6 +445,25 @@ var/list/ai_verbs_default = list( return -1 return 0 +/mob/living/silicon/ai/can_interact_with(atom/A, treat_mob_as_adjacent) + . = ..() + if (.) + return + var/turf/ai_turf = get_turf(src) + var/turf/target_turf = get_turf(A) + + if(!target_turf) + return + + if (!is_same_map(ai_turf, target_turf)) + return FALSE + + if (istype(loc, /obj/item/aicard)) + if (!ai_turf) + return FALSE + return ISINRANGE(target_turf.x, ai_turf.x - interaction_range, ai_turf.x + interaction_range) \ + && ISINRANGE(target_turf.y, ai_turf.y - interaction_range, ai_turf.y + interaction_range) + /mob/living/silicon/ai/restrained() return 0 diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 3fe8f9b45c2..506a3342a46 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -24,6 +24,8 @@ voice_name = "synthesized voice" silicon_privileges = PRIVILEGES_SILICON rad_flags = RAD_BLOCK_CONTENTS + interaction_range = 7 //wireless control range + var/syndicate = 0 var/const/MAIN_CHANNEL = "Main Frequency" var/lawchannel = MAIN_CHANNEL // Default channel on which to state laws diff --git a/code/modules/mob/mob-inventory-abstraction.dm b/code/modules/mob/mob-inventory-abstraction.dm index eecf0936dfe..84a4bcf274e 100644 --- a/code/modules/mob/mob-inventory-abstraction.dm +++ b/code/modules/mob/mob-inventory-abstraction.dm @@ -196,7 +196,7 @@ if(!(flags & INV_OP_NO_UPDATE_ICONS)) update_inv_hand(index) - if(!(I.interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_ON_TOUCH)) + if(!(I.interaction_flags_atom & INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND)) I.add_fingerprint(src) else I.add_hiddenprint(src) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 4ee892a9ba8..60186edcf87 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1468,6 +1468,27 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0) /mob/is_avoiding_ground() return ..() || hovering || flying || (buckled?.buckle_flags & BUCKLING_GROUND_HOIST) || buckled?.is_avoiding_ground() +///Can the mob interact() with an atom? +/mob/proc/can_interact_with(atom/A, treat_mob_as_adjacent) + if(isAdminGhostAI(src)) + return TRUE + //Return early. we do not need to check that we are on adjacent turfs (i.e we are inside a closet) + if (treat_mob_as_adjacent && src == A.loc) + return TRUE + if (Adjacent(A)) + return TRUE + if((MUTATION_TELEKINESIS in mutations) && (get_dist(src, A) > tk_maxrange)) + return TRUE + + //range check + if(!interaction_range) // If you don't have extra length, GO AWAY + return FALSE + var/turf/our_turf = get_turf(src) + var/turf/their_turf = get_turf(A) + if (!our_turf || !their_turf) + return FALSE + return ISINRANGE(their_turf.x, our_turf.x - interaction_range, our_turf.x + interaction_range) && ISINRANGE(their_turf.y, our_turf.y - interaction_range, our_turf.y + interaction_range) + /** * Get the mob VV dropdown extras */ diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 4c6adab4944..6e08313f3f0 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -421,3 +421,5 @@ ///List of progress bars this mob is currently seeing for actions var/list/progressbars = null //for stacking do_after bars + + var/interaction_range = 0 //how far a mob has to be to interact with something without caring about obsctruction, defaulted to 0 tiles diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index a396a5332ad..ab51d699b80 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -5,6 +5,7 @@ INITIALIZE_IMMEDIATE(/mob/new_player) var/totalPlayers = 0 // Player counts for the Lobby tab var/totalPlayersReady = 0 var/datum/browser/panel + interaction_flags_atom = parent_type::interaction_flags_atom | INTERACT_ATOM_MOUSEDROP_IGNORE_CHECKS universal_speak = 1 invisibility = 101 diff --git a/code/modules/mob/observer/dead/dead.dm b/code/modules/mob/observer/dead/dead.dm index 8361a8584fd..c09bdb319b2 100644 --- a/code/modules/mob/observer/dead/dead.dm +++ b/code/modules/mob/observer/dead/dead.dm @@ -13,6 +13,7 @@ GLOBAL_LIST_EMPTY(ghost_list) mobility_flags = NONE anchored = TRUE invisibility = INVISIBILITY_OBSERVER + interaction_flags_atom = parent_type::interaction_flags_atom | INTERACT_ATOM_MOUSEDROP_IGNORE_CHECKS SET_APPEARANCE_FLAGS(PIXEL_SCALE | KEEP_TOGETHER) /// Were we admin-ghosted? diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index ec13273d7a6..1baaaeca535 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -14,6 +14,8 @@ var/recent_fault = 0 var/power_output = 1 + interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT | INTERACT_ATOM_REQUIRES_ANCHORED + /obj/machinery/power/port_gen/proc/IsBroken() return (machine_stat & (BROKEN|EMPED)) diff --git a/code/modules/tgui/states.dm b/code/modules/tgui/states.dm index 445cf7ec2a8..d1c89e12d0d 100644 --- a/code/modules/tgui/states.dm +++ b/code/modules/tgui/states.dm @@ -40,10 +40,10 @@ return UI_UPDATE return UI_INTERACTIVE -// /mob/living/shared_ui_interaction(atom/src_object) -// . = ..() -// if(!(mobility_flags & MOBILITY_UI) && !(src_object.interaction_flags_atom & INTERACT_ATOM_IGNORE_MOBILITY) && . == UI_INTERACTIVE) -// return UI_UPDATE +/mob/living/shared_ui_interaction(atom/src_object) + . = ..() + if(!(mobility_flags & MOBILITY_CAN_UI) && !(src_object.interaction_flags_atom & INTERACT_ATOM_IGNORE_MOBILITY) && . == UI_INTERACTIVE) + return UI_UPDATE /mob/living/silicon/ai/shared_ui_interaction(src_object) // Disable UIs if the AI is unpowered. diff --git a/code/modules/vehicles/sealed.dm b/code/modules/vehicles/sealed.dm index deaf039bbe4..d3694702140 100644 --- a/code/modules/vehicles/sealed.dm +++ b/code/modules/vehicles/sealed.dm @@ -3,6 +3,7 @@ */ /obj/vehicle/sealed enclosed = TRUE // you're in a sealed vehicle dont get dinked idiot + interaction_flags_atom = parent_type::interaction_flags_atom | INTERACT_ATOM_IGNORE_MOBILITY //* Occupants - Actions *// occupant_actions = list( diff --git a/code/modules/vehicles/sealed/mecha/mech_fabricator.dm b/code/modules/vehicles/sealed/mecha/mech_fabricator.dm index 96f39172c09..8b98f324424 100644 --- a/code/modules/vehicles/sealed/mecha/mech_fabricator.dm +++ b/code/modules/vehicles/sealed/mecha/mech_fabricator.dm @@ -13,6 +13,7 @@ circuit = /obj/item/circuitboard/mechfab lathe_type = LATHE_TYPE_MECHFAB | LATHE_TYPE_PROSTHETICS + interaction_flags_atom = parent_type::interaction_flags_atom | INTERACT_ATOM_MOUSEDROP_IGNORE_CHECKS has_interface = TRUE var/datum/research/files