Skip to content

Commit

Permalink
Еще немного фиксов хоткеев (#16)
Browse files Browse the repository at this point in the history
* Фиксы хоткеев

* Гит ну емаё
  • Loading branch information
Vallat authored and Bizzonium committed Jul 4, 2021
1 parent 3fc81bf commit d17b2a0
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 24 deletions.
8 changes: 4 additions & 4 deletions code/game/machinery/Sleeper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,10 @@
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
if(occupant.loc == src)
if(not_turf_contains_dense_objects(get_turf(get_step(loc, dir))))
occupant.dropInto(get_step(loc, dir))
else
occupant.dropInto(loc)
// if(not_turf_contains_dense_objects(get_turf(get_step(loc, dir)))) //Because of new input system, I don't want to write more cruthes in it
// occupant.dropInto(get_step(loc, dir))
// else
occupant.dropInto(loc)
set_occupant(null)

for(var/obj/O in (contents - component_parts)) // In case an object was dropped inside or something. Excludes the beaker and component parts.
Expand Down
5 changes: 2 additions & 3 deletions code/game/machinery/cryo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
active_power_usage = 4000 //inf, was 200
clicksound = 'sound/machines/buttonbeep.ogg'
clickvol = 30

machine_name = "cryo cell"
machine_desc = "Uses a supercooled chemical bath to hold living beings in something close to suspended animation. Often paired with specialized medicines to rapidly heal wounds of a patient inside."

Expand Down Expand Up @@ -278,7 +278,7 @@
if (occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
occupant.forceMove(get_step(loc, SOUTH))
occupant.forceMove(loc)
if (occupant.bodytemperature < 261 && occupant.bodytemperature >= 70)
occupant.bodytemperature = 261
occupant = null
Expand Down Expand Up @@ -401,4 +401,3 @@

/datum/data/function/proc/display()
return

12 changes: 6 additions & 6 deletions code/game/machinery/cryopod.dm
Original file line number Diff line number Diff line change
Expand Up @@ -353,11 +353,11 @@
if(istype(O,/obj/item/storage/internal)) //Stop eating pockets, you fuck!
continue
O.forceMove(src)

// Надо их просто удалить
for(var/obj/item/holder/H in occupant)
H.destroy_all()

for(var/obj/item/holder/H in src.contents)
H.destroy_all()

Expand Down Expand Up @@ -586,10 +586,10 @@
occupant.client.eye = src.occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE

if(not_turf_contains_dense_objects(get_turf(get_step(loc, dir))))
occupant.dropInto(get_step(loc, dir))
else
occupant.dropInto(loc)
// if(not_turf_contains_dense_objects(get_turf(get_step(loc, dir)))) //Because of new input system, I don't want to write more cruthes in it
// occupant.dropInto(get_step(loc, dir))
// else
occupant.dropInto(loc)

set_occupant(null)

Expand Down
3 changes: 3 additions & 0 deletions code/game/verbs/ooc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
set desc = "Local OOC, seen only by those in view. Remember: Just because you see someone that doesn't mean they see you."
set category = "OOC"

if(!message)
message = input(src.mob, "", "looc \"text\"") as text|null

sanitize_and_communicate(/decl/communication_channel/ooc/looc, src, message)

/client/verb/fix_chat()
Expand Down
20 changes: 18 additions & 2 deletions code/modules/keybindings/bindings_atom.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Only way to do that is to tie the behavior into the focus's keyLoop().

/atom/movable/keyLoop(client/user)
if(!user.keys_held["Ctrl"])
if(!user.keys_held["Ctrl"] && isturf(loc))
var/movement_dir = null
var/list/movement = SSinput.movement_keys
for(var/_key in user.keys_held)
Expand All @@ -16,4 +16,20 @@
movement_dir &= ~(NORTH|SOUTH)
if((movement_dir & EAST) && (movement_dir & WEST))
movement_dir &= ~(EAST|WEST)
user.Move(get_step(src, movement_dir), movement_dir)
if(!movement_dir)
return
user.Move(get_step(loc, movement_dir), movement_dir)

/atom/movable/key_down(key, client/user)
if(!user.keys_held["Ctrl"])
var/movement_dir = null
var/list/movement = SSinput.movement_keys
movement_dir = movement_dir | movement[key]
// Sanity checks in case you hold left and right and up to make sure you only go up
if((movement_dir & NORTH) && (movement_dir & SOUTH))
movement_dir &= ~(NORTH|SOUTH)
if((movement_dir & EAST) && (movement_dir & WEST))
movement_dir &= ~(EAST|WEST)
if(!movement_dir)
return
user.Move(get_step(loc, movement_dir), movement_dir)
6 changes: 5 additions & 1 deletion code/modules/keybindings/bindings_living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@
else
resist()
return

if("J")
if(!aiming)
aiming = new(src)
aiming.toggle_active()
return
return ..()
9 changes: 1 addition & 8 deletions code/modules/keybindings/bindings_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@
mode() // attack_self(). No idea who came up with "mode()"
return
if("Q", "Northwest") // Northwest is Home
var/obj/item/I = get_active_hand()
if(!I)
to_chat(src, "<span class='warning'>You have nothing to drop in your hand!</span>")
else
drop_item(I)
hotkey_drop()
return
if("E")
quick_equip()
Expand All @@ -41,9 +37,6 @@
if(".")
SelfMove(DOWN)
return
if("j")
toggle_gun_mode()
return
//Bodypart selections
if("Numpad8")
user.body_toggle_head()
Expand Down

0 comments on commit d17b2a0

Please sign in to comment.