mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Fixes for previous commits.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
/*
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user