mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 12:35:33 +01:00
Ctrl click refactor (#83784)
## About The Pull Request Same idea as #82656 but for ctrl click & ctrl shift click cause why not - Does your signal & `can_perform_action()` checks using `interaction_flags_click` flags before delegating the event down to `ctrl_click()` proc. - The one new change now is that `ctrl_click()` proc is now blocking, meaning returning `CLICK_ACTION_SUCCESS` or `CLICK_ACTION_BLOCKING` will stop the object from getting grabbed/pulled. So remember to return these values if you want to stop the grab action or return `NONE` if you want to process the click but still want the object to get grabbed as well ## Changelog 🆑 refactor: Ctrl click & Ctrl shift click has been refactored. Please report bugs on GitHub /🆑
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -158,12 +158,9 @@
|
||||
playsound(src, 'sound/machines/pda_button1.ogg', 50, TRUE)
|
||||
|
||||
|
||||
/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()
|
||||
|
||||
Reference in New Issue
Block a user