-
-
Notifications
You must be signed in to change notification settings - Fork 685
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* base cooldown tgstation/tgstation#59479 * no walls * share between audible emotes tgstation/tgstation#86846 * general & specific tgstation/tgstation#87210 * audio check proc tgstation/tgstation#62206 tgstation/tgstation#68954 * mindless, naturally * brings emote jumps in line with f hotkey * make it a little less punishing * tg keybinding commit 1 tgstation/tgstation#47750 * tg keybinding commit 2 tgstation/tgstation#47868 * unit test emotes * oops * clean * guhhhh * we dont have the same crit * integers * implement ceilings, dehardcode limit * bad operator * fix integer window * comment out testing output * gasper
- Loading branch information
1 parent
169c857
commit eea7fd5
Showing
20 changed files
with
295 additions
and
115 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/// Creates and sorts all the keybinding datums | ||
/proc/init_keybindings() | ||
for(var/KB in subtypesof(/datum/keybinding)) | ||
var/datum/keybinding/keybinding = KB | ||
if(!initial(keybinding.keybind_signal) || !initial(keybinding.name)) | ||
continue | ||
add_keybinding(new keybinding) | ||
init_emote_keybinds() | ||
|
||
/// Adds an instanced keybinding to the global tracker | ||
/proc/add_keybinding(datum/keybinding/instance) | ||
GLOB.keybindings_by_name[instance.name] = instance | ||
LAZYADD(GLOB.keybindings_by_name_to_key[instance.name], LAZYCOPY(instance.keys)) | ||
|
||
/proc/init_emote_keybinds() | ||
for(var/i in subtypesof(/datum/emote)) | ||
var/datum/emote/faketype = i | ||
if(!initial(faketype.key)) | ||
continue | ||
var/datum/keybinding/emote/emote_kb = new | ||
emote_kb.link_to_emote(faketype) | ||
add_keybinding(emote_kb) |
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,17 @@ | ||
/datum/keybinding/emote | ||
category = CATEGORY_EMOTE | ||
weight = WEIGHT_EMOTE | ||
keybind_signal = COMSIG_KB_EMOTE | ||
var/emote_key | ||
|
||
/datum/keybinding/emote/proc/link_to_emote(datum/emote/faketype) | ||
keys = list("Unbound") | ||
emote_key = initial(faketype.key) | ||
name = initial(faketype.key) | ||
full_name = capitalize(initial(faketype.key)) | ||
|
||
/datum/keybinding/emote/down(client/user) | ||
. = ..() | ||
if(.) | ||
return | ||
return user.mob.emote(emote_key, intentional=TRUE) |
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
Oops, something went wrong.