From c0c1a40e81ad85b1e177e44bbed2de61c4e214ab Mon Sep 17 00:00:00 2001 From: monster860 Date: Fri, 6 Mar 2020 05:11:26 -0500 Subject: [PATCH 1/7] pixel shifting --- code/modules/keybindings/bindings_mob.dm | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/code/modules/keybindings/bindings_mob.dm b/code/modules/keybindings/bindings_mob.dm index f49235acf41d..4e804fcc064f 100644 --- a/code/modules/keybindings/bindings_mob.dm +++ b/code/modules/keybindings/bindings_mob.dm @@ -63,15 +63,31 @@ switch(SSinput.movement_keys[_key]) if(NORTH) northface() + if(client.keys_held["Shift"]) + northshift() + else + northface() return if(SOUTH) southface() + if(client.keys_held["Shift"]) + southshift() + else + southface() return if(WEST) westface() + if(client.keys_held["Shift"]) + westshift() + else + westface() return if(EAST) eastface() + if(client.keys_held["Shift"]) + eastshift() + else + eastface() return return ..() @@ -80,4 +96,4 @@ if("Alt") toggle_move_intent() return - return ..() \ No newline at end of file + return ..() From bc3bece918e20a489c0491ed6c9be2fb628c407c Mon Sep 17 00:00:00 2001 From: monster860 Date: Fri, 6 Mar 2020 05:12:31 -0500 Subject: [PATCH 2/7] Update mob.dm --- code/modules/mob/mob.dm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index bd802e2babab..89a8184f791b 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -663,6 +663,34 @@ client.last_turn = world.time + MOB_FACE_DIRECTION_DELAY return TRUE +/mob/verb/eastshift() + set hidden = TRUE + if(!canface()) + return FALSE + if(pixel_x <= 16) + pixel_x++ + +/mob/verb/westshift() + set hidden = TRUE + if(!canface()) + return FALSE + if(pixel_x >= -16) + pixel_x-- + +/mob/verb/northshift() + set hidden = TRUE + if(!canface()) + return FALSE + if(pixel_y <= 16) + pixel_y++ + +/mob/verb/southshift() + set hidden = TRUE + if(!canface()) + return FALSE + if(pixel_y >= -16) + pixel_y-- + /mob/proc/IsAdvancedToolUser()//This might need a rename but it should replace the can this mob use things check return FALSE From 654838c97d70338cbd6c35660bb4f01efcf658d9 Mon Sep 17 00:00:00 2001 From: monster860 Date: Fri, 6 Mar 2020 13:19:47 -0500 Subject: [PATCH 3/7] Update bindings_mob.dm --- code/modules/keybindings/bindings_mob.dm | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/code/modules/keybindings/bindings_mob.dm b/code/modules/keybindings/bindings_mob.dm index 4e804fcc064f..fc0b9ad56f30 100644 --- a/code/modules/keybindings/bindings_mob.dm +++ b/code/modules/keybindings/bindings_mob.dm @@ -63,32 +63,12 @@ switch(SSinput.movement_keys[_key]) if(NORTH) northface() - if(client.keys_held["Shift"]) - northshift() - else - northface() - return if(SOUTH) southface() - if(client.keys_held["Shift"]) - southshift() - else - southface() - return if(WEST) westface() - if(client.keys_held["Shift"]) - westshift() - else - westface() - return if(EAST) eastface() - if(client.keys_held["Shift"]) - eastshift() - else - eastface() - return return ..() /mob/key_up(_key, client/user) From cee85e4d847301707a753d8a58220d9834304004 Mon Sep 17 00:00:00 2001 From: monster860 Date: Fri, 6 Mar 2020 13:20:25 -0500 Subject: [PATCH 4/7] Update bindings_mob.dm --- .../code/modules/keybindings/bindings_mob.dm | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/yogstation/code/modules/keybindings/bindings_mob.dm b/yogstation/code/modules/keybindings/bindings_mob.dm index cd855c627ae8..94fef1777e10 100644 --- a/yogstation/code/modules/keybindings/bindings_mob.dm +++ b/yogstation/code/modules/keybindings/bindings_mob.dm @@ -71,17 +71,30 @@ dir = keys[_key] switch(dir) + switch(SSinput.movement_keys[_key]) if(NORTH) - northface() + if(client.keys_held["Shift"]) + northshift() + else + northface() return if(SOUTH) - southface() + if(client.keys_held["Shift"]) + southshift() + else + southface() return if(WEST) - westface() + if(client.keys_held["Shift"]) + westshift() + else + westface() return if(EAST) - eastface() + if(client.keys_held["Shift"]) + eastshift() + else + eastface() return - return ..() \ No newline at end of file + return ..() From 8a47d4822dedc8aa470a2fb1cb951a591507c1e8 Mon Sep 17 00:00:00 2001 From: monster860 Date: Fri, 6 Mar 2020 13:20:47 -0500 Subject: [PATCH 5/7] Update bindings_mob.dm --- yogstation/code/modules/keybindings/bindings_mob.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/yogstation/code/modules/keybindings/bindings_mob.dm b/yogstation/code/modules/keybindings/bindings_mob.dm index 94fef1777e10..7446932a251a 100644 --- a/yogstation/code/modules/keybindings/bindings_mob.dm +++ b/yogstation/code/modules/keybindings/bindings_mob.dm @@ -71,7 +71,6 @@ dir = keys[_key] switch(dir) - switch(SSinput.movement_keys[_key]) if(NORTH) if(client.keys_held["Shift"]) northshift() From a4ab3808fe828ce58c1ae4457fd8c556818d674e Mon Sep 17 00:00:00 2001 From: monster860 Date: Fri, 6 Mar 2020 13:21:08 -0500 Subject: [PATCH 6/7] Update bindings_mob.dm --- code/modules/keybindings/bindings_mob.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/modules/keybindings/bindings_mob.dm b/code/modules/keybindings/bindings_mob.dm index fc0b9ad56f30..8703794631a5 100644 --- a/code/modules/keybindings/bindings_mob.dm +++ b/code/modules/keybindings/bindings_mob.dm @@ -63,12 +63,16 @@ switch(SSinput.movement_keys[_key]) if(NORTH) northface() + return if(SOUTH) southface() + return if(WEST) westface() + return if(EAST) eastface() + return return ..() /mob/key_up(_key, client/user) From bd6ff0ddf45fbadaf39a1f402e68f8d1c92b24cb Mon Sep 17 00:00:00 2001 From: monster860 Date: Fri, 6 Mar 2020 16:15:13 -0500 Subject: [PATCH 7/7] Update bindings_mob.dm --- yogstation/code/modules/keybindings/bindings_mob.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yogstation/code/modules/keybindings/bindings_mob.dm b/yogstation/code/modules/keybindings/bindings_mob.dm index 7446932a251a..97e023cb37fe 100644 --- a/yogstation/code/modules/keybindings/bindings_mob.dm +++ b/yogstation/code/modules/keybindings/bindings_mob.dm @@ -72,25 +72,25 @@ switch(dir) if(NORTH) - if(client.keys_held["Shift"]) + if(user.prefs.bindings.isheld_key("Shift")) northshift() else northface() return if(SOUTH) - if(client.keys_held["Shift"]) + if(user.prefs.bindings.isheld_key("Shift")) southshift() else southface() return if(WEST) - if(client.keys_held["Shift"]) + if(user.prefs.bindings.isheld_key("Shift")) westshift() else westface() return if(EAST) - if(client.keys_held["Shift"]) + if(user.prefs.bindings.isheld_key("Shift")) eastshift() else eastface()