ports pixelshifting

This commit is contained in:
Detective Google
2020-10-30 13:43:20 -05:00
parent c6a9a08635
commit 953cdfb800
4 changed files with 85 additions and 0 deletions
+4
View File
@@ -924,6 +924,10 @@ default behaviour is:
/mob/living/Moved(var/atom/oldloc, direct, forced, movetime)
. = ..()
handle_footstep(loc)
if(is_shifted)
is_shifted = FALSE
pixel_x = 0
pixel_y = 0
if(pulling) // we were pulling a thing and didn't lose it during our move.
var/pull_dir = get_dir(src, pulling)
+32
View File
@@ -1021,6 +1021,38 @@ mob/proc/yank_out_object()
set hidden = 1
set_face_dir(client.client_dir(WEST))
/mob/verb/shiftnorth()
set hidden = TRUE
if(!canface())
return FALSE
if(pixel_y <= 16)
pixel_y++
is_shifted = TRUE
/mob/verb/shiftsouth()
set hidden = TRUE
if(!canface())
return FALSE
if(pixel_y >= -16)
pixel_y--
is_shifted = TRUE
/mob/verb/shiftwest()
set hidden = TRUE
if(!canface())
return FALSE
if(pixel_x >= -16)
pixel_x--
is_shifted = TRUE
mob/verb/shifteast()
set hidden = TRUE
if(!canface())
return FALSE
if(pixel_x <= 16)
pixel_x++
is_shifted = TRUE
/mob/proc/adjustEarDamage()
return
+1
View File
@@ -83,6 +83,7 @@
var/resting = 0 //Carbon
var/lying = 0
var/lying_prev = 0
var/is_shifted = FALSE
var/canmove = 1
//Allows mobs to move through dense areas without restriction. For instance, in space or out of holder objects.
var/incorporeal_move = 0 //0 is off, 1 is normal, 2 is for ninjas.
+48
View File
@@ -53,6 +53,18 @@ macro "borghotkeymode"
elem
name = "SOUTH+REP"
command = ".movedown"
elem
name = "CTRL+SHIFT+NORTH"
command = "shiftnorth"
elem
name = "CTRL+SHIFT+SOUTH"
command = "shiftsouth"
elem
name = "CTRL+SHIFT+WEST"
command = "shiftwest"
elem
name = "CTRL+SHIFT+EAST"
command = "shifteast"
elem
name = "INSERT"
command = "a-intent right"
@@ -274,6 +286,18 @@ macro "macro"
elem
name = "SOUTH+REP"
command = ".movedown"
elem
name = "CTRL+SHIFT+NORTH"
command = "shiftnorth"
elem
name = "CTRL+SHIFT+SOUTH"
command = "shiftsouth"
elem
name = "CTRL+SHIFT+WEST"
command = "shiftwest"
elem
name = "CTRL+SHIFT+EAST"
command = "shifteast"
elem
name = "INSERT"
command = "a-intent right"
@@ -441,6 +465,18 @@ macro "hotkeymode"
elem
name = "SOUTH+REP"
command = ".movedown"
elem
name = "CTRL+SHIFT+NORTH"
command = "shiftnorth"
elem
name = "CTRL+SHIFT+SOUTH"
command = "shiftsouth"
elem
name = "CTRL+SHIFT+WEST"
command = "shiftwest"
elem
name = "CTRL+SHIFT+EAST"
command = "shifteast"
elem
name = "INSERT"
command = "a-intent right"
@@ -680,6 +716,18 @@ macro "borgmacro"
elem
name = "SOUTH+REP"
command = ".movedown"
elem
name = "CTRL+SHIFT+NORTH"
command = "shiftnorth"
elem
name = "CTRL+SHIFT+SOUTH"
command = "shiftsouth"
elem
name = "CTRL+SHIFT+WEST"
command = "shiftwest"
elem
name = "CTRL+SHIFT+EAST"
command = "shifteast"
elem
name = "INSERT"
command = "a-intent right"