Merge pull request #11349 from monster860/pixel_erp

Pixel shifting for ERP
This commit is contained in:
Ghom
2020-03-10 18:01:52 +01:00
committed by GitHub
4 changed files with 53 additions and 4 deletions
@@ -1,6 +1,10 @@
/mob/living/Moved()
. = ..()
update_turf_movespeed(loc)
if(is_shifted)
is_shifted = FALSE
pixel_x = get_standard_pixel_x_offset(lying)
pixel_y = get_standard_pixel_y_offset(lying)
/mob/living/CanPass(atom/movable/mover, turf/target)
if((mover.pass_flags & PASSMOB))
+32
View File
@@ -705,6 +705,38 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
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++
is_shifted = TRUE
/mob/verb/westshift()
set hidden = TRUE
if(!canface())
return FALSE
if(pixel_x >= -16)
pixel_x--
is_shifted = TRUE
/mob/verb/northshift()
set hidden = TRUE
if(!canface())
return FALSE
if(pixel_y <= 16)
pixel_y++
is_shifted = TRUE
/mob/verb/southshift()
set hidden = TRUE
if(!canface())
return FALSE
if(pixel_y >= -16)
pixel_y--
is_shifted = TRUE
/mob/proc/IsAdvancedToolUser()//This might need a rename but it should replace the can this mob use things check
return FALSE
+1
View File
@@ -38,6 +38,7 @@
var/resting = 0 //Carbon
var/lying = 0
var/lying_prev = 0
var/is_shifted = FALSE
//MOVEMENT SPEED
var/list/movespeed_modification //Lazy list, see mob_movespeed.dm