mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 21:48:21 +01:00
Directional Locking
This adds the ability to lock your mob towards facing either a certain direction or a certain atom. Direction is done by shift-middleclick, atom is done by shift-ctrl-middleclick.
This commit is contained in:
@@ -170,6 +170,15 @@
|
||||
return 0
|
||||
|
||||
/mob/proc/Life()
|
||||
if(forced_look)
|
||||
if(!isnum(forced_look))
|
||||
var/atom/A = locateUID(forced_look)
|
||||
if(istype(A))
|
||||
if(get_dist(src, A) > (client ? client.view : world.view))
|
||||
forced_look = null
|
||||
to_chat(src, "<span class='notice'>Your direction target has left your view, you are no longer facing anything.</span>")
|
||||
return
|
||||
setDir()
|
||||
// handle_typing_indicator()
|
||||
return
|
||||
|
||||
@@ -533,6 +542,17 @@ var/list/slot_equipment_priority = list( \
|
||||
client.screen = list()
|
||||
hud_used.show_hud(hud_used.hud_version)
|
||||
|
||||
/mob/setDir(new_dir)
|
||||
if(forced_look)
|
||||
if(isnum(forced_look))
|
||||
dir = forced_look
|
||||
else
|
||||
var/atom/A = locateUID(forced_look)
|
||||
if(istype(A))
|
||||
dir = get_cardinal_dir(src, A)
|
||||
return
|
||||
. = ..()
|
||||
|
||||
/mob/proc/show_inv(mob/user)
|
||||
user.set_machine(src)
|
||||
var/dat = {"<table>
|
||||
|
||||
Reference in New Issue
Block a user