From feeead99e9cc70d7b5e9430a1d47bdbeb83b0f06 Mon Sep 17 00:00:00 2001 From: Firecage Date: Mon, 21 Jul 2014 14:21:41 +0200 Subject: [PATCH 1/2] Fixes AI code a bit >.> --- code/modules/mob/living/silicon/ai/ai.dm | 14 +++---- code/modules/mob/living/silicon/silicon.dm | 46 +++++++++++----------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 4dd7b44fef0..d88f03a27bb 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -251,14 +251,14 @@ var/list/ai_list = list() src.view_core() /mob/living/silicon/ai/verb/toggle_anchor() - set category = "AI Commands" - set name = "Toggle Floor Bolts" - if(!isturf(loc)) // if their location isn't a turf - return // stop - anchored = !anchored // Toggles the anchor + set category = "AI Commands" + set name = "Toggle Floor Bolts" + if(!isturf(loc)) // if their location isn't a turf + return // stop + anchored = !anchored // Toggles the anchor - src << "[anchored ? "You are now anchored." : "You are now unanchored."]" - // the message in the [] will change depending whether or not the AI is anchored + src << "[anchored ? "You are now anchored." : "You are now unanchored."]" + // the message in the [] will change depending whether or not the AI is anchored /mob/living/silicon/ai/update_canmove() //If the AI dies, mobs won't go through it anymore return 0 diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 5712d20ac89..06b452e6d59 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -276,29 +276,29 @@ usr << browse(list, "window=laws") /mob/living/silicon/Bump(atom/movable/AM as mob|obj, yes) //Allows the AI to bump into mobs if it's itself pushed - if ((!( yes ) || now_pushing)) - return - now_pushing = 1 - if(ismob(AM)) - var/mob/tmob = AM - if(!(tmob.status_flags & CANPUSH)) - now_pushing = 0 - return - now_pushing = 0 - ..() - if (!istype(AM, /atom/movable)) - return - if (!now_pushing) - now_pushing = 1 - if (!AM.anchored) - var/t = get_dir(src, AM) - if (istype(AM, /obj/structure/window)) - if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST) - for(var/obj/structure/window/win in get_step(AM,t)) - now_pushing = 0 - return - step(AM, t) - now_pushing = null + if ((!( yes ) || now_pushing)) + return + now_pushing = 1 + if(ismob(AM)) + var/mob/tmob = AM + if(!(tmob.status_flags & CANPUSH)) + now_pushing = 0 + return + now_pushing = 0 + ..() + if (!istype(AM, /atom/movable)) + return + if (!now_pushing) + now_pushing = 1 + if (!AM.anchored) + var/t = get_dir(src, AM) + if (istype(AM, /obj/structure/window)) + if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST) + for(var/obj/structure/window/win in get_step(AM,t)) + now_pushing = 0 + return + step(AM, t) + now_pushing = null /mob/living/silicon/put_in_hand_check() // This check is for borgs being able to receive items, not put them in others' hands. return 0 From c0c9702c13a837294d764435b56c5557c050d371 Mon Sep 17 00:00:00 2001 From: Firecage Date: Mon, 21 Jul 2014 14:56:23 +0200 Subject: [PATCH 2/2] Fuck fucking spaces --- code/modules/mob/mob.dm | 44 ++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index fd99c921327..5dc726708c5 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -645,28 +645,28 @@ var/list/slot_equipment_priority = list( \ //Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it. //Robots and brains have their own version so don't worry about them /mob/proc/update_canmove() - var/ko = weakened || paralysis || stat || (status_flags & FAKEDEATH) - var/bed = !(buckled && istype(buckled, /obj/structure/stool/bed/chair)) - if(ko || resting || stunned) - drop_r_hand() - drop_l_hand() - else - lying = 0 - canmove = 1 - if(buckled) - lying = 90 * bed - anchored = buckled - else - if((ko || resting) && !lying) - fall(ko) - canmove = !(ko || resting || stunned || buckled) - density = !lying - update_transform() - lying_prev = lying - if(update_icon) //forces a full overlay update - update_icon = 0 - regenerate_icons() - return canmove + var/ko = weakened || paralysis || stat || (status_flags & FAKEDEATH) + var/bed = !(buckled && istype(buckled, /obj/structure/stool/bed/chair)) + if(ko || resting || stunned) + drop_r_hand() + drop_l_hand() + else + lying = 0 + canmove = 1 + if(buckled) + lying = 90 * bed + anchored = buckled + else + if((ko || resting) && !lying) + fall(ko) + canmove = !(ko || resting || stunned || buckled) + density = !lying + update_transform() + lying_prev = lying + if(update_icon) //forces a full overlay update + update_icon = 0 + regenerate_icons() + return canmove /mob/proc/fall(var/forced) drop_l_hand()