mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 22:19:30 +01:00
Fixes many instances of lying mob getting shifted up (pixel_y reset to 0) by adding a lying_pixel_offset var to mob/living.
Removes the delay when toggling resting, sleeping and pouncing, the mob sprite will now update instantly.
This commit is contained in:
@@ -44,12 +44,14 @@
|
||||
|
||||
/obj/structure/stool/bed/nest/post_buckle_mob(mob/living/M)
|
||||
if(M == buckled_mob)
|
||||
M.pixel_y += 6
|
||||
M.pixel_x += 2
|
||||
M.pixel_y = initial(M.pixel_y) + 6
|
||||
M.pixel_x = initial(M.pixel_x) + 2
|
||||
overlays += image('icons/mob/alien.dmi', "nestoverlay", layer=6)
|
||||
else
|
||||
M.pixel_x -= 2
|
||||
M.pixel_x = initial(M.pixel_x)
|
||||
M.pixel_y = initial(M.pixel_y)
|
||||
if(M.lying)
|
||||
M.pixel_y = M.lying_pixel_offset
|
||||
overlays.Cut()
|
||||
|
||||
/obj/structure/stool/bed/nest/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
|
||||
@@ -59,10 +59,8 @@
|
||||
icon = 'icons/obj/rollerbed.dmi'
|
||||
icon_state = "down"
|
||||
anchored = 0
|
||||
var/const/buckled_pixel_y_offset = 6 //Mobs buckled will have their pixel_y offset by this much
|
||||
|
||||
|
||||
/obj/structure/stool/bed/roller/post_buckle_mob(mob/M)
|
||||
/obj/structure/stool/bed/roller/post_buckle_mob(mob/living/M)
|
||||
if(M == buckled_mob)
|
||||
density = 1
|
||||
icon_state = "up"
|
||||
@@ -72,7 +70,7 @@
|
||||
icon_state = "down"
|
||||
M.pixel_y = initial(M.pixel_y)
|
||||
if(M.lying)
|
||||
M.pixel_y -= buckled_pixel_y_offset
|
||||
M.pixel_y = M.lying_pixel_offset
|
||||
|
||||
|
||||
/obj/item/roller
|
||||
|
||||
Reference in New Issue
Block a user