Code cleanup, spacing fixes

This commit is contained in:
Couls
2019-07-09 08:11:43 -04:00
parent e16b495170
commit 2d7f2bb3c2
3 changed files with 18 additions and 46 deletions
-27
View File
@@ -1,27 +0,0 @@
/datum/hotkey_mode
var/name
var/macro_hotkeys_inactive
var/macro_hotkeys_active
var/mob/my_mob
/datum/hotkey_mode/New(mob)
my_mob = mob
/datum/hotkey_mode/proc/set_winset_values()
//winset(my_mob, null, "mainwindow.macro=[macro_hotkeys_inactive] hotkey_toggle.is-checked=false input.focus=true input.background-color=#d3b5b5")
//winset(my_mob, null, "hotkey_toggle.command=\".winset \\\"mainwindow.macro != [macro_hotkeys_inactive] ? mainwindow.macro=[macro_hotkeys_inactive] hotkey_toggle.is-checked=false input.focus=true input.background-color=#d3b5b5 : mainwindow.macro=[macro_hotkeys_active] hotkey_toggle.is-checked=true mapwindow.map.focus=true input.background-color=#f0f0f0\\\"\"")
/datum/hotkey_mode/qwerty
name = "QWERTY"
macro_hotkeys_inactive = "macro"
macro_hotkeys_active = "hotkeymode"
/datum/hotkey_mode/azerty
name = "AZERTY"
macro_hotkeys_inactive = "azertymacro"
macro_hotkeys_active = "azertyhotkeymode"
/datum/hotkey_mode/cyborg
name = "Cyborg"
macro_hotkeys_inactive = "borgmacro"
macro_hotkeys_active = "borghotkeymode"
+18 -18
View File
@@ -68,7 +68,7 @@
if(!(AM.can_be_pulled(src, state, force)))
return FALSE
// If we're pulling something then drop what we're currently pulling and pull this instead.
// if we're pulling something then drop what we're currently pulling and pull this instead.
if(pulling)
if(state == 0)
stop_pulling()
@@ -137,7 +137,7 @@
var/atom/oldloc = loc
if(loc != newloc)
if (!(direct & (direct - 1))) //Cardinal move
if(!(direct & (direct - 1))) //Cardinal move
. = ..()
else //Diagonal move, split it into cardinal moves
moving_diagonally = FIRST_DIAG_STEP
@@ -147,47 +147,47 @@
// the second half of the diagonal movement, or the second attempt
// at a first half if step() fails because we hit something.
if(direct & NORTH)
if (direct & EAST)
if (step(src, NORTH) && moving_diagonally)
if(direct & EAST)
if(step(src, NORTH) && moving_diagonally)
first_step_dir = NORTH
moving_diagonally = SECOND_DIAG_STEP
. = step(src, EAST)
else if (moving_diagonally && step(src, EAST))
else if(moving_diagonally && step(src, EAST))
first_step_dir = EAST
moving_diagonally = SECOND_DIAG_STEP
. = step(src, NORTH)
else if (direct & WEST)
if (step(src, NORTH) && moving_diagonally)
else if(direct & WEST)
if(step(src, NORTH) && moving_diagonally)
first_step_dir = NORTH
moving_diagonally = SECOND_DIAG_STEP
. = step(src, WEST)
else if (moving_diagonally && step(src, WEST))
else if(moving_diagonally && step(src, WEST))
first_step_dir = WEST
moving_diagonally = SECOND_DIAG_STEP
. = step(src, NORTH)
else if (direct & SOUTH)
if (direct & EAST)
if (step(src, SOUTH) && moving_diagonally)
else if(direct & SOUTH)
if(direct & EAST)
if(step(src, SOUTH) && moving_diagonally)
first_step_dir = SOUTH
moving_diagonally = SECOND_DIAG_STEP
. = step(src, EAST)
else if (moving_diagonally && step(src, EAST))
else if(moving_diagonally && step(src, EAST))
first_step_dir = EAST
moving_diagonally = SECOND_DIAG_STEP
. = step(src, SOUTH)
else if (direct & WEST)
if (step(src, SOUTH) && moving_diagonally)
else if(direct & WEST)
if(step(src, SOUTH) && moving_diagonally)
first_step_dir = SOUTH
moving_diagonally = SECOND_DIAG_STEP
. = step(src, WEST)
else if (moving_diagonally && step(src, WEST))
else if(moving_diagonally && step(src, WEST))
first_step_dir = WEST
moving_diagonally = SECOND_DIAG_STEP
. = step(src, SOUTH)
if(moving_diagonally == SECOND_DIAG_STEP)
if(!.)
setDir(first_step_dir)
else if (!inertia_moving)
else if(!inertia_moving)
inertia_next_move = world.time + inertia_move_delay
newtonian_move(direct)
moving_diagonally = 0
@@ -210,7 +210,7 @@
// Called after a successful Move(). By this point, we've already moved
/atom/movable/proc/Moved(atom/OldLoc, Dir, Forced = FALSE)
SEND_SIGNAL(src, COMSIG_MOVABLE_MOVED, OldLoc, Dir, Forced)
if (!inertia_moving)
if(!inertia_moving)
inertia_next_move = world.time + inertia_move_delay
newtonian_move(Dir)
return TRUE
@@ -263,7 +263,7 @@
return 1
/atom/movable/proc/onTransitZ(old_z,new_z)
for(var/item in src) // Notify contents of Z-transition. This can be overridden IF we know the items contents do not care.
for(var/item in src) // Notify contents of Z-transition. This can be overridden if we know the items contents do not care.
var/atom/movable/AM = item
AM.onTransitZ(old_z,new_z)