forked from ParadiseSS13/Paradise
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds the ability to keybind click() triggers (ParadiseSS13#23395)
* adds the ability to keybind click() triggers * Update code/datums/keybindings/click_keybindings.dm Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Update code/_onclick/click.dm * final fixes * runtime fix --------- Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
- Loading branch information
1 parent
8335d99
commit 599f645
Showing
12 changed files
with
158 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/datum/keybinding/clickbind | ||
category = KB_CATEGORY_CLICK | ||
|
||
/datum/keybinding/clickbind/can_use(client/C, mob/M) | ||
return istype(M) && M.can_use_clickbinds() && ..() | ||
|
||
/datum/keybinding/clickbind/down(client/C) | ||
..() | ||
if(C.mob.next_click > world.time) | ||
return | ||
C.mob.changeNext_click(1) | ||
return locateUID(C.moused_over) | ||
|
||
/datum/keybinding/clickbind/alt_click | ||
name = "Alt-Click" | ||
|
||
/datum/keybinding/clickbind/alt_click/down(client/C) | ||
. = ..() | ||
if(.) | ||
C.mob.AltClickOn(.) | ||
|
||
/datum/keybinding/clickbind/ctrl_click | ||
name = "Ctrl-Click" | ||
|
||
/datum/keybinding/clickbind/ctrl_click/down(client/C) | ||
. = ..() | ||
if(.) | ||
C.mob.CtrlClickOn(.) | ||
|
||
/datum/keybinding/clickbind/shift_click | ||
name = "Shift-Click" | ||
|
||
/datum/keybinding/clickbind/shift_click/down(client/C) | ||
. = ..() | ||
if(.) | ||
C.mob.ShiftClickOn(.) | ||
|
||
/datum/keybinding/clickbind/middle_click | ||
name = "Middle-Click" | ||
|
||
/datum/keybinding/clickbind/middle_click/down(client/C) | ||
. = ..() | ||
if(.) | ||
C.mob.MiddleClickOn(.) | ||
|
||
/datum/keybinding/clickbind/alt_shift_click | ||
name = "Alt-Shift-Click" | ||
|
||
/datum/keybinding/clickbind/alt_shift_click/down(client/C) | ||
. = ..() | ||
if(.) | ||
C.mob.AltShiftClickOn(.) | ||
|
||
/datum/keybinding/clickbind/ctrl_shift_click | ||
name = "Ctrl-Shift-Click" | ||
|
||
/datum/keybinding/clickbind/ctrl_shift_click/down(client/C) | ||
. = ..() | ||
if(.) | ||
C.mob.CtrlShiftClickOn(.) | ||
|
||
/datum/keybinding/clickbind/middle_shift_click | ||
name = "Middle-Shift-Click" | ||
|
||
/datum/keybinding/clickbind/middle_shift_click/down(client/C) | ||
. = ..() | ||
if(.) | ||
C.mob.MiddleShiftClickOn(.) | ||
|
||
/datum/keybinding/clickbind/middle_shift_ctrl_click | ||
name = "Middle-Shift-Ctrl-Click" | ||
|
||
/datum/keybinding/clickbind/middle_shift_ctrl_click/down(client/C) | ||
. = ..() | ||
if(.) | ||
C.mob.MiddleShiftControlClickOn(.) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters