Merge pull request #6167 from Heroman3003/laptop-bugfixes

Fixes some bugs with laptop
This commit is contained in:
Neerti
2019-05-19 17:23:08 -04:00
committed by VirgoBot
parent f57ab4695a
commit 3e1555c4f8

View File

@@ -16,7 +16,10 @@
w_class = ITEMSIZE_NORMAL
var/icon_state_closed = "laptop-closed"
/obj/item/modular_computer/laptop/AltClick()
/obj/item/modular_computer/laptop/AltClick(mob/living/carbon/user)
// We need to be close to it to open it
if((!in_range(src, user)) || user.stat || user.restrained())
return
// Prevents carrying of open laptops inhand.
// While they work inhand, i feel it'd make tablets lose some of their high-mobility advantage they have over laptops now.
if(!istype(loc, /turf/))
@@ -41,7 +44,9 @@
..()
else
overlays.Cut()
set_light(0) // No glow from closed laptops
icon_state = icon_state_closed
/obj/item/modular_computer/laptop/preset
anchored = FALSE
screen_on = FALSE