keybind signal support, ported from TGMC (#52219)

* keybind signal support, ported from TGMC

* Thank you linter

* remove unused and extra defines

* move signal defines up and fix emote keybind runtimes

* Apply suggestions

* Update keybinding.dm

* Missed this one in the upstream merge

* Ignore keybindings without names

* back to the OG

* Update living.dm

* Update living.dm

* got it

* trailing newline

* Update code/datums/keybinding/living.dm

Co-authored-by: Rohesie <rohesie@gmail.com>

Co-authored-by: Rohesie <rohesie@gmail.com>
This commit is contained in:
Couls
2020-07-22 16:53:27 -04:00
committed by SkyratBot
co-authored by Rohesie
parent 41c6428ca6
commit dc5840dc4e
15 changed files with 298 additions and 6 deletions
+36
View File
@@ -10,8 +10,12 @@
name = "admin_say"
full_name = "Admin say"
description = "Talk with other admins."
keybind_signal = COMSIG_KB_ADMIN_ASAY_DOWN
/datum/keybinding/admin/admin_say/down(client/user)
. = ..()
if(.)
return
user.get_admin_say()
return TRUE
@@ -20,8 +24,12 @@
name = "admin_ghost"
full_name = "Aghost"
description = "Go ghost"
keybind_signal = COMSIG_KB_ADMIN_AGHOST_DOWN
/datum/keybinding/admin/admin_ghost/down(client/user)
. = ..()
if(.)
return
user.admin_ghost()
return TRUE
@@ -30,8 +38,12 @@
name = "player_panel_new"
full_name = "Player Panel New"
description = "Opens up the new player panel"
keybind_signal = COMSIG_KB_ADMIN_PLAYERPANELNEW_DOWN
/datum/keybinding/admin/player_panel_new/down(client/user)
. = ..()
if(.)
return
user.holder.player_panel_new()
return TRUE
@@ -40,8 +52,12 @@
name = "toggle_buildmode_self"
full_name = "Toggle Buildmode Self"
description = "Toggles buildmode"
keybind_signal = COMSIG_KB_ADMIN_TOGGLEBUILDMODE_DOWN
/datum/keybinding/admin/toggle_buildmode_self/down(client/user)
. = ..()
if(.)
return
user.togglebuildmodeself()
return TRUE
@@ -50,8 +66,12 @@
name = "stealth_mode"
full_name = "Stealth mode"
description = "Enters stealth mode"
keybind_signal = COMSIG_KB_ADMIN_STEALTHMODETOGGLE_DOWN
/datum/keybinding/admin/stealthmode/down(client/user)
. = ..()
if(.)
return
user.stealth()
return TRUE
@@ -60,8 +80,12 @@
name = "invisimin"
full_name = "Admin invisibility"
description = "Toggles ghost-like invisibility (Don't abuse this)"
keybind_signal = COMSIG_KB_ADMIN_INVISIMINTOGGLE_DOWN
/datum/keybinding/admin/invisimin/down(client/user)
. = ..()
if(.)
return
user.invisimin()
return TRUE
@@ -70,8 +94,12 @@
name = "dsay"
full_name = "deadsay"
description = "Allows you to send a message to dead chat"
keybind_signal = COMSIG_KB_ADMIN_DSAY_DOWN
/datum/keybinding/admin/deadsay/down(client/user)
. = ..()
if(.)
return
user.get_dead_say()
return TRUE
@@ -80,8 +108,12 @@
name = "deadmin"
full_name = "Deadmin"
description = "Shed your admin powers"
keybind_signal = COMSIG_KB_ADMIN_DEADMIN_DOWN
/datum/keybinding/admin/deadmin/down(client/user)
. = ..()
if(.)
return
user.deadmin()
return TRUE
@@ -90,7 +122,11 @@
name = "readmin"
full_name = "Readmin"
description = "Regain your admin powers"
keybind_signal = COMSIG_KB_ADMIN_READMIN_DOWN
/datum/keybinding/admin/readmin/down(client/user)
. = ..()
if(.)
return
user.readmin()
return TRUE