[MIRROR] Laptops give a slowdown when dragged [MDB IGNORE] (#21728)

* Laptops give a slowdown when dragged (#75809)

## About The Pull Request
Laptops have a slowdown when held in hand that could easily be bypassed
by just dragging the laptop instead so you can interact with it with no
slowdown.

It is the same slowdown from dragging lockers with 1.5, and by tests,
looks like the same slowdown given to laptop when held even if I
couldn't easily find the value properly defined anywhere...
## Why It's Good For The Game
If we designed Laptops to be better PDAs but with a bulkyness side
effect, kinda silly to let it be easily bypassed like this...
## Changelog
🆑 Guillaume Prata
fix: Laptops now give a slowdown when dragged, patching the easy trick
of dragging a laptop to bypass the slowdown for carrying it on hand.
/🆑

* Laptops give a slowdown when dragged

---------

Co-authored-by: GuillaumePrata <55374212+GuillaumePrata@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-06-11 01:49:39 +02:00
committed by GitHub
parent 694a30c6ae
commit f8022564ae
@@ -15,11 +15,12 @@
// No running around with open laptops in hands.
item_flags = SLOWS_WHILE_IN_HAND
drag_slowdown = 0
screen_on = FALSE // Starts closed
var/start_open = TRUE // unless this var is set to 1
var/icon_state_closed = "laptop-closed"
var/w_class_open = WEIGHT_CLASS_BULKY
var/slowdown_open = TRUE
var/slowdown_open = 1
/obj/item/modular_computer/laptop/examine(mob/user)
. = ..()
@@ -104,10 +105,16 @@
to_chat(user, span_notice("You close \the [src]."))
slowdown = initial(slowdown)
w_class = initial(w_class)
drag_slowdown = initial(drag_slowdown)
else
to_chat(user, span_notice("You open \the [src]."))
slowdown = slowdown_open
w_class = w_class_open
drag_slowdown = slowdown_open
if(isliving(loc))
var/mob/living/localmob = loc
localmob.update_equipment_speed_mods()
localmob.update_pull_movespeed()
screen_on = !screen_on
update_appearance()