From 2d7f2bb3c2d0c9a46597aa208ae4eda6ea892cfb Mon Sep 17 00:00:00 2001 From: Couls Date: Tue, 9 Jul 2019 08:11:43 -0400 Subject: [PATCH] Code cleanup, spacing fixes --- code/datums/helper_datums/hotkey_modes.dm | 27 ----------------- code/game/atoms_movable.dm | 36 +++++++++++------------ paradise.dme | 1 - 3 files changed, 18 insertions(+), 46 deletions(-) delete mode 100644 code/datums/helper_datums/hotkey_modes.dm diff --git a/code/datums/helper_datums/hotkey_modes.dm b/code/datums/helper_datums/hotkey_modes.dm deleted file mode 100644 index b2dd1537308..00000000000 --- a/code/datums/helper_datums/hotkey_modes.dm +++ /dev/null @@ -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" \ No newline at end of file diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 0c4bad88e37..74f606efe4c 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -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) diff --git a/paradise.dme b/paradise.dme index a7745fa816c..aa90c6b58b7 100644 --- a/paradise.dme +++ b/paradise.dme @@ -336,7 +336,6 @@ #include "code\datums\helper_datums\construction_datum.dm" #include "code\datums\helper_datums\events.dm" #include "code\datums\helper_datums\global_iterator.dm" -#include "code\datums\helper_datums\hotkey_modes.dm" #include "code\datums\helper_datums\icon_snapshot.dm" #include "code\datums\helper_datums\input.dm" #include "code\datums\helper_datums\map_template.dm"