diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm index e269eb981c..dfb6de5e91 100644 --- a/code/_onclick/ai.dm +++ b/code/_onclick/ai.dm @@ -31,7 +31,7 @@ build_click(src, client.buildmode, params, A) return - if(control_disabled || stat) + if(stat) return var/list/modifiers = params2list(params) @@ -51,7 +51,7 @@ CtrlClickOn(A) return - if(!canClick()) + if(control_disabled || !canClick()) return if(aiCamera.in_camera_mode) @@ -89,24 +89,25 @@ */ /mob/living/silicon/ai/ShiftClickOn(var/atom/A) - if(A.AIShiftClick(src)) + if(!control_disabled && A.AIShiftClick(src)) return - ..() + ..() /mob/living/silicon/ai/CtrlClickOn(var/atom/A) - if(A.AICtrlClick(src)) + if(!control_disabled && A.AICtrlClick(src)) return - ..() + ..() /mob/living/silicon/ai/AltClickOn(var/atom/A) - if(A.AIAltClick(src)) + if(!control_disabled && A.AIAltClick(src)) return - ..() + ..() /mob/living/silicon/ai/MiddleClickOn(var/atom/A) - if(A.AIMiddleClick(src)) + if(!control_disabled && A.AIMiddleClick(src)) return - ..() + ..() + /* The following criminally helpful code is just the previous code cleaned up; I have no idea why it was in atoms.dm instead of respective files. @@ -115,11 +116,6 @@ /atom/proc/AICtrlShiftClick() return -/obj/machinery/door/airlock/AICtrlShiftClick() - if(emagged) - return - return - /atom/proc/AIShiftClick() return diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index e19e88b53f..2261ceb368 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -224,10 +224,8 @@ Only used for swapping hands */ /mob/proc/MiddleClickOn(var/atom/A) - return - -/mob/living/carbon/MiddleClickOn(var/atom/A) swap_hand() + return // In case of use break glass /* diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 282df655c4..555d249602 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -545,14 +545,10 @@ return 0 /obj/item/weapon/rig/proc/notify_ai(var/message) - if(!message || !installed_modules || !installed_modules.len) - return 0 - . = 0 - for(var/obj/item/rig_module/module in installed_modules) - for(var/mob/living/silicon/ai/ai in module.contents) - if(ai && ai.client && !ai.stat) - ai << "[message]" - . = 1 + for(var/obj/item/rig_module/ai_container/module in installed_modules) + if(module.integrated_ai && module.integrated_ai.client && !module.integrated_ai.stat) + module.integrated_ai << "[message]" + . = 1 /obj/item/weapon/rig/equipped(mob/living/carbon/human/M) ..() @@ -809,7 +805,7 @@ if(world.time < wearer_move_delay) return - if(!wearer.loc || !ai_can_move_suit(user, check_user_module = 1)) + if(!wearer || !wearer.loc || !ai_can_move_suit(user, check_user_module = 1)) return //This is sota the goto stop mobs from moving var diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 73624912ec..6592732277 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -136,8 +136,10 @@ return shock_damage +/mob/proc/swap_hand() + return -/mob/living/carbon/proc/swap_hand() +/mob/living/carbon/swap_hand() var/obj/item/item_in_hand = src.get_active_hand() if(item_in_hand) //this segment checks if the item in your hand is twohanded. if(istype(item_in_hand,/obj/item/weapon/material/twohanded)) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 93aa326df9..3b43c16543 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1371,10 +1371,16 @@ handle_regular_hud_updates() /mob/living/carbon/human/Check_Shoegrip() - if(istype(shoes, /obj/item/clothing/shoes/magboots) && (shoes.item_flags & NOSLIP)) //magboots + dense_object = no floating + if((shoes.item_flags & NOSLIP) && istype(shoes, /obj/item/clothing/shoes/magboots)) //magboots + dense_object = no floating return 1 return 0 /mob/living/carbon/human/can_stand_overridden() - return wearing_rig && wearing_rig.ai_can_move_suit(check_for_ai = 1) - + if(wearing_rig && wearing_rig.ai_can_move_suit(check_for_ai = 1)) + // Actually missing a leg will screw you up. Everything else can be compensated for. + for(var/limbcheck in list("l_leg","r_leg")) + var/obj/item/organ/affecting = get_organ(limbcheck) + if(!affecting) + return 0 + return 1 + return 0 diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 42bf695ee4..a0555a003d 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -697,7 +697,7 @@ return 0 /mob/proc/cannot_stand() - return stat || weakened || paralysis || resting || sleeping || (status_flags & FAKEDEATH) + return incapacitated() || restrained() || resting || sleeping || (status_flags & FAKEDEATH) //Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it. /mob/proc/update_canmove()