mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 19:22:56 +00:00
SSInput and Diagonal Movement
This commit is contained in:
@@ -11,6 +11,9 @@
|
|||||||
//#define ZASDBG // Uncomment to turn on super detailed ZAS debugging that probably won't even compile.
|
//#define ZASDBG // Uncomment to turn on super detailed ZAS debugging that probably won't even compile.
|
||||||
#define MULTIZAS // Uncomment to turn on Multi-Z ZAS Support!
|
#define MULTIZAS // Uncomment to turn on Multi-Z ZAS Support!
|
||||||
|
|
||||||
|
// Movement Compile Options
|
||||||
|
//#define CARDINAL_INPUT_ONLY // Uncomment to disable diagonal player movement (restore previous cardinal-moves-only behavior)
|
||||||
|
|
||||||
// Comment/Uncomment this to turn off/on shuttle code debugging logs
|
// Comment/Uncomment this to turn off/on shuttle code debugging logs
|
||||||
#define DEBUG_SHUTTLES
|
#define DEBUG_SHUTTLES
|
||||||
|
|
||||||
|
|||||||
21
code/__defines/input.dm
Normal file
21
code/__defines/input.dm
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
// Bitflags for the move_keys_held bitfield.
|
||||||
|
#define NORTH_KEY (1<<0)
|
||||||
|
#define SOUTH_KEY (1<<1)
|
||||||
|
#define EAST_KEY (1<<2)
|
||||||
|
#define WEST_KEY (1<<3)
|
||||||
|
#define W_KEY (1<<4)
|
||||||
|
#define S_KEY (1<<5)
|
||||||
|
#define D_KEY (1<<6)
|
||||||
|
#define A_KEY (1<<7)
|
||||||
|
// Combine the held WASD and arrow keys together (OR) into byond N/S/E/W dir
|
||||||
|
#define MOVEMENT_KEYS_TO_DIR(MK) ((((MK)>>4)|(MK))&(ALL_CARDINALS))
|
||||||
|
|
||||||
|
// Bitflags for pressed modifier keys.
|
||||||
|
// Values chosen specifically to not conflict with dir bitfield, in case we want to smoosh them together.
|
||||||
|
#define CTRL_KEY (1<<8)
|
||||||
|
#define SHIFT_KEY (1<<9)
|
||||||
|
#define ALT_KEY (1<<10)
|
||||||
|
|
||||||
|
// Uncomment to get a lot of debug logging for movement keys.
|
||||||
|
// #define DEBUG_INPUT(A) to_world_log(A)
|
||||||
|
#define DEBUG_INPUT(A)
|
||||||
@@ -56,6 +56,7 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G
|
|||||||
#define INIT_ORDER_DBCORE 41 //CHOMPEdit
|
#define INIT_ORDER_DBCORE 41 //CHOMPEdit
|
||||||
#define INIT_ORDER_SQLITE 40
|
#define INIT_ORDER_SQLITE 40
|
||||||
#define INIT_ORDER_MEDIA_TRACKS 38 // Gotta get that lobby music up, yo
|
#define INIT_ORDER_MEDIA_TRACKS 38 // Gotta get that lobby music up, yo
|
||||||
|
#define INIT_ORDER_INPUT 37
|
||||||
#define INIT_ORDER_CHEMISTRY 35
|
#define INIT_ORDER_CHEMISTRY 35
|
||||||
#define INIT_ORDER_VIS 32
|
#define INIT_ORDER_VIS 32
|
||||||
#define INIT_ORDER_SKYBOX 30
|
#define INIT_ORDER_SKYBOX 30
|
||||||
@@ -115,6 +116,7 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G
|
|||||||
#define FIRE_PRIORITY_PROJECTILES 150
|
#define FIRE_PRIORITY_PROJECTILES 150
|
||||||
#define FIRE_PRIORITY_CHAT 400
|
#define FIRE_PRIORITY_CHAT 400
|
||||||
#define FIRE_PRIORITY_OVERLAYS 500
|
#define FIRE_PRIORITY_OVERLAYS 500
|
||||||
|
#define FIRE_PRIORITY_INPUT 1000 // This must always always be the max highest priority. Player input must never be lost.
|
||||||
|
|
||||||
// Macro defining the actual code applying our overlays lists to the BYOND overlays list. (I guess a macro for speed)
|
// Macro defining the actual code applying our overlays lists to the BYOND overlays list. (I guess a macro for speed)
|
||||||
// TODO - I don't really like the location of this macro define. Consider it. ~Leshana
|
// TODO - I don't really like the location of this macro define. Consider it. ~Leshana
|
||||||
|
|||||||
@@ -96,6 +96,19 @@
|
|||||||
if ("SOUTHEAST") return 6
|
if ("SOUTHEAST") return 6
|
||||||
if ("SOUTHWEST") return 10
|
if ("SOUTHWEST") return 10
|
||||||
|
|
||||||
|
// Turns a direction into text showing all bits set
|
||||||
|
/proc/dirs2text(direction)
|
||||||
|
if(!direction)
|
||||||
|
return ""
|
||||||
|
var/list/dirs = list()
|
||||||
|
if(direction & NORTH) dirs += "NORTH"
|
||||||
|
if(direction & SOUTH) dirs += "SOUTH"
|
||||||
|
if(direction & EAST) dirs += "EAST"
|
||||||
|
if(direction & WEST) dirs += "WEST"
|
||||||
|
if(direction & UP) dirs += "UP"
|
||||||
|
if(direction & DOWN) dirs += "DOWN"
|
||||||
|
return dirs.Join(" ")
|
||||||
|
|
||||||
// Converts an angle (degrees) into an ss13 direction
|
// Converts an angle (degrees) into an ss13 direction
|
||||||
/proc/angle2dir(var/degree)
|
/proc/angle2dir(var/degree)
|
||||||
degree = (degree + 22.5) % 365 // 22.5 = 45 / 2
|
degree = (degree + 22.5) % 365 // 22.5 = 45 / 2
|
||||||
|
|||||||
13
code/controllers/subsystems/input.dm
Normal file
13
code/controllers/subsystems/input.dm
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
/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()
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -80,3 +80,32 @@
|
|||||||
|
|
||||||
// Runechat messages
|
// Runechat messages
|
||||||
var/list/seen_messages
|
var/list/seen_messages
|
||||||
|
|
||||||
|
///////////
|
||||||
|
// INPUT //
|
||||||
|
///////////
|
||||||
|
|
||||||
|
/// Bitfield of modifier keys (Shift, Ctrl, Alt) held currently.
|
||||||
|
var/mod_keys_held = 0
|
||||||
|
/// Bitfield of movement keys (WASD/Cursor Keys) held currently.
|
||||||
|
var/move_keys_held = 0
|
||||||
|
|
||||||
|
/// These next two vars are to apply movement for keypresses and releases made while move delayed.
|
||||||
|
/// Because discarding that input makes the game less responsive.
|
||||||
|
|
||||||
|
/// Bitfield of movement dirs that were pressed down *this* cycle (even if not currently held).
|
||||||
|
/// Note that only dirs that actually are first pressed down during this cycle are included, if it was still held from last cycle it won't be in here.
|
||||||
|
/// On next move, add this dir to the move that would otherwise be done
|
||||||
|
var/next_move_dir_add
|
||||||
|
|
||||||
|
/// Bitfield of movement dirs that were released *this* cycle (even if currently held).
|
||||||
|
/// Note that only dirs that were already held at the start of this cycle are included, if it pressed then released it won't be in here.
|
||||||
|
/// On next move, subtract this dir from the move that would otherwise be done
|
||||||
|
var/next_move_dir_sub
|
||||||
|
|
||||||
|
#ifdef CARDINAL_INPUT_ONLY
|
||||||
|
|
||||||
|
/// Movement dir of the most recently pressed movement key. Used in cardinal-only movement mode.
|
||||||
|
var/last_move_dir_pressed = NONE
|
||||||
|
|
||||||
|
#endif
|
||||||
45
code/modules/keybindings/bindings_atom.dm
Normal file
45
code/modules/keybindings/bindings_atom.dm
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
// You might be wondering why this isn't client level. If focus is null, we don't want you to move.
|
||||||
|
// Only way to do that is to tie the behavior into the focus's keyLoop().
|
||||||
|
|
||||||
|
// THE TRADITIONAL STYLE FROM /TG (modified)
|
||||||
|
|
||||||
|
/atom/movable/keyLoop(client/user)
|
||||||
|
// Bail out if the user is holding the "face direction" key (Maybe?)
|
||||||
|
// TODO - I think this breaks non-hotkeys WASD movement, so maybe adopt the /tg solution)
|
||||||
|
if(user.mod_keys_held & CTRL_KEY)
|
||||||
|
return
|
||||||
|
|
||||||
|
var/must_call_move = FALSE
|
||||||
|
var/movement_dir = MOVEMENT_KEYS_TO_DIR(user.move_keys_held)
|
||||||
|
if(user.next_move_dir_add)
|
||||||
|
must_call_move = TRUE // So that next_move_dir_add gets cleared if its time.
|
||||||
|
movement_dir |= user.next_move_dir_add
|
||||||
|
if(user.next_move_dir_sub)
|
||||||
|
DEBUG_INPUT("[(user.next_move_dir_sub & movement_dir) ? "Actually" : "Want to"] subtract [dirs2text(user.next_move_dir_sub)] from [dirs2text(movement_dir)]")
|
||||||
|
must_call_move = TRUE // So that next_move_dir_sub gets cleared if its time.
|
||||||
|
movement_dir &= ~user.next_move_dir_sub
|
||||||
|
|
||||||
|
// Sanity checks in case you hold left and right and up to make sure you only go up
|
||||||
|
if((movement_dir & (NORTH|SOUTH)) == (NORTH|SOUTH))
|
||||||
|
movement_dir &= ~(NORTH|SOUTH)
|
||||||
|
if((movement_dir & (EAST|WEST)) == (EAST|WEST))
|
||||||
|
movement_dir &= ~(EAST|WEST)
|
||||||
|
|
||||||
|
#ifdef CARDINAL_INPUT_ONLY
|
||||||
|
if(movement_dir & user.last_move_dir_pressed)
|
||||||
|
movement_dir = user.last_move_dir_pressed
|
||||||
|
else if (movement_dir == NORTHEAST || movement_dir == NORTHWEST)
|
||||||
|
DEBUG_INPUT("overriding to NORTH: movement_dir=[dirs2text(movement_dir)] last=[dirs2text(user.last_move_dir_pressed)]")
|
||||||
|
movement_dir = NORTH
|
||||||
|
else if (movement_dir == SOUTHEAST || movement_dir == SOUTHWEST)
|
||||||
|
DEBUG_INPUT("overriding to SOUTH: movement_dir=[dirs2text(movement_dir)] last=[dirs2text(user.last_move_dir_pressed)]")
|
||||||
|
movement_dir = SOUTH
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Compensate for client camera spinning (client.dir) so our movement still makes sense I guess.
|
||||||
|
if(movement_dir) // Only compensate if non-zero, as byond will auto-fill dir otherwise
|
||||||
|
movement_dir = turn(movement_dir, -dir2angle(user.dir))
|
||||||
|
|
||||||
|
// Move, but only if we actually are planing to move, or we need to clear the next move vars
|
||||||
|
if(movement_dir || must_call_move)
|
||||||
|
user.Move(get_step(src, movement_dir), movement_dir)
|
||||||
77
code/modules/keybindings/bindings_movekeys.dm
Normal file
77
code/modules/keybindings/bindings_movekeys.dm
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
// TODO - Optimize this into numerics if this ends up working out
|
||||||
|
var/global/list/MOVE_KEY_MAPPINGS = list(
|
||||||
|
"North" = NORTH_KEY,
|
||||||
|
"South" = SOUTH_KEY,
|
||||||
|
"East" = EAST_KEY,
|
||||||
|
"West" = WEST_KEY,
|
||||||
|
"W" = W_KEY,
|
||||||
|
"A" = A_KEY,
|
||||||
|
"S" = S_KEY,
|
||||||
|
"D" = D_KEY,
|
||||||
|
"Shift" = SHIFT_KEY,
|
||||||
|
"Ctrl" = CTRL_KEY,
|
||||||
|
"Alt" = ALT_KEY,
|
||||||
|
)
|
||||||
|
|
||||||
|
// These verbs are called for all movemen key press and release events
|
||||||
|
/client/verb/moveKeyDown(movekeyName as text)
|
||||||
|
set instant = TRUE
|
||||||
|
set hidden = TRUE
|
||||||
|
// set name = ".movekeydown"
|
||||||
|
set name = "KeyDown"
|
||||||
|
|
||||||
|
// Map text sent by skin.dmf to our numeric codes. (This can be optimized away once we update skin.dmf)
|
||||||
|
var/movekey = MOVE_KEY_MAPPINGS[movekeyName]
|
||||||
|
|
||||||
|
// Validate input. Must be one (and only one) of the key codes)
|
||||||
|
if(isnull(movekey) || (movekey & ~0xFFF) || (movekey & (movekey - 1)))
|
||||||
|
log_debug("Client [ckey] sent an illegal movement key down: [movekeyName] ([movekey])")
|
||||||
|
return
|
||||||
|
|
||||||
|
// Record that we are now holding the key!
|
||||||
|
move_keys_held |= (movekey & 0x0FF)
|
||||||
|
mod_keys_held |= (movekey & 0xF00)
|
||||||
|
|
||||||
|
// If we were NOT holding at the start of this move cycle and pressed it, remember that.
|
||||||
|
var/movement = MOVEMENT_KEYS_TO_DIR(movekey)
|
||||||
|
if(movement && !(next_move_dir_sub & movement) && !(mod_keys_held & CTRL_KEY)) // TODO-LESHANA - Possibly not holding Alt either
|
||||||
|
DEBUG_INPUT("Saving [dirs2text(movement)] into next_move_dir_ADD")
|
||||||
|
next_move_dir_add |= movement
|
||||||
|
|
||||||
|
#ifdef CARDINAL_INPUT_ONLY
|
||||||
|
if(movement)
|
||||||
|
DEBUG_INPUT("set last=[dirs2text(movement)]")
|
||||||
|
last_move_dir_pressed = movement
|
||||||
|
#endif
|
||||||
|
|
||||||
|
mob.focus?.key_down(movekey, src)
|
||||||
|
|
||||||
|
/client/verb/moveKeyUp(movekeyName as text)
|
||||||
|
set instant = TRUE
|
||||||
|
set hidden = TRUE
|
||||||
|
// set name = ".movekeyup"
|
||||||
|
set name = "KeyUp"
|
||||||
|
|
||||||
|
// Map text sent by skin.dmf to our numeric codes. (This can be optimized away once we update skin.dmf)
|
||||||
|
var/movekey = MOVE_KEY_MAPPINGS[movekeyName]
|
||||||
|
|
||||||
|
// Validate input. Must be one (and only one) of the key codes)
|
||||||
|
if(isnull(movekey) || (movekey & ~0xFFF) || (movekey & (movekey - 1)))
|
||||||
|
log_debug("Client [ckey] sent an illegal movement key up: [movekeyName] ([movekey])")
|
||||||
|
return
|
||||||
|
|
||||||
|
// Clear bit indicating we were holding the key
|
||||||
|
move_keys_held &= ~movekey
|
||||||
|
mod_keys_held &= ~movekey
|
||||||
|
|
||||||
|
// If we were holding at the start of this move cycle and now relased it, remember that.
|
||||||
|
var/movement = MOVEMENT_KEYS_TO_DIR(movekey)
|
||||||
|
if(movement && !(next_move_dir_add & movement))
|
||||||
|
DEBUG_INPUT("Saving [dirs2text(movement)] into next_move_dir_SUB")
|
||||||
|
next_move_dir_sub |= movement
|
||||||
|
|
||||||
|
mob.focus?.key_up(movekey, src)
|
||||||
|
|
||||||
|
// Called every game tick
|
||||||
|
/client/keyLoop()
|
||||||
|
mob.focus?.keyLoop(src)
|
||||||
42
code/modules/keybindings/readme.md
Normal file
42
code/modules/keybindings/readme.md
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# In-code keypress handling system
|
||||||
|
|
||||||
|
This whole system is heavily based off of forum_account's keyboard library.
|
||||||
|
Thanks to forum_account for saving the day, the library can be found
|
||||||
|
[here](https://secure.byond.com/developer/Forum_account/Keyboard)!
|
||||||
|
|
||||||
|
.dmf macros have some very serious shortcomings. For example, they do not allow reusing parts
|
||||||
|
of one macro in another, so giving cyborgs their own shortcuts to swap active module couldn't
|
||||||
|
inherit the movement that all mobs should have anyways. The webclient only supports one macro,
|
||||||
|
so having more than one was problematic. Additionally each keybind has to call an actual
|
||||||
|
verb, which meant a lot of hidden verbs that just call one other proc. Also our existing
|
||||||
|
macro was really bad and tied unrelated behavior into `Northeast()`, `Southeast()`, `Northwest()`,
|
||||||
|
and `Southwest()`.
|
||||||
|
|
||||||
|
The basic premise of this system is to not screw with .dmf macro setup at all and handle
|
||||||
|
pressing those keys in the code instead. We have every key call `client.keyDown()`
|
||||||
|
or `client.keyUp()` with the pressed key as an argument. Certain keys get processed
|
||||||
|
directly by the client because they should be doable at any time, then we call
|
||||||
|
`keyDown()` or `keyUp()` on the client's holder and the client's mob's focus.
|
||||||
|
By default `mob.focus` is the mob itself, but you can set it to any datum to give control of a
|
||||||
|
client's keypresses to another object. This would be a good way to handle a menu or driving
|
||||||
|
a mech. You can also set it to null to disregard input from a certain user.
|
||||||
|
|
||||||
|
Movement is handled by having each client call `client.keyLoop()` every game tick.
|
||||||
|
As above, this calls holder and `focus.keyLoop()`. `atom/movable/keyLoop()` handles movement
|
||||||
|
Try to keep the calculations in this proc light. It runs every tick for every client after all!
|
||||||
|
|
||||||
|
You can also tell which keys are being held down now. Each client a list of keys pressed called
|
||||||
|
`keys_held`. Each entry is a key as a text string associated with the world.time when it was
|
||||||
|
pressed.
|
||||||
|
|
||||||
|
No client-set keybindings at this time, but it shouldn't be too hard if someone wants.
|
||||||
|
|
||||||
|
Notes about certain keys:
|
||||||
|
|
||||||
|
* `Tab` has client-sided behavior but acts normally
|
||||||
|
* `T`, `O`, and `M` move focus to the input when pressed. This fires the keyUp macro right away.
|
||||||
|
* `\` needs to be escaped in the dmf so any usage is `\\`
|
||||||
|
|
||||||
|
You cannot `TICK_CHECK` or check `world.tick_usage` inside of procs called by key down and up
|
||||||
|
events. They happen outside of a byond tick and have no meaning there. Key looping
|
||||||
|
works correctly since it's part of a subsystem, not direct input.
|
||||||
34
code/modules/keybindings/setup.dm
Normal file
34
code/modules/keybindings/setup.dm
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
// Set a client's focus to an object and override these procs on that object to let it handle keypresses
|
||||||
|
|
||||||
|
/datum/proc/key_down(key, client/user) // Called when a key is pressed down initially
|
||||||
|
return
|
||||||
|
/datum/proc/key_up(key, client/user) // Called when a key is released
|
||||||
|
return
|
||||||
|
/datum/proc/keyLoop(client/user) // Called once every server tick
|
||||||
|
set waitfor = FALSE
|
||||||
|
return
|
||||||
|
|
||||||
|
/// Set mob's focus
|
||||||
|
/// TODO - Do we even need this concept?
|
||||||
|
/mob/proc/set_focus(datum/new_focus)
|
||||||
|
if(focus == new_focus)
|
||||||
|
return
|
||||||
|
focus = new_focus
|
||||||
|
|
||||||
|
/// Turns a keys bitfield into text showing all bits set
|
||||||
|
/proc/keys2text(keys)
|
||||||
|
if(!keys)
|
||||||
|
return ""
|
||||||
|
var/list/out = list()
|
||||||
|
if(keys & NORTH_KEY) out += "NORTH"
|
||||||
|
if(keys & SOUTH_KEY) out += "SOUTH"
|
||||||
|
if(keys & EAST_KEY) out += "EAST"
|
||||||
|
if(keys & WEST_KEY) out += "WEST"
|
||||||
|
if(keys & W_KEY) out += "W"
|
||||||
|
if(keys & A_KEY) out += "A"
|
||||||
|
if(keys & S_KEY) out += "S"
|
||||||
|
if(keys & D_KEY) out += "D"
|
||||||
|
if(keys & CTRL_KEY) out += "CTRL"
|
||||||
|
if(keys & SHIFT_KEY) out += "SHIFT"
|
||||||
|
if(keys & ALT_KEY) out += "ALT"
|
||||||
|
return out.Join(" ")
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
/mob/living
|
/mob/living
|
||||||
var/ooc_notes = null
|
var/ooc_notes = null
|
||||||
appearance_flags = TILE_BOUND|PIXEL_SCALE|KEEP_TOGETHER
|
appearance_flags = TILE_BOUND|PIXEL_SCALE|KEEP_TOGETHER|LONG_GLIDE
|
||||||
var/hunger_rate = DEFAULT_HUNGER_FACTOR
|
var/hunger_rate = DEFAULT_HUNGER_FACTOR
|
||||||
//custom say verbs
|
//custom say verbs
|
||||||
var/custom_say = null
|
var/custom_say = null
|
||||||
|
|||||||
@@ -197,7 +197,15 @@ default behaviour is:
|
|||||||
now_pushing = 0
|
now_pushing = 0
|
||||||
return
|
return
|
||||||
|
|
||||||
step(AM, t)
|
var/turf/T = AM.loc
|
||||||
|
var/turf/T2 = get_step(AM,t)
|
||||||
|
if(!T2) // Map edge
|
||||||
|
now_pushing = 0
|
||||||
|
return
|
||||||
|
var/move_time = movement_delay(loc, t)
|
||||||
|
move_time = DS2NEARESTTICK(move_time)
|
||||||
|
if(AM.Move(T2, t, move_time))
|
||||||
|
Move(T, t, move_time)
|
||||||
|
|
||||||
if(ishuman(AM) && AM:grabbed_by)
|
if(ishuman(AM) && AM:grabbed_by)
|
||||||
for(var/obj/item/weapon/grab/G in AM:grabbed_by)
|
for(var/obj/item/weapon/grab/G in AM:grabbed_by)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -231,3 +231,5 @@
|
|||||||
var/in_enclosed_vehicle = 0 //For mechs and fighters ambiance. Can be used in other cases.
|
var/in_enclosed_vehicle = 0 //For mechs and fighters ambiance. Can be used in other cases.
|
||||||
|
|
||||||
var/list/progressbars = null //VOREStation Edit
|
var/list/progressbars = null //VOREStation Edit
|
||||||
|
|
||||||
|
var/datum/focus //What receives our keyboard inputs. src by default // VOREStation Add - Key Handling
|
||||||
|
|||||||
@@ -140,22 +140,32 @@
|
|||||||
// Used many times below, faster reference.
|
// Used many times below, faster reference.
|
||||||
var/atom/loc = my_mob.loc
|
var/atom/loc = my_mob.loc
|
||||||
|
|
||||||
// We're controlling an object which is SOMEHOW DIFFERENT FROM AN EYE??
|
// We're controlling an object which is when admins possess an object.
|
||||||
if(my_mob.control_object)
|
if(my_mob.control_object)
|
||||||
Move_object(direct)
|
Move_object(direct)
|
||||||
|
|
||||||
// Ghosty mob movement
|
// Ghosty mob movement
|
||||||
if(my_mob.incorporeal_move && isobserver(my_mob))
|
if(my_mob.incorporeal_move && isobserver(my_mob))
|
||||||
Process_Incorpmove(direct)
|
Process_Incorpmove(direct)
|
||||||
|
DEBUG_INPUT("--------")
|
||||||
|
next_move_dir_add = 0 // This one I *think* exists so you can tap move and it will move even if delay isn't quite up.
|
||||||
|
next_move_dir_sub = 0 // I'm not really sure why next_move_dir_sub even exists.
|
||||||
return
|
return
|
||||||
|
|
||||||
// We're in the middle of another move we've already decided to do
|
// We're in the middle of another move we've already decided to do
|
||||||
if(moving)
|
if(moving)
|
||||||
|
log_debug("Client [src] attempted to move while moving=[moving]")
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
// We're still cooling down from the last move
|
// We're still cooling down from the last move
|
||||||
if(!my_mob.checkMoveCooldown())
|
if(!my_mob.checkMoveCooldown())
|
||||||
return
|
return
|
||||||
|
DEBUG_INPUT("--------")
|
||||||
|
next_move_dir_add = 0 // This one I *think* exists so you can tap move and it will move even if delay isn't quite up.
|
||||||
|
next_move_dir_sub = 0 // I'm not really sure why next_move_dir_sub even exists.
|
||||||
|
|
||||||
|
if(!n || !direct)
|
||||||
|
return
|
||||||
|
|
||||||
// If dead and we try to move in our mob, it leaves our body
|
// If dead and we try to move in our mob, it leaves our body
|
||||||
if(my_mob.stat == DEAD && isliving(my_mob) && !my_mob.forbid_seeing_deadchat)
|
if(my_mob.stat == DEAD && isliving(my_mob) && !my_mob.forbid_seeing_deadchat)
|
||||||
@@ -287,6 +297,10 @@
|
|||||||
else
|
else
|
||||||
. = my_mob.SelfMove(n, direct, total_delay)
|
. = my_mob.SelfMove(n, direct, total_delay)
|
||||||
|
|
||||||
|
// If we ended up moving diagonally, increase delay.
|
||||||
|
if((direct & (direct - 1)) && mob.loc == n)
|
||||||
|
my_mob.setMoveCooldown(total_delay * 2)
|
||||||
|
|
||||||
// If we have a grab
|
// If we have a grab
|
||||||
var/list/grablist = my_mob.ret_grab()
|
var/list/grablist = my_mob.ret_grab()
|
||||||
if(LAZYLEN(grablist))
|
if(LAZYLEN(grablist))
|
||||||
|
|||||||
@@ -3,8 +3,23 @@ macro "borghotkeymode"
|
|||||||
name = "TAB"
|
name = "TAB"
|
||||||
command = ".winset \"mainwindow.macro=borgmacro hotkey_toggle.is-checked=false input.focus=true input.background-color=#D3B5B5\""
|
command = ".winset \"mainwindow.macro=borgmacro hotkey_toggle.is-checked=false input.focus=true input.background-color=#D3B5B5\""
|
||||||
elem
|
elem
|
||||||
name = "CENTER+REP"
|
name = "Shift"
|
||||||
command = ".center"
|
command = "KeyDown Shift"
|
||||||
|
elem
|
||||||
|
name = "Shift+UP"
|
||||||
|
command = "KeyUp Shift"
|
||||||
|
elem
|
||||||
|
name = "Ctrl"
|
||||||
|
command = "KeyDown Ctrl"
|
||||||
|
elem
|
||||||
|
name = "Ctrl+UP"
|
||||||
|
command = "KeyUp Ctrl"
|
||||||
|
elem
|
||||||
|
name = "Alt"
|
||||||
|
command = "KeyDown Alt"
|
||||||
|
elem
|
||||||
|
name = "Alt+UP"
|
||||||
|
command = "KeyUp Alt"
|
||||||
elem
|
elem
|
||||||
name = "NORTHEAST"
|
name = "NORTHEAST"
|
||||||
command = ".northeast"
|
command = ".northeast"
|
||||||
@@ -24,8 +39,11 @@ macro "borghotkeymode"
|
|||||||
name = "CTRL+WEST"
|
name = "CTRL+WEST"
|
||||||
command = "westface"
|
command = "westface"
|
||||||
elem
|
elem
|
||||||
name = "WEST+REP"
|
name = "West"
|
||||||
command = ".west"
|
command = "KeyDown West"
|
||||||
|
elem
|
||||||
|
name = "West+UP"
|
||||||
|
command = "KeyUp West"
|
||||||
elem
|
elem
|
||||||
name = "ALT+NORTH"
|
name = "ALT+NORTH"
|
||||||
command = "northfaceperm"
|
command = "northfaceperm"
|
||||||
@@ -33,8 +51,11 @@ macro "borghotkeymode"
|
|||||||
name = "CTRL+NORTH"
|
name = "CTRL+NORTH"
|
||||||
command = "northface"
|
command = "northface"
|
||||||
elem
|
elem
|
||||||
name = "NORTH+REP"
|
name = "North"
|
||||||
command = ".moveup"
|
command = "KeyDown North"
|
||||||
|
elem
|
||||||
|
name = "North+UP"
|
||||||
|
command = "KeyUp North"
|
||||||
elem
|
elem
|
||||||
name = "ALT+EAST"
|
name = "ALT+EAST"
|
||||||
command = "eastfaceperm"
|
command = "eastfaceperm"
|
||||||
@@ -42,17 +63,17 @@ macro "borghotkeymode"
|
|||||||
name = "CTRL+EAST"
|
name = "CTRL+EAST"
|
||||||
command = "eastface"
|
command = "eastface"
|
||||||
elem
|
elem
|
||||||
name = "EAST+REP"
|
name = "East"
|
||||||
command = ".moveright"
|
command = "KeyDown East"
|
||||||
|
elem
|
||||||
|
name = "East+UP"
|
||||||
|
command = "KeyUp East"
|
||||||
elem
|
elem
|
||||||
name = "ALT+SOUTH"
|
name = "ALT+SOUTH"
|
||||||
command = "southfaceperm"
|
command = "southfaceperm"
|
||||||
elem
|
elem
|
||||||
name = "CTRL+SOUTH"
|
name = "CTRL+SOUTH"
|
||||||
command = "southface"
|
command = "southface"
|
||||||
elem
|
|
||||||
name = "SOUTH+REP"
|
|
||||||
command = ".movedown"
|
|
||||||
elem
|
elem
|
||||||
name = "CTRL+SHIFT+NORTH"
|
name = "CTRL+SHIFT+NORTH"
|
||||||
command = "shiftnorth"
|
command = "shiftnorth"
|
||||||
@@ -65,6 +86,11 @@ macro "borghotkeymode"
|
|||||||
elem
|
elem
|
||||||
name = "CTRL+SHIFT+EAST"
|
name = "CTRL+SHIFT+EAST"
|
||||||
command = "shifteast"
|
command = "shifteast"
|
||||||
|
name = "South"
|
||||||
|
command = "KeyDown South"
|
||||||
|
elem
|
||||||
|
name = "South+UP"
|
||||||
|
command = "KeyUp South"
|
||||||
elem
|
elem
|
||||||
name = "INSERT"
|
name = "INSERT"
|
||||||
command = "a-intent right"
|
command = "a-intent right"
|
||||||
@@ -99,17 +125,17 @@ macro "borghotkeymode"
|
|||||||
name = "5"
|
name = "5"
|
||||||
command = ".me"
|
command = ".me"
|
||||||
elem
|
elem
|
||||||
name = "A+REP"
|
name = "A"
|
||||||
command = ".moveleft"
|
command = "KeyDown A"
|
||||||
elem
|
elem
|
||||||
name = "CTRL+A+REP"
|
name = "A+UP"
|
||||||
command = ".moveleft"
|
command = "KeyUp A"
|
||||||
elem
|
elem
|
||||||
name = "D+REP"
|
name = "D"
|
||||||
command = ".moveright"
|
command = "KeyDown D"
|
||||||
elem
|
elem
|
||||||
name = "CTRL+D+REP"
|
name = "D+UP"
|
||||||
command = ".moveright"
|
command = "KeyUp D"
|
||||||
elem
|
elem
|
||||||
name = "F"
|
name = "F"
|
||||||
command = "a-intent left"
|
command = "a-intent left"
|
||||||
@@ -141,20 +167,20 @@ macro "borghotkeymode"
|
|||||||
name = "CTRL+R"
|
name = "CTRL+R"
|
||||||
command = ".southwest"
|
command = ".southwest"
|
||||||
elem "s_key"
|
elem "s_key"
|
||||||
name = "S+REP"
|
name = "S"
|
||||||
command = ".movedown"
|
command = "KeyDown S"
|
||||||
elem
|
elem
|
||||||
name = "CTRL+S+REP"
|
name = "S+UP"
|
||||||
command = ".movedown"
|
command = "KeyUp S"
|
||||||
elem
|
elem
|
||||||
name = "T"
|
name = "T"
|
||||||
command = ".say"
|
command = ".say"
|
||||||
elem "w_key"
|
elem "w_key"
|
||||||
name = "W+REP"
|
name = "W"
|
||||||
command = ".moveup"
|
command = "KeyDown W"
|
||||||
elem
|
elem
|
||||||
name = "CTRL+W+REP"
|
name = "W+UP"
|
||||||
command = ".moveup"
|
command = "KeyUp W"
|
||||||
elem
|
elem
|
||||||
name = "X"
|
name = "X"
|
||||||
command = ".northeast"
|
command = ".northeast"
|
||||||
@@ -236,8 +262,23 @@ macro "macro"
|
|||||||
name = "TAB"
|
name = "TAB"
|
||||||
command = ".winset \"mainwindow.macro=hotkeymode hotkey_toggle.is-checked=true mapwindow.map.focus=true\""
|
command = ".winset \"mainwindow.macro=hotkeymode hotkey_toggle.is-checked=true mapwindow.map.focus=true\""
|
||||||
elem
|
elem
|
||||||
name = "CENTER+REP"
|
name = "Shift"
|
||||||
command = ".center"
|
command = "KeyDown Shift"
|
||||||
|
elem
|
||||||
|
name = "Shift+UP"
|
||||||
|
command = "KeyUp Shift"
|
||||||
|
elem
|
||||||
|
name = "Ctrl"
|
||||||
|
command = "KeyDown Ctrl"
|
||||||
|
elem
|
||||||
|
name = "Ctrl+UP"
|
||||||
|
command = "KeyUp Ctrl"
|
||||||
|
elem
|
||||||
|
name = "Alt"
|
||||||
|
command = "KeyDown Alt"
|
||||||
|
elem
|
||||||
|
name = "Alt+UP"
|
||||||
|
command = "KeyUp Alt"
|
||||||
elem
|
elem
|
||||||
name = "NORTHEAST"
|
name = "NORTHEAST"
|
||||||
command = ".northeast"
|
command = ".northeast"
|
||||||
@@ -257,8 +298,11 @@ macro "macro"
|
|||||||
name = "CTRL+WEST"
|
name = "CTRL+WEST"
|
||||||
command = "westface"
|
command = "westface"
|
||||||
elem
|
elem
|
||||||
name = "WEST+REP"
|
name = "West"
|
||||||
command = ".moveleft"
|
command = "KeyDown West"
|
||||||
|
elem
|
||||||
|
name = "West+UP"
|
||||||
|
command = "KeyUp West"
|
||||||
elem
|
elem
|
||||||
name = "ALT+NORTH"
|
name = "ALT+NORTH"
|
||||||
command = "northfaceperm"
|
command = "northfaceperm"
|
||||||
@@ -266,8 +310,11 @@ macro "macro"
|
|||||||
name = "CTRL+NORTH"
|
name = "CTRL+NORTH"
|
||||||
command = "northface"
|
command = "northface"
|
||||||
elem
|
elem
|
||||||
name = "NORTH+REP"
|
name = "North"
|
||||||
command = ".moveup"
|
command = "KeyDown North"
|
||||||
|
elem
|
||||||
|
name = "North+UP"
|
||||||
|
command = "KeyUp North"
|
||||||
elem
|
elem
|
||||||
name = "ALT+EAST"
|
name = "ALT+EAST"
|
||||||
command = "eastfaceperm"
|
command = "eastfaceperm"
|
||||||
@@ -275,17 +322,17 @@ macro "macro"
|
|||||||
name = "CTRL+EAST"
|
name = "CTRL+EAST"
|
||||||
command = "eastface"
|
command = "eastface"
|
||||||
elem
|
elem
|
||||||
name = "EAST+REP"
|
name = "East"
|
||||||
command = ".moveright"
|
command = "KeyDown East"
|
||||||
|
elem
|
||||||
|
name = "East+UP"
|
||||||
|
command = "KeyUp East"
|
||||||
elem
|
elem
|
||||||
name = "ALT+SOUTH"
|
name = "ALT+SOUTH"
|
||||||
command = "southfaceperm"
|
command = "southfaceperm"
|
||||||
elem
|
elem
|
||||||
name = "CTRL+SOUTH"
|
name = "CTRL+SOUTH"
|
||||||
command = "southface"
|
command = "southface"
|
||||||
elem
|
|
||||||
name = "SOUTH+REP"
|
|
||||||
command = ".movedown"
|
|
||||||
elem
|
elem
|
||||||
name = "CTRL+SHIFT+NORTH"
|
name = "CTRL+SHIFT+NORTH"
|
||||||
command = "shiftnorth"
|
command = "shiftnorth"
|
||||||
@@ -298,6 +345,11 @@ macro "macro"
|
|||||||
elem
|
elem
|
||||||
name = "CTRL+SHIFT+EAST"
|
name = "CTRL+SHIFT+EAST"
|
||||||
command = "shifteast"
|
command = "shifteast"
|
||||||
|
name = "South"
|
||||||
|
command = "KeyDown South"
|
||||||
|
elem
|
||||||
|
name = "South+UP"
|
||||||
|
command = "KeyUp South"
|
||||||
elem
|
elem
|
||||||
name = "INSERT"
|
name = "INSERT"
|
||||||
command = "a-intent right"
|
command = "a-intent right"
|
||||||
@@ -317,11 +369,17 @@ macro "macro"
|
|||||||
name = "CTRL+4"
|
name = "CTRL+4"
|
||||||
command = "a-intent harm"
|
command = "a-intent harm"
|
||||||
elem
|
elem
|
||||||
name = "CTRL+A+REP"
|
name = "CTRL+A"
|
||||||
command = ".moveleft"
|
command = "KeyDown A"
|
||||||
elem
|
elem
|
||||||
name = "CTRL+D+REP"
|
name = "CTRL+A+UP"
|
||||||
command = ".moveright"
|
command = "KeyUp A"
|
||||||
|
elem
|
||||||
|
name = "CTRL+D"
|
||||||
|
command = "KeyDown D"
|
||||||
|
elem
|
||||||
|
name = "CTRL+D+UP"
|
||||||
|
command = "KeyUp D"
|
||||||
elem
|
elem
|
||||||
name = "CTRL+E"
|
name = "CTRL+E"
|
||||||
command = "quick-equip"
|
command = "quick-equip"
|
||||||
@@ -338,11 +396,17 @@ macro "macro"
|
|||||||
name = "CTRL+R"
|
name = "CTRL+R"
|
||||||
command = ".southwest"
|
command = ".southwest"
|
||||||
elem
|
elem
|
||||||
name = "CTRL+S+REP"
|
name = "CTRL+S"
|
||||||
command = ".movedown"
|
command = "KeyDown S"
|
||||||
elem
|
elem
|
||||||
name = "CTRL+W+REP"
|
name = "CTRL+S+UP"
|
||||||
command = ".moveup"
|
command = "KeyUp S"
|
||||||
|
elem
|
||||||
|
name = "CTRL+W"
|
||||||
|
command = "KeyDown W"
|
||||||
|
elem
|
||||||
|
name = "CTRL+W+UP"
|
||||||
|
command = "KeyUp W"
|
||||||
elem
|
elem
|
||||||
name = "CTRL+X"
|
name = "CTRL+X"
|
||||||
command = ".northeast"
|
command = ".northeast"
|
||||||
@@ -421,8 +485,23 @@ macro "hotkeymode"
|
|||||||
name = "TAB"
|
name = "TAB"
|
||||||
command = ".winset \"mainwindow.macro=macro hotkey_toggle.is-checked=false input.focus=true\""
|
command = ".winset \"mainwindow.macro=macro hotkey_toggle.is-checked=false input.focus=true\""
|
||||||
elem
|
elem
|
||||||
name = "CENTER+REP"
|
name = "Shift"
|
||||||
command = ".center"
|
command = "KeyDown Shift"
|
||||||
|
elem
|
||||||
|
name = "Shift+UP"
|
||||||
|
command = "KeyUp Shift"
|
||||||
|
elem
|
||||||
|
name = "Ctrl"
|
||||||
|
command = "KeyDown Ctrl"
|
||||||
|
elem
|
||||||
|
name = "Ctrl+UP"
|
||||||
|
command = "KeyUp Ctrl"
|
||||||
|
elem
|
||||||
|
name = "Alt"
|
||||||
|
command = "KeyDown Alt"
|
||||||
|
elem
|
||||||
|
name = "Alt+UP"
|
||||||
|
command = "KeyUp Alt"
|
||||||
elem
|
elem
|
||||||
name = "NORTHEAST"
|
name = "NORTHEAST"
|
||||||
command = ".northeast"
|
command = ".northeast"
|
||||||
@@ -442,8 +521,11 @@ macro "hotkeymode"
|
|||||||
name = "CTRL+WEST"
|
name = "CTRL+WEST"
|
||||||
command = "westface"
|
command = "westface"
|
||||||
elem
|
elem
|
||||||
name = "WEST+REP"
|
name = "West"
|
||||||
command = ".moveleft"
|
command = "KeyDown West"
|
||||||
|
elem
|
||||||
|
name = "West+UP"
|
||||||
|
command = "KeyUp West"
|
||||||
elem
|
elem
|
||||||
name = "ALT+NORTH"
|
name = "ALT+NORTH"
|
||||||
command = "northfaceperm"
|
command = "northfaceperm"
|
||||||
@@ -451,8 +533,11 @@ macro "hotkeymode"
|
|||||||
name = "CTRL+NORTH"
|
name = "CTRL+NORTH"
|
||||||
command = "northface"
|
command = "northface"
|
||||||
elem
|
elem
|
||||||
name = "NORTH+REP"
|
name = "North"
|
||||||
command = ".moveup"
|
command = "KeyDown North"
|
||||||
|
elem
|
||||||
|
name = "North+UP"
|
||||||
|
command = "KeyUp North"
|
||||||
elem
|
elem
|
||||||
name = "ALT+EAST"
|
name = "ALT+EAST"
|
||||||
command = "eastfaceperm"
|
command = "eastfaceperm"
|
||||||
@@ -460,17 +545,17 @@ macro "hotkeymode"
|
|||||||
name = "CTRL+EAST"
|
name = "CTRL+EAST"
|
||||||
command = "eastface"
|
command = "eastface"
|
||||||
elem
|
elem
|
||||||
name = "EAST+REP"
|
name = "East"
|
||||||
command = ".moveright"
|
command = "KeyDown East"
|
||||||
|
elem
|
||||||
|
name = "East+UP"
|
||||||
|
command = "KeyUp East"
|
||||||
elem
|
elem
|
||||||
name = "ALT+SOUTH"
|
name = "ALT+SOUTH"
|
||||||
command = "southfaceperm"
|
command = "southfaceperm"
|
||||||
elem
|
elem
|
||||||
name = "CTRL+SOUTH"
|
name = "CTRL+SOUTH"
|
||||||
command = "southface"
|
command = "southface"
|
||||||
elem
|
|
||||||
name = "SOUTH+REP"
|
|
||||||
command = ".movedown"
|
|
||||||
elem
|
elem
|
||||||
name = "CTRL+SHIFT+NORTH"
|
name = "CTRL+SHIFT+NORTH"
|
||||||
command = "shiftnorth"
|
command = "shiftnorth"
|
||||||
@@ -483,6 +568,11 @@ macro "hotkeymode"
|
|||||||
elem
|
elem
|
||||||
name = "CTRL+SHIFT+EAST"
|
name = "CTRL+SHIFT+EAST"
|
||||||
command = "shifteast"
|
command = "shifteast"
|
||||||
|
name = "South"
|
||||||
|
command = "KeyDown South"
|
||||||
|
elem
|
||||||
|
name = "South+UP"
|
||||||
|
command = "KeyUp South"
|
||||||
elem
|
elem
|
||||||
name = "INSERT"
|
name = "INSERT"
|
||||||
command = "a-intent right"
|
command = "a-intent right"
|
||||||
@@ -520,17 +610,17 @@ macro "hotkeymode"
|
|||||||
name = "6"
|
name = "6"
|
||||||
command = ".Subtle"
|
command = ".Subtle"
|
||||||
elem
|
elem
|
||||||
name = "A+REP"
|
name = "A"
|
||||||
command = ".moveleft"
|
command = "KeyDown A"
|
||||||
elem
|
elem
|
||||||
name = "CTRL+A+REP"
|
name = "A+UP"
|
||||||
command = ".moveleft"
|
command = "KeyUp A"
|
||||||
elem
|
elem
|
||||||
name = "D+REP"
|
name = "D"
|
||||||
command = ".moveright"
|
command = "KeyDown D"
|
||||||
elem
|
elem
|
||||||
name = "CTRL+D+REP"
|
name = "D+UP"
|
||||||
command = ".moveright"
|
command = "KeyUp D"
|
||||||
elem
|
elem
|
||||||
name = "E"
|
name = "E"
|
||||||
command = "quick-equip"
|
command = "quick-equip"
|
||||||
@@ -574,20 +664,20 @@ macro "hotkeymode"
|
|||||||
name = "CTRL+R"
|
name = "CTRL+R"
|
||||||
command = ".southwest"
|
command = ".southwest"
|
||||||
elem "s_key"
|
elem "s_key"
|
||||||
name = "S+REP"
|
name = "S"
|
||||||
command = ".movedown"
|
command = "KeyDown S"
|
||||||
elem
|
elem
|
||||||
name = "CTRL+S+REP"
|
name = "S+UP"
|
||||||
command = ".movedown"
|
command = "KeyUp S"
|
||||||
elem
|
elem
|
||||||
name = "T"
|
name = "T"
|
||||||
command = ".say"
|
command = ".say"
|
||||||
elem "w_key"
|
elem "w_key"
|
||||||
name = "W+REP"
|
name = "W"
|
||||||
command = ".moveup"
|
command = "KeyDown W"
|
||||||
elem
|
elem
|
||||||
name = "CTRL+W+REP"
|
name = "W+UP"
|
||||||
command = ".moveup"
|
command = "KeyUp W"
|
||||||
elem
|
elem
|
||||||
name = "X"
|
name = "X"
|
||||||
command = ".northeast"
|
command = ".northeast"
|
||||||
@@ -675,8 +765,23 @@ macro "borgmacro"
|
|||||||
name = "TAB"
|
name = "TAB"
|
||||||
command = ".winset \"mainwindow.macro=borghotkeymode hotkey_toggle.is-checked=true mapwindow.map.focus=true input.background-color=#F0F0F0\""
|
command = ".winset \"mainwindow.macro=borghotkeymode hotkey_toggle.is-checked=true mapwindow.map.focus=true input.background-color=#F0F0F0\""
|
||||||
elem
|
elem
|
||||||
name = "CENTER+REP"
|
name = "Shift"
|
||||||
command = ".center"
|
command = "KeyDown Shift"
|
||||||
|
elem
|
||||||
|
name = "Shift+UP"
|
||||||
|
command = "KeyUp Shift"
|
||||||
|
elem
|
||||||
|
name = "Ctrl"
|
||||||
|
command = "KeyDown Ctrl"
|
||||||
|
elem
|
||||||
|
name = "Ctrl+UP"
|
||||||
|
command = "KeyUp Ctrl"
|
||||||
|
elem
|
||||||
|
name = "Alt"
|
||||||
|
command = "KeyDown Alt"
|
||||||
|
elem
|
||||||
|
name = "Alt+UP"
|
||||||
|
command = "KeyUp Alt"
|
||||||
elem
|
elem
|
||||||
name = "NORTHEAST"
|
name = "NORTHEAST"
|
||||||
command = ".northeast"
|
command = ".northeast"
|
||||||
@@ -696,8 +801,11 @@ macro "borgmacro"
|
|||||||
name = "CTRL+WEST"
|
name = "CTRL+WEST"
|
||||||
command = "westface"
|
command = "westface"
|
||||||
elem
|
elem
|
||||||
name = "WEST+REP"
|
name = "West"
|
||||||
command = ".moveleft"
|
command = "KeyDown West"
|
||||||
|
elem
|
||||||
|
name = "West+UP"
|
||||||
|
command = "KeyUp West"
|
||||||
elem
|
elem
|
||||||
name = "ALT+NORTH"
|
name = "ALT+NORTH"
|
||||||
command = "northfaceperm"
|
command = "northfaceperm"
|
||||||
@@ -705,8 +813,11 @@ macro "borgmacro"
|
|||||||
name = "CTRL+NORTH"
|
name = "CTRL+NORTH"
|
||||||
command = "northface"
|
command = "northface"
|
||||||
elem
|
elem
|
||||||
name = "NORTH+REP"
|
name = "North"
|
||||||
command = ".moveup"
|
command = "KeyDown North"
|
||||||
|
elem
|
||||||
|
name = "North+UP"
|
||||||
|
command = "KeyUp North"
|
||||||
elem
|
elem
|
||||||
name = "ALT+EAST"
|
name = "ALT+EAST"
|
||||||
command = "eastfaceperm"
|
command = "eastfaceperm"
|
||||||
@@ -714,17 +825,17 @@ macro "borgmacro"
|
|||||||
name = "CTRL+EAST"
|
name = "CTRL+EAST"
|
||||||
command = "eastface"
|
command = "eastface"
|
||||||
elem
|
elem
|
||||||
name = "EAST+REP"
|
name = "East"
|
||||||
command = ".moveright"
|
command = "KeyDown East"
|
||||||
|
elem
|
||||||
|
name = "East+UP"
|
||||||
|
command = "KeyUp East"
|
||||||
elem
|
elem
|
||||||
name = "ALT+SOUTH"
|
name = "ALT+SOUTH"
|
||||||
command = "southfaceperm"
|
command = "southfaceperm"
|
||||||
elem
|
elem
|
||||||
name = "CTRL+SOUTH"
|
name = "CTRL+SOUTH"
|
||||||
command = "southface"
|
command = "southface"
|
||||||
elem
|
|
||||||
name = "SOUTH+REP"
|
|
||||||
command = ".movedown"
|
|
||||||
elem
|
elem
|
||||||
name = "CTRL+SHIFT+NORTH"
|
name = "CTRL+SHIFT+NORTH"
|
||||||
command = "shiftnorth"
|
command = "shiftnorth"
|
||||||
@@ -737,6 +848,11 @@ macro "borgmacro"
|
|||||||
elem
|
elem
|
||||||
name = "CTRL+SHIFT+EAST"
|
name = "CTRL+SHIFT+EAST"
|
||||||
command = "shifteast"
|
command = "shifteast"
|
||||||
|
name = "South"
|
||||||
|
command = "KeyDown South"
|
||||||
|
elem
|
||||||
|
name = "South+UP"
|
||||||
|
command = "KeyUp South"
|
||||||
elem
|
elem
|
||||||
name = "INSERT"
|
name = "INSERT"
|
||||||
command = "a-intent right"
|
command = "a-intent right"
|
||||||
@@ -756,11 +872,17 @@ macro "borgmacro"
|
|||||||
name = "CTRL+4"
|
name = "CTRL+4"
|
||||||
command = "a-intent left"
|
command = "a-intent left"
|
||||||
elem
|
elem
|
||||||
name = "CTRL+A+REP"
|
name = "CTRL+A"
|
||||||
command = ".moveleft"
|
command = "KeyDown A"
|
||||||
elem
|
elem
|
||||||
name = "CTRL+D+REP"
|
name = "CTRL+A+UP"
|
||||||
command = ".moveright"
|
command = "KeyUp A"
|
||||||
|
elem
|
||||||
|
name = "CTRL+D"
|
||||||
|
command = "KeyDown D"
|
||||||
|
elem
|
||||||
|
name = "CTRL+D+UP"
|
||||||
|
command = "KeyUp D"
|
||||||
elem
|
elem
|
||||||
name = "CTRL+F"
|
name = "CTRL+F"
|
||||||
command = "a-intent left"
|
command = "a-intent left"
|
||||||
@@ -774,11 +896,17 @@ macro "borgmacro"
|
|||||||
name = "CTRL+R"
|
name = "CTRL+R"
|
||||||
command = ".southwest"
|
command = ".southwest"
|
||||||
elem
|
elem
|
||||||
name = "CTRL+S+REP"
|
name = "CTRL+S"
|
||||||
command = ".movedown"
|
command = "KeyDown S"
|
||||||
elem
|
elem
|
||||||
name = "CTRL+W+REP"
|
name = "CTRL+S+UP"
|
||||||
command = ".moveup"
|
command = "KeyUp S"
|
||||||
|
elem
|
||||||
|
name = "CTRL+W"
|
||||||
|
command = "KeyDown W"
|
||||||
|
elem
|
||||||
|
name = "CTRL+W+UP"
|
||||||
|
command = "KeyUp W"
|
||||||
elem
|
elem
|
||||||
name = "CTRL+X"
|
name = "CTRL+X"
|
||||||
command = ".northeast"
|
command = ".northeast"
|
||||||
|
|||||||
@@ -249,7 +249,7 @@
|
|||||||
|
|
||||||
var/mob/living/carbon/human/user = AM
|
var/mob/living/carbon/human/user = AM
|
||||||
|
|
||||||
var/choice = tgui_alert(usr, "Do you want to depart via the tram? Your character will leave the round.","Departure",list("Yes","No"))
|
var/choice = tgui_alert(user, "Do you want to depart via the tram? Your character will leave the round.","Departure",list("Yes","No"))
|
||||||
if(user && Adjacent(user) && choice == "Yes")
|
if(user && Adjacent(user) && choice == "Yes")
|
||||||
var/mob/observer/dead/newghost = user.ghostize()
|
var/mob/observer/dead/newghost = user.ghostize()
|
||||||
newghost.timeofdeath = world.time
|
newghost.timeofdeath = world.time
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ export const releaseHeldKeys = () => {
|
|||||||
if (keyState[byondKeyCode]) {
|
if (keyState[byondKeyCode]) {
|
||||||
keyState[byondKeyCode] = false;
|
keyState[byondKeyCode] = false;
|
||||||
logger.log(`releasing key "${byondKeyCode}"`);
|
logger.log(`releasing key "${byondKeyCode}"`);
|
||||||
Byond.command(`KeyUp "${byondKeyCode}"`);
|
Byond.command(`TguiKeyUp "${byondKeyCode}"`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -51,6 +51,7 @@
|
|||||||
#include "code\__defines\gamemode.dm"
|
#include "code\__defines\gamemode.dm"
|
||||||
#include "code\__defines\holomap.dm"
|
#include "code\__defines\holomap.dm"
|
||||||
#include "code\__defines\hoses.dm"
|
#include "code\__defines\hoses.dm"
|
||||||
|
#include "code\__defines\input.dm"
|
||||||
#include "code\__defines\instruments.dm"
|
#include "code\__defines\instruments.dm"
|
||||||
#include "code\__defines\integrated_circuits.dm"
|
#include "code\__defines\integrated_circuits.dm"
|
||||||
#include "code\__defines\inventory_sizes.dm"
|
#include "code\__defines\inventory_sizes.dm"
|
||||||
@@ -281,6 +282,7 @@
|
|||||||
#include "code\controllers\subsystems\garbage.dm"
|
#include "code\controllers\subsystems\garbage.dm"
|
||||||
#include "code\controllers\subsystems\holomaps.dm"
|
#include "code\controllers\subsystems\holomaps.dm"
|
||||||
#include "code\controllers\subsystems\inactivity.dm"
|
#include "code\controllers\subsystems\inactivity.dm"
|
||||||
|
#include "code\controllers\subsystems\input.dm"
|
||||||
#include "code\controllers\subsystems\job.dm"
|
#include "code\controllers\subsystems\job.dm"
|
||||||
#include "code\controllers\subsystems\lighting.dm"
|
#include "code\controllers\subsystems\lighting.dm"
|
||||||
#include "code\controllers\subsystems\machines.dm"
|
#include "code\controllers\subsystems\machines.dm"
|
||||||
@@ -2602,6 +2604,9 @@
|
|||||||
#include "code\modules\integrated_electronics\subtypes\trig.dm"
|
#include "code\modules\integrated_electronics\subtypes\trig.dm"
|
||||||
#include "code\modules\integrated_electronics\subtypes\z_mixed_ch.dm"
|
#include "code\modules\integrated_electronics\subtypes\z_mixed_ch.dm"
|
||||||
#include "code\modules\integrated_electronics\~defines\~defines.dm"
|
#include "code\modules\integrated_electronics\~defines\~defines.dm"
|
||||||
|
#include "code\modules\keybindings\bindings_atom.dm"
|
||||||
|
#include "code\modules\keybindings\bindings_movekeys.dm"
|
||||||
|
#include "code\modules\keybindings\setup.dm"
|
||||||
#include "code\modules\library\lib_items.dm"
|
#include "code\modules\library\lib_items.dm"
|
||||||
#include "code\modules\library\lib_machines.dm"
|
#include "code\modules\library\lib_machines.dm"
|
||||||
#include "code\modules\library\lib_readme.dm"
|
#include "code\modules\library\lib_readme.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user