From 6005276433f01d03cbd38825b337e293958c5b7c Mon Sep 17 00:00:00 2001
From: SkyratBot <59378654+SkyratBot@users.noreply.github.com>
Date: Sat, 15 Jun 2024 19:29:40 +0200
Subject: [PATCH] [MIRROR] Ctrl click refactor (#28157)
* Ctrl click refactor
* fex
---------
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
---
.../signals/signals_mob/signals_mob_main.dm | 4 +-
.../dcs/signals/signals_xeno_control.dm | 6 -
code/_onclick/click.dm | 52 --------
code/_onclick/click_ctrl.dm | 122 ++++++++++++++++++
code/_onclick/cyborg.dm | 6 +-
code/datums/components/food_storage.dm | 6 +-
code/game/atom/_atom.dm | 2 +-
code/game/objects/items.dm | 12 ++
.../objects/items/devices/pressureplates.dm | 7 +-
code/game/objects/items/his_grace.dm | 5 +-
code/game/objects/items/inspector.dm | 8 +-
code/game/objects/items/storage/bags.dm | 5 +-
.../antagonists/heretic/items/keyring.dm | 6 +-
.../components/binary_devices/passive_gate.dm | 7 +-
.../binary_devices/pressure_valve.dm | 7 +-
.../components/binary_devices/pump.dm | 7 +-
.../binary_devices/temperature_gate.dm | 7 +-
.../binary_devices/temperature_pump.dm | 7 +-
.../components/binary_devices/volume_pump.dm | 5 +-
.../gas_recipe_machines/crystallizer.dm | 10 +-
.../components/trinary_devices/filter.dm | 7 +-
.../components/trinary_devices/mixer.dm | 7 +-
.../unary_devices/bluespace_sender.dm | 10 +-
.../components/unary_devices/cryo.dm | 7 +-
.../unary_devices/outlet_injector.dm | 7 +-
.../components/unary_devices/thermomachine.dm | 11 +-
code/modules/basketball/hoop.dm | 12 +-
code/modules/cargo/universal_scanner.dm | 5 +-
code/modules/clothing/shoes/clown.dm | 7 +-
.../clothing/spacesuits/_spacesuits.dm | 13 +-
code/modules/clothing/under/_under.dm | 8 +-
.../food_and_drinks/machinery/microwave.dm | 11 +-
code/modules/hydroponics/hydroponics.dm | 16 +--
code/modules/mob/dead/observer/observer.dm | 4 +-
code/modules/mob/living/carbon/carbon.dm | 3 +-
.../computers/item/computer.dm | 5 +-
.../modular_computers/computers/item/pda.dm | 7 +-
code/modules/power/cable.dm | 3 +-
.../machinery/portable_chem_mixer.dm | 3 +-
.../reagents/reagent_containers/misc.dm | 3 +-
code/modules/recycling/sortingmachinery.dm | 4 +-
.../research/xenobiology/xenobio_camera.dm | 67 +++++-----
code/modules/transport/tram/tram_remote.dm | 3 +-
.../code/modules/clothing/towels.dm | 2 +-
modular_skyrat/modules/QOL/code/_under.dm | 2 +-
.../ashwalkers/code/items/ash_centrifuge.dm | 4 +-
.../conveyor_sorter/code/conveyor_sorter.dm | 2 +-
.../game/objects/items/devices/ttsdevice.dm | 4 +-
.../modules/clothing/masks/gasmask.dm | 2 +-
.../modules/clothing/masks/paper.dm | 2 +-
.../modules/clothing/storage/belts.dm | 2 +-
.../modules/hyposprays/code/hypospray_kits.dm | 2 +-
.../modules/hyposprays/code/hyposprays_II.dm | 2 +-
.../modules/hyposprays/code/hypovials.dm | 4 +-
.../modules/interaction_menu/code/click.dm | 2 +-
.../code/lewd_machinery/milking_machine.dm | 2 +-
.../code/lewd_structures/bdsm_furniture.dm | 6 +-
.../code/lewd_structures/construction.dm | 4 +-
.../code/lewd_structures/dancing_pole.dm | 8 +-
.../code/lewd_structures/shibari_stand.dm | 8 +-
.../code/millstone.dm | 2 +-
.../modules/tableflip/code/flipped_table.dm | 4 +-
.../wargame_projectors/code/projectors.dm | 4 +-
tgstation.dme | 1 +
64 files changed, 329 insertions(+), 254 deletions(-)
create mode 100644 code/_onclick/click_ctrl.dm
diff --git a/code/__DEFINES/dcs/signals/signals_mob/signals_mob_main.dm b/code/__DEFINES/dcs/signals/signals_mob/signals_mob_main.dm
index 17356199671..8ada1c30be3 100644
--- a/code/__DEFINES/dcs/signals/signals_mob/signals_mob_main.dm
+++ b/code/__DEFINES/dcs/signals/signals_mob/signals_mob_main.dm
@@ -185,8 +185,10 @@
#define COMSIG_MOB_ATTACK_RANGED "mob_attack_ranged"
///from base of mob/ranged_secondary_attack(): (atom/target, modifiers)
#define COMSIG_MOB_ATTACK_RANGED_SECONDARY "mob_attack_ranged_secondary"
-///From base of atom/ctrl_click(): (atom/A)
+///From base of /mob/base_click_ctrl: (atom/A)
#define COMSIG_MOB_CTRL_CLICKED "mob_ctrl_clicked"
+///From base of /mob/base_click_ctrl_shift: (atom/A)
+#define COMSIG_MOB_CTRL_SHIFT_CLICKED "mob_ctrl_shift_clicked"
///From base of mob/update_movespeed():area
#define COMSIG_MOB_MOVESPEED_UPDATED "mob_update_movespeed"
/// From /atom/movable/screen/zone_sel/proc/set_selected_zone.
diff --git a/code/__DEFINES/dcs/signals/signals_xeno_control.dm b/code/__DEFINES/dcs/signals/signals_xeno_control.dm
index 595f44f4f91..c67756a64f3 100644
--- a/code/__DEFINES/dcs/signals/signals_xeno_control.dm
+++ b/code/__DEFINES/dcs/signals/signals_xeno_control.dm
@@ -1,14 +1,8 @@
//Xenobio hotkeys
-///from slime CtrlClickOn(): (/mob)
-#define COMSIG_XENO_SLIME_CLICK_CTRL "xeno_slime_click_ctrl"
///from slime AltClickOn(): (/mob)
#define COMSIG_XENO_SLIME_CLICK_ALT "xeno_slime_click_alt"
///from slime ShiftClickOn(): (/mob)
#define COMSIG_XENO_SLIME_CLICK_SHIFT "xeno_slime_click_shift"
///from turf ShiftClickOn(): (/mob)
#define COMSIG_XENO_TURF_CLICK_SHIFT "xeno_turf_click_shift"
-///from turf AltClickOn(): (/mob)
-#define COMSIG_XENO_TURF_CLICK_CTRL "xeno_turf_click_alt"
-///from monkey CtrlClickOn(): (/mob)
-#define COMSIG_XENO_MONKEY_CLICK_CTRL "xeno_monkey_click_ctrl"
diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm
index 4e9f38e5f8a..4dde5a7f04a 100644
--- a/code/_onclick/click.dm
+++ b/code/_onclick/click.dm
@@ -341,64 +341,12 @@
if(user.client && (user.client.eye == user || user.client.eye == user.loc || flags & COMPONENT_ALLOW_EXAMINATE))
user.examinate(src)
-/**
- * Ctrl click
- * For most objects, pull
- */
-/mob/proc/CtrlClickOn(atom/A)
- A.CtrlClick(src)
- return
-
-/atom/proc/CtrlClick(mob/user)
- SEND_SIGNAL(src, COMSIG_CLICK_CTRL, user)
- SEND_SIGNAL(user, COMSIG_MOB_CTRL_CLICKED, src)
-
- var/mob/living/ML = user
- if(istype(ML))
- ML.pulled(src)
- if(!can_interact(user))
- return FALSE
-
-/mob/living/CtrlClick(mob/living/user)
- if(!isliving(user) || !user.CanReach(src) || user.incapacitated())
- return ..()
-
- if(world.time < user.next_move)
- return FALSE
-
- if(user.grab(src))
- user.changeNext_move(CLICK_CD_MELEE)
- return TRUE
-
- return ..()
-
-/mob/proc/CtrlMiddleClickOn(atom/A)
- if(check_rights_for(client, R_ADMIN))
- client.toggle_tag_datum(A)
- else
- A.CtrlClick(src)
- return
-
/mob/proc/TurfAdjacent(turf/tile)
return tile.Adjacent(src)
-/**
- * Control+Shift click
- * Unused except for AI
- */
-/mob/proc/CtrlShiftClickOn(atom/A)
- A.CtrlShiftClick(src)
- return
-
/mob/proc/ShiftMiddleClickOn(atom/A)
src.pointed(A)
return
-//SKYRAT EDIT NOTE: CtrlShiftClick for HUMANS has been overriden in click.dm in the interaction module.
-/atom/proc/CtrlShiftClick(mob/user)
- if(!can_interact(user))
- return FALSE
- SEND_SIGNAL(src, COMSIG_CLICK_CTRL_SHIFT, user)
- return
/*
Misc helpers
diff --git a/code/_onclick/click_ctrl.dm b/code/_onclick/click_ctrl.dm
new file mode 100644
index 00000000000..bb0491b2bb9
--- /dev/null
+++ b/code/_onclick/click_ctrl.dm
@@ -0,0 +1,122 @@
+/**
+ * Ctrl click
+ */
+/mob/proc/CtrlClickOn(atom/A)
+ base_click_ctrl(A)
+
+/**
+ * ### Base proc for ctrl click interaction left click.
+ *
+ * If you wish to add custom `click_ctrl` behavior for a single type, use that proc.
+ */
+/mob/proc/base_click_ctrl(atom/target)
+ SHOULD_NOT_OVERRIDE(TRUE)
+
+ // Check if they've hooked in to prevent src from ctrl clicking anything
+ if(SEND_SIGNAL(src, COMSIG_MOB_CTRL_CLICKED, target) & COMSIG_MOB_CANCEL_CLICKON)
+ return TRUE
+
+ // If it has a signal handler that returns a click action, done.
+ if(SEND_SIGNAL(target, COMSIG_CLICK_CTRL, src) & CLICK_ACTION_ANY)
+ return TRUE
+
+ var/can_use_click_action = FALSE
+ if(isturf(target))
+ // Turfs are special because they can't be used with can_perform_action
+ can_use_click_action = can_perform_turf_action(target)
+ else
+ can_use_click_action = can_perform_action(target, target.interaction_flags_click | SILENT_ADJACENCY)
+ if(!can_use_click_action)
+ return TRUE
+
+ // If it has a custom click_alt that returns success/block, done.
+ return target.click_ctrl(src) & CLICK_ACTION_ANY
+
+/**
+ * Ctrl click
+ * For most objects, pull
+ */
+/mob/living/base_click_ctrl(atom/target)
+ SHOULD_NOT_OVERRIDE(TRUE)
+
+ . = ..()
+ if(. || world.time < next_move || !CanReach(target))
+ return
+
+ . = TRUE
+ if(grab(target))
+ changeNext_move(CLICK_CD_MELEE)
+ return
+ pulled(target)
+
+/**
+ * Ctrl mouse wheel click
+ * Except for tagging datumns same as control click
+ */
+/mob/proc/CtrlMiddleClickOn(atom/A)
+ if(check_rights_for(client, R_ADMIN))
+ client.toggle_tag_datum(A)
+ return
+ CtrlClickOn(A)
+
+/**
+ * ## Custom ctrl click interaction
+ * Override this to change default ctrl click behavior. Return `CLICK_ACTION_SUCCESS`, `CLICK_ACTION_BLOCKING` or `NONE`.
+ *
+ * ### Guard clauses
+ * Consider adding `interaction_flags_click` before adding unique guard clauses.
+ *
+ * ### Return flags
+ * Forgetting your return will cause the default ctrl click behavior to occur thereafter.
+ *
+ * Returning any value besides NONE will stop the attack chain and thus stop the object from getting pulled/grabbed
+ **/
+/atom/proc/click_ctrl(mob/user)
+ SHOULD_CALL_PARENT(FALSE)
+ return NONE
+
+
+/**
+ * Control+Shift click
+ * Unused except for AI
+ */
+/mob/proc/CtrlShiftClickOn(atom/A)
+ base_click_ctrl_shift(A)
+
+/**
+ * ### Base proc for ctrl shift click interaction left click.
+ *
+ * If you wish to add custom `click_ctrl_shift` behavior for a single type, use that proc.
+ */
+/mob/proc/base_click_ctrl_shift(atom/target)
+ SHOULD_NOT_OVERRIDE(TRUE)
+
+ // Check if they've hooked in to prevent src from ctrl clicking anything
+ if(SEND_SIGNAL(src, COMSIG_MOB_CTRL_SHIFT_CLICKED, target) & COMSIG_MOB_CANCEL_CLICKON)
+ return
+
+ // If it has a signal handler that returns a click action, done.
+ if(SEND_SIGNAL(target, COMSIG_CLICK_CTRL_SHIFT, src) & CLICK_ACTION_ANY)
+ return
+
+ var/can_use_click_action = FALSE
+ if(isturf(target))
+ // Turfs are special because they can't be used with can_perform_action
+ can_use_click_action = can_perform_turf_action(target)
+ else
+ can_use_click_action = can_perform_action(target, target.interaction_flags_click | SILENT_ADJACENCY)
+ if(!can_use_click_action)
+ return
+
+ // Proceed with ctrl shift click
+ target.click_ctrl_shift(src)
+
+/**
+ * ## Custom ctrl shift click interaction
+ *
+ * ### Guard clauses
+ * Consider adding `interaction_flags_click` before adding unique guard clauses.
+ **/
+/atom/proc/click_ctrl_shift(mob/user)
+ SHOULD_CALL_PARENT(FALSE)
+ return NONE
diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm
index 8443cbf4bdc..6edebe99bc3 100644
--- a/code/_onclick/cyborg.dm
+++ b/code/_onclick/cyborg.dm
@@ -97,9 +97,8 @@
/mob/living/silicon/robot/CtrlClickOn(atom/target)
target.BorgCtrlClick(src)
-
/atom/proc/BorgCtrlShiftClick(mob/living/silicon/robot/user) //forward to human click if not overridden
- CtrlShiftClick(user)
+ user.base_click_ctrl_shift(src)
/obj/machinery/door/airlock/BorgCtrlShiftClick(mob/living/silicon/robot/user) // Sets/Unsets Emergency Access Override Forwards to AI code.
if(get_dist(src, user) <= user.interaction_range && !(user.control_disabled))
@@ -116,9 +115,8 @@
else
..()
-
/atom/proc/BorgCtrlClick(mob/living/silicon/robot/user) //forward to human click if not overridden
- CtrlClick(user)
+ user.base_click_ctrl(src)
/obj/machinery/door/airlock/BorgCtrlClick(mob/living/silicon/robot/user) // Bolts doors. Forwards to AI code.
if(get_dist(src, user) <= user.interaction_range && !(user.control_disabled))
diff --git a/code/datums/components/food_storage.dm b/code/datums/components/food_storage.dm
index cb1008f88f0..873c1646adb 100644
--- a/code/datums/components/food_storage.dm
+++ b/code/datums/components/food_storage.dm
@@ -90,16 +90,16 @@
var/atom/food = parent
if(QDELETED(stored_item))
- return
+ return CLICK_ACTION_BLOCKING
if(!food.can_interact(user))
- return
+ return CLICK_ACTION_BLOCKING
user.visible_message(span_notice("[user.name] begins tearing at \the [parent]."), \
span_notice("You start to rip into \the [parent]."))
INVOKE_ASYNC(src, PROC_REF(begin_remove_item), user)
- return COMPONENT_CANCEL_ATTACK_CHAIN
+ return CLICK_ACTION_SUCCESS
/** Inserts the item into the food, after a do_after.
*
diff --git a/code/game/atom/_atom.dm b/code/game/atom/_atom.dm
index 60c6f554f7d..2ecda8cc8fe 100644
--- a/code/game/atom/_atom.dm
+++ b/code/game/atom/_atom.dm
@@ -136,7 +136,7 @@
///whether ghosts can see screentips on it
var/ghost_screentips = FALSE
- /// Flags to check for in can_perform_action. Used in alt-click checks
+ /// Flags to check for in can_perform_action. Used in alt-click & ctrl-click checks
var/interaction_flags_click = NONE
/// Flags to check for in can_perform_action for mouse drag & drop checks. To bypass checks see interaction_flags_atom mouse drop flags
var/interaction_flags_mouse_drop = NONE
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 76f7bd3f6e3..06683b8ca47 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -300,6 +300,18 @@
context[SCREENTIP_CONTEXT_ALT_LMB] = "Reskin"
return CONTEXTUAL_SCREENTIP_SET
+/obj/item/click_ctrl(mob/user)
+ SHOULD_NOT_OVERRIDE(TRUE)
+
+ //If the item is on the ground & not anchored we allow the player to drag it
+ . = item_ctrl_click(user)
+ if(. & CLICK_ACTION_ANY)
+ return (isturf(loc) && !anchored) ? NONE : . //allow the object to get dragged on the floor
+
+/// Subtypes only override this proc for ctrl click purposes. obeys same principles as ctrl_click()
+/obj/item/proc/item_ctrl_click(mob/user)
+ SHOULD_CALL_PARENT(FALSE)
+ return NONE
/// Called when an action associated with our item is deleted
/obj/item/proc/on_action_deleted(datum/source)
diff --git a/code/game/objects/items/devices/pressureplates.dm b/code/game/objects/items/devices/pressureplates.dm
index 1b6a5ee6db7..18bb026745a 100644
--- a/code/game/objects/items/devices/pressureplates.dm
+++ b/code/game/objects/items/devices/pressureplates.dm
@@ -75,15 +75,16 @@
sigdev = null
return ..()
-/obj/item/pressure_plate/CtrlClick(mob/user)
+/obj/item/pressure_plate/item_ctrl_click(mob/user)
if(protected)
to_chat(user, span_warning("You can't quite seem to turn this pressure plate off..."))
- return
+ return CLICK_ACTION_BLOCKING
active = !active
- if (active == TRUE)
+ if (active)
to_chat(user, span_notice("You turn [src] on."))
else
to_chat(user, span_notice("You turn [src] off."))
+ return CLICK_ACTION_SUCCESS
///Called from COMSIG_OBJ_HIDE to toggle the active part, because yeah im not making a special exception on the element to support it
/obj/item/pressure_plate/proc/ToggleActive(datum/source, underfloor_accessibility)
diff --git a/code/game/objects/items/his_grace.dm b/code/game/objects/items/his_grace.dm
index 83af88f003b..d1e128c0b5b 100644
--- a/code/game/objects/items/his_grace.dm
+++ b/code/game/objects/items/his_grace.dm
@@ -65,8 +65,9 @@
else
..()
-/obj/item/his_grace/CtrlClick(mob/user) //you can't pull his grace
- return
+/obj/item/his_grace/item_ctrl_click(mob/user)
+ //you can't pull his grace
+ return NONE
/obj/item/his_grace/examine(mob/user)
. = ..()
diff --git a/code/game/objects/items/inspector.dm b/code/game/objects/items/inspector.dm
index ab5db9b65ce..fec567071fc 100644
--- a/code/game/objects/items/inspector.dm
+++ b/code/game/objects/items/inspector.dm
@@ -17,6 +17,7 @@
righthand_file = 'icons/mob/inhands/items/devices_righthand.dmi'
throwforce = 0
w_class = WEIGHT_CLASS_TINY
+ interaction_flags_click = NEED_DEXTERITY
throw_range = 1
throw_speed = 1
///How long it takes to print on time each mode, ordered NORMAL, FAST, HONK
@@ -71,14 +72,15 @@
return
return ..()
-/obj/item/inspector/CtrlClick(mob/living/user)
- if(!user.can_perform_action(src, NEED_DEXTERITY) || !cell_cover_open || !cell)
- return ..()
+/obj/item/inspector/item_ctrl_click(mob/user)
+ if(!cell_cover_open || !cell)
+ return CLICK_ACTION_BLOCKING
user.visible_message(span_notice("[user] removes \the [cell] from [src]!"), \
span_notice("You remove [cell]."))
cell.add_fingerprint(user)
user.put_in_hands(cell)
cell = null
+ return CLICK_ACTION_SUCCESS
/obj/item/inspector/examine(mob/user)
. = ..()
diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm
index d7164988ddb..e3636876189 100644
--- a/code/game/objects/items/storage/bags.dm
+++ b/code/game/objects/items/storage/bags.dm
@@ -273,11 +273,10 @@
. = ..()
. += span_notice("Ctrl-click to activate seed extraction.")
-/obj/item/storage/bag/plants/portaseeder/CtrlClick(mob/user)
- if(user.incapacitated())
- return
+/obj/item/storage/bag/plants/portaseeder/item_ctrl_click(mob/user)
for(var/obj/item/plant in contents)
seedify(plant, 1)
+ return CLICK_ACTION_SUCCESS
// -----------------------------
// Sheet Snatcher
diff --git a/code/modules/antagonists/heretic/items/keyring.dm b/code/modules/antagonists/heretic/items/keyring.dm
index e1768b0fed3..dc1291bc034 100644
--- a/code/modules/antagonists/heretic/items/keyring.dm
+++ b/code/modules/antagonists/heretic/items/keyring.dm
@@ -118,12 +118,12 @@
var/obj/item/card/id/card = fused_ids[cardname]
shapeshift(card)
-/obj/item/card/id/advanced/heretic/CtrlClick(mob/user)
- . = ..()
+/obj/item/card/id/advanced/heretic/item_ctrl_click(mob/user)
if(!IS_HERETIC(user))
- return
+ return CLICK_ACTION_BLOCKING
inverted = !inverted
balloon_alert(user, "[inverted ? "now" : "no longer"] creating inverted rifts")
+ return CLICK_ACTION_SUCCESS
///Changes our appearance to the passed ID card
/obj/item/card/id/advanced/heretic/proc/shapeshift(obj/item/card/id/advanced/card)
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm b/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm
index fe6f9423b43..572e910d3fe 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm
@@ -30,13 +30,14 @@ Passive gate is similar to the regular pump except:
context[SCREENTIP_CONTEXT_ALT_LMB] = "Maximize target pressure"
return CONTEXTUAL_SCREENTIP_SET
-/obj/machinery/atmospherics/components/binary/passive_gate/CtrlClick(mob/user)
- if(can_interact(user))
+/obj/machinery/atmospherics/components/binary/passive_gate/click_ctrl(mob/user)
+ if(is_operational)
on = !on
balloon_alert(user, "turned [on ? "on" : "off"]")
investigate_log("was turned [on ? "on" : "off"] by [key_name(user)]", INVESTIGATE_ATMOS)
update_appearance()
- return ..()
+ return CLICK_ACTION_SUCCESS
+ return CLICK_ACTION_BLOCKING
/obj/machinery/atmospherics/components/binary/passive_gate/click_alt(mob/user)
if(target_pressure == MAX_OUTPUT_PRESSURE)
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pressure_valve.dm b/code/modules/atmospherics/machinery/components/binary_devices/pressure_valve.dm
index c3313322135..399feff1214 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/pressure_valve.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/pressure_valve.dm
@@ -22,13 +22,14 @@
context[SCREENTIP_CONTEXT_ALT_LMB] = "Maximize target pressure"
return CONTEXTUAL_SCREENTIP_SET
-/obj/machinery/atmospherics/components/binary/pressure_valve/CtrlClick(mob/user)
- if(can_interact(user))
+/obj/machinery/atmospherics/components/binary/pressure_valve/click_ctrl(mob/user)
+ if(is_operational)
on = !on
balloon_alert(user, "turned [on ? "on" : "off"]")
investigate_log("was turned [on ? "on" : "off"] by [key_name(user)]", INVESTIGATE_ATMOS)
update_appearance()
- return ..()
+ return CLICK_ACTION_SUCCESS
+ return CLICK_ACTION_BLOCKING
/obj/machinery/atmospherics/components/binary/pressure_valve/click_alt(mob/user)
if(target_pressure == MAX_OUTPUT_PRESSURE)
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm
index 035f3a0f996..63ba340f27f 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm
@@ -35,13 +35,14 @@
context[SCREENTIP_CONTEXT_ALT_LMB] = "Maximize target pressure"
return CONTEXTUAL_SCREENTIP_SET
-/obj/machinery/atmospherics/components/binary/pump/CtrlClick(mob/user)
- if(can_interact(user))
+/obj/machinery/atmospherics/components/binary/pump/click_ctrl(mob/user)
+ if(is_operational)
set_on(!on)
balloon_alert(user, "turned [on ? "on" : "off"]")
investigate_log("was turned [on ? "on" : "off"] by [key_name(user)]", INVESTIGATE_ATMOS)
update_appearance()
- return ..()
+ return CLICK_ACTION_SUCCESS
+ return CLICK_ACTION_BLOCKING
/obj/machinery/atmospherics/components/binary/pump/click_alt(mob/user)
if(target_pressure == MAX_OUTPUT_PRESSURE)
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/temperature_gate.dm b/code/modules/atmospherics/machinery/components/binary_devices/temperature_gate.dm
index d1202dbec94..b5a3740245a 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/temperature_gate.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/temperature_gate.dm
@@ -27,13 +27,14 @@
context[SCREENTIP_CONTEXT_ALT_LMB] = "Maximize target temperature"
return CONTEXTUAL_SCREENTIP_SET
-/obj/machinery/atmospherics/components/binary/temperature_gate/CtrlClick(mob/user)
- if(can_interact(user))
+/obj/machinery/atmospherics/components/binary/temperature_gate/click_ctrl(mob/user)
+ if(is_operational)
on = !on
balloon_alert(user, "turned [on ? "on" : "off"]")
investigate_log("was turned [on ? "on" : "off"] by [key_name(user)]", INVESTIGATE_ATMOS)
update_appearance()
- return ..()
+ return CLICK_ACTION_SUCCESS
+ return CLICK_ACTION_BLOCKING
/obj/machinery/atmospherics/components/binary/temperature_gate/click_alt(mob/user)
if(target_temperature == max_temperature)
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/temperature_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/temperature_pump.dm
index 2615b964ed8..3976e8db750 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/temperature_pump.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/temperature_pump.dm
@@ -22,13 +22,14 @@
context[SCREENTIP_CONTEXT_ALT_LMB] = "Maximize transfer rate"
return CONTEXTUAL_SCREENTIP_SET
-/obj/machinery/atmospherics/components/binary/temperature_pump/CtrlClick(mob/user)
- if(can_interact(user))
+/obj/machinery/atmospherics/components/binary/temperature_pump/click_ctrl(mob/user)
+ if(is_operational)
on = !on
balloon_alert(user, "turned [on ? "on" : "off"]")
investigate_log("was turned [on ? "on" : "off"] by [key_name(user)]", INVESTIGATE_ATMOS)
update_appearance()
- return ..()
+ return CLICK_ACTION_SUCCESS
+ return CLICK_ACTION_BLOCKING
/obj/machinery/atmospherics/components/binary/temperature_pump/click_alt(mob/user)
if(heat_transfer_rate == max_heat_transfer_rate)
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm
index 41dc549b858..ae8965ae056 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm
@@ -33,13 +33,14 @@
))
register_context()
-/obj/machinery/atmospherics/components/binary/volume_pump/CtrlClick(mob/user)
+/obj/machinery/atmospherics/components/binary/volume_pump/click_ctrl(mob/user)
if(can_interact(user))
set_on(!on)
balloon_alert(user, "turned [on ? "on" : "off"]")
investigate_log("was turned [on ? "on" : "off"] by [key_name(user)]", INVESTIGATE_ATMOS)
update_appearance()
- return ..()
+ return CLICK_ACTION_SUCCESS
+ return CLICK_ACTION_BLOCKING
/obj/machinery/atmospherics/components/binary/volume_pump/click_alt(mob/user)
if(transfer_rate == MAX_TRANSFER_RATE)
diff --git a/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm b/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm
index 98915686749..f0482c210a6 100644
--- a/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm
+++ b/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm
@@ -88,17 +88,17 @@
else
icon_state = "[base_icon_state]-off"
-/obj/machinery/atmospherics/components/binary/crystallizer/CtrlClick(mob/living/user)
- if(!can_interact(user))
- return
+/obj/machinery/atmospherics/components/binary/crystallizer/click_ctrl(mob/user)
+ if(!is_operational)
+ return CLICK_ACTION_BLOCKING
if(panel_open)
balloon_alert(user, "close panel!")
- return
+ return CLICK_ACTION_BLOCKING
on = !on
balloon_alert(user, "turned [on ? "on" : "off"]")
investigate_log("was turned [on ? "on" : "off"] by [key_name(user)]", INVESTIGATE_ATMOS)
update_icon()
- return ..()
+ return CLICK_ACTION_SUCCESS
///Checks if the reaction temperature is inside the range of temperature + a little deviation
/obj/machinery/atmospherics/components/binary/crystallizer/proc/check_temp_requirements()
diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm
index c6b4bd43be4..25217de538c 100644
--- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm
+++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm
@@ -24,13 +24,14 @@
context[SCREENTIP_CONTEXT_ALT_LMB] = "Maximize transfer rate"
return CONTEXTUAL_SCREENTIP_SET
-/obj/machinery/atmospherics/components/trinary/filter/CtrlClick(mob/user)
- if(can_interact(user))
+/obj/machinery/atmospherics/components/trinary/filter/click_ctrl(mob/user)
+ if(is_operational)
on = !on
balloon_alert(user, "turned [on ? "on" : "off"]")
investigate_log("was turned [on ? "on" : "off"] by [key_name(user)]", INVESTIGATE_ATMOS)
update_appearance()
- return ..()
+ return CLICK_ACTION_SUCCESS
+ return CLICK_ACTION_BLOCKING
/obj/machinery/atmospherics/components/trinary/filter/click_alt(mob/user)
if(transfer_rate == MAX_TRANSFER_RATE)
diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm
index f832adcb4ea..12a3c797160 100644
--- a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm
+++ b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm
@@ -27,13 +27,14 @@
context[SCREENTIP_CONTEXT_ALT_LMB] = "Maximize target pressure"
return CONTEXTUAL_SCREENTIP_SET
-/obj/machinery/atmospherics/components/trinary/mixer/CtrlClick(mob/user)
- if(can_interact(user))
+/obj/machinery/atmospherics/components/trinary/mixer/click_ctrl(mob/user)
+ if(is_operational)
on = !on
balloon_alert(user, "turned [on ? "on" : "off"]")
investigate_log("was turned [on ? "on" : "off"] by [key_name(user)]", INVESTIGATE_ATMOS)
update_appearance()
- return ..()
+ return CLICK_ACTION_SUCCESS
+ return CLICK_ACTION_BLOCKING
/obj/machinery/atmospherics/components/trinary/mixer/click_alt(mob/user)
if(target_pressure == MAX_OUTPUT_PRESSURE)
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/bluespace_sender.dm b/code/modules/atmospherics/machinery/components/unary_devices/bluespace_sender.dm
index 7d2efbd9321..6957389c351 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/bluespace_sender.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/bluespace_sender.dm
@@ -149,16 +149,14 @@ GLOBAL_LIST_EMPTY_TYPED(bluespace_senders, /obj/machinery/atmospherics/component
update_appearance()
return TRUE
-/obj/machinery/atmospherics/components/unary/bluespace_sender/CtrlClick(mob/living/user)
- if(!panel_open)
- if(!can_interact(user))
- return
+/obj/machinery/atmospherics/components/unary/bluespace_sender/click_ctrl(mob/user)
+ if(!panel_open && is_operational)
on = !on
balloon_alert(user, "turned [on ? "on" : "off"]")
investigate_log("was turned [on ? "on" : "off"] by [key_name(user)]", INVESTIGATE_ATMOS)
update_appearance()
- return
- . = ..()
+ return CLICK_ACTION_SUCCESS
+ return CLICK_ACTION_BLOCKING
/obj/machinery/atmospherics/components/unary/bluespace_sender/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
index 2eb0a605248..55237aba340 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
@@ -636,11 +636,12 @@
return FALSE
return ..()
-/obj/machinery/cryo_cell/CtrlClick(mob/user)
- if(can_interact(user) && !state_open)
+/obj/machinery/cryo_cell/click_ctrl(mob/user)
+ if(is_operational && !state_open)
set_on(!on)
balloon_alert(user, "turned [on ? "on" : "off"]")
- return ..()
+ return CLICK_ACTION_SUCCESS
+ return CLICK_ACTION_BLOCKING
/obj/machinery/cryo_cell/click_alt(mob/user)
//Required so players don't close the cryo on themselves without a doctor's help
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm
index 771301b60e4..3f87ca671fd 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm
@@ -54,13 +54,14 @@
multi_tool.set_buffer(src)
return ITEM_INTERACT_SUCCESS
-/obj/machinery/atmospherics/components/unary/outlet_injector/CtrlClick(mob/user)
- if(can_interact(user))
+/obj/machinery/atmospherics/components/unary/outlet_injector/click_ctrl(mob/user)
+ if(is_operational)
on = !on
balloon_alert(user, "turned [on ? "on" : "off"]")
investigate_log("was turned [on ? "on" : "off"] by [key_name(user)]", INVESTIGATE_ATMOS)
update_appearance()
- return ..()
+ return CLICK_ACTION_BLOCKING
+ return CLICK_ACTION_SUCCESS
/obj/machinery/atmospherics/components/unary/outlet_injector/click_alt(mob/user)
if(volume_rate == MAX_TRANSFER_RATE)
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm
index 01def672bf7..2fe1a8e430f 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm
@@ -313,19 +313,20 @@
update_appearance()
-/obj/machinery/atmospherics/components/unary/thermomachine/CtrlClick(mob/living/user)
+/obj/machinery/atmospherics/components/unary/thermomachine/click_ctrl(mob/user)
if(!anchored)
- return ..()
+ return NONE
if(panel_open)
balloon_alert(user, "close panel!")
- return
- if(!can_interact(user))
- return
+ return CLICK_ACTION_BLOCKING
+ if(!is_operational)
+ return CLICK_ACTION_BLOCKING
on = !on
balloon_alert(user, "turned [on ? "on" : "off"]")
investigate_log("was turned [on ? "on" : "off"] by [key_name(user)]", INVESTIGATE_ATMOS)
update_appearance()
+ return CLICK_ACTION_SUCCESS
/obj/machinery/atmospherics/components/unary/thermomachine/update_layer()
return
diff --git a/code/modules/basketball/hoop.dm b/code/modules/basketball/hoop.dm
index b26fa462b09..72669df017d 100644
--- a/code/modules/basketball/hoop.dm
+++ b/code/modules/basketball/hoop.dm
@@ -17,6 +17,7 @@
anchored = TRUE
density = TRUE
layer = ABOVE_MOB_LAYER
+ interaction_flags_click = NEED_DEXTERITY | NEED_HANDS | FORBID_TELEKINESIS_REACH
/// Keeps track of the total points scored
var/total_score = 0
/// The chance to score a ball into the hoop based on distance
@@ -133,16 +134,13 @@
baller.adjustStaminaLoss(STAMINA_COST_DUNKING_MOB)
baller.stop_pulling()
-/obj/structure/hoop/CtrlClick(mob/living/user)
- if(!user.can_perform_action(src, NEED_DEXTERITY|FORBID_TELEKINESIS_REACH|NEED_HANDS))
- return
-
+/obj/structure/hoop/click_ctrl(mob/user)
user.balloon_alert_to_viewers("resetting score...")
playsound(src, 'sound/machines/locktoggle.ogg', 50, TRUE)
if(do_after(user, 5 SECONDS, target = src))
total_score = 0
update_appearance()
- return ..()
+ return CLICK_ACTION_SUCCESS
/obj/structure/hoop/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
if(!isitem(AM))
@@ -182,8 +180,8 @@
return NONE
// No resetting the score for minigame hoops
-/obj/structure/hoop/minigame/CtrlClick(mob/living/user)
- return
+/obj/structure/hoop/minigame/click_ctrl(mob/user)
+ return CLICK_ACTION_BLOCKING
/obj/structure/hoop/minigame/score(obj/item/toy/basketball/ball, mob/living/baller, points)
var/is_team_hoop = !(baller.ckey in team_ckeys)
diff --git a/code/modules/cargo/universal_scanner.dm b/code/modules/cargo/universal_scanner.dm
index 434162a36d9..fdcbc9ba2bb 100644
--- a/code/modules/cargo/universal_scanner.dm
+++ b/code/modules/cargo/universal_scanner.dm
@@ -122,11 +122,12 @@
new_custom_price = chosen_price
to_chat(user, span_notice("[src] will now give things a [new_custom_price] cr tag."))
-/obj/item/universal_scanner/CtrlClick(mob/user)
- . = ..()
+/obj/item/universal_scanner/item_ctrl_click(mob/user)
+ . = CLICK_ACTION_BLOCKING
if(scanning_mode == SCAN_SALES_TAG)
payments_acc = null
to_chat(user, span_notice("You clear the registered account."))
+ return CLICK_ACTION_SUCCESS
/obj/item/universal_scanner/click_alt(mob/user)
if(!scanning_mode == SCAN_SALES_TAG)
diff --git a/code/modules/clothing/shoes/clown.dm b/code/modules/clothing/shoes/clown.dm
index 2f4b973f9a9..ee16103b734 100644
--- a/code/modules/clothing/shoes/clown.dm
+++ b/code/modules/clothing/shoes/clown.dm
@@ -30,18 +30,19 @@
if(is_clown_job(user.mind?.assigned_role))
user.clear_mood_event("clownshoes")
-/obj/item/clothing/shoes/clown_shoes/CtrlClick(mob/living/user)
+/obj/item/clothing/shoes/clown_shoes/item_ctrl_click(mob/user)
if(!isliving(user))
- return
+ return CLICK_ACTION_BLOCKING
if(user.get_active_held_item() != src)
to_chat(user, span_warning("You must hold the [src] in your hand to do this!"))
- return
+ return CLICK_ACTION_BLOCKING
if (!enabled_waddle)
to_chat(user, span_notice("You switch off the waddle dampeners!"))
enabled_waddle = TRUE
else
to_chat(user, span_notice("You switch on the waddle dampeners!"))
enabled_waddle = FALSE
+ return CLICK_ACTION_SUCCESS
/obj/item/clothing/shoes/clown_shoes/jester
name = "jester shoes"
diff --git a/code/modules/clothing/spacesuits/_spacesuits.dm b/code/modules/clothing/spacesuits/_spacesuits.dm
index 7c93019cb64..7a0932829f3 100644
--- a/code/modules/clothing/spacesuits/_spacesuits.dm
+++ b/code/modules/clothing/spacesuits/_spacesuits.dm
@@ -13,7 +13,7 @@
clothing_flags = STOPSPRESSUREDAMAGE | THICKMATERIAL | SNUG_FIT | STACKABLE_HELMET_EXEMPT | HEADINTERNALS
armor_type = /datum/armor/helmet_space
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDESNOUT
-
+ interaction_flags_click = NEED_DEXTERITY
cold_protection = HEAD
min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT
heat_protection = HEAD
@@ -201,12 +201,11 @@
return CLICK_ACTION_SUCCESS
/// Remove the cell whent he cover is open on CTRL+Click
-/obj/item/clothing/suit/space/CtrlClick(mob/living/user)
- if(user.can_perform_action(src, NEED_DEXTERITY))
- if(cell_cover_open && cell)
- remove_cell(user)
- return
- return ..()
+/obj/item/clothing/suit/space/item_ctrl_click(mob/user)
+ . = CLICK_ACTION_BLOCKING
+ if(cell_cover_open && cell)
+ remove_cell(user)
+ return CLICK_ACTION_SUCCESS
// Remove the cell when using the suit on its self
/obj/item/clothing/suit/space/attack_self(mob/user)
diff --git a/code/modules/clothing/under/_under.dm b/code/modules/clothing/under/_under.dm
index a91fb991040..e684d443eb0 100644
--- a/code/modules/clothing/under/_under.dm
+++ b/code/modules/clothing/under/_under.dm
@@ -341,15 +341,13 @@
if(H.w_uniform == src)
H.update_suit_sensors()
-/obj/item/clothing/under/CtrlClick(mob/user)
- . = ..()
- if(.)
- return
+/obj/item/clothing/under/item_ctrl_click(mob/user)
if(!can_toggle_sensors(user))
- return
+ return CLICK_ACTION_BLOCKING
sensor_mode = SENSOR_COORDS
balloon_alert(user, "set to tracking")
+ return CLICK_ACTION_SUCCESS
/// Checks if the toggler is allowed to toggle suit sensors currently
/obj/item/clothing/under/proc/can_toggle_sensors(mob/toggler)
diff --git a/code/modules/food_and_drinks/machinery/microwave.dm b/code/modules/food_and_drinks/machinery/microwave.dm
index 0f1be89410a..0cb98677234 100644
--- a/code/modules/food_and_drinks/machinery/microwave.dm
+++ b/code/modules/food_and_drinks/machinery/microwave.dm
@@ -479,13 +479,18 @@
visible_message(span_notice("[user] sets \the [src] to [vampire_charging_enabled ? "charge" : "cook"]."), blind_message = span_notice("You hear \the [src] make an informative beep!"))
return CLICK_ACTION_SUCCESS
-/obj/machinery/microwave/CtrlClick(mob/user)
- . = ..()
- if(user.can_perform_action(src) && cell_powered && !isnull(cell) && anchored)
+/obj/machinery/microwave/click_ctrl(mob/user)
+ if(!anchored)
+ return NONE
+
+ if(cell_powered && !isnull(cell))
user.put_in_hands(cell)
balloon_alert(user, "removed cell")
cell = null
update_appearance()
+ return CLICK_ACTION_SUCCESS
+
+ return CLICK_ACTION_BLOCKING
/obj/machinery/microwave/ui_interact(mob/user)
. = ..()
diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm
index 181a6fd9971..cea7ff50e53 100644
--- a/code/modules/hydroponics/hydroponics.dm
+++ b/code/modules/hydroponics/hydroponics.dm
@@ -9,6 +9,7 @@
pixel_z = 8
obj_flags = CAN_BE_HIT | UNIQUE_RENAME
circuit = /obj/item/circuitboard/machine/hydroponics
+ interaction_flags_click = FORBID_TELEKINESIS_REACH
use_power = NO_POWER_USE
///The amount of water in the tray (max 100)
var/waterlevel = 0
@@ -1086,19 +1087,16 @@
if(user)
user.examinate(src)
-/obj/machinery/hydroponics/CtrlClick(mob/user)
- . = ..()
- if(!user.can_perform_action(src, FORBID_TELEKINESIS_REACH))
- return
+/obj/machinery/hydroponics/click_ctrl(mob/user)
if(!powered())
to_chat(user, span_warning("[name] has no power."))
update_use_power(NO_POWER_USE)
- return
+ return CLICK_ACTION_BLOCKING
if(!anchored)
- return
+ 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
/obj/machinery/hydroponics/attack_hand_secondary(mob/user, list/modifiers)
. = ..()
@@ -1184,8 +1182,8 @@
deconstruct(disassembled = TRUE)
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
-/obj/machinery/hydroponics/soil/CtrlClick(mob/user)
- return //Soil has no electricity.
+/obj/machinery/hydroponics/soil/click_ctrl(mob/user)
+ return CLICK_ACTION_BLOCKING //Soil has no electricity.
/obj/machinery/hydroponics/soil/on_deconstruction(disassembled)
new /obj/item/stack/ore/glass(drop_location(), 3)
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index 3fedc6b4caf..cd9a72aeb6a 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -997,8 +997,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
game = create_mafia_game()
game.ui_interact(usr)
-/mob/dead/observer/CtrlShiftClick(mob/user)
- if(isobserver(user) && check_rights(R_SPAWN))
+/mob/dead/observer/CtrlShiftClickOn(atom/target)
+ if(check_rights(R_SPAWN))
change_mob_type(/mob/living/carbon/human , null, null, TRUE) //always delmob, ghosts shouldn't be left lingering
/mob/dead/observer/examine(mob/user)
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 4865f2ea3db..429638a545c 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -33,8 +33,7 @@
return ITEM_INTERACT_SUCCESS
return .
-/mob/living/carbon/CtrlShiftClick(mob/user)
- ..()
+/mob/living/carbon/click_ctrl_shift(mob/user)
if(iscarbon(user))
var/mob/living/carbon/carbon_user = user
carbon_user.give(src)
diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm
index ea9c18641df..a0c8658aae5 100644
--- a/code/modules/modular_computers/computers/item/computer.dm
+++ b/code/modules/modular_computers/computers/item/computer.dm
@@ -472,10 +472,7 @@
update_appearance(UPDATE_ICON)
return ..()
-/obj/item/modular_computer/CtrlShiftClick(mob/user)
- . = ..()
- if(.)
- return
+/obj/item/modular_computer/click_ctrl_shift(mob/user)
if(!inserted_disk)
return
user.put_in_hands(inserted_disk)
diff --git a/code/modules/modular_computers/computers/item/pda.dm b/code/modules/modular_computers/computers/item/pda.dm
index 90c90bb632e..765a32a7e73 100644
--- a/code/modules/modular_computers/computers/item/pda.dm
+++ b/code/modules/modular_computers/computers/item/pda.dm
@@ -162,12 +162,9 @@
return ITEM_INTERACT_SUCCESS
-/obj/item/modular_computer/pda/CtrlClick(mob/user)
- . = ..()
- if(.)
- return
-
+/obj/item/modular_computer/pda/item_ctrl_click(mob/user)
remove_pen(user)
+ return CLICK_ACTION_SUCCESS
///Finds how hard it is to send a virus to this tablet, checking all programs downloaded.
/obj/item/modular_computer/pda/proc/get_detomatix_difficulty()
diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm
index d259a7dba58..0a4a97f2025 100644
--- a/code/modules/power/cable.dm
+++ b/code/modules/power/cable.dm
@@ -764,9 +764,10 @@ GLOBAL_LIST(hub_radial_layer_list)
C.deconstruct() // remove adversary cable
auto_propagate_cut_cable(src) // update the powernets
-/obj/structure/cable/multilayer/CtrlClick(mob/living/user)
+/obj/structure/cable/multilayer/click_ctrl(mob/user)
to_chat(user, span_warning("You push the reset button."))
addtimer(CALLBACK(src, PROC_REF(Reload)), 10, TIMER_UNIQUE) //spam protect
+ return CLICK_ACTION_SUCCESS
// This is a mapping aid. In order for this to be placed on a map and function, all three layers need to have their nodes active
/obj/structure/cable/multilayer/connected
diff --git a/code/modules/reagents/chemistry/machinery/portable_chem_mixer.dm b/code/modules/reagents/chemistry/machinery/portable_chem_mixer.dm
index 5396839e13d..016e55012c5 100644
--- a/code/modules/reagents/chemistry/machinery/portable_chem_mixer.dm
+++ b/code/modules/reagents/chemistry/machinery/portable_chem_mixer.dm
@@ -260,7 +260,7 @@
update_appearance()
return CLICK_ACTION_SUCCESS
-/obj/item/storage/portable_chem_mixer/CtrlClick(mob/living/user)
+/obj/item/storage/portable_chem_mixer/item_ctrl_click(mob/user)
if(atom_storage.locked == STORAGE_FULLY_LOCKED)
atom_storage.locked = STORAGE_NOT_LOCKED
replace_beaker(user)
@@ -270,3 +270,4 @@
atom_storage.hide_contents(usr)
update_appearance()
+ return CLICK_ACTION_SUCCESS
diff --git a/code/modules/reagents/reagent_containers/misc.dm b/code/modules/reagents/reagent_containers/misc.dm
index 40be7c5f43d..f7152204f9e 100644
--- a/code/modules/reagents/reagent_containers/misc.dm
+++ b/code/modules/reagents/reagent_containers/misc.dm
@@ -50,13 +50,14 @@
STOP_PROCESSING(SSobj, src)
. = ..()
-/obj/item/reagent_containers/cup/maunamug/CtrlClick(mob/living/user)
+/obj/item/reagent_containers/cup/maunamug/item_ctrl_click(mob/user)
if(on)
change_power_status(FALSE)
else
if(!cell || cell.charge <= 0)
return FALSE //No power, so don't turn on
change_power_status(TRUE)
+ return CLICK_ACTION_SUCCESS
/obj/item/reagent_containers/cup/maunamug/proc/change_power_status(status)
on = status
diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm
index b4464517279..7a407d712a5 100644
--- a/code/modules/recycling/sortingmachinery.dm
+++ b/code/modules/recycling/sortingmachinery.dm
@@ -395,10 +395,10 @@
new_barcode.cut_multiplier = cut_multiplier // Also the registered percent cut.
user.put_in_hands(new_barcode)
-/obj/item/sales_tagger/CtrlClick(mob/user)
- . = ..()
+/obj/item/sales_tagger/item_ctrl_click(mob/user)
payments_acc = null
to_chat(user, span_notice("You clear the registered account."))
+ return CLICK_ACTION_SUCCESS
/obj/item/sales_tagger/click_alt(mob/user)
var/potential_cut = input("How much would you like to pay out to the registered card?","Percentage Profit ([round(cut_min*100)]% - [round(cut_max*100)]%)") as num|null
diff --git a/code/modules/research/xenobiology/xenobio_camera.dm b/code/modules/research/xenobiology/xenobio_camera.dm
index 9724bd776d8..ea4ef0e9b7e 100644
--- a/code/modules/research/xenobiology/xenobio_camera.dm
+++ b/code/modules/research/xenobiology/xenobio_camera.dm
@@ -92,17 +92,13 @@
/obj/machinery/computer/camera_advanced/xenobio/GrantActions(mob/living/user)
..()
- RegisterSignal(user, COMSIG_XENO_SLIME_CLICK_CTRL, PROC_REF(XenoSlimeClickCtrl))
- RegisterSignal(user, COMSIG_XENO_TURF_CLICK_CTRL, PROC_REF(XenoTurfClickCtrl))
- RegisterSignal(user, COMSIG_XENO_MONKEY_CLICK_CTRL, PROC_REF(XenoMonkeyClickCtrl))
+ RegisterSignal(user, COMSIG_MOB_CTRL_CLICKED, PROC_REF(XenoClickCtrl))
RegisterSignal(user, COMSIG_XENO_SLIME_CLICK_ALT, PROC_REF(XenoSlimeClickAlt))
RegisterSignal(user, COMSIG_XENO_SLIME_CLICK_SHIFT, PROC_REF(XenoSlimeClickShift))
RegisterSignal(user, COMSIG_XENO_TURF_CLICK_SHIFT, PROC_REF(XenoTurfClickShift))
/obj/machinery/computer/camera_advanced/xenobio/remove_eye_control(mob/living/user)
- UnregisterSignal(user, COMSIG_XENO_SLIME_CLICK_CTRL)
- UnregisterSignal(user, COMSIG_XENO_TURF_CLICK_CTRL)
- UnregisterSignal(user, COMSIG_XENO_MONKEY_CLICK_CTRL)
+ UnregisterSignal(user, COMSIG_MOB_CTRL_CLICKED)
UnregisterSignal(user, COMSIG_XENO_SLIME_CLICK_ALT)
UnregisterSignal(user, COMSIG_XENO_SLIME_CLICK_SHIFT)
UnregisterSignal(user, COMSIG_XENO_TURF_CLICK_SHIFT)
@@ -372,30 +368,6 @@ Due to keyboard shortcuts, the second one is not necessarily the remote eye's lo
SEND_SIGNAL(user, COMSIG_XENO_TURF_CLICK_SHIFT, src)
..()
-/mob/living/basic/slime/CtrlClick(mob/user)
- SEND_SIGNAL(user, COMSIG_XENO_SLIME_CLICK_CTRL, src)
- ..()
-
-/mob/living/carbon/human/species/monkey/CtrlClick(mob/user)
- SEND_SIGNAL(user, COMSIG_XENO_MONKEY_CLICK_CTRL, src)
- ..()
-
-/turf/open/CtrlClick(mob/user)
- SEND_SIGNAL(user, COMSIG_XENO_TURF_CLICK_CTRL, src)
- ..()
-
-/// Scans the target slime
-/obj/machinery/computer/camera_advanced/xenobio/proc/XenoSlimeClickCtrl(mob/living/user, mob/living/basic/slime/target_slime)
- SIGNAL_HANDLER
-
- var/mob/camera/ai_eye/remote/xenobio/remote_eye = user.remote_control
- var/obj/machinery/computer/camera_advanced/xenobio/xeno_console = remote_eye.origin
-
- if(!xeno_console.validate_area(user, remote_eye, target_slime.loc))
- return
-
- slime_scan(target_slime, user)
-
///Feeds a stored potion to a slime
/obj/machinery/computer/camera_advanced/xenobio/proc/XenoSlimeClickAlt(mob/living/user, mob/living/basic/slime/target_slime)
SIGNAL_HANDLER
@@ -437,9 +409,22 @@ Due to keyboard shortcuts, the second one is not necessarily the remote eye's lo
slime_place(target_turf)
+/obj/machinery/computer/camera_advanced/xenobio/proc/XenoClickCtrl(mob/living/user, atom/target)
+ SIGNAL_HANDLER
+
+ if(isopenturf(target))
+ XenoTurfClickCtrl(user, target)
+ else if(ismonkey(target))
+ XenoMonkeyClickCtrl(user, target)
+ else if(isslime(target))
+ XenoSlimeClickCtrl(user, target)
+
+ return COMSIG_MOB_CANCEL_CLICKON
+
///Places a monkey from the internal storage
/obj/machinery/computer/camera_advanced/xenobio/proc/XenoTurfClickCtrl(mob/living/user, turf/open/target_turf)
- SIGNAL_HANDLER
+ if(!isopenturf(target_turf))
+ return
var/mob/camera/ai_eye/remote/xenobio/remote_eye = user.remote_control
var/obj/machinery/computer/camera_advanced/xenobio/xeno_console = remote_eye.origin
@@ -451,18 +436,30 @@ Due to keyboard shortcuts, the second one is not necessarily the remote eye's lo
///Picks up a dead monkey for recycling
/obj/machinery/computer/camera_advanced/xenobio/proc/XenoMonkeyClickCtrl(mob/living/user, mob/living/carbon/human/target_mob)
- SIGNAL_HANDLER
if(!ismonkey(target_mob))
return
var/mob/camera/ai_eye/remote/xenobio/remote_eye = user.remote_control
var/obj/machinery/computer/camera_advanced/xenobio/xeno_console = remote_eye.origin
- if(!xeno_console.validate_area(user, remote_eye, target_mob.loc))
- return
-
if(!xeno_console.connected_recycler)
to_chat(user, span_warning("There is no connected monkey recycler. Use a multitool to link one."))
return
+ if(!xeno_console.validate_area(user, remote_eye, target_mob.loc))
+ return
+
xeno_console.monkey_recycle(user, target_mob)
+
+/// Scans the target slime
+/obj/machinery/computer/camera_advanced/xenobio/proc/XenoSlimeClickCtrl(mob/living/user, mob/living/basic/slime/target_slime)
+ if(!isslime(target_slime))
+ return
+
+ var/mob/camera/ai_eye/remote/xenobio/remote_eye = user.remote_control
+ var/obj/machinery/computer/camera_advanced/xenobio/xeno_console = remote_eye.origin
+
+ if(!xeno_console.validate_area(user, remote_eye, target_slime.loc))
+ return
+
+ slime_scan(target_slime, user)
diff --git a/code/modules/transport/tram/tram_remote.dm b/code/modules/transport/tram/tram_remote.dm
index 3a45ec4e665..65c2cff8727 100644
--- a/code/modules/transport/tram/tram_remote.dm
+++ b/code/modules/transport/tram/tram_remote.dm
@@ -45,7 +45,7 @@
to_chat(user, span_notice("You change the platform ID on [src] to [selected_platform]."))
///set safety bypass
-/obj/item/assembly/control/transport/remote/CtrlClick(mob/user)
+/obj/item/assembly/control/transport/remote/item_ctrl_click(mob/user)
switch(options)
if(!RAPID_MODE)
options |= RAPID_MODE
@@ -53,6 +53,7 @@
options &= ~RAPID_MODE
update_appearance()
balloon_alert(user, "mode: [options ? "fast" : "safe"]")
+ return CLICK_ACTION_SUCCESS
/obj/item/assembly/control/transport/remote/examine(mob/user)
. = ..()
diff --git a/modular_skyrat/master_files/code/modules/clothing/towels.dm b/modular_skyrat/master_files/code/modules/clothing/towels.dm
index 4add82d6a41..6ff0fa3af22 100644
--- a/modular_skyrat/master_files/code/modules/clothing/towels.dm
+++ b/modular_skyrat/master_files/code/modules/clothing/towels.dm
@@ -256,7 +256,7 @@
return CLICK_ACTION_SUCCESS
-/obj/item/towel/CtrlClick(mob/user)
+/obj/item/towel/item_ctrl_click(mob/user)
. = ..()
if(. == FALSE)
diff --git a/modular_skyrat/modules/QOL/code/_under.dm b/modular_skyrat/modules/QOL/code/_under.dm
index 13b1d5a2071..99ddbfcf0b6 100644
--- a/modular_skyrat/modules/QOL/code/_under.dm
+++ b/modular_skyrat/modules/QOL/code/_under.dm
@@ -1,4 +1,4 @@
-/obj/item/clothing/under/CtrlClick(mob/user)
+/obj/item/clothing/under/item_ctrl_click(mob/user)
. = ..()
if(has_sensor == HAS_SENSORS)
sensor_mode = SENSOR_COORDS
diff --git a/modular_skyrat/modules/ashwalkers/code/items/ash_centrifuge.dm b/modular_skyrat/modules/ashwalkers/code/items/ash_centrifuge.dm
index fd06106cee8..fdaccd1b1b7 100644
--- a/modular_skyrat/modules/ashwalkers/code/items/ash_centrifuge.dm
+++ b/modular_skyrat/modules/ashwalkers/code/items/ash_centrifuge.dm
@@ -11,7 +11,7 @@
. += span_notice("Ctrl + Click to select chemicals to remove.")
. += span_notice("Ctrl + Shift + Click to select a chemical to keep, the rest removed.")
-/obj/item/reagent_containers/cup/primitive_centrifuge/CtrlClick(mob/user)
+/obj/item/reagent_containers/cup/primitive_centrifuge/item_ctrl_click(mob/user)
if(!length(reagents.reagent_list))
return
@@ -31,7 +31,7 @@
user.mind.adjust_experience(/datum/skill/primitive, 5)
balloon_alert(user, "removed reagent from [src]")
-/obj/item/reagent_containers/cup/primitive_centrifuge/CtrlShiftClick(mob/user)
+/obj/item/reagent_containers/cup/primitive_centrifuge/click_ctrl_shift(mob/user)
if(!length(reagents.reagent_list))
return
diff --git a/modular_skyrat/modules/conveyor_sorter/code/conveyor_sorter.dm b/modular_skyrat/modules/conveyor_sorter/code/conveyor_sorter.dm
index a5306c96bd2..d57b08e1189 100644
--- a/modular_skyrat/modules/conveyor_sorter/code/conveyor_sorter.dm
+++ b/modular_skyrat/modules/conveyor_sorter/code/conveyor_sorter.dm
@@ -129,7 +129,7 @@
sorting_list = list()
return CLICK_ACTION_SUCCESS
-/obj/effect/decal/conveyor_sorter/CtrlClick(mob/user)
+/obj/effect/decal/conveyor_sorter/click_ctrl(mob/user)
visible_message("[src] begins to ping violently!")
playsound(src, 'sound/machines/ping.ogg', 30, TRUE)
qdel(src)
diff --git a/modular_skyrat/modules/customization/game/objects/items/devices/ttsdevice.dm b/modular_skyrat/modules/customization/game/objects/items/devices/ttsdevice.dm
index f9ff176af90..a6f28e2d2ec 100644
--- a/modular_skyrat/modules/customization/game/objects/items/devices/ttsdevice.dm
+++ b/modular_skyrat/modules/customization/game/objects/items/devices/ttsdevice.dm
@@ -21,7 +21,7 @@
src.say(str)
str = null
-/obj/item/ttsdevice/CtrlClick(mob/living/user)
+/obj/item/ttsdevice/item_ctrl_click(mob/living/user)
var/noisechoice = tgui_input_list(user, "What noise would you like to make?", "Robot Noises", list("Beep","Buzz","Ping"))
if(noisechoice == "Beep")
user.audible_message("makes their TTS beep!", audible_message_flags = EMOTE_MESSAGE)
@@ -33,7 +33,7 @@
user.audible_message("makes their TTS ping!", audible_message_flags = EMOTE_MESSAGE)
playsound(user, 'sound/machines/ping.ogg', 50, 1, -1)
-/obj/item/ttsdevice/CtrlShiftClick(mob/living/user)
+/obj/item/ttsdevice/click_ctrl_shift(mob/living/user)
var/new_name = reject_bad_name(tgui_input_text(user, "Name your Text-to-Speech device. This matters for displaying it in the chat bar.", "Set TTS Device Name", "", MAX_NAME_LEN))
if(new_name)
name = "[new_name]'s [initial(name)]"
diff --git a/modular_skyrat/modules/customization/modules/clothing/masks/gasmask.dm b/modular_skyrat/modules/customization/modules/clothing/masks/gasmask.dm
index 47ae6a48e89..5abd71f2411 100644
--- a/modular_skyrat/modules/customization/modules/clothing/masks/gasmask.dm
+++ b/modular_skyrat/modules/customization/modules/clothing/masks/gasmask.dm
@@ -98,7 +98,7 @@
. = ..()
. += span_notice("You can toggle its ability to muffle your TTS voice with control click.")
-/obj/item/clothing/mask/gas/respirator/CtrlClick(mob/living/user)
+/obj/item/clothing/mask/gas/respirator/item_ctrl_click(mob/living/user)
if(!isliving(user))
return
if(user.get_active_held_item() != src)
diff --git a/modular_skyrat/modules/customization/modules/clothing/masks/paper.dm b/modular_skyrat/modules/customization/modules/clothing/masks/paper.dm
index 1325b6a17fb..214cc5244c8 100644
--- a/modular_skyrat/modules/customization/modules/clothing/masks/paper.dm
+++ b/modular_skyrat/modules/customization/modules/clothing/masks/paper.dm
@@ -69,7 +69,7 @@
/obj/item/clothing/mask/paper/click_alt_secondary(mob/user)
adjust_mask(user)
-/obj/item/clothing/mask/paper/CtrlClick(mob/user)
+/obj/item/clothing/mask/paper/item_ctrl_click(mob/user)
. = ..()
if(.)
return
diff --git a/modular_skyrat/modules/customization/modules/clothing/storage/belts.dm b/modular_skyrat/modules/customization/modules/clothing/storage/belts.dm
index 322e438374c..553a8708e5b 100644
--- a/modular_skyrat/modules/customization/modules/clothing/storage/belts.dm
+++ b/modular_skyrat/modules/customization/modules/clothing/storage/belts.dm
@@ -60,7 +60,7 @@
return
pouch.atom_storage.dump_content_at(dest_object, dumping_mob)
-/obj/item/storage/belt/crusader/CtrlClick(mob/user) //Makes ctrl-click also open the inventory, so that you can open it with full hands without dropping the sword
+/obj/item/storage/belt/crusader/item_ctrl_click(mob/user) //Makes ctrl-click also open the inventory, so that you can open it with full hands without dropping the sword
. = ..()
atom_storage.show_contents(user)
return
diff --git a/modular_skyrat/modules/hyposprays/code/hypospray_kits.dm b/modular_skyrat/modules/hyposprays/code/hypospray_kits.dm
index bc5a4a19caf..9112899aeae 100644
--- a/modular_skyrat/modules/hyposprays/code/hypospray_kits.dm
+++ b/modular_skyrat/modules/hyposprays/code/hypospray_kits.dm
@@ -169,7 +169,7 @@
return TRUE
-/obj/item/storage/hypospraykit/CtrlShiftClick(mob/user, obj/item/I)
+/obj/item/storage/hypospraykit/click_ctrl_shift(mob/user, obj/item/I)
case_menu(user)
//END OF HYPOSPRAY CASE MENU CODE
diff --git a/modular_skyrat/modules/hyposprays/code/hyposprays_II.dm b/modular_skyrat/modules/hyposprays/code/hyposprays_II.dm
index 8bc5879d84b..5a462299d66 100644
--- a/modular_skyrat/modules/hyposprays/code/hyposprays_II.dm
+++ b/modular_skyrat/modules/hyposprays/code/hyposprays_II.dm
@@ -146,7 +146,7 @@
. += "It has no vial loaded in."
. += span_notice("Ctrl-Shift-Click to change up the colors or reset them.")
-/obj/item/hypospray/mkii/CtrlShiftClick(mob/user, obj/item/I)
+/obj/item/hypospray/mkii/click_ctrl_shift(mob/user, obj/item/I)
var/choice = tgui_input_list(user, "GAGSify the hypo or reset to default?", "Fashion", list("GAGS", "Nope"))
if(choice == "GAGS")
icon_state = gags_bodystate
diff --git a/modular_skyrat/modules/hyposprays/code/hypovials.dm b/modular_skyrat/modules/hyposprays/code/hypovials.dm
index 4e272ca22ff..db51c61ceb6 100644
--- a/modular_skyrat/modules/hyposprays/code/hypovials.dm
+++ b/modular_skyrat/modules/hyposprays/code/hypovials.dm
@@ -38,7 +38,7 @@
. = ..()
. += span_notice("Ctrl-Shift-Click to reskin or set a custom color.")
-/obj/item/reagent_containers/cup/vial/CtrlShiftClick(mob/user, obj/item/I)
+/obj/item/reagent_containers/cup/vial/click_ctrl_shift(mob/user, obj/item/I)
current_skin = null
icon_state = initial(icon_state)
icon = initial(icon)
@@ -202,4 +202,4 @@
/obj/item/reagent_containers/cup/vial/large/numbing
name = "Numbing"
icon_state = "hypoviallarge-generic"
- list_reagents = list(/datum/reagent/medicine/mine_salve = 50, /datum/reagent/medicine/morphine = 50)
\ No newline at end of file
+ list_reagents = list(/datum/reagent/medicine/mine_salve = 50, /datum/reagent/medicine/morphine = 50)
diff --git a/modular_skyrat/modules/interaction_menu/code/click.dm b/modular_skyrat/modules/interaction_menu/code/click.dm
index cd23d1b7696..82c877ae454 100644
--- a/modular_skyrat/modules/interaction_menu/code/click.dm
+++ b/modular_skyrat/modules/interaction_menu/code/click.dm
@@ -1,3 +1,3 @@
-/mob/living/carbon/human/CtrlShiftClick(mob/user) //We have to remove the can_interact check from humans.
+/mob/living/carbon/human/click_ctrl_shift(mob/user) //We have to remove the can_interact check from humans.
SEND_SIGNAL(src, COMSIG_CLICK_CTRL_SHIFT, user)
return
diff --git a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_machinery/milking_machine.dm b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_machinery/milking_machine.dm
index b24fda213cc..eef5f958eb4 100644
--- a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_machinery/milking_machine.dm
+++ b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_machinery/milking_machine.dm
@@ -407,7 +407,7 @@
current_mob.adjust_pleasure(pleasure_amounts[current_mode] * seconds_per_tick)
current_mob.adjust_pain(pain_amounts[current_mode] * seconds_per_tick)
-/obj/structure/chair/milking_machine/CtrlShiftClick(mob/user)
+/obj/structure/chair/milking_machine/click_ctrl_shift(mob/user)
. = ..()
if(. == FALSE)
return FALSE
diff --git a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_structures/bdsm_furniture.dm b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_structures/bdsm_furniture.dm
index b6baa6d42f2..f6987414836 100644
--- a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_structures/bdsm_furniture.dm
+++ b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_structures/bdsm_furniture.dm
@@ -15,7 +15,7 @@
icon_state = "bdsm_bed_kit"
w_class = WEIGHT_CLASS_HUGE
-/obj/item/bdsm_bed_kit/CtrlShiftClick(mob/user)
+/obj/item/bdsm_bed_kit/click_ctrl_shift(mob/user)
. = ..()
if(. == FALSE)
return FALSE
@@ -54,7 +54,7 @@
//Set them back down to the normal lying position
affected_mob.pixel_y = affected_mob.base_pixel_y + affected_mob.body_position_pixel_y_offset
-/obj/structure/bed/bdsm_bed/CtrlShiftClick(mob/user)
+/obj/structure/bed/bdsm_bed/click_ctrl_shift(mob/user)
. = ..()
if(. == FALSE)
return FALSE
@@ -288,7 +288,7 @@
* X-STAND CONSTRUCTION KIT
*/
-/obj/structure/chair/x_stand/CtrlShiftClick(mob/user)
+/obj/structure/chair/x_stand/click_ctrl_shift(mob/user)
. = ..()
if(. == FALSE)
return FALSE
diff --git a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_structures/construction.dm b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_structures/construction.dm
index 7d35be6c12f..2ca816203a7 100644
--- a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_structures/construction.dm
+++ b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_structures/construction.dm
@@ -20,7 +20,7 @@
. = ..()
. += span_purple("[src] can be assembled by using Ctrl+Shift+Click while [src] is on the floor.")
-/obj/item/construction_kit/CtrlShiftClick(mob/user)
+/obj/item/construction_kit/click_ctrl_shift(mob/user)
. = ..()
if(. == FALSE)
return FALSE
@@ -104,7 +104,7 @@
. += span_purple("[src]'s color can be customized with Ctrl+Click.")
//to change model
-/obj/item/construction_kit/bdsm/shibari/CtrlClick(mob/user)
+/obj/item/construction_kit/bdsm/shibari/item_ctrl_click(mob/user)
. = ..()
if(. == FALSE)
return FALSE
diff --git a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_structures/dancing_pole.dm b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_structures/dancing_pole.dm
index 6ba55958fe6..45b7401b29f 100644
--- a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_structures/dancing_pole.dm
+++ b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_structures/dancing_pole.dm
@@ -50,11 +50,7 @@
)
-/obj/structure/stripper_pole/CtrlClick(mob/user)
- . = ..()
- if(. == FALSE)
- return FALSE
-
+/obj/structure/stripper_pole/click_ctrl(mob/user)
var/choice = show_radial_menu(user, src, pole_designs, radius = 50, require_near = TRUE)
if(!choice)
return FALSE
@@ -157,7 +153,7 @@
dancer.forceMove(get_turf(src))
dancer = null
-/obj/structure/stripper_pole/CtrlShiftClick(mob/user)
+/obj/structure/stripper_pole/click_ctrl_shift(mob/user)
. = ..()
if(. == FALSE)
return FALSE
diff --git a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_structures/shibari_stand.dm b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_structures/shibari_stand.dm
index 9ceeaf04bc6..03c90879b88 100644
--- a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_structures/shibari_stand.dm
+++ b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_structures/shibari_stand.dm
@@ -187,7 +187,7 @@
breakouttime = 2 MINUTES
//Disassembling shibari stand
-/obj/structure/chair/shibari_stand/CtrlShiftClick(mob/user)
+/obj/structure/chair/shibari_stand/click_ctrl_shift(mob/user)
. = ..()
if(. == FALSE)
return FALSE
@@ -205,11 +205,7 @@
return TRUE
//Changing color of shibari stand
-/obj/structure/chair/shibari_stand/CtrlClick(mob/user)
- . = ..()
- if(. == FALSE)
- return FALSE
-
+/obj/structure/chair/shibari_stand/click_ctrl(mob/user)
var/list/allowed_configs = list()
allowed_configs += "[greyscale_config]"
var/datum/greyscale_modify_menu/menu = new(
diff --git a/modular_skyrat/modules/primitive_cooking_additions/code/millstone.dm b/modular_skyrat/modules/primitive_cooking_additions/code/millstone.dm
index 15a81b94376..505d418b536 100644
--- a/modular_skyrat/modules/primitive_cooking_additions/code/millstone.dm
+++ b/modular_skyrat/modules/primitive_cooking_additions/code/millstone.dm
@@ -60,7 +60,7 @@
balloon_alert(user, "removed all items")
return CLICK_ACTION_SUCCESS
-/obj/structure/millstone/CtrlShiftClick(mob/user)
+/obj/structure/millstone/click_ctrl_shift(mob/user)
set_anchored(!anchored)
balloon_alert(user, "[anchored ? "secured" : "unsecured"]")
diff --git a/modular_skyrat/modules/tableflip/code/flipped_table.dm b/modular_skyrat/modules/tableflip/code/flipped_table.dm
index 57fb2dca2e8..e7d480bee47 100644
--- a/modular_skyrat/modules/tableflip/code/flipped_table.dm
+++ b/modular_skyrat/modules/tableflip/code/flipped_table.dm
@@ -46,7 +46,7 @@
if(direction == dir)
return COMPONENT_ATOM_BLOCK_EXIT
-/obj/structure/flippedtable/CtrlShiftClick(mob/living/user)
+/obj/structure/flippedtable/click_ctrl_shift(mob/living/user)
. = ..()
if(!istype(user) || !user.can_interact_with(src) || iscorticalborer(user))
return FALSE
@@ -68,7 +68,7 @@
//TABLES
-/obj/structure/table/CtrlShiftClick(mob/living/user)
+/obj/structure/table/click_ctrl_shift(mob/living/user)
. = ..()
if(!istype(user) || !user.can_interact_with(src) || iscorticalborer(user))
return
diff --git a/modular_skyrat/modules/wargame_projectors/code/projectors.dm b/modular_skyrat/modules/wargame_projectors/code/projectors.dm
index fe34b3a68af..0c3c17b413f 100644
--- a/modular_skyrat/modules/wargame_projectors/code/projectors.dm
+++ b/modular_skyrat/modules/wargame_projectors/code/projectors.dm
@@ -97,8 +97,8 @@
set_greyscale(holosign_color)
return CLICK_ACTION_SUCCESS
-/obj/item/wargame_projector/CtrlClick(mob/user)
- if(tgui_alert(usr,"Clear all currently active holograms?", "Hologram Removal", list("Yes", "No")) == "Yes")
+/obj/item/wargame_projector/item_ctrl_click(mob/user)
+ if(tgui_alert(user,"Clear all currently active holograms?", "Hologram Removal", list("Yes", "No")) == "Yes")
for(var/hologram as anything in projections)
qdel(hologram)
diff --git a/tgstation.dme b/tgstation.dme
index 10ef9a9070d..67f2da01f13 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -651,6 +651,7 @@
#include "code\_onclick\ai.dm"
#include "code\_onclick\click.dm"
#include "code\_onclick\click_alt.dm"
+#include "code\_onclick\click_ctrl.dm"
#include "code\_onclick\cyborg.dm"
#include "code\_onclick\drag_drop.dm"
#include "code\_onclick\item_attack.dm"