Move buckling to /atom/movable, can now buckle to mobs if adminbooze

Also changed:
 - Comment clarifying what buckle_lying = -1 means
 - Changes direction of lying on operating tables, somehow missed it
This commit is contained in:
Tigercat2000
2015-09-30 15:29:47 -07:00
parent 7565da30ec
commit 575362b0f4
10 changed files with 79 additions and 54 deletions
+27 -3
View File
@@ -1019,9 +1019,6 @@ var/list/slot_equipment_priority = list( \
/mob/proc/facedir(var/ndir)
if(!canface()) return 0
dir = ndir
if(buckled && buckled.movable)
buckled.dir = ndir
buckled.handle_rotation()
client.move_delay += movement_delay()
return 1
@@ -1398,3 +1395,30 @@ mob/proc/yank_out_object()
/mob/proc/handle_ventcrawl()
return // Only living mobs can ventcrawl
//You can buckle on mobs if you're next to them since most are dense
/mob/buckle_mob(mob/living/M)
if(M.buckled)
return 0
var/turf/T = get_turf(src)
if(M.loc != T)
var/old_density = density
density = 0
var/can_step = step_towards(M, T)
density = old_density
if(!can_step)
return 0
return ..()
//Default buckling shift visual for mobs
/mob/post_buckle_mob(mob/living/M)
if(M == buckled_mob) //post buckling
M.pixel_y = initial(M.pixel_y) + 9
if(M.layer < layer)
M.layer = layer + 0.1
else //post unbuckling
M.layer = initial(M.layer)
M.pixel_y = initial(M.pixel_y)
/mob/proc/can_unbuckle(mob/user)
return 1