Fixes some objects not being pulled with ctrl-click (#84190)

## About The Pull Request
Fix for a bug where using ctrl-click to try to pull the bluespace gas
sender and hydroponics tray isn't working. Seems to be broken since the
ctrl-click refactor.

Fixes #84222
## Changelog
🆑
fix: Fixed ctrl-click not dragging the bluespace gas sender or
hydroponics trays.
/🆑
This commit is contained in:
GoblinBackwards
2024-06-24 14:03:51 -07:00
committed by GitHub
parent 01b63eb1cb
commit c49ba598fc
2 changed files with 5 additions and 4 deletions
@@ -61,7 +61,8 @@ GLOBAL_LIST_EMPTY_TYPED(bluespace_senders, /obj/machinery/atmospherics/component
/obj/machinery/atmospherics/components/unary/bluespace_sender/add_context(atom/source, list/context, obj/item/held_item, mob/user)
. = ..()
context[SCREENTIP_CONTEXT_CTRL_LMB] = "Turn [on ? "off" : "on"]"
if(anchored && !panel_open && is_operational)
context[SCREENTIP_CONTEXT_CTRL_LMB] = "Turn [on ? "off" : "on"]"
if(!held_item)
return CONTEXTUAL_SCREENTIP_SET
switch(held_item.tool_behaviour)
@@ -156,7 +157,7 @@ GLOBAL_LIST_EMPTY_TYPED(bluespace_senders, /obj/machinery/atmospherics/component
investigate_log("was turned [on ? "on" : "off"] by [key_name(user)]", INVESTIGATE_ATMOS)
update_appearance()
return CLICK_ACTION_SUCCESS
return CLICK_ACTION_BLOCKING
return NONE
/obj/machinery/atmospherics/components/unary/bluespace_sender/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
+2 -2
View File
@@ -1088,12 +1088,12 @@
user.examinate(src)
/obj/machinery/hydroponics/click_ctrl(mob/user)
if(!anchored)
return NONE
if(!powered())
to_chat(user, span_warning("[name] has no power."))
update_use_power(NO_POWER_USE)
return CLICK_ACTION_BLOCKING
if(!anchored)
return CLICK_ACTION_BLOCKING
set_self_sustaining(!self_sustaining)
to_chat(user, span_notice("You [self_sustaining ? "activate" : "deactivated"] [src]'s autogrow function[self_sustaining ? ", maintaining the tray's health while using high amounts of power" : ""]."))
return CLICK_ACTION_SUCCESS