Files
Bubberstation/code/controllers/subsystem/input.dm
Iamgoofball a3aa69701a [READY] Basically, Instant Explosions 2: The Search For More Money: Eternal: A Tail Of Two Kitties: 33 1/3 (#50594)
About The Pull Request

Extools maptick stuff is in the game. Stolen from BeeStation/BeeStation-Hornet#1119, improves performance. Requires ex-tools on the server, though.

Explosions have been refactored to do the actual exploding in a subsystem.

Credit to goon.

Here's some videos!

Why It's Good For The Game
Basically instant max-caps now.
We can now give more of a tick over to the sending of map updates

Changelog

cl Goonstation Coders, Beestation, Extools devs
refactor: Explosions have been heavily optimized.
/cl
2020-04-30 10:27:53 +12:00

45 lines
1.3 KiB
Plaintext

SUBSYSTEM_DEF(input)
name = "Input"
wait = 1 //SS_TICKER means this runs every tick
init_order = INIT_ORDER_INPUT
flags = SS_TICKER
priority = FIRE_PRIORITY_INPUT
runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY
var/list/macro_set
/datum/controller/subsystem/input/Initialize()
setup_default_macro_sets()
initialized = TRUE
refresh_client_macro_sets()
return ..()
// This is for when macro sets are eventualy datumized
/datum/controller/subsystem/input/proc/setup_default_macro_sets()
macro_set = list(
"Any" = "\"KeyDown \[\[*\]\]\"",
"Any+UP" = "\"KeyUp \[\[*\]\]\"",
"O" = "ooc",
"T" = "say",
"M" = "me",
"Back" = "\".winset \\\"input.text=\\\"\\\"\\\"\"",
"Tab" = "\".winset \\\"input.focus=true?map.focus=true input.background-color=[COLOR_INPUT_DISABLED]:input.focus=true input.background-color=[COLOR_INPUT_ENABLED]\\\"\"",
"Escape" = "\".winset \\\"input.text=\\\"\\\"\\\"\"")
// Badmins just wanna have fun ♪
/datum/controller/subsystem/input/proc/refresh_client_macro_sets()
var/list/clients = GLOB.clients
for(var/i in 1 to clients.len)
var/client/user = clients[i]
user.set_macros()
user.update_movement_keys()
/datum/controller/subsystem/input/fire()
var/list/clients = GLOB.clients // Let's sing the list cache song
for(var/i in 1 to clients.len)
var/client/C = clients[i]
C.keyLoop()