From 9ba280759efb578eac90698fc88f66f94adf340f Mon Sep 17 00:00:00 2001 From: Razharas Date: Sat, 14 May 2016 22:29:28 +0300 Subject: [PATCH 1/2] Fixes attacking blobs diagonally Fixes attacking blobs diagonally --- code/game/gamemodes/blob/theblob.dm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm index 72112430613..c9d38e72031 100644 --- a/code/game/gamemodes/blob/theblob.dm +++ b/code/game/gamemodes/blob/theblob.dm @@ -45,6 +45,20 @@ return ..() +/obj/effect/blob/Adjacent(var/atom/neighbour) + . = ..() + if(.) + var/list/result = list() + var/direction = get_dir(src, neighbour) + var/list/dirs = list("9" = list(NORTH, WEST), "5" = list(NORTH, EAST), "6" = list(SOUTH, EAST), "10" = list(SOUTH, WEST)) + for(var/A in dirs) + if(direction == text2num(A)) + for(var/B in dirs[A]) + var/C = locate(/obj/effect/blob) in get_step(src, B) + if(C) + result += C + . -= result.len - 1 + /obj/effect/blob/CanAtmosPass(turf/T) return !atmosblock From c7a4bf971d54a1f92a8a18e07d73b7a0fc297203 Mon Sep 17 00:00:00 2001 From: Razharas Date: Sat, 14 May 2016 23:16:35 +0300 Subject: [PATCH 2/2] Some fixes of fixes Some fixes of fixes --- code/game/gamemodes/blob/theblob.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm index c9d38e72031..5647c202066 100644 --- a/code/game/gamemodes/blob/theblob.dm +++ b/code/game/gamemodes/blob/theblob.dm @@ -48,16 +48,16 @@ /obj/effect/blob/Adjacent(var/atom/neighbour) . = ..() if(.) - var/list/result = list() + var/result = 0 var/direction = get_dir(src, neighbour) - var/list/dirs = list("9" = list(NORTH, WEST), "5" = list(NORTH, EAST), "6" = list(SOUTH, EAST), "10" = list(SOUTH, WEST)) + var/list/dirs = list("[NORTHWEST]" = list(NORTH, WEST), "[NORTHEAST]" = list(NORTH, EAST), "[SOUTHEAST]" = list(SOUTH, EAST), "[SOUTHWEST]" = list(SOUTH, WEST)) for(var/A in dirs) if(direction == text2num(A)) for(var/B in dirs[A]) var/C = locate(/obj/effect/blob) in get_step(src, B) if(C) - result += C - . -= result.len - 1 + result++ + . -= result - 1 /obj/effect/blob/CanAtmosPass(turf/T) return !atmosblock