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

🆑
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.
/🆑
This commit is contained in:
The Sharkening
2026-04-24 17:11:20 -06:00
committed by GitHub
parent 1d2bb045e2
commit b8493cface
3 changed files with 25 additions and 39 deletions
+5 -2
View File
@@ -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),
+4 -1
View File
@@ -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)
@@ -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("<b>Control Shift Click</b> to open Protean strip menu.")
if(brain.dead)
if(!open)
. += isnull(refactory) ? span_warning("This Protean requires critical repairs! <b>Screwdriver them open.</b>... There does seem to be a tiny reset hole on the top of the Protean, it seems a <b>Pen</b> might fit in there.. ") : span_notice("<b>Repairing systems...</b>") //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),
),
)