Moves GLOB.movement_keys into SSinput and adds movement direction badminry (#34123)
* badmin flip dirs * moves movement_keys into SSinput from GLOB
This commit is contained in:
committed by
CitadelStationBot
parent
f2539f2b34
commit
e27346812f
@@ -5,7 +5,7 @@
|
||||
if(!user.keys_held["Ctrl"])
|
||||
var/movement_dir = NONE
|
||||
for(var/_key in user.keys_held)
|
||||
movement_dir = movement_dir | GLOB.movement_keys[_key]
|
||||
movement_dir = movement_dir | SSinput.movement_keys[_key]
|
||||
if(user.next_move_dir_add)
|
||||
movement_dir |= user.next_move_dir_add
|
||||
if(user.next_move_dir_sub)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
set hidden = TRUE
|
||||
|
||||
keys_held[_key] = world.time
|
||||
var/movement = GLOB.movement_keys[_key]
|
||||
var/movement = SSinput.movement_keys[_key]
|
||||
if(!(next_move_dir_sub & movement))
|
||||
next_move_dir_add |= movement
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
set hidden = TRUE
|
||||
|
||||
keys_held -= _key
|
||||
var/movement = GLOB.movement_keys[_key]
|
||||
var/movement = SSinput.movement_keys[_key]
|
||||
if(!(next_move_dir_add & movement))
|
||||
next_move_dir_sub |= movement
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
return
|
||||
|
||||
if(client.keys_held["Ctrl"])
|
||||
switch(GLOB.movement_keys[_key])
|
||||
switch(SSinput.movement_keys[_key])
|
||||
if(NORTH)
|
||||
northface()
|
||||
return
|
||||
|
||||
@@ -14,12 +14,6 @@
|
||||
/datum/proc/keyLoop(client/user) // Called once every frame
|
||||
return
|
||||
|
||||
// Keys used for movement
|
||||
GLOBAL_LIST_INIT(movement_keys, list(
|
||||
"W" = NORTH, "A" = WEST, "S" = SOUTH, "D" = EAST, // WASD
|
||||
"North" = NORTH, "West" = WEST, "South" = SOUTH, "East" = EAST, // Arrow keys & Numpad
|
||||
))
|
||||
|
||||
// removes all the existing macros
|
||||
/client/proc/erase_all_macros()
|
||||
var/list/macro_sets = params2list(winget(src, null, "macros"))
|
||||
|
||||
Reference in New Issue
Block a user