From f8022564ae2d2f290af520db6e55cc09347a2827 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sun, 11 Jun 2023 01:49:39 +0200 Subject: [PATCH] [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 :cl: 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. /:cl: * Laptops give a slowdown when dragged --------- Co-authored-by: GuillaumePrata <55374212+GuillaumePrata@users.noreply.github.com> --- code/modules/modular_computers/computers/item/laptop.dm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/code/modules/modular_computers/computers/item/laptop.dm b/code/modules/modular_computers/computers/item/laptop.dm index bd4bd8e60f9..ceb4d61cc9a 100644 --- a/code/modules/modular_computers/computers/item/laptop.dm +++ b/code/modules/modular_computers/computers/item/laptop.dm @@ -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()