From b8493cface7ccff1b96de63bbdadf49c774ec0eb Mon Sep 17 00:00:00 2001 From: The Sharkening <95130227+StrangeWeirdKitten@users.noreply.github.com> Date: Fri, 24 Apr 2026 17:11:20 -0600 Subject: [PATCH] Protean Stripping fixes (#5432) Requires #5420 to be merged. ## About The Pull Request See changelog ## Why It's Good For The Game Bug fixes are good. Especially fixing bugs that brick you. ## Proof Of Testing ![dreamseeker_CzphTOTrRo](https://github.com/user-attachments/assets/62996ff4-4f83-45db-9e9e-08baefc4a64d) ## Changelog :cl: fix: Click dragging a protean modsuit onto yourself no longer unequips it, bricking you. del: Removed the Control Click Stripping functionality from Protean modsuits. It's now only click dragging. /:cl: --- code/datums/elements/strippable.dm | 7 ++- code/modules/mod/mod_control.dm | 5 +- .../species/proteans/protean_modsuit.dm | 52 ++++++------------- 3 files changed, 25 insertions(+), 39 deletions(-) diff --git a/code/datums/elements/strippable.dm b/code/datums/elements/strippable.dm index b2542f10139..f0442f43610 100644 --- a/code/datums/elements/strippable.dm +++ b/code/datums/elements/strippable.dm @@ -333,11 +333,14 @@ /// A lazy list of user mobs to a list of strip menu keys that they're interacting with var/list/interactions + /// Bubber variable - Primarily for Proteans. + var/needs_view = TRUE -/datum/strip_menu/New(atom/movable/owner, datum/element/strippable/strippable) +/datum/strip_menu/New(atom/movable/owner, datum/element/strippable/strippable, needs_view) // Bubber edit: needs_view arg . = ..() src.owner = owner src.strippable = strippable + src.needs_view = needs_view // Bubber edit /datum/strip_menu/Destroy() owner = null @@ -520,7 +523,7 @@ return min( ui_status_only_living(user, owner), ui_status_user_has_free_hands(user, owner), - ui_status_user_is_adjacent(user, owner, allow_tk = FALSE), + ui_status_user_is_adjacent(user, owner, allow_tk = FALSE, viewcheck = needs_view), // Bubber edit: Needs_view arg HAS_TRAIT(user, TRAIT_CAN_STRIP) ? UI_INTERACTIVE : UI_UPDATE, max( ui_status_user_is_conscious_and_lying_down(user), diff --git a/code/modules/mod/mod_control.dm b/code/modules/mod/mod_control.dm index 73205fb943b..e9f655d3e55 100644 --- a/code/modules/mod/mod_control.dm +++ b/code/modules/mod/mod_control.dm @@ -85,6 +85,8 @@ COOLDOWN_DECLARE(cooldown_mod_move) /// Person wearing the MODsuit. var/mob/living/carbon/human/wearer + /// BUBBER EDIT - For Proteans Primarily. To stop them + var/drag_pickup = TRUE /obj/item/mod/control/Initialize(mapload, datum/mod_theme/new_theme, new_skin, obj/item/mod/core/new_core) . = ..() @@ -107,7 +109,8 @@ module = new module(src) install(module) START_PROCESSING(SSobj, src) - AddElement(/datum/element/drag_pickup) + if(drag_pickup) // BUBBER EDIT + AddElement(/datum/element/drag_pickup) // BUBBER EDIT END /obj/item/mod/control/Destroy() STOP_PROCESSING(SSobj, src) diff --git a/modular_zubbers/code/modules/customization/species/proteans/protean_modsuit.dm b/modular_zubbers/code/modules/customization/species/proteans/protean_modsuit.dm index 3217dd8eba6..8152559411a 100644 --- a/modular_zubbers/code/modules/customization/species/proteans/protean_modsuit.dm +++ b/modular_zubbers/code/modules/customization/species/proteans/protean_modsuit.dm @@ -6,6 +6,7 @@ applied_core = /obj/item/mod/core/protean applied_cell = null // Goes off stomach resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF // funny nanite + drag_pickup = FALSE /// Whether or not the wearer can undeploy parts. var/modlocked = FALSE var/obj/item/mod/control/stored_modsuit @@ -18,7 +19,7 @@ /obj/item/mod/control/pre_equipped/protean/Initialize(mapload, datum/mod_theme/new_theme, new_skin, obj/item/mod/core/new_core) . = ..() ADD_TRAIT(src, TRAIT_NODROP, "protean") - AddElement(/datum/element/strippable/protean, GLOB.strippable_human_items, TYPE_PROC_REF(/mob/living/carbon/human/, should_strip)) + AddElement(/datum/element/strippable/protean, GLOB.strippable_human_items) /obj/item/mod/control/pre_equipped/protean/Destroy() if(stored_modsuit) @@ -313,7 +314,6 @@ var/t_has = protean_in_suit.p_have() var/t_is = protean_in_suit.p_are() if(!isnull(brain) || istype(brain)) - . += span_notice("Control Shift Click to open Protean strip menu.") if(brain.dead) if(!open) . += isnull(refactory) ? span_warning("This Protean requires critical repairs! Screwdriver them open.... There does seem to be a tiny reset hole on the top of the Protean, it seems a Pen might fit in there.. ") : span_notice("Repairing systems...") //Small line for how to memory reset a protean here too. @@ -337,50 +337,30 @@ * Protean stripping while they're in the suit. * Yeah I guess stripping is an element. Carry on, citizen. */ + /datum/element/strippable/protean -/datum/element/strippable/protean/Attach(datum/target, list/items, should_strip_proc_path) - . = ..() - RegisterSignal(target, COMSIG_CLICK_CTRL_SHIFT, PROC_REF(click_control_shit)) - -/datum/element/strippable/protean/Detach(datum/source) - . = ..() - UnregisterSignal(source, COMSIG_CLICK_CTRL_SHIFT) - -/datum/element/strippable/protean/proc/click_control_shit(datum/source, mob/user) - SIGNAL_HANDLER - +/// Overwrites the base proc for /datum/element/strippable to allow snowflake code. +/datum/element/strippable/protean/mouse_drop_onto(datum/source, atom/over, mob/user) var/obj/item/mod/control/pre_equipped/protean/suit = source - if(!istype(suit)) - return var/obj/item/mod/core/protean/core = suit.core var/datum/species/protean/species = core.linked_species + if(species.owner == user) return - if(suit.wearer == source) + if(over != user) + return + if(!user.can_perform_action(species.owner, FORBID_TELEKINESIS_REACH | ALLOW_RESTING)) return if (!isnull(should_strip_proc_path) && !call(species.owner, should_strip_proc_path)(user)) return - suit.balloon_alert_to_viewers("stripping") - user.visible_message(span_warning("[user] begins to dump the contents of [source]!")) - ASYNC - var/datum/strip_menu/protean/strip_menu = LAZYACCESS(strip_menus, species.owner) - if (isnull(strip_menu)) - strip_menu = new(species.owner, src) - LAZYSET(strip_menus, species.owner, strip_menu) - strip_menu.ui_interact(user) -/datum/strip_menu/protean + var/datum/strip_menu/strip_menu = LAZYACCESS(strip_menus, species.owner) + if (isnull(strip_menu)) + strip_menu = new(species.owner, src, FALSE) + LAZYSET(strip_menus, species.owner, strip_menu) + INVOKE_ASYNC(strip_menu, TYPE_PROC_REF(/datum/, ui_interact), user) + + return COMPONENT_CANCEL_MOUSEDROP_ONTO -/datum/strip_menu/protean/ui_status(mob/user, datum/ui_state/state) // Needs to pass a viewcheck. - return min( - ui_status_only_living(user, owner), - ui_status_user_has_free_hands(user, owner), - ui_status_user_is_adjacent(user, owner, allow_tk = FALSE, viewcheck = FALSE), - HAS_TRAIT(user, TRAIT_CAN_STRIP) ? UI_INTERACTIVE : UI_UPDATE, - max( - ui_status_user_is_conscious_and_lying_down(user), - ui_status_user_is_abled(user, owner), - ), - )