From d14f293f1f20dced8f40e9e88d3bc6b4aa031237 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 29 Mar 2021 00:31:36 +0200 Subject: [PATCH] [MIRROR] RPDs can install the unwrench upgrade by interacting with the disk (#4494) * rpds can now interact with the unwrench upgrade (#57959) Adds the functionality to upgrade the RPD by 'slapping' the unwrench upgrade disk with the RPD itself It doesn't exactly revolutionize gameplay and at most allows engineering cyborg players to at least upgrade their RPD to unwrench saving them a headache and a module slot when doing their thing I suppose * RPDs can install the unwrench upgrade by interacting with the disk Co-authored-by: DuffCreeper --- code/game/objects/items/RPD.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/game/objects/items/RPD.dm b/code/game/objects/items/RPD.dm index 12a0cdcdfcd..31cbbf9691d 100644 --- a/code/game/objects/items/RPD.dm +++ b/code/game/objects/items/RPD.dm @@ -259,6 +259,12 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list( /obj/item/pipe_dispenser/attack_self(mob/user) ui_interact(user) +/obj/item/pipe_dispenser/pre_attack(atom/target, mob/user, params) + if(istype(target, /obj/item/rpd_upgrade/unwrench)) + install_upgrade(target, user) + return TRUE + return ..() + /obj/item/pipe_dispenser/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/rpd_upgrade)) install_upgrade(W, user)